@hexclave/shared 1.0.54 → 1.0.55

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 (93) hide show
  1. package/dist/{admin-interface-DuboQXpC.d.ts → admin-interface-DIt0PvhC.d.ts} +11 -11
  2. package/dist/{admin-interface-DuboQXpC.d.ts.map → admin-interface-DIt0PvhC.d.ts.map} +1 -1
  3. package/dist/{admin-metrics-IxLyJ-cP.d.ts → admin-metrics-bsOkw4YQ.d.ts} +18 -18
  4. package/dist/{admin-metrics-IxLyJ-cP.d.ts.map → admin-metrics-bsOkw4YQ.d.ts.map} +1 -1
  5. package/dist/ai/unified-prompts/reminders.js +1 -1
  6. package/dist/ai/unified-prompts/reminders.js.map +1 -1
  7. package/dist/{client-interface-Ca6UZywk.d.ts → client-interface-BQz4jNAC.d.ts} +9 -9
  8. package/dist/{client-interface-Ca6UZywk.d.ts.map → client-interface-BQz4jNAC.d.ts.map} +1 -1
  9. package/dist/config/schema-fuzzer.test.js +1 -1
  10. package/dist/config/schema.d.ts +1 -1
  11. package/dist/config/schema.js +1 -1
  12. package/dist/config-authoring.d.ts +1 -1
  13. package/dist/{current-user-DNxac4sS.d.ts → current-user-BBoN3hsn.d.ts} +15 -15
  14. package/dist/{current-user-DNxac4sS.d.ts.map → current-user-BBoN3hsn.d.ts.map} +1 -1
  15. package/dist/{email-outbox-ILs0LlGd.d.ts → email-outbox-CqzwInBL.d.ts} +95 -95
  16. package/dist/{email-outbox-ILs0LlGd.d.ts.map → email-outbox-CqzwInBL.d.ts.map} +1 -1
  17. package/dist/esm/ai/unified-prompts/reminders.js +1 -1
  18. package/dist/esm/ai/unified-prompts/reminders.js.map +1 -1
  19. package/dist/esm/config/schema-fuzzer.test.js +1 -1
  20. package/dist/esm/config/schema.d.ts +99 -99
  21. package/dist/esm/config/schema.js +1 -1
  22. package/dist/esm/interface/admin-interface.js +1 -1
  23. package/dist/esm/interface/admin-metrics.d.ts +17 -17
  24. package/dist/esm/interface/client-interface.js +2 -2
  25. package/dist/esm/interface/conversations.d.ts +10 -10
  26. package/dist/esm/interface/crud/current-user.d.ts +14 -14
  27. package/dist/esm/interface/crud/email-outbox.d.ts +94 -94
  28. package/dist/esm/interface/crud/products.d.ts +17 -17
  29. package/dist/esm/interface/crud/project-api-keys.d.ts +4 -4
  30. package/dist/esm/interface/crud/projects.d.ts +28 -28
  31. package/dist/esm/interface/crud/team-member-profiles.d.ts +24 -24
  32. package/dist/esm/interface/crud/transactions.d.ts +15 -15
  33. package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
  34. package/dist/esm/interface/crud/users.d.ts +16 -16
  35. package/dist/esm/interface/plan-usage.d.ts +2 -2
  36. package/dist/esm/interface/server-interface.js +1 -1
  37. package/dist/esm/interface/webhooks.d.ts +2 -2
  38. package/dist/esm/known-errors.d.ts +3 -3
  39. package/dist/esm/schema-fields.d.ts +5 -5
  40. package/dist/esm/sessions.d.ts +8 -8
  41. package/dist/helpers/password.d.ts +1 -1
  42. package/dist/helpers/production-mode.d.ts +1 -1
  43. package/dist/index.d.ts +4 -4
  44. package/dist/interface/admin-interface.d.ts +2 -2
  45. package/dist/interface/admin-interface.js +1 -1
  46. package/dist/interface/admin-metrics.d.ts +1 -1
  47. package/dist/interface/client-interface.d.ts +1 -1
  48. package/dist/interface/client-interface.js +2 -2
  49. package/dist/interface/conversations.d.ts +10 -10
  50. package/dist/interface/crud/current-user.d.ts +1 -1
  51. package/dist/interface/crud/email-outbox.d.ts +1 -1
  52. package/dist/interface/crud/products.d.ts +1 -1
  53. package/dist/interface/crud/project-api-keys.d.ts +1 -1
  54. package/dist/interface/crud/projects.d.ts +1 -1
  55. package/dist/interface/crud/team-member-profiles.d.ts +1 -1
  56. package/dist/interface/crud/transactions.d.ts +1 -1
  57. package/dist/interface/crud/users.d.ts +1 -1
  58. package/dist/interface/plan-usage.d.ts +1 -1
  59. package/dist/interface/server-interface.d.ts +1 -1
  60. package/dist/interface/server-interface.js +1 -1
  61. package/dist/interface/webhooks.d.ts +1 -1
  62. package/dist/{known-errors-g7JC8z58.d.ts → known-errors-Bm4a61wL.d.ts} +4 -4
  63. package/dist/{known-errors-g7JC8z58.d.ts.map → known-errors-Bm4a61wL.d.ts.map} +1 -1
  64. package/dist/known-errors.d.ts +1 -1
  65. package/dist/{plan-usage-D0kWw4HR.d.ts → plan-usage-BO2GsKlN.d.ts} +3 -3
  66. package/dist/{plan-usage-D0kWw4HR.d.ts.map → plan-usage-BO2GsKlN.d.ts.map} +1 -1
  67. package/dist/{products-C98fCS-1.d.ts → products-D4o8A2W0.d.ts} +18 -18
  68. package/dist/{products-C98fCS-1.d.ts.map → products-D4o8A2W0.d.ts.map} +1 -1
  69. package/dist/{project-api-keys-P97ElZZe.d.ts → project-api-keys--7V5X_UW.d.ts} +5 -5
  70. package/dist/{project-api-keys-P97ElZZe.d.ts.map → project-api-keys--7V5X_UW.d.ts.map} +1 -1
  71. package/dist/{projects-BM2a4sfO.d.ts → projects-CFTNXRfG.d.ts} +29 -29
  72. package/dist/{projects-BM2a4sfO.d.ts.map → projects-CFTNXRfG.d.ts.map} +1 -1
  73. package/dist/{schema-Bq1TSMFV.d.ts → schema-CLmaZetm.d.ts} +100 -100
  74. package/dist/{schema-Bq1TSMFV.d.ts.map → schema-CLmaZetm.d.ts.map} +1 -1
  75. package/dist/{schema-fields-Cch3V5nd.d.ts → schema-fields-DZtDQEEO.d.ts} +6 -6
  76. package/dist/{schema-fields-Cch3V5nd.d.ts.map → schema-fields-DZtDQEEO.d.ts.map} +1 -1
  77. package/dist/schema-fields.d.ts +1 -1
  78. package/dist/{server-interface-yKuDPrQI.d.ts → server-interface-BjY-eS4Q.d.ts} +8 -8
  79. package/dist/{server-interface-yKuDPrQI.d.ts.map → server-interface-BjY-eS4Q.d.ts.map} +1 -1
  80. package/dist/{sessions-DCTyJhi3.d.ts → sessions-CI-0TBQb.d.ts} +10 -10
  81. package/dist/{sessions-DCTyJhi3.d.ts.map → sessions-CI-0TBQb.d.ts.map} +1 -1
  82. package/dist/sessions.d.ts +1 -1
  83. package/dist/{team-member-profiles-CaD1OJqt.d.ts → team-member-profiles-BoDEqx-0.d.ts} +25 -25
  84. package/dist/{team-member-profiles-CaD1OJqt.d.ts.map → team-member-profiles-BoDEqx-0.d.ts.map} +1 -1
  85. package/dist/{transactions-CrAZLdGo.d.ts → transactions-CHNUJ42J.d.ts} +16 -16
  86. package/dist/transactions-CHNUJ42J.d.ts.map +1 -0
  87. package/dist/{users-DSpJgn9Z.d.ts → users-DHNRwoSz.d.ts} +18 -18
  88. package/dist/{users-DSpJgn9Z.d.ts.map → users-DHNRwoSz.d.ts.map} +1 -1
  89. package/dist/{webhooks-_aXIgZBW.d.ts → webhooks-8Ts1Clcb.d.ts} +3 -3
  90. package/dist/{webhooks-_aXIgZBW.d.ts.map → webhooks-8Ts1Clcb.d.ts.map} +1 -1
  91. package/package.json +1 -1
  92. package/src/ai/unified-prompts/reminders.ts +1 -1
  93. package/dist/transactions-CrAZLdGo.d.ts.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import * as yup$1 from "yup";
