@doist/comms-sdk 0.4.3 → 0.4.4
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/cjs/types/entities.js +8 -8
- package/dist/cjs/utils/timestamp-conversion.js +23 -14
- package/dist/esm/types/entities.js +8 -8
- package/dist/esm/utils/timestamp-conversion.js +23 -14
- package/dist/types/clients/inbox-client.d.ts +3 -3
- package/dist/types/clients/threads-client.d.ts +3 -3
- package/dist/types/types/entities.d.ts +14 -14
- package/dist/types/utils/timestamp-conversion.d.ts +2 -2
- package/package.json +1 -1
|
@@ -136,8 +136,8 @@ function createChannelSchema(linkBaseUrl) {
|
|
|
136
136
|
}));
|
|
137
137
|
}
|
|
138
138
|
exports.ChannelSchema = createChannelSchema();
|
|
139
|
-
// Thread entity from API. `pinned` (boolean) and `
|
|
140
|
-
//
|
|
139
|
+
// Thread entity from API. `pinned` (boolean) and `pinnedDate` are both
|
|
140
|
+
// surfaced — `pinned` is kept for Zapier/webhook clients.
|
|
141
141
|
exports.ThreadObjectSchema = zod_1.z.object({
|
|
142
142
|
id: zod_1.z.string(),
|
|
143
143
|
title: zod_1.z.string(),
|
|
@@ -158,10 +158,10 @@ exports.ThreadObjectSchema = zod_1.z.object({
|
|
|
158
158
|
lastUpdated: zod_1.z.date(),
|
|
159
159
|
mutedUntil: zod_1.z.date().nullable().optional(),
|
|
160
160
|
participants: zod_1.z.array(zod_1.z.number()).nullable().optional(),
|
|
161
|
-
// Backend wire shape only includes `pinned_ts` (epoch
|
|
162
|
-
//
|
|
161
|
+
// Backend wire shape only includes `pinned_ts` (epoch seconds or null);
|
|
162
|
+
// response normalization exposes that timestamp as `pinnedDate`.
|
|
163
163
|
pinned: zod_1.z.boolean().optional(),
|
|
164
|
-
|
|
164
|
+
pinnedDate: zod_1.z.date().nullable().optional(),
|
|
165
165
|
posted: zod_1.z.date(),
|
|
166
166
|
reactions: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).nullable().optional(),
|
|
167
167
|
recipients: zod_1.z.array(zod_1.z.number()).nullable().optional(),
|
|
@@ -370,10 +370,10 @@ function createInboxThreadObjectSchema(linkBaseUrl) {
|
|
|
370
370
|
lastUpdated: zod_1.z.date(),
|
|
371
371
|
mutedUntil: zod_1.z.date().nullable().optional(),
|
|
372
372
|
participants: zod_1.z.array(zod_1.z.number()).nullable().optional(),
|
|
373
|
-
// Backend wire shape only includes `pinned_ts` (epoch
|
|
374
|
-
//
|
|
373
|
+
// Backend wire shape only includes `pinned_ts` (epoch seconds or null);
|
|
374
|
+
// response normalization exposes that timestamp as `pinnedDate`.
|
|
375
375
|
pinned: zod_1.z.boolean().optional(),
|
|
376
|
-
|
|
376
|
+
pinnedDate: zod_1.z.date().nullable().optional(),
|
|
377
377
|
posted: zod_1.z.date(),
|
|
378
378
|
reactions: zod_1.z.record(zod_1.z.string(), zod_1.z.array(zod_1.z.number())).nullable().optional(),
|
|
379
379
|
recipients: zod_1.z.array(zod_1.z.number()).nullable().optional(),
|
|
@@ -10,9 +10,10 @@ exports.transformTimestamps = transformTimestamps;
|
|
|
10
10
|
function timestampToDate(timestamp) {
|
|
11
11
|
return new Date(timestamp * 1000);
|
|
12
12
|
}
|
|
13
|
+
const timestampFieldTargetOverrides = new Map([['pinnedTs', 'pinnedDate']]);
|
|
13
14
|
/**
|
|
14
|
-
* Recursively transforms
|
|
15
|
-
* Also renames
|
|
15
|
+
* Recursively transforms timestamp fields (ending in 'Ts') in an object to Date objects.
|
|
16
|
+
* Also renames converted fields by removing the 'Ts' suffix.
|
|
16
17
|
* @param obj - The object to transform
|
|
17
18
|
* @returns The transformed object with Date fields
|
|
18
19
|
*/
|
|
@@ -26,22 +27,30 @@ function transformTimestamps(obj) {
|
|
|
26
27
|
if (typeof obj === 'object') {
|
|
27
28
|
const result = {};
|
|
28
29
|
for (const [key, value] of Object.entries(obj)) {
|
|
29
|
-
// Check if the key ends with 'Ts'
|
|
30
|
-
if (key.endsWith('Ts')
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
// Check if the key ends with 'Ts'
|
|
31
|
+
if (key.endsWith('Ts')) {
|
|
32
|
+
const overriddenTargetKey = timestampFieldTargetOverrides.get(key);
|
|
33
|
+
if (typeof value === 'number') {
|
|
34
|
+
// Remove 'Ts' suffix and convert to Date
|
|
35
|
+
const newKey = key.slice(0, -2);
|
|
36
|
+
// If the base key already exists in the original object, use *Date suffix
|
|
37
|
+
// to avoid overwriting it (e.g. posted + postedTs → posted + postedDate)
|
|
38
|
+
const targetKey = overriddenTargetKey ??
|
|
39
|
+
(newKey in obj ? `${newKey}Date` : newKey);
|
|
40
|
+
result[targetKey] = timestampToDate(value);
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (overriddenTargetKey) {
|
|
44
|
+
result[overriddenTargetKey] = value;
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
|
-
|
|
48
|
+
if (typeof value === 'object' && value !== null) {
|
|
39
49
|
// Recursively transform nested objects
|
|
40
50
|
result[key] = transformTimestamps(value);
|
|
51
|
+
continue;
|
|
41
52
|
}
|
|
42
|
-
|
|
43
|
-
result[key] = value;
|
|
44
|
-
}
|
|
53
|
+
result[key] = value;
|
|
45
54
|
}
|
|
46
55
|
return result;
|
|
47
56
|
}
|
|
@@ -126,8 +126,8 @@ export function createChannelSchema(linkBaseUrl) {
|
|
|
126
126
|
}));
|
|
127
127
|
}
|
|
128
128
|
export const ChannelSchema = createChannelSchema();
|
|
129
|
-
// Thread entity from API. `pinned` (boolean) and `
|
|
130
|
-
//
|
|
129
|
+
// Thread entity from API. `pinned` (boolean) and `pinnedDate` are both
|
|
130
|
+
// surfaced — `pinned` is kept for Zapier/webhook clients.
|
|
131
131
|
export const ThreadObjectSchema = z.object({
|
|
132
132
|
id: z.string(),
|
|
133
133
|
title: z.string(),
|
|
@@ -148,10 +148,10 @@ export const ThreadObjectSchema = z.object({
|
|
|
148
148
|
lastUpdated: z.date(),
|
|
149
149
|
mutedUntil: z.date().nullable().optional(),
|
|
150
150
|
participants: z.array(z.number()).nullable().optional(),
|
|
151
|
-
// Backend wire shape only includes `pinned_ts` (epoch
|
|
152
|
-
//
|
|
151
|
+
// Backend wire shape only includes `pinned_ts` (epoch seconds or null);
|
|
152
|
+
// response normalization exposes that timestamp as `pinnedDate`.
|
|
153
153
|
pinned: z.boolean().optional(),
|
|
154
|
-
|
|
154
|
+
pinnedDate: z.date().nullable().optional(),
|
|
155
155
|
posted: z.date(),
|
|
156
156
|
reactions: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
157
157
|
recipients: z.array(z.number()).nullable().optional(),
|
|
@@ -360,10 +360,10 @@ export function createInboxThreadObjectSchema(linkBaseUrl) {
|
|
|
360
360
|
lastUpdated: z.date(),
|
|
361
361
|
mutedUntil: z.date().nullable().optional(),
|
|
362
362
|
participants: z.array(z.number()).nullable().optional(),
|
|
363
|
-
// Backend wire shape only includes `pinned_ts` (epoch
|
|
364
|
-
//
|
|
363
|
+
// Backend wire shape only includes `pinned_ts` (epoch seconds or null);
|
|
364
|
+
// response normalization exposes that timestamp as `pinnedDate`.
|
|
365
365
|
pinned: z.boolean().optional(),
|
|
366
|
-
|
|
366
|
+
pinnedDate: z.date().nullable().optional(),
|
|
367
367
|
posted: z.date(),
|
|
368
368
|
reactions: z.record(z.string(), z.array(z.number())).nullable().optional(),
|
|
369
369
|
recipients: z.array(z.number()).nullable().optional(),
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
export function timestampToDate(timestamp) {
|
|
7
7
|
return new Date(timestamp * 1000);
|
|
8
8
|
}
|
|
9
|
+
const timestampFieldTargetOverrides = new Map([['pinnedTs', 'pinnedDate']]);
|
|
9
10
|
/**
|
|
10
|
-
* Recursively transforms
|
|
11
|
-
* Also renames
|
|
11
|
+
* Recursively transforms timestamp fields (ending in 'Ts') in an object to Date objects.
|
|
12
|
+
* Also renames converted fields by removing the 'Ts' suffix.
|
|
12
13
|
* @param obj - The object to transform
|
|
13
14
|
* @returns The transformed object with Date fields
|
|
14
15
|
*/
|
|
@@ -22,22 +23,30 @@ export function transformTimestamps(obj) {
|
|
|
22
23
|
if (typeof obj === 'object') {
|
|
23
24
|
const result = {};
|
|
24
25
|
for (const [key, value] of Object.entries(obj)) {
|
|
25
|
-
// Check if the key ends with 'Ts'
|
|
26
|
-
if (key.endsWith('Ts')
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
// Check if the key ends with 'Ts'
|
|
27
|
+
if (key.endsWith('Ts')) {
|
|
28
|
+
const overriddenTargetKey = timestampFieldTargetOverrides.get(key);
|
|
29
|
+
if (typeof value === 'number') {
|
|
30
|
+
// Remove 'Ts' suffix and convert to Date
|
|
31
|
+
const newKey = key.slice(0, -2);
|
|
32
|
+
// If the base key already exists in the original object, use *Date suffix
|
|
33
|
+
// to avoid overwriting it (e.g. posted + postedTs → posted + postedDate)
|
|
34
|
+
const targetKey = overriddenTargetKey ??
|
|
35
|
+
(newKey in obj ? `${newKey}Date` : newKey);
|
|
36
|
+
result[targetKey] = timestampToDate(value);
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if (overriddenTargetKey) {
|
|
40
|
+
result[overriddenTargetKey] = value;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
33
43
|
}
|
|
34
|
-
|
|
44
|
+
if (typeof value === 'object' && value !== null) {
|
|
35
45
|
// Recursively transform nested objects
|
|
36
46
|
result[key] = transformTimestamps(value);
|
|
47
|
+
continue;
|
|
37
48
|
}
|
|
38
|
-
|
|
39
|
-
result[key] = value;
|
|
40
|
-
}
|
|
49
|
+
result[key] = value;
|
|
41
50
|
}
|
|
42
51
|
return result;
|
|
43
52
|
}
|
|
@@ -39,7 +39,7 @@ export declare const InboxThreadListSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
|
39
39
|
mutedUntil: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
40
40
|
participants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
41
41
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
-
|
|
42
|
+
pinnedDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
43
43
|
posted: z.ZodDate;
|
|
44
44
|
reactions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNumber>>>>;
|
|
45
45
|
recipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
@@ -227,7 +227,7 @@ export declare const InboxThreadListSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
|
227
227
|
mutedUntil?: Date | null | undefined;
|
|
228
228
|
participants?: number[] | null | undefined;
|
|
229
229
|
pinned?: boolean | undefined;
|
|
230
|
-
|
|
230
|
+
pinnedDate?: Date | null | undefined;
|
|
231
231
|
reactions?: Record<string, number[]> | null | undefined;
|
|
232
232
|
recipients?: number[] | null | undefined;
|
|
233
233
|
snippetMaskAvatarUrl?: string | null | undefined;
|
|
@@ -325,7 +325,7 @@ export declare const InboxThreadListSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
|
325
325
|
mutedUntil?: Date | null | undefined;
|
|
326
326
|
participants?: number[] | null | undefined;
|
|
327
327
|
pinned?: boolean | undefined;
|
|
328
|
-
|
|
328
|
+
pinnedDate?: Date | null | undefined;
|
|
329
329
|
reactions?: Record<string, number[]> | null | undefined;
|
|
330
330
|
recipients?: number[] | null | undefined;
|
|
331
331
|
snippetMaskAvatarUrl?: string | null | undefined;
|
|
@@ -40,7 +40,7 @@ export declare const ThreadListSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
|
40
40
|
mutedUntil: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
41
41
|
participants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
42
42
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
-
|
|
43
|
+
pinnedDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
44
44
|
posted: z.ZodDate;
|
|
45
45
|
reactions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
46
46
|
recipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
@@ -139,7 +139,7 @@ export declare const ThreadListSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
|
139
139
|
mutedUntil?: Date | null | undefined;
|
|
140
140
|
participants?: number[] | null | undefined;
|
|
141
141
|
pinned?: boolean | undefined;
|
|
142
|
-
|
|
142
|
+
pinnedDate?: Date | null | undefined;
|
|
143
143
|
reactions?: Record<string, unknown> | null | undefined;
|
|
144
144
|
recipients?: number[] | null | undefined;
|
|
145
145
|
responders?: number[] | null | undefined;
|
|
@@ -234,7 +234,7 @@ export declare const ThreadListSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
|
234
234
|
mutedUntil?: Date | null | undefined;
|
|
235
235
|
participants?: number[] | null | undefined;
|
|
236
236
|
pinned?: boolean | undefined;
|
|
237
|
-
|
|
237
|
+
pinnedDate?: Date | null | undefined;
|
|
238
238
|
reactions?: Record<string, unknown> | null | undefined;
|
|
239
239
|
recipients?: number[] | null | undefined;
|
|
240
240
|
responders?: number[] | null | undefined;
|
|
@@ -277,7 +277,7 @@ export declare const ThreadObjectSchema: z.ZodObject<{
|
|
|
277
277
|
mutedUntil: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
278
278
|
participants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
279
279
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
280
|
-
|
|
280
|
+
pinnedDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
281
281
|
posted: z.ZodDate;
|
|
282
282
|
reactions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
283
283
|
recipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
@@ -371,7 +371,7 @@ export declare function createThreadSchema(linkBaseUrl?: string): z.ZodPipe<z.Zo
|
|
|
371
371
|
mutedUntil: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
372
372
|
participants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
373
373
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
374
|
-
|
|
374
|
+
pinnedDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
375
375
|
posted: z.ZodDate;
|
|
376
376
|
reactions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
377
377
|
recipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
@@ -470,7 +470,7 @@ export declare function createThreadSchema(linkBaseUrl?: string): z.ZodPipe<z.Zo
|
|
|
470
470
|
mutedUntil?: Date | null | undefined;
|
|
471
471
|
participants?: number[] | null | undefined;
|
|
472
472
|
pinned?: boolean | undefined;
|
|
473
|
-
|
|
473
|
+
pinnedDate?: Date | null | undefined;
|
|
474
474
|
reactions?: Record<string, unknown> | null | undefined;
|
|
475
475
|
recipients?: number[] | null | undefined;
|
|
476
476
|
responders?: number[] | null | undefined;
|
|
@@ -565,7 +565,7 @@ export declare function createThreadSchema(linkBaseUrl?: string): z.ZodPipe<z.Zo
|
|
|
565
565
|
mutedUntil?: Date | null | undefined;
|
|
566
566
|
participants?: number[] | null | undefined;
|
|
567
567
|
pinned?: boolean | undefined;
|
|
568
|
-
|
|
568
|
+
pinnedDate?: Date | null | undefined;
|
|
569
569
|
reactions?: Record<string, unknown> | null | undefined;
|
|
570
570
|
recipients?: number[] | null | undefined;
|
|
571
571
|
responders?: number[] | null | undefined;
|
|
@@ -656,7 +656,7 @@ export declare const ThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
656
656
|
mutedUntil: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
657
657
|
participants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
658
658
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
659
|
-
|
|
659
|
+
pinnedDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
660
660
|
posted: z.ZodDate;
|
|
661
661
|
reactions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
662
662
|
recipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
@@ -755,7 +755,7 @@ export declare const ThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
755
755
|
mutedUntil?: Date | null | undefined;
|
|
756
756
|
participants?: number[] | null | undefined;
|
|
757
757
|
pinned?: boolean | undefined;
|
|
758
|
-
|
|
758
|
+
pinnedDate?: Date | null | undefined;
|
|
759
759
|
reactions?: Record<string, unknown> | null | undefined;
|
|
760
760
|
recipients?: number[] | null | undefined;
|
|
761
761
|
responders?: number[] | null | undefined;
|
|
@@ -850,7 +850,7 @@ export declare const ThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
850
850
|
mutedUntil?: Date | null | undefined;
|
|
851
851
|
participants?: number[] | null | undefined;
|
|
852
852
|
pinned?: boolean | undefined;
|
|
853
|
-
|
|
853
|
+
pinnedDate?: Date | null | undefined;
|
|
854
854
|
reactions?: Record<string, unknown> | null | undefined;
|
|
855
855
|
recipients?: number[] | null | undefined;
|
|
856
856
|
responders?: number[] | null | undefined;
|
|
@@ -1883,7 +1883,7 @@ export declare function createInboxThreadObjectSchema(linkBaseUrl?: string): z.Z
|
|
|
1883
1883
|
mutedUntil: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1884
1884
|
participants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
1885
1885
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
1886
|
-
|
|
1886
|
+
pinnedDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1887
1887
|
posted: z.ZodDate;
|
|
1888
1888
|
reactions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNumber>>>>;
|
|
1889
1889
|
recipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
@@ -2064,7 +2064,7 @@ export declare function createInboxThreadSchema(linkBaseUrl?: string): z.ZodPipe
|
|
|
2064
2064
|
mutedUntil: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
2065
2065
|
participants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
2066
2066
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
2067
|
-
|
|
2067
|
+
pinnedDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
2068
2068
|
posted: z.ZodDate;
|
|
2069
2069
|
reactions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNumber>>>>;
|
|
2070
2070
|
recipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
@@ -2252,7 +2252,7 @@ export declare function createInboxThreadSchema(linkBaseUrl?: string): z.ZodPipe
|
|
|
2252
2252
|
mutedUntil?: Date | null | undefined;
|
|
2253
2253
|
participants?: number[] | null | undefined;
|
|
2254
2254
|
pinned?: boolean | undefined;
|
|
2255
|
-
|
|
2255
|
+
pinnedDate?: Date | null | undefined;
|
|
2256
2256
|
reactions?: Record<string, number[]> | null | undefined;
|
|
2257
2257
|
recipients?: number[] | null | undefined;
|
|
2258
2258
|
snippetMaskAvatarUrl?: string | null | undefined;
|
|
@@ -2350,7 +2350,7 @@ export declare function createInboxThreadSchema(linkBaseUrl?: string): z.ZodPipe
|
|
|
2350
2350
|
mutedUntil?: Date | null | undefined;
|
|
2351
2351
|
participants?: number[] | null | undefined;
|
|
2352
2352
|
pinned?: boolean | undefined;
|
|
2353
|
-
|
|
2353
|
+
pinnedDate?: Date | null | undefined;
|
|
2354
2354
|
reactions?: Record<string, number[]> | null | undefined;
|
|
2355
2355
|
recipients?: number[] | null | undefined;
|
|
2356
2356
|
snippetMaskAvatarUrl?: string | null | undefined;
|
|
@@ -2442,7 +2442,7 @@ export declare const InboxThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2442
2442
|
mutedUntil: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
2443
2443
|
participants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
2444
2444
|
pinned: z.ZodOptional<z.ZodBoolean>;
|
|
2445
|
-
|
|
2445
|
+
pinnedDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
2446
2446
|
posted: z.ZodDate;
|
|
2447
2447
|
reactions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNumber>>>>;
|
|
2448
2448
|
recipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
@@ -2630,7 +2630,7 @@ export declare const InboxThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2630
2630
|
mutedUntil?: Date | null | undefined;
|
|
2631
2631
|
participants?: number[] | null | undefined;
|
|
2632
2632
|
pinned?: boolean | undefined;
|
|
2633
|
-
|
|
2633
|
+
pinnedDate?: Date | null | undefined;
|
|
2634
2634
|
reactions?: Record<string, number[]> | null | undefined;
|
|
2635
2635
|
recipients?: number[] | null | undefined;
|
|
2636
2636
|
snippetMaskAvatarUrl?: string | null | undefined;
|
|
@@ -2728,7 +2728,7 @@ export declare const InboxThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2728
2728
|
mutedUntil?: Date | null | undefined;
|
|
2729
2729
|
participants?: number[] | null | undefined;
|
|
2730
2730
|
pinned?: boolean | undefined;
|
|
2731
|
-
|
|
2731
|
+
pinnedDate?: Date | null | undefined;
|
|
2732
2732
|
reactions?: Record<string, number[]> | null | undefined;
|
|
2733
2733
|
recipients?: number[] | null | undefined;
|
|
2734
2734
|
snippetMaskAvatarUrl?: string | null | undefined;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function timestampToDate(timestamp: number): Date;
|
|
7
7
|
/**
|
|
8
|
-
* Recursively transforms
|
|
9
|
-
* Also renames
|
|
8
|
+
* Recursively transforms timestamp fields (ending in 'Ts') in an object to Date objects.
|
|
9
|
+
* Also renames converted fields by removing the 'Ts' suffix.
|
|
10
10
|
* @param obj - The object to transform
|
|
11
11
|
* @returns The transformed object with Date fields
|
|
12
12
|
*/
|