@driveflux/api-functions 1.0.70 → 1.0.72

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 (67) hide show
  1. package/dist/auth/confirm.js +29 -24
  2. package/dist/auth/emails.js +13 -12
  3. package/dist/auth/formatter.js +5 -5
  4. package/dist/auth/otp.js +50 -66
  5. package/dist/auth/register.js +34 -42
  6. package/dist/auth/tokens.d.ts +3 -3
  7. package/dist/auth/tokens.js +55 -58
  8. package/dist/auth/verifications.js +52 -53
  9. package/dist/constants.js +1 -0
  10. package/dist/create-logger.js +2 -1
  11. package/dist/mailjet/calls/manage-contacts-in-list.js +6 -5
  12. package/dist/mailjet/calls/manage-subscription-status.js +5 -4
  13. package/dist/mailjet/calls/request-service.js +6 -7
  14. package/dist/mailjet/refresh-email-preferences.js +12 -11
  15. package/dist/mailjet/set-contact.js +12 -11
  16. package/dist/mailjet/types.js +2 -1
  17. package/dist/mailjet/utils/convert-to-array.js +6 -8
  18. package/dist/mailjet/utils/extract-email-preferences.js +15 -14
  19. package/dist/mailjet/utils/lists.js +8 -7
  20. package/dist/mailjet/utils/update-email-references.js +15 -16
  21. package/dist/notion/client.js +19 -22
  22. package/dist/notion/helpful.js +9 -6
  23. package/dist/notion/schemas/block.js +48 -42
  24. package/dist/notion/schemas/common.js +14 -9
  25. package/dist/notion/schemas/database.d.ts +3 -3
  26. package/dist/notion/schemas/database.js +60 -62
  27. package/dist/notion/schemas/emoji.js +2 -1
  28. package/dist/notion/schemas/file.d.ts +1 -1
  29. package/dist/notion/schemas/file.js +9 -9
  30. package/dist/notion/schemas/kb.d.ts +4 -4
  31. package/dist/notion/schemas/kb.js +6 -5
  32. package/dist/notion/schemas/page.d.ts +4 -4
  33. package/dist/notion/schemas/page.js +61 -72
  34. package/dist/notion/schemas/parent.js +5 -4
  35. package/dist/notion/schemas/user.js +19 -18
  36. package/dist/reservation/agree.d.ts +308 -1
  37. package/dist/reservation/agree.js +7 -6
  38. package/dist/reservation/checks.d.ts +1 -1
  39. package/dist/reservation/checks.js +4 -3
  40. package/dist/reservation/display-vehicle.d.ts +21 -16
  41. package/dist/reservation/display-vehicle.d.ts.map +1 -1
  42. package/dist/reservation/display-vehicle.js +74 -66
  43. package/dist/reservation/display-vehicle.js.map +1 -1
  44. package/dist/reservation/ensure-user-billing-address.js +11 -9
  45. package/dist/reservation/fetch-or-create.d.ts +2 -2
  46. package/dist/reservation/fetch-or-create.d.ts.map +1 -1
  47. package/dist/reservation/fetch-or-create.js +102 -83
  48. package/dist/reservation/fetch-or-create.js.map +1 -1
  49. package/dist/reservation/invoice.d.ts +3 -3
  50. package/dist/reservation/invoice.d.ts.map +1 -1
  51. package/dist/reservation/invoice.js +125 -76
  52. package/dist/reservation/invoice.js.map +1 -1
  53. package/dist/reservation/payer.js +6 -5
  54. package/dist/reservation/payment-intent-sync.js +6 -4
  55. package/dist/reservation/reserve.d.ts.map +1 -1
  56. package/dist/reservation/reserve.js +5 -3
  57. package/dist/reservation/reserve.js.map +1 -1
  58. package/dist/reservation/types.d.ts +1 -0
  59. package/dist/reservation/types.d.ts.map +1 -1
  60. package/dist/reservation/types.js +2 -1
  61. package/dist/reservation/vehicle.js +16 -13
  62. package/dist/slack.js +29 -24
  63. package/dist/validation.js +79 -77
  64. package/dist/vehicle/vehicle-pricing/constants.js +19 -22
  65. package/dist/vehicle/vehicle-pricing/index.js +42 -28
  66. package/dist/vehicle/vehicle-pricing/types.js +2 -1
  67. package/package.json +11 -10
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const notionFileSchema: z.ZodObject<{
3
3
  type: z.ZodEnum<{
4
- external: "external";
5
4
  file: "file";
5
+ external: "external";
6
6
  }>;
7
7
  name: z.ZodOptional<z.ZodString>;
8
8
  file: z.ZodOptional<z.ZodObject<{
@@ -1,18 +1,18 @@
1
1
  import { z } from 'zod';
2
2
  import { notionTimeFormat } from './common.js';
3
3
  export const notionFileSchema = z.object({
4
- type: z.enum([
5
- 'file',
6
- 'external'
7
- ]),
4
+ type: z.enum(['file', 'external']),
8
5
  name: z.string().optional(),
9
6
  // type file
10
- file: z.object({
7
+ file: z
8
+ .object({
11
9
  url: z.string().url(),
12
- expiry_time: notionTimeFormat
13
- }).optional(),
10
+ expiry_time: notionTimeFormat,
11
+ })
12
+ .optional(),
14
13
  // type external
15
14
  external: z.object({
16
- url: z.string().url()
17
- })
15
+ url: z.string().url(),
16
+ }),
18
17
  });