2
+ import { stringCompare } from "../utils/strings.js";
2
3
  import { HexclaveAssertionError } from "../utils/errors.js";
3
4
  import { filterUndefined, get, getOrUndefined, has, isObjectLike, mapValues, set, typedAssign, typedEntries, typedFromEntries } from "../utils/objects.js";
4
5
  import { ALL_APPS } from "../apps/apps-config.js";
5
6
  import { SUPPORTED_CURRENCIES } from "../utils/currency-constants.js";
6
- import { stringCompare } from "../utils/strings.js";
7
7
  import { NormalizationError, assertNormalized, getInvalidConfigReason, normalize } from "./format.js";
8
8
  import { DEFAULT_EMAIL_TEMPLATES, DEFAULT_EMAIL_THEMES, DEFAULT_EMAIL_THEME_ID } from "../helpers/emails.js";
9
9
  import * as schemaFields from "../schema-fields.js";
@@ -1,5 +1,5 @@
1
- import { Result } from "../utils/results.js";
2
1
  import { urlString } from "../utils/urls.js";
2
+ import { Result } from "../utils/results.js";
3
3
  import { KnownErrors } from "../known-errors.js";
4
4
  import { HexclaveServerInterface } from "./server-interface.js";
5
5
  //#region src/interface/admin-interface.ts
