@remit/electrodb-entities 0.0.33 → 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 +182 -209
  2. package/index.d.cts +135 -158
  3. package/index.d.mts +135 -158
  4. package/index.d.ts +135 -158
  5. package/index.mjs +181 -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,
@@ -3533,6 +3634,15 @@ export const CalendarSuggestion = {
3533
3634
  return true;
3534
3635
  }
3535
3636
  },
3637
+ endsAtUtc: {
3638
+ type: "string",
3639
+ required: true,
3640
+ validate: value => {
3641
+ if (typeof value === "string" && value.length > 64)
3642
+ throw new Error("'endsAtUtc' must be at most 64 characters");
3643
+ return true;
3644
+ }
3645
+ },
3536
3646
  allDay: {
3537
3647
  type: "boolean",
3538
3648
  required: true,
@@ -4809,6 +4919,52 @@ export const BodyPartParameter = {
4809
4919
  version: "1"
4810
4920
  }
4811
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
+ };
4812
4968
  export const RawMessageStorage = {
4813
4969
  attributes: {
4814
4970
  rawStorageId: {
@@ -5069,101 +5225,6 @@ export const BodyPartStorage = {
5069
5225
  version: "1"
5070
5226
  }
5071
5227
  };
5072
- export const BodyPartContent = {
5073
- attributes: {
5074
- bodyPartContentId: {
5075
- type: "string",
5076
- required: true,
5077
- validate: value => {
5078
- if (typeof value === "string" && value.length < 25)
5079
- throw new Error("'bodyPartContentId' must be at least 25 characters");
5080
- if (typeof value === "string" && value.length > 25)
5081
- throw new Error("'bodyPartContentId' must be at most 25 characters");
5082
- return true;
5083
- }
5084
- },
5085
- messageId: {
5086
- type: "string",
5087
- required: true,
5088
- validate: value => {
5089
- if (typeof value === "string" && value.length < 25)
5090
- throw new Error("'messageId' must be at least 25 characters");
5091
- if (typeof value === "string" && value.length > 25)
5092
- throw new Error("'messageId' must be at most 25 characters");
5093
- return true;
5094
- }
5095
- },
5096
- bodyPartId: {
5097
- type: "string",
5098
- required: true,
5099
- validate: value => {
5100
- if (typeof value === "string" && value.length < 25)
5101
- throw new Error("'bodyPartId' must be at least 25 characters");
5102
- if (typeof value === "string" && value.length > 25)
5103
- throw new Error("'bodyPartId' must be at most 25 characters");
5104
- return true;
5105
- }
5106
- },
5107
- content: {
5108
- type: "string",
5109
- required: true
5110
- },
5111
- contentLength: {
5112
- type: "number",
5113
- required: true,
5114
- validate: value => {
5115
- if (typeof value === "number" && value < 0)
5116
- throw new Error("'contentLength' must be at least 0");
5117
- if (typeof value === "number" && !Number.isInteger(value))
5118
- throw new Error("'contentLength' must be an integer");
5119
- return true;
5120
- }
5121
- },
5122
- createdAt: {
5123
- type: "number",
5124
- readOnly: true,
5125
- required: true,
5126
- default: () => Date.now(),
5127
- set: () => Date.now()
5128
- },
5129
- updatedAt: {
5130
- type: "number",
5131
- watch: "*",
5132
- required: true,
5133
- default: () => Date.now(),
5134
- set: () => Date.now()
5135
- }
5136
- },
5137
- indexes: {
5138
- byMessageId: {
5139
- pk: {
5140
- field: "gsi2pk",
5141
- composite: ["messageId"]
5142
- },
5143
- sk: {
5144
- field: "gsi2sk",
5145
- composite: ["bodyPartContentId"]
5146
- },
5147
- index: "gsi2",
5148
- collection: "messageData"
5149
- },
5150
- BodyPartContent: {
5151
- pk: {
5152
- field: "pk",
5153
- composite: ["bodyPartContentId"]
5154
- },
5155
- sk: {
5156
- field: "sk",
5157
- composite: []
5158
- }
5159
- }
5160
- },
5161
- model: {
5162
- entity: "bodyPartContent",
5163
- service: "remit",
5164
- version: "1"
5165
- }
5166
- };
5167
5228
  export const CalendarEventIndex = {
5168
5229
  attributes: {
5169
5230
  calendarId: {
@@ -5494,91 +5555,3 @@ export const MessageLabel = {
5494
5555
  version: "1"
5495
5556
  }
5496
5557
  };
5497
- export const FilterAnchor = {
5498
- attributes: {
5499
- accountConfigId: {
5500
- type: "string",
5501
- required: true,
5502
- validate: value => {
5503
- if (typeof value === "string" && value.length < 25)
5504
- throw new Error("'accountConfigId' must be at least 25 characters");
5505
- if (typeof value === "string" && value.length > 25)
5506
- throw new Error("'accountConfigId' must be at most 25 characters");
5507
- return true;
5508
- }
5509
- },
5510
- filterId: {
5511
- type: "string",
5512
- required: true,
5513
- validate: value => {
5514
- if (typeof value === "string" && value.length < 25)
5515
- throw new Error("'filterId' must be at least 25 characters");
5516
- if (typeof value === "string" && value.length > 25)
5517
- throw new Error("'filterId' must be at most 25 characters");
5518
- return true;
5519
- }
5520
- },
5521
- anchorEmbedding: {
5522
- type: "list",
5523
- items: {
5524
- type: "number"
5525
- },
5526
- required: true
5527
- },
5528
- anchorEmbeddingId: {
5529
- type: "string",
5530
- required: true
5531
- },
5532
- anchorSourceText: {
5533
- type: "string",
5534
- required: true,
5535
- validate: value => {
5536
- if (typeof value === "string" && value.length > 512)
5537
- throw new Error("'anchorSourceText' must be at most 512 characters");
5538
- return true;
5539
- }
5540
- },
5541
- anchorMessageId: {
5542
- type: "string",
5543
- required: true,
5544
- validate: value => {
5545
- if (typeof value === "string" && value.length < 25)
5546
- throw new Error("'anchorMessageId' must be at least 25 characters");
5547
- if (typeof value === "string" && value.length > 25)
5548
- throw new Error("'anchorMessageId' must be at most 25 characters");
5549
- return true;
5550
- }
5551
- },
5552
- createdAt: {
5553
- type: "number",
5554
- readOnly: true,
5555
- required: true,
5556
- default: () => Date.now(),
5557
- set: () => Date.now()
5558
- },
5559
- updatedAt: {
5560
- type: "number",
5561
- watch: "*",
5562
- required: true,
5563
- default: () => Date.now(),
5564
- set: () => Date.now()
5565
- }
5566
- },
5567
- indexes: {
5568
- FilterAnchor: {
5569
- pk: {
5570
- field: "pk",
5571
- composite: ["accountConfigId"]
5572
- },
5573
- sk: {
5574
- field: "sk",
5575
- composite: ["filterId"]
5576
- }
5577
- }
5578
- },
5579
- model: {
5580
- entity: "filterAnchor",
5581
- service: "remit",
5582
- version: "1"
5583
- }
5584
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/electrodb-entities",
3
- "version": "0.0.33",
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
  }