@hexclave/shared 1.0.28 → 1.0.29
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.
- package/dist/config/schema.d.ts +45 -45
- package/dist/esm/config/schema.d.ts +45 -45
- package/dist/esm/hooks/use-async-callback.js +1 -1
- package/dist/esm/hooks/use-async-external-store.js +1 -1
- package/dist/esm/hooks/use-strict-memo.js +1 -1
- package/dist/esm/interface/admin-interface.js +1 -1
- package/dist/esm/interface/admin-metrics.d.ts +13 -13
- package/dist/esm/interface/client-interface.js +1 -1
- package/dist/esm/interface/conversations.d.ts +28 -28
- package/dist/esm/interface/crud/current-user.d.ts +9 -9
- package/dist/esm/interface/crud/email-outbox.d.ts +248 -248
- package/dist/esm/interface/crud/invoices.d.ts +2 -2
- package/dist/esm/interface/crud/products.d.ts +9 -9
- package/dist/esm/interface/crud/products.d.ts.map +1 -1
- package/dist/esm/interface/crud/project-api-keys.d.ts +5 -5
- package/dist/esm/interface/crud/projects.d.ts +35 -35
- package/dist/esm/interface/crud/team-member-profiles.d.ts +14 -14
- package/dist/esm/interface/crud/transactions.d.ts +4 -4
- package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
- package/dist/esm/interface/crud/users.d.ts +12 -12
- package/dist/esm/interface/plan-usage.d.ts +2 -2
- package/dist/esm/interface/server-interface.js +1 -1
- package/dist/esm/interface/webhooks.d.ts +2 -2
- package/dist/esm/sessions.d.ts +6 -6
- package/dist/esm/utils/promises.d.ts +12 -1
- package/dist/esm/utils/promises.d.ts.map +1 -1
- package/dist/esm/utils/promises.js +58 -2
- package/dist/esm/utils/promises.js.map +1 -1
- package/dist/hooks/use-async-callback.js +1 -1
- package/dist/hooks/use-async-external-store.js +1 -1
- package/dist/hooks/use-strict-memo.js +1 -1
- package/dist/interface/admin-interface.js +1 -1
- package/dist/interface/admin-metrics.d.ts +13 -13
- package/dist/interface/client-interface.js +1 -1
- package/dist/interface/conversations.d.ts +28 -28
- package/dist/interface/crud/current-user.d.ts +9 -9
- package/dist/interface/crud/email-outbox.d.ts +248 -248
- package/dist/interface/crud/invoices.d.ts +2 -2
- package/dist/interface/crud/products.d.ts +9 -9
- package/dist/interface/crud/products.d.ts.map +1 -1
- package/dist/interface/crud/project-api-keys.d.ts +5 -5
- package/dist/interface/crud/projects.d.ts +35 -35
- package/dist/interface/crud/team-member-profiles.d.ts +14 -14
- package/dist/interface/crud/transactions.d.ts +4 -4
- package/dist/interface/crud/transactions.d.ts.map +1 -1
- package/dist/interface/crud/users.d.ts +12 -12
- package/dist/interface/plan-usage.d.ts +2 -2
- package/dist/interface/server-interface.js +1 -1
- package/dist/interface/webhooks.d.ts +2 -2
- package/dist/sessions.d.ts +6 -6
- package/dist/utils/promises.d.ts +12 -1
- package/dist/utils/promises.d.ts.map +1 -1
- package/dist/utils/promises.js +58 -1
- package/dist/utils/promises.js.map +1 -1
- package/package.json +1 -1
- package/src/utils/promises.tsx +65 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Result } from "../utils/results.js";
|
|
2
|
-
import { KnownErrors } from "../known-errors.js";
|
|
3
2
|
import { urlString } from "../utils/urls.js";
|
|
3
|
+
import { KnownErrors } from "../known-errors.js";
|
|
4
4
|
import { HexclaveServerInterface } from "./server-interface.js";
|
|
5
5
|
|
|
6
6
|
//#region src/interface/admin-interface.ts
|
|
@@ -150,23 +150,23 @@ declare const MetricsEmailOverviewSchema: yup.ObjectSchema<{
|
|
|
150
150
|
activity: number;
|
|
151
151
|
}[];
|
|
152
152
|
daily_emails_by_status: {
|
|
153
|
-
error: number;
|
|
154
|
-
ok: number;
|
|
155
153
|
date: string;
|
|
154
|
+
ok: number;
|
|
155
|
+
error: number;
|
|
156
156
|
in_progress: number;
|
|
157
157
|
}[];
|
|
158
158
|
emails_sent: number;
|
|
159
159
|
recent_emails: {
|
|
160
160
|
status: string;
|
|
161
161
|
id: string;
|
|
162
|
-
subject: string;
|
|
163
162
|
created_at_millis: number;
|
|
163
|
+
subject: string;
|
|
164
164
|
}[];
|
|
165
165
|
deliverability_status: {
|
|
166
166
|
error: number;
|
|
167
|
-
bounced: number;
|
|
168
167
|
in_progress: number;
|
|
169
168
|
delivered: number;
|
|
169
|
+
bounced: number;
|
|
170
170
|
};
|
|
171
171
|
deliverability_rate: number;
|
|
172
172
|
bounce_rate: number;
|
|
@@ -403,8 +403,8 @@ declare const AnalyticsClickmapResponseBodySchema: yup.ObjectSchema<{
|
|
|
403
403
|
replays: number;
|
|
404
404
|
}[];
|
|
405
405
|
users: {
|
|
406
|
-
primary_email: string | null;
|
|
407
406
|
display_name: string | null;
|
|
407
|
+
primary_email: string | null;
|
|
408
408
|
id: string;
|
|
409
409
|
profile_image_url: string | null;
|
|
410
410
|
clicks: number;
|
|
@@ -443,8 +443,8 @@ declare const AnalyticsClickmapResponseBodySchema: yup.ObjectSchema<{
|
|
|
443
443
|
elements: never[];
|
|
444
444
|
}, "">;
|
|
445
445
|
declare const MetricsActiveUsersByCountrySchema: yup.MixedSchema<Record<string, {
|
|
446
|
-
primary_email: string | null;
|
|
447
446
|
display_name: string | null;
|
|
447
|
+
primary_email: string | null;
|
|
448
448
|
id: string;
|
|
449
449
|
profile_image_url: string | null;
|
|
450
450
|
signed_up_at_millis: number;
|
|
@@ -471,24 +471,24 @@ declare const MetricsResponseBodySchema: yup.ObjectSchema<{
|
|
|
471
471
|
}[];
|
|
472
472
|
users_by_country: Record<string, number>;
|
|
473
473
|
active_users_by_country: Record<string, {
|
|
474
|
-
primary_email: string | null;
|
|
475
474
|
display_name: string | null;
|
|
475
|
+
primary_email: string | null;
|
|
476
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
|
-
primary_email: string | null;
|
|
483
482
|
display_name: string | null;
|
|
483
|
+
primary_email: string | null;
|
|
484
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
|
-
primary_email: string | null;
|
|
491
490
|
display_name: string | null;
|
|
491
|
+
primary_email: string | null;
|
|
492
492
|
id: string;
|
|
493
493
|
profile_image_url: string | null;
|
|
494
494
|
signed_up_at_millis: number;
|
|
@@ -563,23 +563,23 @@ 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
|
-
error: number;
|
|
567
|
-
ok: number;
|
|
568
566
|
date: string;
|
|
567
|
+
ok: number;
|
|
568
|
+
error: number;
|
|
569
569
|
in_progress: number;
|
|
570
570
|
}[];
|
|
571
571
|
emails_sent: number;
|
|
572
572
|
recent_emails: {
|
|
573
573
|
status: string;
|
|
574
574
|
id: string;
|
|
575
|
-
subject: string;
|
|
576
575
|
created_at_millis: number;
|
|
576
|
+
subject: string;
|
|
577
577
|
}[];
|
|
578
578
|
deliverability_status: {
|
|
579
579
|
error: number;
|
|
580
|
-
bounced: number;
|
|
581
580
|
in_progress: number;
|
|
582
581
|
delivered: number;
|
|
582
|
+
bounced: number;
|
|
583
583
|
};
|
|
584
584
|
deliverability_rate: number;
|
|
585
585
|
bounce_rate: number;
|
|
@@ -3,8 +3,8 @@ import { filterUndefined, filterUndefinedOrNull } from "../utils/objects.js";
|
|
|
3
3
|
import { deindent } from "../utils/strings.js";
|
|
4
4
|
import { publishableClientKeyNotNecessarySentinel } from "../utils/oauth.js";
|
|
5
5
|
import { Result } from "../utils/results.js";
|
|
6
|
-
import { KnownError, KnownErrors } from "../known-errors.js";
|
|
7
6
|
import { urlString } from "../utils/urls.js";
|
|
7
|
+
import { KnownError, KnownErrors } from "../known-errors.js";
|
|
8
8
|
import { AccessToken, InternalSession } from "../sessions.js";
|
|
9
9
|
import { generateSecureRandomString } from "../utils/crypto.js";
|
|
10
10
|
import { globalVar } from "../utils/globals.js";
|
|
@@ -139,8 +139,8 @@ declare const conversationMessageSchema: yup$1.ObjectSchema<{
|
|
|
139
139
|
createdAt: string;
|
|
140
140
|
sender: {
|
|
141
141
|
type: "user" | "agent" | "system";
|
|
142
|
-
displayName: string | null;
|
|
143
142
|
id: string | null;
|
|
143
|
+
displayName: string | null;
|
|
144
144
|
primaryEmail: string | null;
|
|
145
145
|
};
|
|
146
146
|
}, yup$1.AnyObject, {
|
|
@@ -174,17 +174,6 @@ declare const conversationListResponseSchema: yup$1.ObjectSchema<{
|
|
|
174
174
|
closedAt?: string | null | undefined;
|
|
175
175
|
recordMetadata?: {} | null | undefined;
|
|
176
176
|
status: "pending" | "open" | "closed";
|
|
177
|
-
source: "email" | "manual" | "chat" | "api";
|
|
178
|
-
metadata: {
|
|
179
|
-
tags: string[];
|
|
180
|
-
assignedToUserId: string | null;
|
|
181
|
-
assignedToDisplayName: string | null;
|
|
182
|
-
firstResponseDueAt: string | null;
|
|
183
|
-
firstResponseAt: string | null;
|
|
184
|
-
nextResponseDueAt: string | null;
|
|
185
|
-
lastCustomerReplyAt: string | null;
|
|
186
|
-
lastAgentReplyAt: string | null;
|
|
187
|
-
};
|
|
188
177
|
priority: "low" | "normal" | "high" | "urgent";
|
|
189
178
|
subject: string;
|
|
190
179
|
conversationId: string;
|
|
@@ -193,9 +182,20 @@ declare const conversationListResponseSchema: yup$1.ObjectSchema<{
|
|
|
193
182
|
userDisplayName: string | null;
|
|
194
183
|
userPrimaryEmail: string | null;
|
|
195
184
|
userProfileImageUrl: string | null;
|
|
185
|
+
source: "email" | "manual" | "chat" | "api";
|
|
196
186
|
lastMessageType: "message" | "internal-note" | "status-change";
|
|
197
187
|
preview: string | null;
|
|
198
188
|
lastActivityAt: string;
|
|
189
|
+
metadata: {
|
|
190
|
+
tags: string[];
|
|
191
|
+
assignedToUserId: string | null;
|
|
192
|
+
assignedToDisplayName: string | null;
|
|
193
|
+
firstResponseDueAt: string | null;
|
|
194
|
+
firstResponseAt: string | null;
|
|
195
|
+
nextResponseDueAt: string | null;
|
|
196
|
+
lastCustomerReplyAt: string | null;
|
|
197
|
+
lastAgentReplyAt: string | null;
|
|
198
|
+
};
|
|
199
199
|
}[];
|
|
200
200
|
hasMore: boolean;
|
|
201
201
|
}, yup$1.AnyObject, {
|
|
@@ -212,17 +212,6 @@ declare const conversationDetailResponseSchema: yup$1.ObjectSchema<{
|
|
|
212
212
|
closedAt?: string | null | undefined;
|
|
213
213
|
recordMetadata?: {} | null | undefined;
|
|
214
214
|
status: "pending" | "open" | "closed";
|
|
215
|
-
source: "email" | "manual" | "chat" | "api";
|
|
216
|
-
metadata: {
|
|
217
|
-
tags: string[];
|
|
218
|
-
assignedToUserId: string | null;
|
|
219
|
-
assignedToDisplayName: string | null;
|
|
220
|
-
firstResponseDueAt: string | null;
|
|
221
|
-
firstResponseAt: string | null;
|
|
222
|
-
nextResponseDueAt: string | null;
|
|
223
|
-
lastCustomerReplyAt: string | null;
|
|
224
|
-
lastAgentReplyAt: string | null;
|
|
225
|
-
};
|
|
226
215
|
priority: "low" | "normal" | "high" | "urgent";
|
|
227
216
|
subject: string;
|
|
228
217
|
conversationId: string;
|
|
@@ -231,34 +220,45 @@ declare const conversationDetailResponseSchema: yup$1.ObjectSchema<{
|
|
|
231
220
|
userDisplayName: string | null;
|
|
232
221
|
userPrimaryEmail: string | null;
|
|
233
222
|
userProfileImageUrl: string | null;
|
|
223
|
+
source: "email" | "manual" | "chat" | "api";
|
|
234
224
|
lastMessageType: "message" | "internal-note" | "status-change";
|
|
235
225
|
preview: string | null;
|
|
236
226
|
lastActivityAt: string;
|
|
227
|
+
metadata: {
|
|
228
|
+
tags: string[];
|
|
229
|
+
assignedToUserId: string | null;
|
|
230
|
+
assignedToDisplayName: string | null;
|
|
231
|
+
firstResponseDueAt: string | null;
|
|
232
|
+
firstResponseAt: string | null;
|
|
233
|
+
nextResponseDueAt: string | null;
|
|
234
|
+
lastCustomerReplyAt: string | null;
|
|
235
|
+
lastAgentReplyAt: string | null;
|
|
236
|
+
};
|
|
237
237
|
};
|
|
238
238
|
messages: {
|
|
239
239
|
status: "pending" | "open" | "closed";
|
|
240
|
-
body: string | null;
|
|
241
|
-
source: "email" | "manual" | "chat" | "api";
|
|
242
|
-
metadata: {} | null;
|
|
243
240
|
id: string;
|
|
244
241
|
priority: "low" | "normal" | "high" | "urgent";
|
|
245
242
|
subject: string;
|
|
246
243
|
conversationId: string;
|
|
247
244
|
userId: string | null;
|
|
248
245
|
teamId: string | null;
|
|
246
|
+
source: "email" | "manual" | "chat" | "api";
|
|
247
|
+
metadata: {} | null;
|
|
249
248
|
createdAt: string;
|
|
250
249
|
messageType: "message" | "internal-note" | "status-change";
|
|
250
|
+
body: string | null;
|
|
251
251
|
attachments: {}[];
|
|
252
252
|
sender: {
|
|
253
253
|
type: "user" | "agent" | "system";
|
|
254
|
-
displayName: string | null;
|
|
255
254
|
id: string | null;
|
|
255
|
+
displayName: string | null;
|
|
256
256
|
primaryEmail: string | null;
|
|
257
257
|
};
|
|
258
258
|
}[];
|
|
259
259
|
entryPoints: {
|
|
260
|
-
metadata: {} | null;
|
|
261
260
|
id: string;
|
|
261
|
+
metadata: {} | null;
|
|
262
262
|
createdAt: string;
|
|
263
263
|
updatedAt: string;
|
|
264
264
|
channelType: string;
|
|
@@ -5,24 +5,23 @@ import { CrudTypeOf } from "../../crud";
|
|
|
5
5
|
//#region src/interface/crud/current-user.d.ts
|
|
6
6
|
declare const currentUserCrud: ______crud0.CrudSchemaFromOptions<{
|
|
7
7
|
clientReadSchema: yup$1.ObjectSchema<{
|
|
8
|
+
display_name: string | null;
|
|
8
9
|
restricted_reason: {
|
|
9
10
|
type: "anonymous" | "email_not_verified" | "restricted_by_administrator";
|
|
10
11
|
} | null;
|
|
11
12
|
primary_email: string | null;
|
|
12
|
-
display_name: string | null;
|
|
13
13
|
client_metadata: {} | null;
|
|
14
14
|
client_read_only_metadata: {} | null;
|
|
15
15
|
id: string;
|
|
16
|
-
selected_team_id: string | null;
|
|
17
|
-
is_anonymous: boolean;
|
|
18
|
-
is_restricted: boolean;
|
|
19
|
-
requires_totp_mfa: boolean;
|
|
20
|
-
profile_image_url: string | null;
|
|
21
16
|
primary_email_verified: boolean;
|
|
17
|
+
profile_image_url: string | null;
|
|
18
|
+
selected_team_id: string | null;
|
|
22
19
|
signed_up_at_millis: number;
|
|
23
20
|
has_password: boolean;
|
|
24
21
|
otp_auth_enabled: boolean;
|
|
25
22
|
passkey_auth_enabled: boolean;
|
|
23
|
+
is_anonymous: boolean;
|
|
24
|
+
is_restricted: boolean;
|
|
26
25
|
restricted_by_admin: boolean;
|
|
27
26
|
restricted_by_admin_reason: string | null;
|
|
28
27
|
oauth_providers: {
|
|
@@ -31,6 +30,7 @@ declare const currentUserCrud: ______crud0.CrudSchemaFromOptions<{
|
|
|
31
30
|
account_id: string;
|
|
32
31
|
}[];
|
|
33
32
|
auth_with_email: boolean;
|
|
33
|
+
requires_totp_mfa: boolean;
|
|
34
34
|
} & {
|
|
35
35
|
selected_team: {
|
|
36
36
|
client_metadata?: {} | null | undefined;
|
|
@@ -93,8 +93,8 @@ declare const currentUserCrud: ______crud0.CrudSchemaFromOptions<{
|
|
|
93
93
|
server_metadata?: {} | null | undefined;
|
|
94
94
|
display_name: string;
|
|
95
95
|
id: string;
|
|
96
|
-
created_at_millis: number;
|
|
97
96
|
profile_image_url: string | null;
|
|
97
|
+
created_at_millis: number;
|
|
98
98
|
} | null;
|
|
99
99
|
selected_team_id: string | null;
|
|
100
100
|
profile_image_url: string | null;
|
|
@@ -173,11 +173,11 @@ declare const currentUserCrud: ______crud0.CrudSchemaFromOptions<{
|
|
|
173
173
|
requires_totp_mfa: undefined;
|
|
174
174
|
}, "">;
|
|
175
175
|
clientUpdateSchema: yup$1.ObjectSchema<{
|
|
176
|
-
primary_email: string | null | undefined;
|
|
177
176
|
display_name: string | null | undefined;
|
|
177
|
+
primary_email: string | null | undefined;
|
|
178
178
|
client_metadata: {} | null | undefined;
|
|
179
|
-
selected_team_id: string | null | undefined;
|
|
180
179
|
profile_image_url: string | null | undefined;
|
|
180
|
+
selected_team_id: string | null | undefined;
|
|
181
181
|
otp_auth_enabled: boolean | undefined;
|
|
182
182
|
passkey_auth_enabled: boolean | undefined;
|
|
183
183
|
totp_secret_base64: string | null | undefined;
|