18
+ //# sourceMappingURL=file.js.map
@@ -188,8 +188,8 @@ export declare const knowledgeBaseRetrieveDatabaseSchema: z.ZodObject<{
188
188
  }, z.core.$strip>>;
189
189
  icon: z.ZodUnion<[z.ZodObject<{
190
190
  type: z.ZodEnum<{
191
- external: "external";
192
191
  file: "file";
192
+ external: "external";
193
193
  }>;
194
194
  name: z.ZodOptional<z.ZodString>;
195
195
  file: z.ZodOptional<z.ZodObject<{
@@ -205,8 +205,8 @@ export declare const knowledgeBaseRetrieveDatabaseSchema: z.ZodObject<{
205
205
  }, z.core.$strip>]>;
206
206
  cover: z.ZodNullable<z.ZodObject<{
207
207
  type: z.ZodEnum<{
208
- external: "external";
209
208
  file: "file";
209
+ external: "external";
210
210
  }>;
211
211
  name: z.ZodOptional<z.ZodString>;
212
212
  file: z.ZodOptional<z.ZodObject<{
@@ -611,8 +611,8 @@ export declare const knowledgeBaseRetrievePageSchema: z.ZodObject<{
611
611
  archived: z.ZodBoolean;
612
612
  icon: z.ZodNullable<z.ZodUnion<[z.ZodObject<{
613
613
  type: z.ZodEnum<{
614
- external: "external";
615
614
  file: "file";
615
+ external: "external";
616
616
  }>;
617
617
  name: z.ZodOptional<z.ZodString>;
618
618
  file: z.ZodOptional<z.ZodObject<{
@@ -1123,8 +1123,8 @@ export declare const knowledgeBaseQueryDatabaseSchema: z.ZodObject<{
1123
1123
  archived: z.ZodBoolean;
1124
1124
  icon: z.ZodNullable<z.ZodUnion<[z.ZodObject<{
1125
1125
  type: z.ZodEnum<{
1126
- external: "external";
1127
1126
  file: "file";
1127
+ external: "external";
1128
1128
  }>;
1129
1129
  name: z.ZodOptional<z.ZodString>;
1130
1130
  file: z.ZodOptional<z.ZodObject<{
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { notionDatabasePropertyCheckboxSchema, notionDatabasePropertyCreatedBySchema, notionDatabasePropertyCreatedTimeSchema, notionDatabasePropertyDateSchema, notionDatabasePropertyFormulaSchema, notionDatabasePropertyLastEditedBySchema, notionDatabasePropertyLastEditedTimeSchema, notionDatabasePropertyMultiSelectSchema, notionDatabasePropertyNumberSchema, notionDatabasePropertyRelationSchema, notionDatabasePropertySelectSchema, notionDatabasePropertyStatusSchema, notionDatabasePropertyTitleSchema, notionDatabasePropertyUniqueIdSchema, notionDatabaseSchema } from './database.js';
3
- import { notionPagePropertyCheckboxSchema, notionPagePropertyCreatedBySchema, notionPagePropertyCreatedTimeSchema, notionPagePropertyDateSchema, notionPagePropertyFormulaSchema, notionPagePropertyLastEditedBySchema, notionPagePropertyLastEditedTimeSchema, notionPagePropertyMultiSelectSchema, notionPagePropertyNumberSchema, notionPagePropertyRelationSchema, notionPagePropertyRichTextSchema, notionPagePropertySelectSchema, notionPagePropertyStatusSchema, notionPagePropertyTitleSchema, notionPagePropertyUniqueIdSchema, notionPageSchema, notionPagesSchema } from './page.js';
2
+ import { notionDatabasePropertyCheckboxSchema, notionDatabasePropertyCreatedBySchema, notionDatabasePropertyCreatedTimeSchema, notionDatabasePropertyDateSchema, notionDatabasePropertyFormulaSchema, notionDatabasePropertyLastEditedBySchema, notionDatabasePropertyLastEditedTimeSchema, notionDatabasePropertyMultiSelectSchema, notionDatabasePropertyNumberSchema, notionDatabasePropertyRelationSchema, notionDatabasePropertySelectSchema, notionDatabasePropertyStatusSchema, notionDatabasePropertyTitleSchema, notionDatabasePropertyUniqueIdSchema, notionDatabaseSchema, } from './database.js';
3
+ import { notionPagePropertyCheckboxSchema, notionPagePropertyCreatedBySchema, notionPagePropertyCreatedTimeSchema, notionPagePropertyDateSchema, notionPagePropertyFormulaSchema, notionPagePropertyLastEditedBySchema, notionPagePropertyLastEditedTimeSchema, notionPagePropertyMultiSelectSchema, notionPagePropertyNumberSchema, notionPagePropertyRelationSchema, notionPagePropertyRichTextSchema, notionPagePropertySelectSchema, notionPagePropertyStatusSchema, notionPagePropertyTitleSchema, notionPagePropertyUniqueIdSchema, notionPageSchema, notionPagesSchema, } from './page.js';
4
4
  export const knowledgeBaseRetrieveDatabaseSchema = notionDatabaseSchema(z.object({
5
5
  Title: notionDatabasePropertyTitleSchema,
6
6
  Status: notionDatabasePropertyStatusSchema,
@@ -22,7 +22,7 @@ export const knowledgeBaseRetrieveDatabaseSchema = notionDatabaseSchema(z.object
22
22
  'Section Slug': notionDatabasePropertyFormulaSchema,
23
23
  'Topic Slug': notionDatabasePropertyFormulaSchema,
24
24
  Helpful: notionDatabasePropertyNumberSchema,
25
- Unhelpful: notionDatabasePropertyNumberSchema
25
+ Unhelpful: notionDatabasePropertyNumberSchema,
26
26
  }));
27
27
  export const knowledgeBaseRetrievePageSchema = notionPageSchema(z.object({
28
28
  Title: notionPagePropertyTitleSchema,
@@ -46,7 +46,7 @@ export const knowledgeBaseRetrievePageSchema = notionPageSchema(z.object({
46
46
  'Section Slug': notionPagePropertyFormulaSchema,
47
47
  'Topic Slug': notionPagePropertyFormulaSchema,
48
48
  Helpful: notionPagePropertyNumberSchema,
49
- Unhelpful: notionPagePropertyNumberSchema
49
+ Unhelpful: notionPagePropertyNumberSchema,
50
50
  }));
51
51
  export const knowledgeBaseQueryDatabaseSchema = notionPagesSchema(z.object({
52
52
  Title: notionPagePropertyTitleSchema,
@@ -69,5 +69,6 @@ export const knowledgeBaseQueryDatabaseSchema = notionPagesSchema(z.object({
69
69
  'Section Slug': notionPagePropertyFormulaSchema,
70
70
  'Topic Slug': notionPagePropertyFormulaSchema,
71
71
  Helpful: notionPagePropertyNumberSchema,
72
- Unhelpful: notionPagePropertyNumberSchema
72
+ Unhelpful: notionPagePropertyNumberSchema,
73
73
  }));
74
+ //# sourceMappingURL=kb.js.map
@@ -58,8 +58,8 @@ export declare const notionPagePropertyEmailSchema: ZodObject<{
58
58
  export declare const notionPagePropertyFilesSchema: ZodObject<{
59
59
  files: z.ZodArray<ZodObject<{
60
60
  type: z.ZodEnum<{
61
- external: "external";
62
61
  file: "file";
62
+ external: "external";
63
63
  }>;
64
64
  name: z.ZodOptional<z.ZodString>;
65
65
  file: z.ZodOptional<ZodObject<{
@@ -231,8 +231,8 @@ export declare const notionPagePropertyRollupSchema: ZodObject<{
231
231
  type: z.ZodEnum<{
232
232
  number: "number";
233
233
  date: "date";
234
- incomplete: "incomplete";
235
234
  array: "array";
235
+ incomplete: "incomplete";
236
236
  unsupported: "unsupported";
237
237
  }>;
238
238
  }, z.core.$strip>;
@@ -536,8 +536,8 @@ export declare const notionPageSchema: <T extends ZodObject<any>>(properties: T)
536
536
  archived: z.ZodBoolean;
537
537
  icon: z.ZodNullable<z.ZodUnion<[ZodObject<{
538
538
  type: z.ZodEnum<{
539
- external: "external";
540
539
  file: "file";
540
+ external: "external";
541
541
  }>;
542
542
  name: z.ZodOptional<z.ZodString>;
543
543
  file: z.ZodOptional<ZodObject<{
@@ -581,8 +581,8 @@ export declare const notionPagesSchema: <T extends ZodObject<any>>(properties: T
581
581
  archived: z.ZodBoolean;
582
582
  icon: z.ZodNullable<z.ZodUnion<[ZodObject<{
583
583
  type: z.ZodEnum<{
584
- external: "external";
585
584
  file: "file";
585
+ external: "external";
586
586
  }>;
587
587
  name: z.ZodOptional<z.ZodString>;
588
588
  file: z.ZodOptional<ZodObject<{
@@ -1,83 +1,78 @@
1
1
  import { z } from 'zod';
2
2
  import { notionRichTextSchema } from './block.js';
3
- import { commonPropertyValues, notionCommonColorEnum, notionDateFormat, notionDateSchema, notionTimeFormat } from './common.js';
3
+ import { commonPropertyValues, notionCommonColorEnum, notionDateFormat, notionDateSchema, notionTimeFormat, } from './common.js';
4
4
  import { notionEmojiSchema } from './emoji.js';
5
5
  import { notionFileSchema } from './file.js';
6
6
  import { notionDatabaseParentSchema } from './parent.js';
7
7
  import { notionPartialUserSchema, notionUserSchema } from './user.js';
8
8
  export const notionPagePropertyCheckboxSchema = z.object({
9
9
  ...commonPropertyValues('checkbox'),
10
- checkbox: z.boolean()
10
+ checkbox: z.boolean(),
11
11
  });
12
12
  export const notionPagePropertyCreatedBySchema = z.object({
13
13
  ...commonPropertyValues('created_by'),
14
- created_by: notionUserSchema
14
+ created_by: notionUserSchema,
15
15
  });
16
16
  export const notionPagePropertyCreatedTimeSchema = z.object({
17
17
  ...commonPropertyValues('created_time'),
18
- created_time: notionTimeFormat
18
+ created_time: notionTimeFormat,
19
19
  });
20
20
  export const notionPagePropertyDateSchema = z.object({
21
21
  ...commonPropertyValues('date'),
22
- date: notionDateSchema.nullable()
22
+ date: notionDateSchema.nullable(),
23
23
  });
24
24
  export const notionPagePropertyEmailSchema = z.object({
25
25
  ...commonPropertyValues('email'),
26
- email: z.string()
26
+ email: z.string(),
27
27
  });
28
28
  export const notionPagePropertyFilesSchema = z.object({
29
29
  ...commonPropertyValues('files'),
30
- files: z.array(notionFileSchema)
30
+ files: z.array(notionFileSchema),
31
31
  });
32
32
  export const notionPagePropertyFormulaSchema = z.object({
33
33
  ...commonPropertyValues('formula'),
34
34
  formula: z.object({
35
- type: z.enum([
36
- 'boolean',
37
- 'date',
38
- 'number',
39
- 'string'
40
- ]),
35
+ type: z.enum(['boolean', 'date', 'number', 'string']),
41
36
  boolean: z.boolean().optional(),
42
37
  date: notionDateFormat.optional(),
43
38
  number: z.number().optional(),
44
- string: z.string().optional()
45
- })
39
+ string: z.string().optional(),
40
+ }),
46
41
  });
47
42
  export const notionPagePropertyLastEditedBySchema = z.object({
48
43
  ...commonPropertyValues('last_edited_by'),
49
- last_edited_by: notionUserSchema
44
+ last_edited_by: notionUserSchema,
50
45
  });
51
46
  export const notionPagePropertyLastEditedTimeSchema = z.object({
52
47
  ...commonPropertyValues('last_edited_time'),
53
- last_edited_time: notionTimeFormat
48
+ last_edited_time: notionTimeFormat,
54
49
  });
55
50
  export const notionPagePropertyMultiSelectSchema = z.object({
56
51
  ...commonPropertyValues('multi_select'),
57
52
  multi_select: z.array(z.object({
58
53
  id: z.string(),
59
54
  name: z.string(),
60
- color: notionCommonColorEnum
61
- }))
55
+ color: notionCommonColorEnum,
56
+ })),
62
57
  });
63
58
  export const notionPagePropertyNumberSchema = z.object({
64
59
  ...commonPropertyValues('number'),
65
- number: z.number().nullable()
60
+ number: z.number().nullable(),
66
61
  });
67
62
  export const notionPagePropertyPeopleSchema = z.object({
68
63
  ...commonPropertyValues('people'),
69
- people: z.array(notionUserSchema)
64
+ people: z.array(notionUserSchema),
70
65
  });
71
66
  export const notionPagePropertyPhoneNumberSchema = z.object({
72
67
  ...commonPropertyValues('phone_number'),
73
- phone_number: z.string()
68
+ phone_number: z.string(),
74
69
  });
75
70
  export const notionPagePropertyRelationSchema = z.object({
76
71
  ...commonPropertyValues('relation'),
77
72
  relation: z.array(z.object({
78
- id: z.string()
73
+ id: z.string(),
79
74
  })),
80
- has_more: z.boolean()
75
+ has_more: z.boolean(),
81
76
  });
82
77
  export const notionPagePropertyRollupSchema = z.object({
83
78
  ...commonPropertyValues('rollup'),
@@ -111,82 +106,76 @@ export const notionPagePropertyRollupSchema = z.object({
111
106
  'show_unique',
112
107
  'sum',
113
108
  'unchecked',
114
- 'unique'
109
+ 'unique',
115
110
  ]),
116
- type: z.enum([
117
- 'array',
118
- 'date',
119
- 'incomplete',
120
- 'number',
121
- 'unsupported'
122
- ])
123
- })
111
+ type: z.enum(['array', 'date', 'incomplete', 'number', 'unsupported']),
112
+ }),
124
113
  });
125
114
  export const notionPagePropertyRichTextSchema = z.object({
126
115
  ...commonPropertyValues('rich_text'),
127
- rich_text: z.array(notionRichTextSchema)
116
+ rich_text: z.array(notionRichTextSchema),
128
117
  });
129
118
  export const notionPagePropertySelectSchema = z.object({
130
119
  ...commonPropertyValues('select'),
131
- select: z.object({
120
+ select: z
121
+ .object({
132
122
  id: z.string(),
133
123
  name: z.string(),
134
- color: notionCommonColorEnum
135
- }).nullable()
124
+ color: notionCommonColorEnum,
125
+ })
126
+ .nullable(),
136
127
  });
137
128
  export const notionPagePropertyStatusSchema = z.object({
138
129
  ...commonPropertyValues('status'),
139
130
  status: z.object({
140
131
  id: z.string(),
141
132
  name: z.string(),
142
- color: notionCommonColorEnum
143
- })
133
+ color: notionCommonColorEnum,
134
+ }),
144
135
  });
145
136
  export const notionPagePropertyTitleSchema = z.object({
146
137
  ...commonPropertyValues('title'),
147
- title: z.array(notionRichTextSchema)
138
+ title: z.array(notionRichTextSchema),
148
139
  });
149
140
  export const notionPagePropertyUrlSchema = z.object({
150
141
  ...commonPropertyValues('url'),
151
- url: z.string().url().nullable()
142
+ url: z.string().url().nullable(),
152
143
  });
153
144
  export const notionPagePropertyUniqueIdSchema = z.object({
154
145
  ...commonPropertyValues('unique_id'),
155
146
  unique_id: z.object({
156
147
  number: z.number(),
157
- prefix: z.string().nullable().optional()
158
- })
148
+ prefix: z.string().nullable().optional(),
149
+ }),
159
150
  });
160
151
  export const notionPagePropertyVerificationSchema = z.object({
161
152
  ...commonPropertyValues('verification'),
162
153
  verification: z.object({
163
- state: z.enum([
164
- 'verified',
165
- 'unverified'
166
- ]),
154
+ state: z.enum(['verified', 'unverified']),
167
155
  verified_by: notionUserSchema.nullable(),
168
- date: notionDateSchema
169
- })
170
- });
171
- export const notionPageSchema = (properties)=>z.object({
172
- object: z.literal('page'),
173
- id: z.string(),
174
- created_time: notionTimeFormat,
175
- created_by: notionPartialUserSchema,
176
- last_edited_time: notionTimeFormat,
177
- last_edited_by: notionPartialUserSchema,
178
- archived: z.boolean(),
179
- icon: notionFileSchema.or(notionEmojiSchema).nullable(),
180
- properties,
181
- parent: notionDatabaseParentSchema,
182
- url: z.string().url(),
183
- public_url: z.string().nullable()
184
- });
185
- export const notionPagesSchema = (properties)=>z.object({
186
- has_more: z.boolean(),
187
- next_cursor: z.string().nullable(),
188
- object: z.literal('list'),
189
- page_or_database: z.object({}),
190
- type: z.literal('page_or_database'),
191
- results: z.array(notionPageSchema(properties))
192
- });
156
+ date: notionDateSchema,
157
+ }),
158
+ });
159
+ export const notionPageSchema = (properties) => z.object({
160
+ object: z.literal('page'),
161
+ id: z.string(),
162
+ created_time: notionTimeFormat,
163
+ created_by: notionPartialUserSchema,
164
+ last_edited_time: notionTimeFormat,
165
+ last_edited_by: notionPartialUserSchema,
166
+ archived: z.boolean(),
167
+ icon: notionFileSchema.or(notionEmojiSchema).nullable(),
168
+ properties,
169
+ parent: notionDatabaseParentSchema,
170
+ url: z.string().url(),
171
+ public_url: z.string().nullable(),
172
+ });
173
+ export const notionPagesSchema = (properties) => z.object({
174
+ has_more: z.boolean(),
175
+ next_cursor: z.string().nullable(),
176
+ object: z.literal('list'),
177
+ page_or_database: z.object({}),
178
+ type: z.literal('page_or_database'),
179
+ results: z.array(notionPageSchema(properties)),
180
+ });
181
+ //# sourceMappingURL=page.js.map
@@ -1,17 +1,18 @@
1
1
  import { z } from 'zod';
2
2
  export const notionDatabaseParentSchema = z.object({
3
3
  type: z.literal('database_id'),
4
- database_id: z.string()
4
+ database_id: z.string(),
5
5
  });
6
6
  export const notionPageParentSchema = z.object({
7
7
  type: z.literal('page_id'),
8
- page_id: z.string()
8
+ page_id: z.string(),
9
9
  });
10
10
  export const notionWorkspaceParentSchema = z.object({
11
11
  type: z.literal('workspace'),
12
- workspace: z.literal(true)
12
+ workspace: z.literal(true),
13
13
  });
14
14
  export const notionBlockParentSchema = z.object({
15
15
  type: z.literal('block_id'),
16
- block_id: z.string()
16
+ block_id: z.string(),
17
17
  });
18
+ //# sourceMappingURL=parent.js.map
@@ -1,30 +1,31 @@
1
1
  import { z } from 'zod';
2
2
  export const notionPartialUserSchema = z.object({
3
3
  object: z.literal('user'),
4
- user: z.string().optional()
4
+ user: z.string().optional(),
5
5
  });
6
6
  export const notionUserSchema = z.object({
7
7
  object: z.literal('user'),
8
8
  id: z.string(),
9
- type: z.enum([
10
- 'person',
11
- 'bot'
12
- ]).optional(),
9
+ type: z.enum(['person', 'bot']).optional(),
13
10
  name: z.string().optional(),
14
11
  avatar_url: z.string().nullable().optional(),
15
12
  // type person
16
- person: z.object({
17
- email: z.string().email()
18
- }).optional(),
13
+ person: z
14
+ .object({
15
+ email: z.string().email(),
16
+ })
17
+ .optional(),
19
18
  // type bot
20
- bot: z.object({
21
- owner: z.object({
22
- type: z.enum([
23
- 'workspace',
24
- 'user'
25
- ]),
26
- workspace: z.boolean()
27
- }).optional(),
28
- workspace_name: z.string().optional()
29
- }).optional()
19
+ bot: z
20
+ .object({
21
+ owner: z
22
+ .object({
23
+ type: z.enum(['workspace', 'user']),
24
+ workspace: z.boolean(),
25
+ })
26
+ .optional(),
27
+ workspace_name: z.string().optional(),
28
+ })
29
+ .optional(),
30
30
  });
31
+ //# sourceMappingURL=user.js.map