UNPKG

33.5 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3// tslint:disable
4exports.schema = {
5 "$schema": "http://json-schema.org/draft-07/schema#",
6 "definitions": {
7 "FunctionRunnerSize": {
8 "enum": [
9 "m128MiB",
10 "m1GiB",
11 "m256MiB",
12 "m2GiB",
13 "m512MiB"
14 ],
15 "type": "string"
16 },
17 "Session": {
18 "type": "object",
19 "properties": {
20 "accountId": {
21 "minLength": 1,
22 "type": "string"
23 },
24 "principal": {
25 "minLength": 1,
26 "type": "string"
27 }
28 },
29 "propertyOrder": [
30 "accountId",
31 "principal"
32 ],
33 "required": [
34 "accountId",
35 "principal"
36 ]
37 },
38 "ServerOnlyContext": {
39 "type": "object",
40 "properties": {
41 "tags": {
42 "type": "object",
43 "additionalProperties": {
44 "type": "string"
45 },
46 "propertyOrder": []
47 },
48 "logLevel": {
49 "type": "string"
50 },
51 "logExtra": {
52 "type": "object",
53 "additionalProperties": {},
54 "propertyOrder": []
55 },
56 "sampleRate": {
57 "type": "number"
58 },
59 "debugId": {
60 "type": "string"
61 },
62 "session": {
63 "$ref": "#/definitions/Session"
64 }
65 },
66 "propertyOrder": [
67 "tags",
68 "logLevel",
69 "logExtra",
70 "sampleRate",
71 "debugId",
72 "session"
73 ],
74 "required": [
75 "debugId"
76 ]
77 },
78 "UnauthorizedError": {
79 "type": "object",
80 "properties": {
81 "name": {
82 "type": "string"
83 },
84 "message": {
85 "type": "string"
86 },
87 "stack": {
88 "type": "string"
89 }
90 },
91 "propertyOrder": [
92 "name",
93 "message",
94 "stack"
95 ],
96 "required": [
97 "message",
98 "name"
99 ]
100 },
101 "NotFoundError": {
102 "type": "object",
103 "properties": {
104 "name": {
105 "type": "string"
106 },
107 "message": {
108 "type": "string"
109 },
110 "stack": {
111 "type": "string"
112 }
113 },
114 "propertyOrder": [
115 "name",
116 "message",
117 "stack"
118 ],
119 "required": [
120 "message",
121 "name"
122 ]
123 },
124 "ExistsError": {
125 "type": "object",
126 "properties": {
127 "name": {
128 "type": "string"
129 },
130 "message": {
131 "type": "string"
132 },
133 "stack": {
134 "type": "string"
135 }
136 },
137 "propertyOrder": [
138 "name",
139 "message",
140 "stack"
141 ],
142 "required": [
143 "message",
144 "name"
145 ]
146 },
147 "SubDomain": {
148 "type": "object",
149 "properties": {
150 "type": {
151 "type": "string",
152 "enum": [
153 "subdomain"
154 ]
155 },
156 "name": {
157 "type": "string"
158 }
159 },
160 "propertyOrder": [
161 "type",
162 "name"
163 ],
164 "required": [
165 "name",
166 "type"
167 ]
168 },
169 "CNameDomain": {
170 "type": "object",
171 "properties": {
172 "type": {
173 "type": "string",
174 "enum": [
175 "cname"
176 ]
177 },
178 "name": {
179 "format": "hostname",
180 "type": "string"
181 },
182 "certificate": {
183 "minLength": 1,
184 "type": "string"
185 }
186 },
187 "propertyOrder": [
188 "type",
189 "name",
190 "certificate"
191 ],
192 "required": [
193 "certificate",
194 "name",
195 "type"
196 ]
197 },
198 "Domain": {
199 "anyOf": [
200 {
201 "$ref": "#/definitions/SubDomain"
202 },
203 {
204 "$ref": "#/definitions/CNameDomain"
205 }
206 ]
207 },
208 "Environment": {
209 "type": "object",
210 "properties": {
211 "name": {
212 "pattern": "^[A-Za-z][A-Za-z_\\d]{0,49}$",
213 "type": "string"
214 },
215 "domains": {
216 "type": "array",
217 "items": {
218 "anyOf": [
219 {
220 "$ref": "#/definitions/SubDomain"
221 },
222 {
223 "$ref": "#/definitions/CNameDomain"
224 }
225 ]
226 }
227 }
228 },
229 "propertyOrder": [
230 "name",
231 "domains"
232 ],
233 "required": [
234 "domains",
235 "name"
236 ]
237 },
238 "Application": {
239 "type": "object",
240 "properties": {
241 "accountId": {
242 "minLength": 1,
243 "type": "string"
244 },
245 "id": {
246 "minLength": 1,
247 "type": "string"
248 },
249 "name": {
250 "description": "Non-unique user friendly name to identify this app",
251 "minLength": 1,
252 "type": "string"
253 },
254 "createdAt": {
255 "description": "Enables basic storage and retrieval of dates and times.",
256 "type": "string",
257 "format": "date-time",
258 "coerce-date": true
259 },
260 "updatedAt": {
261 "description": "Enables basic storage and retrieval of dates and times.",
262 "type": "string",
263 "format": "date-time",
264 "coerce-date": true
265 },
266 "sourceUrl": {
267 "description": "If cloned from template, will hold the template github URL (including the git tag | digest).\nCould be used in the future to track a github repo.",
268 "format": "uri",
269 "type": "string"
270 },
271 "environments": {
272 "type": "array",
273 "items": {
274 "$ref": "#/definitions/Environment"
275 }
276 }
277 },
278 "propertyOrder": [
279 "accountId",
280 "id",
281 "name",
282 "createdAt",
283 "updatedAt",
284 "sourceUrl",
285 "environments"
286 ],
287 "required": [
288 "accountId",
289 "createdAt",
290 "environments",
291 "id",
292 "name",
293 "updatedAt"
294 ]
295 },
296 "Template": {
297 "type": "object",
298 "properties": {
299 "id": {
300 "minLength": 1,
301 "type": "string"
302 },
303 "name": {
304 "minLength": 1,
305 "type": "string"
306 },
307 "previewImageUrl": {
308 "format": "uri",
309 "type": "string"
310 },
311 "githubUrl": {
312 "format": "uri",
313 "type": "string"
314 }
315 },
316 "propertyOrder": [
317 "id",
318 "name",
319 "previewImageUrl",
320 "githubUrl"
321 ],
322 "required": [
323 "githubUrl",
324 "id",
325 "name",
326 "previewImageUrl"
327 ]
328 },
329 "ExternalAccount": {
330 "type": "object",
331 "properties": {
332 "source": {
333 "description": "e.g. github",
334 "minLength": 1,
335 "type": "string"
336 },
337 "id": {
338 "minLength": 1,
339 "type": "string"
340 }
341 },
342 "propertyOrder": [
343 "source",
344 "id"
345 ],
346 "required": [
347 "id",
348 "source"
349 ]
350 },
351 "User": {
352 "type": "object",
353 "properties": {
354 "id": {
355 "minLength": 1,
356 "type": "string"
357 },
358 "fullName": {
359 "minLength": 1,
360 "type": "string"
361 },
362 "email": {
363 "format": "email",
364 "type": "string"
365 },
366 "externalAccounts": {
367 "type": "array",
368 "items": {
369 "$ref": "#/definitions/ExternalAccount"
370 }
371 }
372 },
373 "propertyOrder": [
374 "id",
375 "fullName",
376 "email",
377 "externalAccounts"
378 ],
379 "required": [
380 "email",
381 "externalAccounts",
382 "fullName",
383 "id"
384 ]
385 },
386 "TimePeriod": {
387 "description": "Pattern as supported by the ms package",
388 "minLength": 1,
389 "type": "string"
390 },
391 "LogRecord": {
392 "type": "object",
393 "properties": {
394 "source": {
395 "type": "string"
396 },
397 "msg": {
398 "type": "string"
399 },
400 "isErr": {
401 "type": "boolean"
402 },
403 "time": {
404 "description": "Enables basic storage and retrieval of dates and times.",
405 "type": "string",
406 "format": "date-time",
407 "coerce-date": true
408 },
409 "durUs": {
410 "type": "number"
411 },
412 "reqid": {
413 "type": "string"
414 }
415 },
416 "propertyOrder": [
417 "source",
418 "msg",
419 "isErr",
420 "time",
421 "durUs",
422 "reqid"
423 ],
424 "required": [
425 "isErr",
426 "msg",
427 "source",
428 "time"
429 ]
430 },
431 "LogReadOpts": {
432 "type": "object",
433 "properties": {
434 "since": {
435 "description": "Enables basic storage and retrieval of dates and times.",
436 "type": "string",
437 "format": "date-time",
438 "coerce-date": true
439 },
440 "limit": {
441 "minimum": 1,
442 "maximum": 10000,
443 "type": "number"
444 },
445 "follow": {
446 "type": "boolean"
447 },
448 "nextToken": {
449 "description": "Continuation token (received in response)",
450 "minLength": 1,
451 "type": "string"
452 }
453 },
454 "propertyOrder": [
455 "since",
456 "limit",
457 "follow",
458 "nextToken"
459 ],
460 "required": [
461 "follow",
462 "limit",
463 "since"
464 ]
465 },
466 "LogsResponse": {
467 "type": "object",
468 "properties": {
469 "records": {
470 "type": "array",
471 "items": {
472 "$ref": "#/definitions/LogRecord"
473 }
474 },
475 "nextToken": {
476 "minLength": 1,
477 "type": "string"
478 }
479 },
480 "propertyOrder": [
481 "records",
482 "nextToken"
483 ],
484 "required": [
485 "records"
486 ]
487 },
488 "CreateTicketResponse": {
489 "type": "object",
490 "properties": {
491 "ticket": {
492 "minLength": 1,
493 "type": "string"
494 },
495 "expires": {
496 "description": "Pattern as supported by the ms package",
497 "minLength": 1,
498 "type": "string"
499 }
500 },
501 "propertyOrder": [
502 "ticket",
503 "expires"
504 ],
505 "required": [
506 "expires",
507 "ticket"
508 ]
509 },
510 "Lycan": {
511 "type": "object",
512 "properties": {
513 "createTicket": {
514 "description": "Create a ticket for claiming an API key",
515 "type": "object",
516 "properties": {
517 "params": {
518 "type": "object",
519 "properties": {}
520 },
521 "returns": {
522 "$ref": "#/definitions/CreateTicketResponse"
523 }
524 },
525 "propertyOrder": [
526 "params",
527 "returns"
528 ],
529 "required": [
530 "params",
531 "returns"
532 ]
533 },
534 "claimTicket": {
535 "description": "Returns an API key in exchange for a valid ticket",
536 "type": "object",
537 "properties": {
538 "params": {
539 "type": "object",
540 "properties": {
541 "ticket": {
542 "type": "string"
543 }
544 },
545 "propertyOrder": [
546 "ticket"
547 ],
548 "required": [
549 "ticket"
550 ]
551 },
552 "throws": {
553 "$ref": "#/definitions/NotFoundError"
554 },
555 "returns": {
556 "type": "string"
557 }
558 },
559 "propertyOrder": [
560 "params",
561 "throws",
562 "returns"
563 ],
564 "required": [
565 "params",
566 "returns",
567 "throws"
568 ]
569 },
570 "listTemplates": {
571 "type": "object",
572 "properties": {
573 "params": {
574 "type": "object",
575 "properties": {}
576 },
577 "returns": {
578 "type": "array",
579 "items": {
580 "$ref": "#/definitions/Template"
581 }
582 }
583 },
584 "propertyOrder": [
585 "params",
586 "returns"
587 ],
588 "required": [
589 "params",
590 "returns"
591 ]
592 },
593 "tryTemplate": {
594 "type": "object",
595 "properties": {
596 "params": {
597 "type": "object",
598 "properties": {
599 "id": {
600 "minLength": 1,
601 "type": "string"
602 }
603 },
604 "propertyOrder": [
605 "id"
606 ],
607 "required": [
608 "id"
609 ]
610 },
611 "throws": {
612 "$ref": "#/definitions/NotFoundError"
613 },
614 "returns": {
615 "$ref": "#/definitions/Application"
616 }
617 },
618 "propertyOrder": [
619 "params",
620 "throws",
621 "returns"
622 ],
623 "required": [
624 "params",
625 "returns",
626 "throws"
627 ]
628 },
629 "whoami": {
630 "type": "object",
631 "properties": {
632 "params": {
633 "type": "object",
634 "properties": {}
635 },
636 "returns": {
637 "$ref": "#/definitions/User"
638 },
639 "throws": {
640 "$ref": "#/definitions/UnauthorizedError"
641 }
642 },
643 "propertyOrder": [
644 "params",
645 "returns",
646 "throws"
647 ],
648 "required": [
649 "params",
650 "returns",
651 "throws"
652 ]
653 },
654 "listApps": {
655 "type": "object",
656 "properties": {
657 "params": {
658 "type": "object",
659 "properties": {}
660 },
661 "throws": {
662 "$ref": "#/definitions/UnauthorizedError"
663 },
664 "returns": {
665 "type": "array",
666 "items": {
667 "$ref": "#/definitions/Application"
668 }
669 }
670 },
671 "propertyOrder": [
672 "params",
673 "throws",
674 "returns"
675 ],
676 "required": [
677 "params",
678 "returns",
679 "throws"
680 ]
681 },
682 "deployInitial": {
683 "type": "object",
684 "properties": {
685 "params": {
686 "type": "object",
687 "properties": {
688 "env": {
689 "pattern": "^[A-Za-z][A-Za-z_\\d]{0,49}$",
690 "type": "string"
691 },
692 "name": {
693 "minLength": 1,
694 "type": "string"
695 },
696 "digest": {
697 "minLength": 1,
698 "type": "string"
699 },
700 "envVars": {
701 "type": "array",
702 "items": {
703 "type": "array",
704 "items": [
705 {
706 "type": "string"
707 },
708 {
709 "type": "string"
710 }
711 ],
712 "minItems": 2,
713 "additionalItems": {
714 "anyOf": [
715 {
716 "type": "string"
717 },
718 {
719 "type": "string"
720 }
721 ]
722 }
723 }
724 }
725 },
726 "propertyOrder": [
727 "env",
728 "name",
729 "digest",
730 "envVars"
731 ],
732 "required": [
733 "digest",
734 "env",
735 "envVars",
736 "name"
737 ]
738 },
739 "throws": {
740 "anyOf": [
741 {
742 "$ref": "#/definitions/UnauthorizedError"
743 },
744 {
745 "$ref": "#/definitions/ExistsError"
746 }
747 ]
748 },
749 "returns": {
750 "$ref": "#/definitions/Application"
751 }
752 },
753 "propertyOrder": [
754 "params",
755 "throws",
756 "returns"
757 ],
758 "required": [
759 "params",
760 "returns",
761 "throws"
762 ]
763 },
764 "deploy": {
765 "type": "object",
766 "properties": {
767 "params": {
768 "type": "object",
769 "properties": {
770 "appId": {
771 "minLength": 1,
772 "type": "string"
773 },
774 "env": {
775 "pattern": "^[A-Za-z][A-Za-z_\\d]{0,49}$",
776 "type": "string"
777 },
778 "digest": {
779 "minLength": 1,
780 "type": "string"
781 },
782 "envVars": {
783 "type": "array",
784 "items": {
785 "type": "array",
786 "items": [
787 {
788 "type": "string"
789 },
790 {
791 "type": "string"
792 }
793 ],
794 "minItems": 2,
795 "additionalItems": {
796 "anyOf": [
797 {
798 "type": "string"
799 },
800 {
801 "type": "string"
802 }
803 ]
804 }
805 }
806 }
807 },
808 "propertyOrder": [
809 "appId",
810 "env",
811 "digest",
812 "envVars"
813 ],
814 "required": [
815 "appId",
816 "digest",
817 "env",
818 "envVars"
819 ]
820 },
821 "throws": {
822 "anyOf": [
823 {
824 "$ref": "#/definitions/UnauthorizedError"
825 },
826 {
827 "$ref": "#/definitions/NotFoundError"
828 }
829 ]
830 },
831 "returns": {
832 "$ref": "#/definitions/Application"
833 }
834 },
835 "propertyOrder": [
836 "params",
837 "throws",
838 "returns"
839 ],
840 "required": [
841 "params",
842 "returns",
843 "throws"
844 ]
845 },
846 "claimApp": {
847 "description": "Claim an anonymously deployed app into a user account",
848 "type": "object",
849 "properties": {
850 "params": {
851 "type": "object",
852 "properties": {
853 "accountId": {
854 "minLength": 1,
855 "type": "string"
856 },
857 "appId": {
858 "minLength": 1,
859 "type": "string"
860 }
861 },
862 "propertyOrder": [
863 "accountId",
864 "appId"
865 ],
866 "required": [
867 "accountId",
868 "appId"
869 ]
870 },
871 "throws": {
872 "anyOf": [
873 {
874 "$ref": "#/definitions/UnauthorizedError"
875 },
876 {
877 "$ref": "#/definitions/NotFoundError"
878 }
879 ]
880 },
881 "returns": {
882 "type": "null"
883 }
884 },
885 "propertyOrder": [
886 "params",
887 "throws",
888 "returns"
889 ],
890 "required": [
891 "params",
892 "returns",
893 "throws"
894 ]
895 },
896 "getLogs": {
897 "type": "object",
898 "properties": {
899 "params": {
900 "type": "object",
901 "properties": {
902 "appId": {
903 "minLength": 1,
904 "type": "string"
905 },
906 "env": {
907 "pattern": "^[A-Za-z][A-Za-z_\\d]{0,49}$",
908 "type": "string"
909 },
910 "opts": {
911 "$ref": "#/definitions/LogReadOpts"
912 }
913 },
914 "propertyOrder": [
915 "appId",
916 "env",
917 "opts"
918 ],
919 "required": [
920 "appId",
921 "env",
922 "opts"
923 ]
924 },
925 "throws": {
926 "anyOf": [
927 {
928 "$ref": "#/definitions/UnauthorizedError"
929 },
930 {
931 "$ref": "#/definitions/NotFoundError"
932 }
933 ]
934 },
935 "returns": {
936 "$ref": "#/definitions/LogsResponse"
937 }
938 },
939 "propertyOrder": [
940 "params",
941 "throws",
942 "returns"
943 ],
944 "required": [
945 "params",
946 "returns",
947 "throws"
948 ]
949 }
950 },
951 "propertyOrder": [
952 "createTicket",
953 "claimTicket",
954 "listTemplates",
955 "tryTemplate",
956 "whoami",
957 "listApps",
958 "deployInitial",
959 "deploy",
960 "claimApp",
961 "getLogs"
962 ],
963 "required": [
964 "claimApp",
965 "claimTicket",
966 "createTicket",
967 "deploy",
968 "deployInitial",
969 "getLogs",
970 "listApps",
971 "listTemplates",
972 "tryTemplate",
973 "whoami"
974 ]
975 }
976 }
977};
978class InternalServerError extends Error {
979 constructor() {
980 super(...arguments);
981 this.name = 'InternalServerError';
982 }
983}
984exports.InternalServerError = InternalServerError;
985class UnauthorizedError extends Error {
986 constructor() {
987 super(...arguments);
988 this.name = 'UnauthorizedError';
989 }
990}
991exports.UnauthorizedError = UnauthorizedError;
992class NotFoundError extends Error {
993 constructor() {
994 super(...arguments);
995 this.name = 'NotFoundError';
996 }
997}
998exports.NotFoundError = NotFoundError;
999class ExistsError extends Error {
1000 constructor() {
1001 super(...arguments);
1002 this.name = 'ExistsError';
1003 }
1004}
1005exports.ExistsError = ExistsError;
1006var FunctionRunnerSize;
1007(function (FunctionRunnerSize) {
1008 FunctionRunnerSize["M128MIB"] = "m128MiB";
1009 FunctionRunnerSize["M1GIB"] = "m1GiB";
1010 FunctionRunnerSize["M256MIB"] = "m256MiB";
1011 FunctionRunnerSize["M2GIB"] = "m2GiB";
1012 FunctionRunnerSize["M512MIB"] = "m512MiB";
1013})(FunctionRunnerSize = exports.FunctionRunnerSize || (exports.FunctionRunnerSize = {}));
1014//# sourceMappingURL=interfaces.js.map
\No newline at end of file