@gravity-rail/sdk 2.0.0 → 3.0.1

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 +9 -9
  2. package/dist/{chat-interaction-CGDgA4K_.d.cts → chat-interaction-BPqj_KMO.d.cts} +1911 -850
  3. package/dist/{chat-interaction-DjV6mYaY.d.ts → chat-interaction-CDlei6KK.d.ts} +1911 -850
  4. package/dist/{chunk-SVRE6KIM.js → chunk-LWRMGN4Z.js} +449 -104
  5. package/dist/chunk-LWRMGN4Z.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 +488 -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 +450 -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-BbWJzHSV.d.ts} +1 -1
  26. package/dist/{member-import-C1IsFkQm.d.cts → member-import-DxBggQLc.d.cts} +1 -1
  27. package/dist/{path-Bd99SxC1.d.cts → path-5DteJvEx.d.ts} +16 -3
  28. package/dist/{path-CZxFBfjw.d.ts → path-bqfiH1XI.d.cts} +16 -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-fAwwBZIX.d.cts} +50 -11
  36. package/dist/{tasks-C8TrcAV8.d.ts → tasks-fAwwBZIX.d.ts} +50 -11
  37. package/package.json +4 -3
  38. package/dist/chunk-SVRE6KIM.js.map +0 -1
@@ -185,6 +185,7 @@ declare const EventRuleEventType$1: {
185
185
  readonly 'voicemail:received': "voicemail:received";
186
186
  readonly 'fax:received': "fax:received";
187
187
  readonly 'link:clicked': "link:clicked";
188
+ readonly 'sms:delivery_failed': "sms:delivery_failed";
188
189
  };
189
190
  type EventRuleObjectType$1 = typeof EventRuleObjectType$1[keyof typeof EventRuleObjectType$1];
