@remit/electrodb-entities 0.0.34 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (6) hide show
  1. package/index.cjs +173 -209
  2. package/index.d.cts +130 -158
  3. package/index.d.mts +130 -158
  4. package/index.d.ts +130 -158
  5. package/index.mjs +172 -208
  6. package/package.json +4 -4
package/index.mjs CHANGED
@@ -333,6 +333,131 @@ export const Quarantine = {
333
333
  version: "1"
334
334
  }
335
335
  };
336
+ export const SyncWarning = {
337
+ attributes: {
338
+ syncWarningId: {
339
+ type: "string",
340
+ required: true,
341
+ validate: value => {
342
+ if (typeof value === "string" && value.length < 25)
343
+ throw new Error("'syncWarningId' must be at least 25 characters");
344
+ if (typeof value === "string" && value.length > 25)
345
+ throw new Error("'syncWarningId' must be at most 25 characters");
346
+ return true;
347
+ }
348
+ },
349
+ accountConfigId: {
350
+ type: "string",
351
+ required: true,
352
+ validate: value => {
353
+ if (typeof value === "string" && value.length < 25)
354
+ throw new Error("'accountConfigId' must be at least 25 characters");
355
+ if (typeof value === "string" && value.length > 25)
356
+ throw new Error("'accountConfigId' must be at most 25 characters");
357
+ return true;
358
+ }
359
+ },
360
+ accountId: {
361
+ type: "string",
362
+ required: true,
363
+ validate: value => {
364
+ if (typeof value === "string" && value.length < 25)
365
+ throw new Error("'accountId' must be at least 25 characters");
366
+ if (typeof value === "string" && value.length > 25)
367
+ throw new Error("'accountId' must be at most 25 characters");
368
+ return true;
369
+ }
370
+ },
371
+ mailboxId: {
372
+ type: "string",
373
+ required: true,
374
+ validate: value => {
375
+ if (typeof value === "string" && value.length < 25)
376
+ throw new Error("'mailboxId' must be at least 25 characters");
377
+ if (typeof value === "string" && value.length > 25)
378
+ throw new Error("'mailboxId' must be at most 25 characters");
379
+ return true;
380
+ }
381
+ },
382
+ uidValidity: {
383
+ type: "number",
384
+ required: true,
385
+ validate: value => {
386
+ if (typeof value === "number" && !Number.isInteger(value))
387
+ throw new Error("'uidValidity' must be an integer");
388
+ return true;
389
+ }
390
+ },
391
+ uid: {
392
+ type: "number",
393
+ required: true,
394
+ validate: value => {
395
+ if (typeof value === "number" && !Number.isInteger(value))
396
+ throw new Error("'uid' must be an integer");
397
+ return true;
398
+ }
399
+ },
400
+ stage: {
401
+ type: ["Header", "Body"],
402
+ required: true
403
+ },
404
+ attempts: {
405
+ type: "number",
406
+ required: true,
407
+ validate: value => {
408
+ if (typeof value === "number" && !Number.isInteger(value))
409
+ throw new Error("'attempts' must be an integer");
410
+ return true;
411
+ }
412
+ },
413
+ createdAt: {
414
+ type: "number",
415
+ readOnly: true,
416
+ required: true,
417
+ default: () => Date.now(),
418
+ set: () => Date.now()
419
+ }
420
+ },
421
+ indexes: {
422
+ byMailboxId: {
423
+ pk: {
424
+ field: "gsi2pk",
425
+ composite: ["mailboxId"]
426
+ },
427
+ sk: {
428
+ field: "gsi2sk",
429
+ composite: []
430
+ },
431
+ index: "gsi2"
432
+ },
433
+ byAccountConfigId: {
434
+ pk: {
435
+ field: "gsi1pk",
436
+ composite: ["accountConfigId"]
437
+ },
438
+ sk: {
439
+ field: "gsi1sk",
440
+ composite: ["createdAt"]
441
+ },
442
+ index: "gsi1"
443
+ },
444
+ SyncWarning: {
445
+ pk: {
446
+ field: "pk",
447
+ composite: ["syncWarningId"]
448
+ },
449
+ sk: {
450
+ field: "sk",
451
+ composite: []
452
+ }
453
+ }
454
+ },
455
+ model: {
456
+ entity: "syncWarning",
457
+ service: "remit",
458
+ version: "1"
459
+ }
460
+ };
336
461
  export const AccountConfig = {
337
462
  attributes: {
338
463
  accountConfigId: {
@@ -1047,11 +1172,6 @@ export const Filter = {
1047
1172
  required: true,
1048
1173
  default: "None"
1049
1174
  },
1050
- hasAnchor: {
1051
- type: "boolean",
1052
- required: true,
1053
- default: false
1054
- },
1055
1175
  ruleChangedAt: {
1056
1176
  type: "number",
1057
1177
  required: true,
@@ -1275,11 +1395,6 @@ export const OrganizeJobRequest = {
1275
1395
  required: true,
1276
1396
  default: "None"
1277
1397
  },
1278
- anchorMessageId: {
1279
- type: "string",
1280
- required: true,
1281
- default: "None"
1282
- },
1283
1398
  matchOperator: {
1284
1399
  type: ["And", "Or"],
1285
1400
  required: true,
@@ -1302,16 +1417,6 @@ export const OrganizeJobRequest = {
1302
1417
  },
1303
1418
  required: true
1304
1419
  },
1305
- similarityThreshold: {
1306
- type: "number",
1307
- required: true,
1308
- default: 0.75,
1309
- validate: value => {
1310
- if (typeof value === "number" && !Number.isFinite(value))
1311
- throw new Error("'similarityThreshold' must be a finite number");
1312
- return true;
1313
- }
1314
- },
1315
1420
  actionLabelId: {
1316
1421
  type: "string",
1317
1422
  required: true,
@@ -2797,7 +2902,7 @@ export const Address = {
2797
2902
  version: "1"
2798
2903
  }
2799
2904
  };
2800
- export const Message = {
2905
+ export const MessageRecord = {
2801
2906
  attributes: {
2802
2907
  messageId: {
2803
2908
  type: "string",
@@ -2863,10 +2968,6 @@ export const Message = {
2863
2968
  return true;
2864
2969
  }
2865
2970
  },
2866
- messageIdHeader: {
2867
- type: "string",
2868
- required: false
2869
- },
2870
2971
  envelopeId: {
2871
2972
  type: "string",
2872
2973
  required: true,
@@ -4818,6 +4919,52 @@ export const BodyPartParameter = {
4818
4919
  version: "1"
4819
4920
  }
4820
4921
  };
4922
+ export const BodyStructureRefetch = {
4923
+ attributes: {
4924
+ messageId: {
4925
+ type: "string",
4926
+ required: true,
4927
+ validate: value => {
4928
+ if (typeof value === "string" && value.length < 25)
4929
+ throw new Error("'messageId' must be at least 25 characters");
4930
+ if (typeof value === "string" && value.length > 25)
4931
+ throw new Error("'messageId' must be at most 25 characters");
4932
+ return true;
4933
+ }
4934
+ },
4935
+ createdAt: {
4936
+ type: "number",
4937
+ readOnly: true,
4938
+ required: true,
4939
+ default: () => Date.now(),
4940
+ set: () => Date.now()
4941
+ },
4942
+ updatedAt: {
4943
+ type: "number",
4944
+ watch: "*",
4945
+ required: true,
4946
+ default: () => Date.now(),
4947
+ set: () => Date.now()
4948
+ }
4949
+ },
4950
+ indexes: {
4951
+ BodyStructureRefetch: {
4952
+ pk: {
4953
+ field: "pk",
4954
+ composite: ["messageId"]
4955
+ },
4956
+ sk: {
4957
+ field: "sk",
4958
+ composite: []
4959
+ }
4960
+ }
4961
+ },
4962
+ model: {
4963
+ entity: "bodyStructureRefetch",
4964
+ service: "remit",
4965
+ version: "1"
4966
+ }
4967
+ };
4821
4968
  export const RawMessageStorage = {
4822
4969
  attributes: {
4823
4970
  rawStorageId: {
@@ -5078,101 +5225,6 @@ export const BodyPartStorage = {
5078
5225
  version: "1"
5079
5226
  }
5080
5227
  };
5081
- export const BodyPartContent = {
5082
- attributes: {
5083
- bodyPartContentId: {
5084
- type: "string",
5085
- required: true,
5086
- validate: value => {
5087
- if (typeof value === "string" && value.length < 25)
5088
- throw new Error("'bodyPartContentId' must be at least 25 characters");
5089
- if (typeof value === "string" && value.length > 25)
5090
- throw new Error("'bodyPartContentId' must be at most 25 characters");
5091
- return true;
5092
- }
5093
- },
5094
- messageId: {
5095
- type: "string",
5096
- required: true,
5097
- validate: value => {
5098
- if (typeof value === "string" && value.length < 25)
5099
- throw new Error("'messageId' must be at least 25 characters");
5100
- if (typeof value === "string" && value.length > 25)
5101
- throw new Error("'messageId' must be at most 25 characters");
5102
- return true;
5103
- }
5104
- },
5105
- bodyPartId: {
5106
- type: "string",
5107
- required: true,
5108
- validate: value => {
5109
- if (typeof value === "string" && value.length < 25)
5110
- throw new Error("'bodyPartId' must be at least 25 characters");
5111
- if (typeof value === "string" && value.length > 25)
5112
- throw new Error("'bodyPartId' must be at most 25 characters");
5113
- return true;
5114
- }
5115
- },
5116
- content: {
5117
- type: "string",
5118
- required: true
5119
- },
5120
- contentLength: {
5121
- type: "number",
5122
- required: true,
5123
- validate: value => {
5124
- if (typeof value === "number" && value < 0)
5125
- throw new Error("'contentLength' must be at least 0");
5126
- if (typeof value === "number" && !Number.isInteger(value))
5127
- throw new Error("'contentLength' must be an integer");
5128
- return true;
5129
- }
5130
- },
5131
- createdAt: {
5132
- type: "number",
5133
- readOnly: true,
5134
- required: true,
5135
- default: () => Date.now(),
5136
- set: () => Date.now()
5137
- },
5138
- updatedAt: {
5139
- type: "number",
5140
- watch: "*",
5141
- required: true,
5142
- default: () => Date.now(),
5143
- set: () => Date.now()
5144
- }
5145
- },
5146
- indexes: {
5147
- byMessageId: {
5148
- pk: {
5149
- field: "gsi2pk",
5150
- composite: ["messageId"]
5151
- },
5152
- sk: {
5153
- field: "gsi2sk",
5154
- composite: ["bodyPartContentId"]
5155
- },
5156
- index: "gsi2",
5157
- collection: "messageData"
5158
- },
5159
- BodyPartContent: {
5160
- pk: {
5161
- field: "pk",
5162
- composite: ["bodyPartContentId"]
5163
- },
5164
- sk: {
5165
- field: "sk",
5166
- composite: []
5167
- }
5168
- }
5169
- },
5170
- model: {
5171
- entity: "bodyPartContent",
5172
- service: "remit",
5173
- version: "1"
5174
- }
5175
- };
5176
5228
  export const CalendarEventIndex = {
5177
5229
  attributes: {
5178
5230
  calendarId: {
@@ -5503,91 +5555,3 @@ export const MessageLabel = {
5503
5555
  version: "1"
5504
5556
  }
5505
5557
  };
5506
- export const FilterAnchor = {
5507
- attributes: {
5508
- accountConfigId: {
5509
- type: "string",
5510
- required: true,
5511
- validate: value => {
5512
- if (typeof value === "string" && value.length < 25)
5513
- throw new Error("'accountConfigId' must be at least 25 characters");
5514
- if (typeof value === "string" && value.length > 25)
5515
- throw new Error("'accountConfigId' must be at most 25 characters");
5516
- return true;
5517
- }
5518
- },
5519
- filterId: {
5520
- type: "string",
5521
- required: true,
5522
- validate: value => {
5523
- if (typeof value === "string" && value.length < 25)
5524
- throw new Error("'filterId' must be at least 25 characters");
5525
- if (typeof value === "string" && value.length > 25)
5526
- throw new Error("'filterId' must be at most 25 characters");
5527
- return true;
5528
- }
5529
- },
5530
- anchorEmbedding: {
5531
- type: "list",
5532
- items: {
5533
- type: "number"
5534
- },
5535
- required: true
5536
- },
5537
- anchorEmbeddingId: {
5538
- type: "string",
5539
- required: true
5540
- },
5541
- anchorSourceText: {
5542
- type: "string",
5543
- required: true,
5544
- validate: value => {
5545
- if (typeof value === "string" && value.length > 512)
5546
- throw new Error("'anchorSourceText' must be at most 512 characters");
5547
- return true;
5548
- }
5549
- },
5550
- anchorMessageId: {
5551
- type: "string",
5552
- required: true,
5553
- validate: value => {
5554
- if (typeof value === "string" && value.length < 25)
5555
- throw new Error("'anchorMessageId' must be at least 25 characters");
5556
- if (typeof value === "string" && value.length > 25)
5557
- throw new Error("'anchorMessageId' must be at most 25 characters");
5558
- return true;
5559
- }
5560
- },
5561
- createdAt: {
5562
- type: "number",
5563
- readOnly: true,
5564
- required: true,
5565
- default: () => Date.now(),
5566
- set: () => Date.now()
5567
- },
5568
- updatedAt: {
5569
- type: "number",
5570
- watch: "*",
5571
- required: true,
5572
- default: () => Date.now(),
5573
- set: () => Date.now()
5574
- }
5575
- },
5576
- indexes: {
5577
- FilterAnchor: {
5578
- pk: {
5579
- field: "pk",
5580
- composite: ["accountConfigId"]
5581
- },
5582
- sk: {
5583
- field: "sk",
5584
- composite: ["filterId"]
5585
- }
5586
- }
5587
- },
5588
- model: {
5589
- entity: "filterAnchor",
5590
- service: "remit",
5591
- version: "1"
5592
- }
5593
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/electrodb-entities",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "ElectroDB entities",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",
@@ -18,6 +18,9 @@
18
18
  }
19
19
  }
20
20
  },
21
+ "peerDependencies": {
22
+ "electrodb": ">=3.0.0"
23
+ },
21
24
  "license": "MIT",
22
25
  "publishConfig": {
23
26
  "access": "public"
@@ -25,8 +28,5 @@
25
28
  "repository": {
26
29
  "type": "git",
27
30
  "url": "git+https://github.com/remit-mail/reader.git"
28
- },
29
- "peerDependencies": {
30
- "electrodb": ">=3.0.0"
31
31
  }
32
32
  }