@w6w/sdk 0.3.0 → 0.4.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 (84) hide show
  1. package/dist/src/client.d.ts +28 -0
  2. package/dist/src/client.d.ts.map +1 -1
  3. package/dist/src/client.js +29 -0
  4. package/dist/src/client.js.map +1 -1
  5. package/dist/src/console/api-calls.d.ts +80 -0
  6. package/dist/src/console/api-calls.d.ts.map +1 -0
  7. package/dist/src/console/api-calls.js +69 -0
  8. package/dist/src/console/api-calls.js.map +1 -0
  9. package/dist/src/console/apps.d.ts +689 -0
  10. package/dist/src/console/apps.d.ts.map +1 -0
  11. package/dist/src/console/apps.js +402 -0
  12. package/dist/src/console/apps.js.map +1 -0
  13. package/dist/src/console/auth.d.ts +241 -0
  14. package/dist/src/console/auth.d.ts.map +1 -0
  15. package/dist/src/console/auth.js +173 -0
  16. package/dist/src/console/auth.js.map +1 -0
  17. package/dist/src/console/connections.d.ts +188 -0
  18. package/dist/src/console/connections.d.ts.map +1 -0
  19. package/dist/src/console/connections.js +182 -0
  20. package/dist/src/console/connections.js.map +1 -0
  21. package/dist/src/console/dashboard.d.ts +102 -0
  22. package/dist/src/console/dashboard.d.ts.map +1 -0
  23. package/dist/src/console/dashboard.js +59 -0
  24. package/dist/src/console/dashboard.js.map +1 -0
  25. package/dist/src/console/endpoints.d.ts +264 -0
  26. package/dist/src/console/endpoints.d.ts.map +1 -0
  27. package/dist/src/console/endpoints.js +164 -0
  28. package/dist/src/console/endpoints.js.map +1 -0
  29. package/dist/src/console/functions.d.ts +165 -0
  30. package/dist/src/console/functions.d.ts.map +1 -0
  31. package/dist/src/console/functions.js +117 -0
  32. package/dist/src/console/functions.js.map +1 -0
  33. package/dist/src/console/mod.d.ts +131 -0
  34. package/dist/src/console/mod.d.ts.map +1 -0
  35. package/dist/src/console/mod.js +121 -0
  36. package/dist/src/console/mod.js.map +1 -0
  37. package/dist/src/console/projects.d.ts +107 -0
  38. package/dist/src/console/projects.d.ts.map +1 -0
  39. package/dist/src/console/projects.js +97 -0
  40. package/dist/src/console/projects.js.map +1 -0
  41. package/dist/src/console/reliability.d.ts +149 -0
  42. package/dist/src/console/reliability.d.ts.map +1 -0
  43. package/dist/src/console/reliability.js +56 -0
  44. package/dist/src/console/reliability.js.map +1 -0
  45. package/dist/src/console/saved-tests.d.ts +198 -0
  46. package/dist/src/console/saved-tests.d.ts.map +1 -0
  47. package/dist/src/console/saved-tests.js +172 -0
  48. package/dist/src/console/saved-tests.js.map +1 -0
  49. package/dist/src/console/schedules.d.ts +127 -0
  50. package/dist/src/console/schedules.d.ts.map +1 -0
  51. package/dist/src/console/schedules.js +118 -0
  52. package/dist/src/console/schedules.js.map +1 -0
  53. package/dist/src/console/step-tests.d.ts +159 -0
  54. package/dist/src/console/step-tests.d.ts.map +1 -0
  55. package/dist/src/console/step-tests.js +129 -0
  56. package/dist/src/console/step-tests.js.map +1 -0
  57. package/dist/src/console/subscriptions.d.ts +199 -0
  58. package/dist/src/console/subscriptions.d.ts.map +1 -0
  59. package/dist/src/console/subscriptions.js +191 -0
  60. package/dist/src/console/subscriptions.js.map +1 -0
  61. package/dist/src/console/tenant-oauth-apps.d.ts +188 -0
  62. package/dist/src/console/tenant-oauth-apps.d.ts.map +1 -0
  63. package/dist/src/console/tenant-oauth-apps.js +152 -0
  64. package/dist/src/console/tenant-oauth-apps.js.map +1 -0
  65. package/dist/src/console/tokens.d.ts +159 -0
  66. package/dist/src/console/tokens.d.ts.map +1 -0
  67. package/dist/src/console/tokens.js +145 -0
  68. package/dist/src/console/tokens.js.map +1 -0
  69. package/dist/src/console/vault.d.ts +188 -0
  70. package/dist/src/console/vault.d.ts.map +1 -0
  71. package/dist/src/console/vault.js +164 -0
  72. package/dist/src/console/vault.js.map +1 -0
  73. package/dist/src/console/workflows.d.ts +243 -0
  74. package/dist/src/console/workflows.d.ts.map +1 -0
  75. package/dist/src/console/workflows.js +205 -0
  76. package/dist/src/console/workflows.js.map +1 -0
  77. package/dist/src/http.d.ts +32 -2
  78. package/dist/src/http.d.ts.map +1 -1
  79. package/dist/src/http.js +11 -2
  80. package/dist/src/http.js.map +1 -1
  81. package/dist/src/types.d.ts +2 -2
  82. package/dist/src/types.d.ts.map +1 -1
  83. package/dist/src/version.js +1 -1
  84. package/package.json +5 -1
