1 | export declare const schema: {
|
2 | "$schema": string;
|
3 | "definitions": {
|
4 | "FunctionRunnerSize": {
|
5 | "enum": string[];
|
6 | "type": string;
|
7 | };
|
8 | "Session": {
|
9 | "type": string;
|
10 | "properties": {
|
11 | "accountId": {
|
12 | "minLength": number;
|
13 | "type": string;
|
14 | };
|
15 | "principal": {
|
16 | "minLength": number;
|
17 | "type": string;
|
18 | };
|
19 | };
|
20 | "propertyOrder": string[];
|
21 | "required": string[];
|
22 | };
|
23 | "ServerOnlyContext": {
|
24 | "type": string;
|
25 | "properties": {
|
26 | "tags": {
|
27 | "type": string;
|
28 | "additionalProperties": {
|
29 | "type": string;
|
30 | };
|
31 | "propertyOrder": never[];
|
32 | };
|
33 | "logLevel": {
|
34 | "type": string;
|
35 | };
|
36 | "logExtra": {
|
37 | "type": string;
|
38 | "additionalProperties": {};
|
39 | "propertyOrder": never[];
|
40 | };
|
41 | "sampleRate": {
|
42 | "type": string;
|
43 | };
|
44 | "debugId": {
|
45 | "type": string;
|
46 | };
|
47 | "session": {
|
48 | "$ref": string;
|
49 | };
|
50 | };
|
51 | "propertyOrder": string[];
|
52 | "required": string[];
|
53 | };
|
54 | "UnauthorizedError": {
|
55 | "type": string;
|
56 | "properties": {
|
57 | "name": {
|
58 | "type": string;
|
59 | };
|
60 | "message": {
|
61 | "type": string;
|
62 | };
|
63 | "stack": {
|
64 | "type": string;
|
65 | };
|
66 | };
|
67 | "propertyOrder": string[];
|
68 | "required": string[];
|
69 | };
|
70 | "NotFoundError": {
|
71 | "type": string;
|
72 | "properties": {
|
73 | "name": {
|
74 | "type": string;
|
75 | };
|
76 | "message": {
|
77 | "type": string;
|
78 | };
|
79 | "stack": {
|
80 | "type": string;
|
81 | };
|
82 | };
|
83 | "propertyOrder": string[];
|
84 | "required": string[];
|
85 | };
|
86 | "ExistsError": {
|
87 | "type": string;
|
88 | "properties": {
|
89 | "name": {
|
90 | "type": string;
|
91 | };
|
92 | "message": {
|
93 | "type": string;
|
94 | };
|
95 | "stack": {
|
96 | "type": string;
|
97 | };
|
98 | };
|
99 | "propertyOrder": string[];
|
100 | "required": string[];
|
101 | };
|
102 | "SubDomain": {
|
103 | "type": string;
|
104 | "properties": {
|
105 | "type": {
|
106 | "type": string;
|
107 | "enum": string[];
|
108 | };
|
109 | "name": {
|
110 | "type": string;
|
111 | };
|
112 | };
|
113 | "propertyOrder": string[];
|
114 | "required": string[];
|
115 | };
|
116 | "CNameDomain": {
|
117 | "type": string;
|
118 | "properties": {
|
119 | "type": {
|
120 | "type": string;
|
121 | "enum": string[];
|
122 | };
|
123 | "name": {
|
124 | "format": string;
|
125 | "type": string;
|
126 | };
|
127 | "certificate": {
|
128 | "minLength": number;
|
129 | "type": string;
|
130 | };
|
131 | };
|
132 | "propertyOrder": string[];
|
133 | "required": string[];
|
134 | };
|
135 | "Domain": {
|
136 | "anyOf": {
|
137 | "$ref": string;
|
138 | }[];
|
139 | };
|
140 | "Environment": {
|
141 | "type": string;
|
142 | "properties": {
|
143 | "name": {
|
144 | "pattern": string;
|
145 | "type": string;
|
146 | };
|
147 | "domains": {
|
148 | "type": string;
|
149 | "items": {
|
150 | "anyOf": {
|
151 | "$ref": string;
|
152 | }[];
|
153 | };
|
154 | };
|
155 | };
|
156 | "propertyOrder": string[];
|
157 | "required": string[];
|
158 | };
|
159 | "Application": {
|
160 | "type": string;
|
161 | "properties": {
|
162 | "accountId": {
|
163 | "minLength": number;
|
164 | "type": string;
|
165 | };
|
166 | "id": {
|
167 | "minLength": number;
|
168 | "type": string;
|
169 | };
|
170 | "name": {
|
171 | "description": string;
|
172 | "minLength": number;
|
173 | "type": string;
|
174 | };
|
175 | "createdAt": {
|
176 | "description": string;
|
177 | "type": string;
|
178 | "format": string;
|
179 | "coerce-date": boolean;
|
180 | };
|
181 | "updatedAt": {
|
182 | "description": string;
|
183 | "type": string;
|
184 | "format": string;
|
185 | "coerce-date": boolean;
|
186 | };
|
187 | "sourceUrl": {
|
188 | "description": string;
|
189 | "format": string;
|
190 | "type": string;
|
191 | };
|
192 | "environments": {
|
193 | "type": string;
|
194 | "items": {
|
195 | "$ref": string;
|
196 | };
|
197 | };
|
198 | };
|
199 | "propertyOrder": string[];
|
200 | "required": string[];
|
201 | };
|
202 | "Template": {
|
203 | "type": string;
|
204 | "properties": {
|
205 | "id": {
|
206 | "minLength": number;
|
207 | "type": string;
|
208 | };
|
209 | "name": {
|
210 | "minLength": number;
|
211 | "type": string;
|
212 | };
|
213 | "previewImageUrl": {
|
214 | "format": string;
|
215 | "type": string;
|
216 | };
|
217 | "githubUrl": {
|
218 | "format": string;
|
219 | "type": string;
|
220 | };
|
221 | "codeDigest": {
|
222 | "minLength": number;
|
223 | "type": string;
|
224 | };
|
225 | };
|
226 | "propertyOrder": string[];
|
227 | "required": string[];
|
228 | };
|
229 | "ExternalAccount": {
|
230 | "type": string;
|
231 | "properties": {
|
232 | "source": {
|
233 | "description": string;
|
234 | "minLength": number;
|
235 | "type": string;
|
236 | };
|
237 | "id": {
|
238 | "minLength": number;
|
239 | "type": string;
|
240 | };
|
241 | };
|
242 | "propertyOrder": string[];
|
243 | "required": string[];
|
244 | };
|
245 | "User": {
|
246 | "type": string;
|
247 | "properties": {
|
248 | "id": {
|
249 | "minLength": number;
|
250 | "type": string;
|
251 | };
|
252 | "fullName": {
|
253 | "minLength": number;
|
254 | "type": string;
|
255 | };
|
256 | "email": {
|
257 | "format": string;
|
258 | "type": string;
|
259 | };
|
260 | "avatarUrl": {
|
261 | "format": string;
|
262 | "type": string;
|
263 | };
|
264 | "externalAccounts": {
|
265 | "type": string;
|
266 | "items": {
|
267 | "$ref": string;
|
268 | };
|
269 | };
|
270 | };
|
271 | "propertyOrder": string[];
|
272 | "required": string[];
|
273 | };
|
274 | "TimePeriod": {
|
275 | "description": string;
|
276 | "minLength": number;
|
277 | "type": string;
|
278 | };
|
279 | "InvocationDetails": {
|
280 | "type": string;
|
281 | "properties": {
|
282 | "durUs": {
|
283 | "type": string;
|
284 | };
|
285 | "reqid": {
|
286 | "type": string;
|
287 | };
|
288 | };
|
289 | "propertyOrder": string[];
|
290 | "required": string[];
|
291 | };
|
292 | "LogRecord": {
|
293 | "type": string;
|
294 | "properties": {
|
295 | "source": {
|
296 | "type": string;
|
297 | };
|
298 | "msg": {
|
299 | "type": string;
|
300 | };
|
301 | "isErr": {
|
302 | "type": string;
|
303 | };
|
304 | "time": {
|
305 | "description": string;
|
306 | "type": string;
|
307 | "format": string;
|
308 | "coerce-date": boolean;
|
309 | };
|
310 | "invocation": {
|
311 | "$ref": string;
|
312 | };
|
313 | };
|
314 | "propertyOrder": string[];
|
315 | "required": string[];
|
316 | };
|
317 | "LogReadOpts": {
|
318 | "type": string;
|
319 | "properties": {
|
320 | "since": {
|
321 | "description": string;
|
322 | "type": string;
|
323 | "format": string;
|
324 | "coerce-date": boolean;
|
325 | };
|
326 | "limit": {
|
327 | "minimum": number;
|
328 | "maximum": number;
|
329 | "type": string;
|
330 | };
|
331 | "follow": {
|
332 | "type": string;
|
333 | };
|
334 | "nextToken": {
|
335 | "description": string;
|
336 | "minLength": number;
|
337 | "type": string;
|
338 | };
|
339 | };
|
340 | "propertyOrder": string[];
|
341 | "required": string[];
|
342 | };
|
343 | "LogsResponse": {
|
344 | "type": string;
|
345 | "properties": {
|
346 | "records": {
|
347 | "type": string;
|
348 | "items": {
|
349 | "$ref": string;
|
350 | };
|
351 | };
|
352 | "nextToken": {
|
353 | "minLength": number;
|
354 | "type": string;
|
355 | };
|
356 | };
|
357 | "propertyOrder": string[];
|
358 | "required": string[];
|
359 | };
|
360 | "CreateTicketResponse": {
|
361 | "type": string;
|
362 | "properties": {
|
363 | "ticket": {
|
364 | "minLength": number;
|
365 | "type": string;
|
366 | };
|
367 | "expires": {
|
368 | "description": string;
|
369 | "minLength": number;
|
370 | "type": string;
|
371 | };
|
372 | };
|
373 | "propertyOrder": string[];
|
374 | "required": string[];
|
375 | };
|
376 | "TryTemplateResponse": {
|
377 | "type": string;
|
378 | "properties": {
|
379 | "token": {
|
380 | "minLength": number;
|
381 | "type": string;
|
382 | };
|
383 | "expiresIn": {
|
384 | "description": string;
|
385 | "minLength": number;
|
386 | "type": string;
|
387 | };
|
388 | "domain": {
|
389 | "minLength": number;
|
390 | "type": string;
|
391 | };
|
392 | };
|
393 | "propertyOrder": string[];
|
394 | "required": string[];
|
395 | };
|
396 | "Lycan": {
|
397 | "type": string;
|
398 | "properties": {
|
399 | "createTicket": {
|
400 | "description": string;
|
401 | "type": string;
|
402 | "properties": {
|
403 | "params": {
|
404 | "type": string;
|
405 | "properties": {};
|
406 | };
|
407 | "returns": {
|
408 | "$ref": string;
|
409 | };
|
410 | };
|
411 | "propertyOrder": string[];
|
412 | "required": string[];
|
413 | };
|
414 | "claimTicket": {
|
415 | "description": string;
|
416 | "type": string;
|
417 | "properties": {
|
418 | "params": {
|
419 | "type": string;
|
420 | "properties": {
|
421 | "ticket": {
|
422 | "type": string;
|
423 | };
|
424 | };
|
425 | "propertyOrder": string[];
|
426 | "required": string[];
|
427 | };
|
428 | "throws": {
|
429 | "$ref": string;
|
430 | };
|
431 | "returns": {
|
432 | "type": string;
|
433 | };
|
434 | };
|
435 | "propertyOrder": string[];
|
436 | "required": string[];
|
437 | };
|
438 | "listTemplates": {
|
439 | "type": string;
|
440 | "properties": {
|
441 | "params": {
|
442 | "type": string;
|
443 | "properties": {};
|
444 | };
|
445 | "returns": {
|
446 | "type": string;
|
447 | "items": {
|
448 | "$ref": string;
|
449 | };
|
450 | };
|
451 | };
|
452 | "propertyOrder": string[];
|
453 | "required": string[];
|
454 | };
|
455 | "tryTemplate": {
|
456 | "description": string;
|
457 | "type": string;
|
458 | "properties": {
|
459 | "params": {
|
460 | "type": string;
|
461 | "properties": {
|
462 | "id": {
|
463 | "minLength": number;
|
464 | "type": string;
|
465 | };
|
466 | };
|
467 | "propertyOrder": string[];
|
468 | "required": string[];
|
469 | };
|
470 | "throws": {
|
471 | "$ref": string;
|
472 | };
|
473 | "returns": {
|
474 | "$ref": string;
|
475 | };
|
476 | };
|
477 | "propertyOrder": string[];
|
478 | "required": string[];
|
479 | };
|
480 | "whoami": {
|
481 | "type": string;
|
482 | "properties": {
|
483 | "params": {
|
484 | "type": string;
|
485 | "properties": {};
|
486 | };
|
487 | "returns": {
|
488 | "$ref": string;
|
489 | };
|
490 | "throws": {
|
491 | "$ref": string;
|
492 | };
|
493 | };
|
494 | "propertyOrder": string[];
|
495 | "required": string[];
|
496 | };
|
497 | "listApps": {
|
498 | "type": string;
|
499 | "properties": {
|
500 | "params": {
|
501 | "type": string;
|
502 | "properties": {};
|
503 | };
|
504 | "throws": {
|
505 | "$ref": string;
|
506 | };
|
507 | "returns": {
|
508 | "type": string;
|
509 | "items": {
|
510 | "$ref": string;
|
511 | };
|
512 | };
|
513 | };
|
514 | "propertyOrder": string[];
|
515 | "required": string[];
|
516 | };
|
517 | "deployInitial": {
|
518 | "type": string;
|
519 | "properties": {
|
520 | "params": {
|
521 | "type": string;
|
522 | "properties": {
|
523 | "env": {
|
524 | "pattern": string;
|
525 | "type": string;
|
526 | };
|
527 | "name": {
|
528 | "minLength": number;
|
529 | "type": string;
|
530 | };
|
531 | "digest": {
|
532 | "minLength": number;
|
533 | "type": string;
|
534 | };
|
535 | "envVars": {
|
536 | "type": string;
|
537 | "items": {
|
538 | "type": string;
|
539 | "items": {
|
540 | "type": string;
|
541 | }[];
|
542 | "minItems": number;
|
543 | "additionalItems": {
|
544 | "anyOf": {
|
545 | "type": string;
|
546 | }[];
|
547 | };
|
548 | };
|
549 | };
|
550 | };
|
551 | "propertyOrder": string[];
|
552 | "required": string[];
|
553 | };
|
554 | "throws": {
|
555 | "anyOf": {
|
556 | "$ref": string;
|
557 | }[];
|
558 | };
|
559 | "returns": {
|
560 | "$ref": string;
|
561 | };
|
562 | };
|
563 | "propertyOrder": string[];
|
564 | "required": string[];
|
565 | };
|
566 | "deploy": {
|
567 | "type": string;
|
568 | "properties": {
|
569 | "params": {
|
570 | "type": string;
|
571 | "properties": {
|
572 | "appId": {
|
573 | "minLength": number;
|
574 | "type": string;
|
575 | };
|
576 | "env": {
|
577 | "pattern": string;
|
578 | "type": string;
|
579 | };
|
580 | "digest": {
|
581 | "minLength": number;
|
582 | "type": string;
|
583 | };
|
584 | "envVars": {
|
585 | "type": string;
|
586 | "items": {
|
587 | "type": string;
|
588 | "items": {
|
589 | "type": string;
|
590 | }[];
|
591 | "minItems": number;
|
592 | "additionalItems": {
|
593 | "anyOf": {
|
594 | "type": string;
|
595 | }[];
|
596 | };
|
597 | };
|
598 | };
|
599 | };
|
600 | "propertyOrder": string[];
|
601 | "required": string[];
|
602 | };
|
603 | "throws": {
|
604 | "anyOf": {
|
605 | "$ref": string;
|
606 | }[];
|
607 | };
|
608 | "returns": {
|
609 | "$ref": string;
|
610 | };
|
611 | };
|
612 | "propertyOrder": string[];
|
613 | "required": string[];
|
614 | };
|
615 | "claimApp": {
|
616 | "description": string;
|
617 | "type": string;
|
618 | "properties": {
|
619 | "params": {
|
620 | "type": string;
|
621 | "properties": {
|
622 | "token": {
|
623 | "minLength": number;
|
624 | "type": string;
|
625 | };
|
626 | };
|
627 | "propertyOrder": string[];
|
628 | "required": string[];
|
629 | };
|
630 | "throws": {
|
631 | "anyOf": {
|
632 | "$ref": string;
|
633 | }[];
|
634 | };
|
635 | "returns": {
|
636 | "$ref": string;
|
637 | };
|
638 | };
|
639 | "propertyOrder": string[];
|
640 | "required": string[];
|
641 | };
|
642 | "getLogs": {
|
643 | "type": string;
|
644 | "properties": {
|
645 | "params": {
|
646 | "type": string;
|
647 | "properties": {
|
648 | "appId": {
|
649 | "minLength": number;
|
650 | "type": string;
|
651 | };
|
652 | "env": {
|
653 | "pattern": string;
|
654 | "type": string;
|
655 | };
|
656 | "opts": {
|
657 | "$ref": string;
|
658 | };
|
659 | };
|
660 | "propertyOrder": string[];
|
661 | "required": string[];
|
662 | };
|
663 | "throws": {
|
664 | "anyOf": {
|
665 | "$ref": string;
|
666 | }[];
|
667 | };
|
668 | "returns": {
|
669 | "$ref": string;
|
670 | };
|
671 | };
|
672 | "propertyOrder": string[];
|
673 | "required": string[];
|
674 | };
|
675 | };
|
676 | "propertyOrder": string[];
|
677 | "required": string[];
|
678 | };
|
679 | };
|
680 | };
|
681 | export declare class InternalServerError extends Error {
|
682 | readonly name = "InternalServerError";
|
683 | }
|
684 | export declare class UnauthorizedError extends Error {
|
685 | readonly name = "UnauthorizedError";
|
686 | }
|
687 | export declare class NotFoundError extends Error {
|
688 | readonly name = "NotFoundError";
|
689 | }
|
690 | export declare class ExistsError extends Error {
|
691 | readonly name = "ExistsError";
|
692 | }
|
693 | export declare enum FunctionRunnerSize {
|
694 | M128MIB = "m128MiB",
|
695 | M1GIB = "m1GiB",
|
696 | M256MIB = "m256MiB",
|
697 | M2GIB = "m2GiB",
|
698 | M512MIB = "m512MiB"
|
699 | }
|
700 | export declare type Domain = (SubDomain) | (CNameDomain);
|
701 | export interface Session {
|
702 | readonly accountId: string;
|
703 | readonly principal: string;
|
704 | }
|
705 | export interface ServerOnlyContext {
|
706 | readonly tags?: {};
|
707 | readonly logLevel?: string;
|
708 | readonly logExtra?: {};
|
709 | readonly sampleRate?: number;
|
710 | readonly debugId: string;
|
711 | readonly session?: Session;
|
712 | }
|
713 | export interface SubDomain {
|
714 | readonly type: "subdomain";
|
715 | readonly name: string;
|
716 | }
|
717 | export interface CNameDomain {
|
718 | readonly type: "cname";
|
719 | readonly name: string;
|
720 | readonly certificate: string;
|
721 | }
|
722 | export interface Environment {
|
723 | readonly name: string;
|
724 | readonly domains: Array<(SubDomain) | (CNameDomain)>;
|
725 | }
|
726 | export interface Application {
|
727 | readonly accountId: string;
|
728 | readonly id: string;
|
729 | readonly name: string;
|
730 | readonly createdAt: Date;
|
731 | readonly updatedAt: Date;
|
732 | readonly sourceUrl?: string;
|
733 | readonly environments: Array<Environment>;
|
734 | }
|
735 | export interface Template {
|
736 | readonly id: string;
|
737 | readonly name: string;
|
738 | readonly previewImageUrl: string;
|
739 | readonly githubUrl: string;
|
740 | readonly codeDigest: string;
|
741 | }
|
742 | export interface ExternalAccount {
|
743 | readonly source: string;
|
744 | readonly id: string;
|
745 | }
|
746 | export interface User {
|
747 | readonly id: string;
|
748 | readonly fullName: string;
|
749 | readonly email: string;
|
750 | readonly avatarUrl?: string;
|
751 | readonly externalAccounts: Array<ExternalAccount>;
|
752 | }
|
753 | export interface InvocationDetails {
|
754 | readonly durUs: number;
|
755 | readonly reqid: string;
|
756 | }
|
757 | export interface LogRecord {
|
758 | readonly source: string;
|
759 | readonly msg: string;
|
760 | readonly isErr: boolean;
|
761 | readonly time: Date;
|
762 | readonly invocation?: InvocationDetails;
|
763 | }
|
764 | export interface LogReadOpts {
|
765 | readonly since: Date;
|
766 | readonly limit: number;
|
767 | readonly follow: boolean;
|
768 | readonly nextToken?: string;
|
769 | }
|
770 | export interface LogsResponse {
|
771 | readonly records: Array<LogRecord>;
|
772 | readonly nextToken?: string;
|
773 | }
|
774 | export interface CreateTicketResponse {
|
775 | readonly ticket: string;
|
776 | readonly expires: string;
|
777 | }
|
778 | export interface TryTemplateResponse {
|
779 | readonly token: string;
|
780 | readonly expiresIn: string;
|
781 | readonly domain: string;
|
782 | }
|
783 | export interface Lycan {
|
784 | createTicket(): Promise<CreateTicketResponse>;
|
785 | claimTicket(ticket: string): Promise<string>;
|
786 | listTemplates(): Promise<Array<Template>>;
|
787 | tryTemplate(id: string): Promise<TryTemplateResponse>;
|
788 | whoami(): Promise<User>;
|
789 | listApps(): Promise<Array<Application>>;
|
790 | deployInitial(env: string, name: string, digest: string, envVars: Array<[string, string]>): Promise<Application>;
|
791 | deploy(appId: string, env: string, digest: string, envVars: Array<[string, string]>): Promise<Application>;
|
792 | claimApp(token: string): Promise<Application>;
|
793 | getLogs(appId: string, env: string, opts: LogReadOpts): Promise<LogsResponse>;
|
794 | }
|