@gravity-rail/sdk 1.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-BWvViNx-.d.cts → chat-interaction-BPqj_KMO.d.cts} +3037 -1154
  3. package/dist/{chat-interaction-CRGcStD0.d.ts → chat-interaction-CDlei6KK.d.ts} +3037 -1154
  4. package/dist/{chunk-VBG6XUBN.js → chunk-LWRMGN4Z.js} +901 -311
  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 +947 -334
  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 +49 -25
  18. package/dist/index.js.map +1 -1
  19. package/dist/internal.cjs +903 -309
  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 +8 -2
  24. package/dist/internal.js.map +1 -1
  25. package/dist/{member-import-DcjopLJf.d.ts → member-import-BbWJzHSV.d.ts} +1 -1
  26. package/dist/{member-import-fQz-gVmQ.d.cts → member-import-DxBggQLc.d.cts} +1 -1
  27. package/dist/{path-BKAZ7CTT.d.ts → path-5DteJvEx.d.ts} +35 -3
  28. package/dist/{path-C5Cn4Kl7.d.cts → path-bqfiH1XI.d.cts} +35 -3
  29. package/dist/schemas.cjs +57 -6
  30. package/dist/schemas.cjs.map +1 -1
  31. package/dist/schemas.d.cts +77 -9
  32. package/dist/schemas.d.ts +77 -9
  33. package/dist/schemas.js +53 -6
  34. package/dist/schemas.js.map +1 -1
  35. package/dist/{tasks-DVm54e2a.d.cts → tasks-fAwwBZIX.d.cts} +53 -11
  36. package/dist/{tasks-DVm54e2a.d.ts → tasks-fAwwBZIX.d.ts} +53 -11
  37. package/package.json +10 -4
  38. package/dist/chunk-VBG6XUBN.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.
