@lessly/sdk-app 97.2.0 → 97.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.
@@ -615,11 +615,19 @@ function DomainList({ app }: { app: App }) {
615
615
  ```
616
616
 
617
617
  Put that branch in your shared query-state component once, rather than in every
618
- screen. `isAccessDenied` is true for exactly the three gateway codes that mean
619
- *the caller's access was the reason* — `role_denied`,
620
- `operation_uncatalogued`, `no_tool_permission` — and false for every other 403.
621
- A `tenant_blocked` 403 is not a permission problem and must not be rendered as
622
- one: it sends the user to an admin who can do nothing about it.
618
+ screen. `isAccessDenied` is true for exactly three gateway 403 codes:
619
+ `role_denied` and `no_tool_permission` are permission decisions, while
620
+ `operation_uncatalogued` means the operation is missing from the catalog or
621
+ still rolling out. The user cannot fix that catalog state by asking for a grant.
622
+ All three get the same neutral user-facing state; other 403s do not. A
623
+ `tenant_blocked` 403, for example, is not a permission problem and must not be
624
+ rendered as one.
625
+
626
+ Use `accessDenialKind(error)` when telemetry or a developer-only hint needs to
627
+ distinguish the catalog case. It returns one of those three codes for a matching
628
+ 403, or `null` for anything else. An `operation_uncatalogued` hint can tell a
629
+ developer to re-register the toolkit; never choose different user-facing denial
630
+ copy from the kind.
623
631
 
624
632
  **Never render an access denial in red.** A permission boundary is expected,
625
633
  frequent and not the user's mistake. Painting it as a crash teaches people to
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lessly/sdk-app",
3
3
  "description": "The Lessly SDK for App is a TypeScript SDK that provides runtime bindings and type-safe generated code for interacting with Lessly Platform APIs and services. This package generates type definitions and client bindings from API catalogs, enabling developers to build applications that consume Lessly platform services with full type safety and autocompletion.",
4
- "version": "97.2.0",
4
+ "version": "97.4.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/lepsto/lepsto-sdk-app.git"
@@ -159,16 +159,6 @@
159
159
  "default": "./dist/organization/index.cjs"
160
160
  }
161
161
  },
162
- "./playground": {
163
- "import": {
164
- "types": "./dist/playground/index.d.ts",
165
- "default": "./dist/playground/index.js"
166
- },
167
- "require": {
168
- "types": "./dist/playground/index.d.cts",
169
- "default": "./dist/playground/index.cjs"
170
- }
171
- },
172
162
  "./realtime": {
173
163
  "import": {
174
164
  "types": "./dist/realtime/index.d.ts",
@@ -220,5 +210,5 @@
220
210
  }
221
211
  }
222
212
  },
223
- "sdkContentHash": "sha256:1d8d62701a944d328c4e6c779f03f701695a81dbc3e07cc5f948fb753c2b0506"
213
+ "sdkContentHash": "sha256:e171b97bec894bde988230050eceb40ce843222b63409427346a40159ec50460"
224
214
  }
@@ -7488,213 +7488,6 @@ export const bindings: BindingsMap = {
7488
7488
  }
7489
7489
  }
7490
7490
  },
7491
- "playground": {
7492
- "analytics": {
7493
- "overview": {
7494
- "level": "read",
7495
- "method": "POST",
7496
- "operationKey": "playground_analytics_overview",
7497
- "params": [
7498
- {
7499
- "in": "body",
7500
- "name": "limit"
7501
- }
7502
- ],
7503
- "path": "/playground/analytics/overview",
7504
- "readOnly": true
7505
- }
7506
- },
7507
- "billing": {
7508
- "entitlements": {
7509
- "level": "read",
7510
- "method": "POST",
7511
- "operationKey": "playground_billing_entitlements",
7512
- "path": "/playground/billing/entitlements",
7513
- "readOnly": true
7514
- },
7515
- "record-usage": {
7516
- "level": "write",
7517
- "method": "POST",
7518
- "operationKey": "playground_billing_record-usage",
7519
- "params": [
7520
- {
7521
- "in": "body",
7522
- "name": "value"
7523
- }
7524
- ],
7525
- "path": "/playground/billing/usage",
7526
- "readOnly": false
7527
- }
7528
- },
7529
- "clickup": {
7530
- "create-task": {
7531
- "level": "write",
7532
- "method": "POST",
7533
- "operationKey": "playground_clickup_create-task",
7534
- "params": [
7535
- {
7536
- "in": "body",
7537
- "name": "listId"
7538
- },
7539
- {
7540
- "in": "body",
7541
- "name": "name"
7542
- }
7543
- ],
7544
- "path": "/playground/clickup/tasks",
7545
- "readOnly": false
7546
- },
7547
- "get-last-webhook": {
7548
- "level": "read",
7549
- "method": "GET",
7550
- "operationKey": "playground_clickup_get-last-webhook",
7551
- "path": "/playground/clickup/webhooks/last",
7552
- "readOnly": true
7553
- },
7554
- "get-overview": {
7555
- "level": "read",
7556
- "method": "GET",
7557
- "operationKey": "playground_clickup_get-overview",
7558
- "path": "/playground/clickup/overview",
7559
- "readOnly": true
7560
- }
7561
- },
7562
- "echo": {
7563
- "ping": {
7564
- "level": "read",
7565
- "method": "POST",
7566
- "operationKey": "playground_echo_ping",
7567
- "params": [
7568
- {
7569
- "in": "body",
7570
- "name": "message"
7571
- }
7572
- ],
7573
- "path": "/playground/echo/ping",
7574
- "readOnly": true
7575
- }
7576
- },
7577
- "gdrive": {
7578
- "get-last-change": {
7579
- "level": "read",
7580
- "method": "GET",
7581
- "operationKey": "playground_gdrive_get-last-change",
7582
- "path": "/playground/gdrive/changes/last",
7583
- "readOnly": true
7584
- },
7585
- "read-file": {
7586
- "level": "read",
7587
- "method": "POST",
7588
- "operationKey": "playground_gdrive_read-file",
7589
- "params": [
7590
- {
7591
- "in": "body",
7592
- "name": "fileId"
7593
- }
7594
- ],
7595
- "path": "/playground/gdrive/file",
7596
- "readOnly": true
7597
- }
7598
- },
7599
- "googleads": {
7600
- "read-customer": {
7601
- "level": "read",
7602
- "method": "POST",
7603
- "operationKey": "playground_googleads_read-customer",
7604
- "path": "/playground/googleads/customer",
7605
- "readOnly": true
7606
- }
7607
- },
7608
- "lifecycle": {
7609
- "get-state": {
7610
- "level": "read",
7611
- "method": "GET",
7612
- "operationKey": "playground_lifecycle_get-state",
7613
- "path": "/playground/lifecycle/state",
7614
- "readOnly": true
7615
- },
7616
- "list-events": {
7617
- "level": "read",
7618
- "method": "GET",
7619
- "operationKey": "playground_lifecycle_list-events",
7620
- "path": "/playground/lifecycle/events",
7621
- "readOnly": true
7622
- }
7623
- },
7624
- "webhook": {
7625
- "get-last": {
7626
- "level": "read",
7627
- "method": "GET",
7628
- "operationKey": "playground_webhook_get-last",
7629
- "path": "/playground/webhooks/last",
7630
- "readOnly": true
7631
- }
7632
- },
7633
- "workflow": {
7634
- "echo": {
7635
- "level": "write",
7636
- "method": "POST",
7637
- "operationKey": "playground_workflow_echo",
7638
- "params": [
7639
- {
7640
- "in": "body",
7641
- "name": "note"
7642
- },
7643
- {
7644
- "in": "body",
7645
- "name": "tags"
7646
- }
7647
- ],
7648
- "path": "/playground/workflow/echo",
7649
- "readOnly": false
7650
- },
7651
- "echo-list": {
7652
- "level": "read",
7653
- "method": "GET",
7654
- "operationKey": "playground_workflow_echo-list",
7655
- "path": "/playground/workflow/echoes",
7656
- "readOnly": true
7657
- },
7658
- "ping": {
7659
- "level": "write",
7660
- "method": "POST",
7661
- "operationKey": "playground_workflow_ping",
7662
- "params": [
7663
- {
7664
- "in": "body",
7665
- "name": "kind"
7666
- }
7667
- ],
7668
- "path": "/playground/workflow/ping",
7669
- "readOnly": false
7670
- },
7671
- "subjects-list": {
7672
- "level": "read",
7673
- "method": "GET",
7674
- "operationKey": "playground_workflow_subjects-list",
7675
- "params": [
7676
- {
7677
- "in": "query",
7678
- "name": "last_activity_before"
7679
- },
7680
- {
7681
- "in": "query",
7682
- "name": "last_activity_after"
7683
- },
7684
- {
7685
- "in": "query",
7686
- "name": "limit"
7687
- },
7688
- {
7689
- "in": "query",
7690
- "name": "cursor"
7691
- }
7692
- ],
7693
- "path": "/playground/workflow/subjects",
7694
- "readOnly": true
7695
- }
7696
- }
7697
- },
7698
7491
  "realtime": {
7699
7492
  "archive": {
7700
7493
  "export": {
@@ -11776,12 +11569,4 @@ export const bindings: BindingsMap = {
11776
11569
  }
11777
11570
  };
11778
11571
 
11779
- export const wsBindings: WsBindingsMap = {
11780
- "playground": {
11781
- "ws": {
11782
- "echo": {
11783
- "path": "/playground/ws/echo"
11784
- }
11785
- }
11786
- }
11787
- };
11572
+ export const wsBindings: WsBindingsMap = {};
@@ -805,40 +805,6 @@ import type {
805
805
  OrganizationXInstallOutput,
806
806
  OrganizationYoutubeInstallInput,
807
807
  OrganizationYoutubeInstallOutput,
808
- PlaygroundAnalyticsOverviewInput,
809
- PlaygroundAnalyticsOverviewOutput,
810
- PlaygroundBillingEntitlementsInput,
811
- PlaygroundBillingEntitlementsOutput,
812
- PlaygroundBillingRecordUsageInput,
813
- PlaygroundBillingRecordUsageOutput,
814
- PlaygroundClickupCreateTaskInput,
815
- PlaygroundClickupCreateTaskOutput,
816
- PlaygroundClickupGetLastWebhookInput,
817
- PlaygroundClickupGetLastWebhookOutput,
818
- PlaygroundClickupGetOverviewInput,
819
- PlaygroundClickupGetOverviewOutput,
820
- PlaygroundEchoPingInput,
821
- PlaygroundEchoPingOutput,
822
- PlaygroundGdriveGetLastChangeInput,
823
- PlaygroundGdriveGetLastChangeOutput,
824
- PlaygroundGdriveReadFileInput,
825
- PlaygroundGdriveReadFileOutput,
826
- PlaygroundGoogleadsReadCustomerInput,
827
- PlaygroundGoogleadsReadCustomerOutput,
828
- PlaygroundLifecycleGetStateInput,
829
- PlaygroundLifecycleGetStateOutput,
830
- PlaygroundLifecycleListEventsInput,
831
- PlaygroundLifecycleListEventsOutput,
832
- PlaygroundWebhookGetLastInput,
833
- PlaygroundWebhookGetLastOutput,
834
- PlaygroundWorkflowEchoInput,
835
- PlaygroundWorkflowEchoListInput,
836
- PlaygroundWorkflowEchoListOutput,
837
- PlaygroundWorkflowEchoOutput,
838
- PlaygroundWorkflowPingInput,
839
- PlaygroundWorkflowPingOutput,
840
- PlaygroundWorkflowSubjectsListInput,
841
- PlaygroundWorkflowSubjectsListOutput,
842
808
  RealtimeArchiveExportInput,
843
809
  RealtimeArchiveExportOutput,
844
810
  RealtimeArchiveExportStatusInput,
@@ -1976,43 +1942,6 @@ export interface GeneratedClient {
1976
1942
  install: ((input: OrganizationYoutubeInstallInput) => Promise<OrganizationYoutubeInstallOutput>) & Operation;
1977
1943
  };
1978
1944
  };
1979
- playground: {
1980
- analytics: {
1981
- overview: ((input: PlaygroundAnalyticsOverviewInput) => Promise<PlaygroundAnalyticsOverviewOutput>) & Operation;
1982
- };
1983
- billing: {
1984
- entitlements: ((input: PlaygroundBillingEntitlementsInput) => Promise<PlaygroundBillingEntitlementsOutput>) & Operation;
1985
- 'record-usage': ((input: PlaygroundBillingRecordUsageInput) => Promise<PlaygroundBillingRecordUsageOutput>) & Operation;
1986
- };
1987
- clickup: {
1988
- 'create-task': ((input: PlaygroundClickupCreateTaskInput) => Promise<PlaygroundClickupCreateTaskOutput>) & Operation;
1989
- 'get-last-webhook': ((input: PlaygroundClickupGetLastWebhookInput) => Promise<PlaygroundClickupGetLastWebhookOutput>) & Operation;
1990
- 'get-overview': ((input: PlaygroundClickupGetOverviewInput) => Promise<PlaygroundClickupGetOverviewOutput>) & Operation;
1991
- };
1992
- echo: {
1993
- ping: ((input: PlaygroundEchoPingInput) => Promise<PlaygroundEchoPingOutput>) & Operation;
1994
- };
1995
- gdrive: {
1996
- 'get-last-change': ((input: PlaygroundGdriveGetLastChangeInput) => Promise<PlaygroundGdriveGetLastChangeOutput>) & Operation;
1997
- 'read-file': ((input: PlaygroundGdriveReadFileInput) => Promise<PlaygroundGdriveReadFileOutput>) & Operation;
1998
- };
1999
- googleads: {
2000
- 'read-customer': ((input: PlaygroundGoogleadsReadCustomerInput) => Promise<PlaygroundGoogleadsReadCustomerOutput>) & Operation;
2001
- };
2002
- lifecycle: {
2003
- 'get-state': ((input: PlaygroundLifecycleGetStateInput) => Promise<PlaygroundLifecycleGetStateOutput>) & Operation;
2004
- 'list-events': ((input: PlaygroundLifecycleListEventsInput) => Promise<PlaygroundLifecycleListEventsOutput>) & Operation;
2005
- };
2006
- webhook: {
2007
- 'get-last': ((input: PlaygroundWebhookGetLastInput) => Promise<PlaygroundWebhookGetLastOutput>) & Operation;
2008
- };
2009
- workflow: {
2010
- echo: ((input: PlaygroundWorkflowEchoInput) => Promise<PlaygroundWorkflowEchoOutput>) & Operation;
2011
- 'echo-list': ((input: PlaygroundWorkflowEchoListInput) => Promise<PlaygroundWorkflowEchoListOutput>) & Operation;
2012
- ping: ((input: PlaygroundWorkflowPingInput) => Promise<PlaygroundWorkflowPingOutput>) & Operation;
2013
- 'subjects-list': ((input: PlaygroundWorkflowSubjectsListInput) => Promise<PlaygroundWorkflowSubjectsListOutput>) & Operation;
2014
- };
2015
- };
2016
1945
  realtime: {
2017
1946
  archive: {
2018
1947
  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, ToolComposition } from '../runtime/types';
3
3
 
4
- export const namespaces = ['analytics', 'brain', 'consent', 'content', 'deployment', 'mail', 'observe', 'organization', 'playground', 'realtime', 'support', 'tracking', 'users', 'workflow'] as const;
4
+ export const namespaces = ['analytics', 'brain', 'consent', 'content', 'deployment', 'mail', 'observe', 'organization', 'realtime', 'support', 'tracking', 'users', 'workflow'] as const;
5
5
 
6
6
  export const operations: Record<string, ToolLevel> = {
7
7
  'analytics_catalog_get': 'read',
@@ -406,23 +406,6 @@ export const operations: Record<string, ToolLevel> = {
406
406
  'organization_support_threads_list': 'read',
407
407
  'organization_x_install': 'read',
408
408
  'organization_youtube_install': 'read',
409
- 'playground_analytics_overview': 'read',
410
- 'playground_billing_entitlements': 'read',
411
- 'playground_billing_record-usage': 'write',
412
- 'playground_clickup_create-task': 'write',
413
- 'playground_clickup_get-last-webhook': 'read',
414
- 'playground_clickup_get-overview': 'read',
415
- 'playground_echo_ping': 'read',
416
- 'playground_gdrive_get-last-change': 'read',
417
- 'playground_gdrive_read-file': 'read',
418
- 'playground_googleads_read-customer': 'read',
419
- 'playground_lifecycle_get-state': 'read',
420
- 'playground_lifecycle_list-events': 'read',
421
- 'playground_webhook_get-last': 'read',
422
- 'playground_workflow_echo': 'write',
423
- 'playground_workflow_echo-list': 'read',
424
- 'playground_workflow_ping': 'write',
425
- 'playground_workflow_subjects-list': 'read',
426
409
  'realtime_archive_export': 'admin',
427
410
  'realtime_archive_export_status': 'read',
428
411
  'realtime_archive_get': 'read',
@@ -708,9 +691,6 @@ export const compositions: Record<string, ToolComposition> = {
708
691
  'mail_template_unarchive': {"label":"Unarchive template","options":{"id":"mail_template_list"}},
709
692
  'mail_template_update': {"label":"Update template","options":{"id":"mail_template_list"}},
710
693
  'mail_usage_get': {"label":"Get usage"},
711
- 'playground_workflow_echo': {"pii":["input.note","output.note"],"label":"Store workflow echo","completion_event":"playground/workflow.echoed"},
712
- 'playground_workflow_ping': {"label":"Fire workflow ping","completion_event":"playground/workflow.ping"},
713
- 'playground_workflow_subjects-list': {"pii":["output.items[].display_name"],"label":"List workflow subjects"},
714
694
  'support_agent_create': {"pii":["input.lesslyUserId","output.lesslyUserId"],"label":"Create agent"},
715
695
  'support_agent_get': {"pii":["output.lesslyUserId"],"label":"Get agent","options":{"id":"support_agent_list"}},
716
696
  'support_agent_list': {"pii":["output.agents[].lesslyUserId"],"label":"List agents"},