@lessly/sdk-app 63.2.3 → 63.2.5

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.
@@ -0,0 +1 @@
1
+ export * from '../_types/gen/playground/index.js';
@@ -0,0 +1 @@
1
+ export * from '../_types/gen/playground/index.js';
@@ -0,0 +1,58 @@
1
+ import { wsBindings } from '../chunk-2YAA3AF4.js';
2
+
3
+ // src/gen/playground/queryOptions.gen.ts
4
+ var playgroundAnalyticsOverviewQueryOptions = (sdk, input) => ({
5
+ queryKey: ["playground", "analytics", "overview", input],
6
+ queryFn: () => sdk["playground"]["analytics"]["overview"](input)
7
+ });
8
+ var playgroundBillingEntitlementsQueryOptions = (sdk, input) => ({
9
+ queryKey: ["playground", "billing", "entitlements", input],
10
+ queryFn: () => sdk["playground"]["billing"]["entitlements"](input)
11
+ });
12
+ var playgroundBillingRecordUsageMutationOptions = (sdk) => ({
13
+ mutationKey: ["playground", "billing", "record-usage"],
14
+ mutationFn: (input) => sdk["playground"]["billing"]["record-usage"](input)
15
+ });
16
+ var playgroundClickupCreateTaskMutationOptions = (sdk) => ({
17
+ mutationKey: ["playground", "clickup", "create-task"],
18
+ mutationFn: (input) => sdk["playground"]["clickup"]["create-task"](input)
19
+ });
20
+ var playgroundClickupGetLastWebhookQueryOptions = (sdk, input) => ({
21
+ queryKey: ["playground", "clickup", "get-last-webhook", input],
22
+ queryFn: () => sdk["playground"]["clickup"]["get-last-webhook"](input)
23
+ });
24
+ var playgroundClickupGetOverviewQueryOptions = (sdk, input) => ({
25
+ queryKey: ["playground", "clickup", "get-overview", input],
26
+ queryFn: () => sdk["playground"]["clickup"]["get-overview"](input)
27
+ });
28
+ var playgroundGdriveGetLastChangeQueryOptions = (sdk, input) => ({
29
+ queryKey: ["playground", "gdrive", "get-last-change", input],
30
+ queryFn: () => sdk["playground"]["gdrive"]["get-last-change"](input)
31
+ });
32
+ var playgroundGdriveReadFileQueryOptions = (sdk, input) => ({
33
+ queryKey: ["playground", "gdrive", "read-file", input],
34
+ queryFn: () => sdk["playground"]["gdrive"]["read-file"](input)
35
+ });
36
+ var playgroundGoogleadsReadCustomerQueryOptions = (sdk, input) => ({
37
+ queryKey: ["playground", "googleads", "read-customer", input],
38
+ queryFn: () => sdk["playground"]["googleads"]["read-customer"](input)
39
+ });
40
+ var playgroundLifecycleGetStateQueryOptions = (sdk, input) => ({
41
+ queryKey: ["playground", "lifecycle", "get-state", input],
42
+ queryFn: () => sdk["playground"]["lifecycle"]["get-state"](input)
43
+ });
44
+ var playgroundLifecycleListEventsQueryOptions = (sdk, input) => ({
45
+ queryKey: ["playground", "lifecycle", "list-events", input],
46
+ queryFn: () => sdk["playground"]["lifecycle"]["list-events"](input)
47
+ });
48
+ var playgroundWebhookGetLastQueryOptions = (sdk, input) => ({
49
+ queryKey: ["playground", "webhook", "get-last", input],
50
+ queryFn: () => sdk["playground"]["webhook"]["get-last"](input)
51
+ });
52
+
53
+ // src/gen/playground/connect.gen.ts
54
+ var playgroundWsEchoConnect = (sdk, input) => sdk.openStream(wsBindings["playground"]["ws"]["echo"], input);
55
+
56
+ export { playgroundAnalyticsOverviewQueryOptions, playgroundBillingEntitlementsQueryOptions, playgroundBillingRecordUsageMutationOptions, playgroundClickupCreateTaskMutationOptions, playgroundClickupGetLastWebhookQueryOptions, playgroundClickupGetOverviewQueryOptions, playgroundGdriveGetLastChangeQueryOptions, playgroundGdriveReadFileQueryOptions, playgroundGoogleadsReadCustomerQueryOptions, playgroundLifecycleGetStateQueryOptions, playgroundLifecycleListEventsQueryOptions, playgroundWebhookGetLastQueryOptions, playgroundWsEchoConnect };
57
+ //# sourceMappingURL=index.js.map
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/gen/playground/queryOptions.gen.ts","../../src/gen/playground/connect.gen.ts"],"names":[],"mappings":";;;AA2BO,IAAM,uCAAA,GAA0C,CAAC,GAAA,EAAsB,KAAA,MAA6C;AAAA,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Ae,KAAK,CAAA;AAAA,EAC1D,OAAA,EAAS,MAAM,GAAA,CAAI,YAAY,EAAE,WAAW,CAAA,CAAE,aAAa,CAAA,CAAE,KAAK;AACpE,CAAA;AAEO,IAAM,oCAAA,GAAuC,CAAC,GAAA,EAAsB,KAAA,MAA0C;AAAA,EACnH,QAAA,EAAU,CAAC,YAAA,EAAc,SAAA,EAAW,YAAY,KAAK,CAAA;AAAA,EACrD,OAAA,EAAS,MAAM,GAAA,CAAI,YAAY,EAAE,SAAS,CAAA,CAAE,UAAU,CAAA,CAAE,KAAK;AAC/D,CAAA;;;AC9EO,IAAM,uBAAA,GAA0B,CAAC,GAAA,EAAyB,KAAA,KAC/D,GAAA,CAAI,UAAA,CAAW,UAAA,CAAW,YAAY,CAAA,CAAG,IAAI,CAAA,CAAG,MAAM,GAAI,KAAgC","file":"index.js","sourcesContent":["// AUTOGENERATED by scripts/generate.ts — do not edit.\nimport type { GeneratedClient } from '../client.gen';\nimport type {\n PlaygroundAnalyticsOverviewInput,\n PlaygroundAnalyticsOverviewOutput,\n PlaygroundBillingEntitlementsInput,\n PlaygroundBillingEntitlementsOutput,\n PlaygroundBillingRecordUsageInput,\n PlaygroundClickupCreateTaskInput,\n PlaygroundClickupGetLastWebhookInput,\n PlaygroundClickupGetLastWebhookOutput,\n PlaygroundClickupGetOverviewInput,\n PlaygroundClickupGetOverviewOutput,\n PlaygroundGdriveGetLastChangeInput,\n PlaygroundGdriveGetLastChangeOutput,\n PlaygroundGdriveReadFileInput,\n PlaygroundGdriveReadFileOutput,\n PlaygroundGoogleadsReadCustomerInput,\n PlaygroundGoogleadsReadCustomerOutput,\n PlaygroundLifecycleGetStateInput,\n PlaygroundLifecycleGetStateOutput,\n PlaygroundLifecycleListEventsInput,\n PlaygroundLifecycleListEventsOutput,\n PlaygroundWebhookGetLastInput,\n PlaygroundWebhookGetLastOutput,\n} from '../types.gen';\n\nexport const playgroundAnalyticsOverviewQueryOptions = (sdk: GeneratedClient, input: PlaygroundAnalyticsOverviewInput) => ({\n queryKey: ['playground', 'analytics', 'overview', input] as const,\n queryFn: () => sdk['playground']['analytics']['overview'](input),\n});\n\nexport const playgroundBillingEntitlementsQueryOptions = (sdk: GeneratedClient, input: PlaygroundBillingEntitlementsInput) => ({\n queryKey: ['playground', 'billing', 'entitlements', input] as const,\n queryFn: () => sdk['playground']['billing']['entitlements'](input),\n});\n\nexport const playgroundBillingRecordUsageMutationOptions = (sdk: GeneratedClient) => ({\n mutationKey: ['playground', 'billing', 'record-usage'],\n mutationFn: (input: PlaygroundBillingRecordUsageInput) => sdk['playground']['billing']['record-usage'](input),\n});\n\nexport const playgroundClickupCreateTaskMutationOptions = (sdk: GeneratedClient) => ({\n mutationKey: ['playground', 'clickup', 'create-task'],\n mutationFn: (input: PlaygroundClickupCreateTaskInput) => sdk['playground']['clickup']['create-task'](input),\n});\n\nexport const playgroundClickupGetLastWebhookQueryOptions = (sdk: GeneratedClient, input: PlaygroundClickupGetLastWebhookInput) => ({\n queryKey: ['playground', 'clickup', 'get-last-webhook', input] as const,\n queryFn: () => sdk['playground']['clickup']['get-last-webhook'](input),\n});\n\nexport const playgroundClickupGetOverviewQueryOptions = (sdk: GeneratedClient, input: PlaygroundClickupGetOverviewInput) => ({\n queryKey: ['playground', 'clickup', 'get-overview', input] as const,\n queryFn: () => sdk['playground']['clickup']['get-overview'](input),\n});\n\nexport const playgroundGdriveGetLastChangeQueryOptions = (sdk: GeneratedClient, input: PlaygroundGdriveGetLastChangeInput) => ({\n queryKey: ['playground', 'gdrive', 'get-last-change', input] as const,\n queryFn: () => sdk['playground']['gdrive']['get-last-change'](input),\n});\n\nexport const playgroundGdriveReadFileQueryOptions = (sdk: GeneratedClient, input: PlaygroundGdriveReadFileInput) => ({\n queryKey: ['playground', 'gdrive', 'read-file', input] as const,\n queryFn: () => sdk['playground']['gdrive']['read-file'](input),\n});\n\nexport const playgroundGoogleadsReadCustomerQueryOptions = (sdk: GeneratedClient, input: PlaygroundGoogleadsReadCustomerInput) => ({\n queryKey: ['playground', 'googleads', 'read-customer', input] as const,\n queryFn: () => sdk['playground']['googleads']['read-customer'](input),\n});\n\nexport const playgroundLifecycleGetStateQueryOptions = (sdk: GeneratedClient, input: PlaygroundLifecycleGetStateInput) => ({\n queryKey: ['playground', 'lifecycle', 'get-state', input] as const,\n queryFn: () => sdk['playground']['lifecycle']['get-state'](input),\n});\n\nexport const playgroundLifecycleListEventsQueryOptions = (sdk: GeneratedClient, input: PlaygroundLifecycleListEventsInput) => ({\n queryKey: ['playground', 'lifecycle', 'list-events', input] as const,\n queryFn: () => sdk['playground']['lifecycle']['list-events'](input),\n});\n\nexport const playgroundWebhookGetLastQueryOptions = (sdk: GeneratedClient, input: PlaygroundWebhookGetLastInput) => ({\n queryKey: ['playground', 'webhook', 'get-last', input] as const,\n queryFn: () => sdk['playground']['webhook']['get-last'](input),\n});\n","// AUTOGENERATED by scripts/generate.ts — do not edit.\nimport { wsBindings } from '../bindings.gen';\nimport type { LesslyStream, LesslyStreamOpener } from '../../runtime/types';\nimport type {\n PlaygroundWsEchoInput,\n} from '../types.gen';\n\nexport const playgroundWsEchoConnect = (sdk: LesslyStreamOpener, input: PlaygroundWsEchoInput): LesslyStream =>\n sdk.openStream(wsBindings['playground']!['ws']!['echo']!, input as Record<string, unknown>);\n"]}
@@ -190,7 +190,11 @@ accessReason(app.mail.domain.create);
190
190
  ```
191
191
 
192
192
  Use it in every example below; nothing in an App should assemble this text by
193
- hand.
193
+ hand. It never throws and never renders the word `undefined`: an object with a
194
+ key but no usable level degrades to the key-only sentence, and an input with no
195
+ usable key at all falls back to `"Not available for your role. Ask an admin of
196
+ this product."` (plus one `console.warn` outside production, because that input
197
+ is a caller bug).
194
198
 