190
191
  declare const EventRuleObjectType$1: {
@@ -628,6 +629,9 @@ interface CurrentMemberResponse {
628
629
  createdAt: string;
629
630
  updatedAt: string;
630
631
  name: string | null;
632
+ firstName?: string | null;
633
+ middleName?: string | null;
634
+ lastName?: string | null;
631
635
  title?: string | null;
632
636
  description: string | null;
633
637
  phone: string | null;
@@ -1227,6 +1231,9 @@ interface WorkspaceMemberResponse {
1227
1231
  createdAt: string;
1228
1232
  updatedAt: string;
1229
1233
  name: string | null;
1234
+ firstName?: string | null;
1235
+ middleName?: string | null;
1236
+ lastName?: string | null;
1230
1237
  title?: string | null;
1231
1238
  description: string | null;
1232
1239
  phone: string | null;
@@ -2637,17 +2644,17 @@ interface RoutineConfigEventResponse {
2637
2644
  actor?: MemberSummary | null;
2638
2645
  }
2639
2646
  /**
2640
- * Deliver a prompt result by email from an authorized workspace Inbox.
2647
+ * Deliver a Routine result by email from an authorized workspace Inbox.
2641
2648
  *
2642
2649
  * Omit the destination to return results to the interactive Chat.
2643
- * Recipient identity is a workspace Member ID, never a model-selected address.
2650
+ * There is no recipient field: each run emails the Member the run is for, so
2651
+ * the Routine's Who (Me, another Member, or every Member of a group) decides
2652
+ * who receives the result. ``inboxId`` is the sender.
2644
2653
  */
2645
2654
  interface RoutineDestination {
2646
2655
  channel?: 'email';
2647
2656
  /** @exclusiveMinimum 0 */
2648
2657
  inboxId: number;
2649
- /** @exclusiveMinimum 0 */
2650
- memberId: number;
2651
2658
  }
2652
2659
  /**
2653
2660
  * Response model for Routines.
@@ -2844,6 +2851,7 @@ declare enum Scope {
2844
2851
  CHATS_READ = "chats:read",
2845
2852
  CHATS_WRITE = "chats:write",
2846
2853
  CHATS_ADMIN = "chats:admin",
2854
+ DEMOS_RUN = "demos:run",
2847
2855
  DIRECT_MESSAGES_READ = "dm:read",
2848
2856
  DIRECT_MESSAGES_WRITE = "dm:write",
2849
2857
  DIRECT_MESSAGES_ADMIN = "dm:admin",
@@ -2986,6 +2994,13 @@ declare enum EventRuleEventType {
2986
2994
  * (`destinationKeys` or `workflowUuids`).
2987
2995
  */
2988
2996
  LINK_CLICKED = "link:clicked",
2997
+ /**
2998
+ * Fires once per outbound SMS that reaches a final carrier failure
2999
+ * (`undelivered` or `failed`), including a status that arrives after the
3000
+ * send workflow's one-hour close. Payload: message id, member id, sending
3001
+ * number, error code and the shared retry answer — never message content.
3002
+ */
3003
+ SMS_DELIVERY_FAILED = "sms:delivery_failed",
2989
3004
  CHAT_CALLBACK = "chat:callback",
2990
3005
  MEMBER_UPDATED = "member:updated",
2991
3006
  ROUTINE_TRIGGERED = "routine:triggered",
@@ -3209,10 +3224,10 @@ interface JourneyEnrollActionParams {
3209
3224
  /**
3210
3225
  * Parameters for the ``audio:play`` event-rule action.
3211
3226
  *
3212
- * Plays a pre-recorded workspace audio file on the current voice call.
3213
- * Composes with ``task:execute`` rules + CEL conditions on
3214
- * ``call.answered_by`` to deliver guaranteed-delivery disclosure
3215
- * recordings without the LLM in the loop. See the backend handler at
3227
+ * Plays a pre-recorded workspace audio file on the current voice call,
3228
+ * without the LLM in the loop. Branch on ``call.answered_by`` from a
3229
+ * ``call:started`` rule; ``task:execute`` on the start task runs before the
3230
+ * call is placed. See the backend handler at
3216
3231
  * ``lib/rules/actions/builtin/play_audio.py``.
3217
3232
  */
3218
3233
  interface PlayAudioActionParams {
@@ -3811,7 +3826,7 @@ interface MissingMembershipItem {
3811
3826
  account_id: number;
3812
3827
  account_uuid: string;
3813
3828
  }
3814
- type OrgMemberRole = 'member' | 'admin' | 'owner' | 'platform_support';
3829
+ type OrgMemberRole = 'member' | 'developer' | 'admin' | 'owner' | 'platform_support';
3815
3830
  interface OrgMember {
3816
3831
  id: number;
3817
3832
  accountId: number | null;
@@ -5356,6 +5371,14 @@ interface MemberFormData {
5356
5371
  notifyVoice?: boolean;
5357
5372
  notifyWhatsapp?: boolean;
5358
5373
  name?: string;
5374
+ /**
5375
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5376
+ * contain a space, which the single `name` field cannot express. `name` is
5377
+ * the composed full name the server derives from them.
5378
+ */
5379
+ firstName?: string | null;
5380
+ middleName?: string | null;
5381
+ lastName?: string | null;
5359
5382
  description?: string;
5360
5383
  phone?: string;
5361
5384
  email?: string;
@@ -5459,6 +5482,14 @@ interface CreateWorkspaceMemberRequest {
5459
5482
  phone?: string;
5460
5483
  accountUuid?: string;
5461
5484
  name?: string;
5485
+ /**
5486
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5487
+ * contain a space, which the single `name` field cannot express. `name` is
5488
+ * the composed full name the server derives from them.
5489
+ */
5490
+ firstName?: string | null;
5491
+ middleName?: string | null;
5492
+ lastName?: string | null;
5462
5493
  description?: string;
5463
5494
  externalId?: string;
5464
5495
  dateOfBirth?: string;
@@ -5484,6 +5515,14 @@ interface CreateWorkspaceMemberRequest {
5484
5515
  }
5485
5516
  interface UpdateWorkspaceMemberRequest {
5486
5517
  name?: string | null;
5518
+ /**
5519
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5520
+ * contain a space, which the single `name` field cannot express. `name` is
5521
+ * the composed full name the server derives from them.
5522
+ */
5523
+ firstName?: string | null;
5524
+ middleName?: string | null;
5525
+ lastName?: string | null;
5487
5526
  description?: string | null;
5488
5527
  phone?: string | null;
5489
5528
  email?: string | null;
@@ -6055,9 +6094,9 @@ declare const CreateInquirySchema: z.ZodObject<{
6055
6094
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6056
6095
  documentId: z.ZodOptional<z.ZodString>;
6057
6096
  source: z.ZodOptional<z.ZodEnum<{
6097
+ demo: "demo";
6058
6098
  whitepaper: "whitepaper";
6059
6099
  contact: "contact";
6060
- demo: "demo";
6061
6100
  gap_zero: "gap_zero";
6062
6101
  waitlist_updates: "waitlist_updates";
6063
6102
  about_contact: "about_contact";
@@ -6090,9 +6129,9 @@ declare const AnonymousInquiryFormSchema: z.ZodObject<{
6090
6129
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6091
6130
  documentId: z.ZodOptional<z.ZodString>;
6092
6131
  source: z.ZodOptional<z.ZodEnum<{
6132
+ demo: "demo";
6093
6133
  whitepaper: "whitepaper";
6094
6134
  contact: "contact";
6095
- demo: "demo";
6096
6135
  gap_zero: "gap_zero";
6097
6136
  waitlist_updates: "waitlist_updates";
6098
6137
  about_contact: "about_contact";
@@ -185,6 +185,7 @@ declare const EventRuleEventType$1: {
185
185
  readonly 'voicemail:received': "voicemail:received";
186
186
  readonly 'fax:received': "fax:received";
187
187
  readonly 'link:clicked': "link:clicked";
188
+ readonly 'sms:delivery_failed': "sms:delivery_failed";
188
189
  };
189
190
  type EventRuleObjectType$1 = typeof EventRuleObjectType$1[keyof typeof EventRuleObjectType$1];
190
191
  declare const EventRuleObjectType$1: {
@@ -628,6 +629,9 @@ interface CurrentMemberResponse {
628
629
  createdAt: string;
629
630
  updatedAt: string;
630
631
  name: string | null;
632
+ firstName?: string | null;
633
+ middleName?: string | null;
634
+ lastName?: string | null;
631
635
  title?: string | null;
632
636
  description: string | null;
633
637
  phone: string | null;
@@ -1227,6 +1231,9 @@ interface WorkspaceMemberResponse {
1227
1231
  createdAt: string;
1228
1232
  updatedAt: string;
1229
1233
  name: string | null;
1234
+ firstName?: string | null;
1235
+ middleName?: string | null;
1236
+ lastName?: string | null;
1230
1237
  title?: string | null;
1231
1238
  description: string | null;
1232
1239
  phone: string | null;
@@ -2637,17 +2644,17 @@ interface RoutineConfigEventResponse {
2637
2644
  actor?: MemberSummary | null;
2638
2645
  }
2639
2646
  /**
2640
- * Deliver a prompt result by email from an authorized workspace Inbox.
2647
+ * Deliver a Routine result by email from an authorized workspace Inbox.
2641
2648
  *
2642
2649
  * Omit the destination to return results to the interactive Chat.
2643
- * Recipient identity is a workspace Member ID, never a model-selected address.
2650
+ * There is no recipient field: each run emails the Member the run is for, so
2651
+ * the Routine's Who (Me, another Member, or every Member of a group) decides
2652
+ * who receives the result. ``inboxId`` is the sender.
2644
2653
  */
2645
2654
  interface RoutineDestination {
2646
2655
  channel?: 'email';
2647
2656
  /** @exclusiveMinimum 0 */
2648
2657
  inboxId: number;
2649
- /** @exclusiveMinimum 0 */
2650
- memberId: number;
2651
2658
  }
2652
2659
  /**
2653
2660
  * Response model for Routines.
@@ -2844,6 +2851,7 @@ declare enum Scope {
2844
2851
  CHATS_READ = "chats:read",
2845
2852
  CHATS_WRITE = "chats:write",
2846
2853
  CHATS_ADMIN = "chats:admin",
2854
+ DEMOS_RUN = "demos:run",
2847
2855
  DIRECT_MESSAGES_READ = "dm:read",
2848
2856
  DIRECT_MESSAGES_WRITE = "dm:write",
2849
2857
  DIRECT_MESSAGES_ADMIN = "dm:admin",
@@ -2986,6 +2994,13 @@ declare enum EventRuleEventType {
2986
2994
  * (`destinationKeys` or `workflowUuids`).
2987
2995
  */
2988
2996
  LINK_CLICKED = "link:clicked",
2997
+ /**
2998
+ * Fires once per outbound SMS that reaches a final carrier failure
2999
+ * (`undelivered` or `failed`), including a status that arrives after the
3000
+ * send workflow's one-hour close. Payload: message id, member id, sending
3001
+ * number, error code and the shared retry answer — never message content.
3002
+ */
3003
+ SMS_DELIVERY_FAILED = "sms:delivery_failed",
2989
3004
  CHAT_CALLBACK = "chat:callback",
2990
3005
  MEMBER_UPDATED = "member:updated",
2991
3006
  ROUTINE_TRIGGERED = "routine:triggered",
@@ -3209,10 +3224,10 @@ interface JourneyEnrollActionParams {
3209
3224
  /**
3210
3225
  * Parameters for the ``audio:play`` event-rule action.
3211
3226
  *
3212
- * Plays a pre-recorded workspace audio file on the current voice call.
3213
- * Composes with ``task:execute`` rules + CEL conditions on
3214
- * ``call.answered_by`` to deliver guaranteed-delivery disclosure
3215
- * recordings without the LLM in the loop. See the backend handler at
3227
+ * Plays a pre-recorded workspace audio file on the current voice call,
3228
+ * without the LLM in the loop. Branch on ``call.answered_by`` from a
3229
+ * ``call:started`` rule; ``task:execute`` on the start task runs before the
3230
+ * call is placed. See the backend handler at
3216
3231
  * ``lib/rules/actions/builtin/play_audio.py``.
3217
3232
  */
3218
3233
  interface PlayAudioActionParams {
@@ -3811,7 +3826,7 @@ interface MissingMembershipItem {
3811
3826
  account_id: number;
3812
3827
  account_uuid: string;
3813
3828
  }
3814
- type OrgMemberRole = 'member' | 'admin' | 'owner' | 'platform_support';
3829
+ type OrgMemberRole = 'member' | 'developer' | 'admin' | 'owner' | 'platform_support';
3815
3830
  interface OrgMember {
3816
3831
  id: number;
3817
3832
  accountId: number | null;
@@ -5356,6 +5371,14 @@ interface MemberFormData {
5356
5371
  notifyVoice?: boolean;
5357
5372
  notifyWhatsapp?: boolean;
5358
5373
  name?: string;
5374
+ /**
5375
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5376
+ * contain a space, which the single `name` field cannot express. `name` is
5377
+ * the composed full name the server derives from them.
5378
+ */
5379
+ firstName?: string | null;
5380
+ middleName?: string | null;
5381
+ lastName?: string | null;
5359
5382
  description?: string;
5360
5383
  phone?: string;
5361
5384
  email?: string;
@@ -5459,6 +5482,14 @@ interface CreateWorkspaceMemberRequest {
5459
5482
  phone?: string;
5460
5483
  accountUuid?: string;
5461
5484
  name?: string;
5485
+ /**
5486
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5487
+ * contain a space, which the single `name` field cannot express. `name` is
5488
+ * the composed full name the server derives from them.
5489
+ */
5490
+ firstName?: string | null;
5491
+ middleName?: string | null;
5492
+ lastName?: string | null;
5462
5493
  description?: string;
5463
5494
  externalId?: string;
5464
5495
  dateOfBirth?: string;
@@ -5484,6 +5515,14 @@ interface CreateWorkspaceMemberRequest {
5484
5515
  }
5485
5516
  interface UpdateWorkspaceMemberRequest {
5486
5517
  name?: string | null;
5518
+ /**
5519
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5520
+ * contain a space, which the single `name` field cannot express. `name` is
5521
+ * the composed full name the server derives from them.
5522
+ */
5523
+ firstName?: string | null;
5524
+ middleName?: string | null;
5525
+ lastName?: string | null;
5487
5526
  description?: string | null;
5488
5527
  phone?: string | null;
5489
5528
  email?: string | null;
@@ -6055,9 +6094,9 @@ declare const CreateInquirySchema: z.ZodObject<{
6055
6094
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6056
6095
  documentId: z.ZodOptional<z.ZodString>;
6057
6096
  source: z.ZodOptional<z.ZodEnum<{
6097
+ demo: "demo";
6058
6098
  whitepaper: "whitepaper";
6059
6099
  contact: "contact";
6060
- demo: "demo";
6061
6100
  gap_zero: "gap_zero";
6062
6101
  waitlist_updates: "waitlist_updates";
6063
6102
  about_contact: "about_contact";
@@ -6090,9 +6129,9 @@ declare const AnonymousInquiryFormSchema: z.ZodObject<{
6090
6129
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6091
6130
  documentId: z.ZodOptional<z.ZodString>;
6092
6131
  source: z.ZodOptional<z.ZodEnum<{
6132
+ demo: "demo";
6093
6133
  whitepaper: "whitepaper";
6094
6134
  contact: "contact";
6095
- demo: "demo";
6096
6135
  gap_zero: "gap_zero";
6097
6136
  waitlist_updates: "waitlist_updates";
6098
6137
  about_contact: "about_contact";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-rail/sdk",
3
- "version": "2.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Gravity Rail TypeScript SDK — API client for workspace management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -54,7 +54,8 @@
54
54
  "license": "MIT",
55
55
  "repository": {
56
56
  "type": "git",
57
- "url": "https://developer.gravityrail.com"
57
+ "url": "git+https://github.com/Gravity-Rail/gravity-team.git",
58
+ "directory": "packages/sdk"
58
59
  },
59
60
  "homepage": "https://developer.gravityrail.com",
60
61
  "keywords": [
@@ -108,7 +109,7 @@
108
109
  "typedoc-plugin-markdown": "^4.4.0",
109
110
  "typescript": "^6.0.3",
110
111
  "typescript-native": "npm:typescript@7.0.2",
111
- "zod": "patch:zod@npm%3A4.3.5#~/.yarn/patches/zod-npm-4.3.5-018a94fb5d.patch"
112
+ "zod": "patch:zod@npm%3A4.6.6#~/.yarn/patches/zod-npm-4.6.6-e95f9c541d.patch"
112
113
  },
113
114
  "installConfig": {
114
115
  "hoistingLimits": "workspaces"