@driveflux/api-functions 0.0.7-next.0 → 0.0.7-next.1
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/auth/confirm.js +73 -327
- package/dist/auth/emails.js +43 -210
- package/dist/auth/formatter.js +11 -11
- package/dist/auth/otp.js +122 -392
- package/dist/auth/register.js +100 -396
- package/dist/auth/tokens.js +115 -430
- package/dist/auth/verifications.js +177 -583
- package/dist/constants.js +5 -4
- package/dist/mailjet/calls/manage-contacts-in-list.js +22 -166
- package/dist/mailjet/calls/manage-subscription-status.js +13 -153
- package/dist/mailjet/calls/request-service.js +18 -183
- package/dist/mailjet/refresh-email-preferences.js +26 -225
- package/dist/mailjet/set-contact.js +23 -214
- package/dist/mailjet/types.js +2 -1
- package/dist/mailjet/utils/convert-to-array.js +9 -58
- package/dist/mailjet/utils/extract-email-preferences.js +41 -217
- package/dist/mailjet/utils/lists.js +30 -249
- package/dist/mailjet/utils/update-email-references.js +27 -208
- package/dist/notion/client.js +48 -197
- package/dist/notion/helpful.js +29 -170
- package/dist/notion/schemas/block.js +49 -43
- package/dist/notion/schemas/common.js +17 -14
- package/dist/notion/schemas/database.js +125 -159
- package/dist/notion/schemas/emoji.js +3 -2
- package/dist/notion/schemas/file.js +10 -10
- package/dist/notion/schemas/kb.js +9 -8
- package/dist/notion/schemas/page.js +126 -171
- package/dist/notion/schemas/parent.js +9 -8
- package/dist/notion/schemas/user.js +21 -20
- package/dist/reservation/agree.js +19 -158
- package/dist/reservation/checks.js +23 -178
- package/dist/reservation/display-vehicle.js +142 -514
- package/dist/reservation/fetch-or-create.js +197 -482
- package/dist/reservation/invoice.js +198 -496
- package/dist/reservation/payer.js +28 -177
- package/dist/reservation/reserve.js +31 -191
- package/dist/reservation/types.js +2 -1
- package/dist/reservation/vehicle.js +24 -186
- package/dist/slack.js +67 -273
- package/dist/validation.js +81 -139
- package/dist/vehicle/vehicle-pricing/constants.js +33 -36
- package/dist/vehicle/vehicle-pricing/index.js +99 -257
- package/dist/vehicle/vehicle-pricing/types.js +2 -1
- package/package.json +9 -9
|
@@ -1,101 +1,60 @@
|
|
|
1
|
-
function _define_property(obj, key, value) {
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
function _object_spread(target) {
|
|
15
|
-
for(var i = 1; i < arguments.length; i++){
|
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
-
var ownKeys = Object.keys(source);
|
|
18
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
ownKeys.forEach(function(key) {
|
|
24
|
-
_define_property(target, key, source[key]);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return target;
|
|
28
|
-
}
|
|
29
|
-
function ownKeys(object, enumerableOnly) {
|
|
30
|
-
var keys = Object.keys(object);
|
|
31
|
-
if (Object.getOwnPropertySymbols) {
|
|
32
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
33
|
-
if (enumerableOnly) {
|
|
34
|
-
symbols = symbols.filter(function(sym) {
|
|
35
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
keys.push.apply(keys, symbols);
|
|
39
|
-
}
|
|
40
|
-
return keys;
|
|
41
|
-
}
|
|
42
|
-
function _object_spread_props(target, source) {
|
|
43
|
-
source = source != null ? source : {};
|
|
44
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
45
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
-
} else {
|
|
47
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
48
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return target;
|
|
52
|
-
}
|
|
53
1
|
import { z } from 'zod';
|
|
54
2
|
import { notionRichTextSchema } from './block.js';
|
|
55
|
-
import { commonPropertyValues, notionCommonColorEnum, notionTimeFormat } from './common.js';
|
|
3
|
+
import { commonPropertyValues, notionCommonColorEnum, notionTimeFormat, } from './common.js';
|
|
56
4
|
import { notionEmojiSchema } from './emoji.js';
|
|
57
5
|
import { notionFileSchema } from './file.js';
|
|
58
6
|
import { notionWorkspaceParentSchema } from './parent.js';
|
|
59
7
|
import { notionPartialUserSchema } from './user.js';
|
|
60
|
-
export
|
|
61
|
-
checkbox
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})
|
|
72
|
-
export
|
|
73
|
-
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
8
|
+
export const notionDatabasePropertyCheckboxSchema = z.object({
|
|
9
|
+
...commonPropertyValues('checkbox'),
|
|
10
|
+
checkbox: z.object({}),
|
|
11
|
+
});
|
|
12
|
+
export const notionDatabasePropertyCreatedBySchema = z.object({
|
|
13
|
+
...commonPropertyValues('created_by'),
|
|
14
|
+
created_by: z.object({}),
|
|
15
|
+
});
|
|
16
|
+
export const notionDatabasePropertyCreatedTimeSchema = z.object({
|
|
17
|
+
...commonPropertyValues('created_time'),
|
|
18
|
+
created_time: z.object({}),
|
|
19
|
+
});
|
|
20
|
+
export const notionDatabasePropertyDateSchema = z.object({
|
|
21
|
+
...commonPropertyValues('date'),
|
|
22
|
+
date: z.object({}),
|
|
23
|
+
});
|
|
24
|
+
export const notionDatabasePropertyEmailSchema = z.object({
|
|
25
|
+
...commonPropertyValues('email'),
|
|
26
|
+
email: z.object({}),
|
|
27
|
+
});
|
|
28
|
+
export const notionDatabasePropertyFilesSchema = z.object({
|
|
29
|
+
...commonPropertyValues('files'),
|
|
30
|
+
files: z.object({}),
|
|
31
|
+
});
|
|
32
|
+
export const notionDatabasePropertyFormulaSchema = z.object({
|
|
33
|
+
...commonPropertyValues('formula'),
|
|
79
34
|
formula: z.object({
|
|
80
|
-
expression: z.string()
|
|
81
|
-
})
|
|
82
|
-
})
|
|
83
|
-
export
|
|
84
|
-
last_edited_by
|
|
85
|
-
}))
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
35
|
+
expression: z.string(),
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
export const notionDatabasePropertyLastEditedBySchema = z.object({
|
|
39
|
+
...commonPropertyValues('last_edited_by'),
|
|
40
|
+
last_edited_by: z.object({}).optional(),
|
|
41
|
+
});
|
|
42
|
+
export const notionDatabasePropertyLastEditedTimeSchema = z.object({
|
|
43
|
+
...commonPropertyValues('last_edited_time'),
|
|
44
|
+
last_edited_time: z.object({}),
|
|
45
|
+
});
|
|
46
|
+
export const notionDatabasePropertyMultiSelectSchema = z.object({
|
|
47
|
+
...commonPropertyValues('multi_select'),
|
|
90
48
|
multi_select: z.object({
|
|
91
49
|
options: z.array(z.object({
|
|
92
50
|
id: z.string(),
|
|
93
51
|
name: z.string(),
|
|
94
|
-
color: notionCommonColorEnum
|
|
95
|
-
}))
|
|
96
|
-
})
|
|
97
|
-
})
|
|
98
|
-
export
|
|
52
|
+
color: notionCommonColorEnum,
|
|
53
|
+
})),
|
|
54
|
+
}),
|
|
55
|
+
});
|
|
56
|
+
export const notionDatabasePropertyNumberSchema = z.object({
|
|
57
|
+
...commonPropertyValues('number'),
|
|
99
58
|
number: z.object({
|
|
100
59
|
format: z.enum([
|
|
101
60
|
'argentine_peso',
|
|
@@ -137,27 +96,32 @@ export var notionDatabasePropertyNumberSchema = z.object(_object_spread_props(_o
|
|
|
137
96
|
'yen,',
|
|
138
97
|
'yuan',
|
|
139
98
|
'won',
|
|
140
|
-
'zloty'
|
|
141
|
-
])
|
|
142
|
-
})
|
|
143
|
-
})
|
|
144
|
-
export
|
|
145
|
-
people
|
|
146
|
-
})
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
99
|
+
'zloty',
|
|
100
|
+
]),
|
|
101
|
+
}),
|
|
102
|
+
});
|
|
103
|
+
export const notionDatabasePropertyPeopleSchema = z.object({
|
|
104
|
+
...commonPropertyValues('people'),
|
|
105
|
+
people: z.object({}),
|
|
106
|
+
});
|
|
107
|
+
export const notionDatabasePropertyPhoneNumberSchema = z.object({
|
|
108
|
+
...commonPropertyValues('phone_number'),
|
|
109
|
+
phone_number: z.object({}),
|
|
110
|
+
});
|
|
111
|
+
export const notionDatabasePropertyRelationSchema = z.object({
|
|
112
|
+
...commonPropertyValues('relation'),
|
|
151
113
|
relation: z.object({
|
|
152
114
|
database_id: z.string(),
|
|
153
115
|
synced_property_name: z.string().optional(),
|
|
154
|
-
synced_property_id: z.string().optional()
|
|
155
|
-
})
|
|
156
|
-
})
|
|
157
|
-
export
|
|
158
|
-
rich_text
|
|
159
|
-
})
|
|
160
|
-
|
|
116
|
+
synced_property_id: z.string().optional(),
|
|
117
|
+
}),
|
|
118
|
+
});
|
|
119
|
+
export const notionDatabasePropertyRichTextSchema = z.object({
|
|
120
|
+
...commonPropertyValues('rich_text'),
|
|
121
|
+
rich_text: z.object({}),
|
|
122
|
+
});
|
|
123
|
+
export const notionDatabasePropertyRollupSchema = z.object({
|
|
124
|
+
...commonPropertyValues('rollup'),
|
|
161
125
|
rollup: z.object({
|
|
162
126
|
rollup_property_name: z.string(),
|
|
163
127
|
relation_property_name: z.string(),
|
|
@@ -187,70 +151,72 @@ export var notionDatabasePropertyRollupSchema = z.object(_object_spread_props(_o
|
|
|
187
151
|
'show_unique',
|
|
188
152
|
'sum',
|
|
189
153
|
'unchecked',
|
|
190
|
-
'unique'
|
|
154
|
+
'unique',
|
|
191
155
|
]),
|
|
192
|
-
type: z.enum([
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
'unsupported'
|
|
198
|
-
])
|
|
199
|
-
})
|
|
200
|
-
}));
|
|
201
|
-
export var notionDatabasePropertySelectSchema = z.object(_object_spread_props(_object_spread({}, commonPropertyValues('select')), {
|
|
156
|
+
type: z.enum(['array', 'date', 'incomplete', 'number', 'unsupported']),
|
|
157
|
+
}),
|
|
158
|
+
});
|
|
159
|
+
export const notionDatabasePropertySelectSchema = z.object({
|
|
160
|
+
...commonPropertyValues('select'),
|
|
202
161
|
select: z.object({
|
|
203
162
|
options: z.array(z.object({
|
|
204
163
|
id: z.string(),
|
|
205
164
|
name: z.string(),
|
|
206
|
-
color: notionCommonColorEnum
|
|
207
|
-
}))
|
|
208
|
-
})
|
|
209
|
-
})
|
|
210
|
-
export
|
|
165
|
+
color: notionCommonColorEnum,
|
|
166
|
+
})),
|
|
167
|
+
}),
|
|
168
|
+
});
|
|
169
|
+
export const notionDatabasePropertyStatusSchema = z.object({
|
|
170
|
+
...commonPropertyValues('status'),
|
|
211
171
|
status: z.object({
|
|
212
172
|
options: z.array(z.object({
|
|
213
173
|
id: z.string(),
|
|
214
174
|
name: z.string(),
|
|
215
|
-
color: notionCommonColorEnum
|
|
175
|
+
color: notionCommonColorEnum,
|
|
216
176
|
})),
|
|
217
|
-
group: z
|
|
177
|
+
group: z
|
|
178
|
+
.array(z.object({
|
|
218
179
|
id: z.string(),
|
|
219
180
|
name: z.string(),
|
|
220
181
|
color: notionCommonColorEnum,
|
|
221
|
-
option_ids: z.array(z.string())
|
|
222
|
-
}))
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
})
|
|
231
|
-
export
|
|
232
|
-
|
|
233
|
-
})
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
182
|
+
option_ids: z.array(z.string()),
|
|
183
|
+
}))
|
|
184
|
+
.nullable()
|
|
185
|
+
.optional(),
|
|
186
|
+
}),
|
|
187
|
+
});
|
|
188
|
+
export const notionDatabasePropertyTitleSchema = z.object({
|
|
189
|
+
...commonPropertyValues('title'),
|
|
190
|
+
title: z.object({}),
|
|
191
|
+
});
|
|
192
|
+
export const notionDatabasePropertyUrlSchema = z.object({
|
|
193
|
+
...commonPropertyValues('url'),
|
|
194
|
+
url: z.object({}),
|
|
195
|
+
});
|
|
196
|
+
export const notionDatabasePropertyUniqueIdSchema = z.object({
|
|
197
|
+
...commonPropertyValues('unique_id'),
|
|
198
|
+
unique_id: z.object({}),
|
|
199
|
+
});
|
|
200
|
+
export const notionDatabasePropertyVerificationSchema = z.object({
|
|
201
|
+
...commonPropertyValues('verification'),
|
|
202
|
+
verification: z.object({}),
|
|
203
|
+
});
|
|
204
|
+
export const notionDatabaseSchema = (properties) => z.object({
|
|
205
|
+
object: z.literal('database'),
|
|
206
|
+
id: z.string(),
|
|
207
|
+
created_time: notionTimeFormat,
|
|
208
|
+
created_by: notionPartialUserSchema,
|
|
209
|
+
last_edited_time: notionTimeFormat,
|
|
210
|
+
last_edited_by: notionPartialUserSchema,
|
|
211
|
+
title: z.array(notionRichTextSchema),
|
|
212
|
+
description: z.array(notionRichTextSchema),
|
|
213
|
+
icon: notionFileSchema.or(notionEmojiSchema),
|
|
214
|
+
cover: notionFileSchema.nullable(),
|
|
215
|
+
properties,
|
|
216
|
+
parent: notionWorkspaceParentSchema,
|
|
217
|
+
url: z.string().url(),
|
|
218
|
+
archived: z.boolean(),
|
|
219
|
+
is_inline: z.boolean(),
|
|
220
|
+
public_url: z.string().nullable(),
|
|
221
|
+
});
|
|
222
|
+
//# sourceMappingURL=database.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { notionTimeFormat } from './common.js';
|
|
3
|
-
export
|
|
4
|
-
type: z.enum([
|
|
5
|
-
'file',
|
|
6
|
-
'external'
|
|
7
|
-
]),
|
|
3
|
+
export const notionFileSchema = z.object({
|
|
4
|
+
type: z.enum(['file', 'external']),
|
|
8
5
|
name: z.string().optional(),
|
|
9
6
|
// type file
|
|
10
|
-
file: z
|
|
7
|
+
file: z
|
|
8
|
+
.object({
|
|
11
9
|
url: z.string().url(),
|
|
12
|
-
expiry_time: notionTimeFormat
|
|
13
|
-
})
|
|
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
|
|
@@ -1,7 +1,7 @@
|
|
|
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';
|
|
4
|
-
export
|
|
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
|
+
export const knowledgeBaseRetrieveDatabaseSchema = notionDatabaseSchema(z.object({
|
|
5
5
|
Title: notionDatabasePropertyTitleSchema,
|
|
6
6
|
Status: notionDatabasePropertyStatusSchema,
|
|
7
7
|
Topic: notionDatabasePropertySelectSchema,
|
|
@@ -22,9 +22,9 @@ export var 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
|
-
export
|
|
27
|
+
export const knowledgeBaseRetrievePageSchema = notionPageSchema(z.object({
|
|
28
28
|
Title: notionPagePropertyTitleSchema,
|
|
29
29
|
'Seo Title': notionPagePropertyRichTextSchema,
|
|
30
30
|
Status: notionPagePropertyStatusSchema,
|
|
@@ -46,9 +46,9 @@ export var 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
|
-
export
|
|
51
|
+
export const knowledgeBaseQueryDatabaseSchema = notionPagesSchema(z.object({
|
|
52
52
|
Title: notionPagePropertyTitleSchema,
|
|
53
53
|
Status: notionPagePropertyStatusSchema,
|
|
54
54
|
Topic: notionPagePropertySelectSchema,
|
|
@@ -69,5 +69,6 @@ export var 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
|