@doist/twist-sdk 2.0.1 → 2.0.2
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.
|
@@ -138,7 +138,7 @@ exports.ThreadSchema = zod_1.z
|
|
|
138
138
|
snippet: zod_1.z.string(),
|
|
139
139
|
snippetCreator: zod_1.z.number(),
|
|
140
140
|
snippetMaskAvatarUrl: zod_1.z.string().nullable().optional(),
|
|
141
|
-
snippetMaskPoster: zod_1.z.
|
|
141
|
+
snippetMaskPoster: zod_1.z.string().nullable().optional(),
|
|
142
142
|
starred: zod_1.z.boolean(),
|
|
143
143
|
systemMessage: exports.SystemMessageSchema,
|
|
144
144
|
toEmails: zod_1.z.array(zod_1.z.string()).nullable().optional(),
|
|
@@ -325,7 +325,7 @@ exports.InboxThreadSchema = zod_1.z
|
|
|
325
325
|
snippet: zod_1.z.string(),
|
|
326
326
|
snippetCreator: zod_1.z.number(),
|
|
327
327
|
snippetMaskAvatarUrl: zod_1.z.string().nullable().optional(),
|
|
328
|
-
snippetMaskPoster: zod_1.z.
|
|
328
|
+
snippetMaskPoster: zod_1.z.string().nullable().optional(),
|
|
329
329
|
starred: zod_1.z.boolean(),
|
|
330
330
|
systemMessage: exports.SystemMessageSchema,
|
|
331
331
|
isArchived: zod_1.z.boolean(),
|
|
@@ -31,7 +31,10 @@ function transformTimestamps(obj) {
|
|
|
31
31
|
if (key.endsWith('Ts') && typeof value === 'number') {
|
|
32
32
|
// Remove 'Ts' suffix and convert to Date
|
|
33
33
|
var newKey = key.slice(0, -2);
|
|
34
|
-
|
|
34
|
+
// If the base key already exists in the original object, use *Date suffix
|
|
35
|
+
// to avoid overwriting it (e.g. pinned + pinnedTs → pinned + pinnedDate)
|
|
36
|
+
var targetKey = newKey in obj ? "".concat(newKey, "Date") : newKey;
|
|
37
|
+
result[targetKey] = timestampToDate(value);
|
|
35
38
|
}
|
|
36
39
|
else if (typeof value === 'object' && value !== null) {
|
|
37
40
|
// Recursively transform nested objects
|
|
@@ -135,7 +135,7 @@ export var ThreadSchema = z
|
|
|
135
135
|
snippet: z.string(),
|
|
136
136
|
snippetCreator: z.number(),
|
|
137
137
|
snippetMaskAvatarUrl: z.string().nullable().optional(),
|
|
138
|
-
snippetMaskPoster: z.
|
|
138
|
+
snippetMaskPoster: z.string().nullable().optional(),
|
|
139
139
|
starred: z.boolean(),
|
|
140
140
|
systemMessage: SystemMessageSchema,
|
|
141
141
|
toEmails: z.array(z.string()).nullable().optional(),
|
|
@@ -322,7 +322,7 @@ export var InboxThreadSchema = z
|
|
|
322
322
|
snippet: z.string(),
|
|
323
323
|
snippetCreator: z.number(),
|
|
324
324
|
snippetMaskAvatarUrl: z.string().nullable().optional(),
|
|
325
|
-
snippetMaskPoster: z.
|
|
325
|
+
snippetMaskPoster: z.string().nullable().optional(),
|
|
326
326
|
starred: z.boolean(),
|
|
327
327
|
systemMessage: SystemMessageSchema,
|
|
328
328
|
isArchived: z.boolean(),
|
|
@@ -27,7 +27,10 @@ export function transformTimestamps(obj) {
|
|
|
27
27
|
if (key.endsWith('Ts') && typeof value === 'number') {
|
|
28
28
|
// Remove 'Ts' suffix and convert to Date
|
|
29
29
|
var newKey = key.slice(0, -2);
|
|
30
|
-
|
|
30
|
+
// If the base key already exists in the original object, use *Date suffix
|
|
31
|
+
// to avoid overwriting it (e.g. pinned + pinnedTs → pinned + pinnedDate)
|
|
32
|
+
var targetKey = newKey in obj ? "".concat(newKey, "Date") : newKey;
|
|
33
|
+
result[targetKey] = timestampToDate(value);
|
|
31
34
|
}
|
|
32
35
|
else if (typeof value === 'object' && value !== null) {
|
|
33
36
|
// Recursively transform nested objects
|
|
@@ -145,7 +145,7 @@ export declare const ThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
145
145
|
snippet: z.ZodString;
|
|
146
146
|
snippetCreator: z.ZodNumber;
|
|
147
147
|
snippetMaskAvatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
148
|
-
snippetMaskPoster: z.ZodOptional<z.ZodNullable<z.
|
|
148
|
+
snippetMaskPoster: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
149
|
starred: z.ZodBoolean;
|
|
150
150
|
systemMessage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodUnknown]>>>;
|
|
151
151
|
toEmails: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
@@ -208,7 +208,7 @@ export declare const ThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
208
208
|
recipients?: number[] | null | undefined;
|
|
209
209
|
responders?: number[] | null | undefined;
|
|
210
210
|
snippetMaskAvatarUrl?: string | null | undefined;
|
|
211
|
-
snippetMaskPoster?: string |
|
|
211
|
+
snippetMaskPoster?: string | null | undefined;
|
|
212
212
|
systemMessage?: unknown;
|
|
213
213
|
toEmails?: string[] | null | undefined;
|
|
214
214
|
isSaved?: boolean | null | undefined;
|
|
@@ -268,7 +268,7 @@ export declare const ThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
268
268
|
recipients?: number[] | null | undefined;
|
|
269
269
|
responders?: number[] | null | undefined;
|
|
270
270
|
snippetMaskAvatarUrl?: string | null | undefined;
|
|
271
|
-
snippetMaskPoster?: string |
|
|
271
|
+
snippetMaskPoster?: string | null | undefined;
|
|
272
272
|
systemMessage?: unknown;
|
|
273
273
|
toEmails?: string[] | null | undefined;
|
|
274
274
|
isSaved?: boolean | null | undefined;
|
|
@@ -603,7 +603,7 @@ export declare const InboxThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
603
603
|
snippet: z.ZodString;
|
|
604
604
|
snippetCreator: z.ZodNumber;
|
|
605
605
|
snippetMaskAvatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
606
|
-
snippetMaskPoster: z.ZodOptional<z.ZodNullable<z.
|
|
606
|
+
snippetMaskPoster: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
607
607
|
starred: z.ZodBoolean;
|
|
608
608
|
systemMessage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodUnknown]>>>;
|
|
609
609
|
isArchived: z.ZodBoolean;
|
|
@@ -719,7 +719,7 @@ export declare const InboxThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
719
719
|
reactions?: Record<string, number[]> | null | undefined;
|
|
720
720
|
recipients?: number[] | null | undefined;
|
|
721
721
|
snippetMaskAvatarUrl?: string | null | undefined;
|
|
722
|
-
snippetMaskPoster?:
|
|
722
|
+
snippetMaskPoster?: string | null | undefined;
|
|
723
723
|
systemMessage?: unknown;
|
|
724
724
|
isSaved?: boolean | null | undefined;
|
|
725
725
|
responders?: number[] | null | undefined;
|
|
@@ -782,7 +782,7 @@ export declare const InboxThreadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
782
782
|
reactions?: Record<string, number[]> | null | undefined;
|
|
783
783
|
recipients?: number[] | null | undefined;
|
|
784
784
|
snippetMaskAvatarUrl?: string | null | undefined;
|
|
785
|
-
snippetMaskPoster?:
|
|
785
|
+
snippetMaskPoster?: string | null | undefined;
|
|
786
786
|
systemMessage?: unknown;
|
|
787
787
|
isSaved?: boolean | null | undefined;
|
|
788
788
|
responders?: number[] | null | undefined;
|