@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
@@ -98,6 +98,7 @@ declare const EventRuleActionType$1: {
98
98
  readonly 'journey:enroll': "journey:enroll";
99
99
  readonly 'connection:sync': "connection:sync";
100
100
  readonly 'connector:operation': "connector:operation";
101
+ readonly 'hubspot:create_deal_from_booking': "hubspot:create_deal_from_booking";
101
102
  readonly 'ecw:refresh_member_encounters': "ecw:refresh_member_encounters";
102
103
  readonly 'audio:play': "audio:play";
103
104
  readonly 'charleston:send_pmd_page': "charleston:send_pmd_page";
@@ -185,6 +186,7 @@ declare const EventRuleEventType$1: {
185
186
  readonly 'voicemail:received': "voicemail:received";
186
187
  readonly 'fax:received': "fax:received";
187
188
  readonly 'link:clicked': "link:clicked";
189
+ readonly 'sms:delivery_failed': "sms:delivery_failed";
188
190
  };
189
191
  type EventRuleObjectType$1 = typeof EventRuleObjectType$1[keyof typeof EventRuleObjectType$1];
190
192
  declare const EventRuleObjectType$1: {
@@ -628,6 +630,9 @@ interface CurrentMemberResponse {
628
630
  createdAt: string;
629
631
  updatedAt: string;
630
632
  name: string | null;
633
+ firstName?: string | null;
634
+ middleName?: string | null;
635
+ lastName?: string | null;
631
636
  title?: string | null;
632
637
  description: string | null;
633
638
  phone: string | null;
@@ -1227,6 +1232,9 @@ interface WorkspaceMemberResponse {
1227
1232
  createdAt: string;
1228
1233
  updatedAt: string;
1229
1234
  name: string | null;
1235
+ firstName?: string | null;
1236
+ middleName?: string | null;
1237
+ lastName?: string | null;
1230
1238
  title?: string | null;
1231
1239
  description: string | null;
1232
1240
  phone: string | null;
@@ -2637,17 +2645,17 @@ interface RoutineConfigEventResponse {
2637
2645
  actor?: MemberSummary | null;
2638
2646
  }
2639
2647
  /**
2640
- * Deliver a prompt result by email from an authorized workspace Inbox.
2648
+ * Deliver a Routine result by email from an authorized workspace Inbox.
2641
2649
  *
2642
2650
  * Omit the destination to return results to the interactive Chat.
2643
- * Recipient identity is a workspace Member ID, never a model-selected address.
2651
+ * There is no recipient field: each run emails the Member the run is for, so
2652
+ * the Routine's Who (Me, another Member, or every Member of a group) decides
2653
+ * who receives the result. ``inboxId`` is the sender.
2644
2654
  */
2645
2655
  interface RoutineDestination {
2646
2656
  channel?: 'email';
2647
2657
  /** @exclusiveMinimum 0 */
2648
2658
  inboxId: number;
2649
- /** @exclusiveMinimum 0 */
2650
- memberId: number;
2651
2659
  }
2652
2660
  /**
2653
2661
  * Response model for Routines.
@@ -2844,6 +2852,7 @@ declare enum Scope {
2844
2852
  CHATS_READ = "chats:read",
2845
2853
  CHATS_WRITE = "chats:write",
2846
2854
  CHATS_ADMIN = "chats:admin",
2855
+ DEMOS_RUN = "demos:run",
2847
2856
  DIRECT_MESSAGES_READ = "dm:read",
2848
2857
  DIRECT_MESSAGES_WRITE = "dm:write",
2849
2858
  DIRECT_MESSAGES_ADMIN = "dm:admin",
@@ -2986,6 +2995,13 @@ declare enum EventRuleEventType {
2986
2995
  * (`destinationKeys` or `workflowUuids`).
2987
2996
  */
2988
2997
  LINK_CLICKED = "link:clicked",
2998
+ /**
2999
+ * Fires once per outbound SMS that reaches a final carrier failure
3000
+ * (`undelivered` or `failed`), including a status that arrives after the
3001
+ * send workflow's one-hour close. Payload: message id, member id, sending
3002
+ * number, error code and the shared retry answer — never message content.
3003
+ */
3004
+ SMS_DELIVERY_FAILED = "sms:delivery_failed",
2989
3005
  CHAT_CALLBACK = "chat:callback",
2990
3006
  MEMBER_UPDATED = "member:updated",
2991
3007
  ROUTINE_TRIGGERED = "routine:triggered",
@@ -3032,6 +3048,7 @@ declare enum EventRuleActionType {
3032
3048
  INVOKE_CUSTOM_TOOL = "custom_tool:invoke",
3033
3049
  MONDAY_UPSERT_ITEM = "monday:upsert_item",
3034
3050
  MONDAY_REFRESH = "monday:refresh",
3051
+ HUBSPOT_CREATE_DEAL_FROM_BOOKING = "hubspot:create_deal_from_booking",
3035
3052
  ASSIGNMENT_CONCLUDE = "assignment:conclude",
3036
3053
  JOURNEY_ENROLL = "journey:enroll",
3037
3054
  SMS_SEND = "sms:send",
@@ -3209,10 +3226,10 @@ interface JourneyEnrollActionParams {
3209
3226
  /**
3210
3227
  * Parameters for the ``audio:play`` event-rule action.
3211
3228
  *
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
3229
+ * Plays a pre-recorded workspace audio file on the current voice call,
3230
+ * without the LLM in the loop. Branch on ``call.answered_by`` from a
3231
+ * ``call:started`` rule; ``task:execute`` on the start task runs before the
3232
+ * call is placed. See the backend handler at
3216
3233
  * ``lib/rules/actions/builtin/play_audio.py``.
3217
3234
  */
3218
3235
  interface PlayAudioActionParams {
@@ -3811,7 +3828,7 @@ interface MissingMembershipItem {
3811
3828
  account_id: number;
3812
3829
  account_uuid: string;
3813
3830
  }
3814
- type OrgMemberRole = 'member' | 'admin' | 'owner' | 'platform_support';
3831
+ type OrgMemberRole = 'member' | 'developer' | 'admin' | 'owner' | 'platform_support';
3815
3832
  interface OrgMember {
3816
3833
  id: number;
3817
3834
  accountId: number | null;
@@ -5356,6 +5373,14 @@ interface MemberFormData {
5356
5373
  notifyVoice?: boolean;
5357
5374
  notifyWhatsapp?: boolean;
5358
5375
  name?: string;
5376
+ /**
5377
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5378
+ * contain a space, which the single `name` field cannot express. `name` is
5379
+ * the composed full name the server derives from them.
5380
+ */
5381
+ firstName?: string | null;
5382
+ middleName?: string | null;
5383
+ lastName?: string | null;
5359
5384
  description?: string;
5360
5385
  phone?: string;
5361
5386
  email?: string;
@@ -5459,6 +5484,14 @@ interface CreateWorkspaceMemberRequest {
5459
5484
  phone?: string;
5460
5485
  accountUuid?: string;
5461
5486
  name?: string;
5487
+ /**
5488
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5489
+ * contain a space, which the single `name` field cannot express. `name` is
5490
+ * the composed full name the server derives from them.
5491
+ */
5492
+ firstName?: string | null;
5493
+ middleName?: string | null;
5494
+ lastName?: string | null;
5462
5495
  description?: string;
5463
5496
  externalId?: string;
5464
5497
  dateOfBirth?: string;
@@ -5484,6 +5517,14 @@ interface CreateWorkspaceMemberRequest {
5484
5517
  }
5485
5518
  interface UpdateWorkspaceMemberRequest {
5486
5519
  name?: string | null;
5520
+ /**
5521
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5522
+ * contain a space, which the single `name` field cannot express. `name` is
5523
+ * the composed full name the server derives from them.
5524
+ */
5525
+ firstName?: string | null;
5526
+ middleName?: string | null;
5527
+ lastName?: string | null;
5487
5528
  description?: string | null;
5488
5529
  phone?: string | null;
5489
5530
  email?: string | null;
@@ -6055,9 +6096,9 @@ declare const CreateInquirySchema: z.ZodObject<{
6055
6096
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6056
6097
  documentId: z.ZodOptional<z.ZodString>;
6057
6098
  source: z.ZodOptional<z.ZodEnum<{
6099
+ demo: "demo";
6058
6100
  whitepaper: "whitepaper";
6059
6101
  contact: "contact";
6060
- demo: "demo";
6061
6102
  gap_zero: "gap_zero";
6062
6103
  waitlist_updates: "waitlist_updates";
6063
6104
  about_contact: "about_contact";
@@ -6090,9 +6131,9 @@ declare const AnonymousInquiryFormSchema: z.ZodObject<{
6090
6131
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6091
6132
  documentId: z.ZodOptional<z.ZodString>;
6092
6133
  source: z.ZodOptional<z.ZodEnum<{
6134
+ demo: "demo";
6093
6135
  whitepaper: "whitepaper";
6094
6136
  contact: "contact";
6095
- demo: "demo";
6096
6137
  gap_zero: "gap_zero";
6097
6138
  waitlist_updates: "waitlist_updates";
6098
6139
  about_contact: "about_contact";
@@ -98,6 +98,7 @@ declare const EventRuleActionType$1: {
98
98
  readonly 'journey:enroll': "journey:enroll";
99
99
  readonly 'connection:sync': "connection:sync";
100
100
  readonly 'connector:operation': "connector:operation";
101
+ readonly 'hubspot:create_deal_from_booking': "hubspot:create_deal_from_booking";
101
102
  readonly 'ecw:refresh_member_encounters': "ecw:refresh_member_encounters";
102
103
  readonly 'audio:play': "audio:play";
103
104
  readonly 'charleston:send_pmd_page': "charleston:send_pmd_page";
@@ -185,6 +186,7 @@ declare const EventRuleEventType$1: {
185
186
  readonly 'voicemail:received': "voicemail:received";
186
187
  readonly 'fax:received': "fax:received";
187
188
  readonly 'link:clicked': "link:clicked";
189
+ readonly 'sms:delivery_failed': "sms:delivery_failed";
188
190
  };
189
191
  type EventRuleObjectType$1 = typeof EventRuleObjectType$1[keyof typeof EventRuleObjectType$1];
190
192
  declare const EventRuleObjectType$1: {
@@ -628,6 +630,9 @@ interface CurrentMemberResponse {
628
630
  createdAt: string;
629
631
  updatedAt: string;
630
632
  name: string | null;
633
+ firstName?: string | null;
634
+ middleName?: string | null;
635
+ lastName?: string | null;
631
636
  title?: string | null;
632
637
  description: string | null;
633
638
  phone: string | null;
@@ -1227,6 +1232,9 @@ interface WorkspaceMemberResponse {
1227
1232
  createdAt: string;
1228
1233
  updatedAt: string;
1229
1234
  name: string | null;
1235
+ firstName?: string | null;
1236
+ middleName?: string | null;
1237
+ lastName?: string | null;
1230
1238
  title?: string | null;
1231
1239
  description: string | null;
1232
1240
  phone: string | null;
@@ -2637,17 +2645,17 @@ interface RoutineConfigEventResponse {
2637
2645
  actor?: MemberSummary | null;
2638
2646
  }
2639
2647
  /**
2640
- * Deliver a prompt result by email from an authorized workspace Inbox.
2648
+ * Deliver a Routine result by email from an authorized workspace Inbox.
2641
2649
  *
2642
2650
  * Omit the destination to return results to the interactive Chat.
2643
- * Recipient identity is a workspace Member ID, never a model-selected address.
2651
+ * There is no recipient field: each run emails the Member the run is for, so
2652
+ * the Routine's Who (Me, another Member, or every Member of a group) decides
2653
+ * who receives the result. ``inboxId`` is the sender.
2644
2654
  */
2645
2655
  interface RoutineDestination {
2646
2656
  channel?: 'email';
2647
2657
  /** @exclusiveMinimum 0 */
2648
2658
  inboxId: number;
2649
- /** @exclusiveMinimum 0 */
2650
- memberId: number;
2651
2659
  }
2652
2660
  /**
2653
2661
  * Response model for Routines.
@@ -2844,6 +2852,7 @@ declare enum Scope {
2844
2852
  CHATS_READ = "chats:read",
2845
2853
  CHATS_WRITE = "chats:write",
2846
2854
  CHATS_ADMIN = "chats:admin",
2855
+ DEMOS_RUN = "demos:run",
2847
2856
  DIRECT_MESSAGES_READ = "dm:read",
2848
2857
  DIRECT_MESSAGES_WRITE = "dm:write",
2849
2858
  DIRECT_MESSAGES_ADMIN = "dm:admin",
@@ -2986,6 +2995,13 @@ declare enum EventRuleEventType {
2986
2995
  * (`destinationKeys` or `workflowUuids`).
2987
2996
  */
2988
2997
  LINK_CLICKED = "link:clicked",
2998
+ /**
2999
+ * Fires once per outbound SMS that reaches a final carrier failure
3000
+ * (`undelivered` or `failed`), including a status that arrives after the
3001
+ * send workflow's one-hour close. Payload: message id, member id, sending
3002
+ * number, error code and the shared retry answer — never message content.
3003
+ */
3004
+ SMS_DELIVERY_FAILED = "sms:delivery_failed",
2989
3005
  CHAT_CALLBACK = "chat:callback",
2990
3006
  MEMBER_UPDATED = "member:updated",
2991
3007
  ROUTINE_TRIGGERED = "routine:triggered",
@@ -3032,6 +3048,7 @@ declare enum EventRuleActionType {
3032
3048
  INVOKE_CUSTOM_TOOL = "custom_tool:invoke",
3033
3049
  MONDAY_UPSERT_ITEM = "monday:upsert_item",
3034
3050
  MONDAY_REFRESH = "monday:refresh",
3051
+ HUBSPOT_CREATE_DEAL_FROM_BOOKING = "hubspot:create_deal_from_booking",
3035
3052
  ASSIGNMENT_CONCLUDE = "assignment:conclude",
3036
3053
  JOURNEY_ENROLL = "journey:enroll",
3037
3054
  SMS_SEND = "sms:send",
@@ -3209,10 +3226,10 @@ interface JourneyEnrollActionParams {
3209
3226
  /**
3210
3227
  * Parameters for the ``audio:play`` event-rule action.
3211
3228
  *
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
3229
+ * Plays a pre-recorded workspace audio file on the current voice call,
3230
+ * without the LLM in the loop. Branch on ``call.answered_by`` from a
3231
+ * ``call:started`` rule; ``task:execute`` on the start task runs before the
3232
+ * call is placed. See the backend handler at
3216
3233
  * ``lib/rules/actions/builtin/play_audio.py``.
3217
3234
  */
3218
3235
  interface PlayAudioActionParams {
@@ -3811,7 +3828,7 @@ interface MissingMembershipItem {
3811
3828
  account_id: number;
3812
3829
  account_uuid: string;
3813
3830
  }
3814
- type OrgMemberRole = 'member' | 'admin' | 'owner' | 'platform_support';
3831
+ type OrgMemberRole = 'member' | 'developer' | 'admin' | 'owner' | 'platform_support';
3815
3832
  interface OrgMember {
3816
3833
  id: number;
3817
3834
  accountId: number | null;
@@ -5356,6 +5373,14 @@ interface MemberFormData {
5356
5373
  notifyVoice?: boolean;
5357
5374
  notifyWhatsapp?: boolean;
5358
5375
  name?: string;
5376
+ /**
5377
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5378
+ * contain a space, which the single `name` field cannot express. `name` is
5379
+ * the composed full name the server derives from them.
5380
+ */
5381
+ firstName?: string | null;
5382
+ middleName?: string | null;
5383
+ lastName?: string | null;
5359
5384
  description?: string;
5360
5385
  phone?: string;
5361
5386
  email?: string;
@@ -5459,6 +5484,14 @@ interface CreateWorkspaceMemberRequest {
5459
5484
  phone?: string;
5460
5485
  accountUuid?: string;
5461
5486
  name?: string;
5487
+ /**
5488
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5489
+ * contain a space, which the single `name` field cannot express. `name` is
5490
+ * the composed full name the server derives from them.
5491
+ */
5492
+ firstName?: string | null;
5493
+ middleName?: string | null;
5494
+ lastName?: string | null;
5462
5495
  description?: string;
5463
5496
  externalId?: string;
5464
5497
  dateOfBirth?: string;
@@ -5484,6 +5517,14 @@ interface CreateWorkspaceMemberRequest {
5484
5517
  }
5485
5518
  interface UpdateWorkspaceMemberRequest {
5486
5519
  name?: string | null;
5520
+ /**
5521
+ * Structured name parts. Any part sent wins over `name`; a part may itself
5522
+ * contain a space, which the single `name` field cannot express. `name` is
5523
+ * the composed full name the server derives from them.
5524
+ */
5525
+ firstName?: string | null;
5526
+ middleName?: string | null;
5527
+ lastName?: string | null;
5487
5528
  description?: string | null;
5488
5529
  phone?: string | null;
5489
5530
  email?: string | null;
@@ -6055,9 +6096,9 @@ declare const CreateInquirySchema: z.ZodObject<{
6055
6096
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6056
6097
  documentId: z.ZodOptional<z.ZodString>;
6057
6098
  source: z.ZodOptional<z.ZodEnum<{
6099
+ demo: "demo";
6058
6100
  whitepaper: "whitepaper";
6059
6101
  contact: "contact";
6060
- demo: "demo";
6061
6102
  gap_zero: "gap_zero";
6062
6103
  waitlist_updates: "waitlist_updates";
6063
6104
  about_contact: "about_contact";
@@ -6090,9 +6131,9 @@ declare const AnonymousInquiryFormSchema: z.ZodObject<{
6090
6131
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6091
6132
  documentId: z.ZodOptional<z.ZodString>;
6092
6133
  source: z.ZodOptional<z.ZodEnum<{
6134
+ demo: "demo";
6093
6135
  whitepaper: "whitepaper";
6094
6136
  contact: "contact";
6095
- demo: "demo";
6096
6137
  gap_zero: "gap_zero";
6097
6138
  waitlist_updates: "waitlist_updates";
6098
6139
  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.1.0",
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"