@@ -2832,6 +2839,9 @@ declare enum Scope {
2832
2839
  WORKSPACE_READ = "workspace:read",
2833
2840
  WORKSPACE_WRITE = "workspace:write",
2834
2841
  WORKSPACE_ADMIN = "workspace:admin",
2842
+ MEDICAL_BILLING_READ = "medical_billing:read",
2843
+ MEDICAL_BILLING_WRITE = "medical_billing:write",
2844
+ MEDICAL_BILLING_ADMIN = "medical_billing:admin",
2835
2845
  MEMBERS_READ = "members:read",
2836
2846
  MEMBERS_WRITE = "members:write",
2837
2847
  MEMBERS_ADMIN = "members:admin",
@@ -2841,6 +2851,7 @@ declare enum Scope {
2841
2851
  CHATS_READ = "chats:read",
2842
2852
  CHATS_WRITE = "chats:write",
2843
2853
  CHATS_ADMIN = "chats:admin",
2854
+ DEMOS_RUN = "demos:run",
2844
2855
  DIRECT_MESSAGES_READ = "dm:read",
2845
2856
  DIRECT_MESSAGES_WRITE = "dm:write",
2846
2857
  DIRECT_MESSAGES_ADMIN = "dm:admin",
@@ -2983,6 +2994,13 @@ declare enum EventRuleEventType {
2983
2994
  * (`destinationKeys` or `workflowUuids`).
2984
2995
  */
2985
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",
2986
3004
  CHAT_CALLBACK = "chat:callback",
2987
3005
  MEMBER_UPDATED = "member:updated",
2988
3006
  ROUTINE_TRIGGERED = "routine:triggered",
@@ -3206,10 +3224,10 @@ interface JourneyEnrollActionParams {
3206
3224
  /**
3207
3225
  * Parameters for the ``audio:play`` event-rule action.
3208
3226
  *
3209
- * Plays a pre-recorded workspace audio file on the current voice call.
3210
- * Composes with ``task:execute`` rules + CEL conditions on
3211
- * ``call.answered_by`` to deliver guaranteed-delivery disclosure
3212
- * 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
3213
3231
  * ``lib/rules/actions/builtin/play_audio.py``.
3214
3232
  */
3215
3233
  interface PlayAudioActionParams {
@@ -3808,7 +3826,7 @@ interface MissingMembershipItem {
3808
3826
  account_id: number;
3809
3827
  account_uuid: string;
3810
3828
  }
3811
- type OrgMemberRole = 'member' | 'admin' | 'owner' | 'platform_support';
3829
+ type OrgMemberRole = 'member' | 'developer' | 'admin' | 'owner' | 'platform_support';
3812
3830
  interface OrgMember {
3813
3831
  id: number;
3814
3832
  accountId: number | null;
@@ -5353,6 +5371,14 @@ interface MemberFormData {
5353
5371
  notifyVoice?: boolean;
5354
5372
  notifyWhatsapp?: boolean;
5355
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;
5356
5382
  description?: string;
5357
5383
  phone?: string;
5358
5384
  email?: string;
@@ -5456,6 +5482,14 @@ interface CreateWorkspaceMemberRequest {
5456
5482
  phone?: string;
5457
5483
  accountUuid?: string;
5458
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;
5459
5493
  description?: string;
5460
5494
  externalId?: string;
5461
5495
  dateOfBirth?: string;
@@ -5481,6 +5515,14 @@ interface CreateWorkspaceMemberRequest {
5481
5515
  }
5482
5516
  interface UpdateWorkspaceMemberRequest {
5483
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;
5484
5526
  description?: string | null;
5485
5527
  phone?: string | null;
5486
5528
  email?: string | null;
@@ -6052,9 +6094,9 @@ declare const CreateInquirySchema: z.ZodObject<{
6052
6094
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6053
6095
  documentId: z.ZodOptional<z.ZodString>;
6054
6096
  source: z.ZodOptional<z.ZodEnum<{
6097
+ demo: "demo";
6055
6098
  whitepaper: "whitepaper";
6056
6099
  contact: "contact";
6057
- demo: "demo";
6058
6100
  gap_zero: "gap_zero";
6059
6101
  waitlist_updates: "waitlist_updates";
6060
6102
  about_contact: "about_contact";
@@ -6087,9 +6129,9 @@ declare const AnonymousInquiryFormSchema: z.ZodObject<{
6087
6129
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6088
6130
  documentId: z.ZodOptional<z.ZodString>;
6089
6131
  source: z.ZodOptional<z.ZodEnum<{
6132
+ demo: "demo";
6090
6133
  whitepaper: "whitepaper";
6091
6134
  contact: "contact";
6092
- demo: "demo";
6093
6135
  gap_zero: "gap_zero";
6094
6136
  waitlist_updates: "waitlist_updates";
6095
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.
@@ -2832,6 +2839,9 @@ declare enum Scope {
2832
2839
  WORKSPACE_READ = "workspace:read",
2833
2840
  WORKSPACE_WRITE = "workspace:write",
2834
2841
  WORKSPACE_ADMIN = "workspace:admin",
2842
+ MEDICAL_BILLING_READ = "medical_billing:read",
2843
+ MEDICAL_BILLING_WRITE = "medical_billing:write",
2844
+ MEDICAL_BILLING_ADMIN = "medical_billing:admin",
2835
2845
  MEMBERS_READ = "members:read",
2836
2846
  MEMBERS_WRITE = "members:write",
2837
2847
  MEMBERS_ADMIN = "members:admin",
@@ -2841,6 +2851,7 @@ declare enum Scope {
2841
2851
  CHATS_READ = "chats:read",
2842
2852
  CHATS_WRITE = "chats:write",
2843
2853
  CHATS_ADMIN = "chats:admin",
2854
+ DEMOS_RUN = "demos:run",
2844
2855
  DIRECT_MESSAGES_READ = "dm:read",
2845
2856
  DIRECT_MESSAGES_WRITE = "dm:write",
2846
2857
  DIRECT_MESSAGES_ADMIN = "dm:admin",
@@ -2983,6 +2994,13 @@ declare enum EventRuleEventType {
2983
2994
  * (`destinationKeys` or `workflowUuids`).
2984
2995
  */
2985
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",
2986
3004
  CHAT_CALLBACK = "chat:callback",
2987
3005
  MEMBER_UPDATED = "member:updated",
2988
3006
  ROUTINE_TRIGGERED = "routine:triggered",
@@ -3206,10 +3224,10 @@ interface JourneyEnrollActionParams {
3206
3224
  /**
3207
3225
  * Parameters for the ``audio:play`` event-rule action.
3208
3226
  *
3209
- * Plays a pre-recorded workspace audio file on the current voice call.
3210
- * Composes with ``task:execute`` rules + CEL conditions on
3211
- * ``call.answered_by`` to deliver guaranteed-delivery disclosure
3212
- * 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
3213
3231
  * ``lib/rules/actions/builtin/play_audio.py``.
3214
3232
  */
3215
3233
  interface PlayAudioActionParams {
@@ -3808,7 +3826,7 @@ interface MissingMembershipItem {
3808
3826
  account_id: number;
3809
3827
  account_uuid: string;
3810
3828
  }
3811
- type OrgMemberRole = 'member' | 'admin' | 'owner' | 'platform_support';
3829
+ type OrgMemberRole = 'member' | 'developer' | 'admin' | 'owner' | 'platform_support';
3812
3830
  interface OrgMember {
3813
3831
  id: number;
3814
3832
  accountId: number | null;
@@ -5353,6 +5371,14 @@ interface MemberFormData {
5353
5371
  notifyVoice?: boolean;
5354
5372
  notifyWhatsapp?: boolean;
5355
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;
5356
5382
  description?: string;
5357
5383
  phone?: string;
5358
5384
  email?: string;
@@ -5456,6 +5482,14 @@ interface CreateWorkspaceMemberRequest {
5456
5482
  phone?: string;
5457
5483
  accountUuid?: string;
5458
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;
5459
5493
  description?: string;
5460
5494
  externalId?: string;
5461
5495
  dateOfBirth?: string;
@@ -5481,6 +5515,14 @@ interface CreateWorkspaceMemberRequest {
5481
5515
  }
5482
5516
  interface UpdateWorkspaceMemberRequest {
5483
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;
5484
5526
  description?: string | null;
5485
5527
  phone?: string | null;
5486
5528
  email?: string | null;
@@ -6052,9 +6094,9 @@ declare const CreateInquirySchema: z.ZodObject<{
6052
6094
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6053
6095
  documentId: z.ZodOptional<z.ZodString>;
6054
6096
  source: z.ZodOptional<z.ZodEnum<{
6097
+ demo: "demo";
6055
6098
  whitepaper: "whitepaper";
6056
6099
  contact: "contact";
6057
- demo: "demo";
6058
6100
  gap_zero: "gap_zero";
6059
6101
  waitlist_updates: "waitlist_updates";
6060
6102
  about_contact: "about_contact";
@@ -6087,9 +6129,9 @@ declare const AnonymousInquiryFormSchema: z.ZodObject<{
6087
6129
  requiresBaa: z.ZodOptional<z.ZodBoolean>;
6088
6130
  documentId: z.ZodOptional<z.ZodString>;
6089
6131
  source: z.ZodOptional<z.ZodEnum<{
6132
+ demo: "demo";
6090
6133
  whitepaper: "whitepaper";
6091
6134
  contact: "contact";
6092
- demo: "demo";
6093
6135
  gap_zero: "gap_zero";
6094
6136
  waitlist_updates: "waitlist_updates";
6095
6137
  about_contact: "about_contact";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-rail/sdk",
3
- "version": "1.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": [
@@ -70,7 +71,7 @@
70
71
  "scripts": {
71
72
  "build": "tsup",
72
73
  "clean": "rm -rf dist",
73
- "typecheck": "tsc --noEmit",
74
+ "typecheck": "bash ../../scripts/tsc-admitted.sh --noEmit",
74
75
  "test": "jest --forceExit",
75
76
  "test:ci": "jest --forceExit --passWithNoTests --coverage --coverageReporters=json-summary --coverageReporters=text-summary",
76
77
  "docs": "typedoc",
@@ -97,6 +98,7 @@
97
98
  "@types/jest": "^30.0.0",
98
99
  "@types/node": "^26.6.5",
99
100
  "@types/react": "^19.3.0",
101
+ "bun": "1.4.4",
100
102
  "jest": "^30.5.2",
101
103
  "orval": "patch:orval@npm%3A8.32.0#~/.yarn/patches/orval-npm-8.32.0-7d17003bea.patch",
102
104
  "react": "^19.3.1",
@@ -106,6 +108,10 @@
106
108
  "typedoc": "0.28.20",
107
109
  "typedoc-plugin-markdown": "^4.4.0",
108
110
  "typescript": "^6.0.3",
109
- "zod": "patch:zod@npm%3A4.3.5#~/.yarn/patches/zod-npm-4.3.5-018a94fb5d.patch"
111
+ "typescript-native": "npm:typescript@7.0.2",
112
+ "zod": "patch:zod@npm%3A4.6.6#~/.yarn/patches/zod-npm-4.6.6-e95f9c541d.patch"
113
+ },
114
+ "installConfig": {
115
+ "hoistingLimits": "workspaces"
110
116
  }
111
117
  }