@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.
package/dist/index.cjs CHANGED
@@ -10,7 +10,7 @@ var LesslyApiError = class extends Error {
10
10
  status;
11
11
  code;
12
12
  body;
13
- /** True iff this is the gateway refusing the call over the caller's access. See ACCESS_DENIED_CODES. */
13
+ /** True for the three neutral gateway 403 refusals. See `isAccessDenied`. */
14
14
  accessDenied;
15
15
  constructor(status, code, message, body) {
16
16
  super(message);
@@ -33,6 +33,19 @@ function isAccessDenied(err) {
33
33
  const { status, code } = err;
34
34
  return status === 403 && typeof code === "string" && ACCESS_DENIED_CODES.has(code);
35
35
  }
36
+ function accessDenialKind(err) {
37
+ if (typeof err !== "object" || err === null) return null;
38
+ const { status, code } = err;
39
+ if (status !== 403) return null;
40
+ switch (code) {
41
+ case "role_denied":
42
+ case "no_tool_permission":
43
+ case "operation_uncatalogued":
44
+ return code;
45
+ default:
46
+ return null;
47
+ }
48
+ }
36
49
  var ENTITLEMENT_ERRORS = /* @__PURE__ */ new Set(["entitlement_exhausted", "entitlement_unavailable"]);
37
50
  function entitlementRefusal(err) {
38
51
  if (typeof err !== "object" || err === null) return null;
@@ -7726,213 +7739,6 @@ var bindings = {
7726
7739
  }
7727
7740
  }
7728
7741
  },
7729
- "playground": {
7730
- "analytics": {
7731
- "overview": {
7732
- "level": "read",
7733
- "method": "POST",
7734
- "operationKey": "playground_analytics_overview",
7735
- "params": [
7736
- {
7737
- "in": "body",
7738
- "name": "limit"
7739
- }
7740
- ],
7741
- "path": "/playground/analytics/overview",
7742
- "readOnly": true
7743
- }
7744
- },
7745
- "billing": {
7746
- "entitlements": {
7747
- "level": "read",
7748
- "method": "POST",
7749
- "operationKey": "playground_billing_entitlements",
7750
- "path": "/playground/billing/entitlements",
7751
- "readOnly": true
7752
- },
7753
- "record-usage": {
7754
- "level": "write",
7755
- "method": "POST",
7756
- "operationKey": "playground_billing_record-usage",
7757
- "params": [
7758
- {
7759
- "in": "body",
7760
- "name": "value"
7761
- }
7762
- ],
7763
- "path": "/playground/billing/usage",
7764
- "readOnly": false
7765
- }
7766
- },
7767
- "clickup": {
7768
- "create-task": {
7769
- "level": "write",
7770
- "method": "POST",
7771
- "operationKey": "playground_clickup_create-task",
7772
- "params": [
7773
- {
7774
- "in": "body",
7775
- "name": "listId"
7776
- },
7777
- {
7778
- "in": "body",
7779
- "name": "name"
7780
- }
7781
- ],
7782
- "path": "/playground/clickup/tasks",
7783
- "readOnly": false
7784
- },
7785
- "get-last-webhook": {
7786
- "level": "read",
7787
- "method": "GET",
7788
- "operationKey": "playground_clickup_get-last-webhook",
7789
- "path": "/playground/clickup/webhooks/last",
7790
- "readOnly": true
7791
- },
7792
- "get-overview": {
7793
- "level": "read",
7794
- "method": "GET",
7795
- "operationKey": "playground_clickup_get-overview",
7796
- "path": "/playground/clickup/overview",
7797
- "readOnly": true
7798
- }
7799
- },
7800
- "echo": {
7801
- "ping": {
7802
- "level": "read",
7803
- "method": "POST",
7804
- "operationKey": "playground_echo_ping",
7805
- "params": [
7806
- {
7807
- "in": "body",
7808
- "name": "message"
7809
- }
7810
- ],
7811
- "path": "/playground/echo/ping",
7812
- "readOnly": true
7813
- }
7814
- },
7815
- "gdrive": {
7816
- "get-last-change": {
7817
- "level": "read",
7818
- "method": "GET",
7819
- "operationKey": "playground_gdrive_get-last-change",
7820
- "path": "/playground/gdrive/changes/last",
7821
- "readOnly": true
7822
- },
7823
- "read-file": {
7824
- "level": "read",
7825
- "method": "POST",
7826
- "operationKey": "playground_gdrive_read-file",
7827
- "params": [
7828
- {
7829
- "in": "body",
7830
- "name": "fileId"
7831
- }
7832
- ],
7833
- "path": "/playground/gdrive/file",
7834
- "readOnly": true
7835
- }
7836
- },
7837
- "googleads": {
7838
- "read-customer": {
7839
- "level": "read",
7840
- "method": "POST",
7841
- "operationKey": "playground_googleads_read-customer",
7842
- "path": "/playground/googleads/customer",
7843
- "readOnly": true
7844
- }
7845
- },
7846
- "lifecycle": {
7847
- "get-state": {
7848
- "level": "read",
7849
- "method": "GET",
7850
- "operationKey": "playground_lifecycle_get-state",
7851
- "path": "/playground/lifecycle/state",
7852
- "readOnly": true
7853
- },
7854
- "list-events": {
7855
- "level": "read",
7856
- "method": "GET",
7857
- "operationKey": "playground_lifecycle_list-events",
7858
- "path": "/playground/lifecycle/events",
7859
- "readOnly": true
7860
- }
7861
- },
7862
- "webhook": {
7863
- "get-last": {
7864
- "level": "read",
7865
- "method": "GET",
7866
- "operationKey": "playground_webhook_get-last",
7867
- "path": "/playground/webhooks/last",
7868
- "readOnly": true
7869
- }
7870
- },
7871
- "workflow": {
7872
- "echo": {
7873
- "level": "write",
7874
- "method": "POST",
7875
- "operationKey": "playground_workflow_echo",
7876
- "params": [
7877
- {
7878
- "in": "body",
7879
- "name": "note"
7880
- },
7881
- {
7882
- "in": "body",
7883
- "name": "tags"
7884
- }
7885
- ],
7886
- "path": "/playground/workflow/echo",
7887
- "readOnly": false
7888
- },
7889
- "echo-list": {
7890
- "level": "read",
7891
- "method": "GET",
7892
- "operationKey": "playground_workflow_echo-list",
7893
- "path": "/playground/workflow/echoes",
7894
- "readOnly": true
7895
- },
7896
- "ping": {
7897
- "level": "write",
7898
- "method": "POST",
7899
- "operationKey": "playground_workflow_ping",
7900
- "params": [
7901
- {
7902
- "in": "body",
7903
- "name": "kind"
7904
- }
7905
- ],
7906
- "path": "/playground/workflow/ping",
7907
- "readOnly": false
7908
- },
7909
- "subjects-list": {
7910
- "level": "read",
7911
- "method": "GET",
7912
- "operationKey": "playground_workflow_subjects-list",
7913
- "params": [
7914
- {
7915
- "in": "query",
7916
- "name": "last_activity_before"
7917
- },
7918
- {
7919
- "in": "query",
7920
- "name": "last_activity_after"
7921
- },
7922
- {
7923
- "in": "query",
7924
- "name": "limit"
7925
- },
7926
- {
7927
- "in": "query",
7928
- "name": "cursor"
7929
- }
7930
- ],
7931
- "path": "/playground/workflow/subjects",
7932
- "readOnly": true
7933
- }
7934
- }
7935
- },
7936
7742
  "realtime": {
7937
7743
  "archive": {
7938
7744
  "export": {
@@ -12418,23 +12224,6 @@ var operations = {
12418
12224
  "organization_support_threads_list": "read",
12419
12225
  "organization_x_install": "read",
12420
12226
  "organization_youtube_install": "read",
12421
- "playground_analytics_overview": "read",
12422
- "playground_billing_entitlements": "read",
12423
- "playground_billing_record-usage": "write",
12424
- "playground_clickup_create-task": "write",
12425
- "playground_clickup_get-last-webhook": "read",
12426
- "playground_clickup_get-overview": "read",
12427
- "playground_echo_ping": "read",
12428
- "playground_gdrive_get-last-change": "read",
12429
- "playground_gdrive_read-file": "read",
12430
- "playground_googleads_read-customer": "read",
12431
- "playground_lifecycle_get-state": "read",
12432
- "playground_lifecycle_list-events": "read",
12433
- "playground_webhook_get-last": "read",
12434
- "playground_workflow_echo": "write",
12435
- "playground_workflow_echo-list": "read",
12436
- "playground_workflow_ping": "write",
12437
- "playground_workflow_subjects-list": "read",
12438
12227
  "realtime_archive_export": "admin",
12439
12228
  "realtime_archive_export_status": "read",
12440
12229
  "realtime_archive_get": "read",
@@ -12719,9 +12508,6 @@ var compositions = {
12719
12508
  "mail_template_unarchive": { "label": "Unarchive template", "options": { "id": "mail_template_list" } },
12720
12509
  "mail_template_update": { "label": "Update template", "options": { "id": "mail_template_list" } },
12721
12510
  "mail_usage_get": { "label": "Get usage" },
12722
- "playground_workflow_echo": { "pii": ["input.note", "output.note"], "label": "Store workflow echo", "completion_event": "playground/workflow.echoed" },
12723
- "playground_workflow_ping": { "label": "Fire workflow ping", "completion_event": "playground/workflow.ping" },
12724
- "playground_workflow_subjects-list": { "pii": ["output.items[].display_name"], "label": "List workflow subjects" },
12725
12511
  "support_agent_create": { "pii": ["input.lesslyUserId", "output.lesslyUserId"], "label": "Create agent" },
12726
12512
  "support_agent_get": { "pii": ["output.lesslyUserId"], "label": "Get agent", "options": { "id": "support_agent_list" } },
12727
12513
  "support_agent_list": { "pii": ["output.agents[].lesslyUserId"], "label": "List agents" },
@@ -13081,6 +12867,7 @@ var operations2 = operations;
13081
12867
  var compositions2 = compositions;
13082
12868
 
13083
12869
  exports.LesslyApiError = LesslyApiError;
12870
+ exports.accessDenialKind = accessDenialKind;
13084
12871
  exports.accessReason = accessReason;
13085
12872
  exports.compositions = compositions2;
13086
12873
  exports.connectStream = connectStream;