@remit/electrodb-entities 0.0.2 → 0.0.3
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 +237 -1
- package/index.d.cts +160 -0
- package/index.d.mts +160 -0
- package/index.d.ts +160 -0
- package/index.mjs +236 -0
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
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;
|
|
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.Quarantine = exports.AccountExportRequest = void 0;
|
|
4
4
|
const electrodb_1 = require("electrodb");
|
|
5
5
|
exports.AccountExportRequest = {
|
|
6
6
|
attributes: {
|
|
@@ -100,6 +100,242 @@ exports.AccountExportRequest = {
|
|
|
100
100
|
version: "1"
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
+
exports.Quarantine = {
|
|
104
|
+
attributes: {
|
|
105
|
+
quarantineId: {
|
|
106
|
+
type: "string",
|
|
107
|
+
required: true,
|
|
108
|
+
validate: value => {
|
|
109
|
+
if (typeof value === "string" && value.length < 25)
|
|
110
|
+
throw new Error("'quarantineId' must be at least 25 characters");
|
|
111
|
+
if (typeof value === "string" && value.length > 25)
|
|
112
|
+
throw new Error("'quarantineId' must be at most 25 characters");
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
accountConfigId: {
|
|
117
|
+
type: "string",
|
|
118
|
+
required: true,
|
|
119
|
+
validate: value => {
|
|
120
|
+
if (typeof value === "string" && value.length < 25)
|
|
121
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
122
|
+
if (typeof value === "string" && value.length > 25)
|
|
123
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
accountId: {
|
|
128
|
+
type: "string",
|
|
129
|
+
required: true,
|
|
130
|
+
validate: value => {
|
|
131
|
+
if (typeof value === "string" && value.length < 25)
|
|
132
|
+
throw new Error("'accountId' must be at least 25 characters");
|
|
133
|
+
if (typeof value === "string" && value.length > 25)
|
|
134
|
+
throw new Error("'accountId' must be at most 25 characters");
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
mailboxId: {
|
|
139
|
+
type: "string",
|
|
140
|
+
required: true,
|
|
141
|
+
validate: value => {
|
|
142
|
+
if (typeof value === "string" && value.length < 25)
|
|
143
|
+
throw new Error("'mailboxId' must be at least 25 characters");
|
|
144
|
+
if (typeof value === "string" && value.length > 25)
|
|
145
|
+
throw new Error("'mailboxId' must be at most 25 characters");
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
uidValidity: {
|
|
150
|
+
type: "number",
|
|
151
|
+
required: true,
|
|
152
|
+
validate: value => {
|
|
153
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
154
|
+
throw new Error("'uidValidity' must be an integer");
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
uid: {
|
|
159
|
+
type: "number",
|
|
160
|
+
required: true,
|
|
161
|
+
validate: value => {
|
|
162
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
163
|
+
throw new Error("'uid' must be an integer");
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
mailboxRole: {
|
|
168
|
+
type: ["Inbox", "Drafts", "Sent", "Archive", "Junk", "Trash", "All", "Flagged"],
|
|
169
|
+
required: false
|
|
170
|
+
},
|
|
171
|
+
mailboxPath: {
|
|
172
|
+
type: "string",
|
|
173
|
+
required: true,
|
|
174
|
+
validate: value => {
|
|
175
|
+
if (typeof value === "string" && value.length > 512)
|
|
176
|
+
throw new Error("'mailboxPath' must be at most 512 characters");
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
quarantinedAt: {
|
|
181
|
+
type: "number",
|
|
182
|
+
required: true,
|
|
183
|
+
validate: value => {
|
|
184
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
185
|
+
throw new Error("'quarantinedAt' must be an integer");
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
attempts: {
|
|
190
|
+
type: "number",
|
|
191
|
+
required: true,
|
|
192
|
+
validate: value => {
|
|
193
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
194
|
+
throw new Error("'attempts' must be an integer");
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
failureStage: {
|
|
199
|
+
type: ["BodyParse"],
|
|
200
|
+
required: true
|
|
201
|
+
},
|
|
202
|
+
failureCode: {
|
|
203
|
+
type: ["UnterminatedMultipartBoundary", "UnknownCharset", "TruncatedBody"],
|
|
204
|
+
required: true
|
|
205
|
+
},
|
|
206
|
+
failureMessage: {
|
|
207
|
+
type: "string",
|
|
208
|
+
required: true,
|
|
209
|
+
validate: value => {
|
|
210
|
+
if (typeof value === "string" && value.length > 512)
|
|
211
|
+
throw new Error("'failureMessage' must be at most 512 characters");
|
|
212
|
+
return true;
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
failurePartPath: {
|
|
216
|
+
type: "string",
|
|
217
|
+
required: false,
|
|
218
|
+
validate: value => {
|
|
219
|
+
if (typeof value === "string" && value.length > 140)
|
|
220
|
+
throw new Error("'failurePartPath' must be at most 140 characters");
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
workerVersion: {
|
|
225
|
+
type: "string",
|
|
226
|
+
required: true,
|
|
227
|
+
validate: value => {
|
|
228
|
+
if (typeof value === "string" && value.length > 64)
|
|
229
|
+
throw new Error("'workerVersion' must be at most 64 characters");
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
contentType: {
|
|
234
|
+
type: "string",
|
|
235
|
+
required: false,
|
|
236
|
+
validate: value => {
|
|
237
|
+
if (typeof value === "string" && value.length > 140)
|
|
238
|
+
throw new Error("'contentType' must be at most 140 characters");
|
|
239
|
+
return true;
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
transferEncoding: {
|
|
243
|
+
type: "string",
|
|
244
|
+
required: false,
|
|
245
|
+
validate: value => {
|
|
246
|
+
if (typeof value === "string" && value.length > 64)
|
|
247
|
+
throw new Error("'transferEncoding' must be at most 64 characters");
|
|
248
|
+
return true;
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
charset: {
|
|
252
|
+
type: "string",
|
|
253
|
+
required: false,
|
|
254
|
+
validate: value => {
|
|
255
|
+
if (typeof value === "string" && value.length > 64)
|
|
256
|
+
throw new Error("'charset' must be at most 64 characters");
|
|
257
|
+
return true;
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
sizeBytes: {
|
|
261
|
+
type: "number",
|
|
262
|
+
required: false,
|
|
263
|
+
validate: value => {
|
|
264
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
265
|
+
throw new Error("'sizeBytes' must be an integer");
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
structure: {
|
|
270
|
+
type: "list",
|
|
271
|
+
items: {
|
|
272
|
+
type: "map",
|
|
273
|
+
properties: {
|
|
274
|
+
depth: {
|
|
275
|
+
type: "number",
|
|
276
|
+
required: true
|
|
277
|
+
},
|
|
278
|
+
contentType: {
|
|
279
|
+
type: "string",
|
|
280
|
+
required: true
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
required: true
|
|
285
|
+
},
|
|
286
|
+
messageIdHash: {
|
|
287
|
+
type: "string",
|
|
288
|
+
required: false,
|
|
289
|
+
validate: value => {
|
|
290
|
+
if (typeof value === "string" && value.length > 140)
|
|
291
|
+
throw new Error("'messageIdHash' must be at most 140 characters");
|
|
292
|
+
return true;
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
createdAt: {
|
|
296
|
+
type: "number",
|
|
297
|
+
readOnly: true,
|
|
298
|
+
required: true,
|
|
299
|
+
default: () => Date.now(),
|
|
300
|
+
set: () => Date.now()
|
|
301
|
+
},
|
|
302
|
+
updatedAt: {
|
|
303
|
+
type: "number",
|
|
304
|
+
watch: "*",
|
|
305
|
+
required: true,
|
|
306
|
+
default: () => Date.now(),
|
|
307
|
+
set: () => Date.now()
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
indexes: {
|
|
311
|
+
byAccountConfigId: {
|
|
312
|
+
pk: {
|
|
313
|
+
field: "gsi1pk",
|
|
314
|
+
composite: ["accountConfigId"]
|
|
315
|
+
},
|
|
316
|
+
sk: {
|
|
317
|
+
field: "gsi1sk",
|
|
318
|
+
composite: ["quarantinedAt"]
|
|
319
|
+
},
|
|
320
|
+
index: "gsi1"
|
|
321
|
+
},
|
|
322
|
+
Quarantine: {
|
|
323
|
+
pk: {
|
|
324
|
+
field: "pk",
|
|
325
|
+
composite: ["quarantineId"]
|
|
326
|
+
},
|
|
327
|
+
sk: {
|
|
328
|
+
field: "sk",
|
|
329
|
+
composite: []
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
model: {
|
|
334
|
+
entity: "quarantine",
|
|
335
|
+
service: "remit",
|
|
336
|
+
version: "1"
|
|
337
|
+
}
|
|
338
|
+
};
|
|
103
339
|
exports.AccountConfig = {
|
|
104
340
|
attributes: {
|
|
105
341
|
accountConfigId: {
|
package/index.d.cts
CHANGED
|
@@ -80,6 +80,166 @@ export declare const AccountExportRequest: {
|
|
|
80
80
|
readonly version: "1";
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
+
export declare const Quarantine: {
|
|
84
|
+
readonly attributes: {
|
|
85
|
+
readonly quarantineId: {
|
|
86
|
+
readonly type: "string";
|
|
87
|
+
readonly required: true;
|
|
88
|
+
readonly validate: (value: unknown) => boolean;
|
|
89
|
+
};
|
|
90
|
+
readonly accountConfigId: {
|
|
91
|
+
readonly type: "string";
|
|
92
|
+
readonly required: true;
|
|
93
|
+
readonly validate: (value: unknown) => boolean;
|
|
94
|
+
};
|
|
95
|
+
readonly accountId: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly required: true;
|
|
98
|
+
readonly validate: (value: unknown) => boolean;
|
|
99
|
+
};
|
|
100
|
+
readonly mailboxId: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
readonly required: true;
|
|
103
|
+
readonly validate: (value: unknown) => boolean;
|
|
104
|
+
};
|
|
105
|
+
readonly uidValidity: {
|
|
106
|
+
readonly type: "number";
|
|
107
|
+
readonly required: true;
|
|
108
|
+
readonly validate: (value: unknown) => boolean;
|
|
109
|
+
};
|
|
110
|
+
readonly uid: {
|
|
111
|
+
readonly type: "number";
|
|
112
|
+
readonly required: true;
|
|
113
|
+
readonly validate: (value: unknown) => boolean;
|
|
114
|
+
};
|
|
115
|
+
readonly mailboxRole: {
|
|
116
|
+
readonly type: readonly ["Inbox", "Drafts", "Sent", "Archive", "Junk", "Trash", "All", "Flagged"];
|
|
117
|
+
readonly required: false;
|
|
118
|
+
};
|
|
119
|
+
readonly mailboxPath: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
readonly required: true;
|
|
122
|
+
readonly validate: (value: unknown) => boolean;
|
|
123
|
+
};
|
|
124
|
+
readonly quarantinedAt: {
|
|
125
|
+
readonly type: "number";
|
|
126
|
+
readonly required: true;
|
|
127
|
+
readonly validate: (value: unknown) => boolean;
|
|
128
|
+
};
|
|
129
|
+
readonly attempts: {
|
|
130
|
+
readonly type: "number";
|
|
131
|
+
readonly required: true;
|
|
132
|
+
readonly validate: (value: unknown) => boolean;
|
|
133
|
+
};
|
|
134
|
+
readonly failureStage: {
|
|
135
|
+
readonly type: readonly ["BodyParse"];
|
|
136
|
+
readonly required: true;
|
|
137
|
+
};
|
|
138
|
+
readonly failureCode: {
|
|
139
|
+
readonly type: readonly ["UnterminatedMultipartBoundary", "UnknownCharset", "TruncatedBody"];
|
|
140
|
+
readonly required: true;
|
|
141
|
+
};
|
|
142
|
+
readonly failureMessage: {
|
|
143
|
+
readonly type: "string";
|
|
144
|
+
readonly required: true;
|
|
145
|
+
readonly validate: (value: unknown) => boolean;
|
|
146
|
+
};
|
|
147
|
+
readonly failurePartPath: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
readonly required: false;
|
|
150
|
+
readonly validate: (value: unknown) => boolean;
|
|
151
|
+
};
|
|
152
|
+
readonly workerVersion: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly required: true;
|
|
155
|
+
readonly validate: (value: unknown) => boolean;
|
|
156
|
+
};
|
|
157
|
+
readonly contentType: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
readonly required: false;
|
|
160
|
+
readonly validate: (value: unknown) => boolean;
|
|
161
|
+
};
|
|
162
|
+
readonly transferEncoding: {
|
|
163
|
+
readonly type: "string";
|
|
164
|
+
readonly required: false;
|
|
165
|
+
readonly validate: (value: unknown) => boolean;
|
|
166
|
+
};
|
|
167
|
+
readonly charset: {
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
readonly required: false;
|
|
170
|
+
readonly validate: (value: unknown) => boolean;
|
|
171
|
+
};
|
|
172
|
+
readonly sizeBytes: {
|
|
173
|
+
readonly type: "number";
|
|
174
|
+
readonly required: false;
|
|
175
|
+
readonly validate: (value: unknown) => boolean;
|
|
176
|
+
};
|
|
177
|
+
readonly structure: {
|
|
178
|
+
readonly type: "list";
|
|
179
|
+
readonly items: {
|
|
180
|
+
readonly type: "map";
|
|
181
|
+
readonly properties: {
|
|
182
|
+
readonly depth: {
|
|
183
|
+
readonly type: "number";
|
|
184
|
+
readonly required: true;
|
|
185
|
+
};
|
|
186
|
+
readonly contentType: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
readonly required: true;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
readonly required: true;
|
|
193
|
+
};
|
|
194
|
+
readonly messageIdHash: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
readonly required: false;
|
|
197
|
+
readonly validate: (value: unknown) => boolean;
|
|
198
|
+
};
|
|
199
|
+
readonly createdAt: {
|
|
200
|
+
readonly type: "number";
|
|
201
|
+
readonly readOnly: true;
|
|
202
|
+
readonly required: true;
|
|
203
|
+
readonly default: () => any;
|
|
204
|
+
readonly set: () => any;
|
|
205
|
+
};
|
|
206
|
+
readonly updatedAt: {
|
|
207
|
+
readonly type: "number";
|
|
208
|
+
readonly watch: "*";
|
|
209
|
+
readonly required: true;
|
|
210
|
+
readonly default: () => any;
|
|
211
|
+
readonly set: () => any;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
readonly indexes: {
|
|
215
|
+
readonly byAccountConfigId: {
|
|
216
|
+
readonly pk: {
|
|
217
|
+
readonly field: "gsi1pk";
|
|
218
|
+
readonly composite: readonly ["accountConfigId"];
|
|
219
|
+
};
|
|
220
|
+
readonly sk: {
|
|
221
|
+
readonly field: "gsi1sk";
|
|
222
|
+
readonly composite: readonly ["quarantinedAt"];
|
|
223
|
+
};
|
|
224
|
+
readonly index: "gsi1";
|
|
225
|
+
};
|
|
226
|
+
readonly Quarantine: {
|
|
227
|
+
readonly pk: {
|
|
228
|
+
readonly field: "pk";
|
|
229
|
+
readonly composite: readonly ["quarantineId"];
|
|
230
|
+
};
|
|
231
|
+
readonly sk: {
|
|
232
|
+
readonly field: "sk";
|
|
233
|
+
readonly composite: readonly [];
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
readonly model: {
|
|
238
|
+
readonly entity: "quarantine";
|
|
239
|
+
readonly service: "remit";
|
|
240
|
+
readonly version: "1";
|
|
241
|
+
};
|
|
242
|
+
};
|
|
83
243
|
export declare const AccountConfig: {
|
|
84
244
|
readonly attributes: {
|
|
85
245
|
readonly accountConfigId: {
|
package/index.d.mts
CHANGED
|
@@ -80,6 +80,166 @@ export declare const AccountExportRequest: {
|
|
|
80
80
|
readonly version: "1";
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
+
export declare const Quarantine: {
|
|
84
|
+
readonly attributes: {
|
|
85
|
+
readonly quarantineId: {
|
|
86
|
+
readonly type: "string";
|
|
87
|
+
readonly required: true;
|
|
88
|
+
readonly validate: (value: unknown) => boolean;
|
|
89
|
+
};
|
|
90
|
+
readonly accountConfigId: {
|
|
91
|
+
readonly type: "string";
|
|
92
|
+
readonly required: true;
|
|
93
|
+
readonly validate: (value: unknown) => boolean;
|
|
94
|
+
};
|
|
95
|
+
readonly accountId: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly required: true;
|
|
98
|
+
readonly validate: (value: unknown) => boolean;
|
|
99
|
+
};
|
|
100
|
+
readonly mailboxId: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
readonly required: true;
|
|
103
|
+
readonly validate: (value: unknown) => boolean;
|
|
104
|
+
};
|
|
105
|
+
readonly uidValidity: {
|
|
106
|
+
readonly type: "number";
|
|
107
|
+
readonly required: true;
|
|
108
|
+
readonly validate: (value: unknown) => boolean;
|
|
109
|
+
};
|
|
110
|
+
readonly uid: {
|
|
111
|
+
readonly type: "number";
|
|
112
|
+
readonly required: true;
|
|
113
|
+
readonly validate: (value: unknown) => boolean;
|
|
114
|
+
};
|
|
115
|
+
readonly mailboxRole: {
|
|
116
|
+
readonly type: readonly ["Inbox", "Drafts", "Sent", "Archive", "Junk", "Trash", "All", "Flagged"];
|
|
117
|
+
readonly required: false;
|
|
118
|
+
};
|
|
119
|
+
readonly mailboxPath: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
readonly required: true;
|
|
122
|
+
readonly validate: (value: unknown) => boolean;
|
|
123
|
+
};
|
|
124
|
+
readonly quarantinedAt: {
|
|
125
|
+
readonly type: "number";
|
|
126
|
+
readonly required: true;
|
|
127
|
+
readonly validate: (value: unknown) => boolean;
|
|
128
|
+
};
|
|
129
|
+
readonly attempts: {
|
|
130
|
+
readonly type: "number";
|
|
131
|
+
readonly required: true;
|
|
132
|
+
readonly validate: (value: unknown) => boolean;
|
|
133
|
+
};
|
|
134
|
+
readonly failureStage: {
|
|
135
|
+
readonly type: readonly ["BodyParse"];
|
|
136
|
+
readonly required: true;
|
|
137
|
+
};
|
|
138
|
+
readonly failureCode: {
|
|
139
|
+
readonly type: readonly ["UnterminatedMultipartBoundary", "UnknownCharset", "TruncatedBody"];
|
|
140
|
+
readonly required: true;
|
|
141
|
+
};
|
|
142
|
+
readonly failureMessage: {
|
|
143
|
+
readonly type: "string";
|
|
144
|
+
readonly required: true;
|
|
145
|
+
readonly validate: (value: unknown) => boolean;
|
|
146
|
+
};
|
|
147
|
+
readonly failurePartPath: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
readonly required: false;
|
|
150
|
+
readonly validate: (value: unknown) => boolean;
|
|
151
|
+
};
|
|
152
|
+
readonly workerVersion: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly required: true;
|
|
155
|
+
readonly validate: (value: unknown) => boolean;
|
|
156
|
+
};
|
|
157
|
+
readonly contentType: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
readonly required: false;
|
|
160
|
+
readonly validate: (value: unknown) => boolean;
|
|
161
|
+
};
|
|
162
|
+
readonly transferEncoding: {
|
|
163
|
+
readonly type: "string";
|
|
164
|
+
readonly required: false;
|
|
165
|
+
readonly validate: (value: unknown) => boolean;
|
|
166
|
+
};
|
|
167
|
+
readonly charset: {
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
readonly required: false;
|
|
170
|
+
readonly validate: (value: unknown) => boolean;
|
|
171
|
+
};
|
|
172
|
+
readonly sizeBytes: {
|
|
173
|
+
readonly type: "number";
|
|
174
|
+
readonly required: false;
|
|
175
|
+
readonly validate: (value: unknown) => boolean;
|
|
176
|
+
};
|
|
177
|
+
readonly structure: {
|
|
178
|
+
readonly type: "list";
|
|
179
|
+
readonly items: {
|
|
180
|
+
readonly type: "map";
|
|
181
|
+
readonly properties: {
|
|
182
|
+
readonly depth: {
|
|
183
|
+
readonly type: "number";
|
|
184
|
+
readonly required: true;
|
|
185
|
+
};
|
|
186
|
+
readonly contentType: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
readonly required: true;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
readonly required: true;
|
|
193
|
+
};
|
|
194
|
+
readonly messageIdHash: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
readonly required: false;
|
|
197
|
+
readonly validate: (value: unknown) => boolean;
|
|
198
|
+
};
|
|
199
|
+
readonly createdAt: {
|
|
200
|
+
readonly type: "number";
|
|
201
|
+
readonly readOnly: true;
|
|
202
|
+
readonly required: true;
|
|
203
|
+
readonly default: () => any;
|
|
204
|
+
readonly set: () => any;
|
|
205
|
+
};
|
|
206
|
+
readonly updatedAt: {
|
|
207
|
+
readonly type: "number";
|
|
208
|
+
readonly watch: "*";
|
|
209
|
+
readonly required: true;
|
|
210
|
+
readonly default: () => any;
|
|
211
|
+
readonly set: () => any;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
readonly indexes: {
|
|
215
|
+
readonly byAccountConfigId: {
|
|
216
|
+
readonly pk: {
|
|
217
|
+
readonly field: "gsi1pk";
|
|
218
|
+
readonly composite: readonly ["accountConfigId"];
|
|
219
|
+
};
|
|
220
|
+
readonly sk: {
|
|
221
|
+
readonly field: "gsi1sk";
|
|
222
|
+
readonly composite: readonly ["quarantinedAt"];
|
|
223
|
+
};
|
|
224
|
+
readonly index: "gsi1";
|
|
225
|
+
};
|
|
226
|
+
readonly Quarantine: {
|
|
227
|
+
readonly pk: {
|
|
228
|
+
readonly field: "pk";
|
|
229
|
+
readonly composite: readonly ["quarantineId"];
|
|
230
|
+
};
|
|
231
|
+
readonly sk: {
|
|
232
|
+
readonly field: "sk";
|
|
233
|
+
readonly composite: readonly [];
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
readonly model: {
|
|
238
|
+
readonly entity: "quarantine";
|
|
239
|
+
readonly service: "remit";
|
|
240
|
+
readonly version: "1";
|
|
241
|
+
};
|
|
242
|
+
};
|
|
83
243
|
export declare const AccountConfig: {
|
|
84
244
|
readonly attributes: {
|
|
85
245
|
readonly accountConfigId: {
|
package/index.d.ts
CHANGED
|
@@ -80,6 +80,166 @@ export declare const AccountExportRequest: {
|
|
|
80
80
|
readonly version: "1";
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
+
export declare const Quarantine: {
|
|
84
|
+
readonly attributes: {
|
|
85
|
+
readonly quarantineId: {
|
|
86
|
+
readonly type: "string";
|
|
87
|
+
readonly required: true;
|
|
88
|
+
readonly validate: (value: unknown) => boolean;
|
|
89
|
+
};
|
|
90
|
+
readonly accountConfigId: {
|
|
91
|
+
readonly type: "string";
|
|
92
|
+
readonly required: true;
|
|
93
|
+
readonly validate: (value: unknown) => boolean;
|
|
94
|
+
};
|
|
95
|
+
readonly accountId: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly required: true;
|
|
98
|
+
readonly validate: (value: unknown) => boolean;
|
|
99
|
+
};
|
|
100
|
+
readonly mailboxId: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
readonly required: true;
|
|
103
|
+
readonly validate: (value: unknown) => boolean;
|
|
104
|
+
};
|
|
105
|
+
readonly uidValidity: {
|
|
106
|
+
readonly type: "number";
|
|
107
|
+
readonly required: true;
|
|
108
|
+
readonly validate: (value: unknown) => boolean;
|
|
109
|
+
};
|
|
110
|
+
readonly uid: {
|
|
111
|
+
readonly type: "number";
|
|
112
|
+
readonly required: true;
|
|
113
|
+
readonly validate: (value: unknown) => boolean;
|
|
114
|
+
};
|
|
115
|
+
readonly mailboxRole: {
|
|
116
|
+
readonly type: readonly ["Inbox", "Drafts", "Sent", "Archive", "Junk", "Trash", "All", "Flagged"];
|
|
117
|
+
readonly required: false;
|
|
118
|
+
};
|
|
119
|
+
readonly mailboxPath: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
readonly required: true;
|
|
122
|
+
readonly validate: (value: unknown) => boolean;
|
|
123
|
+
};
|
|
124
|
+
readonly quarantinedAt: {
|
|
125
|
+
readonly type: "number";
|
|
126
|
+
readonly required: true;
|
|
127
|
+
readonly validate: (value: unknown) => boolean;
|
|
128
|
+
};
|
|
129
|
+
readonly attempts: {
|
|
130
|
+
readonly type: "number";
|
|
131
|
+
readonly required: true;
|
|
132
|
+
readonly validate: (value: unknown) => boolean;
|
|
133
|
+
};
|
|
134
|
+
readonly failureStage: {
|
|
135
|
+
readonly type: readonly ["BodyParse"];
|
|
136
|
+
readonly required: true;
|
|
137
|
+
};
|
|
138
|
+
readonly failureCode: {
|
|
139
|
+
readonly type: readonly ["UnterminatedMultipartBoundary", "UnknownCharset", "TruncatedBody"];
|
|
140
|
+
readonly required: true;
|
|
141
|
+
};
|
|
142
|
+
readonly failureMessage: {
|
|
143
|
+
readonly type: "string";
|
|
144
|
+
readonly required: true;
|
|
145
|
+
readonly validate: (value: unknown) => boolean;
|
|
146
|
+
};
|
|
147
|
+
readonly failurePartPath: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
readonly required: false;
|
|
150
|
+
readonly validate: (value: unknown) => boolean;
|
|
151
|
+
};
|
|
152
|
+
readonly workerVersion: {
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly required: true;
|
|
155
|
+
readonly validate: (value: unknown) => boolean;
|
|
156
|
+
};
|
|
157
|
+
readonly contentType: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
readonly required: false;
|
|
160
|
+
readonly validate: (value: unknown) => boolean;
|
|
161
|
+
};
|
|
162
|
+
readonly transferEncoding: {
|
|
163
|
+
readonly type: "string";
|
|
164
|
+
readonly required: false;
|
|
165
|
+
readonly validate: (value: unknown) => boolean;
|
|
166
|
+
};
|
|
167
|
+
readonly charset: {
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
readonly required: false;
|
|
170
|
+
readonly validate: (value: unknown) => boolean;
|
|
171
|
+
};
|
|
172
|
+
readonly sizeBytes: {
|
|
173
|
+
readonly type: "number";
|
|
174
|
+
readonly required: false;
|
|
175
|
+
readonly validate: (value: unknown) => boolean;
|
|
176
|
+
};
|
|
177
|
+
readonly structure: {
|
|
178
|
+
readonly type: "list";
|
|
179
|
+
readonly items: {
|
|
180
|
+
readonly type: "map";
|
|
181
|
+
readonly properties: {
|
|
182
|
+
readonly depth: {
|
|
183
|
+
readonly type: "number";
|
|
184
|
+
readonly required: true;
|
|
185
|
+
};
|
|
186
|
+
readonly contentType: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
readonly required: true;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
readonly required: true;
|
|
193
|
+
};
|
|
194
|
+
readonly messageIdHash: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
readonly required: false;
|
|
197
|
+
readonly validate: (value: unknown) => boolean;
|
|
198
|
+
};
|
|
199
|
+
readonly createdAt: {
|
|
200
|
+
readonly type: "number";
|
|
201
|
+
readonly readOnly: true;
|
|
202
|
+
readonly required: true;
|
|
203
|
+
readonly default: () => any;
|
|
204
|
+
readonly set: () => any;
|
|
205
|
+
};
|
|
206
|
+
readonly updatedAt: {
|
|
207
|
+
readonly type: "number";
|
|
208
|
+
readonly watch: "*";
|
|
209
|
+
readonly required: true;
|
|
210
|
+
readonly default: () => any;
|
|
211
|
+
readonly set: () => any;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
readonly indexes: {
|
|
215
|
+
readonly byAccountConfigId: {
|
|
216
|
+
readonly pk: {
|
|
217
|
+
readonly field: "gsi1pk";
|
|
218
|
+
readonly composite: readonly ["accountConfigId"];
|
|
219
|
+
};
|
|
220
|
+
readonly sk: {
|
|
221
|
+
readonly field: "gsi1sk";
|
|
222
|
+
readonly composite: readonly ["quarantinedAt"];
|
|
223
|
+
};
|
|
224
|
+
readonly index: "gsi1";
|
|
225
|
+
};
|
|
226
|
+
readonly Quarantine: {
|
|
227
|
+
readonly pk: {
|
|
228
|
+
readonly field: "pk";
|
|
229
|
+
readonly composite: readonly ["quarantineId"];
|
|
230
|
+
};
|
|
231
|
+
readonly sk: {
|
|
232
|
+
readonly field: "sk";
|
|
233
|
+
readonly composite: readonly [];
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
readonly model: {
|
|
238
|
+
readonly entity: "quarantine";
|
|
239
|
+
readonly service: "remit";
|
|
240
|
+
readonly version: "1";
|
|
241
|
+
};
|
|
242
|
+
};
|
|
83
243
|
export declare const AccountConfig: {
|
|
84
244
|
readonly attributes: {
|
|
85
245
|
readonly accountConfigId: {
|
package/index.mjs
CHANGED
|
@@ -97,6 +97,242 @@ export const AccountExportRequest = {
|
|
|
97
97
|
version: "1"
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
+
export const Quarantine = {
|
|
101
|
+
attributes: {
|
|
102
|
+
quarantineId: {
|
|
103
|
+
type: "string",
|
|
104
|
+
required: true,
|
|
105
|
+
validate: value => {
|
|
106
|
+
if (typeof value === "string" && value.length < 25)
|
|
107
|
+
throw new Error("'quarantineId' must be at least 25 characters");
|
|
108
|
+
if (typeof value === "string" && value.length > 25)
|
|
109
|
+
throw new Error("'quarantineId' must be at most 25 characters");
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
accountConfigId: {
|
|
114
|
+
type: "string",
|
|
115
|
+
required: true,
|
|
116
|
+
validate: value => {
|
|
117
|
+
if (typeof value === "string" && value.length < 25)
|
|
118
|
+
throw new Error("'accountConfigId' must be at least 25 characters");
|
|
119
|
+
if (typeof value === "string" && value.length > 25)
|
|
120
|
+
throw new Error("'accountConfigId' must be at most 25 characters");
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
accountId: {
|
|
125
|
+
type: "string",
|
|
126
|
+
required: true,
|
|
127
|
+
validate: value => {
|
|
128
|
+
if (typeof value === "string" && value.length < 25)
|
|
129
|
+
throw new Error("'accountId' must be at least 25 characters");
|
|
130
|
+
if (typeof value === "string" && value.length > 25)
|
|
131
|
+
throw new Error("'accountId' must be at most 25 characters");
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
mailboxId: {
|
|
136
|
+
type: "string",
|
|
137
|
+
required: true,
|
|
138
|
+
validate: value => {
|
|
139
|
+
if (typeof value === "string" && value.length < 25)
|
|
140
|
+
throw new Error("'mailboxId' must be at least 25 characters");
|
|
141
|
+
if (typeof value === "string" && value.length > 25)
|
|
142
|
+
throw new Error("'mailboxId' must be at most 25 characters");
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
uidValidity: {
|
|
147
|
+
type: "number",
|
|
148
|
+
required: true,
|
|
149
|
+
validate: value => {
|
|
150
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
151
|
+
throw new Error("'uidValidity' must be an integer");
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
uid: {
|
|
156
|
+
type: "number",
|
|
157
|
+
required: true,
|
|
158
|
+
validate: value => {
|
|
159
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
160
|
+
throw new Error("'uid' must be an integer");
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
mailboxRole: {
|
|
165
|
+
type: ["Inbox", "Drafts", "Sent", "Archive", "Junk", "Trash", "All", "Flagged"],
|
|
166
|
+
required: false
|
|
167
|
+
},
|
|
168
|
+
mailboxPath: {
|
|
169
|
+
type: "string",
|
|
170
|
+
required: true,
|
|
171
|
+
validate: value => {
|
|
172
|
+
if (typeof value === "string" && value.length > 512)
|
|
173
|
+
throw new Error("'mailboxPath' must be at most 512 characters");
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
quarantinedAt: {
|
|
178
|
+
type: "number",
|
|
179
|
+
required: true,
|
|
180
|
+
validate: value => {
|
|
181
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
182
|
+
throw new Error("'quarantinedAt' must be an integer");
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
attempts: {
|
|
187
|
+
type: "number",
|
|
188
|
+
required: true,
|
|
189
|
+
validate: value => {
|
|
190
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
191
|
+
throw new Error("'attempts' must be an integer");
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
failureStage: {
|
|
196
|
+
type: ["BodyParse"],
|
|
197
|
+
required: true
|
|
198
|
+
},
|
|
199
|
+
failureCode: {
|
|
200
|
+
type: ["UnterminatedMultipartBoundary", "UnknownCharset", "TruncatedBody"],
|
|
201
|
+
required: true
|
|
202
|
+
},
|
|
203
|
+
failureMessage: {
|
|
204
|
+
type: "string",
|
|
205
|
+
required: true,
|
|
206
|
+
validate: value => {
|
|
207
|
+
if (typeof value === "string" && value.length > 512)
|
|
208
|
+
throw new Error("'failureMessage' must be at most 512 characters");
|
|
209
|
+
return true;
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
failurePartPath: {
|
|
213
|
+
type: "string",
|
|
214
|
+
required: false,
|
|
215
|
+
validate: value => {
|
|
216
|
+
if (typeof value === "string" && value.length > 140)
|
|
217
|
+
throw new Error("'failurePartPath' must be at most 140 characters");
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
workerVersion: {
|
|
222
|
+
type: "string",
|
|
223
|
+
required: true,
|
|
224
|
+
validate: value => {
|
|
225
|
+
if (typeof value === "string" && value.length > 64)
|
|
226
|
+
throw new Error("'workerVersion' must be at most 64 characters");
|
|
227
|
+
return true;
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
contentType: {
|
|
231
|
+
type: "string",
|
|
232
|
+
required: false,
|
|
233
|
+
validate: value => {
|
|
234
|
+
if (typeof value === "string" && value.length > 140)
|
|
235
|
+
throw new Error("'contentType' must be at most 140 characters");
|
|
236
|
+
return true;
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
transferEncoding: {
|
|
240
|
+
type: "string",
|
|
241
|
+
required: false,
|
|
242
|
+
validate: value => {
|
|
243
|
+
if (typeof value === "string" && value.length > 64)
|
|
244
|
+
throw new Error("'transferEncoding' must be at most 64 characters");
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
charset: {
|
|
249
|
+
type: "string",
|
|
250
|
+
required: false,
|
|
251
|
+
validate: value => {
|
|
252
|
+
if (typeof value === "string" && value.length > 64)
|
|
253
|
+
throw new Error("'charset' must be at most 64 characters");
|
|
254
|
+
return true;
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
sizeBytes: {
|
|
258
|
+
type: "number",
|
|
259
|
+
required: false,
|
|
260
|
+
validate: value => {
|
|
261
|
+
if (typeof value === "number" && !Number.isInteger(value))
|
|
262
|
+
throw new Error("'sizeBytes' must be an integer");
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
structure: {
|
|
267
|
+
type: "list",
|
|
268
|
+
items: {
|
|
269
|
+
type: "map",
|
|
270
|
+
properties: {
|
|
271
|
+
depth: {
|
|
272
|
+
type: "number",
|
|
273
|
+
required: true
|
|
274
|
+
},
|
|
275
|
+
contentType: {
|
|
276
|
+
type: "string",
|
|
277
|
+
required: true
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
required: true
|
|
282
|
+
},
|
|
283
|
+
messageIdHash: {
|
|
284
|
+
type: "string",
|
|
285
|
+
required: false,
|
|
286
|
+
validate: value => {
|
|
287
|
+
if (typeof value === "string" && value.length > 140)
|
|
288
|
+
throw new Error("'messageIdHash' must be at most 140 characters");
|
|
289
|
+
return true;
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
createdAt: {
|
|
293
|
+
type: "number",
|
|
294
|
+
readOnly: true,
|
|
295
|
+
required: true,
|
|
296
|
+
default: () => Date.now(),
|
|
297
|
+
set: () => Date.now()
|
|
298
|
+
},
|
|
299
|
+
updatedAt: {
|
|
300
|
+
type: "number",
|
|
301
|
+
watch: "*",
|
|
302
|
+
required: true,
|
|
303
|
+
default: () => Date.now(),
|
|
304
|
+
set: () => Date.now()
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
indexes: {
|
|
308
|
+
byAccountConfigId: {
|
|
309
|
+
pk: {
|
|
310
|
+
field: "gsi1pk",
|
|
311
|
+
composite: ["accountConfigId"]
|
|
312
|
+
},
|
|
313
|
+
sk: {
|
|
314
|
+
field: "gsi1sk",
|
|
315
|
+
composite: ["quarantinedAt"]
|
|
316
|
+
},
|
|
317
|
+
index: "gsi1"
|
|
318
|
+
},
|
|
319
|
+
Quarantine: {
|
|
320
|
+
pk: {
|
|
321
|
+
field: "pk",
|
|
322
|
+
composite: ["quarantineId"]
|
|
323
|
+
},
|
|
324
|
+
sk: {
|
|
325
|
+
field: "sk",
|
|
326
|
+
composite: []
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
model: {
|
|
331
|
+
entity: "quarantine",
|
|
332
|
+
service: "remit",
|
|
333
|
+
version: "1"
|
|
334
|
+
}
|
|
335
|
+
};
|
|
100
336
|
export const AccountConfig = {
|
|
101
337
|
attributes: {
|
|
102
338
|
accountConfigId: {
|