@@ -150,15 +150,15 @@ declare const MetricsEmailOverviewSchema: yup.ObjectSchema<{
150
150
  activity: number;
151
151
  }[];
152
152
  daily_emails_by_status: {
153
- ok: number;
154
153
  error: number;
155
154
  date: string;
155
+ ok: number;
156
156
  in_progress: number;
157
157
  }[];
158
158
  emails_sent: number;
159
159
  recent_emails: {
160
- id: string;
161
160
  status: string;
161
+ id: string;
162
162
  subject: string;
163
163
  created_at_millis: number;
164
164
  }[];
@@ -392,30 +392,30 @@ declare const AnalyticsClickmapResponseBodySchema: yup.ObjectSchema<{
392
392
  kind: "team_user_hour_of_week" | "session_replay_clicks";
393
393
  cells: {
394
394
  value: number;
395
- weekday: number;
396
395
  hour: number;
396
+ weekday: number;
397
397
  }[];
398
398
  sampling: number;
399
399
  routes: {
400
400
  path: string;
401
- clicks: number;
402
401
  users: number;
402
+ clicks: number;
403
403
  replays: number;
404
404
  }[];
405
405
  users: {
406
- id: string;
407
- display_name: string | null;
408
406
  primary_email: string | null;
407
+ display_name: string | null;
408
+ id: string;
409
409
  profile_image_url: string | null;
410
410
  clicks: number;
411
411
  replays: number;
412
412
  last_event_at_millis: number;
413
413
  }[];
414
414
  replays: {
415
+ user_id: string | null;
415
416
  id: string;
416
417
  clicks: number;
417
418
  last_event_at_millis: number;
418
- user_id: string | null;
419
419
  route_path: string | null;
420
420
  viewport_width: number | null;
421
421
  viewport_height: number | null;
@@ -443,9 +443,9 @@ declare const AnalyticsClickmapResponseBodySchema: yup.ObjectSchema<{
443
443
  elements: never[];
444
444
  }, "">;
445
445
  declare const MetricsActiveUsersByCountrySchema: yup.MixedSchema<Record<string, {
446
- id: string;
447
- display_name: string | null;
448
446
  primary_email: string | null;
447
+ display_name: string | null;
448
+ id: string;
449
449
  profile_image_url: string | null;
450
450
  signed_up_at_millis: number;
451
451
  last_active_at_millis: number | null;
@@ -471,25 +471,25 @@ declare const MetricsResponseBodySchema: yup.ObjectSchema<{
471
471
  }[];
472
472
  users_by_country: Record<string, number>;
473
473
  active_users_by_country: Record<string, {
474
- id: string;
475
- display_name: string | null;
476
474
  primary_email: string | null;
475
+ display_name: string | null;
476
+ id: string;
477
477
  profile_image_url: string | null;
478
478
  signed_up_at_millis: number;
479
479
  last_active_at_millis: number | null;
480
480
  }[]>;
481
481
  recently_registered: {
482
- id: string;
483
- display_name: string | null;
484
482
  primary_email: string | null;
483
+ display_name: string | null;
484
+ id: string;
485
485
  profile_image_url: string | null;
486
486
  signed_up_at_millis: number;
487
487
  last_active_at_millis: number | null;
488
488
  }[];
489
489
  recently_active: {
490
- id: string;
491
- display_name: string | null;
492
490
  primary_email: string | null;
491
+ display_name: string | null;
492
+ id: string;
493
493
  profile_image_url: string | null;
494
494
  signed_up_at_millis: number;
495
495
  last_active_at_millis: number | null;
@@ -563,15 +563,15 @@ declare const MetricsResponseBodySchema: yup.ObjectSchema<{
563
563
  emails_by_status: Record<string, number>;
564
564
  total_emails: number;
565
565
  daily_emails_by_status: {
566
- ok: number;
567
566
  error: number;
568
567
  date: string;
568
+ ok: number;
569
569
  in_progress: number;
570
570
  }[];
571
571
  emails_sent: number;
572
572
  recent_emails: {
573
- id: string;
574
573
  status: string;
574
+ id: string;
575
575
  subject: string;
576
576
  created_at_millis: number;
577
577
  }[];
@@ -1,9 +1,9 @@
1
+ import { deindent } from "../utils/strings.js";
1
2
  import { HexclaveAssertionError, throwErr } from "../utils/errors.js";
3
+ import { urlString } from "../utils/urls.js";
2
4
  import { filterUndefined, filterUndefinedOrNull } from "../utils/objects.js";
3
- import { deindent } from "../utils/strings.js";
4
5
  import { publishableClientKeyNotNecessarySentinel } from "../utils/oauth.js";
5
6
  import { Result } from "../utils/results.js";
6
- import { urlString } from "../utils/urls.js";
7
7
  import { KnownError, KnownErrors } from "../known-errors.js";
8
8
  import { AccessToken, InternalSession } from "../sessions.js";
9
9
  import { generateSecureRandomString } from "../utils/crypto.js";
@@ -49,7 +49,7 @@ declare const conversationSummarySchema: yup$1.ObjectSchema<{
49
49
  userPrimaryEmail: string | null;
50
50
  userProfileImageUrl: string | null;
51
51
  subject: string;
52
- status: "pending" | "open" | "closed";
52
+ status: "open" | "pending" | "closed";
53
53
  priority: "low" | "normal" | "high" | "urgent";
54
54
  source: "email" | "manual" | "chat" | "api";
55
55
  lastMessageType: "message" | "internal-note" | "status-change";
@@ -129,7 +129,7 @@ declare const conversationMessageSchema: yup$1.ObjectSchema<{
129
129
  userId: string | null;
130
130
  teamId: string | null;
131
131
  subject: string;
132
- status: "pending" | "open" | "closed";
132
+ status: "open" | "pending" | "closed";
133
133
  priority: "low" | "normal" | "high" | "urgent";
134
134
  source: "email" | "manual" | "chat" | "api";
135
135
  messageType: "message" | "internal-note" | "status-change";
@@ -139,8 +139,8 @@ declare const conversationMessageSchema: yup$1.ObjectSchema<{
139
139
  createdAt: string;
140
140
  sender: {
141
141
  type: "user" | "agent" | "system";
142
- id: string | null;
143
142
  displayName: string | null;
143
+ id: string | null;
144
144
  primaryEmail: string | null;
145
145
  };
146
146
  }, yup$1.AnyObject, {
@@ -173,7 +173,8 @@ declare const conversationListResponseSchema: yup$1.ObjectSchema<{
173
173
  lastOutboundAt?: string | null | undefined;
174
174
  closedAt?: string | null | undefined;
175
175
  recordMetadata?: {} | null | undefined;
176
- status: "pending" | "open" | "closed";
176
+ status: "open" | "pending" | "closed";
177
+ priority: "low" | "normal" | "high" | "urgent";
177
178
  subject: string;
178
179
  conversationId: string;
179
180
  userId: string | null;
@@ -181,7 +182,6 @@ declare const conversationListResponseSchema: yup$1.ObjectSchema<{
181
182
  userDisplayName: string | null;
182
183
  userPrimaryEmail: string | null;
183
184
  userProfileImageUrl: string | null;
184
- priority: "low" | "normal" | "high" | "urgent";
185
185
  source: "email" | "manual" | "chat" | "api";
186
186
  lastMessageType: "message" | "internal-note" | "status-change";
187
187
  preview: string | null;
@@ -211,7 +211,8 @@ declare const conversationDetailResponseSchema: yup$1.ObjectSchema<{
211
211
  lastOutboundAt?: string | null | undefined;
212
212
  closedAt?: string | null | undefined;
213
213
  recordMetadata?: {} | null | undefined;
214
- status: "pending" | "open" | "closed";
214
+ status: "open" | "pending" | "closed";
215
+ priority: "low" | "normal" | "high" | "urgent";
215
216
  subject: string;
216
217
  conversationId: string;
217
218
  userId: string | null;
@@ -219,7 +220,6 @@ declare const conversationDetailResponseSchema: yup$1.ObjectSchema<{
219
220
  userDisplayName: string | null;
220
221
  userPrimaryEmail: string | null;
221
222
  userProfileImageUrl: string | null;
222
- priority: "low" | "normal" | "high" | "urgent";
223
223
  source: "email" | "manual" | "chat" | "api";
224
224
  lastMessageType: "message" | "internal-note" | "status-change";
225
225
  preview: string | null;
@@ -236,13 +236,13 @@ declare const conversationDetailResponseSchema: yup$1.ObjectSchema<{
236
236
  };
237
237
  };
238
238
  messages: {
239
+ status: "open" | "pending" | "closed";
239
240
  id: string;
240
- status: "pending" | "open" | "closed";
241
+ priority: "low" | "normal" | "high" | "urgent";
241
242
  subject: string;
242
243
  conversationId: string;
243
244
  userId: string | null;
244
245
  teamId: string | null;
245
- priority: "low" | "normal" | "high" | "urgent";
246
246
  source: "email" | "manual" | "chat" | "api";
247
247
  metadata: {} | null;
248
248
  createdAt: string;
@@ -251,8 +251,8 @@ declare const conversationDetailResponseSchema: yup$1.ObjectSchema<{
251
251
  attachments: {}[];
252
252
  sender: {
253
253
  type: "user" | "agent" | "system";
254
- id: string | null;
255
254
  displayName: string | null;
255
+ id: string | null;
256
256
  primaryEmail: string | null;
257
257
  };
258
258
  }[];
@@ -3,20 +3,20 @@ import { CrudTypeOf } from "../../crud.js";
3
3
  //#region src/interface/crud/current-user.d.ts
4
4
  declare const currentUserCrud: import("../../crud").CrudSchemaFromOptions<{
5
5
  clientReadSchema: import("yup").ObjectSchema<{
6
- id: string;
7
- display_name: string | null;
8
- primary_email: string | null;
9
- profile_image_url: string | null;
10
- signed_up_at_millis: number;
11
- selected_team_id: string | null;
12
- is_anonymous: boolean;
13
- is_restricted: boolean;
14
6
  restricted_reason: {
15
7
  type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
16
8
  } | null;
17
- requires_totp_mfa: boolean;
9
+ primary_email: string | null;
10
+ display_name: string | null;
18
11
  client_metadata: {} | null;
19
12
  client_read_only_metadata: {} | null;
13
+ id: string;
14
+ selected_team_id: string | null;
15
+ is_anonymous: boolean;
16
+ is_restricted: boolean;
17
+ requires_totp_mfa: boolean;
18
+ profile_image_url: string | null;
19
+ signed_up_at_millis: number;
20
20
  primary_email_verified: boolean;
21
21
  has_password: boolean;
22
22
  otp_auth_enabled: boolean;
@@ -33,8 +33,8 @@ declare const currentUserCrud: import("../../crud").CrudSchemaFromOptions<{
33
33
  selected_team: {
34
34
  client_metadata?: {} | null | undefined;
35
35
  client_read_only_metadata?: {} | null | undefined;
36
- id: string;
37
36
  display_name: string;
37
+ id: string;
38
38
  profile_image_url: string | null;
39
39
  } | null;
40
40
  }, import("yup").AnyObject, {
@@ -89,9 +89,9 @@ declare const currentUserCrud: import("../../crud").CrudSchemaFromOptions<{
89
89
  client_metadata?: {} | null | undefined;
90
90
  client_read_only_metadata?: {} | null | undefined;
91
91
  server_metadata?: {} | null | undefined;
92
+ display_name: string;
92
93
  id: string;
93
94
  created_at_millis: number;
94
- display_name: string;
95
95
  profile_image_url: string | null;
96
96
  } | null;
97
97
  selected_team_id: string | null;
@@ -171,11 +171,11 @@ declare const currentUserCrud: import("../../crud").CrudSchemaFromOptions<{
171
171
  requires_totp_mfa: undefined;
172
172
  }, "">;
173
173
  clientUpdateSchema: import("yup").ObjectSchema<{
174
- display_name: string | null | undefined;
175
174
  primary_email: string | null | undefined;
176
- profile_image_url: string | null | undefined;
177
- selected_team_id: string | null | undefined;
175
+ display_name: string | null | undefined;
178
176
  client_metadata: {} | null | undefined;
177
+ selected_team_id: string | null | undefined;
178
+ profile_image_url: string | null | undefined;
179
179
  otp_auth_enabled: boolean | undefined;
180
180
  passkey_auth_enabled: boolean | undefined;
181
181
  totp_secret_base64: string | null | undefined;