@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.
package/dist/index.cjs CHANGED
@@ -7329,6 +7329,134 @@ var bindings = {
7329
7329
  }
7330
7330
  }
7331
7331
  },
7332
+ "playground": {
7333
+ "analytics": {
7334
+ "overview": {
7335
+ "level": "read",
7336
+ "method": "POST",
7337
+ "operationKey": "playground_analytics_overview",
7338
+ "params": [
7339
+ {
7340
+ "in": "body",
7341
+ "name": "limit"
7342
+ }
7343
+ ],
7344
+ "path": "/playground/analytics/overview",
7345
+ "readOnly": true
7346
+ }
7347
+ },
7348
+ "billing": {
7349
+ "entitlements": {
7350
+ "level": "read",
7351
+ "method": "POST",
7352
+ "operationKey": "playground_billing_entitlements",
7353
+ "path": "/playground/billing/entitlements",
7354
+ "readOnly": true
7355
+ },
7356
+ "record-usage": {
7357
+ "level": "write",
7358
+ "method": "POST",
7359
+ "operationKey": "playground_billing_record-usage",
7360
+ "params": [
7361
+ {
7362
+ "in": "body",
7363
+ "name": "value"
7364
+ }
7365
+ ],
7366
+ "path": "/playground/billing/usage",
7367
+ "readOnly": false
7368
+ }
7369
+ },
7370
+ "clickup": {
7371
+ "create-task": {
7372
+ "level": "write",
7373
+ "method": "POST",
7374
+ "operationKey": "playground_clickup_create-task",
7375
+ "params": [
7376
+ {
7377
+ "in": "body",
7378
+ "name": "listId"
7379
+ },
7380
+ {
7381
+ "in": "body",
7382
+ "name": "name"
7383
+ }
7384
+ ],
7385
+ "path": "/playground/clickup/tasks",
7386
+ "readOnly": false
7387
+ },
7388
+ "get-last-webhook": {
7389
+ "level": "read",
7390
+ "method": "GET",
7391
+ "operationKey": "playground_clickup_get-last-webhook",
7392
+ "path": "/playground/clickup/webhooks/last",
7393
+ "readOnly": true
7394
+ },
7395
+ "get-overview": {
7396
+ "level": "read",
7397
+ "method": "GET",
7398
+ "operationKey": "playground_clickup_get-overview",
7399
+ "path": "/playground/clickup/overview",
7400
+ "readOnly": true
7401
+ }
7402
+ },
7403
+ "gdrive": {
7404
+ "get-last-change": {
7405
+ "level": "read",
7406
+ "method": "GET",
7407
+ "operationKey": "playground_gdrive_get-last-change",
7408
+ "path": "/playground/gdrive/changes/last",
7409
+ "readOnly": true
7410
+ },
7411
+ "read-file": {
7412
+ "level": "read",
7413
+ "method": "POST",
7414
+ "operationKey": "playground_gdrive_read-file",
7415
+ "params": [
7416
+ {
7417
+ "in": "body",
7418
+ "name": "fileId"
7419
+ }
7420
+ ],
7421
+ "path": "/playground/gdrive/file",
7422
+ "readOnly": true
7423
+ }
7424
+ },
7425
+ "googleads": {
7426
+ "read-customer": {
7427
+ "level": "read",
7428
+ "method": "POST",
7429
+ "operationKey": "playground_googleads_read-customer",
7430
+ "path": "/playground/googleads/customer",
7431
+ "readOnly": true
7432
+ }
7433
+ },
7434
+ "lifecycle": {
7435
+ "get-state": {
7436
+ "level": "read",
7437
+ "method": "GET",
7438
+ "operationKey": "playground_lifecycle_get-state",
7439
+ "path": "/playground/lifecycle/state",
7440
+ "readOnly": true
7441
+ },
7442
+ "list-events": {
7443
+ "level": "read",
7444
+ "method": "GET",
7445
+ "operationKey": "playground_lifecycle_list-events",
7446
+ "path": "/playground/lifecycle/events",
7447
+ "readOnly": true
7448
+ }
7449
+ },
7450
+ "webhook": {
7451
+ "get-last": {
7452
+ "level": "read",
7453
+ "method": "GET",
7454
+ "operationKey": "playground_webhook_get-last",
7455
+ "path": "/playground/webhooks/last",
7456
+ "readOnly": true
7457
+ }
7458
+ }
7459
+ },
7332
7460
  "realtime": {
7333
7461
  "archive": {
7334
7462
  "export": {
@@ -10896,6 +11024,18 @@ var operations = {
10896
11024
  "organization_support_threads_list": "read",
10897
11025
  "organization_x_install": "read",
10898
11026
  "organization_youtube_install": "read",
11027
+ "playground_analytics_overview": "read",
11028
+ "playground_billing_entitlements": "read",
11029
+ "playground_billing_record-usage": "write",
11030
+ "playground_clickup_create-task": "write",
11031
+ "playground_clickup_get-last-webhook": "read",
11032
+ "playground_clickup_get-overview": "read",
11033
+ "playground_gdrive_get-last-change": "read",
11034
+ "playground_gdrive_read-file": "read",
11035
+ "playground_googleads_read-customer": "read",
11036
+ "playground_lifecycle_get-state": "read",
11037
+ "playground_lifecycle_list-events": "read",
11038
+ "playground_webhook_get-last": "read",
10899
11039
  "realtime_archive_export": "admin",
10900
11040
  "realtime_archive_export_status": "read",
10901
11041
  "realtime_archive_get": "read",
@@ -11263,8 +11403,30 @@ function createLesslyApp(opts) {
11263
11403
  }
11264
11404
 
11265
11405
  // src/runtime/access-reason.ts
11406
+ var LEVELS2 = ["read", "write", "admin"];
11407
+ var isNonEmptyString = (value) => typeof value === "string" && value.trim() !== "";
11408
+ var isLevel = (value) => typeof value === "string" && LEVELS2.includes(value);
11409
+ function warnDegenerate(input) {
11410
+ if (typeof process !== "undefined" && process.env?.NODE_ENV !== "production") {
11411
+ console.warn("accessReason: degenerate input", input);
11412
+ }
11413
+ }
11266
11414
  function accessReason(op) {
11267
- return typeof op === "string" ? `Requires access to ${op}. Ask an admin of this product.` : `Requires level:${op.level} (${op.operationKey}). Ask an admin of this product.`;
11415
+ if (isNonEmptyString(op)) {
11416
+ return `Requires access to ${op}. Ask an admin of this product.`;
11417
+ }
11418
+ if (op !== null && (typeof op === "object" || typeof op === "function")) {
11419
+ const { operationKey, level } = op;
11420
+ if (isNonEmptyString(operationKey)) {
11421
+ if (isLevel(level)) {
11422
+ return `Requires level:${level} (${operationKey}). Ask an admin of this product.`;
11423
+ }
11424
+ warnDegenerate(op);
11425
+ return `Requires access to ${operationKey}. Ask an admin of this product.`;
11426
+ }
11427
+ }
11428
+ warnDegenerate(op);
11429
+ return "Not available for your role. Ask an admin of this product.";
11268
11430
  }
11269
11431
 
11270
11432
  // src/runtime/operations.ts