@onkernel/sdk 0.1.0-alpha.9 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +42 -29
  3. package/client.d.mts +5 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +5 -5
  6. package/client.d.ts.map +1 -1
  7. package/client.js +4 -4
  8. package/client.js.map +1 -1
  9. package/client.mjs +4 -4
  10. package/client.mjs.map +1 -1
  11. package/core/app-framework.d.mts +3 -3
  12. package/core/app-framework.d.mts.map +1 -1
  13. package/core/app-framework.d.ts +3 -3
  14. package/core/app-framework.d.ts.map +1 -1
  15. package/core/app-framework.js +14 -31
  16. package/core/app-framework.js.map +1 -1
  17. package/core/app-framework.mjs +14 -31
  18. package/core/app-framework.mjs.map +1 -1
  19. package/core/streaming.d.mts +31 -0
  20. package/core/streaming.d.mts.map +1 -0
  21. package/core/streaming.d.ts +31 -0
  22. package/core/streaming.d.ts.map +1 -0
  23. package/core/streaming.js +257 -0
  24. package/core/streaming.js.map +1 -0
  25. package/core/streaming.mjs +252 -0
  26. package/core/streaming.mjs.map +1 -0
  27. package/internal/decoders/line.d.mts +17 -0
  28. package/internal/decoders/line.d.mts.map +1 -0
  29. package/internal/decoders/line.d.ts +17 -0
  30. package/internal/decoders/line.d.ts.map +1 -0
  31. package/internal/decoders/line.js +113 -0
  32. package/internal/decoders/line.js.map +1 -0
  33. package/internal/decoders/line.mjs +108 -0
  34. package/internal/decoders/line.mjs.map +1 -0
  35. package/internal/parse.d.mts.map +1 -1
  36. package/internal/parse.d.ts.map +1 -1
  37. package/internal/parse.js +10 -0
  38. package/internal/parse.js.map +1 -1
  39. package/internal/parse.mjs +10 -0
  40. package/internal/parse.mjs.map +1 -1
  41. package/internal/request-options.d.mts +2 -0
  42. package/internal/request-options.d.mts.map +1 -1
  43. package/internal/request-options.d.ts +2 -0
  44. package/internal/request-options.d.ts.map +1 -1
  45. package/internal/request-options.js.map +1 -1
  46. package/internal/request-options.mjs.map +1 -1
  47. package/package.json +11 -4
  48. package/resources/apps/apps.d.mts +65 -0
  49. package/resources/apps/apps.d.mts.map +1 -0
  50. package/resources/apps/apps.d.ts +65 -0
  51. package/resources/apps/apps.d.ts.map +1 -0
  52. package/resources/apps/apps.js +33 -0
  53. package/resources/apps/apps.js.map +1 -0
  54. package/resources/apps/apps.mjs +28 -0
  55. package/resources/apps/apps.mjs.map +1 -0
  56. package/resources/apps/deployments.d.mts +157 -0
  57. package/resources/apps/deployments.d.mts.map +1 -0
  58. package/resources/apps/deployments.d.ts +157 -0
  59. package/resources/apps/deployments.d.ts.map +1 -0
  60. package/resources/apps/deployments.js +43 -0
  61. package/resources/apps/deployments.js.map +1 -0
  62. package/resources/apps/deployments.mjs +39 -0
  63. package/resources/apps/deployments.mjs.map +1 -0
  64. package/resources/apps/index.d.mts +4 -0
  65. package/resources/apps/index.d.mts.map +1 -0
  66. package/resources/apps/index.d.ts +4 -0
  67. package/resources/apps/index.d.ts.map +1 -0
  68. package/resources/apps/index.js +11 -0
  69. package/resources/apps/index.js.map +1 -0
  70. package/resources/apps/index.mjs +5 -0
  71. package/resources/apps/index.mjs.map +1 -0
  72. package/resources/apps/invocations.d.mts +110 -0
  73. package/resources/apps/invocations.d.mts.map +1 -0
  74. package/resources/apps/invocations.d.ts +110 -0
  75. package/resources/apps/invocations.d.ts.map +1 -0
  76. package/resources/apps/invocations.js +38 -0
  77. package/resources/apps/invocations.js.map +1 -0
  78. package/resources/apps/invocations.mjs +34 -0
  79. package/resources/apps/invocations.mjs.map +1 -0
  80. package/resources/apps.d.mts +1 -140
  81. package/resources/apps.d.mts.map +1 -1
  82. package/resources/apps.d.ts +1 -140
  83. package/resources/apps.d.ts.map +1 -1
  84. package/resources/apps.js +2 -49
  85. package/resources/apps.js.map +1 -1
  86. package/resources/apps.mjs +1 -47
  87. package/resources/apps.mjs.map +1 -1
  88. package/resources/browsers.d.mts +65 -0
  89. package/resources/browsers.d.mts.map +1 -0
  90. package/resources/browsers.d.ts +65 -0
  91. package/resources/browsers.d.ts.map +1 -0
  92. package/resources/browsers.js +36 -0
  93. package/resources/browsers.js.map +1 -0
  94. package/resources/browsers.mjs +32 -0
  95. package/resources/browsers.mjs.map +1 -0
  96. package/resources/index.d.mts +2 -2
  97. package/resources/index.d.mts.map +1 -1
  98. package/resources/index.d.ts +2 -2
  99. package/resources/index.d.ts.map +1 -1
  100. package/resources/index.js +4 -4
  101. package/resources/index.js.map +1 -1
  102. package/resources/index.mjs +2 -2
  103. package/resources/index.mjs.map +1 -1
  104. package/src/client.ts +13 -21
  105. package/src/core/app-framework.ts +19 -36
  106. package/src/core/streaming.ts +301 -0
  107. package/src/internal/decoders/line.ts +135 -0
  108. package/src/internal/parse.ts +14 -0
  109. package/src/internal/request-options.ts +2 -0
  110. package/src/resources/apps/apps.ts +104 -0
  111. package/src/resources/apps/deployments.ts +202 -0
  112. package/src/resources/apps/index.ts +15 -0
  113. package/src/resources/apps/invocations.ts +140 -0
  114. package/src/resources/apps.ts +1 -184
  115. package/src/resources/browsers.ts +85 -0
  116. package/src/resources/index.ts +6 -8
  117. package/src/streaming.ts +2 -0
  118. package/src/version.ts +1 -1
  119. package/streaming.d.mts +2 -0
  120. package/streaming.d.mts.map +1 -0
  121. package/streaming.d.ts +2 -0
  122. package/streaming.d.ts.map +1 -0
  123. package/streaming.js +6 -0
  124. package/streaming.js.map +1 -0
  125. package/streaming.mjs +2 -0
  126. package/streaming.mjs.map +1 -0
  127. package/version.d.mts +1 -1
  128. package/version.d.mts.map +1 -1
  129. package/version.d.ts +1 -1
  130. package/version.d.ts.map +1 -1
  131. package/version.js +1 -1
  132. package/version.js.map +1 -1
  133. package/version.mjs +1 -1
  134. package/version.mjs.map +1 -1
  135. package/resources/browser.d.mts +0 -33
  136. package/resources/browser.d.mts.map +0 -1
  137. package/resources/browser.d.ts +0 -33
  138. package/resources/browser.d.ts.map +0 -1
  139. package/resources/browser.js +0 -15
  140. package/resources/browser.js.map +0 -1
  141. package/resources/browser.mjs +0 -11
  142. package/resources/browser.mjs.map +0 -1
  143. package/src/resources/browser.ts +0 -48