@@ -16,6 +16,7 @@
16
16
  */
17
17
  import { type ResolvedConfig, type W6wClientOptions } from "./config.ts";
18
18
  import { ConnectionsApi } from "./connections.ts";
19
+ import { ConsoleApi } from "./console/mod.ts";
19
20
  import { DocumentsApi } from "./documents.ts";
20
21
  import { type HttpResponse, type RequestOptions } from "./http.ts";
21
22
  import { type RunInput } from "./run.ts";
@@ -77,6 +78,33 @@ export declare class W6wClient {
77
78
  * `@w6w/trigger` step and read downstream as `steps.<triggerId>.output.<key>`.
78
79
  */
79
80
  readonly workflows: WorkflowsApi;
81
+ /**
82
+ * Console-only namespaces: `console.reliability.list`, `console.auth.*`
83
+ * (`login`, `signup`, `checkAccountSlug`, `createAccount`),
84
+ * `console.dashboard.stats`, `console.projects.*` (`list`, `create`,
85
+ * `delete`), `console.schedules.*` (`get`, `upsert`, `delete`),
86
+ * `console.apps.*` (`list`, `get`, `getAuth`, `getActions`, `getTriggers`,
87
+ * `getHealth`, `getHealthStatus`, `listOAuthConfig`, `upsertOAuthConfig`,
88
+ * `deleteOAuthConfig`, `startOAuthFlow`, `preview`, `import`, `refresh`,
89
+ * `invoke`, `delete`), `console.connections.*` (`listForApp`, `get`,
90
+ * `create`, `update`, `test`, `delete`), `console.workflows.*` (`get`,
91
+ * `upsert`, `archive`, `delete`, `listRuns`, `getRun`),
92
+ * `console.savedTests.*` (`list`, `create`, `update`, `delete`,
93
+ * `recordTestRun`, `listTestRuns`), `console.stepTests.*` (`save`,
94
+ * `list`, `recordRun`), `console.vault.*` (`list`, `get`, `create`,
95
+ * `update`, `delete`, `seal`), `console.tokens.*` (`list`, `create`,
96
+ * `disable`, `enable`, `revoke`), `console.functions.*` (`list`, `get`,
97
+ * `upsert`), `console.endpoints.*` (`list`, `get`, `upsert`, `invoke`),
98
+ * `console.subscriptions.*` (`list`, `listForWorkflow`, `get`, `create`,
99
+ * `delete`, `listEvents`, `requeueEvent`), `console.apiCalls.*` (`list`) and
100
+ * `console.tenantOAuthApps.*` (`list`, `put`, `remove`).
101
+ * Studio-internal and unstable — not part of the published partner
102
+ * contract, excluded from `endpoints.json` and from this package's root
103
+ * barrel (`docs/console.md`, HITL-1). Reached only through
104
+ * `@w6w/sdk/console`'s re-exports, and constructed with the transport only,
105
+ * exactly like `vars` and `connections`.
106
+ */
107
+ readonly console: ConsoleApi;
80
108
  /**
81
109
  * @param options - Explicit configuration; anything omitted falls back to the environment.
82
110
  * @throws {ConfigError} When no base URL is configured, or the host has no `fetch`.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,KAAK,YAAY,EAAW,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAE5E,OAAO,EAAE,KAAK,QAAQ,EAAU,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,SAAS;;IACpB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EA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ACH,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IAEjC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC;IAErC;;;;;;;;OAQG;IACH,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IAEjC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAI7B;;;OAGG;gBACS,OAAO,GAAE,gBAAqB;IA6B1C;;;;;;;;;;;;;OAaG;IACH,EAAE,IAAI,OAAO,CAAC,EAAE,CAAC;IAIjB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,GAAG,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;IAI1C;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CAG9D"}
@@ -16,6 +16,7 @@
16
16
  */
17
17
  import { resolveConfig, } from "./config.js";
18
18
  import { ConnectionsApi } from "./connections.js";
19
+ import { ConsoleApi } from "./console/mod.js";
19
20
  import { DocumentsApi } from "./documents.js";
20
21
  import { ConfigError } from "./errors.js";
21
22
  import { request } from "./http.js";
@@ -77,6 +78,33 @@ export class W6wClient {
77
78
  * `@w6w/trigger` step and read downstream as `steps.<triggerId>.output.<key>`.
78
79
  */
79
80
  workflows;
81
+ /**
82
+ * Console-only namespaces: `console.reliability.list`, `console.auth.*`
83
+ * (`login`, `signup`, `checkAccountSlug`, `createAccount`),
84
+ * `console.dashboard.stats`, `console.projects.*` (`list`, `create`,
85
+ * `delete`), `console.schedules.*` (`get`, `upsert`, `delete`),
86
+ * `console.apps.*` (`list`, `get`, `getAuth`, `getActions`, `getTriggers`,
87
+ * `getHealth`, `getHealthStatus`, `listOAuthConfig`, `upsertOAuthConfig`,
88
+ * `deleteOAuthConfig`, `startOAuthFlow`, `preview`, `import`, `refresh`,
89
+ * `invoke`, `delete`), `console.connections.*` (`listForApp`, `get`,
90
+ * `create`, `update`, `test`, `delete`), `console.workflows.*` (`get`,
91
+ * `upsert`, `archive`, `delete`, `listRuns`, `getRun`),
92
+ * `console.savedTests.*` (`list`, `create`, `update`, `delete`,
93
+ * `recordTestRun`, `listTestRuns`), `console.stepTests.*` (`save`,
94
+ * `list`, `recordRun`), `console.vault.*` (`list`, `get`, `create`,
95
+ * `update`, `delete`, `seal`), `console.tokens.*` (`list`, `create`,
96
+ * `disable`, `enable`, `revoke`), `console.functions.*` (`list`, `get`,
97
+ * `upsert`), `console.endpoints.*` (`list`, `get`, `upsert`, `invoke`),
98
+ * `console.subscriptions.*` (`list`, `listForWorkflow`, `get`, `create`,
99
+ * `delete`, `listEvents`, `requeueEvent`), `console.apiCalls.*` (`list`) and
100
+ * `console.tenantOAuthApps.*` (`list`, `put`, `remove`).
101
+ * Studio-internal and unstable — not part of the published partner
102
+ * contract, excluded from `endpoints.json` and from this package's root
103
+ * barrel (`docs/console.md`, HITL-1). Reached only through
104
+ * `@w6w/sdk/console`'s re-exports, and constructed with the transport only,
105
+ * exactly like `vars` and `connections`.
106
+ */
107
+ console;
80
108
  #fetch;
81
109
  /**
82
110
  * @param options - Explicit configuration; anything omitted falls back to the environment.
@@ -106,6 +134,7 @@ export class W6wClient {
106
134
  this.vars = new VarsApi(this);
107
135
  this.connections = new ConnectionsApi(this);
108
136
  this.workflows = new WorkflowsApi(this);
137
+ this.console = new ConsoleApi(this);
109
138
  }
110
139
  /**
111
140
  * Who this client's credential says you are, plus the versions of the
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAEL,aAAa,GAGd,MAAM,aA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AAI,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,EAAE;QACA,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,GAAG,CAAC,KAAe;QACjB,OAAO,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAI,OAAuB;QAChC,OAAO,OAAO,CAAI,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;CACF"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * `client.console.apiCalls.*` — the outbound API call log behind a run,
3
+ * relocated from the studio's own API client.
4
+ *
5
+ * **Studio-internal, not the published partner contract.** This namespace
6
+ * lives under the `console` subpath export (`@w6w/sdk/console`), excluded from
7
+ * `endpoints.json` and from the root barrel (`mod.ts`) — see `docs/console.md`
8
+ * and HITL-1 in this task's contract. `@w6w/sdk`'s instance-state mechanism
9
+ * pin still applies here exactly as it does to every other namespace
10
+ * (`docs/implementation.md` §MECHANISM PIN — instance state, never globals):
11
+ * this class holds no state of its own beyond the injected host, so two
12
+ * clients in one process never share a credential.
13
+ *
14
+ * One method: `list`, relocated from `client.ts:214-231`'s `listApiCalls` —
15
+ * which lived under the `client.ts` `// Apps` comment block despite having no
16
+ * apps-domain consumer (its only caller is reliability's drill-down page).
17
+ *
18
+ * **`ApiCallRecord` is REUSED from `console.apps`, never redefined.**
19
+ * `console/apps.ts` already declares it (used internally by `AppsApi.invoke`'s
20
+ * result type) and `console/mod.ts` already re-exports it — this module
21
+ * imports it as a type and uses it verbatim as `list`'s return element type.
22
+ *
23
+ * `api-calls` is scoped to the caller by the server's own repo, not by a
24
+ * `project` query param — so `ApiCallsHost` needs only the transport,
25
+ * mirroring `VarsHost`/`ProjectsHost`, not `DocumentsHost`.
26
+ *
27
+ * @module
28
+ */
29
+ import type { HttpResponse, RequestOptions } from "../http.ts";
30
+ import type { ApiCallRecord } from "./apps.ts";
31
+ export type { ApiCallRecord } from "./apps.ts";
32
+ /**
33
+ * The slice of `W6wClient` this namespace needs: the transport, and nothing
34
+ * else. Structural rather than a concrete client type, so the namespace stays
35
+ * independently constructible in a test and this module never imports the
36
+ * client back — mirrors `VarsHost` in `../vars.ts`.
37
+ */
38
+ export interface ApiCallsHost {
39
+ /** Perform one request. */
40
+ request<T>(options: RequestOptions): Promise<HttpResponse<T>>;
41
+ }
42
+ /**
43
+ * Optional filter for `list`. All fields optional; omitted or `undefined`
44
+ * fields are not sent as query params — mirrors `client.ts:214-231`'s default
45
+ * `{}` parameter and its `Object.entries` loop that skips `undefined`/`""`
46
+ * values.
47
+ */
48
+ export interface ApiCallsFilter {
49
+ appId?: string;
50
+ actionKey?: string;
51
+ connectionId?: string;
52
+ sessionId?: string;
53
+ /** Server defaults to 25 when unset/invalid, caps at 200. */
54
+ limit?: number;
55
+ }
56
+ /**
57
+ * The `console.apiCalls` namespace on a `W6wClient`.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const calls = await client.console.apiCalls.list({ appId: "app_x", limit: 50 });
62
+ * ```
63
+ */
64
+ export declare class ApiCallsApi {
65
+ #private;
66
+ /**
67
+ * @param host - The client this namespace issues requests through.
68
+ */
69
+ constructor(host: ApiCallsHost);
70
+ /**
71
+ * List outbound API calls, newest first. Filter by app/action/connection/
72
+ * session.
73
+ *
74
+ * @param filter - Optional filter; omitted entirely, no query params are sent.
75
+ * @returns The calls, unwrapped from the `apiCalls` envelope.
76
+ * @throws {ApiError} On any non-2xx.
77
+ */
78
+ list(filter?: ApiCallsFilter): Promise<ApiCallRecord[]>;
79
+ }
80
+ //# sourceMappingURL=api-calls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-calls.d.ts","sourceRoot":"","sources":["../../../src/console/api-calls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAK/C,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,qBAAa,WAAW;;IAGtB;;OAEG;gBACS,IAAI,EAAE,YAAY;IAI9B;;;;;;;OAOG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;CAc9D"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * `client.console.apiCalls.*` — the outbound API call log behind a run,
3
+ * relocated from the studio's own API client.
4
+ *
5
+ * **Studio-internal, not the published partner contract.** This namespace
6
+ * lives under the `console` subpath export (`@w6w/sdk/console`), excluded from
7
+ * `endpoints.json` and from the root barrel (`mod.ts`) — see `docs/console.md`
8
+ * and HITL-1 in this task's contract. `@w6w/sdk`'s instance-state mechanism
9
+ * pin still applies here exactly as it does to every other namespace
10
+ * (`docs/implementation.md` §MECHANISM PIN — instance state, never globals):
11
+ * this class holds no state of its own beyond the injected host, so two
12
+ * clients in one process never share a credential.
13
+ *
14
+ * One method: `list`, relocated from `client.ts:214-231`'s `listApiCalls` —
15
+ * which lived under the `client.ts` `// Apps` comment block despite having no
16
+ * apps-domain consumer (its only caller is reliability's drill-down page).
17
+ *
18
+ * **`ApiCallRecord` is REUSED from `console.apps`, never redefined.**
19
+ * `console/apps.ts` already declares it (used internally by `AppsApi.invoke`'s
20
+ * result type) and `console/mod.ts` already re-exports it — this module
21
+ * imports it as a type and uses it verbatim as `list`'s return element type.
22
+ *
23
+ * `api-calls` is scoped to the caller by the server's own repo, not by a
24
+ * `project` query param — so `ApiCallsHost` needs only the transport,
25
+ * mirroring `VarsHost`/`ProjectsHost`, not `DocumentsHost`.
26
+ *
27
+ * @module
28
+ */
29
+ import { unwrap } from "../types.js";
30
+ /**
31
+ * The `console.apiCalls` namespace on a `W6wClient`.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const calls = await client.console.apiCalls.list({ appId: "app_x", limit: 50 });
36
+ * ```
37
+ */
38
+ export class ApiCallsApi {
39
+ #host;
40
+ /**
41
+ * @param host - The client this namespace issues requests through.
42
+ */
43
+ constructor(host) {
44
+ this.#host = host;
45
+ }
46
+ /**
47
+ * List outbound API calls, newest first. Filter by app/action/connection/
48
+ * session.
49
+ *
50
+ * @param filter - Optional filter; omitted entirely, no query params are sent.
51
+ * @returns The calls, unwrapped from the `apiCalls` envelope.
52
+ * @throws {ApiError} On any non-2xx.
53
+ */
54
+ async list(filter) {
55
+ const res = await this.#host.request({
56
+ method: "GET",
57
+ path: "/api-calls",
58
+ query: {
59
+ appId: filter?.appId,
60
+ actionKey: filter?.actionKey,
61
+ connectionId: filter?.connectionId,
62
+ sessionId: filter?.sessionId,
63
+ limit: filter?.limit,
64
+ },
65
+ });
66
+ return unwrap(res, "apiCalls");
67
+ }
68
+ }
69
+ //# sourceMappingURL=api-calls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-calls.js","sourceRoot":"","sources":["../../../src/console/api-calls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAkCrC;;;;;;;GAOG;AACH,MAAM,OAAO,WAAW;IACb,KAAK,CAAe;IAE7B;;OAEG;IACH,YAAY,IAAkB;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,IAAI,CAAC,MAAuB;QAChC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM,EAAE,KAAK;gBACpB,SAAS,EAAE,MAAM,EAAE,SAAS;gBAC5B,YAAY,EAAE,MAAM,EAAE,YAAY;gBAClC,SAAS,EAAE,MAAM,EAAE,SAAS;gBAC5B,KAAK,EAAE,MAAM,EAAE,KAAK;aACrB;SACF,CAAC,CAAC;QACH,OAAO,MAAM,CAAkB,GAAG,EAAE,UAAU,CAAC,CAAC;IAClD,CAAC;CACF"}