@gravity-rail/sdk 2.0.0 → 3.1.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 (38) hide show
  1. package/README.md +18 -9
  2. package/dist/{chat-interaction-CGDgA4K_.d.cts → chat-interaction-ClNfn1UV.d.cts} +1997 -850
  3. package/dist/{chat-interaction-DjV6mYaY.d.ts → chat-interaction-DwH4z1qk.d.ts} +1997 -850
  4. package/dist/{chunk-SVRE6KIM.js → chunk-ANVLMZLD.js} +496 -104
  5. package/dist/chunk-ANVLMZLD.js.map +1 -0
  6. package/dist/{chunk-GCN4OMYU.js → chunk-RLFS7O2L.js} +4 -1
  7. package/dist/{chunk-GCN4OMYU.js.map → chunk-RLFS7O2L.js.map} +1 -1
  8. package/dist/helpers.cjs.map +1 -1
  9. package/dist/helpers.d.cts +6 -4
  10. package/dist/helpers.d.ts +6 -4
  11. package/dist/helpers.js +1 -1
  12. package/dist/helpers.js.map +1 -1
  13. package/dist/index.cjs +535 -125
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +26 -10
  16. package/dist/index.d.ts +26 -10
  17. package/dist/index.js +39 -25
  18. package/dist/index.js.map +1 -1
  19. package/dist/internal.cjs +497 -102
  20. package/dist/internal.cjs.map +1 -1
  21. package/dist/internal.d.cts +99 -6
  22. package/dist/internal.d.ts +99 -6
  23. package/dist/internal.js +2 -2
  24. package/dist/internal.js.map +1 -1
  25. package/dist/{member-import-DVHDjWwi.d.ts → member-import-D-_eJBE7.d.ts} +1 -1
  26. package/dist/{member-import-C1IsFkQm.d.cts → member-import-IN06xJrR.d.cts} +1 -1
  27. package/dist/{path-Bd99SxC1.d.cts → path-D4S8xYyo.d.ts} +18 -3
  28. package/dist/{path-CZxFBfjw.d.ts → path-D_KPlBIr.d.cts} +18 -3
  29. package/dist/schemas.cjs +57 -6
  30. package/dist/schemas.cjs.map +1 -1
  31. package/dist/schemas.d.cts +111 -43
  32. package/dist/schemas.d.ts +111 -43
  33. package/dist/schemas.js +53 -6
  34. package/dist/schemas.js.map +1 -1
  35. package/dist/{tasks-C8TrcAV8.d.cts → tasks-C8sHnwH5.d.cts} +52 -11
  36. package/dist/{tasks-C8TrcAV8.d.ts → tasks-C8sHnwH5.d.ts} +52 -11
  37. package/package.json +4 -3
  38. package/dist/chunk-SVRE6KIM.js.map +0 -1
package/README.md CHANGED
@@ -430,8 +430,8 @@ empty and Member identifiers are null) when the caller cannot read stored
430
430
  values. Load values with a permitted record read after saving. Customer sign-in
431
431
  policies remain separate from record scopes.
432
432
 
433
- Managed themes use `workspace.createPage` with `title`, `slug`, and
434
- `contentMarkdown` for pages. Source Sites define application routes in their
433
+ Managed themes use `workspace.createPage` with `title` and
434
+ `contentMarkdown` for pages; `slug` is optional and derived from the title when omitted. Source Sites define application routes in their
435
435
  React code; creating a managed Page does not register a React route. For a
436
436
  verified custom domain, use
437
437
  `customDomain` in `createSite` or `updateSite`, following the
@@ -446,11 +446,24 @@ Workspace and organization directories return `{ items, page, pageSize, total, t
446
446
  most 100), and `search` to request a page. This applies to `getWorkspaces`,
447
447
  `getDeviceAdmissibleWorkspaces`, `getPublicWorkspaces`, `getMyOrganizations`, and
448
448
  `getOrganizationWorkspaceSummaries`.
449
+ `getOrganizationWorkspaceSummaries` also accepts `label`, an organization label
450
+ slug. It combines with search before pagination and requires `org:read` or
451
+ `org:webhooks`. Unknown slugs return an empty page. The filter preserves
452
+ organization and workspace membership limits.
449
453
  Organization member details no longer embed workspace lists; request organization
450
454
  workspace summary pages instead.
451
455
  `getMyOrganizations` also accepts `organizationSlug` for exact host resolution
452
456
  and `organizationUuids` (at most 100 UUIDs) for a bounded membership lookup. These
453
457
  filters only narrow the current account's memberships.
458
+ `getWorkspaceOrganizationDirectory({ page, pageSize, search, organizationUuid })`
459
+ returns one page of organizations reached through either an organization membership
460
+ or a ready workspace membership. Search includes organization name, slug, exact UUID,
461
+ and matching workspace name, slug or exact UUID. Each organization appears once.
462
+ `organizationUuid` limits results to that organization within the account's visible directory.
463
+ `matchesOrganizationSearch` identifies entries whose organization fields match,
464
+ so their workspace pages can stay unfiltered. Entries without an organization
465
+ membership have `role: null`; reading the directory
466
+ does not grant organization access. The default page size is 25, with a maximum of 100.
454
467
  Account and device workspace totals count eligible global membership candidates;
455
468
  workspace admission can make a page sparse or empty. Use pagination metadata to
456
469
  reach later candidates.
@@ -483,12 +496,8 @@ const config = await client.exportWorkspace(workspaceId);
483
496
  const preview = await client.previewWorkspaceImport(targetId, config);
484
497
  await client.importWorkspace(targetId, config);
485
498
 
486
- // White-label: provision client workspaces
487
- const clientWs = await client.createClientWorkspace(workspaceId, {
488
- name: 'Acme Corp',
489
- product_id: productId,
490
- });
491
- await client.provisionClientWorkspace(workspaceId, clientWs.id);
499
+ // White-label: provision an existing client workspace
500
+ await client.provisionClientWorkspace(workspaceId, existingClientWorkspaceId);
492
501
  ```
493
502
 
494
503
  ## Export Workflow revisions
@@ -566,7 +575,7 @@ import {
566
575
  resolveMemberId, // { memberId | phone | externalId } → member id
567
576
  findOrCreateMemberLabels, // idempotent label lookup/create → ids
568
577
  upsertDataRecordForMember,// idempotent member-scoped record write
569
- enrollMemberInJourney, // resolve member → tag → enroll (409 = already enrolled)
578
+ enrollMemberInJourney, // resolve member → tag → enroll (already enrolled is a no-op)
570
579
  // outbound calling
571
580
  findMemberByPhone,
572
581
  resolveOutboundPhoneNumberId,