195
199
  It takes **one** operation. Choosing which operation to explain — the first one
196
200
  `can()` denied, out of the several a button performs — is the caller's job, and
@@ -227,11 +231,26 @@ exactly what the gateway does with an uncatalogued key.
227
231
  >
228
232
  > ```ts
229
233
  > import type { Operation } from '@lessly/sdk-app';
230
- > export const accessReason = (op: Operation | string): string =>
231
- > typeof op === 'string'
232
- > ? `Requires access to ${op}. Ask an admin of this product.`
233
- > : `Requires level:${op.level} (${op.operationKey}). Ask an admin of this product.`;
234
+ >
235
+ > const ok = (v: unknown): v is string => typeof v === 'string' && v.trim() !== '';
236
+ >
237
+ > export const accessReason = (op: Operation | string): string => {
238
+ > if (ok(op)) return `Requires access to ${op}. Ask an admin of this product.`;
239
+ > // A generated method is a CALLABLE carrying operationKey/level, so not just 'object'.
240
+ > if (op !== null && (typeof op === 'object' || typeof op === 'function')) {
241
+ > const { operationKey, level } = op as { operationKey?: unknown; level?: unknown };
242
+ > if (ok(operationKey)) {
243
+ > return ok(level) && ['read', 'write', 'admin'].includes(level)
244
+ > ? `Requires level:${level} (${operationKey}). Ask an admin of this product.`
245
+ > : `Requires access to ${operationKey}. Ask an admin of this product.`;
246
+ > }
247
+ > }
248
+ > return 'Not available for your role. Ask an admin of this product.';
249
+ > };
234
250
  > ```