@@ -1,5 +1,6 @@
1
1
  import { NullableHeaders } from "./headers.js";
2
2
  import type { BodyInit } from "./builtin-types.js";
3
+ import { Stream } from "../core/streaming.js";
3
4
  import type { HTTPMethod, MergedRequestInit } from "./types.js";
4
5
  import { type HeadersLike } from "./headers.js";
5
6
  export type FinalRequestOptions = RequestOptions & {
@@ -19,6 +20,7 @@ export type RequestOptions = {
19
20
  signal?: AbortSignal | undefined | null;
20
21
  idempotencyKey?: string;
21
22
  __binaryResponse?: boolean | undefined;
23
+ __streamClass?: typeof Stream;
22
24
  };
23
25
  export type EncodedContent = {
24
26
  bodyHeaders: HeadersLike;
@@ -1 +1 @@
1
- {"version":3,"file":"request-options.d.ts","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE;OAEnB,KAAK,EAAE,QAAQ,EAAE;OACjB,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE;OACtC,EAAE,KAAK,WAAW,EAAE;AAE3B,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,iBAAiB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AAG,IAAI,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,KAAK,cAAc,CAAC;AAEtG,eAAO,MAAM,eAAe,EAAE,cAO7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"request-options.js","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AA6B/E,MAAM,eAAe,GAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACnE,OAAO;QACL,WAAW,EAAE;YACX,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B"}
1
+ {"version":3,"file":"request-options.js","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AA+B/E,MAAM,eAAe,GAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACnE,OAAO;QACL,WAAW,EAAE;YACX,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"request-options.mjs","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"AAAA,sFAAsF;AA6BtF,MAAM,CAAC,MAAM,eAAe,GAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACnE,OAAO;QACL,WAAW,EAAE;YACX,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"request-options.mjs","sourceRoot":"","sources":["../src/internal/request-options.ts"],"names":[],"mappings":"AAAA,sFAAsF;AA+BtF,MAAM,CAAC,MAAM,eAAe,GAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACnE,OAAO;QACL,WAAW,EAAE;YACX,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onkernel/sdk",
3
- "version": "0.1.0-alpha.9",
3
+ "version": "0.1.0",
4
4
  "description": "The official TypeScript library for the Kernel API",
5
5
  "author": "Kernel <>",
6
6
  "types": "./index.d.ts",
@@ -118,6 +118,16 @@
118
118
  "./resources.mjs": {
119
119
  "default": "./resources.mjs"
120
120
  },
121
+ "./streaming": {
122
+ "import": "./streaming.mjs",
123
+ "require": "./streaming.js"
124
+ },
125
+ "./streaming.js": {
126
+ "default": "./streaming.js"
127
+ },
128
+ "./streaming.mjs": {
129
+ "default": "./streaming.mjs"
130
+ },
121
131
  "./uploads": {
122
132
  "import": "./uploads.mjs",
123
133
  "require": "./uploads.js"
@@ -138,8 +148,5 @@
138
148
  "./version.mjs": {
139
149
  "default": "./version.mjs"
140
150
  }
141
- },
142
- "engines": {
143
- "node": ">= 20"
144
151
  }
145
152
  }
@@ -0,0 +1,65 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as DeploymentsAPI from "./deployments.mjs";
3
+ import { DeploymentCreateParams, DeploymentCreateResponse, DeploymentFollowResponse, Deployments } from "./deployments.mjs";
4
+ import * as InvocationsAPI from "./invocations.mjs";
5
+ import { InvocationCreateParams, InvocationCreateResponse, InvocationRetrieveResponse, Invocations } from "./invocations.mjs";
6
+ import { APIPromise } from "../../core/api-promise.mjs";
7
+ import { RequestOptions } from "../../internal/request-options.mjs";
8
+ export declare class Apps extends APIResource {
9
+ deployments: DeploymentsAPI.Deployments;
10
+ invocations: InvocationsAPI.Invocations;
11
+ /**
12
+ * List application versions for the authenticated user. Optionally filter by app
13
+ * name and/or version label.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const apps = await client.apps.list();
18
+ * ```
19
+ */
20
+ list(query?: AppListParams | null | undefined, options?: RequestOptions): APIPromise<AppListResponse>;
21
+ }
22
+ export type AppListResponse = Array<AppListResponse.AppListResponseItem>;
23
+ export declare namespace AppListResponse {
24
+ /**
25
+ * Summary of an application version.
26
+ */
27
+ interface AppListResponseItem {
28
+ /**
29
+ * Unique identifier for the app version
30
+ */
31
+ id: string;
32
+ /**
33
+ * Name of the application
34
+ */
35
+ app_name: string;
36
+ /**
37
+ * Deployment region code
38
+ */
39
+ region: string;
40
+ /**
41
+ * Version label for the application
42
+ */
43
+ version: string;
44
+ /**
45
+ * Environment variables configured for this app version
46
+ */
47
+ env_vars?: Record<string, string>;
48
+ }
49
+ }
50
+ export interface AppListParams {
51
+ /**
52
+ * Filter results by application name.
53
+ */
54
+ app_name?: string;
55
+ /**
56
+ * Filter results by version label.
57
+ */
58
+ version?: string;
59
+ }
60
+ export declare namespace Apps {
61
+ export { type AppListResponse as AppListResponse, type AppListParams as AppListParams };
62
+ export { Deployments as Deployments, type DeploymentCreateResponse as DeploymentCreateResponse, type DeploymentFollowResponse as DeploymentFollowResponse, type DeploymentCreateParams as DeploymentCreateParams, };
63
+ export { Invocations as Invocations, type InvocationCreateResponse as InvocationCreateResponse, type InvocationRetrieveResponse as InvocationRetrieveResponse, type InvocationCreateParams as InvocationCreateParams, };
64
+ }
65
+ //# sourceMappingURL=apps.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.d.mts","sourceRoot":"","sources":["../../src/resources/apps/apps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,WAAW,EACZ;OACM,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,WAAW,EACZ;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IACvF,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IAEvF;;;;;;;;OAQG;IACH,IAAI,CAAC,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAG1G;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;AAEzE,yBAAiB,eAAe,CAAC;IAC/B;;OAEG;IACH,UAAiB,mBAAmB;QAClC;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACnC;CACF;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAKD,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,CAAC;IAExF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,65 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as DeploymentsAPI from "./deployments.js";
3
+ import { DeploymentCreateParams, DeploymentCreateResponse, DeploymentFollowResponse, Deployments } from "./deployments.js";
4
+ import * as InvocationsAPI from "./invocations.js";
5
+ import { InvocationCreateParams, InvocationCreateResponse, InvocationRetrieveResponse, Invocations } from "./invocations.js";
6
+ import { APIPromise } from "../../core/api-promise.js";
7
+ import { RequestOptions } from "../../internal/request-options.js";
8
+ export declare class Apps extends APIResource {
9
+ deployments: DeploymentsAPI.Deployments;
10
+ invocations: InvocationsAPI.Invocations;
11
+ /**
12
+ * List application versions for the authenticated user. Optionally filter by app
13
+ * name and/or version label.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const apps = await client.apps.list();
18
+ * ```
19
+ */
20
+ list(query?: AppListParams | null | undefined, options?: RequestOptions): APIPromise<AppListResponse>;
21
+ }
22
+ export type AppListResponse = Array<AppListResponse.AppListResponseItem>;
23
+ export declare namespace AppListResponse {
24
+ /**
25
+ * Summary of an application version.
26
+ */
27
+ interface AppListResponseItem {
28
+ /**
29
+ * Unique identifier for the app version
30
+ */
31
+ id: string;
32
+ /**
33
+ * Name of the application
34
+ */
35
+ app_name: string;
36
+ /**
37
+ * Deployment region code
38
+ */
39
+ region: string;
40
+ /**
41
+ * Version label for the application
42
+ */
43
+ version: string;
44
+ /**
45
+ * Environment variables configured for this app version
46
+ */
47
+ env_vars?: Record<string, string>;
48
+ }
49
+ }
50
+ export interface AppListParams {
51
+ /**
52
+ * Filter results by application name.
53
+ */
54
+ app_name?: string;
55
+ /**
56
+ * Filter results by version label.
57
+ */
58
+ version?: string;
59
+ }
60
+ export declare namespace Apps {
61
+ export { type AppListResponse as AppListResponse, type AppListParams as AppListParams };
62
+ export { Deployments as Deployments, type DeploymentCreateResponse as DeploymentCreateResponse, type DeploymentFollowResponse as DeploymentFollowResponse, type DeploymentCreateParams as DeploymentCreateParams, };
63
+ export { Invocations as Invocations, type InvocationCreateResponse as InvocationCreateResponse, type InvocationRetrieveResponse as InvocationRetrieveResponse, type InvocationCreateParams as InvocationCreateParams, };
64
+ }
65
+ //# sourceMappingURL=apps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/resources/apps/apps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,WAAW,EACZ;OACM,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,WAAW,EACZ;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IACvF,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IAEvF;;;;;;;;OAQG;IACH,IAAI,CAAC,KAAK,GAAE,aAAa,GAAG,IAAI,GAAG,SAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAG1G;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;AAEzE,yBAAiB,eAAe,CAAC;IAC/B;;OAEG;IACH,UAAiB,mBAAmB;QAClC;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACnC;CACF;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAKD,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,CAAC;IAExF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Apps = void 0;
5
+ const tslib_1 = require("../../internal/tslib.js");
6
+ const resource_1 = require("../../core/resource.js");
7
+ const DeploymentsAPI = tslib_1.__importStar(require("./deployments.js"));
8
+ const deployments_1 = require("./deployments.js");
9
+ const InvocationsAPI = tslib_1.__importStar(require("./invocations.js"));
10
+ const invocations_1 = require("./invocations.js");
11
+ class Apps extends resource_1.APIResource {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.deployments = new DeploymentsAPI.Deployments(this._client);
15
+ this.invocations = new InvocationsAPI.Invocations(this._client);
16
+ }
17
+ /**
18
+ * List application versions for the authenticated user. Optionally filter by app
19
+ * name and/or version label.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const apps = await client.apps.list();
24
+ * ```
25
+ */
26
+ list(query = {}, options) {
27
+ return this._client.get('/apps', { query, ...options });
28
+ }
29
+ }
30
+ exports.Apps = Apps;
31
+ Apps.Deployments = deployments_1.Deployments;
32
+ Apps.Invocations = invocations_1.Invocations;
33
+ //# sourceMappingURL=apps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.js","sourceRoot":"","sources":["../../src/resources/apps/apps.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,yEAAgD;AAChD,kDAKuB;AACvB,yEAAgD;AAChD,kDAKuB;AAIvB,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvF,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAczF,CAAC;IAZC;;;;;;;;OAQG;IACH,IAAI,CAAC,QAA0C,EAAE,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAhBD,oBAgBC;AAgDD,IAAI,CAAC,WAAW,GAAG,yBAAW,CAAC;AAC/B,IAAI,CAAC,WAAW,GAAG,yBAAW,CAAC"}
@@ -0,0 +1,28 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import * as DeploymentsAPI from "./deployments.mjs";
4
+ import { Deployments, } from "./deployments.mjs";
5
+ import * as InvocationsAPI from "./invocations.mjs";
6
+ import { Invocations, } from "./invocations.mjs";
7
+ export class Apps extends APIResource {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.deployments = new DeploymentsAPI.Deployments(this._client);
11
+ this.invocations = new InvocationsAPI.Invocations(this._client);
12
+ }
13
+ /**
14
+ * List application versions for the authenticated user. Optionally filter by app
15
+ * name and/or version label.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const apps = await client.apps.list();
20
+ * ```
21
+ */
22
+ list(query = {}, options) {
23
+ return this._client.get('/apps', { query, ...options });
24
+ }
25
+ }
26
+ Apps.Deployments = Deployments;
27
+ Apps.Invocations = Invocations;
28
+ //# sourceMappingURL=apps.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.mjs","sourceRoot":"","sources":["../../src/resources/apps/apps.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EAIL,WAAW,GACZ;OACM,KAAK,cAAc;OACnB,EAIL,WAAW,GACZ;AAID,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvF,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAczF,CAAC;IAZC;;;;;;;;OAQG;IACH,IAAI,CAAC,QAA0C,EAAE,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAgDD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -0,0 +1,157 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import { APIPromise } from "../../core/api-promise.mjs";
3
+ import { Stream } from "../../core/streaming.mjs";
4
+ import { type Uploadable } from "../../core/uploads.mjs";
5
+ import { RequestOptions } from "../../internal/request-options.mjs";
6
+ export declare class Deployments extends APIResource {
7
+ /**
8
+ * Deploy a new application
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const deployment = await client.apps.deployments.create({
13
+ * entrypoint_rel_path: 'src/app.py',
14
+ * file: fs.createReadStream('path/to/file'),
15
+ * });
16
+ * ```
17
+ */
18
+ create(body: DeploymentCreateParams, options?: RequestOptions): APIPromise<DeploymentCreateResponse>;
19
+ /**
20
+ * Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
21
+ * status updates for a deployed application. The stream terminates automatically
22
+ * once the application reaches a terminal state.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const response = await client.apps.deployments.follow('id');
27
+ * ```
28
+ */
29
+ follow(id: string, options?: RequestOptions): APIPromise<Stream<DeploymentFollowResponse>>;
30
+ }
31
+ export interface DeploymentCreateResponse {
32
+ /**
33
+ * List of apps deployed
34
+ */
35
+ apps: Array<DeploymentCreateResponse.App>;
36
+ /**
37
+ * Current status of the deployment
38
+ */
39
+ status: 'queued' | 'deploying' | 'succeeded' | 'failed';
40
+ /**
41
+ * Status reason
42
+ */
43
+ status_reason?: string;
44
+ }
45
+ export declare namespace DeploymentCreateResponse {
46
+ interface App {
47
+ /**
48
+ * ID for the app version deployed
49
+ */
50
+ id: string;
51
+ /**
52
+ * List of actions available on the app
53
+ */
54
+ actions: Array<App.Action>;
55
+ /**
56
+ * Name of the app
57
+ */
58
+ name: string;
59
+ }
60
+ namespace App {
61
+ interface Action {
62
+ /**
63
+ * Name of the action
64
+ */
65
+ name: string;
66
+ }
67
+ }
68
+ }
69
+ /**
70
+ * Union type representing any application event. Actual schema is determined by
71
+ * the 'event' field.
72
+ */
73
+ export type DeploymentFollowResponse = DeploymentFollowResponse.StateEvent | DeploymentFollowResponse.StateUpdateEvent | DeploymentFollowResponse.LogEvent;
74
+ export declare namespace DeploymentFollowResponse {
75
+ /**
76
+ * Initial state of the application, emitted once when subscribing.
77
+ */
78
+ interface StateEvent {
79
+ /**
80
+ * Event type identifier (always "state").
81
+ */
82
+ event: 'state';
83
+ /**
84
+ * Current application state (e.g., "deploying", "running", "succeeded", "failed").
85
+ */
86
+ state: string;
87
+ /**
88
+ * Time the state was reported.
89
+ */
90
+ timestamp?: string;
91
+ }
92
+ /**
93
+ * An update emitted when the application's state changes.
94
+ */
95
+ interface StateUpdateEvent {
96
+ /**
97
+ * Event type identifier (always "state_update").
98
+ */
99
+ event: 'state_update';
100
+ /**
101
+ * New application state (e.g., "running", "succeeded", "failed").
102
+ */
103
+ state: string;
104
+ /**
105
+ * Time the state change occurred.
106
+ */
107
+ timestamp?: string;
108
+ }
109
+ /**
110
+ * A log entry from the application.
111
+ */
112
+ interface LogEvent {
113
+ /**
114
+ * Event type identifier (always "log").
115
+ */
116
+ event: 'log';
117
+ /**
118
+ * Log message text.
119
+ */
120
+ message: string;
121
+ /**
122
+ * Time the log entry was produced.
123
+ */
124
+ timestamp?: string;
125
+ }
126
+ }
127
+ export interface DeploymentCreateParams {
128
+ /**
129
+ * Relative path to the entrypoint of the application
130
+ */
131
+ entrypoint_rel_path: string;
132
+ /**
133
+ * ZIP file containing the application source directory
134
+ */
135
+ file: Uploadable;
136
+ /**
137
+ * Map of environment variables to set for the deployed application. Each key-value
138
+ * pair represents an environment variable.
139
+ */
140
+ env_vars?: Record<string, string>;
141
+ /**
142
+ * Allow overwriting an existing app version
143
+ */
144
+ force?: boolean;
145
+ /**
146
+ * Region for deployment. Currently we only support "aws.us-east-1a"
147
+ */
148
+ region?: 'aws.us-east-1a';
149
+ /**
150
+ * Version of the application. Can be any string.
151
+ */
152
+ version?: string;
153
+ }
154
+ export declare namespace Deployments {
155
+ export { type DeploymentCreateResponse as DeploymentCreateResponse, type DeploymentFollowResponse as DeploymentFollowResponse, type DeploymentCreateParams as DeploymentCreateParams, };
156
+ }
157
+ //# sourceMappingURL=deployments.d.mts.map
@@ -0,0 +1 @@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,UAAU;QACzB;;WAEG;QACH,KAAK,EAAE,OAAO,CAAC;QAEf;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAED;;OAEG;IACH,UAAiB,gBAAgB;QAC/B;;WAEG;QACH,KAAK,EAAE,cAAc,CAAC;QAEtB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAED;;OAEG;IACH,UAAiB,QAAQ;QACvB;;WAEG;QACH,KAAK,EAAE,KAAK,CAAC;QAEb;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAElC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,157 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import { APIPromise } from "../../core/api-promise.js";
3
+ import { Stream } from "../../core/streaming.js";
4
+ import { type Uploadable } from "../../core/uploads.js";
5
+ import { RequestOptions } from "../../internal/request-options.js";
6
+ export declare class Deployments extends APIResource {
7
+ /**
8
+ * Deploy a new application
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const deployment = await client.apps.deployments.create({
13
+ * entrypoint_rel_path: 'src/app.py',
14
+ * file: fs.createReadStream('path/to/file'),
15
+ * });
16
+ * ```
17
+ */
18
+ create(body: DeploymentCreateParams, options?: RequestOptions): APIPromise<DeploymentCreateResponse>;
19
+ /**
20
+ * Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
21
+ * status updates for a deployed application. The stream terminates automatically
22
+ * once the application reaches a terminal state.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const response = await client.apps.deployments.follow('id');
27
+ * ```
28
+ */
29
+ follow(id: string, options?: RequestOptions): APIPromise<Stream<DeploymentFollowResponse>>;
30
+ }
31
+ export interface DeploymentCreateResponse {
32
+ /**
33
+ * List of apps deployed
34
+ */
35
+ apps: Array<DeploymentCreateResponse.App>;
36
+ /**
37
+ * Current status of the deployment
38
+ */
39
+ status: 'queued' | 'deploying' | 'succeeded' | 'failed';
40
+ /**
41
+ * Status reason
42
+ */
43
+ status_reason?: string;
44
+ }
45
+ export declare namespace DeploymentCreateResponse {
46
+ interface App {
47
+ /**
48
+ * ID for the app version deployed
49
+ */
50
+ id: string;
51
+ /**
52
+ * List of actions available on the app
53
+ */
54
+ actions: Array<App.Action>;
55
+ /**
56
+ * Name of the app
57
+ */
58
+ name: string;
59
+ }
60
+ namespace App {
61
+ interface Action {
62
+ /**
63
+ * Name of the action
64
+ */
65
+ name: string;
66
+ }
67
+ }
68
+ }
69
+ /**
70
+ * Union type representing any application event. Actual schema is determined by
71
+ * the 'event' field.
72
+ */
73
+ export type DeploymentFollowResponse = DeploymentFollowResponse.StateEvent | DeploymentFollowResponse.StateUpdateEvent | DeploymentFollowResponse.LogEvent;
74
+ export declare namespace DeploymentFollowResponse {
75
+ /**
76
+ * Initial state of the application, emitted once when subscribing.
77
+ */
78
+ interface StateEvent {
79
+ /**
80
+ * Event type identifier (always "state").
81
+ */
82
+ event: 'state';
83
+ /**
84
+ * Current application state (e.g., "deploying", "running", "succeeded", "failed").
85
+ */
86
+ state: string;
87
+ /**
88
+ * Time the state was reported.
89
+ */
90
+ timestamp?: string;
91
+ }
92
+ /**
93
+ * An update emitted when the application's state changes.
94
+ */
95
+ interface StateUpdateEvent {
96
+ /**
97
+ * Event type identifier (always "state_update").
98
+ */
99
+ event: 'state_update';
100
+ /**
101
+ * New application state (e.g., "running", "succeeded", "failed").
102
+ */
103
+ state: string;
104
+ /**
105
+ * Time the state change occurred.
106
+ */
107
+ timestamp?: string;
108
+ }
109
+ /**
110
+ * A log entry from the application.
111
+ */
112
+ interface LogEvent {
113
+ /**
114
+ * Event type identifier (always "log").
115
+ */
116
+ event: 'log';
117
+ /**
118
+ * Log message text.
119
+ */
120
+ message: string;
121
+ /**
122
+ * Time the log entry was produced.
123
+ */
124
+ timestamp?: string;
125
+ }
126
+ }
127
+ export interface DeploymentCreateParams {
128
+ /**
129
+ * Relative path to the entrypoint of the application
130
+ */
131
+ entrypoint_rel_path: string;
132
+ /**
133
+ * ZIP file containing the application source directory
134
+ */
135
+ file: Uploadable;
136
+ /**
137
+ * Map of environment variables to set for the deployed application. Each key-value
138
+ * pair represents an environment variable.
139
+ */
140
+ env_vars?: Record<string, string>;
141
+ /**
142
+ * Allow overwriting an existing app version
143
+ */
144
+ force?: boolean;
145
+ /**
146
+ * Region for deployment. Currently we only support "aws.us-east-1a"
147
+ */
148
+ region?: 'aws.us-east-1a';
149
+ /**
150
+ * Version of the application. Can be any string.
151
+ */
152
+ version?: string;
153
+ }
154
+ export declare namespace Deployments {
155
+ export { type DeploymentCreateResponse as DeploymentCreateResponse, type DeploymentFollowResponse as DeploymentFollowResponse, type DeploymentCreateParams as DeploymentCreateParams, };
156
+ }
157
+ //# sourceMappingURL=deployments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../src/resources/apps/deployments.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,U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CAAC,EAAE,MAAM,CAAC;KACpB;IAED;;OAEG;IACH,UAAiB,gBAAgB;QAC/B;;WAEG;QACH,KAAK,EAAE,cAAc,CAAC;QAEtB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAED;;OAEG;IACH,UAAiB,QAAQ;QACvB;;WAEG;QACH,KAAK,EAAE,KAAK,CAAC;QAEb;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAElC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Deployments = void 0;
5
+ const resource_1 = require("../../core/resource.js");
6
+ const headers_1 = require("../../internal/headers.js");
7
+ const uploads_1 = require("../../internal/uploads.js");
8
+ const path_1 = require("../../internal/utils/path.js");
9
+ class Deployments extends resource_1.APIResource {
10
+ /**
11
+ * Deploy a new application
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const deployment = await client.apps.deployments.create({
16
+ * entrypoint_rel_path: 'src/app.py',
17
+ * file: fs.createReadStream('path/to/file'),
18
+ * });
19
+ * ```
20
+ */
21
+ create(body, options) {
22
+ return this._client.post('/deploy', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
23
+ }
24
+ /**
25
+ * Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
26
+ * status updates for a deployed application. The stream terminates automatically
27
+ * once the application reaches a terminal state.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const response = await client.apps.deployments.follow('id');
32
+ * ```
33
+ */
34
+ follow(id, options) {
35
+ return this._client.get((0, path_1.path) `/apps/${id}/events`, {
36
+ ...options,
37
+ headers: (0, headers_1.buildHeaders)([{ Accept: 'text/event-stream' }, options?.headers]),
38
+ stream: true,
39
+ });
40
+ }
41
+ }
42
+ exports.Deployments = Deployments;
43
+ //# sourceMappingURL=deployments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployments.js","sourceRoot":"","sources":["../../src/resources/apps/deployments.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAsD;AAEtD,uDAAqE;AACrE,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACvG,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,SAAS,EAAE,SAAS,EAAE;YAChD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC1E,MAAM,EAAE,IAAI;SACb,CAAiD,CAAC;IACrD,CAAC;CACF;AAjCD,kCAiCC"}