@remit/electrodb-entities 0.0.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/index.cjs +4007 -0
- package/index.d.cts +3153 -0
- package/index.d.mts +3153 -0
- package/index.d.ts +3153 -0
- package/index.mjs +4004 -0
- package/package.json +32 -0
package/index.cjs
ADDED
|
@@ -0,0 +1,4007 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FilterAnchor = exports.MessageLabel = exports.Label = exports.BodyPartContent = exports.BodyPartStorage = exports.RawMessageStorage = exports.BodyPartParameter = exports.Envelope = exports.MessageFlagPush = exports.MessagePlacementMove = exports.MessageFlag = exports.MailboxLock = exports.MailboxFlag = exports.MailboxSpecialUseEntry = exports.MailboxAttributeEntry = exports.AccountSetting = exports.EnvelopeAddress = exports.MessageReference = exports.BodyPart = exports.Message = exports.Address = exports.OutboxMessage = exports.ThreadMessage = exports.OrganizeJobRequest = exports.Filter = exports.Mailbox = exports.Account = exports.AccountConfig = exports.AccountExportRequest = void 0;
|
|
4
|
+
const electrodb_1 = require("electrodb");
|
|
5
|
+
exports.AccountExportRequest = {
|
|
6
|
+
attributes: {
|
|
7
|
+
accountExportRequestId: {
|
|
8
|
+
type: "string",
|
|
9
|
+
required: true,
|
|
10
|
+
validate: value => {
|
|
11
|
+
if (typeof value === "string" && value.length < 25)
|
|
12
|
+
throw new Error("'accountExportRequestId' must be at least 25 characters");
|
|
13
|
+
if (typeof value === "string" && value.length > 25)
|
|
14
|
+
throw new Error("'accountExportRequestId' must be at most 25 characters");
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
accountConfigId: {
|
|
19
|
+
type: "string",
|
|
20
|
+
required: true,
|
|
21
|
+
validate: value => {
|
|
22
|
+
if (typeof value === "string" && value.length < 25)
|
|
23
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
24
|
+
if (typeof value === "string" && value.length > 25)
|
|
25
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
userId: {
|
|
30
|
+
type: "string",
|
|
31
|
+
required: true
|
|
32
|
+
},
|
|
33
|
+
state: {
|
|
34
|
+
type: ["Pending", "Processing", "Ready", "Failed"],
|
|
35
|
+
required: true,
|
|
36
|
+
default: "Pending"
|
|
37
|
+
},
|
|
38
|
+
createdAt: {
|
|
39
|
+
type: "number",
|
|
40
|
+
readOnly: true,
|
|
41
|
+
required: true,
|
|
42
|
+
default: () => Date.now(),
|
|
43
|
+
set: () => Date.now()
|
|
44
|
+
},
|
|
45
|
+
updatedAt: {
|
|
46
|
+
type: "number",
|
|
47
|
+
watch: "*",
|
|
48
|
+
required: true,
|
|
49
|
+
default: () => Date.now(),
|
|
50
|
+
set: () => Date.now()
|
|
51
|
+
},
|
|
52
|
+
expiresAt: {
|
|
53
|
+
type: "number",
|
|
54
|
+
required: false,
|
|
55
|
+
validate: value => {
|
|
56
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
57
|
+
throw new Error("'expiresAt' must be an integer");
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
objectKey: {
|
|
62
|
+
type: "string",
|
|
63
|
+
required: false
|
|
64
|
+
},
|
|
65
|
+
downloadUrl: {
|
|
66
|
+
type: "string",
|
|
67
|
+
required: false
|
|
68
|
+
},
|
|
69
|
+
errorMessage: {
|
|
70
|
+
type: "string",
|
|
71
|
+
required: false
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
indexes: {
|
|
75
|
+
byAccountConfigId: {
|
|
76
|
+
pk: {
|
|
77
|
+
field: "gsi0pk",
|
|
78
|
+
composite: ["accountConfigId"]
|
|
79
|
+
},
|
|
80
|
+
sk: {
|
|
81
|
+
field: "gsi0sk",
|
|
82
|
+
composite: ["createdAt"]
|
|
83
|
+
},
|
|
84
|
+
index: "gsi0"
|
|
85
|
+
},
|
|
86
|
+
AccountExportRequest: {
|
|
87
|
+
pk: {
|
|
88
|
+
field: "pk",
|
|
89
|
+
composite: ["accountExportRequestId"]
|
|
90
|
+
},
|
|
91
|
+
sk: {
|
|
92
|
+
field: "sk",
|
|
93
|
+
composite: []
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
model: {
|
|
98
|
+
entity: "accountExportRequest",
|
|
99
|
+
service: "remit",
|
|
100
|
+
version: "1"
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
exports.AccountConfig = {
|
|
104
|
+
attributes: {
|
|
105
|
+
accountConfigId: {
|
|
106
|
+
type: "string",
|
|
107
|
+
required: true,
|
|
108
|
+
validate: value => {
|
|
109
|
+
if (typeof value === "string" && value.length < 25)
|
|
110
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
111
|
+
if (typeof value === "string" && value.length > 25)
|
|
112
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
userId: {
|
|
117
|
+
type: "string",
|
|
118
|
+
required: true,
|
|
119
|
+
validate: value => {
|
|
120
|
+
if (typeof value === "string" && value.length < 25)
|
|
121
|
+
throw new Error("'userId' must be at least 25 characters");
|
|
122
|
+
if (typeof value === "string" && value.length > 25)
|
|
123
|
+
throw new Error("'userId' must be at most 25 characters");
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
name: {
|
|
128
|
+
type: "string",
|
|
129
|
+
required: false
|
|
130
|
+
},
|
|
131
|
+
state: {
|
|
132
|
+
type: ["active", "deleting"],
|
|
133
|
+
required: true,
|
|
134
|
+
default: "active"
|
|
135
|
+
},
|
|
136
|
+
deletedAt: {
|
|
137
|
+
type: "number",
|
|
138
|
+
required: false,
|
|
139
|
+
validate: value => {
|
|
140
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
141
|
+
throw new Error("'deletedAt' must be an integer");
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
cascadeStartedAt: {
|
|
146
|
+
type: "number",
|
|
147
|
+
required: false,
|
|
148
|
+
validate: value => {
|
|
149
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
150
|
+
throw new Error("'cascadeStartedAt' must be an integer");
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
createdAt: {
|
|
155
|
+
type: "number",
|
|
156
|
+
readOnly: true,
|
|
157
|
+
required: true,
|
|
158
|
+
default: () => Date.now(),
|
|
159
|
+
set: () => Date.now()
|
|
160
|
+
},
|
|
161
|
+
updatedAt: {
|
|
162
|
+
type: "number",
|
|
163
|
+
watch: "*",
|
|
164
|
+
required: true,
|
|
165
|
+
default: () => Date.now(),
|
|
166
|
+
set: () => Date.now()
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
indexes: {
|
|
170
|
+
allAccountConfigs: {
|
|
171
|
+
pk: {
|
|
172
|
+
field: "gsi2pk",
|
|
173
|
+
composite: []
|
|
174
|
+
},
|
|
175
|
+
sk: {
|
|
176
|
+
field: "gsi2sk",
|
|
177
|
+
composite: ["accountConfigId"]
|
|
178
|
+
},
|
|
179
|
+
index: "gsi2"
|
|
180
|
+
},
|
|
181
|
+
byAccountConfigId: {
|
|
182
|
+
pk: {
|
|
183
|
+
field: "gsi1pk",
|
|
184
|
+
composite: ["accountConfigId"]
|
|
185
|
+
},
|
|
186
|
+
sk: {
|
|
187
|
+
field: "gsi1sk",
|
|
188
|
+
composite: []
|
|
189
|
+
},
|
|
190
|
+
index: "gsi1",
|
|
191
|
+
collection: "accountConfig"
|
|
192
|
+
},
|
|
193
|
+
byUserId: {
|
|
194
|
+
pk: {
|
|
195
|
+
field: "gsi0pk",
|
|
196
|
+
composite: ["userId"]
|
|
197
|
+
},
|
|
198
|
+
sk: {
|
|
199
|
+
field: "gsi0sk",
|
|
200
|
+
composite: ["accountConfigId"]
|
|
201
|
+
},
|
|
202
|
+
index: "gsi0"
|
|
203
|
+
},
|
|
204
|
+
AccountConfig: {
|
|
205
|
+
pk: {
|
|
206
|
+
field: "pk",
|
|
207
|
+
composite: ["accountConfigId"]
|
|
208
|
+
},
|
|
209
|
+
sk: {
|
|
210
|
+
field: "sk",
|
|
211
|
+
composite: []
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
model: {
|
|
216
|
+
entity: "accountConfig",
|
|
217
|
+
service: "remit",
|
|
218
|
+
version: "1"
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
exports.Account = {
|
|
222
|
+
attributes: {
|
|
223
|
+
accountId: {
|
|
224
|
+
type: "string",
|
|
225
|
+
required: true,
|
|
226
|
+
validate: value => {
|
|
227
|
+
if (typeof value === "string" && value.length < 25)
|
|
228
|
+
throw new Error("'accountId' must be at least 25 characters");
|
|
229
|
+
if (typeof value === "string" && value.length > 25)
|
|
230
|
+
throw new Error("'accountId' must be at most 25 characters");
|
|
231
|
+
return true;
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
accountConfigId: {
|
|
235
|
+
type: "string",
|
|
236
|
+
required: true,
|
|
237
|
+
validate: value => {
|
|
238
|
+
if (typeof value === "string" && value.length < 25)
|
|
239
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
240
|
+
if (typeof value === "string" && value.length > 25)
|
|
241
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
username: {
|
|
246
|
+
type: "string",
|
|
247
|
+
required: true,
|
|
248
|
+
validate: value => {
|
|
249
|
+
if (typeof value === "string" && value.length < 1)
|
|
250
|
+
throw new Error("'username' must be at least 1 characters");
|
|
251
|
+
return true;
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
email: {
|
|
255
|
+
type: "string",
|
|
256
|
+
required: true
|
|
257
|
+
},
|
|
258
|
+
authType: {
|
|
259
|
+
type: ["password", "oauthMicrosoft"],
|
|
260
|
+
required: true,
|
|
261
|
+
default: "password"
|
|
262
|
+
},
|
|
263
|
+
passwordHash: {
|
|
264
|
+
type: "string",
|
|
265
|
+
required: false
|
|
266
|
+
},
|
|
267
|
+
oauthRefreshTokenHash: {
|
|
268
|
+
type: "string",
|
|
269
|
+
required: false
|
|
270
|
+
},
|
|
271
|
+
oauthTokenUpdatedAt: {
|
|
272
|
+
type: "number",
|
|
273
|
+
required: false,
|
|
274
|
+
validate: value => {
|
|
275
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
276
|
+
throw new Error("'oauthTokenUpdatedAt' must be an integer");
|
|
277
|
+
return true;
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
imapHost: {
|
|
281
|
+
type: "string",
|
|
282
|
+
required: true,
|
|
283
|
+
validate: value => {
|
|
284
|
+
if (typeof value === "string" && value.length < 1)
|
|
285
|
+
throw new Error("'imapHost' must be at least 1 characters");
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
imapPort: {
|
|
290
|
+
type: "number",
|
|
291
|
+
required: true,
|
|
292
|
+
validate: value => {
|
|
293
|
+
if (typeof value === "number" && value < 1)
|
|
294
|
+
throw new Error("'imapPort' must be at least 1");
|
|
295
|
+
if (typeof value === "number" && value > 65535)
|
|
296
|
+
throw new Error("'imapPort' must be at most 65535");
|
|
297
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
298
|
+
throw new Error("'imapPort' must be an integer");
|
|
299
|
+
return true;
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
imapTls: {
|
|
303
|
+
type: "boolean",
|
|
304
|
+
required: true
|
|
305
|
+
},
|
|
306
|
+
imapStartTls: {
|
|
307
|
+
type: "boolean",
|
|
308
|
+
required: true
|
|
309
|
+
},
|
|
310
|
+
smtpEnabled: {
|
|
311
|
+
type: "boolean",
|
|
312
|
+
required: true,
|
|
313
|
+
default: false
|
|
314
|
+
},
|
|
315
|
+
smtpHost: {
|
|
316
|
+
type: "string",
|
|
317
|
+
required: true,
|
|
318
|
+
default: ""
|
|
319
|
+
},
|
|
320
|
+
smtpPort: {
|
|
321
|
+
type: "number",
|
|
322
|
+
required: true,
|
|
323
|
+
default: 587,
|
|
324
|
+
validate: value => {
|
|
325
|
+
if (typeof value === "number" && value < 1)
|
|
326
|
+
throw new Error("'smtpPort' must be at least 1");
|
|
327
|
+
if (typeof value === "number" && value > 65535)
|
|
328
|
+
throw new Error("'smtpPort' must be at most 65535");
|
|
329
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
330
|
+
throw new Error("'smtpPort' must be an integer");
|
|
331
|
+
return true;
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
smtpTls: {
|
|
335
|
+
type: "boolean",
|
|
336
|
+
required: true,
|
|
337
|
+
default: false
|
|
338
|
+
},
|
|
339
|
+
smtpStartTls: {
|
|
340
|
+
type: "boolean",
|
|
341
|
+
required: true,
|
|
342
|
+
default: true
|
|
343
|
+
},
|
|
344
|
+
smtpUsername: {
|
|
345
|
+
type: "string",
|
|
346
|
+
required: true,
|
|
347
|
+
default: ""
|
|
348
|
+
},
|
|
349
|
+
smtpPasswordHash: {
|
|
350
|
+
type: "string",
|
|
351
|
+
required: false
|
|
352
|
+
},
|
|
353
|
+
isActive: {
|
|
354
|
+
type: "boolean",
|
|
355
|
+
required: true
|
|
356
|
+
},
|
|
357
|
+
connectionState: {
|
|
358
|
+
type: ["not_authenticated", "authenticated", "selected", "logout", "reauth_required"],
|
|
359
|
+
required: true
|
|
360
|
+
},
|
|
361
|
+
lastConnectedAt: {
|
|
362
|
+
type: "number",
|
|
363
|
+
required: false,
|
|
364
|
+
validate: value => {
|
|
365
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
366
|
+
throw new Error("'lastConnectedAt' must be an integer");
|
|
367
|
+
return true;
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
lastSyncAt: {
|
|
371
|
+
type: "number",
|
|
372
|
+
required: false,
|
|
373
|
+
validate: value => {
|
|
374
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
375
|
+
throw new Error("'lastSyncAt' must be an integer");
|
|
376
|
+
return true;
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
lastError: {
|
|
380
|
+
type: "string",
|
|
381
|
+
required: false
|
|
382
|
+
},
|
|
383
|
+
syncPhase: {
|
|
384
|
+
type: ["idle", "discovering_mailboxes", "syncing_inbox", "syncing_others", "complete", "error"],
|
|
385
|
+
required: false
|
|
386
|
+
},
|
|
387
|
+
mailboxCountTotal: {
|
|
388
|
+
type: "number",
|
|
389
|
+
required: false,
|
|
390
|
+
validate: value => {
|
|
391
|
+
if (typeof value === "number" && value < 0)
|
|
392
|
+
throw new Error("'mailboxCountTotal' must be at least 0");
|
|
393
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
394
|
+
throw new Error("'mailboxCountTotal' must be an integer");
|
|
395
|
+
return true;
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
mailboxCountSynced: {
|
|
399
|
+
type: "number",
|
|
400
|
+
required: false,
|
|
401
|
+
validate: value => {
|
|
402
|
+
if (typeof value === "number" && value < 0)
|
|
403
|
+
throw new Error("'mailboxCountSynced' must be at least 0");
|
|
404
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
405
|
+
throw new Error("'mailboxCountSynced' must be an integer");
|
|
406
|
+
return true;
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
createdAt: {
|
|
410
|
+
type: "number",
|
|
411
|
+
readOnly: true,
|
|
412
|
+
required: true,
|
|
413
|
+
default: () => Date.now(),
|
|
414
|
+
set: () => Date.now()
|
|
415
|
+
},
|
|
416
|
+
updatedAt: {
|
|
417
|
+
type: "number",
|
|
418
|
+
watch: "*",
|
|
419
|
+
required: true,
|
|
420
|
+
default: () => Date.now(),
|
|
421
|
+
set: () => Date.now()
|
|
422
|
+
},
|
|
423
|
+
deletedAt: {
|
|
424
|
+
type: "number",
|
|
425
|
+
required: false,
|
|
426
|
+
validate: value => {
|
|
427
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
428
|
+
throw new Error("'deletedAt' must be an integer");
|
|
429
|
+
return true;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
indexes: {
|
|
434
|
+
allAccounts: {
|
|
435
|
+
pk: {
|
|
436
|
+
field: "gsi2pk",
|
|
437
|
+
composite: []
|
|
438
|
+
},
|
|
439
|
+
sk: {
|
|
440
|
+
field: "gsi2sk",
|
|
441
|
+
composite: ["accountId"]
|
|
442
|
+
},
|
|
443
|
+
index: "gsi2"
|
|
444
|
+
},
|
|
445
|
+
byAccountId: {
|
|
446
|
+
pk: {
|
|
447
|
+
field: "gsi0pk",
|
|
448
|
+
composite: ["accountId"]
|
|
449
|
+
},
|
|
450
|
+
sk: {
|
|
451
|
+
field: "gsi0sk",
|
|
452
|
+
composite: []
|
|
453
|
+
},
|
|
454
|
+
index: "gsi0",
|
|
455
|
+
collection: "account"
|
|
456
|
+
},
|
|
457
|
+
byAccountConfigId: {
|
|
458
|
+
pk: {
|
|
459
|
+
field: "gsi1pk",
|
|
460
|
+
composite: ["accountConfigId"]
|
|
461
|
+
},
|
|
462
|
+
sk: {
|
|
463
|
+
field: "gsi1sk",
|
|
464
|
+
composite: ["accountId"]
|
|
465
|
+
},
|
|
466
|
+
index: "gsi1",
|
|
467
|
+
collection: "accountConfig"
|
|
468
|
+
},
|
|
469
|
+
Account: {
|
|
470
|
+
pk: {
|
|
471
|
+
field: "pk",
|
|
472
|
+
composite: ["accountId"]
|
|
473
|
+
},
|
|
474
|
+
sk: {
|
|
475
|
+
field: "sk",
|
|
476
|
+
composite: []
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
model: {
|
|
481
|
+
entity: "account",
|
|
482
|
+
service: "remit",
|
|
483
|
+
version: "1"
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
exports.Mailbox = {
|
|
487
|
+
attributes: {
|
|
488
|
+
mailboxId: {
|
|
489
|
+
type: "string",
|
|
490
|
+
required: true,
|
|
491
|
+
validate: value => {
|
|
492
|
+
if (typeof value === "string" && value.length < 25)
|
|
493
|
+
throw new Error("'mailboxId' must be at least 25 characters");
|
|
494
|
+
if (typeof value === "string" && value.length > 25)
|
|
495
|
+
throw new Error("'mailboxId' must be at most 25 characters");
|
|
496
|
+
return true;
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
accountId: {
|
|
500
|
+
type: "string",
|
|
501
|
+
required: true,
|
|
502
|
+
validate: value => {
|
|
503
|
+
if (typeof value === "string" && value.length < 25)
|
|
504
|
+
throw new Error("'accountId' must be at least 25 characters");
|
|
505
|
+
if (typeof value === "string" && value.length > 25)
|
|
506
|
+
throw new Error("'accountId' must be at most 25 characters");
|
|
507
|
+
return true;
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
namespaceType: {
|
|
511
|
+
type: ["personal", "other_users", "shared"],
|
|
512
|
+
required: true,
|
|
513
|
+
default: "personal"
|
|
514
|
+
},
|
|
515
|
+
namespacePrefix: {
|
|
516
|
+
type: "string",
|
|
517
|
+
required: true
|
|
518
|
+
},
|
|
519
|
+
hierarchyDelimiter: {
|
|
520
|
+
type: "string",
|
|
521
|
+
required: true,
|
|
522
|
+
validate: value => {
|
|
523
|
+
if (typeof value === "string" && value.length < 1)
|
|
524
|
+
throw new Error("'hierarchyDelimiter' must be at least 1 characters");
|
|
525
|
+
if (typeof value === "string" && value.length > 1)
|
|
526
|
+
throw new Error("'hierarchyDelimiter' must be at most 1 characters");
|
|
527
|
+
return true;
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
fullPath: {
|
|
531
|
+
type: "string",
|
|
532
|
+
required: true,
|
|
533
|
+
validate: value => {
|
|
534
|
+
if (typeof value === "string" && value.length < 1)
|
|
535
|
+
throw new Error("'fullPath' must be at least 1 characters");
|
|
536
|
+
if (typeof value === "string" && value.length > 512)
|
|
537
|
+
throw new Error("'fullPath' must be at most 512 characters");
|
|
538
|
+
return true;
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
uidValidity: {
|
|
542
|
+
type: "number",
|
|
543
|
+
required: true,
|
|
544
|
+
validate: value => {
|
|
545
|
+
if (typeof value === "number" && value < 1)
|
|
546
|
+
throw new Error("'uidValidity' must be at least 1");
|
|
547
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
548
|
+
throw new Error("'uidValidity' must be an integer");
|
|
549
|
+
return true;
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
uidNext: {
|
|
553
|
+
type: "number",
|
|
554
|
+
required: true,
|
|
555
|
+
validate: value => {
|
|
556
|
+
if (typeof value === "number" && value < 1)
|
|
557
|
+
throw new Error("'uidNext' must be at least 1");
|
|
558
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
559
|
+
throw new Error("'uidNext' must be an integer");
|
|
560
|
+
return true;
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
highestModseq: {
|
|
564
|
+
type: "number",
|
|
565
|
+
required: true,
|
|
566
|
+
validate: value => {
|
|
567
|
+
if (typeof value === "number" && value < 0)
|
|
568
|
+
throw new Error("'highestModseq' must be at least 0");
|
|
569
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
570
|
+
throw new Error("'highestModseq' must be an integer");
|
|
571
|
+
return true;
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
messageCount: {
|
|
575
|
+
type: "number",
|
|
576
|
+
required: true,
|
|
577
|
+
validate: value => {
|
|
578
|
+
if (typeof value === "number" && value < 0)
|
|
579
|
+
throw new Error("'messageCount' must be at least 0");
|
|
580
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
581
|
+
throw new Error("'messageCount' must be an integer");
|
|
582
|
+
return true;
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
unseenCount: {
|
|
586
|
+
type: "number",
|
|
587
|
+
required: true,
|
|
588
|
+
validate: value => {
|
|
589
|
+
if (typeof value === "number" && value < 0)
|
|
590
|
+
throw new Error("'unseenCount' must be at least 0");
|
|
591
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
592
|
+
throw new Error("'unseenCount' must be an integer");
|
|
593
|
+
return true;
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
deletedCount: {
|
|
597
|
+
type: "number",
|
|
598
|
+
required: true,
|
|
599
|
+
validate: value => {
|
|
600
|
+
if (typeof value === "number" && value < 0)
|
|
601
|
+
throw new Error("'deletedCount' must be at least 0");
|
|
602
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
603
|
+
throw new Error("'deletedCount' must be an integer");
|
|
604
|
+
return true;
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
totalSize: {
|
|
608
|
+
type: "number",
|
|
609
|
+
required: true,
|
|
610
|
+
validate: value => {
|
|
611
|
+
if (typeof value === "number" && value < 0)
|
|
612
|
+
throw new Error("'totalSize' must be at least 0");
|
|
613
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
614
|
+
throw new Error("'totalSize' must be an integer");
|
|
615
|
+
return true;
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
lastSyncUid: {
|
|
619
|
+
type: "number",
|
|
620
|
+
required: true,
|
|
621
|
+
validate: value => {
|
|
622
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
623
|
+
throw new Error("'lastSyncUid' must be an integer");
|
|
624
|
+
return true;
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
highWaterMarkUid: {
|
|
628
|
+
type: "number",
|
|
629
|
+
required: true,
|
|
630
|
+
validate: value => {
|
|
631
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
632
|
+
throw new Error("'highWaterMarkUid' must be an integer");
|
|
633
|
+
return true;
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
lastMessageSyncAt: {
|
|
637
|
+
type: "number",
|
|
638
|
+
required: true,
|
|
639
|
+
validate: value => {
|
|
640
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
641
|
+
throw new Error("'lastMessageSyncAt' must be an integer");
|
|
642
|
+
return true;
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
initialSyncCompletedAt: {
|
|
646
|
+
type: "number",
|
|
647
|
+
required: false,
|
|
648
|
+
validate: value => {
|
|
649
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
650
|
+
throw new Error("'initialSyncCompletedAt' must be an integer");
|
|
651
|
+
return true;
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
parentMailboxId: {
|
|
655
|
+
type: "string",
|
|
656
|
+
required: true,
|
|
657
|
+
default: "None"
|
|
658
|
+
},
|
|
659
|
+
syncStatus: {
|
|
660
|
+
type: ["synced", "pending", "failed", "deleting"],
|
|
661
|
+
required: false
|
|
662
|
+
},
|
|
663
|
+
cursorState: {
|
|
664
|
+
type: ["normal", "cursor_invalid", "rebuilding"],
|
|
665
|
+
required: true,
|
|
666
|
+
default: "normal"
|
|
667
|
+
},
|
|
668
|
+
oldPath: {
|
|
669
|
+
type: "string",
|
|
670
|
+
required: false,
|
|
671
|
+
validate: value => {
|
|
672
|
+
if (typeof value === "string" && value.length > 512)
|
|
673
|
+
throw new Error("'oldPath' must be at most 512 characters");
|
|
674
|
+
return true;
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
specialUse: {
|
|
678
|
+
type: "set",
|
|
679
|
+
items: ["All", "Archive", "Drafts", "Flagged", "Junk", "Sent", "Trash", "Important"],
|
|
680
|
+
set: value => Array.isArray(value) && value.length === 0 ? undefined : value,
|
|
681
|
+
required: false
|
|
682
|
+
},
|
|
683
|
+
createdAt: {
|
|
684
|
+
type: "number",
|
|
685
|
+
readOnly: true,
|
|
686
|
+
required: true,
|
|
687
|
+
default: () => Date.now(),
|
|
688
|
+
set: () => Date.now()
|
|
689
|
+
},
|
|
690
|
+
updatedAt: {
|
|
691
|
+
type: "number",
|
|
692
|
+
watch: "*",
|
|
693
|
+
required: true,
|
|
694
|
+
default: () => Date.now(),
|
|
695
|
+
set: () => Date.now()
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
indexes: {
|
|
699
|
+
byMailboxId: {
|
|
700
|
+
pk: {
|
|
701
|
+
field: "gsi1pk",
|
|
702
|
+
composite: ["mailboxId"]
|
|
703
|
+
},
|
|
704
|
+
sk: {
|
|
705
|
+
field: "gsi1sk",
|
|
706
|
+
composite: []
|
|
707
|
+
},
|
|
708
|
+
index: "gsi1",
|
|
709
|
+
collection: "mailbox"
|
|
710
|
+
},
|
|
711
|
+
byAccountId: {
|
|
712
|
+
pk: {
|
|
713
|
+
field: "gsi0pk",
|
|
714
|
+
composite: ["accountId"]
|
|
715
|
+
},
|
|
716
|
+
sk: {
|
|
717
|
+
field: "gsi0sk",
|
|
718
|
+
composite: []
|
|
719
|
+
},
|
|
720
|
+
index: "gsi0",
|
|
721
|
+
collection: "account"
|
|
722
|
+
},
|
|
723
|
+
Mailbox: {
|
|
724
|
+
pk: {
|
|
725
|
+
field: "pk",
|
|
726
|
+
composite: ["mailboxId"]
|
|
727
|
+
},
|
|
728
|
+
sk: {
|
|
729
|
+
field: "sk",
|
|
730
|
+
composite: []
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
model: {
|
|
735
|
+
entity: "mailbox",
|
|
736
|
+
service: "remit",
|
|
737
|
+
version: "1"
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
exports.Filter = {
|
|
741
|
+
attributes: {
|
|
742
|
+
filterId: {
|
|
743
|
+
type: "string",
|
|
744
|
+
required: true,
|
|
745
|
+
validate: value => {
|
|
746
|
+
if (typeof value === "string" && value.length < 25)
|
|
747
|
+
throw new Error("'filterId' must be at least 25 characters");
|
|
748
|
+
if (typeof value === "string" && value.length > 25)
|
|
749
|
+
throw new Error("'filterId' must be at most 25 characters");
|
|
750
|
+
return true;
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
accountConfigId: {
|
|
754
|
+
type: "string",
|
|
755
|
+
required: true,
|
|
756
|
+
validate: value => {
|
|
757
|
+
if (typeof value === "string" && value.length < 25)
|
|
758
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
759
|
+
if (typeof value === "string" && value.length > 25)
|
|
760
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
761
|
+
return true;
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
name: {
|
|
765
|
+
type: "string",
|
|
766
|
+
required: true,
|
|
767
|
+
validate: value => {
|
|
768
|
+
if (typeof value === "string" && value.length > 256)
|
|
769
|
+
throw new Error("'name' must be at most 256 characters");
|
|
770
|
+
return true;
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
scope: {
|
|
774
|
+
type: ["Standing", "Temporary"],
|
|
775
|
+
required: true
|
|
776
|
+
},
|
|
777
|
+
expiresAt: {
|
|
778
|
+
type: "string",
|
|
779
|
+
required: false
|
|
780
|
+
},
|
|
781
|
+
ttl: {
|
|
782
|
+
type: "number",
|
|
783
|
+
required: false,
|
|
784
|
+
validate: value => {
|
|
785
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
786
|
+
throw new Error("'ttl' must be an integer");
|
|
787
|
+
return true;
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
state: {
|
|
791
|
+
type: ["Active", "Expired"],
|
|
792
|
+
required: true,
|
|
793
|
+
default: "Active"
|
|
794
|
+
},
|
|
795
|
+
hasAnchor: {
|
|
796
|
+
type: "boolean",
|
|
797
|
+
required: true,
|
|
798
|
+
default: false
|
|
799
|
+
},
|
|
800
|
+
ruleChangedAt: {
|
|
801
|
+
type: "number",
|
|
802
|
+
required: true,
|
|
803
|
+
validate: value => {
|
|
804
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
805
|
+
throw new Error("'ruleChangedAt' must be an integer");
|
|
806
|
+
return true;
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
matchOperator: {
|
|
810
|
+
type: ["And", "Or"],
|
|
811
|
+
required: true,
|
|
812
|
+
default: "And"
|
|
813
|
+
},
|
|
814
|
+
literalClauses: {
|
|
815
|
+
type: "list",
|
|
816
|
+
items: {
|
|
817
|
+
type: "map",
|
|
818
|
+
properties: {
|
|
819
|
+
field: {
|
|
820
|
+
type: ["From", "Subject", "HasWords"],
|
|
821
|
+
required: true
|
|
822
|
+
},
|
|
823
|
+
value: {
|
|
824
|
+
type: "string",
|
|
825
|
+
required: true
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
required: true
|
|
830
|
+
},
|
|
831
|
+
actionLabelId: {
|
|
832
|
+
type: "string",
|
|
833
|
+
required: true,
|
|
834
|
+
default: "None"
|
|
835
|
+
},
|
|
836
|
+
actionMailboxId: {
|
|
837
|
+
type: "string",
|
|
838
|
+
required: true,
|
|
839
|
+
default: "None"
|
|
840
|
+
},
|
|
841
|
+
createdAt: {
|
|
842
|
+
type: "number",
|
|
843
|
+
readOnly: true,
|
|
844
|
+
required: true,
|
|
845
|
+
default: () => Date.now(),
|
|
846
|
+
set: () => Date.now()
|
|
847
|
+
},
|
|
848
|
+
updatedAt: {
|
|
849
|
+
type: "number",
|
|
850
|
+
watch: "*",
|
|
851
|
+
required: true,
|
|
852
|
+
default: () => Date.now(),
|
|
853
|
+
set: () => Date.now()
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
indexes: {
|
|
857
|
+
byAccountAndState: {
|
|
858
|
+
pk: {
|
|
859
|
+
field: "gsi1pk",
|
|
860
|
+
composite: ["accountConfigId"]
|
|
861
|
+
},
|
|
862
|
+
sk: {
|
|
863
|
+
field: "gsi1sk",
|
|
864
|
+
composite: ["state", "filterId"]
|
|
865
|
+
},
|
|
866
|
+
index: "gsi1"
|
|
867
|
+
},
|
|
868
|
+
Filter: {
|
|
869
|
+
pk: {
|
|
870
|
+
field: "pk",
|
|
871
|
+
composite: ["accountConfigId"]
|
|
872
|
+
},
|
|
873
|
+
sk: {
|
|
874
|
+
field: "sk",
|
|
875
|
+
composite: ["filterId"]
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
model: {
|
|
880
|
+
entity: "filter",
|
|
881
|
+
service: "remit",
|
|
882
|
+
version: "1"
|
|
883
|
+
}
|
|
884
|
+
};
|
|
885
|
+
exports.OrganizeJobRequest = {
|
|
886
|
+
attributes: {
|
|
887
|
+
organizeJobId: {
|
|
888
|
+
type: "string",
|
|
889
|
+
required: true,
|
|
890
|
+
validate: value => {
|
|
891
|
+
if (typeof value === "string" && value.length < 25)
|
|
892
|
+
throw new Error("'organizeJobId' must be at least 25 characters");
|
|
893
|
+
if (typeof value === "string" && value.length > 25)
|
|
894
|
+
throw new Error("'organizeJobId' must be at most 25 characters");
|
|
895
|
+
return true;
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
accountConfigId: {
|
|
899
|
+
type: "string",
|
|
900
|
+
required: true,
|
|
901
|
+
validate: value => {
|
|
902
|
+
if (typeof value === "string" && value.length < 25)
|
|
903
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
904
|
+
if (typeof value === "string" && value.length > 25)
|
|
905
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
906
|
+
return true;
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
userId: {
|
|
910
|
+
type: "string",
|
|
911
|
+
required: true
|
|
912
|
+
},
|
|
913
|
+
state: {
|
|
914
|
+
type: ["Pending", "Running", "Complete", "Failed"],
|
|
915
|
+
required: true,
|
|
916
|
+
default: "Pending"
|
|
917
|
+
},
|
|
918
|
+
anchorMessageId: {
|
|
919
|
+
type: "string",
|
|
920
|
+
required: true,
|
|
921
|
+
default: "None"
|
|
922
|
+
},
|
|
923
|
+
matchOperator: {
|
|
924
|
+
type: ["And", "Or"],
|
|
925
|
+
required: true,
|
|
926
|
+
default: "And"
|
|
927
|
+
},
|
|
928
|
+
literalClauses: {
|
|
929
|
+
type: "list",
|
|
930
|
+
items: {
|
|
931
|
+
type: "map",
|
|
932
|
+
properties: {
|
|
933
|
+
field: {
|
|
934
|
+
type: ["From", "Subject", "HasWords"],
|
|
935
|
+
required: true
|
|
936
|
+
},
|
|
937
|
+
value: {
|
|
938
|
+
type: "string",
|
|
939
|
+
required: true
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
required: true
|
|
944
|
+
},
|
|
945
|
+
similarityThreshold: {
|
|
946
|
+
type: "number",
|
|
947
|
+
required: true,
|
|
948
|
+
default: 0.75,
|
|
949
|
+
validate: value => {
|
|
950
|
+
if (typeof value === "number" && !Number.isFinite(value))
|
|
951
|
+
throw new Error("'similarityThreshold' must be a finite number");
|
|
952
|
+
return true;
|
|
953
|
+
}
|
|
954
|
+
},
|
|
955
|
+
actionLabelId: {
|
|
956
|
+
type: "string",
|
|
957
|
+
required: true,
|
|
958
|
+
default: "None"
|
|
959
|
+
},
|
|
960
|
+
actionMailboxId: {
|
|
961
|
+
type: "string",
|
|
962
|
+
required: true,
|
|
963
|
+
default: "None"
|
|
964
|
+
},
|
|
965
|
+
matchedCount: {
|
|
966
|
+
type: "number",
|
|
967
|
+
required: true,
|
|
968
|
+
default: 0,
|
|
969
|
+
validate: value => {
|
|
970
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
971
|
+
throw new Error("'matchedCount' must be an integer");
|
|
972
|
+
return true;
|
|
973
|
+
}
|
|
974
|
+
},
|
|
975
|
+
appliedCount: {
|
|
976
|
+
type: "number",
|
|
977
|
+
required: true,
|
|
978
|
+
default: 0,
|
|
979
|
+
validate: value => {
|
|
980
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
981
|
+
throw new Error("'appliedCount' must be an integer");
|
|
982
|
+
return true;
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
failedCount: {
|
|
986
|
+
type: "number",
|
|
987
|
+
required: true,
|
|
988
|
+
default: 0,
|
|
989
|
+
validate: value => {
|
|
990
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
991
|
+
throw new Error("'failedCount' must be an integer");
|
|
992
|
+
return true;
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
errorMessage: {
|
|
996
|
+
type: "string",
|
|
997
|
+
required: true,
|
|
998
|
+
default: ""
|
|
999
|
+
},
|
|
1000
|
+
ttl: {
|
|
1001
|
+
type: "number",
|
|
1002
|
+
required: true,
|
|
1003
|
+
validate: value => {
|
|
1004
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1005
|
+
throw new Error("'ttl' must be an integer");
|
|
1006
|
+
return true;
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
createdAt: {
|
|
1010
|
+
type: "number",
|
|
1011
|
+
readOnly: true,
|
|
1012
|
+
required: true,
|
|
1013
|
+
default: () => Date.now(),
|
|
1014
|
+
set: () => Date.now()
|
|
1015
|
+
},
|
|
1016
|
+
updatedAt: {
|
|
1017
|
+
type: "number",
|
|
1018
|
+
watch: "*",
|
|
1019
|
+
required: true,
|
|
1020
|
+
default: () => Date.now(),
|
|
1021
|
+
set: () => Date.now()
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
indexes: {
|
|
1025
|
+
byAccountConfigId: {
|
|
1026
|
+
pk: {
|
|
1027
|
+
field: "gsi0pk",
|
|
1028
|
+
composite: ["accountConfigId"]
|
|
1029
|
+
},
|
|
1030
|
+
sk: {
|
|
1031
|
+
field: "gsi0sk",
|
|
1032
|
+
composite: ["createdAt"]
|
|
1033
|
+
},
|
|
1034
|
+
index: "gsi0"
|
|
1035
|
+
},
|
|
1036
|
+
OrganizeJobRequest: {
|
|
1037
|
+
pk: {
|
|
1038
|
+
field: "pk",
|
|
1039
|
+
composite: ["organizeJobId"]
|
|
1040
|
+
},
|
|
1041
|
+
sk: {
|
|
1042
|
+
field: "sk",
|
|
1043
|
+
composite: []
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
model: {
|
|
1048
|
+
entity: "organizeJobRequest",
|
|
1049
|
+
service: "remit",
|
|
1050
|
+
version: "1"
|
|
1051
|
+
}
|
|
1052
|
+
};
|
|
1053
|
+
exports.ThreadMessage = {
|
|
1054
|
+
attributes: {
|
|
1055
|
+
threadMessageId: {
|
|
1056
|
+
type: "string",
|
|
1057
|
+
required: true,
|
|
1058
|
+
validate: value => {
|
|
1059
|
+
if (typeof value === "string" && value.length < 25)
|
|
1060
|
+
throw new Error("'threadMessageId' must be at least 25 characters");
|
|
1061
|
+
if (typeof value === "string" && value.length > 25)
|
|
1062
|
+
throw new Error("'threadMessageId' must be at most 25 characters");
|
|
1063
|
+
return true;
|
|
1064
|
+
}
|
|
1065
|
+
},
|
|
1066
|
+
threadId: {
|
|
1067
|
+
type: "string",
|
|
1068
|
+
required: true,
|
|
1069
|
+
validate: value => {
|
|
1070
|
+
if (typeof value === "string" && value.length < 25)
|
|
1071
|
+
throw new Error("'threadId' must be at least 25 characters");
|
|
1072
|
+
if (typeof value === "string" && value.length > 25)
|
|
1073
|
+
throw new Error("'threadId' must be at most 25 characters");
|
|
1074
|
+
return true;
|
|
1075
|
+
}
|
|
1076
|
+
},
|
|
1077
|
+
messageId: {
|
|
1078
|
+
type: "string",
|
|
1079
|
+
required: true,
|
|
1080
|
+
validate: value => {
|
|
1081
|
+
if (typeof value === "string" && value.length < 25)
|
|
1082
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
1083
|
+
if (typeof value === "string" && value.length > 25)
|
|
1084
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
1085
|
+
return true;
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
accountConfigId: {
|
|
1089
|
+
type: "string",
|
|
1090
|
+
required: true,
|
|
1091
|
+
validate: value => {
|
|
1092
|
+
if (typeof value === "string" && value.length < 25)
|
|
1093
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
1094
|
+
if (typeof value === "string" && value.length > 25)
|
|
1095
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
1096
|
+
return true;
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1099
|
+
mailboxId: {
|
|
1100
|
+
type: "string",
|
|
1101
|
+
required: true,
|
|
1102
|
+
validate: value => {
|
|
1103
|
+
if (typeof value === "string" && value.length < 25)
|
|
1104
|
+
throw new Error("'mailboxId' must be at least 25 characters");
|
|
1105
|
+
if (typeof value === "string" && value.length > 25)
|
|
1106
|
+
throw new Error("'mailboxId' must be at most 25 characters");
|
|
1107
|
+
return true;
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
|
+
uid: {
|
|
1111
|
+
type: "number",
|
|
1112
|
+
required: true,
|
|
1113
|
+
validate: value => {
|
|
1114
|
+
if (typeof value === "number" && value < 1)
|
|
1115
|
+
throw new Error("'uid' must be at least 1");
|
|
1116
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1117
|
+
throw new Error("'uid' must be an integer");
|
|
1118
|
+
return true;
|
|
1119
|
+
}
|
|
1120
|
+
},
|
|
1121
|
+
messageIdHeader: {
|
|
1122
|
+
type: "string",
|
|
1123
|
+
required: false
|
|
1124
|
+
},
|
|
1125
|
+
inReplyTo: {
|
|
1126
|
+
type: "string",
|
|
1127
|
+
required: false
|
|
1128
|
+
},
|
|
1129
|
+
referenceOrder: {
|
|
1130
|
+
type: "number",
|
|
1131
|
+
required: true,
|
|
1132
|
+
validate: value => {
|
|
1133
|
+
if (typeof value === "number" && value < 0)
|
|
1134
|
+
throw new Error("'referenceOrder' must be at least 0");
|
|
1135
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1136
|
+
throw new Error("'referenceOrder' must be an integer");
|
|
1137
|
+
return true;
|
|
1138
|
+
}
|
|
1139
|
+
},
|
|
1140
|
+
fromEmail: {
|
|
1141
|
+
type: "string",
|
|
1142
|
+
required: false
|
|
1143
|
+
},
|
|
1144
|
+
fromName: {
|
|
1145
|
+
type: "string",
|
|
1146
|
+
required: false
|
|
1147
|
+
},
|
|
1148
|
+
subject: {
|
|
1149
|
+
type: "string",
|
|
1150
|
+
required: false
|
|
1151
|
+
},
|
|
1152
|
+
internalDate: {
|
|
1153
|
+
type: "number",
|
|
1154
|
+
required: true,
|
|
1155
|
+
validate: value => {
|
|
1156
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1157
|
+
throw new Error("'internalDate' must be an integer");
|
|
1158
|
+
return true;
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
sentDate: {
|
|
1162
|
+
type: "number",
|
|
1163
|
+
required: true,
|
|
1164
|
+
validate: value => {
|
|
1165
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1166
|
+
throw new Error("'sentDate' must be an integer");
|
|
1167
|
+
return true;
|
|
1168
|
+
}
|
|
1169
|
+
},
|
|
1170
|
+
isRead: {
|
|
1171
|
+
type: "boolean",
|
|
1172
|
+
required: true
|
|
1173
|
+
},
|
|
1174
|
+
hasAttachment: {
|
|
1175
|
+
type: "boolean",
|
|
1176
|
+
required: true
|
|
1177
|
+
},
|
|
1178
|
+
star: {
|
|
1179
|
+
type: ["none", "yellow", "orange", "red", "purple", "blue", "teal", "green", "yellow_bang", "red_bang", "purple_question", "blue_info", "orange_guillemet", "green_check", "yellow_check", "blue_star"],
|
|
1180
|
+
required: true,
|
|
1181
|
+
default: "none"
|
|
1182
|
+
},
|
|
1183
|
+
hasStars: {
|
|
1184
|
+
type: "boolean",
|
|
1185
|
+
required: true
|
|
1186
|
+
},
|
|
1187
|
+
isDeleted: {
|
|
1188
|
+
type: "boolean",
|
|
1189
|
+
required: true
|
|
1190
|
+
},
|
|
1191
|
+
snippet: {
|
|
1192
|
+
type: "string",
|
|
1193
|
+
required: false,
|
|
1194
|
+
validate: value => {
|
|
1195
|
+
if (typeof value === "string" && value.length > 256)
|
|
1196
|
+
throw new Error("'snippet' must be at most 256 characters");
|
|
1197
|
+
return true;
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
category: {
|
|
1201
|
+
type: ["uncategorized", "personal", "newsletter", "marketing", "automated", "transactional", "social"],
|
|
1202
|
+
required: true,
|
|
1203
|
+
default: "uncategorized"
|
|
1204
|
+
},
|
|
1205
|
+
createdAt: {
|
|
1206
|
+
type: "number",
|
|
1207
|
+
readOnly: true,
|
|
1208
|
+
required: true,
|
|
1209
|
+
default: () => Date.now(),
|
|
1210
|
+
set: () => Date.now()
|
|
1211
|
+
},
|
|
1212
|
+
updatedAt: {
|
|
1213
|
+
type: "number",
|
|
1214
|
+
watch: "*",
|
|
1215
|
+
required: true,
|
|
1216
|
+
default: () => Date.now(),
|
|
1217
|
+
set: () => Date.now()
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1220
|
+
indexes: {
|
|
1221
|
+
byMailboxAndReadStatus: {
|
|
1222
|
+
pk: {
|
|
1223
|
+
field: "pk",
|
|
1224
|
+
composite: ["accountConfigId"]
|
|
1225
|
+
},
|
|
1226
|
+
sk: {
|
|
1227
|
+
field: "lsi5sk",
|
|
1228
|
+
composite: ["mailboxId", "isRead", "sentDate"]
|
|
1229
|
+
},
|
|
1230
|
+
index: "lsi5"
|
|
1231
|
+
},
|
|
1232
|
+
byStarred: {
|
|
1233
|
+
pk: {
|
|
1234
|
+
field: "pk",
|
|
1235
|
+
composite: ["accountConfigId"]
|
|
1236
|
+
},
|
|
1237
|
+
sk: {
|
|
1238
|
+
field: "lsi4sk",
|
|
1239
|
+
composite: ["hasStars", "sentDate"]
|
|
1240
|
+
},
|
|
1241
|
+
index: "lsi4"
|
|
1242
|
+
},
|
|
1243
|
+
byAttachment: {
|
|
1244
|
+
pk: {
|
|
1245
|
+
field: "pk",
|
|
1246
|
+
composite: ["accountConfigId"]
|
|
1247
|
+
},
|
|
1248
|
+
sk: {
|
|
1249
|
+
field: "lsi3sk",
|
|
1250
|
+
composite: ["hasAttachment", "sentDate"]
|
|
1251
|
+
},
|
|
1252
|
+
index: "lsi3"
|
|
1253
|
+
},
|
|
1254
|
+
byMailboxId: {
|
|
1255
|
+
pk: {
|
|
1256
|
+
field: "pk",
|
|
1257
|
+
composite: ["accountConfigId"]
|
|
1258
|
+
},
|
|
1259
|
+
sk: {
|
|
1260
|
+
field: "lsi2sk",
|
|
1261
|
+
composite: ["mailboxId", "sentDate"]
|
|
1262
|
+
},
|
|
1263
|
+
index: "lsi2"
|
|
1264
|
+
},
|
|
1265
|
+
byDate: {
|
|
1266
|
+
pk: {
|
|
1267
|
+
field: "pk",
|
|
1268
|
+
composite: ["accountConfigId"]
|
|
1269
|
+
},
|
|
1270
|
+
sk: {
|
|
1271
|
+
field: "lsi1sk",
|
|
1272
|
+
composite: ["sentDate"]
|
|
1273
|
+
},
|
|
1274
|
+
index: "lsi1"
|
|
1275
|
+
},
|
|
1276
|
+
byUnread: {
|
|
1277
|
+
pk: {
|
|
1278
|
+
field: "gsi2pk",
|
|
1279
|
+
composite: ["accountConfigId"]
|
|
1280
|
+
},
|
|
1281
|
+
sk: {
|
|
1282
|
+
field: "gsi2sk",
|
|
1283
|
+
composite: ["isRead", "sentDate"]
|
|
1284
|
+
},
|
|
1285
|
+
index: "gsi2"
|
|
1286
|
+
},
|
|
1287
|
+
byMessageId: {
|
|
1288
|
+
pk: {
|
|
1289
|
+
field: "gsi1pk",
|
|
1290
|
+
composite: ["messageId"]
|
|
1291
|
+
},
|
|
1292
|
+
sk: {
|
|
1293
|
+
field: "gsi1sk",
|
|
1294
|
+
composite: []
|
|
1295
|
+
},
|
|
1296
|
+
index: "gsi1"
|
|
1297
|
+
},
|
|
1298
|
+
byThreadId: {
|
|
1299
|
+
pk: {
|
|
1300
|
+
field: "gsi0pk",
|
|
1301
|
+
composite: ["threadId"]
|
|
1302
|
+
},
|
|
1303
|
+
sk: {
|
|
1304
|
+
field: "gsi0sk",
|
|
1305
|
+
composite: ["sentDate"]
|
|
1306
|
+
},
|
|
1307
|
+
index: "gsi0",
|
|
1308
|
+
collection: "threadDetails"
|
|
1309
|
+
},
|
|
1310
|
+
ThreadMessage: {
|
|
1311
|
+
pk: {
|
|
1312
|
+
field: "pk",
|
|
1313
|
+
composite: ["accountConfigId"]
|
|
1314
|
+
},
|
|
1315
|
+
sk: {
|
|
1316
|
+
field: "sk",
|
|
1317
|
+
composite: ["threadMessageId"]
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
model: {
|
|
1322
|
+
entity: "threadMessage",
|
|
1323
|
+
service: "remit",
|
|
1324
|
+
version: "1"
|
|
1325
|
+
}
|
|
1326
|
+
};
|
|
1327
|
+
exports.OutboxMessage = {
|
|
1328
|
+
attributes: {
|
|
1329
|
+
outboxMessageId: {
|
|
1330
|
+
type: "string",
|
|
1331
|
+
required: true,
|
|
1332
|
+
validate: value => {
|
|
1333
|
+
if (typeof value === "string" && value.length < 25)
|
|
1334
|
+
throw new Error("'outboxMessageId' must be at least 25 characters");
|
|
1335
|
+
if (typeof value === "string" && value.length > 25)
|
|
1336
|
+
throw new Error("'outboxMessageId' must be at most 25 characters");
|
|
1337
|
+
return true;
|
|
1338
|
+
}
|
|
1339
|
+
},
|
|
1340
|
+
accountId: {
|
|
1341
|
+
type: "string",
|
|
1342
|
+
required: true,
|
|
1343
|
+
validate: value => {
|
|
1344
|
+
if (typeof value === "string" && value.length < 25)
|
|
1345
|
+
throw new Error("'accountId' must be at least 25 characters");
|
|
1346
|
+
if (typeof value === "string" && value.length > 25)
|
|
1347
|
+
throw new Error("'accountId' must be at most 25 characters");
|
|
1348
|
+
return true;
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
accountConfigId: {
|
|
1352
|
+
type: "string",
|
|
1353
|
+
required: true,
|
|
1354
|
+
validate: value => {
|
|
1355
|
+
if (typeof value === "string" && value.length < 25)
|
|
1356
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
1357
|
+
if (typeof value === "string" && value.length > 25)
|
|
1358
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
1359
|
+
return true;
|
|
1360
|
+
}
|
|
1361
|
+
},
|
|
1362
|
+
fromAddress: {
|
|
1363
|
+
type: "string",
|
|
1364
|
+
required: true
|
|
1365
|
+
},
|
|
1366
|
+
fromName: {
|
|
1367
|
+
type: "string",
|
|
1368
|
+
required: false
|
|
1369
|
+
},
|
|
1370
|
+
toAddresses: {
|
|
1371
|
+
type: "list",
|
|
1372
|
+
items: {
|
|
1373
|
+
type: "string"
|
|
1374
|
+
},
|
|
1375
|
+
required: true
|
|
1376
|
+
},
|
|
1377
|
+
ccAddresses: {
|
|
1378
|
+
type: "list",
|
|
1379
|
+
items: {
|
|
1380
|
+
type: "string"
|
|
1381
|
+
},
|
|
1382
|
+
required: true
|
|
1383
|
+
},
|
|
1384
|
+
bccAddresses: {
|
|
1385
|
+
type: "list",
|
|
1386
|
+
items: {
|
|
1387
|
+
type: "string"
|
|
1388
|
+
},
|
|
1389
|
+
required: true
|
|
1390
|
+
},
|
|
1391
|
+
replyToAddress: {
|
|
1392
|
+
type: "string",
|
|
1393
|
+
required: false
|
|
1394
|
+
},
|
|
1395
|
+
subject: {
|
|
1396
|
+
type: "string",
|
|
1397
|
+
required: false
|
|
1398
|
+
},
|
|
1399
|
+
messageIdValue: {
|
|
1400
|
+
type: "string",
|
|
1401
|
+
required: true
|
|
1402
|
+
},
|
|
1403
|
+
inReplyTo: {
|
|
1404
|
+
type: "string",
|
|
1405
|
+
required: false
|
|
1406
|
+
},
|
|
1407
|
+
references: {
|
|
1408
|
+
type: "list",
|
|
1409
|
+
items: {
|
|
1410
|
+
type: "string"
|
|
1411
|
+
},
|
|
1412
|
+
required: true
|
|
1413
|
+
},
|
|
1414
|
+
textBody: {
|
|
1415
|
+
type: "string",
|
|
1416
|
+
required: false
|
|
1417
|
+
},
|
|
1418
|
+
htmlBody: {
|
|
1419
|
+
type: "string",
|
|
1420
|
+
required: false
|
|
1421
|
+
},
|
|
1422
|
+
status: {
|
|
1423
|
+
type: ["draft", "queued", "sending", "sent", "failed", "blocked"],
|
|
1424
|
+
required: true
|
|
1425
|
+
},
|
|
1426
|
+
lastError: {
|
|
1427
|
+
type: "string",
|
|
1428
|
+
required: false
|
|
1429
|
+
},
|
|
1430
|
+
lastSmtpCode: {
|
|
1431
|
+
type: "number",
|
|
1432
|
+
required: false,
|
|
1433
|
+
validate: value => {
|
|
1434
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1435
|
+
throw new Error("'lastSmtpCode' must be an integer");
|
|
1436
|
+
return true;
|
|
1437
|
+
}
|
|
1438
|
+
},
|
|
1439
|
+
sentAt: {
|
|
1440
|
+
type: "number",
|
|
1441
|
+
required: false,
|
|
1442
|
+
validate: value => {
|
|
1443
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1444
|
+
throw new Error("'sentAt' must be an integer");
|
|
1445
|
+
return true;
|
|
1446
|
+
}
|
|
1447
|
+
},
|
|
1448
|
+
smtpMessageId: {
|
|
1449
|
+
type: "string",
|
|
1450
|
+
required: false
|
|
1451
|
+
},
|
|
1452
|
+
createdAt: {
|
|
1453
|
+
type: "number",
|
|
1454
|
+
readOnly: true,
|
|
1455
|
+
required: true,
|
|
1456
|
+
default: () => Date.now(),
|
|
1457
|
+
set: () => Date.now()
|
|
1458
|
+
},
|
|
1459
|
+
updatedAt: {
|
|
1460
|
+
type: "number",
|
|
1461
|
+
watch: "*",
|
|
1462
|
+
required: true,
|
|
1463
|
+
default: () => Date.now(),
|
|
1464
|
+
set: () => Date.now()
|
|
1465
|
+
}
|
|
1466
|
+
},
|
|
1467
|
+
indexes: {
|
|
1468
|
+
byAccountId: {
|
|
1469
|
+
pk: {
|
|
1470
|
+
field: "gsi0pk",
|
|
1471
|
+
composite: ["accountId"]
|
|
1472
|
+
},
|
|
1473
|
+
sk: {
|
|
1474
|
+
field: "gsi0sk",
|
|
1475
|
+
composite: ["createdAt"]
|
|
1476
|
+
},
|
|
1477
|
+
index: "gsi0"
|
|
1478
|
+
},
|
|
1479
|
+
OutboxMessage: {
|
|
1480
|
+
pk: {
|
|
1481
|
+
field: "pk",
|
|
1482
|
+
composite: ["outboxMessageId"]
|
|
1483
|
+
},
|
|
1484
|
+
sk: {
|
|
1485
|
+
field: "sk",
|
|
1486
|
+
composite: []
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
model: {
|
|
1491
|
+
entity: "outboxMessage",
|
|
1492
|
+
service: "remit",
|
|
1493
|
+
version: "1"
|
|
1494
|
+
}
|
|
1495
|
+
};
|
|
1496
|
+
exports.Address = {
|
|
1497
|
+
attributes: {
|
|
1498
|
+
addressId: {
|
|
1499
|
+
type: "string",
|
|
1500
|
+
required: true,
|
|
1501
|
+
validate: value => {
|
|
1502
|
+
if (typeof value === "string" && value.length < 25)
|
|
1503
|
+
throw new Error("'addressId' must be at least 25 characters");
|
|
1504
|
+
if (typeof value === "string" && value.length > 25)
|
|
1505
|
+
throw new Error("'addressId' must be at most 25 characters");
|
|
1506
|
+
return true;
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
accountConfigId: {
|
|
1510
|
+
type: "string",
|
|
1511
|
+
required: true,
|
|
1512
|
+
validate: value => {
|
|
1513
|
+
if (typeof value === "string" && value.length < 25)
|
|
1514
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
1515
|
+
if (typeof value === "string" && value.length > 25)
|
|
1516
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
1517
|
+
return true;
|
|
1518
|
+
}
|
|
1519
|
+
},
|
|
1520
|
+
displayName: {
|
|
1521
|
+
type: "string",
|
|
1522
|
+
required: false
|
|
1523
|
+
},
|
|
1524
|
+
localPart: {
|
|
1525
|
+
type: "string",
|
|
1526
|
+
required: true,
|
|
1527
|
+
validate: value => {
|
|
1528
|
+
if (typeof value === "string" && value.length < 1)
|
|
1529
|
+
throw new Error("'localPart' must be at least 1 characters");
|
|
1530
|
+
return true;
|
|
1531
|
+
}
|
|
1532
|
+
},
|
|
1533
|
+
domain: {
|
|
1534
|
+
type: "string",
|
|
1535
|
+
required: true,
|
|
1536
|
+
validate: value => {
|
|
1537
|
+
if (typeof value === "string" && value.length < 1)
|
|
1538
|
+
throw new Error("'domain' must be at least 1 characters");
|
|
1539
|
+
return true;
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1542
|
+
normalizedEmail: {
|
|
1543
|
+
type: "string",
|
|
1544
|
+
required: true
|
|
1545
|
+
},
|
|
1546
|
+
normalizedCompound: {
|
|
1547
|
+
type: "string",
|
|
1548
|
+
required: true
|
|
1549
|
+
},
|
|
1550
|
+
flags: {
|
|
1551
|
+
type: "map",
|
|
1552
|
+
properties: {
|
|
1553
|
+
trusted: {
|
|
1554
|
+
type: "map",
|
|
1555
|
+
properties: {
|
|
1556
|
+
value: {
|
|
1557
|
+
type: "boolean",
|
|
1558
|
+
required: true
|
|
1559
|
+
},
|
|
1560
|
+
setAt: {
|
|
1561
|
+
type: "number",
|
|
1562
|
+
required: true
|
|
1563
|
+
},
|
|
1564
|
+
setBy: {
|
|
1565
|
+
type: "string",
|
|
1566
|
+
required: false
|
|
1567
|
+
},
|
|
1568
|
+
expiresAt: {
|
|
1569
|
+
type: "number",
|
|
1570
|
+
required: false
|
|
1571
|
+
},
|
|
1572
|
+
reason: {
|
|
1573
|
+
type: "string",
|
|
1574
|
+
required: false
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
required: false
|
|
1578
|
+
},
|
|
1579
|
+
blocked: {
|
|
1580
|
+
type: "map",
|
|
1581
|
+
properties: {
|
|
1582
|
+
value: {
|
|
1583
|
+
type: "boolean",
|
|
1584
|
+
required: true
|
|
1585
|
+
},
|
|
1586
|
+
setAt: {
|
|
1587
|
+
type: "number",
|
|
1588
|
+
required: true
|
|
1589
|
+
},
|
|
1590
|
+
setBy: {
|
|
1591
|
+
type: "string",
|
|
1592
|
+
required: false
|
|
1593
|
+
},
|
|
1594
|
+
expiresAt: {
|
|
1595
|
+
type: "number",
|
|
1596
|
+
required: false
|
|
1597
|
+
},
|
|
1598
|
+
reason: {
|
|
1599
|
+
type: "string",
|
|
1600
|
+
required: false
|
|
1601
|
+
}
|
|
1602
|
+
},
|
|
1603
|
+
required: false
|
|
1604
|
+
},
|
|
1605
|
+
muted: {
|
|
1606
|
+
type: "map",
|
|
1607
|
+
properties: {
|
|
1608
|
+
value: {
|
|
1609
|
+
type: "boolean",
|
|
1610
|
+
required: true
|
|
1611
|
+
},
|
|
1612
|
+
setAt: {
|
|
1613
|
+
type: "number",
|
|
1614
|
+
required: true
|
|
1615
|
+
},
|
|
1616
|
+
setBy: {
|
|
1617
|
+
type: "string",
|
|
1618
|
+
required: false
|
|
1619
|
+
},
|
|
1620
|
+
expiresAt: {
|
|
1621
|
+
type: "number",
|
|
1622
|
+
required: false
|
|
1623
|
+
},
|
|
1624
|
+
reason: {
|
|
1625
|
+
type: "string",
|
|
1626
|
+
required: false
|
|
1627
|
+
}
|
|
1628
|
+
},
|
|
1629
|
+
required: false
|
|
1630
|
+
},
|
|
1631
|
+
vip: {
|
|
1632
|
+
type: "map",
|
|
1633
|
+
properties: {
|
|
1634
|
+
value: {
|
|
1635
|
+
type: "boolean",
|
|
1636
|
+
required: true
|
|
1637
|
+
},
|
|
1638
|
+
setAt: {
|
|
1639
|
+
type: "number",
|
|
1640
|
+
required: true
|
|
1641
|
+
},
|
|
1642
|
+
setBy: {
|
|
1643
|
+
type: "string",
|
|
1644
|
+
required: false
|
|
1645
|
+
},
|
|
1646
|
+
expiresAt: {
|
|
1647
|
+
type: "number",
|
|
1648
|
+
required: false
|
|
1649
|
+
},
|
|
1650
|
+
reason: {
|
|
1651
|
+
type: "string",
|
|
1652
|
+
required: false
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
required: false
|
|
1656
|
+
},
|
|
1657
|
+
wellknown: {
|
|
1658
|
+
type: "map",
|
|
1659
|
+
properties: {
|
|
1660
|
+
value: {
|
|
1661
|
+
type: "boolean",
|
|
1662
|
+
required: true
|
|
1663
|
+
},
|
|
1664
|
+
setAt: {
|
|
1665
|
+
type: "number",
|
|
1666
|
+
required: true
|
|
1667
|
+
},
|
|
1668
|
+
setBy: {
|
|
1669
|
+
type: "string",
|
|
1670
|
+
required: false
|
|
1671
|
+
},
|
|
1672
|
+
expiresAt: {
|
|
1673
|
+
type: "number",
|
|
1674
|
+
required: false
|
|
1675
|
+
},
|
|
1676
|
+
reason: {
|
|
1677
|
+
type: "string",
|
|
1678
|
+
required: false
|
|
1679
|
+
}
|
|
1680
|
+
},
|
|
1681
|
+
required: false
|
|
1682
|
+
},
|
|
1683
|
+
category: {
|
|
1684
|
+
type: "map",
|
|
1685
|
+
properties: {
|
|
1686
|
+
value: {
|
|
1687
|
+
type: ["uncategorized", "personal", "newsletter", "marketing", "automated", "transactional", "social"],
|
|
1688
|
+
required: true
|
|
1689
|
+
},
|
|
1690
|
+
setAt: {
|
|
1691
|
+
type: "number",
|
|
1692
|
+
required: true
|
|
1693
|
+
},
|
|
1694
|
+
setBy: {
|
|
1695
|
+
type: "string",
|
|
1696
|
+
required: false
|
|
1697
|
+
},
|
|
1698
|
+
expiresAt: {
|
|
1699
|
+
type: "number",
|
|
1700
|
+
required: false
|
|
1701
|
+
},
|
|
1702
|
+
reason: {
|
|
1703
|
+
type: "string",
|
|
1704
|
+
required: false
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
required: false
|
|
1708
|
+
},
|
|
1709
|
+
autoArchive: {
|
|
1710
|
+
type: "map",
|
|
1711
|
+
properties: {
|
|
1712
|
+
value: {
|
|
1713
|
+
type: "boolean",
|
|
1714
|
+
required: true
|
|
1715
|
+
},
|
|
1716
|
+
setAt: {
|
|
1717
|
+
type: "number",
|
|
1718
|
+
required: true
|
|
1719
|
+
},
|
|
1720
|
+
setBy: {
|
|
1721
|
+
type: "string",
|
|
1722
|
+
required: false
|
|
1723
|
+
},
|
|
1724
|
+
expiresAt: {
|
|
1725
|
+
type: "number",
|
|
1726
|
+
required: false
|
|
1727
|
+
},
|
|
1728
|
+
reason: {
|
|
1729
|
+
type: "string",
|
|
1730
|
+
required: false
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
required: false
|
|
1734
|
+
},
|
|
1735
|
+
unsubscribed: {
|
|
1736
|
+
type: "map",
|
|
1737
|
+
properties: {
|
|
1738
|
+
value: {
|
|
1739
|
+
type: "boolean",
|
|
1740
|
+
required: true
|
|
1741
|
+
},
|
|
1742
|
+
setAt: {
|
|
1743
|
+
type: "number",
|
|
1744
|
+
required: true
|
|
1745
|
+
},
|
|
1746
|
+
setBy: {
|
|
1747
|
+
type: "string",
|
|
1748
|
+
required: false
|
|
1749
|
+
},
|
|
1750
|
+
expiresAt: {
|
|
1751
|
+
type: "number",
|
|
1752
|
+
required: false
|
|
1753
|
+
},
|
|
1754
|
+
reason: {
|
|
1755
|
+
type: "string",
|
|
1756
|
+
required: false
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
required: false
|
|
1760
|
+
}
|
|
1761
|
+
},
|
|
1762
|
+
required: true
|
|
1763
|
+
},
|
|
1764
|
+
inboundCount: {
|
|
1765
|
+
type: "number",
|
|
1766
|
+
required: true,
|
|
1767
|
+
default: 0,
|
|
1768
|
+
validate: value => {
|
|
1769
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1770
|
+
throw new Error("'inboundCount' must be an integer");
|
|
1771
|
+
return true;
|
|
1772
|
+
}
|
|
1773
|
+
},
|
|
1774
|
+
outboundCount: {
|
|
1775
|
+
type: "number",
|
|
1776
|
+
required: true,
|
|
1777
|
+
default: 0,
|
|
1778
|
+
validate: value => {
|
|
1779
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1780
|
+
throw new Error("'outboundCount' must be an integer");
|
|
1781
|
+
return true;
|
|
1782
|
+
}
|
|
1783
|
+
},
|
|
1784
|
+
replyCount: {
|
|
1785
|
+
type: "number",
|
|
1786
|
+
required: true,
|
|
1787
|
+
default: 0,
|
|
1788
|
+
validate: value => {
|
|
1789
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1790
|
+
throw new Error("'replyCount' must be an integer");
|
|
1791
|
+
return true;
|
|
1792
|
+
}
|
|
1793
|
+
},
|
|
1794
|
+
lastInboundAt: {
|
|
1795
|
+
type: "number",
|
|
1796
|
+
required: true,
|
|
1797
|
+
default: 0,
|
|
1798
|
+
validate: value => {
|
|
1799
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1800
|
+
throw new Error("'lastInboundAt' must be an integer");
|
|
1801
|
+
return true;
|
|
1802
|
+
}
|
|
1803
|
+
},
|
|
1804
|
+
lastOutboundAt: {
|
|
1805
|
+
type: "number",
|
|
1806
|
+
required: false,
|
|
1807
|
+
validate: value => {
|
|
1808
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1809
|
+
throw new Error("'lastOutboundAt' must be an integer");
|
|
1810
|
+
return true;
|
|
1811
|
+
}
|
|
1812
|
+
},
|
|
1813
|
+
lastReplyAt: {
|
|
1814
|
+
type: "number",
|
|
1815
|
+
required: true,
|
|
1816
|
+
default: 0,
|
|
1817
|
+
validate: value => {
|
|
1818
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1819
|
+
throw new Error("'lastReplyAt' must be an integer");
|
|
1820
|
+
return true;
|
|
1821
|
+
}
|
|
1822
|
+
},
|
|
1823
|
+
createdAt: {
|
|
1824
|
+
type: "number",
|
|
1825
|
+
readOnly: true,
|
|
1826
|
+
required: true,
|
|
1827
|
+
default: () => Date.now(),
|
|
1828
|
+
set: () => Date.now()
|
|
1829
|
+
},
|
|
1830
|
+
updatedAt: {
|
|
1831
|
+
type: "number",
|
|
1832
|
+
watch: "*",
|
|
1833
|
+
required: true,
|
|
1834
|
+
default: () => Date.now(),
|
|
1835
|
+
set: () => Date.now()
|
|
1836
|
+
}
|
|
1837
|
+
},
|
|
1838
|
+
indexes: {
|
|
1839
|
+
byAccountConfigId: {
|
|
1840
|
+
pk: {
|
|
1841
|
+
field: "gsi1pk",
|
|
1842
|
+
composite: ["accountConfigId"]
|
|
1843
|
+
},
|
|
1844
|
+
sk: {
|
|
1845
|
+
field: "gsi1sk",
|
|
1846
|
+
composite: ["normalizedCompound"]
|
|
1847
|
+
},
|
|
1848
|
+
index: "gsi1",
|
|
1849
|
+
collection: "accountConfig"
|
|
1850
|
+
},
|
|
1851
|
+
Address: {
|
|
1852
|
+
pk: {
|
|
1853
|
+
field: "pk",
|
|
1854
|
+
composite: ["addressId"]
|
|
1855
|
+
},
|
|
1856
|
+
sk: {
|
|
1857
|
+
field: "sk",
|
|
1858
|
+
composite: []
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
},
|
|
1862
|
+
model: {
|
|
1863
|
+
entity: "address",
|
|
1864
|
+
service: "remit",
|
|
1865
|
+
version: "1"
|
|
1866
|
+
}
|
|
1867
|
+
};
|
|
1868
|
+
exports.Message = {
|
|
1869
|
+
attributes: {
|
|
1870
|
+
messageId: {
|
|
1871
|
+
type: "string",
|
|
1872
|
+
required: true,
|
|
1873
|
+
validate: value => {
|
|
1874
|
+
if (typeof value === "string" && value.length < 25)
|
|
1875
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
1876
|
+
if (typeof value === "string" && value.length > 25)
|
|
1877
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
1878
|
+
return true;
|
|
1879
|
+
}
|
|
1880
|
+
},
|
|
1881
|
+
mailboxId: {
|
|
1882
|
+
type: "string",
|
|
1883
|
+
required: true,
|
|
1884
|
+
validate: value => {
|
|
1885
|
+
if (typeof value === "string" && value.length < 25)
|
|
1886
|
+
throw new Error("'mailboxId' must be at least 25 characters");
|
|
1887
|
+
if (typeof value === "string" && value.length > 25)
|
|
1888
|
+
throw new Error("'mailboxId' must be at most 25 characters");
|
|
1889
|
+
return true;
|
|
1890
|
+
}
|
|
1891
|
+
},
|
|
1892
|
+
uid: {
|
|
1893
|
+
type: "number",
|
|
1894
|
+
required: true,
|
|
1895
|
+
validate: value => {
|
|
1896
|
+
if (typeof value === "number" && value < 1)
|
|
1897
|
+
throw new Error("'uid' must be at least 1");
|
|
1898
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1899
|
+
throw new Error("'uid' must be an integer");
|
|
1900
|
+
return true;
|
|
1901
|
+
}
|
|
1902
|
+
},
|
|
1903
|
+
sequenceNumber: {
|
|
1904
|
+
type: "number",
|
|
1905
|
+
required: true,
|
|
1906
|
+
validate: value => {
|
|
1907
|
+
if (typeof value === "number" && value < 1)
|
|
1908
|
+
throw new Error("'sequenceNumber' must be at least 1");
|
|
1909
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1910
|
+
throw new Error("'sequenceNumber' must be an integer");
|
|
1911
|
+
return true;
|
|
1912
|
+
}
|
|
1913
|
+
},
|
|
1914
|
+
rfc822Size: {
|
|
1915
|
+
type: "number",
|
|
1916
|
+
required: true,
|
|
1917
|
+
validate: value => {
|
|
1918
|
+
if (typeof value === "number" && value < 0)
|
|
1919
|
+
throw new Error("'rfc822Size' must be at least 0");
|
|
1920
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1921
|
+
throw new Error("'rfc822Size' must be an integer");
|
|
1922
|
+
return true;
|
|
1923
|
+
}
|
|
1924
|
+
},
|
|
1925
|
+
internalDate: {
|
|
1926
|
+
type: "number",
|
|
1927
|
+
required: true,
|
|
1928
|
+
validate: value => {
|
|
1929
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1930
|
+
throw new Error("'internalDate' must be an integer");
|
|
1931
|
+
return true;
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
messageIdHeader: {
|
|
1935
|
+
type: "string",
|
|
1936
|
+
required: false
|
|
1937
|
+
},
|
|
1938
|
+
envelopeId: {
|
|
1939
|
+
type: "string",
|
|
1940
|
+
required: true,
|
|
1941
|
+
validate: value => {
|
|
1942
|
+
if (typeof value === "string" && value.length < 25)
|
|
1943
|
+
throw new Error("'envelopeId' must be at least 25 characters");
|
|
1944
|
+
if (typeof value === "string" && value.length > 25)
|
|
1945
|
+
throw new Error("'envelopeId' must be at most 25 characters");
|
|
1946
|
+
return true;
|
|
1947
|
+
}
|
|
1948
|
+
},
|
|
1949
|
+
rootBodyPartId: {
|
|
1950
|
+
type: "string",
|
|
1951
|
+
required: true,
|
|
1952
|
+
validate: value => {
|
|
1953
|
+
if (typeof value === "string" && value.length < 25)
|
|
1954
|
+
throw new Error("'rootBodyPartId' must be at least 25 characters");
|
|
1955
|
+
if (typeof value === "string" && value.length > 25)
|
|
1956
|
+
throw new Error("'rootBodyPartId' must be at most 25 characters");
|
|
1957
|
+
return true;
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
bodyStorageKey: {
|
|
1961
|
+
type: "string",
|
|
1962
|
+
required: false
|
|
1963
|
+
},
|
|
1964
|
+
status: {
|
|
1965
|
+
type: ["active", "deleting", "deleted", "moving"],
|
|
1966
|
+
required: true,
|
|
1967
|
+
default: "active"
|
|
1968
|
+
},
|
|
1969
|
+
syncStatus: {
|
|
1970
|
+
type: ["synced", "pending", "failed"],
|
|
1971
|
+
required: true,
|
|
1972
|
+
default: "synced"
|
|
1973
|
+
},
|
|
1974
|
+
originalMailboxId: {
|
|
1975
|
+
type: "string",
|
|
1976
|
+
required: false,
|
|
1977
|
+
validate: value => {
|
|
1978
|
+
if (typeof value === "string" && value.length < 25)
|
|
1979
|
+
throw new Error("'originalMailboxId' must be at least 25 characters");
|
|
1980
|
+
if (typeof value === "string" && value.length > 25)
|
|
1981
|
+
throw new Error("'originalMailboxId' must be at most 25 characters");
|
|
1982
|
+
return true;
|
|
1983
|
+
}
|
|
1984
|
+
},
|
|
1985
|
+
originalUid: {
|
|
1986
|
+
type: "number",
|
|
1987
|
+
required: false,
|
|
1988
|
+
validate: value => {
|
|
1989
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
1990
|
+
throw new Error("'originalUid' must be an integer");
|
|
1991
|
+
return true;
|
|
1992
|
+
}
|
|
1993
|
+
},
|
|
1994
|
+
category: {
|
|
1995
|
+
type: ["uncategorized", "personal", "newsletter", "marketing", "automated", "transactional", "social"],
|
|
1996
|
+
required: true,
|
|
1997
|
+
default: "uncategorized"
|
|
1998
|
+
},
|
|
1999
|
+
authenticity: {
|
|
2000
|
+
type: "map",
|
|
2001
|
+
properties: {
|
|
2002
|
+
fromDomain: {
|
|
2003
|
+
type: "string",
|
|
2004
|
+
required: true
|
|
2005
|
+
},
|
|
2006
|
+
dkimDomain: {
|
|
2007
|
+
type: "string",
|
|
2008
|
+
required: false
|
|
2009
|
+
},
|
|
2010
|
+
dkimMismatch: {
|
|
2011
|
+
type: "boolean",
|
|
2012
|
+
required: true
|
|
2013
|
+
}
|
|
2014
|
+
},
|
|
2015
|
+
required: false
|
|
2016
|
+
},
|
|
2017
|
+
authResult: {
|
|
2018
|
+
type: "map",
|
|
2019
|
+
properties: {
|
|
2020
|
+
dmarc: {
|
|
2021
|
+
type: ["Pass", "Fail", "None", "Neutral", "Softfail"],
|
|
2022
|
+
required: false
|
|
2023
|
+
},
|
|
2024
|
+
spf: {
|
|
2025
|
+
type: ["Pass", "Fail", "None", "Neutral", "Softfail"],
|
|
2026
|
+
required: false
|
|
2027
|
+
},
|
|
2028
|
+
dkim: {
|
|
2029
|
+
type: ["Pass", "Fail", "None", "Neutral", "Softfail"],
|
|
2030
|
+
required: false
|
|
2031
|
+
}
|
|
2032
|
+
},
|
|
2033
|
+
required: false
|
|
2034
|
+
},
|
|
2035
|
+
providerSpam: {
|
|
2036
|
+
type: "map",
|
|
2037
|
+
properties: {
|
|
2038
|
+
classified: {
|
|
2039
|
+
type: "boolean",
|
|
2040
|
+
required: true
|
|
2041
|
+
},
|
|
2042
|
+
score: {
|
|
2043
|
+
type: "string",
|
|
2044
|
+
required: false
|
|
2045
|
+
},
|
|
2046
|
+
source: {
|
|
2047
|
+
type: "string",
|
|
2048
|
+
required: false
|
|
2049
|
+
}
|
|
2050
|
+
},
|
|
2051
|
+
required: false
|
|
2052
|
+
},
|
|
2053
|
+
hasListUnsubscribe: {
|
|
2054
|
+
type: "boolean",
|
|
2055
|
+
required: true,
|
|
2056
|
+
default: false
|
|
2057
|
+
},
|
|
2058
|
+
movedByRemit: {
|
|
2059
|
+
type: "boolean",
|
|
2060
|
+
required: true,
|
|
2061
|
+
default: false
|
|
2062
|
+
},
|
|
2063
|
+
placementVerdict: {
|
|
2064
|
+
type: "map",
|
|
2065
|
+
properties: {
|
|
2066
|
+
action: {
|
|
2067
|
+
type: ["MoveToInbox", "MoveToJunk"],
|
|
2068
|
+
required: true
|
|
2069
|
+
},
|
|
2070
|
+
confidence: {
|
|
2071
|
+
type: ["Confident", "Unsure"],
|
|
2072
|
+
required: true
|
|
2073
|
+
},
|
|
2074
|
+
fromPlacement: {
|
|
2075
|
+
type: "string",
|
|
2076
|
+
required: true
|
|
2077
|
+
},
|
|
2078
|
+
reasons: {
|
|
2079
|
+
type: "list",
|
|
2080
|
+
items: {
|
|
2081
|
+
type: "string"
|
|
2082
|
+
},
|
|
2083
|
+
required: true
|
|
2084
|
+
},
|
|
2085
|
+
dryRun: {
|
|
2086
|
+
type: "boolean",
|
|
2087
|
+
required: true
|
|
2088
|
+
},
|
|
2089
|
+
decidedAt: {
|
|
2090
|
+
type: "number",
|
|
2091
|
+
required: true
|
|
2092
|
+
}
|
|
2093
|
+
},
|
|
2094
|
+
required: false
|
|
2095
|
+
},
|
|
2096
|
+
createdAt: {
|
|
2097
|
+
type: "number",
|
|
2098
|
+
readOnly: true,
|
|
2099
|
+
required: true,
|
|
2100
|
+
default: () => Date.now(),
|
|
2101
|
+
set: () => Date.now()
|
|
2102
|
+
},
|
|
2103
|
+
updatedAt: {
|
|
2104
|
+
type: "number",
|
|
2105
|
+
watch: "*",
|
|
2106
|
+
required: true,
|
|
2107
|
+
default: () => Date.now(),
|
|
2108
|
+
set: () => Date.now()
|
|
2109
|
+
}
|
|
2110
|
+
},
|
|
2111
|
+
indexes: {
|
|
2112
|
+
byMessageId: {
|
|
2113
|
+
pk: {
|
|
2114
|
+
field: "gsi2pk",
|
|
2115
|
+
composite: ["messageId"]
|
|
2116
|
+
},
|
|
2117
|
+
sk: {
|
|
2118
|
+
field: "gsi2sk",
|
|
2119
|
+
composite: []
|
|
2120
|
+
},
|
|
2121
|
+
index: "gsi2",
|
|
2122
|
+
collection: "messageData"
|
|
2123
|
+
},
|
|
2124
|
+
byMailboxId: {
|
|
2125
|
+
pk: {
|
|
2126
|
+
field: "gsi0pk",
|
|
2127
|
+
composite: ["mailboxId"]
|
|
2128
|
+
},
|
|
2129
|
+
sk: {
|
|
2130
|
+
field: "gsi0sk",
|
|
2131
|
+
composite: ["uid"]
|
|
2132
|
+
},
|
|
2133
|
+
index: "gsi0",
|
|
2134
|
+
collection: "message"
|
|
2135
|
+
},
|
|
2136
|
+
Message: {
|
|
2137
|
+
pk: {
|
|
2138
|
+
field: "pk",
|
|
2139
|
+
composite: ["messageId"]
|
|
2140
|
+
},
|
|
2141
|
+
sk: {
|
|
2142
|
+
field: "sk",
|
|
2143
|
+
composite: []
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
},
|
|
2147
|
+
model: {
|
|
2148
|
+
entity: "message",
|
|
2149
|
+
service: "remit",
|
|
2150
|
+
version: "1"
|
|
2151
|
+
}
|
|
2152
|
+
};
|
|
2153
|
+
exports.BodyPart = {
|
|
2154
|
+
attributes: {
|
|
2155
|
+
bodyPartId: {
|
|
2156
|
+
type: "string",
|
|
2157
|
+
required: true,
|
|
2158
|
+
validate: value => {
|
|
2159
|
+
if (typeof value === "string" && value.length < 25)
|
|
2160
|
+
throw new Error("'bodyPartId' must be at least 25 characters");
|
|
2161
|
+
if (typeof value === "string" && value.length > 25)
|
|
2162
|
+
throw new Error("'bodyPartId' must be at most 25 characters");
|
|
2163
|
+
return true;
|
|
2164
|
+
}
|
|
2165
|
+
},
|
|
2166
|
+
messageId: {
|
|
2167
|
+
type: "string",
|
|
2168
|
+
required: true,
|
|
2169
|
+
validate: value => {
|
|
2170
|
+
if (typeof value === "string" && value.length < 25)
|
|
2171
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
2172
|
+
if (typeof value === "string" && value.length > 25)
|
|
2173
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
2174
|
+
return true;
|
|
2175
|
+
}
|
|
2176
|
+
},
|
|
2177
|
+
parentBodyPartId: {
|
|
2178
|
+
type: "string",
|
|
2179
|
+
required: false,
|
|
2180
|
+
validate: value => {
|
|
2181
|
+
if (typeof value === "string" && value.length < 25)
|
|
2182
|
+
throw new Error("'parentBodyPartId' must be at least 25 characters");
|
|
2183
|
+
if (typeof value === "string" && value.length > 25)
|
|
2184
|
+
throw new Error("'parentBodyPartId' must be at most 25 characters");
|
|
2185
|
+
return true;
|
|
2186
|
+
}
|
|
2187
|
+
},
|
|
2188
|
+
partPath: {
|
|
2189
|
+
type: "string",
|
|
2190
|
+
required: true,
|
|
2191
|
+
validate: value => {
|
|
2192
|
+
if (typeof value === "string" && value.length < 1)
|
|
2193
|
+
throw new Error("'partPath' must be at least 1 characters");
|
|
2194
|
+
return true;
|
|
2195
|
+
}
|
|
2196
|
+
},
|
|
2197
|
+
mediaType: {
|
|
2198
|
+
type: ["TEXT", "IMAGE", "AUDIO", "VIDEO", "APPLICATION", "MULTIPART", "MESSAGE"],
|
|
2199
|
+
required: true
|
|
2200
|
+
},
|
|
2201
|
+
mediaSubtype: {
|
|
2202
|
+
type: "string",
|
|
2203
|
+
required: true,
|
|
2204
|
+
validate: value => {
|
|
2205
|
+
if (typeof value === "string" && value.length < 1)
|
|
2206
|
+
throw new Error("'mediaSubtype' must be at least 1 characters");
|
|
2207
|
+
return true;
|
|
2208
|
+
}
|
|
2209
|
+
},
|
|
2210
|
+
contentId: {
|
|
2211
|
+
type: "string",
|
|
2212
|
+
required: false
|
|
2213
|
+
},
|
|
2214
|
+
contentDescription: {
|
|
2215
|
+
type: "string",
|
|
2216
|
+
required: false
|
|
2217
|
+
},
|
|
2218
|
+
transferEncoding: {
|
|
2219
|
+
type: ["7BIT", "8BIT", "BINARY", "BASE64", "QUOTED-PRINTABLE"],
|
|
2220
|
+
required: true
|
|
2221
|
+
},
|
|
2222
|
+
sizeOctets: {
|
|
2223
|
+
type: "number",
|
|
2224
|
+
required: true,
|
|
2225
|
+
validate: value => {
|
|
2226
|
+
if (typeof value === "number" && value < 0)
|
|
2227
|
+
throw new Error("'sizeOctets' must be at least 0");
|
|
2228
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
2229
|
+
throw new Error("'sizeOctets' must be an integer");
|
|
2230
|
+
return true;
|
|
2231
|
+
}
|
|
2232
|
+
},
|
|
2233
|
+
lineCount: {
|
|
2234
|
+
type: "number",
|
|
2235
|
+
required: false,
|
|
2236
|
+
validate: value => {
|
|
2237
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
2238
|
+
throw new Error("'lineCount' must be an integer");
|
|
2239
|
+
return true;
|
|
2240
|
+
}
|
|
2241
|
+
},
|
|
2242
|
+
md5Hash: {
|
|
2243
|
+
type: "string",
|
|
2244
|
+
required: false
|
|
2245
|
+
},
|
|
2246
|
+
disposition: {
|
|
2247
|
+
type: ["inline", "attachment"],
|
|
2248
|
+
required: false
|
|
2249
|
+
},
|
|
2250
|
+
dispositionFilename: {
|
|
2251
|
+
type: "string",
|
|
2252
|
+
required: false
|
|
2253
|
+
},
|
|
2254
|
+
language: {
|
|
2255
|
+
type: "string",
|
|
2256
|
+
required: false
|
|
2257
|
+
},
|
|
2258
|
+
location: {
|
|
2259
|
+
type: "string",
|
|
2260
|
+
required: false
|
|
2261
|
+
},
|
|
2262
|
+
isMultipart: {
|
|
2263
|
+
type: "boolean",
|
|
2264
|
+
required: true
|
|
2265
|
+
},
|
|
2266
|
+
multipartSubtype: {
|
|
2267
|
+
type: ["mixed", "alternative", "digest", "parallel", "related", "signed", "encrypted", "form-data", "report"],
|
|
2268
|
+
required: false
|
|
2269
|
+
},
|
|
2270
|
+
createdAt: {
|
|
2271
|
+
type: "number",
|
|
2272
|
+
readOnly: true,
|
|
2273
|
+
required: true,
|
|
2274
|
+
default: () => Date.now(),
|
|
2275
|
+
set: () => Date.now()
|
|
2276
|
+
},
|
|
2277
|
+
updatedAt: {
|
|
2278
|
+
type: "number",
|
|
2279
|
+
watch: "*",
|
|
2280
|
+
required: true,
|
|
2281
|
+
default: () => Date.now(),
|
|
2282
|
+
set: () => Date.now()
|
|
2283
|
+
}
|
|
2284
|
+
},
|
|
2285
|
+
indexes: {
|
|
2286
|
+
byMessageId: {
|
|
2287
|
+
pk: {
|
|
2288
|
+
field: "gsi2pk",
|
|
2289
|
+
composite: ["messageId"]
|
|
2290
|
+
},
|
|
2291
|
+
sk: {
|
|
2292
|
+
field: "gsi2sk",
|
|
2293
|
+
composite: ["bodyPartId"]
|
|
2294
|
+
},
|
|
2295
|
+
index: "gsi2",
|
|
2296
|
+
collection: "messageData"
|
|
2297
|
+
},
|
|
2298
|
+
BodyPart: {
|
|
2299
|
+
pk: {
|
|
2300
|
+
field: "pk",
|
|
2301
|
+
composite: ["bodyPartId"]
|
|
2302
|
+
},
|
|
2303
|
+
sk: {
|
|
2304
|
+
field: "sk",
|
|
2305
|
+
composite: []
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
},
|
|
2309
|
+
model: {
|
|
2310
|
+
entity: "bodyPart",
|
|
2311
|
+
service: "remit",
|
|
2312
|
+
version: "1"
|
|
2313
|
+
}
|
|
2314
|
+
};
|
|
2315
|
+
exports.MessageReference = {
|
|
2316
|
+
attributes: {
|
|
2317
|
+
messageReferenceId: {
|
|
2318
|
+
type: "string",
|
|
2319
|
+
required: true,
|
|
2320
|
+
validate: value => {
|
|
2321
|
+
if (typeof value === "string" && value.length < 25)
|
|
2322
|
+
throw new Error("'messageReferenceId' must be at least 25 characters");
|
|
2323
|
+
if (typeof value === "string" && value.length > 25)
|
|
2324
|
+
throw new Error("'messageReferenceId' must be at most 25 characters");
|
|
2325
|
+
return true;
|
|
2326
|
+
}
|
|
2327
|
+
},
|
|
2328
|
+
messageId: {
|
|
2329
|
+
type: "string",
|
|
2330
|
+
required: true,
|
|
2331
|
+
validate: value => {
|
|
2332
|
+
if (typeof value === "string" && value.length < 25)
|
|
2333
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
2334
|
+
if (typeof value === "string" && value.length > 25)
|
|
2335
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
2336
|
+
return true;
|
|
2337
|
+
}
|
|
2338
|
+
},
|
|
2339
|
+
envelopeId: {
|
|
2340
|
+
type: "string",
|
|
2341
|
+
required: true,
|
|
2342
|
+
validate: value => {
|
|
2343
|
+
if (typeof value === "string" && value.length < 25)
|
|
2344
|
+
throw new Error("'envelopeId' must be at least 25 characters");
|
|
2345
|
+
if (typeof value === "string" && value.length > 25)
|
|
2346
|
+
throw new Error("'envelopeId' must be at most 25 characters");
|
|
2347
|
+
return true;
|
|
2348
|
+
}
|
|
2349
|
+
},
|
|
2350
|
+
messageIdValue: {
|
|
2351
|
+
type: "string",
|
|
2352
|
+
required: true
|
|
2353
|
+
},
|
|
2354
|
+
referenceType: {
|
|
2355
|
+
type: ["in_reply_to", "references"],
|
|
2356
|
+
required: true
|
|
2357
|
+
},
|
|
2358
|
+
referenceOrder: {
|
|
2359
|
+
type: "number",
|
|
2360
|
+
required: true,
|
|
2361
|
+
validate: value => {
|
|
2362
|
+
if (typeof value === "number" && value < 0)
|
|
2363
|
+
throw new Error("'referenceOrder' must be at least 0");
|
|
2364
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
2365
|
+
throw new Error("'referenceOrder' must be an integer");
|
|
2366
|
+
return true;
|
|
2367
|
+
}
|
|
2368
|
+
},
|
|
2369
|
+
createdAt: {
|
|
2370
|
+
type: "number",
|
|
2371
|
+
readOnly: true,
|
|
2372
|
+
required: true,
|
|
2373
|
+
default: () => Date.now(),
|
|
2374
|
+
set: () => Date.now()
|
|
2375
|
+
},
|
|
2376
|
+
updatedAt: {
|
|
2377
|
+
type: "number",
|
|
2378
|
+
watch: "*",
|
|
2379
|
+
required: true,
|
|
2380
|
+
default: () => Date.now(),
|
|
2381
|
+
set: () => Date.now()
|
|
2382
|
+
}
|
|
2383
|
+
},
|
|
2384
|
+
indexes: {
|
|
2385
|
+
byMessageId: {
|
|
2386
|
+
pk: {
|
|
2387
|
+
field: "gsi2pk",
|
|
2388
|
+
composite: ["messageId"]
|
|
2389
|
+
},
|
|
2390
|
+
sk: {
|
|
2391
|
+
field: "gsi2sk",
|
|
2392
|
+
composite: ["messageReferenceId"]
|
|
2393
|
+
},
|
|
2394
|
+
index: "gsi2",
|
|
2395
|
+
collection: "messageData"
|
|
2396
|
+
},
|
|
2397
|
+
MessageReference: {
|
|
2398
|
+
pk: {
|
|
2399
|
+
field: "pk",
|
|
2400
|
+
composite: ["messageReferenceId"]
|
|
2401
|
+
},
|
|
2402
|
+
sk: {
|
|
2403
|
+
field: "sk",
|
|
2404
|
+
composite: []
|
|
2405
|
+
}
|
|
2406
|
+
}
|
|
2407
|
+
},
|
|
2408
|
+
model: {
|
|
2409
|
+
entity: "messageReference",
|
|
2410
|
+
service: "remit",
|
|
2411
|
+
version: "1"
|
|
2412
|
+
}
|
|
2413
|
+
};
|
|
2414
|
+
exports.EnvelopeAddress = {
|
|
2415
|
+
attributes: {
|
|
2416
|
+
envelopeAddressId: {
|
|
2417
|
+
type: "string",
|
|
2418
|
+
required: true,
|
|
2419
|
+
validate: value => {
|
|
2420
|
+
if (typeof value === "string" && value.length < 25)
|
|
2421
|
+
throw new Error("'envelopeAddressId' must be at least 25 characters");
|
|
2422
|
+
if (typeof value === "string" && value.length > 25)
|
|
2423
|
+
throw new Error("'envelopeAddressId' must be at most 25 characters");
|
|
2424
|
+
return true;
|
|
2425
|
+
}
|
|
2426
|
+
},
|
|
2427
|
+
messageId: {
|
|
2428
|
+
type: "string",
|
|
2429
|
+
required: true,
|
|
2430
|
+
validate: value => {
|
|
2431
|
+
if (typeof value === "string" && value.length < 25)
|
|
2432
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
2433
|
+
if (typeof value === "string" && value.length > 25)
|
|
2434
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
2435
|
+
return true;
|
|
2436
|
+
}
|
|
2437
|
+
},
|
|
2438
|
+
addressId: {
|
|
2439
|
+
type: "string",
|
|
2440
|
+
required: true,
|
|
2441
|
+
validate: value => {
|
|
2442
|
+
if (typeof value === "string" && value.length < 25)
|
|
2443
|
+
throw new Error("'addressId' must be at least 25 characters");
|
|
2444
|
+
if (typeof value === "string" && value.length > 25)
|
|
2445
|
+
throw new Error("'addressId' must be at most 25 characters");
|
|
2446
|
+
return true;
|
|
2447
|
+
}
|
|
2448
|
+
},
|
|
2449
|
+
displayName: {
|
|
2450
|
+
type: "string",
|
|
2451
|
+
required: false
|
|
2452
|
+
},
|
|
2453
|
+
normalizedEmail: {
|
|
2454
|
+
type: "string",
|
|
2455
|
+
required: true
|
|
2456
|
+
},
|
|
2457
|
+
addressRole: {
|
|
2458
|
+
type: ["from", "sender", "reply_to", "to", "cc", "bcc"],
|
|
2459
|
+
required: true
|
|
2460
|
+
},
|
|
2461
|
+
addressOrder: {
|
|
2462
|
+
type: "number",
|
|
2463
|
+
required: true,
|
|
2464
|
+
validate: value => {
|
|
2465
|
+
if (typeof value === "number" && value < 0)
|
|
2466
|
+
throw new Error("'addressOrder' must be at least 0");
|
|
2467
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
2468
|
+
throw new Error("'addressOrder' must be an integer");
|
|
2469
|
+
return true;
|
|
2470
|
+
}
|
|
2471
|
+
},
|
|
2472
|
+
createdAt: {
|
|
2473
|
+
type: "number",
|
|
2474
|
+
readOnly: true,
|
|
2475
|
+
required: true,
|
|
2476
|
+
default: () => Date.now(),
|
|
2477
|
+
set: () => Date.now()
|
|
2478
|
+
},
|
|
2479
|
+
updatedAt: {
|
|
2480
|
+
type: "number",
|
|
2481
|
+
watch: "*",
|
|
2482
|
+
required: true,
|
|
2483
|
+
default: () => Date.now(),
|
|
2484
|
+
set: () => Date.now()
|
|
2485
|
+
}
|
|
2486
|
+
},
|
|
2487
|
+
indexes: {
|
|
2488
|
+
byMessageId: {
|
|
2489
|
+
pk: {
|
|
2490
|
+
field: "gsi2pk",
|
|
2491
|
+
composite: ["messageId"]
|
|
2492
|
+
},
|
|
2493
|
+
sk: {
|
|
2494
|
+
field: "gsi2sk",
|
|
2495
|
+
composite: ["envelopeAddressId"]
|
|
2496
|
+
},
|
|
2497
|
+
index: "gsi2",
|
|
2498
|
+
collection: "messageData"
|
|
2499
|
+
},
|
|
2500
|
+
EnvelopeAddress: {
|
|
2501
|
+
pk: {
|
|
2502
|
+
field: "pk",
|
|
2503
|
+
composite: ["envelopeAddressId"]
|
|
2504
|
+
},
|
|
2505
|
+
sk: {
|
|
2506
|
+
field: "sk",
|
|
2507
|
+
composite: []
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
},
|
|
2511
|
+
model: {
|
|
2512
|
+
entity: "envelopeAddress",
|
|
2513
|
+
service: "remit",
|
|
2514
|
+
version: "1"
|
|
2515
|
+
}
|
|
2516
|
+
};
|
|
2517
|
+
exports.AccountSetting = {
|
|
2518
|
+
attributes: {
|
|
2519
|
+
accountSettingId: {
|
|
2520
|
+
type: "string",
|
|
2521
|
+
required: true,
|
|
2522
|
+
validate: value => {
|
|
2523
|
+
if (typeof value === "string" && value.length < 25)
|
|
2524
|
+
throw new Error("'accountSettingId' must be at least 25 characters");
|
|
2525
|
+
if (typeof value === "string" && value.length > 25)
|
|
2526
|
+
throw new Error("'accountSettingId' must be at most 25 characters");
|
|
2527
|
+
return true;
|
|
2528
|
+
}
|
|
2529
|
+
},
|
|
2530
|
+
accountConfigId: {
|
|
2531
|
+
type: "string",
|
|
2532
|
+
required: true,
|
|
2533
|
+
validate: value => {
|
|
2534
|
+
if (typeof value === "string" && value.length < 25)
|
|
2535
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
2536
|
+
if (typeof value === "string" && value.length > 25)
|
|
2537
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
2538
|
+
return true;
|
|
2539
|
+
}
|
|
2540
|
+
},
|
|
2541
|
+
name: {
|
|
2542
|
+
type: "string",
|
|
2543
|
+
required: true
|
|
2544
|
+
},
|
|
2545
|
+
value: {
|
|
2546
|
+
type: (0, electrodb_1.CustomAttributeType)("any"),
|
|
2547
|
+
required: true
|
|
2548
|
+
},
|
|
2549
|
+
createdAt: {
|
|
2550
|
+
type: "number",
|
|
2551
|
+
readOnly: true,
|
|
2552
|
+
required: true,
|
|
2553
|
+
default: () => Date.now(),
|
|
2554
|
+
set: () => Date.now()
|
|
2555
|
+
},
|
|
2556
|
+
updatedAt: {
|
|
2557
|
+
type: "number",
|
|
2558
|
+
watch: "*",
|
|
2559
|
+
required: true,
|
|
2560
|
+
default: () => Date.now(),
|
|
2561
|
+
set: () => Date.now()
|
|
2562
|
+
}
|
|
2563
|
+
},
|
|
2564
|
+
indexes: {
|
|
2565
|
+
byAccountConfigId: {
|
|
2566
|
+
pk: {
|
|
2567
|
+
field: "gsi0pk",
|
|
2568
|
+
composite: ["accountConfigId"]
|
|
2569
|
+
},
|
|
2570
|
+
sk: {
|
|
2571
|
+
field: "gsi0sk",
|
|
2572
|
+
composite: ["name"]
|
|
2573
|
+
},
|
|
2574
|
+
index: "gsi0"
|
|
2575
|
+
},
|
|
2576
|
+
AccountSetting: {
|
|
2577
|
+
pk: {
|
|
2578
|
+
field: "pk",
|
|
2579
|
+
composite: ["accountSettingId"]
|
|
2580
|
+
},
|
|
2581
|
+
sk: {
|
|
2582
|
+
field: "sk",
|
|
2583
|
+
composite: []
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
},
|
|
2587
|
+
model: {
|
|
2588
|
+
entity: "accountSetting",
|
|
2589
|
+
service: "remit",
|
|
2590
|
+
version: "1"
|
|
2591
|
+
}
|
|
2592
|
+
};
|
|
2593
|
+
exports.MailboxAttributeEntry = {
|
|
2594
|
+
attributes: {
|
|
2595
|
+
mailboxAttributeId: {
|
|
2596
|
+
type: "string",
|
|
2597
|
+
required: true,
|
|
2598
|
+
validate: value => {
|
|
2599
|
+
if (typeof value === "string" && value.length < 25)
|
|
2600
|
+
throw new Error("'mailboxAttributeId' must be at least 25 characters");
|
|
2601
|
+
if (typeof value === "string" && value.length > 25)
|
|
2602
|
+
throw new Error("'mailboxAttributeId' must be at most 25 characters");
|
|
2603
|
+
return true;
|
|
2604
|
+
}
|
|
2605
|
+
},
|
|
2606
|
+
mailboxId: {
|
|
2607
|
+
type: "string",
|
|
2608
|
+
required: true,
|
|
2609
|
+
validate: value => {
|
|
2610
|
+
if (typeof value === "string" && value.length < 25)
|
|
2611
|
+
throw new Error("'mailboxId' must be at least 25 characters");
|
|
2612
|
+
if (typeof value === "string" && value.length > 25)
|
|
2613
|
+
throw new Error("'mailboxId' must be at most 25 characters");
|
|
2614
|
+
return true;
|
|
2615
|
+
}
|
|
2616
|
+
},
|
|
2617
|
+
attributeName: {
|
|
2618
|
+
type: ["\NonExistent", "\Noinferiors", "\Noselect", "\HasChildren", "\HasNoChildren", "\Marked", "\Unmarked", "\Subscribed", "\Remote"],
|
|
2619
|
+
required: true
|
|
2620
|
+
}
|
|
2621
|
+
},
|
|
2622
|
+
indexes: {
|
|
2623
|
+
byMailboxId: {
|
|
2624
|
+
pk: {
|
|
2625
|
+
field: "gsi1pk",
|
|
2626
|
+
composite: ["mailboxId"]
|
|
2627
|
+
},
|
|
2628
|
+
sk: {
|
|
2629
|
+
field: "gsi1sk",
|
|
2630
|
+
composite: ["mailboxAttributeId"]
|
|
2631
|
+
},
|
|
2632
|
+
index: "gsi1",
|
|
2633
|
+
collection: "mailbox"
|
|
2634
|
+
},
|
|
2635
|
+
MailboxAttributeEntry: {
|
|
2636
|
+
pk: {
|
|
2637
|
+
field: "pk",
|
|
2638
|
+
composite: ["mailboxAttributeId"]
|
|
2639
|
+
},
|
|
2640
|
+
sk: {
|
|
2641
|
+
field: "sk",
|
|
2642
|
+
composite: []
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
},
|
|
2646
|
+
model: {
|
|
2647
|
+
entity: "mailboxAttributeEntry",
|
|
2648
|
+
service: "remit",
|
|
2649
|
+
version: "1"
|
|
2650
|
+
}
|
|
2651
|
+
};
|
|
2652
|
+
exports.MailboxSpecialUseEntry = {
|
|
2653
|
+
attributes: {
|
|
2654
|
+
mailboxSpecialUseId: {
|
|
2655
|
+
type: "string",
|
|
2656
|
+
required: true,
|
|
2657
|
+
validate: value => {
|
|
2658
|
+
if (typeof value === "string" && value.length < 25)
|
|
2659
|
+
throw new Error("'mailboxSpecialUseId' must be at least 25 characters");
|
|
2660
|
+
if (typeof value === "string" && value.length > 25)
|
|
2661
|
+
throw new Error("'mailboxSpecialUseId' must be at most 25 characters");
|
|
2662
|
+
return true;
|
|
2663
|
+
}
|
|
2664
|
+
},
|
|
2665
|
+
mailboxId: {
|
|
2666
|
+
type: "string",
|
|
2667
|
+
required: true,
|
|
2668
|
+
validate: value => {
|
|
2669
|
+
if (typeof value === "string" && value.length < 25)
|
|
2670
|
+
throw new Error("'mailboxId' must be at least 25 characters");
|
|
2671
|
+
if (typeof value === "string" && value.length > 25)
|
|
2672
|
+
throw new Error("'mailboxId' must be at most 25 characters");
|
|
2673
|
+
return true;
|
|
2674
|
+
}
|
|
2675
|
+
},
|
|
2676
|
+
specialUse: {
|
|
2677
|
+
type: ["All", "Archive", "Drafts", "Flagged", "Junk", "Sent", "Trash", "Important"],
|
|
2678
|
+
required: true
|
|
2679
|
+
}
|
|
2680
|
+
},
|
|
2681
|
+
indexes: {
|
|
2682
|
+
byMailboxId: {
|
|
2683
|
+
pk: {
|
|
2684
|
+
field: "gsi1pk",
|
|
2685
|
+
composite: ["mailboxId"]
|
|
2686
|
+
},
|
|
2687
|
+
sk: {
|
|
2688
|
+
field: "gsi1sk",
|
|
2689
|
+
composite: ["mailboxSpecialUseId"]
|
|
2690
|
+
},
|
|
2691
|
+
index: "gsi1",
|
|
2692
|
+
collection: "mailbox"
|
|
2693
|
+
},
|
|
2694
|
+
MailboxSpecialUseEntry: {
|
|
2695
|
+
pk: {
|
|
2696
|
+
field: "pk",
|
|
2697
|
+
composite: ["mailboxSpecialUseId"]
|
|
2698
|
+
},
|
|
2699
|
+
sk: {
|
|
2700
|
+
field: "sk",
|
|
2701
|
+
composite: []
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
},
|
|
2705
|
+
model: {
|
|
2706
|
+
entity: "mailboxSpecialUseEntry",
|
|
2707
|
+
service: "remit",
|
|
2708
|
+
version: "1"
|
|
2709
|
+
}
|
|
2710
|
+
};
|
|
2711
|
+
exports.MailboxFlag = {
|
|
2712
|
+
attributes: {
|
|
2713
|
+
mailboxFlagId: {
|
|
2714
|
+
type: "string",
|
|
2715
|
+
required: true,
|
|
2716
|
+
validate: value => {
|
|
2717
|
+
if (typeof value === "string" && value.length < 25)
|
|
2718
|
+
throw new Error("'mailboxFlagId' must be at least 25 characters");
|
|
2719
|
+
if (typeof value === "string" && value.length > 25)
|
|
2720
|
+
throw new Error("'mailboxFlagId' must be at most 25 characters");
|
|
2721
|
+
return true;
|
|
2722
|
+
}
|
|
2723
|
+
},
|
|
2724
|
+
mailboxId: {
|
|
2725
|
+
type: "string",
|
|
2726
|
+
required: true,
|
|
2727
|
+
validate: value => {
|
|
2728
|
+
if (typeof value === "string" && value.length < 25)
|
|
2729
|
+
throw new Error("'mailboxId' must be at least 25 characters");
|
|
2730
|
+
if (typeof value === "string" && value.length > 25)
|
|
2731
|
+
throw new Error("'mailboxId' must be at most 25 characters");
|
|
2732
|
+
return true;
|
|
2733
|
+
}
|
|
2734
|
+
},
|
|
2735
|
+
flagName: {
|
|
2736
|
+
type: (0, electrodb_1.CustomAttributeType)("any"),
|
|
2737
|
+
required: true
|
|
2738
|
+
},
|
|
2739
|
+
isPermanent: {
|
|
2740
|
+
type: "boolean",
|
|
2741
|
+
required: true
|
|
2742
|
+
}
|
|
2743
|
+
},
|
|
2744
|
+
indexes: {
|
|
2745
|
+
byMailboxId: {
|
|
2746
|
+
pk: {
|
|
2747
|
+
field: "gsi1pk",
|
|
2748
|
+
composite: ["mailboxId"]
|
|
2749
|
+
},
|
|
2750
|
+
sk: {
|
|
2751
|
+
field: "gsi1sk",
|
|
2752
|
+
composite: ["mailboxFlagId"]
|
|
2753
|
+
},
|
|
2754
|
+
index: "gsi1",
|
|
2755
|
+
collection: "mailbox"
|
|
2756
|
+
},
|
|
2757
|
+
MailboxFlag: {
|
|
2758
|
+
pk: {
|
|
2759
|
+
field: "pk",
|
|
2760
|
+
composite: ["mailboxFlagId"]
|
|
2761
|
+
},
|
|
2762
|
+
sk: {
|
|
2763
|
+
field: "sk",
|
|
2764
|
+
composite: []
|
|
2765
|
+
}
|
|
2766
|
+
}
|
|
2767
|
+
},
|
|
2768
|
+
model: {
|
|
2769
|
+
entity: "mailboxFlag",
|
|
2770
|
+
service: "remit",
|
|
2771
|
+
version: "1"
|
|
2772
|
+
}
|
|
2773
|
+
};
|
|
2774
|
+
exports.MailboxLock = {
|
|
2775
|
+
attributes: {
|
|
2776
|
+
mailboxId: {
|
|
2777
|
+
type: "string",
|
|
2778
|
+
required: true,
|
|
2779
|
+
validate: value => {
|
|
2780
|
+
if (typeof value === "string" && value.length < 25)
|
|
2781
|
+
throw new Error("'mailboxId' must be at least 25 characters");
|
|
2782
|
+
if (typeof value === "string" && value.length > 25)
|
|
2783
|
+
throw new Error("'mailboxId' must be at most 25 characters");
|
|
2784
|
+
return true;
|
|
2785
|
+
}
|
|
2786
|
+
},
|
|
2787
|
+
eventName: {
|
|
2788
|
+
type: "string",
|
|
2789
|
+
required: true
|
|
2790
|
+
},
|
|
2791
|
+
accountId: {
|
|
2792
|
+
type: "string",
|
|
2793
|
+
required: true,
|
|
2794
|
+
validate: value => {
|
|
2795
|
+
if (typeof value === "string" && value.length < 25)
|
|
2796
|
+
throw new Error("'accountId' must be at least 25 characters");
|
|
2797
|
+
if (typeof value === "string" && value.length > 25)
|
|
2798
|
+
throw new Error("'accountId' must be at most 25 characters");
|
|
2799
|
+
return true;
|
|
2800
|
+
}
|
|
2801
|
+
},
|
|
2802
|
+
lockId: {
|
|
2803
|
+
type: "string",
|
|
2804
|
+
required: true,
|
|
2805
|
+
validate: value => {
|
|
2806
|
+
if (typeof value === "string" && value.length < 25)
|
|
2807
|
+
throw new Error("'lockId' must be at least 25 characters");
|
|
2808
|
+
if (typeof value === "string" && value.length > 25)
|
|
2809
|
+
throw new Error("'lockId' must be at most 25 characters");
|
|
2810
|
+
return true;
|
|
2811
|
+
}
|
|
2812
|
+
},
|
|
2813
|
+
acquiredAt: {
|
|
2814
|
+
type: "number",
|
|
2815
|
+
required: true,
|
|
2816
|
+
validate: value => {
|
|
2817
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
2818
|
+
throw new Error("'acquiredAt' must be an integer");
|
|
2819
|
+
return true;
|
|
2820
|
+
}
|
|
2821
|
+
},
|
|
2822
|
+
lockedBy: {
|
|
2823
|
+
type: "string",
|
|
2824
|
+
required: true
|
|
2825
|
+
},
|
|
2826
|
+
ttl: {
|
|
2827
|
+
type: "number",
|
|
2828
|
+
required: true,
|
|
2829
|
+
validate: value => {
|
|
2830
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
2831
|
+
throw new Error("'ttl' must be an integer");
|
|
2832
|
+
return true;
|
|
2833
|
+
}
|
|
2834
|
+
}
|
|
2835
|
+
},
|
|
2836
|
+
indexes: {
|
|
2837
|
+
allLocks: {
|
|
2838
|
+
pk: {
|
|
2839
|
+
field: "gsi2pk",
|
|
2840
|
+
composite: []
|
|
2841
|
+
},
|
|
2842
|
+
sk: {
|
|
2843
|
+
field: "gsi2sk",
|
|
2844
|
+
composite: ["acquiredAt"]
|
|
2845
|
+
},
|
|
2846
|
+
index: "gsi2",
|
|
2847
|
+
collection: "locks"
|
|
2848
|
+
},
|
|
2849
|
+
byAccountId: {
|
|
2850
|
+
pk: {
|
|
2851
|
+
field: "gsi1pk",
|
|
2852
|
+
composite: ["accountId"]
|
|
2853
|
+
},
|
|
2854
|
+
sk: {
|
|
2855
|
+
field: "gsi1sk",
|
|
2856
|
+
composite: ["mailboxId", "eventName"]
|
|
2857
|
+
},
|
|
2858
|
+
index: "gsi1"
|
|
2859
|
+
},
|
|
2860
|
+
MailboxLock: {
|
|
2861
|
+
pk: {
|
|
2862
|
+
field: "pk",
|
|
2863
|
+
composite: ["mailboxId"]
|
|
2864
|
+
},
|
|
2865
|
+
sk: {
|
|
2866
|
+
field: "sk",
|
|
2867
|
+
composite: ["eventName"]
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
},
|
|
2871
|
+
model: {
|
|
2872
|
+
entity: "mailboxLock",
|
|
2873
|
+
service: "remit",
|
|
2874
|
+
version: "1"
|
|
2875
|
+
}
|
|
2876
|
+
};
|
|
2877
|
+
exports.MessageFlag = {
|
|
2878
|
+
attributes: {
|
|
2879
|
+
messageFlagId: {
|
|
2880
|
+
type: "string",
|
|
2881
|
+
required: true,
|
|
2882
|
+
validate: value => {
|
|
2883
|
+
if (typeof value === "string" && value.length < 25)
|
|
2884
|
+
throw new Error("'messageFlagId' must be at least 25 characters");
|
|
2885
|
+
if (typeof value === "string" && value.length > 25)
|
|
2886
|
+
throw new Error("'messageFlagId' must be at most 25 characters");
|
|
2887
|
+
return true;
|
|
2888
|
+
}
|
|
2889
|
+
},
|
|
2890
|
+
messageId: {
|
|
2891
|
+
type: "string",
|
|
2892
|
+
required: true,
|
|
2893
|
+
validate: value => {
|
|
2894
|
+
if (typeof value === "string" && value.length < 25)
|
|
2895
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
2896
|
+
if (typeof value === "string" && value.length > 25)
|
|
2897
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
2898
|
+
return true;
|
|
2899
|
+
}
|
|
2900
|
+
},
|
|
2901
|
+
flagName: {
|
|
2902
|
+
type: (0, electrodb_1.CustomAttributeType)("any"),
|
|
2903
|
+
required: true
|
|
2904
|
+
},
|
|
2905
|
+
setAt: {
|
|
2906
|
+
type: "number",
|
|
2907
|
+
required: true,
|
|
2908
|
+
validate: value => {
|
|
2909
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
2910
|
+
throw new Error("'setAt' must be an integer");
|
|
2911
|
+
return true;
|
|
2912
|
+
}
|
|
2913
|
+
},
|
|
2914
|
+
createdAt: {
|
|
2915
|
+
type: "number",
|
|
2916
|
+
readOnly: true,
|
|
2917
|
+
required: true,
|
|
2918
|
+
default: () => Date.now(),
|
|
2919
|
+
set: () => Date.now()
|
|
2920
|
+
},
|
|
2921
|
+
updatedAt: {
|
|
2922
|
+
type: "number",
|
|
2923
|
+
watch: "*",
|
|
2924
|
+
required: true,
|
|
2925
|
+
default: () => Date.now(),
|
|
2926
|
+
set: () => Date.now()
|
|
2927
|
+
}
|
|
2928
|
+
},
|
|
2929
|
+
indexes: {
|
|
2930
|
+
byMessageId: {
|
|
2931
|
+
pk: {
|
|
2932
|
+
field: "gsi2pk",
|
|
2933
|
+
composite: ["messageId"]
|
|
2934
|
+
},
|
|
2935
|
+
sk: {
|
|
2936
|
+
field: "gsi2sk",
|
|
2937
|
+
composite: ["messageFlagId"]
|
|
2938
|
+
},
|
|
2939
|
+
index: "gsi2",
|
|
2940
|
+
collection: "messageData"
|
|
2941
|
+
},
|
|
2942
|
+
MessageFlag: {
|
|
2943
|
+
pk: {
|
|
2944
|
+
field: "pk",
|
|
2945
|
+
composite: ["messageFlagId"]
|
|
2946
|
+
},
|
|
2947
|
+
sk: {
|
|
2948
|
+
field: "sk",
|
|
2949
|
+
composite: []
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
},
|
|
2953
|
+
model: {
|
|
2954
|
+
entity: "messageFlag",
|
|
2955
|
+
service: "remit",
|
|
2956
|
+
version: "1"
|
|
2957
|
+
}
|
|
2958
|
+
};
|
|
2959
|
+
exports.MessagePlacementMove = {
|
|
2960
|
+
attributes: {
|
|
2961
|
+
messageId: {
|
|
2962
|
+
type: "string",
|
|
2963
|
+
required: true,
|
|
2964
|
+
validate: value => {
|
|
2965
|
+
if (typeof value === "string" && value.length < 25)
|
|
2966
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
2967
|
+
if (typeof value === "string" && value.length > 25)
|
|
2968
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
2969
|
+
return true;
|
|
2970
|
+
}
|
|
2971
|
+
},
|
|
2972
|
+
accountId: {
|
|
2973
|
+
type: "string",
|
|
2974
|
+
required: true,
|
|
2975
|
+
validate: value => {
|
|
2976
|
+
if (typeof value === "string" && value.length < 25)
|
|
2977
|
+
throw new Error("'accountId' must be at least 25 characters");
|
|
2978
|
+
if (typeof value === "string" && value.length > 25)
|
|
2979
|
+
throw new Error("'accountId' must be at most 25 characters");
|
|
2980
|
+
return true;
|
|
2981
|
+
}
|
|
2982
|
+
},
|
|
2983
|
+
accountConfigId: {
|
|
2984
|
+
type: "string",
|
|
2985
|
+
required: true,
|
|
2986
|
+
validate: value => {
|
|
2987
|
+
if (typeof value === "string" && value.length < 25)
|
|
2988
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
2989
|
+
if (typeof value === "string" && value.length > 25)
|
|
2990
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
2991
|
+
return true;
|
|
2992
|
+
}
|
|
2993
|
+
},
|
|
2994
|
+
sourceMailboxId: {
|
|
2995
|
+
type: "string",
|
|
2996
|
+
required: true,
|
|
2997
|
+
validate: value => {
|
|
2998
|
+
if (typeof value === "string" && value.length < 25)
|
|
2999
|
+
throw new Error("'sourceMailboxId' must be at least 25 characters");
|
|
3000
|
+
if (typeof value === "string" && value.length > 25)
|
|
3001
|
+
throw new Error("'sourceMailboxId' must be at most 25 characters");
|
|
3002
|
+
return true;
|
|
3003
|
+
}
|
|
3004
|
+
},
|
|
3005
|
+
destinationMailboxId: {
|
|
3006
|
+
type: "string",
|
|
3007
|
+
required: true,
|
|
3008
|
+
validate: value => {
|
|
3009
|
+
if (typeof value === "string" && value.length < 25)
|
|
3010
|
+
throw new Error("'destinationMailboxId' must be at least 25 characters");
|
|
3011
|
+
if (typeof value === "string" && value.length > 25)
|
|
3012
|
+
throw new Error("'destinationMailboxId' must be at most 25 characters");
|
|
3013
|
+
return true;
|
|
3014
|
+
}
|
|
3015
|
+
},
|
|
3016
|
+
state: {
|
|
3017
|
+
type: ["pending", "queued", "processing", "processed"],
|
|
3018
|
+
required: true,
|
|
3019
|
+
default: "pending"
|
|
3020
|
+
},
|
|
3021
|
+
createdAt: {
|
|
3022
|
+
type: "number",
|
|
3023
|
+
readOnly: true,
|
|
3024
|
+
required: true,
|
|
3025
|
+
default: () => Date.now(),
|
|
3026
|
+
set: () => Date.now()
|
|
3027
|
+
},
|
|
3028
|
+
updatedAt: {
|
|
3029
|
+
type: "number",
|
|
3030
|
+
watch: "*",
|
|
3031
|
+
required: true,
|
|
3032
|
+
default: () => Date.now(),
|
|
3033
|
+
set: () => Date.now()
|
|
3034
|
+
}
|
|
3035
|
+
},
|
|
3036
|
+
indexes: {
|
|
3037
|
+
byAccountId: {
|
|
3038
|
+
pk: {
|
|
3039
|
+
field: "gsi0pk",
|
|
3040
|
+
composite: ["accountId"]
|
|
3041
|
+
},
|
|
3042
|
+
sk: {
|
|
3043
|
+
field: "gsi0sk",
|
|
3044
|
+
composite: ["messageId"]
|
|
3045
|
+
},
|
|
3046
|
+
index: "gsi0"
|
|
3047
|
+
},
|
|
3048
|
+
MessagePlacementMove: {
|
|
3049
|
+
pk: {
|
|
3050
|
+
field: "pk",
|
|
3051
|
+
composite: ["messageId"]
|
|
3052
|
+
},
|
|
3053
|
+
sk: {
|
|
3054
|
+
field: "sk",
|
|
3055
|
+
composite: []
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
},
|
|
3059
|
+
model: {
|
|
3060
|
+
entity: "messagePlacementMove",
|
|
3061
|
+
service: "remit",
|
|
3062
|
+
version: "1"
|
|
3063
|
+
}
|
|
3064
|
+
};
|
|
3065
|
+
exports.MessageFlagPush = {
|
|
3066
|
+
attributes: {
|
|
3067
|
+
messageId: {
|
|
3068
|
+
type: "string",
|
|
3069
|
+
required: true,
|
|
3070
|
+
validate: value => {
|
|
3071
|
+
if (typeof value === "string" && value.length < 25)
|
|
3072
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
3073
|
+
if (typeof value === "string" && value.length > 25)
|
|
3074
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
3075
|
+
return true;
|
|
3076
|
+
}
|
|
3077
|
+
},
|
|
3078
|
+
flagName: {
|
|
3079
|
+
type: "string",
|
|
3080
|
+
required: true
|
|
3081
|
+
},
|
|
3082
|
+
accountId: {
|
|
3083
|
+
type: "string",
|
|
3084
|
+
required: true,
|
|
3085
|
+
validate: value => {
|
|
3086
|
+
if (typeof value === "string" && value.length < 25)
|
|
3087
|
+
throw new Error("'accountId' must be at least 25 characters");
|
|
3088
|
+
if (typeof value === "string" && value.length > 25)
|
|
3089
|
+
throw new Error("'accountId' must be at most 25 characters");
|
|
3090
|
+
return true;
|
|
3091
|
+
}
|
|
3092
|
+
},
|
|
3093
|
+
accountConfigId: {
|
|
3094
|
+
type: "string",
|
|
3095
|
+
required: true,
|
|
3096
|
+
validate: value => {
|
|
3097
|
+
if (typeof value === "string" && value.length < 25)
|
|
3098
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
3099
|
+
if (typeof value === "string" && value.length > 25)
|
|
3100
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
3101
|
+
return true;
|
|
3102
|
+
}
|
|
3103
|
+
},
|
|
3104
|
+
mailboxId: {
|
|
3105
|
+
type: "string",
|
|
3106
|
+
required: true,
|
|
3107
|
+
validate: value => {
|
|
3108
|
+
if (typeof value === "string" && value.length < 25)
|
|
3109
|
+
throw new Error("'mailboxId' must be at least 25 characters");
|
|
3110
|
+
if (typeof value === "string" && value.length > 25)
|
|
3111
|
+
throw new Error("'mailboxId' must be at most 25 characters");
|
|
3112
|
+
return true;
|
|
3113
|
+
}
|
|
3114
|
+
},
|
|
3115
|
+
operation: {
|
|
3116
|
+
type: ["add", "remove"],
|
|
3117
|
+
required: true
|
|
3118
|
+
},
|
|
3119
|
+
state: {
|
|
3120
|
+
type: ["pending", "queued", "processing", "processed"],
|
|
3121
|
+
required: true,
|
|
3122
|
+
default: "pending"
|
|
3123
|
+
},
|
|
3124
|
+
createdAt: {
|
|
3125
|
+
type: "number",
|
|
3126
|
+
readOnly: true,
|
|
3127
|
+
required: true,
|
|
3128
|
+
default: () => Date.now(),
|
|
3129
|
+
set: () => Date.now()
|
|
3130
|
+
},
|
|
3131
|
+
updatedAt: {
|
|
3132
|
+
type: "number",
|
|
3133
|
+
watch: "*",
|
|
3134
|
+
required: true,
|
|
3135
|
+
default: () => Date.now(),
|
|
3136
|
+
set: () => Date.now()
|
|
3137
|
+
}
|
|
3138
|
+
},
|
|
3139
|
+
indexes: {
|
|
3140
|
+
byMailboxId: {
|
|
3141
|
+
pk: {
|
|
3142
|
+
field: "gsi1pk",
|
|
3143
|
+
composite: ["mailboxId"]
|
|
3144
|
+
},
|
|
3145
|
+
sk: {
|
|
3146
|
+
field: "gsi1sk",
|
|
3147
|
+
composite: ["messageId", "flagName"]
|
|
3148
|
+
},
|
|
3149
|
+
index: "gsi1"
|
|
3150
|
+
},
|
|
3151
|
+
byAccountId: {
|
|
3152
|
+
pk: {
|
|
3153
|
+
field: "gsi0pk",
|
|
3154
|
+
composite: ["accountId"]
|
|
3155
|
+
},
|
|
3156
|
+
sk: {
|
|
3157
|
+
field: "gsi0sk",
|
|
3158
|
+
composite: ["messageId", "flagName"]
|
|
3159
|
+
},
|
|
3160
|
+
index: "gsi0"
|
|
3161
|
+
},
|
|
3162
|
+
MessageFlagPush: {
|
|
3163
|
+
pk: {
|
|
3164
|
+
field: "pk",
|
|
3165
|
+
composite: ["messageId"]
|
|
3166
|
+
},
|
|
3167
|
+
sk: {
|
|
3168
|
+
field: "sk",
|
|
3169
|
+
composite: ["flagName"]
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3172
|
+
},
|
|
3173
|
+
model: {
|
|
3174
|
+
entity: "messageFlagPush",
|
|
3175
|
+
service: "remit",
|
|
3176
|
+
version: "1"
|
|
3177
|
+
}
|
|
3178
|
+
};
|
|
3179
|
+
exports.Envelope = {
|
|
3180
|
+
attributes: {
|
|
3181
|
+
envelopeId: {
|
|
3182
|
+
type: "string",
|
|
3183
|
+
required: true,
|
|
3184
|
+
validate: value => {
|
|
3185
|
+
if (typeof value === "string" && value.length < 25)
|
|
3186
|
+
throw new Error("'envelopeId' must be at least 25 characters");
|
|
3187
|
+
if (typeof value === "string" && value.length > 25)
|
|
3188
|
+
throw new Error("'envelopeId' must be at most 25 characters");
|
|
3189
|
+
return true;
|
|
3190
|
+
}
|
|
3191
|
+
},
|
|
3192
|
+
messageId: {
|
|
3193
|
+
type: "string",
|
|
3194
|
+
required: true,
|
|
3195
|
+
validate: value => {
|
|
3196
|
+
if (typeof value === "string" && value.length < 25)
|
|
3197
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
3198
|
+
if (typeof value === "string" && value.length > 25)
|
|
3199
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
3200
|
+
return true;
|
|
3201
|
+
}
|
|
3202
|
+
},
|
|
3203
|
+
dateValue: {
|
|
3204
|
+
type: "number",
|
|
3205
|
+
required: true,
|
|
3206
|
+
validate: value => {
|
|
3207
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
3208
|
+
throw new Error("'dateValue' must be an integer");
|
|
3209
|
+
return true;
|
|
3210
|
+
}
|
|
3211
|
+
},
|
|
3212
|
+
dateRaw: {
|
|
3213
|
+
type: "string",
|
|
3214
|
+
required: true
|
|
3215
|
+
},
|
|
3216
|
+
subject: {
|
|
3217
|
+
type: "string",
|
|
3218
|
+
required: false
|
|
3219
|
+
},
|
|
3220
|
+
messageIdValue: {
|
|
3221
|
+
type: "string",
|
|
3222
|
+
required: false
|
|
3223
|
+
},
|
|
3224
|
+
createdAt: {
|
|
3225
|
+
type: "number",
|
|
3226
|
+
readOnly: true,
|
|
3227
|
+
required: true,
|
|
3228
|
+
default: () => Date.now(),
|
|
3229
|
+
set: () => Date.now()
|
|
3230
|
+
},
|
|
3231
|
+
updatedAt: {
|
|
3232
|
+
type: "number",
|
|
3233
|
+
watch: "*",
|
|
3234
|
+
required: true,
|
|
3235
|
+
default: () => Date.now(),
|
|
3236
|
+
set: () => Date.now()
|
|
3237
|
+
}
|
|
3238
|
+
},
|
|
3239
|
+
indexes: {
|
|
3240
|
+
byMessageId: {
|
|
3241
|
+
pk: {
|
|
3242
|
+
field: "gsi2pk",
|
|
3243
|
+
composite: ["messageId"]
|
|
3244
|
+
},
|
|
3245
|
+
sk: {
|
|
3246
|
+
field: "gsi2sk",
|
|
3247
|
+
composite: ["envelopeId"]
|
|
3248
|
+
},
|
|
3249
|
+
index: "gsi2",
|
|
3250
|
+
collection: "messageData"
|
|
3251
|
+
},
|
|
3252
|
+
Envelope: {
|
|
3253
|
+
pk: {
|
|
3254
|
+
field: "pk",
|
|
3255
|
+
composite: ["envelopeId"]
|
|
3256
|
+
},
|
|
3257
|
+
sk: {
|
|
3258
|
+
field: "sk",
|
|
3259
|
+
composite: []
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
},
|
|
3263
|
+
model: {
|
|
3264
|
+
entity: "envelope",
|
|
3265
|
+
service: "remit",
|
|
3266
|
+
version: "1"
|
|
3267
|
+
}
|
|
3268
|
+
};
|
|
3269
|
+
exports.BodyPartParameter = {
|
|
3270
|
+
attributes: {
|
|
3271
|
+
bodyPartParameterId: {
|
|
3272
|
+
type: "string",
|
|
3273
|
+
required: true,
|
|
3274
|
+
validate: value => {
|
|
3275
|
+
if (typeof value === "string" && value.length < 25)
|
|
3276
|
+
throw new Error("'bodyPartParameterId' must be at least 25 characters");
|
|
3277
|
+
if (typeof value === "string" && value.length > 25)
|
|
3278
|
+
throw new Error("'bodyPartParameterId' must be at most 25 characters");
|
|
3279
|
+
return true;
|
|
3280
|
+
}
|
|
3281
|
+
},
|
|
3282
|
+
messageId: {
|
|
3283
|
+
type: "string",
|
|
3284
|
+
required: true,
|
|
3285
|
+
validate: value => {
|
|
3286
|
+
if (typeof value === "string" && value.length < 25)
|
|
3287
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
3288
|
+
if (typeof value === "string" && value.length > 25)
|
|
3289
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
3290
|
+
return true;
|
|
3291
|
+
}
|
|
3292
|
+
},
|
|
3293
|
+
bodyPartId: {
|
|
3294
|
+
type: "string",
|
|
3295
|
+
required: true,
|
|
3296
|
+
validate: value => {
|
|
3297
|
+
if (typeof value === "string" && value.length < 25)
|
|
3298
|
+
throw new Error("'bodyPartId' must be at least 25 characters");
|
|
3299
|
+
if (typeof value === "string" && value.length > 25)
|
|
3300
|
+
throw new Error("'bodyPartId' must be at most 25 characters");
|
|
3301
|
+
return true;
|
|
3302
|
+
}
|
|
3303
|
+
},
|
|
3304
|
+
parameterName: {
|
|
3305
|
+
type: "string",
|
|
3306
|
+
required: true,
|
|
3307
|
+
validate: value => {
|
|
3308
|
+
if (typeof value === "string" && value.length < 1)
|
|
3309
|
+
throw new Error("'parameterName' must be at least 1 characters");
|
|
3310
|
+
return true;
|
|
3311
|
+
}
|
|
3312
|
+
},
|
|
3313
|
+
parameterValue: {
|
|
3314
|
+
type: "string",
|
|
3315
|
+
required: true
|
|
3316
|
+
},
|
|
3317
|
+
createdAt: {
|
|
3318
|
+
type: "number",
|
|
3319
|
+
readOnly: true,
|
|
3320
|
+
required: true,
|
|
3321
|
+
default: () => Date.now(),
|
|
3322
|
+
set: () => Date.now()
|
|
3323
|
+
},
|
|
3324
|
+
updatedAt: {
|
|
3325
|
+
type: "number",
|
|
3326
|
+
watch: "*",
|
|
3327
|
+
required: true,
|
|
3328
|
+
default: () => Date.now(),
|
|
3329
|
+
set: () => Date.now()
|
|
3330
|
+
}
|
|
3331
|
+
},
|
|
3332
|
+
indexes: {
|
|
3333
|
+
byMessageId: {
|
|
3334
|
+
pk: {
|
|
3335
|
+
field: "gsi2pk",
|
|
3336
|
+
composite: ["messageId"]
|
|
3337
|
+
},
|
|
3338
|
+
sk: {
|
|
3339
|
+
field: "gsi2sk",
|
|
3340
|
+
composite: ["bodyPartParameterId"]
|
|
3341
|
+
},
|
|
3342
|
+
index: "gsi2",
|
|
3343
|
+
collection: "messageData"
|
|
3344
|
+
},
|
|
3345
|
+
BodyPartParameter: {
|
|
3346
|
+
pk: {
|
|
3347
|
+
field: "pk",
|
|
3348
|
+
composite: ["bodyPartParameterId"]
|
|
3349
|
+
},
|
|
3350
|
+
sk: {
|
|
3351
|
+
field: "sk",
|
|
3352
|
+
composite: []
|
|
3353
|
+
}
|
|
3354
|
+
}
|
|
3355
|
+
},
|
|
3356
|
+
model: {
|
|
3357
|
+
entity: "bodyPartParameter",
|
|
3358
|
+
service: "remit",
|
|
3359
|
+
version: "1"
|
|
3360
|
+
}
|
|
3361
|
+
};
|
|
3362
|
+
exports.RawMessageStorage = {
|
|
3363
|
+
attributes: {
|
|
3364
|
+
rawStorageId: {
|
|
3365
|
+
type: "string",
|
|
3366
|
+
required: true,
|
|
3367
|
+
validate: value => {
|
|
3368
|
+
if (typeof value === "string" && value.length < 25)
|
|
3369
|
+
throw new Error("'rawStorageId' must be at least 25 characters");
|
|
3370
|
+
if (typeof value === "string" && value.length > 25)
|
|
3371
|
+
throw new Error("'rawStorageId' must be at most 25 characters");
|
|
3372
|
+
return true;
|
|
3373
|
+
}
|
|
3374
|
+
},
|
|
3375
|
+
messageId: {
|
|
3376
|
+
type: "string",
|
|
3377
|
+
required: true,
|
|
3378
|
+
validate: value => {
|
|
3379
|
+
if (typeof value === "string" && value.length < 25)
|
|
3380
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
3381
|
+
if (typeof value === "string" && value.length > 25)
|
|
3382
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
3383
|
+
return true;
|
|
3384
|
+
}
|
|
3385
|
+
},
|
|
3386
|
+
storageType: {
|
|
3387
|
+
type: ["s3", "filesystem", "inline", "database"],
|
|
3388
|
+
required: true
|
|
3389
|
+
},
|
|
3390
|
+
storageLocation: {
|
|
3391
|
+
type: "string",
|
|
3392
|
+
required: true
|
|
3393
|
+
},
|
|
3394
|
+
storageKey: {
|
|
3395
|
+
type: "string",
|
|
3396
|
+
required: true
|
|
3397
|
+
},
|
|
3398
|
+
sizeBytes: {
|
|
3399
|
+
type: "number",
|
|
3400
|
+
required: true,
|
|
3401
|
+
validate: value => {
|
|
3402
|
+
if (typeof value === "number" && value < 0)
|
|
3403
|
+
throw new Error("'sizeBytes' must be at least 0");
|
|
3404
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
3405
|
+
throw new Error("'sizeBytes' must be an integer");
|
|
3406
|
+
return true;
|
|
3407
|
+
}
|
|
3408
|
+
},
|
|
3409
|
+
checksumSha256: {
|
|
3410
|
+
type: "string",
|
|
3411
|
+
required: true,
|
|
3412
|
+
validate: value => {
|
|
3413
|
+
if (typeof value === "string" && value.length < 64)
|
|
3414
|
+
throw new Error("'checksumSha256' must be at least 64 characters");
|
|
3415
|
+
if (typeof value === "string" && value.length > 64)
|
|
3416
|
+
throw new Error("'checksumSha256' must be at most 64 characters");
|
|
3417
|
+
return true;
|
|
3418
|
+
}
|
|
3419
|
+
},
|
|
3420
|
+
contentEncoding: {
|
|
3421
|
+
type: ["none", "gzip", "zstd"],
|
|
3422
|
+
required: true
|
|
3423
|
+
},
|
|
3424
|
+
storedAt: {
|
|
3425
|
+
type: "number",
|
|
3426
|
+
required: true,
|
|
3427
|
+
validate: value => {
|
|
3428
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
3429
|
+
throw new Error("'storedAt' must be an integer");
|
|
3430
|
+
return true;
|
|
3431
|
+
}
|
|
3432
|
+
},
|
|
3433
|
+
expiresAt: {
|
|
3434
|
+
type: "number",
|
|
3435
|
+
required: false,
|
|
3436
|
+
validate: value => {
|
|
3437
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
3438
|
+
throw new Error("'expiresAt' must be an integer");
|
|
3439
|
+
return true;
|
|
3440
|
+
}
|
|
3441
|
+
},
|
|
3442
|
+
createdAt: {
|
|
3443
|
+
type: "number",
|
|
3444
|
+
readOnly: true,
|
|
3445
|
+
required: true,
|
|
3446
|
+
default: () => Date.now(),
|
|
3447
|
+
set: () => Date.now()
|
|
3448
|
+
},
|
|
3449
|
+
updatedAt: {
|
|
3450
|
+
type: "number",
|
|
3451
|
+
watch: "*",
|
|
3452
|
+
required: true,
|
|
3453
|
+
default: () => Date.now(),
|
|
3454
|
+
set: () => Date.now()
|
|
3455
|
+
}
|
|
3456
|
+
},
|
|
3457
|
+
indexes: {
|
|
3458
|
+
byMessageId: {
|
|
3459
|
+
pk: {
|
|
3460
|
+
field: "gsi2pk",
|
|
3461
|
+
composite: ["messageId"]
|
|
3462
|
+
},
|
|
3463
|
+
sk: {
|
|
3464
|
+
field: "gsi2sk",
|
|
3465
|
+
composite: ["rawStorageId"]
|
|
3466
|
+
},
|
|
3467
|
+
index: "gsi2",
|
|
3468
|
+
collection: "messageData"
|
|
3469
|
+
},
|
|
3470
|
+
RawMessageStorage: {
|
|
3471
|
+
pk: {
|
|
3472
|
+
field: "pk",
|
|
3473
|
+
composite: ["rawStorageId"]
|
|
3474
|
+
},
|
|
3475
|
+
sk: {
|
|
3476
|
+
field: "sk",
|
|
3477
|
+
composite: []
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3480
|
+
},
|
|
3481
|
+
model: {
|
|
3482
|
+
entity: "rawMessageStorage",
|
|
3483
|
+
service: "remit",
|
|
3484
|
+
version: "1"
|
|
3485
|
+
}
|
|
3486
|
+
};
|
|
3487
|
+
exports.BodyPartStorage = {
|
|
3488
|
+
attributes: {
|
|
3489
|
+
bodyPartStorageId: {
|
|
3490
|
+
type: "string",
|
|
3491
|
+
required: true,
|
|
3492
|
+
validate: value => {
|
|
3493
|
+
if (typeof value === "string" && value.length < 25)
|
|
3494
|
+
throw new Error("'bodyPartStorageId' must be at least 25 characters");
|
|
3495
|
+
if (typeof value === "string" && value.length > 25)
|
|
3496
|
+
throw new Error("'bodyPartStorageId' must be at most 25 characters");
|
|
3497
|
+
return true;
|
|
3498
|
+
}
|
|
3499
|
+
},
|
|
3500
|
+
messageId: {
|
|
3501
|
+
type: "string",
|
|
3502
|
+
required: true,
|
|
3503
|
+
validate: value => {
|
|
3504
|
+
if (typeof value === "string" && value.length < 25)
|
|
3505
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
3506
|
+
if (typeof value === "string" && value.length > 25)
|
|
3507
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
3508
|
+
return true;
|
|
3509
|
+
}
|
|
3510
|
+
},
|
|
3511
|
+
bodyPartId: {
|
|
3512
|
+
type: "string",
|
|
3513
|
+
required: true,
|
|
3514
|
+
validate: value => {
|
|
3515
|
+
if (typeof value === "string" && value.length < 25)
|
|
3516
|
+
throw new Error("'bodyPartId' must be at least 25 characters");
|
|
3517
|
+
if (typeof value === "string" && value.length > 25)
|
|
3518
|
+
throw new Error("'bodyPartId' must be at most 25 characters");
|
|
3519
|
+
return true;
|
|
3520
|
+
}
|
|
3521
|
+
},
|
|
3522
|
+
storageType: {
|
|
3523
|
+
type: ["s3", "filesystem", "inline", "database"],
|
|
3524
|
+
required: true
|
|
3525
|
+
},
|
|
3526
|
+
storageLocation: {
|
|
3527
|
+
type: "string",
|
|
3528
|
+
required: true
|
|
3529
|
+
},
|
|
3530
|
+
storageKey: {
|
|
3531
|
+
type: "string",
|
|
3532
|
+
required: true
|
|
3533
|
+
},
|
|
3534
|
+
decodedSizeBytes: {
|
|
3535
|
+
type: "number",
|
|
3536
|
+
required: true,
|
|
3537
|
+
validate: value => {
|
|
3538
|
+
if (typeof value === "number" && value < 0)
|
|
3539
|
+
throw new Error("'decodedSizeBytes' must be at least 0");
|
|
3540
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
3541
|
+
throw new Error("'decodedSizeBytes' must be an integer");
|
|
3542
|
+
return true;
|
|
3543
|
+
}
|
|
3544
|
+
},
|
|
3545
|
+
checksumSha256: {
|
|
3546
|
+
type: "string",
|
|
3547
|
+
required: true,
|
|
3548
|
+
validate: value => {
|
|
3549
|
+
if (typeof value === "string" && value.length < 64)
|
|
3550
|
+
throw new Error("'checksumSha256' must be at least 64 characters");
|
|
3551
|
+
if (typeof value === "string" && value.length > 64)
|
|
3552
|
+
throw new Error("'checksumSha256' must be at most 64 characters");
|
|
3553
|
+
return true;
|
|
3554
|
+
}
|
|
3555
|
+
},
|
|
3556
|
+
contentEncoding: {
|
|
3557
|
+
type: ["none", "gzip", "zstd"],
|
|
3558
|
+
required: true
|
|
3559
|
+
},
|
|
3560
|
+
isDeduped: {
|
|
3561
|
+
type: "boolean",
|
|
3562
|
+
required: true
|
|
3563
|
+
},
|
|
3564
|
+
dedupHash: {
|
|
3565
|
+
type: "string",
|
|
3566
|
+
required: false
|
|
3567
|
+
},
|
|
3568
|
+
storedAt: {
|
|
3569
|
+
type: "number",
|
|
3570
|
+
required: true,
|
|
3571
|
+
validate: value => {
|
|
3572
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
3573
|
+
throw new Error("'storedAt' must be an integer");
|
|
3574
|
+
return true;
|
|
3575
|
+
}
|
|
3576
|
+
},
|
|
3577
|
+
createdAt: {
|
|
3578
|
+
type: "number",
|
|
3579
|
+
readOnly: true,
|
|
3580
|
+
required: true,
|
|
3581
|
+
default: () => Date.now(),
|
|
3582
|
+
set: () => Date.now()
|
|
3583
|
+
},
|
|
3584
|
+
updatedAt: {
|
|
3585
|
+
type: "number",
|
|
3586
|
+
watch: "*",
|
|
3587
|
+
required: true,
|
|
3588
|
+
default: () => Date.now(),
|
|
3589
|
+
set: () => Date.now()
|
|
3590
|
+
}
|
|
3591
|
+
},
|
|
3592
|
+
indexes: {
|
|
3593
|
+
byMessageId: {
|
|
3594
|
+
pk: {
|
|
3595
|
+
field: "gsi2pk",
|
|
3596
|
+
composite: ["messageId"]
|
|
3597
|
+
},
|
|
3598
|
+
sk: {
|
|
3599
|
+
field: "gsi2sk",
|
|
3600
|
+
composite: ["bodyPartStorageId"]
|
|
3601
|
+
},
|
|
3602
|
+
index: "gsi2",
|
|
3603
|
+
collection: "messageData"
|
|
3604
|
+
},
|
|
3605
|
+
BodyPartStorage: {
|
|
3606
|
+
pk: {
|
|
3607
|
+
field: "pk",
|
|
3608
|
+
composite: ["bodyPartStorageId"]
|
|
3609
|
+
},
|
|
3610
|
+
sk: {
|
|
3611
|
+
field: "sk",
|
|
3612
|
+
composite: []
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
},
|
|
3616
|
+
model: {
|
|
3617
|
+
entity: "bodyPartStorage",
|
|
3618
|
+
service: "remit",
|
|
3619
|
+
version: "1"
|
|
3620
|
+
}
|
|
3621
|
+
};
|
|
3622
|
+
exports.BodyPartContent = {
|
|
3623
|
+
attributes: {
|
|
3624
|
+
bodyPartContentId: {
|
|
3625
|
+
type: "string",
|
|
3626
|
+
required: true,
|
|
3627
|
+
validate: value => {
|
|
3628
|
+
if (typeof value === "string" && value.length < 25)
|
|
3629
|
+
throw new Error("'bodyPartContentId' must be at least 25 characters");
|
|
3630
|
+
if (typeof value === "string" && value.length > 25)
|
|
3631
|
+
throw new Error("'bodyPartContentId' must be at most 25 characters");
|
|
3632
|
+
return true;
|
|
3633
|
+
}
|
|
3634
|
+
},
|
|
3635
|
+
messageId: {
|
|
3636
|
+
type: "string",
|
|
3637
|
+
required: true,
|
|
3638
|
+
validate: value => {
|
|
3639
|
+
if (typeof value === "string" && value.length < 25)
|
|
3640
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
3641
|
+
if (typeof value === "string" && value.length > 25)
|
|
3642
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
3643
|
+
return true;
|
|
3644
|
+
}
|
|
3645
|
+
},
|
|
3646
|
+
bodyPartId: {
|
|
3647
|
+
type: "string",
|
|
3648
|
+
required: true,
|
|
3649
|
+
validate: value => {
|
|
3650
|
+
if (typeof value === "string" && value.length < 25)
|
|
3651
|
+
throw new Error("'bodyPartId' must be at least 25 characters");
|
|
3652
|
+
if (typeof value === "string" && value.length > 25)
|
|
3653
|
+
throw new Error("'bodyPartId' must be at most 25 characters");
|
|
3654
|
+
return true;
|
|
3655
|
+
}
|
|
3656
|
+
},
|
|
3657
|
+
content: {
|
|
3658
|
+
type: "string",
|
|
3659
|
+
required: true
|
|
3660
|
+
},
|
|
3661
|
+
contentLength: {
|
|
3662
|
+
type: "number",
|
|
3663
|
+
required: true,
|
|
3664
|
+
validate: value => {
|
|
3665
|
+
if (typeof value === "number" && value < 0)
|
|
3666
|
+
throw new Error("'contentLength' must be at least 0");
|
|
3667
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
3668
|
+
throw new Error("'contentLength' must be an integer");
|
|
3669
|
+
return true;
|
|
3670
|
+
}
|
|
3671
|
+
},
|
|
3672
|
+
createdAt: {
|
|
3673
|
+
type: "number",
|
|
3674
|
+
readOnly: true,
|
|
3675
|
+
required: true,
|
|
3676
|
+
default: () => Date.now(),
|
|
3677
|
+
set: () => Date.now()
|
|
3678
|
+
},
|
|
3679
|
+
updatedAt: {
|
|
3680
|
+
type: "number",
|
|
3681
|
+
watch: "*",
|
|
3682
|
+
required: true,
|
|
3683
|
+
default: () => Date.now(),
|
|
3684
|
+
set: () => Date.now()
|
|
3685
|
+
}
|
|
3686
|
+
},
|
|
3687
|
+
indexes: {
|
|
3688
|
+
byMessageId: {
|
|
3689
|
+
pk: {
|
|
3690
|
+
field: "gsi2pk",
|
|
3691
|
+
composite: ["messageId"]
|
|
3692
|
+
},
|
|
3693
|
+
sk: {
|
|
3694
|
+
field: "gsi2sk",
|
|
3695
|
+
composite: ["bodyPartContentId"]
|
|
3696
|
+
},
|
|
3697
|
+
index: "gsi2",
|
|
3698
|
+
collection: "messageData"
|
|
3699
|
+
},
|
|
3700
|
+
BodyPartContent: {
|
|
3701
|
+
pk: {
|
|
3702
|
+
field: "pk",
|
|
3703
|
+
composite: ["bodyPartContentId"]
|
|
3704
|
+
},
|
|
3705
|
+
sk: {
|
|
3706
|
+
field: "sk",
|
|
3707
|
+
composite: []
|
|
3708
|
+
}
|
|
3709
|
+
}
|
|
3710
|
+
},
|
|
3711
|
+
model: {
|
|
3712
|
+
entity: "bodyPartContent",
|
|
3713
|
+
service: "remit",
|
|
3714
|
+
version: "1"
|
|
3715
|
+
}
|
|
3716
|
+
};
|
|
3717
|
+
exports.Label = {
|
|
3718
|
+
attributes: {
|
|
3719
|
+
labelId: {
|
|
3720
|
+
type: "string",
|
|
3721
|
+
required: true,
|
|
3722
|
+
validate: value => {
|
|
3723
|
+
if (typeof value === "string" && value.length < 25)
|
|
3724
|
+
throw new Error("'labelId' must be at least 25 characters");
|
|
3725
|
+
if (typeof value === "string" && value.length > 25)
|
|
3726
|
+
throw new Error("'labelId' must be at most 25 characters");
|
|
3727
|
+
return true;
|
|
3728
|
+
}
|
|
3729
|
+
},
|
|
3730
|
+
accountConfigId: {
|
|
3731
|
+
type: "string",
|
|
3732
|
+
required: true,
|
|
3733
|
+
validate: value => {
|
|
3734
|
+
if (typeof value === "string" && value.length < 25)
|
|
3735
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
3736
|
+
if (typeof value === "string" && value.length > 25)
|
|
3737
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
3738
|
+
return true;
|
|
3739
|
+
}
|
|
3740
|
+
},
|
|
3741
|
+
name: {
|
|
3742
|
+
type: "string",
|
|
3743
|
+
required: true,
|
|
3744
|
+
validate: value => {
|
|
3745
|
+
if (typeof value === "string" && value.length > 140)
|
|
3746
|
+
throw new Error("'name' must be at most 140 characters");
|
|
3747
|
+
return true;
|
|
3748
|
+
}
|
|
3749
|
+
},
|
|
3750
|
+
normalizedName: {
|
|
3751
|
+
type: "string",
|
|
3752
|
+
required: true,
|
|
3753
|
+
validate: value => {
|
|
3754
|
+
if (typeof value === "string" && value.length > 140)
|
|
3755
|
+
throw new Error("'normalizedName' must be at most 140 characters");
|
|
3756
|
+
return true;
|
|
3757
|
+
}
|
|
3758
|
+
},
|
|
3759
|
+
color: {
|
|
3760
|
+
type: ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"],
|
|
3761
|
+
required: true,
|
|
3762
|
+
default: "Default"
|
|
3763
|
+
},
|
|
3764
|
+
createdAt: {
|
|
3765
|
+
type: "number",
|
|
3766
|
+
readOnly: true,
|
|
3767
|
+
required: true,
|
|
3768
|
+
default: () => Date.now(),
|
|
3769
|
+
set: () => Date.now()
|
|
3770
|
+
},
|
|
3771
|
+
updatedAt: {
|
|
3772
|
+
type: "number",
|
|
3773
|
+
watch: "*",
|
|
3774
|
+
required: true,
|
|
3775
|
+
default: () => Date.now(),
|
|
3776
|
+
set: () => Date.now()
|
|
3777
|
+
}
|
|
3778
|
+
},
|
|
3779
|
+
indexes: {
|
|
3780
|
+
byNormalizedName: {
|
|
3781
|
+
pk: {
|
|
3782
|
+
field: "gsi0pk",
|
|
3783
|
+
composite: ["accountConfigId"]
|
|
3784
|
+
},
|
|
3785
|
+
sk: {
|
|
3786
|
+
field: "gsi0sk",
|
|
3787
|
+
composite: ["normalizedName"]
|
|
3788
|
+
},
|
|
3789
|
+
index: "gsi0"
|
|
3790
|
+
},
|
|
3791
|
+
Label: {
|
|
3792
|
+
pk: {
|
|
3793
|
+
field: "pk",
|
|
3794
|
+
composite: ["accountConfigId"]
|
|
3795
|
+
},
|
|
3796
|
+
sk: {
|
|
3797
|
+
field: "sk",
|
|
3798
|
+
composite: ["labelId"]
|
|
3799
|
+
}
|
|
3800
|
+
}
|
|
3801
|
+
},
|
|
3802
|
+
model: {
|
|
3803
|
+
entity: "label",
|
|
3804
|
+
service: "remit",
|
|
3805
|
+
version: "1"
|
|
3806
|
+
}
|
|
3807
|
+
};
|
|
3808
|
+
exports.MessageLabel = {
|
|
3809
|
+
attributes: {
|
|
3810
|
+
messageLabelId: {
|
|
3811
|
+
type: "string",
|
|
3812
|
+
required: true,
|
|
3813
|
+
validate: value => {
|
|
3814
|
+
if (typeof value === "string" && value.length < 25)
|
|
3815
|
+
throw new Error("'messageLabelId' must be at least 25 characters");
|
|
3816
|
+
if (typeof value === "string" && value.length > 25)
|
|
3817
|
+
throw new Error("'messageLabelId' must be at most 25 characters");
|
|
3818
|
+
return true;
|
|
3819
|
+
}
|
|
3820
|
+
},
|
|
3821
|
+
messageId: {
|
|
3822
|
+
type: "string",
|
|
3823
|
+
required: true,
|
|
3824
|
+
validate: value => {
|
|
3825
|
+
if (typeof value === "string" && value.length < 25)
|
|
3826
|
+
throw new Error("'messageId' must be at least 25 characters");
|
|
3827
|
+
if (typeof value === "string" && value.length > 25)
|
|
3828
|
+
throw new Error("'messageId' must be at most 25 characters");
|
|
3829
|
+
return true;
|
|
3830
|
+
}
|
|
3831
|
+
},
|
|
3832
|
+
labelId: {
|
|
3833
|
+
type: "string",
|
|
3834
|
+
required: true,
|
|
3835
|
+
validate: value => {
|
|
3836
|
+
if (typeof value === "string" && value.length < 25)
|
|
3837
|
+
throw new Error("'labelId' must be at least 25 characters");
|
|
3838
|
+
if (typeof value === "string" && value.length > 25)
|
|
3839
|
+
throw new Error("'labelId' must be at most 25 characters");
|
|
3840
|
+
return true;
|
|
3841
|
+
}
|
|
3842
|
+
},
|
|
3843
|
+
accountConfigId: {
|
|
3844
|
+
type: "string",
|
|
3845
|
+
required: true,
|
|
3846
|
+
validate: value => {
|
|
3847
|
+
if (typeof value === "string" && value.length < 25)
|
|
3848
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
3849
|
+
if (typeof value === "string" && value.length > 25)
|
|
3850
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
3851
|
+
return true;
|
|
3852
|
+
}
|
|
3853
|
+
},
|
|
3854
|
+
appliedByFilterId: {
|
|
3855
|
+
type: "string",
|
|
3856
|
+
required: false,
|
|
3857
|
+
validate: value => {
|
|
3858
|
+
if (typeof value === "string" && value.length < 25)
|
|
3859
|
+
throw new Error("'appliedByFilterId' must be at least 25 characters");
|
|
3860
|
+
if (typeof value === "string" && value.length > 25)
|
|
3861
|
+
throw new Error("'appliedByFilterId' must be at most 25 characters");
|
|
3862
|
+
return true;
|
|
3863
|
+
}
|
|
3864
|
+
},
|
|
3865
|
+
createdAt: {
|
|
3866
|
+
type: "number",
|
|
3867
|
+
readOnly: true,
|
|
3868
|
+
required: true,
|
|
3869
|
+
default: () => Date.now(),
|
|
3870
|
+
set: () => Date.now()
|
|
3871
|
+
},
|
|
3872
|
+
updatedAt: {
|
|
3873
|
+
type: "number",
|
|
3874
|
+
watch: "*",
|
|
3875
|
+
required: true,
|
|
3876
|
+
default: () => Date.now(),
|
|
3877
|
+
set: () => Date.now()
|
|
3878
|
+
}
|
|
3879
|
+
},
|
|
3880
|
+
indexes: {
|
|
3881
|
+
byLabelId: {
|
|
3882
|
+
pk: {
|
|
3883
|
+
field: "gsi2pk",
|
|
3884
|
+
composite: ["accountConfigId"]
|
|
3885
|
+
},
|
|
3886
|
+
sk: {
|
|
3887
|
+
field: "gsi2sk",
|
|
3888
|
+
composite: ["labelId", "createdAt"]
|
|
3889
|
+
},
|
|
3890
|
+
index: "gsi2"
|
|
3891
|
+
},
|
|
3892
|
+
byMessageId: {
|
|
3893
|
+
pk: {
|
|
3894
|
+
field: "gsi1pk",
|
|
3895
|
+
composite: ["messageId"]
|
|
3896
|
+
},
|
|
3897
|
+
sk: {
|
|
3898
|
+
field: "gsi1sk",
|
|
3899
|
+
composite: ["labelId"]
|
|
3900
|
+
},
|
|
3901
|
+
index: "gsi1"
|
|
3902
|
+
},
|
|
3903
|
+
MessageLabel: {
|
|
3904
|
+
pk: {
|
|
3905
|
+
field: "pk",
|
|
3906
|
+
composite: ["messageLabelId"]
|
|
3907
|
+
},
|
|
3908
|
+
sk: {
|
|
3909
|
+
field: "sk",
|
|
3910
|
+
composite: []
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
},
|
|
3914
|
+
model: {
|
|
3915
|
+
entity: "messageLabel",
|
|
3916
|
+
service: "remit",
|
|
3917
|
+
version: "1"
|
|
3918
|
+
}
|
|
3919
|
+
};
|
|
3920
|
+
exports.FilterAnchor = {
|
|
3921
|
+
attributes: {
|
|
3922
|
+
accountConfigId: {
|
|
3923
|
+
type: "string",
|
|
3924
|
+
required: true,
|
|
3925
|
+
validate: value => {
|
|
3926
|
+
if (typeof value === "string" && value.length < 25)
|
|
3927
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
3928
|
+
if (typeof value === "string" && value.length > 25)
|
|
3929
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
3930
|
+
return true;
|
|
3931
|
+
}
|
|
3932
|
+
},
|
|
3933
|
+
filterId: {
|
|
3934
|
+
type: "string",
|
|
3935
|
+
required: true,
|
|
3936
|
+
validate: value => {
|
|
3937
|
+
if (typeof value === "string" && value.length < 25)
|
|
3938
|
+
throw new Error("'filterId' must be at least 25 characters");
|
|
3939
|
+
if (typeof value === "string" && value.length > 25)
|
|
3940
|
+
throw new Error("'filterId' must be at most 25 characters");
|
|
3941
|
+
return true;
|
|
3942
|
+
}
|
|
3943
|
+
},
|
|
3944
|
+
anchorEmbedding: {
|
|
3945
|
+
type: "list",
|
|
3946
|
+
items: {
|
|
3947
|
+
type: "number"
|
|
3948
|
+
},
|
|
3949
|
+
required: true
|
|
3950
|
+
},
|
|
3951
|
+
anchorEmbeddingId: {
|
|
3952
|
+
type: "string",
|
|
3953
|
+
required: true
|
|
3954
|
+
},
|
|
3955
|
+
anchorSourceText: {
|
|
3956
|
+
type: "string",
|
|
3957
|
+
required: true,
|
|
3958
|
+
validate: value => {
|
|
3959
|
+
if (typeof value === "string" && value.length > 512)
|
|
3960
|
+
throw new Error("'anchorSourceText' must be at most 512 characters");
|
|
3961
|
+
return true;
|
|
3962
|
+
}
|
|
3963
|
+
},
|
|
3964
|
+
anchorMessageId: {
|
|
3965
|
+
type: "string",
|
|
3966
|
+
required: true,
|
|
3967
|
+
validate: value => {
|
|
3968
|
+
if (typeof value === "string" && value.length < 25)
|
|
3969
|
+
throw new Error("'anchorMessageId' must be at least 25 characters");
|
|
3970
|
+
if (typeof value === "string" && value.length > 25)
|
|
3971
|
+
throw new Error("'anchorMessageId' must be at most 25 characters");
|
|
3972
|
+
return true;
|
|
3973
|
+
}
|
|
3974
|
+
},
|
|
3975
|
+
createdAt: {
|
|
3976
|
+
type: "number",
|
|
3977
|
+
readOnly: true,
|
|
3978
|
+
required: true,
|
|
3979
|
+
default: () => Date.now(),
|
|
3980
|
+
set: () => Date.now()
|
|
3981
|
+
},
|
|
3982
|
+
updatedAt: {
|
|
3983
|
+
type: "number",
|
|
3984
|
+
watch: "*",
|
|
3985
|
+
required: true,
|
|
3986
|
+
default: () => Date.now(),
|
|
3987
|
+
set: () => Date.now()
|
|
3988
|
+
}
|
|
3989
|
+
},
|
|
3990
|
+
indexes: {
|
|
3991
|
+
FilterAnchor: {
|
|
3992
|
+
pk: {
|
|
3993
|
+
field: "pk",
|
|
3994
|
+
composite: ["accountConfigId"]
|
|
3995
|
+
},
|
|
3996
|
+
sk: {
|
|
3997
|
+
field: "sk",
|
|
3998
|
+
composite: ["filterId"]
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
},
|
|
4002
|
+
model: {
|
|
4003
|
+
entity: "filterAnchor",
|
|
4004
|
+
service: "remit",
|
|
4005
|
+
version: "1"
|
|
4006
|
+
}
|
|
4007
|
+
};
|