251
+ >
252
+ > It never throws — a render helper that crashes takes the whole screen with it —
253
+ > and never renders `level:undefined`.
235
254
 
236
255
  **Why both values.** The reason says what an admin has to *grant*, not what the
237
256
  caller happens to be — a role name gives them nothing to act on, and "your role
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lessly/sdk-app",
3
- "version": "63.2.3",
3
+ "version": "63.2.5",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "engines": {
@@ -148,6 +148,16 @@
148
148
  "default": "./dist/organization/index.cjs"
149
149
  }
150
150
  },
151
+ "./playground": {
152
+ "import": {
153
+ "types": "./dist/playground/index.d.ts",
154
+ "default": "./dist/playground/index.js"
155
+ },
156
+ "require": {
157
+ "types": "./dist/playground/index.d.cts",
158
+ "default": "./dist/playground/index.cjs"
159
+ }
160
+ },
151
161
  "./realtime": {
152
162
  "import": {
153
163
  "types": "./dist/realtime/index.d.ts",
@@ -199,5 +209,5 @@
199
209
  }
200
210
  }
201
211
  },
202
- "sdkContentHash": "sha256:dd29109a46bbe0d03bc1d40d04cb3be51eecfdcc76db40b6eceead9bf9a05f9b"
212
+ "sdkContentHash": "sha256:965d6441024647f1461d4e50bedeba9d79dca805ea4668ca8c9ecedefc1c0d0a"
203
213
  }
@@ -7116,6 +7116,134 @@ export const bindings: BindingsMap = {
7116
7116
  }
7117
7117
  }
7118
7118
  },
7119
+ "playground": {
7120
+ "analytics": {
7121
+ "overview": {
7122
+ "level": "read",
7123
+ "method": "POST",
7124
+ "operationKey": "playground_analytics_overview",
7125
+ "params": [
7126
+ {
7127
+ "in": "body",
7128
+ "name": "limit"
7129
+ }
7130
+ ],
7131
+ "path": "/playground/analytics/overview",
7132
+ "readOnly": true
7133
+ }
7134
+ },
7135
+ "billing": {
7136
+ "entitlements": {
7137
+ "level": "read",
7138
+ "method": "POST",
7139
+ "operationKey": "playground_billing_entitlements",
7140
+ "path": "/playground/billing/entitlements",
7141
+ "readOnly": true
7142
+ },
7143
+ "record-usage": {
7144
+ "level": "write",
7145
+ "method": "POST",
7146
+ "operationKey": "playground_billing_record-usage",
7147
+ "params": [
7148
+ {
7149
+ "in": "body",
7150
+ "name": "value"
7151
+ }
7152
+ ],
7153
+ "path": "/playground/billing/usage",
7154
+ "readOnly": false
7155
+ }
7156
+ },
7157
+ "clickup": {
7158
+ "create-task": {
7159
+ "level": "write",
7160
+ "method": "POST",
7161
+ "operationKey": "playground_clickup_create-task",
7162
+ "params": [
7163
+ {
7164
+ "in": "body",
7165
+ "name": "listId"
7166
+ },
7167
+ {
7168
+ "in": "body",
7169
+ "name": "name"
7170
+ }
7171
+ ],
7172
+ "path": "/playground/clickup/tasks",
7173
+ "readOnly": false
7174
+ },
7175
+ "get-last-webhook": {
7176
+ "level": "read",
7177
+ "method": "GET",
7178
+ "operationKey": "playground_clickup_get-last-webhook",
7179
+ "path": "/playground/clickup/webhooks/last",
7180
+ "readOnly": true
7181
+ },
7182
+ "get-overview": {
7183
+ "level": "read",
7184
+ "method": "GET",
7185
+ "operationKey": "playground_clickup_get-overview",
7186
+ "path": "/playground/clickup/overview",
7187
+ "readOnly": true
7188
+ }
7189
+ },
7190
+ "gdrive": {
7191
+ "get-last-change": {
7192
+ "level": "read",
7193
+ "method": "GET",
7194
+ "operationKey": "playground_gdrive_get-last-change",
7195
+ "path": "/playground/gdrive/changes/last",
7196
+ "readOnly": true
7197
+ },
7198
+ "read-file": {
7199
+ "level": "read",
7200
+ "method": "POST",
7201
+ "operationKey": "playground_gdrive_read-file",
7202
+ "params": [
7203
+ {
7204
+ "in": "body",
7205
+ "name": "fileId"
7206
+ }
7207
+ ],
7208
+ "path": "/playground/gdrive/file",
7209
+ "readOnly": true
7210
+ }
7211
+ },
7212
+ "googleads": {
7213
+ "read-customer": {
7214
+ "level": "read",
7215
+ "method": "POST",
7216
+ "operationKey": "playground_googleads_read-customer",
7217
+ "path": "/playground/googleads/customer",
7218
+ "readOnly": true
7219
+ }
7220
+ },
7221
+ "lifecycle": {
7222
+ "get-state": {
7223
+ "level": "read",
7224
+ "method": "GET",
7225
+ "operationKey": "playground_lifecycle_get-state",
7226
+ "path": "/playground/lifecycle/state",
7227
+ "readOnly": true
7228
+ },
7229
+ "list-events": {
7230
+ "level": "read",
7231
+ "method": "GET",
7232
+ "operationKey": "playground_lifecycle_list-events",
7233
+ "path": "/playground/lifecycle/events",
7234
+ "readOnly": true
7235
+ }
7236
+ },
7237
+ "webhook": {
7238
+ "get-last": {
7239
+ "level": "read",
7240
+ "method": "GET",
7241
+ "operationKey": "playground_webhook_get-last",
7242
+ "path": "/playground/webhooks/last",
7243
+ "readOnly": true
7244
+ }
7245
+ }
7246
+ },
7119
7247
  "realtime": {
7120
7248
  "archive": {
7121
7249
  "export": {
@@ -10297,4 +10425,12 @@ export const bindings: BindingsMap = {
10297
10425
  }
10298
10426
  };
10299
10427
 
10300
- export const wsBindings: WsBindingsMap = {};
10428
+ export const wsBindings: WsBindingsMap = {
10429
+ "playground": {
10430
+ "ws": {
10431
+ "echo": {
10432
+ "path": "/playground/ws/echo"
10433
+ }
10434
+ }
10435
+ }
10436
+ };
@@ -769,6 +769,30 @@ import type {
769
769
  OrganizationXInstallOutput,
770
770
  OrganizationYoutubeInstallInput,
771
771
  OrganizationYoutubeInstallOutput,
772
+ PlaygroundAnalyticsOverviewInput,
773
+ PlaygroundAnalyticsOverviewOutput,
774
+ PlaygroundBillingEntitlementsInput,
775
+ PlaygroundBillingEntitlementsOutput,
776
+ PlaygroundBillingRecordUsageInput,
777
+ PlaygroundBillingRecordUsageOutput,
778
+ PlaygroundClickupCreateTaskInput,
779
+ PlaygroundClickupCreateTaskOutput,
780
+ PlaygroundClickupGetLastWebhookInput,
781
+ PlaygroundClickupGetLastWebhookOutput,
782
+ PlaygroundClickupGetOverviewInput,
783
+ PlaygroundClickupGetOverviewOutput,
784
+ PlaygroundGdriveGetLastChangeInput,
785
+ PlaygroundGdriveGetLastChangeOutput,
786
+ PlaygroundGdriveReadFileInput,
787
+ PlaygroundGdriveReadFileOutput,
788
+ PlaygroundGoogleadsReadCustomerInput,
789
+ PlaygroundGoogleadsReadCustomerOutput,
790
+ PlaygroundLifecycleGetStateInput,
791
+ PlaygroundLifecycleGetStateOutput,
792
+ PlaygroundLifecycleListEventsInput,
793
+ PlaygroundLifecycleListEventsOutput,
794
+ PlaygroundWebhookGetLastInput,
795
+ PlaygroundWebhookGetLastOutput,
772
796
  RealtimeArchiveExportInput,
773
797
  RealtimeArchiveExportOutput,
774
798
  RealtimeArchiveExportStatusInput,
@@ -1778,6 +1802,34 @@ export interface GeneratedClient {
1778
1802
  install: ((input: OrganizationYoutubeInstallInput) => Promise<OrganizationYoutubeInstallOutput>) & Operation;
1779
1803
  };
1780
1804
  };
1805
+ playground: {
1806
+ analytics: {
1807
+ overview: ((input: PlaygroundAnalyticsOverviewInput) => Promise<PlaygroundAnalyticsOverviewOutput>) & Operation;
1808
+ };
1809
+ billing: {
1810
+ entitlements: ((input: PlaygroundBillingEntitlementsInput) => Promise<PlaygroundBillingEntitlementsOutput>) & Operation;
1811
+ 'record-usage': ((input: PlaygroundBillingRecordUsageInput) => Promise<PlaygroundBillingRecordUsageOutput>) & Operation;
1812
+ };
1813
+ clickup: {
1814
+ 'create-task': ((input: PlaygroundClickupCreateTaskInput) => Promise<PlaygroundClickupCreateTaskOutput>) & Operation;
1815
+ 'get-last-webhook': ((input: PlaygroundClickupGetLastWebhookInput) => Promise<PlaygroundClickupGetLastWebhookOutput>) & Operation;
1816
+ 'get-overview': ((input: PlaygroundClickupGetOverviewInput) => Promise<PlaygroundClickupGetOverviewOutput>) & Operation;
1817
+ };
1818
+ gdrive: {
1819
+ 'get-last-change': ((input: PlaygroundGdriveGetLastChangeInput) => Promise<PlaygroundGdriveGetLastChangeOutput>) & Operation;
1820
+ 'read-file': ((input: PlaygroundGdriveReadFileInput) => Promise<PlaygroundGdriveReadFileOutput>) & Operation;
1821
+ };
1822
+ googleads: {
1823
+ 'read-customer': ((input: PlaygroundGoogleadsReadCustomerInput) => Promise<PlaygroundGoogleadsReadCustomerOutput>) & Operation;
1824
+ };
1825
+ lifecycle: {
1826
+ 'get-state': ((input: PlaygroundLifecycleGetStateInput) => Promise<PlaygroundLifecycleGetStateOutput>) & Operation;
1827
+ 'list-events': ((input: PlaygroundLifecycleListEventsInput) => Promise<PlaygroundLifecycleListEventsOutput>) & Operation;
1828
+ };
1829
+ webhook: {
1830
+ 'get-last': ((input: PlaygroundWebhookGetLastInput) => Promise<PlaygroundWebhookGetLastOutput>) & Operation;
1831
+ };
1832
+ };
1781
1833
  realtime: {
1782
1834
  archive: {
1783
1835
  export: ((input: RealtimeArchiveExportInput) => Promise<RealtimeArchiveExportOutput>) & Operation;
@@ -1,7 +1,7 @@
1
1
  // AUTOGENERATED by scripts/generate.ts — do not edit.
2
2
  import type { ToolLevel } from '../runtime/types';
3
3
 
4
- export const namespaces = ['analytics', 'brain', 'consent', 'content', 'deployment', 'mail', 'observe', 'organization', 'realtime', 'support', 'tracking', 'users', 'waitlist'] as const;
4
+ export const namespaces = ['analytics', 'brain', 'consent', 'content', 'deployment', 'mail', 'observe', 'organization', 'playground', 'realtime', 'support', 'tracking', 'users', 'waitlist'] as const;
5
5
 
6
6
  export const operations: Record<string, ToolLevel> = {
7
7
  'analytics_catalog_get': 'read',
@@ -388,6 +388,18 @@ export const operations: Record<string, ToolLevel> = {
388
388
  'organization_support_threads_list': 'read',
389
389
  'organization_x_install': 'read',
390
390
  'organization_youtube_install': 'read',
391
+ 'playground_analytics_overview': 'read',
392
+ 'playground_billing_entitlements': 'read',
393
+ 'playground_billing_record-usage': 'write',
394
+ 'playground_clickup_create-task': 'write',
395
+ 'playground_clickup_get-last-webhook': 'read',
396
+ 'playground_clickup_get-overview': 'read',
397
+ 'playground_gdrive_get-last-change': 'read',
398
+ 'playground_gdrive_read-file': 'read',
399
+ 'playground_googleads_read-customer': 'read',
400
+ 'playground_lifecycle_get-state': 'read',
401
+ 'playground_lifecycle_list-events': 'read',
402
+ 'playground_webhook_get-last': 'read',
391
403
  'realtime_archive_export': 'admin',
392
404
  'realtime_archive_export_status': 'read',
393
405
  'realtime_archive_get': 'read',
@@ -0,0 +1,9 @@
1
+ // AUTOGENERATED by scripts/generate.ts — do not edit.
2
+ import { wsBindings } from '../bindings.gen';
3
+ import type { LesslyStream, LesslyStreamOpener } from '../../runtime/types';
4
+ import type {
5
+ PlaygroundWsEchoInput,
6
+ } from '../types.gen';
7
+
8
+ export const playgroundWsEchoConnect = (sdk: LesslyStreamOpener, input: PlaygroundWsEchoInput): LesslyStream =>
9
+ sdk.openStream(wsBindings['playground']!['ws']!['echo']!, input as Record<string, unknown>);
@@ -0,0 +1,4 @@
1
+ // AUTOGENERATED by scripts/generate.ts — do not edit.
2
+ export * from './queryOptions.gen';
3
+ export * from './connect.gen';
4
+ export type { PlaygroundAnalyticsOverviewInput, PlaygroundAnalyticsOverviewOutput, PlaygroundBillingEntitlementsInput, PlaygroundBillingEntitlementsOutput, PlaygroundBillingRecordUsageInput, PlaygroundBillingRecordUsageOutput, PlaygroundClickupCreateTaskInput, PlaygroundClickupCreateTaskOutput, PlaygroundClickupGetLastWebhookInput, PlaygroundClickupGetLastWebhookOutput, PlaygroundClickupGetOverviewInput, PlaygroundClickupGetOverviewOutput, PlaygroundGdriveGetLastChangeInput, PlaygroundGdriveGetLastChangeOutput, PlaygroundGdriveReadFileInput, PlaygroundGdriveReadFileOutput, PlaygroundGoogleadsReadCustomerInput, PlaygroundGoogleadsReadCustomerOutput, PlaygroundLifecycleGetStateInput, PlaygroundLifecycleGetStateOutput, PlaygroundLifecycleListEventsInput, PlaygroundLifecycleListEventsOutput, PlaygroundWebhookGetLastInput, PlaygroundWebhookGetLastOutput, PlaygroundWsEchoInput } from '../types.gen';
@@ -0,0 +1,86 @@
1
+ // AUTOGENERATED by scripts/generate.ts — do not edit.
2
+ import type { GeneratedClient } from '../client.gen';
3
+ import type {
4
+ PlaygroundAnalyticsOverviewInput,
5
+ PlaygroundAnalyticsOverviewOutput,
6
+ PlaygroundBillingEntitlementsInput,
7
+ PlaygroundBillingEntitlementsOutput,
8
+ PlaygroundBillingRecordUsageInput,
9
+ PlaygroundClickupCreateTaskInput,
10
+ PlaygroundClickupGetLastWebhookInput,
11
+ PlaygroundClickupGetLastWebhookOutput,
12
+ PlaygroundClickupGetOverviewInput,
13
+ PlaygroundClickupGetOverviewOutput,
14
+ PlaygroundGdriveGetLastChangeInput,
15
+ PlaygroundGdriveGetLastChangeOutput,
16
+ PlaygroundGdriveReadFileInput,
17
+ PlaygroundGdriveReadFileOutput,
18
+ PlaygroundGoogleadsReadCustomerInput,
19
+ PlaygroundGoogleadsReadCustomerOutput,
20
+ PlaygroundLifecycleGetStateInput,
21
+ PlaygroundLifecycleGetStateOutput,
22
+ PlaygroundLifecycleListEventsInput,
23
+ PlaygroundLifecycleListEventsOutput,
24
+ PlaygroundWebhookGetLastInput,
25
+ PlaygroundWebhookGetLastOutput,
26
+ } from '../types.gen';
27
+
28
+ export const playgroundAnalyticsOverviewQueryOptions = (sdk: GeneratedClient, input: PlaygroundAnalyticsOverviewInput) => ({
29
+ queryKey: ['playground', 'analytics', 'overview', input] as const,
30
+ queryFn: () => sdk['playground']['analytics']['overview'](input),
31
+ });
32
+
33
+ export const playgroundBillingEntitlementsQueryOptions = (sdk: GeneratedClient, input: PlaygroundBillingEntitlementsInput) => ({
34
+ queryKey: ['playground', 'billing', 'entitlements', input] as const,
35
+ queryFn: () => sdk['playground']['billing']['entitlements'](input),
36
+ });
37
+
38
+ export const playgroundBillingRecordUsageMutationOptions = (sdk: GeneratedClient) => ({
39
+ mutationKey: ['playground', 'billing', 'record-usage'],
40
+ mutationFn: (input: PlaygroundBillingRecordUsageInput) => sdk['playground']['billing']['record-usage'](input),
41
+ });
42
+
43
+ export const playgroundClickupCreateTaskMutationOptions = (sdk: GeneratedClient) => ({
44
+ mutationKey: ['playground', 'clickup', 'create-task'],
45
+ mutationFn: (input: PlaygroundClickupCreateTaskInput) => sdk['playground']['clickup']['create-task'](input),
46
+ });
47
+
48
+ export const playgroundClickupGetLastWebhookQueryOptions = (sdk: GeneratedClient, input: PlaygroundClickupGetLastWebhookInput) => ({
49
+ queryKey: ['playground', 'clickup', 'get-last-webhook', input] as const,
50
+ queryFn: () => sdk['playground']['clickup']['get-last-webhook'](input),
51
+ });
52
+
53
+ export const playgroundClickupGetOverviewQueryOptions = (sdk: GeneratedClient, input: PlaygroundClickupGetOverviewInput) => ({
54
+ queryKey: ['playground', 'clickup', 'get-overview', input] as const,
55
+ queryFn: () => sdk['playground']['clickup']['get-overview'](input),
56
+ });
57
+
58
+ export const playgroundGdriveGetLastChangeQueryOptions = (sdk: GeneratedClient, input: PlaygroundGdriveGetLastChangeInput) => ({
59
+ queryKey: ['playground', 'gdrive', 'get-last-change', input] as const,
60
+ queryFn: () => sdk['playground']['gdrive']['get-last-change'](input),
61
+ });
62
+
63
+ export const playgroundGdriveReadFileQueryOptions = (sdk: GeneratedClient, input: PlaygroundGdriveReadFileInput) => ({
64
+ queryKey: ['playground', 'gdrive', 'read-file', input] as const,
65
+ queryFn: () => sdk['playground']['gdrive']['read-file'](input),
66
+ });
67
+
68
+ export const playgroundGoogleadsReadCustomerQueryOptions = (sdk: GeneratedClient, input: PlaygroundGoogleadsReadCustomerInput) => ({
69
+ queryKey: ['playground', 'googleads', 'read-customer', input] as const,
70
+ queryFn: () => sdk['playground']['googleads']['read-customer'](input),
71
+ });
72
+
73
+ export const playgroundLifecycleGetStateQueryOptions = (sdk: GeneratedClient, input: PlaygroundLifecycleGetStateInput) => ({
74
+ queryKey: ['playground', 'lifecycle', 'get-state', input] as const,
75
+ queryFn: () => sdk['playground']['lifecycle']['get-state'](input),
76
+ });
77
+
78
+ export const playgroundLifecycleListEventsQueryOptions = (sdk: GeneratedClient, input: PlaygroundLifecycleListEventsInput) => ({
79
+ queryKey: ['playground', 'lifecycle', 'list-events', input] as const,
80
+ queryFn: () => sdk['playground']['lifecycle']['list-events'](input),
81
+ });
82
+
83
+ export const playgroundWebhookGetLastQueryOptions = (sdk: GeneratedClient, input: PlaygroundWebhookGetLastInput) => ({
84
+ queryKey: ['playground', 'webhook', 'get-last', input] as const,
85
+ queryFn: () => sdk['playground']['webhook']['get-last'](input),
86
+ });