@remit/electrodb-entities 0.0.19 → 0.0.21

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 +1098 -876
  2. package/index.d.cts +405 -239
  3. package/index.d.mts +405 -239
  4. package/index.d.ts +405 -239
  5. package/index.mjs +1097 -875
  6. 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.CalendarEventIndex = exports.CalendarObject = exports.CalendarCollection = exports.BodyPartContent = exports.BodyPartStorage = exports.RawMessageStorage = exports.BodyPartParameter = exports.SenderSignerStanding = exports.Envelope = exports.MessageFlagPush = exports.MessagePlacementMove = exports.MessageFlag = exports.MailboxLock = exports.MailboxFlag = exports.MailboxSpecialUseEntry = exports.MailboxAttributeEntry = exports.AccountSetting = exports.ConfigImport = exports.EnvelopeAddress = exports.MessageReference = exports.BodyPart = exports.Message = exports.Address = exports.OutboxAttachment = exports.OutboxMessage = exports.ThreadMessage = exports.OrganizeJobRequest = exports.Label = exports.Filter = exports.Mailbox = exports.Account = exports.AccountConfig = exports.Quarantine = exports.AccountExportRequest = void 0;
3
+ exports.FilterAnchor = exports.MessageLabel = exports.CalendarEventIndex = exports.BodyPartContent = exports.BodyPartStorage = exports.RawMessageStorage = exports.BodyPartParameter = exports.SenderSignerStanding = exports.Envelope = exports.MessageFlagPush = exports.MessagePlacementMove = exports.MessageFlag = exports.MailboxLock = exports.MailboxFlag = exports.MailboxSpecialUseEntry = exports.MailboxAttributeEntry = exports.AccountSetting = exports.ConfigImport = exports.EnvelopeAddress = exports.CalendarSuggestion = exports.MessageReference = exports.BodyPart = exports.Message = exports.Address = exports.OutboxAttachment = exports.OutboxMessage = exports.ThreadMessage = exports.CalendarObject = exports.CalendarCollection = exports.OrganizeJobRequest = exports.Label = 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: {
@@ -1384,6 +1384,319 @@ exports.OrganizeJobRequest = {
1384
1384
  version: "1"
1385
1385
  }
1386
1386
  };
1387
+ exports.CalendarCollection = {
1388
+ attributes: {
1389
+ calendarId: {
1390
+ type: "string",
1391
+ required: true,
1392
+ validate: value => {
1393
+ if (typeof value === "string" && value.length < 25)
1394
+ throw new Error("'calendarId' must be at least 25 characters");
1395
+ if (typeof value === "string" && value.length > 25)
1396
+ throw new Error("'calendarId' must be at most 25 characters");
1397
+ return true;
1398
+ }
1399
+ },
1400
+ accountConfigId: {
1401
+ type: "string",
1402
+ required: true,
1403
+ validate: value => {
1404
+ if (typeof value === "string" && value.length < 25)
1405
+ throw new Error("'accountConfigId' must be at least 25 characters");
1406
+ if (typeof value === "string" && value.length > 25)
1407
+ throw new Error("'accountConfigId' must be at most 25 characters");
1408
+ return true;
1409
+ }
1410
+ },
1411
+ urlSegment: {
1412
+ type: "string",
1413
+ required: true,
1414
+ validate: value => {
1415
+ if (typeof value === "string" && value.length > 64)
1416
+ throw new Error("'urlSegment' must be at most 64 characters");
1417
+ return true;
1418
+ }
1419
+ },
1420
+ displayName: {
1421
+ type: "string",
1422
+ required: true,
1423
+ validate: value => {
1424
+ if (typeof value === "string" && value.length > 140)
1425
+ throw new Error("'displayName' must be at most 140 characters");
1426
+ return true;
1427
+ }
1428
+ },
1429
+ color: {
1430
+ type: ["Cal1", "Cal2", "Cal3", "Cal4", "Cal5", "Cal6"],
1431
+ required: true,
1432
+ default: "Cal1"
1433
+ },
1434
+ componentSet: {
1435
+ type: ["VeventOnly"],
1436
+ required: true,
1437
+ default: "VeventOnly"
1438
+ },
1439
+ source: {
1440
+ type: ["Default", "UserCreated", "MailDerived"],
1441
+ required: true,
1442
+ default: "UserCreated"
1443
+ },
1444
+ timezone: {
1445
+ type: "string",
1446
+ required: true,
1447
+ default: "",
1448
+ validate: value => {
1449
+ if (typeof value === "string" && value.length > 64)
1450
+ throw new Error("'timezone' must be at most 64 characters");
1451
+ return true;
1452
+ }
1453
+ },
1454
+ syncSequence: {
1455
+ type: "number",
1456
+ required: true,
1457
+ default: 0,
1458
+ validate: value => {
1459
+ if (typeof value === "number" && !Number.isInteger(value))
1460
+ throw new Error("'syncSequence' must be an integer");
1461
+ return true;
1462
+ }
1463
+ },
1464
+ createdAt: {
1465
+ type: "number",
1466
+ readOnly: true,
1467
+ required: true,
1468
+ default: () => Date.now(),
1469
+ set: () => Date.now()
1470
+ },
1471
+ updatedAt: {
1472
+ type: "number",
1473
+ watch: "*",
1474
+ required: true,
1475
+ default: () => Date.now(),
1476
+ set: () => Date.now()
1477
+ }
1478
+ },
1479
+ indexes: {
1480
+ byUrlSegment: {
1481
+ pk: {
1482
+ field: "gsi0pk",
1483
+ composite: ["accountConfigId"]
1484
+ },
1485
+ sk: {
1486
+ field: "gsi0sk",
1487
+ composite: ["urlSegment"]
1488
+ },
1489
+ index: "gsi0"
1490
+ },
1491
+ Calendar: {
1492
+ pk: {
1493
+ field: "pk",
1494
+ composite: ["accountConfigId"]
1495
+ },
1496
+ sk: {
1497
+ field: "sk",
1498
+ composite: ["calendarId"]
1499
+ }
1500
+ }
1501
+ },
1502
+ model: {
1503
+ entity: "calendar",
1504
+ service: "remit",
1505
+ version: "1"
1506
+ }
1507
+ };
1508
+ exports.CalendarObject = {
1509
+ attributes: {
1510
+ calendarObjectId: {
1511
+ type: "string",
1512
+ required: true,
1513
+ validate: value => {
1514
+ if (typeof value === "string" && value.length < 25)
1515
+ throw new Error("'calendarObjectId' must be at least 25 characters");
1516
+ if (typeof value === "string" && value.length > 25)
1517
+ throw new Error("'calendarObjectId' must be at most 25 characters");
1518
+ return true;
1519
+ }
1520
+ },
1521
+ calendarId: {
1522
+ type: "string",
1523
+ required: true,
1524
+ validate: value => {
1525
+ if (typeof value === "string" && value.length < 25)
1526
+ throw new Error("'calendarId' must be at least 25 characters");
1527
+ if (typeof value === "string" && value.length > 25)
1528
+ throw new Error("'calendarId' must be at most 25 characters");
1529
+ return true;
1530
+ }
1531
+ },
1532
+ resourceName: {
1533
+ type: "string",
1534
+ required: true,
1535
+ validate: value => {
1536
+ if (typeof value === "string" && value.length > 256)
1537
+ throw new Error("'resourceName' must be at most 256 characters");
1538
+ return true;
1539
+ }
1540
+ },
1541
+ icalUid: {
1542
+ type: "string",
1543
+ required: true,
1544
+ validate: value => {
1545
+ if (typeof value === "string" && value.length > 512)
1546
+ throw new Error("'icalUid' must be at most 512 characters");
1547
+ return true;
1548
+ }
1549
+ },
1550
+ icalData: {
1551
+ type: "string",
1552
+ required: true
1553
+ },
1554
+ etag: {
1555
+ type: "string",
1556
+ required: true,
1557
+ validate: value => {
1558
+ if (typeof value === "string" && value.length > 64)
1559
+ throw new Error("'etag' must be at most 64 characters");
1560
+ return true;
1561
+ }
1562
+ },
1563
+ sequence: {
1564
+ type: "number",
1565
+ required: true,
1566
+ default: 0,
1567
+ validate: value => {
1568
+ if (typeof value === "number" && !Number.isInteger(value))
1569
+ throw new Error("'sequence' must be an integer");
1570
+ return true;
1571
+ }
1572
+ },
1573
+ syncSequence: {
1574
+ type: "number",
1575
+ required: true,
1576
+ default: 0,
1577
+ validate: value => {
1578
+ if (typeof value === "number" && !Number.isInteger(value))
1579
+ throw new Error("'syncSequence' must be an integer");
1580
+ return true;
1581
+ }
1582
+ },
1583
+ summary: {
1584
+ type: "string",
1585
+ required: true,
1586
+ validate: value => {
1587
+ if (typeof value === "string" && value.length > 512)
1588
+ throw new Error("'summary' must be at most 512 characters");
1589
+ return true;
1590
+ }
1591
+ },
1592
+ dtStart: {
1593
+ type: "string",
1594
+ required: true,
1595
+ validate: value => {
1596
+ if (typeof value === "string" && value.length > 64)
1597
+ throw new Error("'dtStart' must be at most 64 characters");
1598
+ return true;
1599
+ }
1600
+ },
1601
+ dtEnd: {
1602
+ type: "string",
1603
+ required: true,
1604
+ validate: value => {
1605
+ if (typeof value === "string" && value.length > 64)
1606
+ throw new Error("'dtEnd' must be at most 64 characters");
1607
+ return true;
1608
+ }
1609
+ },
1610
+ allDay: {
1611
+ type: "boolean",
1612
+ required: true,
1613
+ default: false
1614
+ },
1615
+ zoneCertainty: {
1616
+ type: ["Local", "Explicit", "Ambiguous"],
1617
+ required: true,
1618
+ default: "Explicit"
1619
+ },
1620
+ status: {
1621
+ type: ["Confirmed", "Tentative", "Cancelled"],
1622
+ required: true,
1623
+ default: "Confirmed"
1624
+ },
1625
+ transparency: {
1626
+ type: ["Opaque", "Transparent"],
1627
+ required: true,
1628
+ default: "Opaque"
1629
+ },
1630
+ hasRecurrence: {
1631
+ type: "boolean",
1632
+ required: true,
1633
+ default: false
1634
+ },
1635
+ expandedThrough: {
1636
+ type: "string",
1637
+ required: true,
1638
+ default: "",
1639
+ validate: value => {
1640
+ if (typeof value === "string" && value.length > 64)
1641
+ throw new Error("'expandedThrough' must be at most 64 characters");
1642
+ return true;
1643
+ }
1644
+ },
1645
+ createdAt: {
1646
+ type: "number",
1647
+ readOnly: true,
1648
+ required: true,
1649
+ default: () => Date.now(),
1650
+ set: () => Date.now()
1651
+ },
1652
+ updatedAt: {
1653
+ type: "number",
1654
+ watch: "*",
1655
+ required: true,
1656
+ default: () => Date.now(),
1657
+ set: () => Date.now()
1658
+ }
1659
+ },
1660
+ indexes: {
1661
+ bySyncSequence: {
1662
+ pk: {
1663
+ field: "gsi1pk",
1664
+ composite: ["calendarId"]
1665
+ },
1666
+ sk: {
1667
+ field: "gsi1sk",
1668
+ composite: ["syncSequence"]
1669
+ },
1670
+ index: "gsi1"
1671
+ },
1672
+ byUid: {
1673
+ pk: {
1674
+ field: "gsi0pk",
1675
+ composite: ["calendarId"]
1676
+ },
1677
+ sk: {
1678
+ field: "gsi0sk",
1679
+ composite: ["icalUid"]
1680
+ },
1681
+ index: "gsi0"
1682
+ },
1683
+ CalendarObject: {
1684
+ pk: {
1685
+ field: "pk",
1686
+ composite: ["calendarId"]
1687
+ },
1688
+ sk: {
1689
+ field: "sk",
1690
+ composite: ["calendarObjectId"]
1691
+ }
1692
+ }
1693
+ },
1694
+ model: {
1695
+ entity: "calendarObject",
1696
+ service: "remit",
1697
+ version: "1"
1698
+ }
1699
+ };
1387
1700
  exports.ThreadMessage = {
1388
1701
  attributes: {
1389
1702
  threadMessageId: {
@@ -2942,125 +3255,22 @@ exports.MessageReference = {
2942
3255
  return true;
2943
3256
  }
2944
3257
  },
2945
- messageIdValue: {
2946
- type: "string",
2947
- required: true
2948
- },
2949
- referenceType: {
2950
- type: ["in_reply_to", "references"],
2951
- required: true
2952
- },
2953
- referenceOrder: {
2954
- type: "number",
2955
- required: true,
2956
- validate: value => {
2957
- if (typeof value === "number" && value < 0)
2958
- throw new Error("'referenceOrder' must be at least 0");
2959
- if (typeof value === "number" && !Number.isInteger(value))
2960
- throw new Error("'referenceOrder' must be an integer");
2961
- return true;
2962
- }
2963
- },
2964
- createdAt: {
2965
- type: "number",
2966
- readOnly: true,
2967
- required: true,
2968
- default: () => Date.now(),
2969
- set: () => Date.now()
2970
- },
2971
- updatedAt: {
2972
- type: "number",
2973
- watch: "*",
2974
- required: true,
2975
- default: () => Date.now(),
2976
- set: () => Date.now()
2977
- }
2978
- },
2979
- indexes: {
2980
- byMessageId: {
2981
- pk: {
2982
- field: "gsi2pk",
2983
- composite: ["messageId"]
2984
- },
2985
- sk: {
2986
- field: "gsi2sk",
2987
- composite: ["messageReferenceId"]
2988
- },
2989
- index: "gsi2",
2990
- collection: "messageData"
2991
- },
2992
- MessageReference: {
2993
- pk: {
2994
- field: "pk",
2995
- composite: ["messageReferenceId"]
2996
- },
2997
- sk: {
2998
- field: "sk",
2999
- composite: []
3000
- }
3001
- }
3002
- },
3003
- model: {
3004
- entity: "messageReference",
3005
- service: "remit",
3006
- version: "1"
3007
- }
3008
- };
3009
- exports.EnvelopeAddress = {
3010
- attributes: {
3011
- envelopeAddressId: {
3012
- type: "string",
3013
- required: true,
3014
- validate: value => {
3015
- if (typeof value === "string" && value.length < 25)
3016
- throw new Error("'envelopeAddressId' must be at least 25 characters");
3017
- if (typeof value === "string" && value.length > 25)
3018
- throw new Error("'envelopeAddressId' must be at most 25 characters");
3019
- return true;
3020
- }
3021
- },
3022
- messageId: {
3023
- type: "string",
3024
- required: true,
3025
- validate: value => {
3026
- if (typeof value === "string" && value.length < 25)
3027
- throw new Error("'messageId' must be at least 25 characters");
3028
- if (typeof value === "string" && value.length > 25)
3029
- throw new Error("'messageId' must be at most 25 characters");
3030
- return true;
3031
- }
3032
- },
3033
- addressId: {
3034
- type: "string",
3035
- required: true,
3036
- validate: value => {
3037
- if (typeof value === "string" && value.length < 25)
3038
- throw new Error("'addressId' must be at least 25 characters");
3039
- if (typeof value === "string" && value.length > 25)
3040
- throw new Error("'addressId' must be at most 25 characters");
3041
- return true;
3042
- }
3043
- },
3044
- displayName: {
3045
- type: "string",
3046
- required: false
3047
- },
3048
- normalizedEmail: {
3258
+ messageIdValue: {
3049
3259
  type: "string",
3050
3260
  required: true
3051
3261
  },
3052
- addressRole: {
3053
- type: ["from", "sender", "reply_to", "to", "cc", "bcc"],
3262
+ referenceType: {
3263
+ type: ["in_reply_to", "references"],
3054
3264
  required: true
3055
3265
  },
3056
- addressOrder: {
3266
+ referenceOrder: {
3057
3267
  type: "number",
3058
3268
  required: true,
3059
3269
  validate: value => {
3060
3270
  if (typeof value === "number" && value < 0)
3061
- throw new Error("'addressOrder' must be at least 0");
3271
+ throw new Error("'referenceOrder' must be at least 0");
3062
3272
  if (typeof value === "number" && !Number.isInteger(value))
3063
- throw new Error("'addressOrder' must be an integer");
3273
+ throw new Error("'referenceOrder' must be an integer");
3064
3274
  return true;
3065
3275
  }
3066
3276
  },
@@ -3087,15 +3297,15 @@ exports.EnvelopeAddress = {
3087
3297
  },
3088
3298
  sk: {
3089
3299
  field: "gsi2sk",
3090
- composite: ["envelopeAddressId"]
3300
+ composite: ["messageReferenceId"]
3091
3301
  },
3092
3302
  index: "gsi2",
3093
3303
  collection: "messageData"
3094
3304
  },
3095
- EnvelopeAddress: {
3305
+ MessageReference: {
3096
3306
  pk: {
3097
3307
  field: "pk",
3098
- composite: ["envelopeAddressId"]
3308
+ composite: ["messageReferenceId"]
3099
3309
  },
3100
3310
  sk: {
3101
3311
  field: "sk",
@@ -3104,21 +3314,21 @@ exports.EnvelopeAddress = {
3104
3314
  }
3105
3315
  },
3106
3316
  model: {
3107
- entity: "envelopeAddress",
3317
+ entity: "messageReference",
3108
3318
  service: "remit",
3109
3319
  version: "1"
3110
3320
  }
3111
3321
  };
3112
- exports.ConfigImport = {
3322
+ exports.CalendarSuggestion = {
3113
3323
  attributes: {
3114
- importId: {
3324
+ suggestionId: {
3115
3325
  type: "string",
3116
3326
  required: true,
3117
3327
  validate: value => {
3118
3328
  if (typeof value === "string" && value.length < 25)
3119
- throw new Error("'importId' must be at least 25 characters");
3329
+ throw new Error("'suggestionId' must be at least 25 characters");
3120
3330
  if (typeof value === "string" && value.length > 25)
3121
- throw new Error("'importId' must be at most 25 characters");
3331
+ throw new Error("'suggestionId' must be at most 25 characters");
3122
3332
  return true;
3123
3333
  }
3124
3334
  },
@@ -3133,134 +3343,128 @@ exports.ConfigImport = {
3133
3343
  return true;
3134
3344
  }
3135
3345
  },
3136
- schemaVersion: {
3346
+ messageId: {
3347
+ type: "string",
3348
+ required: true,
3349
+ validate: value => {
3350
+ if (typeof value === "string" && value.length < 25)
3351
+ throw new Error("'messageId' must be at least 25 characters");
3352
+ if (typeof value === "string" && value.length > 25)
3353
+ throw new Error("'messageId' must be at most 25 characters");
3354
+ return true;
3355
+ }
3356
+ },
3357
+ bodyPartId: {
3358
+ type: "string",
3359
+ required: true,
3360
+ validate: value => {
3361
+ if (typeof value === "string" && value.length < 25)
3362
+ throw new Error("'bodyPartId' must be at least 25 characters");
3363
+ if (typeof value === "string" && value.length > 25)
3364
+ throw new Error("'bodyPartId' must be at most 25 characters");
3365
+ return true;
3366
+ }
3367
+ },
3368
+ icalUid: {
3369
+ type: "string",
3370
+ required: true,
3371
+ validate: value => {
3372
+ if (typeof value === "string" && value.length > 512)
3373
+ throw new Error("'icalUid' must be at most 512 characters");
3374
+ return true;
3375
+ }
3376
+ },
3377
+ sequence: {
3137
3378
  type: "number",
3138
3379
  required: true,
3380
+ default: 0,
3139
3381
  validate: value => {
3140
3382
  if (typeof value === "number" && !Number.isInteger(value))
3141
- throw new Error("'schemaVersion' must be an integer");
3383
+ throw new Error("'sequence' must be an integer");
3142
3384
  return true;
3143
3385
  }
3144
3386
  },
3387
+ method: {
3388
+ type: ["Request", "Reply", "Cancel", "Counter", "Publish", "None"],
3389
+ required: true,
3390
+ default: "None"
3391
+ },
3392
+ source: {
3393
+ type: ["IcalendarPart", "IcalendarAttachment", "TextHeuristic"],
3394
+ required: true,
3395
+ default: "IcalendarPart"
3396
+ },
3145
3397
  state: {
3146
- type: ["Pending", "Complete"],
3398
+ type: ["Pending", "Accepted", "Declined", "Tentative", "Dismissed", "Superseded"],
3147
3399
  required: true,
3148
3400
  default: "Pending"
3149
3401
  },
3150
- document: {
3151
- type: (0, electrodb_1.CustomAttributeType)("any"),
3152
- required: true
3153
- },
3154
- unresolvedRefs: {
3155
- type: "list",
3156
- items: {
3157
- type: "map",
3158
- properties: {
3159
- kind: {
3160
- type: ["FolderRole", "MailboxOverride", "FilterAction"],
3161
- required: true
3162
- },
3163
- accountId: {
3164
- type: "string",
3165
- required: true
3166
- },
3167
- folderPath: {
3168
- type: "string",
3169
- required: true
3170
- },
3171
- target: {
3172
- type: "string",
3173
- required: true
3174
- }
3175
- }
3176
- },
3177
- required: true
3402
+ summary: {
3403
+ type: "string",
3404
+ required: true,
3405
+ validate: value => {
3406
+ if (typeof value === "string" && value.length > 512)
3407
+ throw new Error("'summary' must be at most 512 characters");
3408
+ return true;
3409
+ }
3178
3410
  },
3179
- createdAt: {
3180
- type: "number",
3181
- readOnly: true,
3411
+ dtStart: {
3412
+ type: "string",
3182
3413
  required: true,
3183
- default: () => Date.now(),
3184
- set: () => Date.now()
3414
+ validate: value => {
3415
+ if (typeof value === "string" && value.length > 64)
3416
+ throw new Error("'dtStart' must be at most 64 characters");
3417
+ return true;
3418
+ }
3185
3419
  },
3186
- completedAt: {
3187
- type: "number",
3420
+ dtEnd: {
3421
+ type: "string",
3188
3422
  required: true,
3189
- default: 0,
3190
3423
  validate: value => {
3191
- if (typeof value === "number" && !Number.isInteger(value))
3192
- throw new Error("'completedAt' must be an integer");
3424
+ if (typeof value === "string" && value.length > 64)
3425
+ throw new Error("'dtEnd' must be at most 64 characters");
3193
3426
  return true;
3194
3427
  }
3195
3428
  },
3196
- updatedAt: {
3197
- type: "number",
3198
- watch: "*",
3429
+ allDay: {
3430
+ type: "boolean",
3199
3431
  required: true,
3200
- default: () => Date.now(),
3201
- set: () => Date.now()
3202
- }
3203
- },
3204
- indexes: {
3205
- byAccountConfigId: {
3206
- pk: {
3207
- field: "gsi0pk",
3208
- composite: ["accountConfigId"]
3209
- },
3210
- sk: {
3211
- field: "gsi0sk",
3212
- composite: ["createdAt"]
3213
- },
3214
- index: "gsi0"
3432
+ default: false
3215
3433
  },
3216
- ConfigImport: {
3217
- pk: {
3218
- field: "pk",
3219
- composite: ["importId"]
3220
- },
3221
- sk: {
3222
- field: "sk",
3223
- composite: []
3224
- }
3225
- }
3226
- },
3227
- model: {
3228
- entity: "configImport",
3229
- service: "remit",
3230
- version: "1"
3231
- }
3232
- };
3233
- exports.AccountSetting = {
3234
- attributes: {
3235
- accountSettingId: {
3434
+ location: {
3236
3435
  type: "string",
3237
3436
  required: true,
3437
+ default: "",
3238
3438
  validate: value => {
3239
- if (typeof value === "string" && value.length < 25)
3240
- throw new Error("'accountSettingId' must be at least 25 characters");
3241
- if (typeof value === "string" && value.length > 25)
3242
- throw new Error("'accountSettingId' must be at most 25 characters");
3439
+ if (typeof value === "string" && value.length > 512)
3440
+ throw new Error("'location' must be at most 512 characters");
3243
3441
  return true;
3244
3442
  }
3245
3443
  },
3246
- accountConfigId: {
3444
+ organizer: {
3247
3445
  type: "string",
3248
3446
  required: true,
3447
+ default: "",
3249
3448
  validate: value => {
3250
- if (typeof value === "string" && value.length < 25)
3251
- throw new Error("'accountConfigId' must be at least 25 characters");
3252
- if (typeof value === "string" && value.length > 25)
3253
- throw new Error("'accountConfigId' must be at most 25 characters");
3449
+ if (typeof value === "string" && value.length > 256)
3450
+ throw new Error("'organizer' must be at most 256 characters");
3254
3451
  return true;
3255
3452
  }
3256
3453
  },
3257
- name: {
3454
+ zoneCertainty: {
3455
+ type: ["Local", "Explicit", "Ambiguous"],
3456
+ required: true,
3457
+ default: "Explicit"
3458
+ },
3459
+ icalData: {
3258
3460
  type: "string",
3259
- required: true
3461
+ required: true,
3462
+ default: ""
3260
3463
  },
3261
- value: {
3262
- type: (0, electrodb_1.CustomAttributeType)("any"),
3263
- required: true
3464
+ acceptedCalendarObjectId: {
3465
+ type: "string",
3466
+ required: true,
3467
+ default: ""
3264
3468
  },
3265
3469
  createdAt: {
3266
3470
  type: "number",
@@ -3278,202 +3482,135 @@ exports.AccountSetting = {
3278
3482
  }
3279
3483
  },
3280
3484
  indexes: {
3281
- byAccountConfigId: {
3282
- pk: {
3283
- field: "gsi0pk",
3284
- composite: ["accountConfigId"]
3285
- },
3286
- sk: {
3287
- field: "gsi0sk",
3288
- composite: ["name"]
3289
- },
3290
- index: "gsi0"
3291
- },
3292
- AccountSetting: {
3293
- pk: {
3294
- field: "pk",
3295
- composite: ["accountSettingId"]
3296
- },
3297
- sk: {
3298
- field: "sk",
3299
- composite: []
3300
- }
3301
- }
3302
- },
3303
- model: {
3304
- entity: "accountSetting",
3305
- service: "remit",
3306
- version: "1"
3307
- }
3308
- };
3309
- exports.MailboxAttributeEntry = {
3310
- attributes: {
3311
- mailboxAttributeId: {
3312
- type: "string",
3313
- required: true,
3314
- validate: value => {
3315
- if (typeof value === "string" && value.length < 25)
3316
- throw new Error("'mailboxAttributeId' must be at least 25 characters");
3317
- if (typeof value === "string" && value.length > 25)
3318
- throw new Error("'mailboxAttributeId' must be at most 25 characters");
3319
- return true;
3320
- }
3321
- },
3322
- mailboxId: {
3323
- type: "string",
3324
- required: true,
3325
- validate: value => {
3326
- if (typeof value === "string" && value.length < 25)
3327
- throw new Error("'mailboxId' must be at least 25 characters");
3328
- if (typeof value === "string" && value.length > 25)
3329
- throw new Error("'mailboxId' must be at most 25 characters");
3330
- return true;
3331
- }
3332
- },
3333
- attributeName: {
3334
- type: ["\NonExistent", "\Noinferiors", "\Noselect", "\HasChildren", "\HasNoChildren", "\Marked", "\Unmarked", "\Subscribed", "\Remote"],
3335
- required: true
3336
- }
3337
- },
3338
- indexes: {
3339
- byMailboxId: {
3485
+ byState: {
3340
3486
  pk: {
3341
3487
  field: "gsi1pk",
3342
- composite: ["mailboxId"]
3488
+ composite: ["accountConfigId"]
3343
3489
  },
3344
3490
  sk: {
3345
3491
  field: "gsi1sk",
3346
- composite: ["mailboxAttributeId"]
3492
+ composite: ["state", "createdAt", "suggestionId"]
3347
3493
  },
3348
- index: "gsi1",
3349
- collection: "mailbox"
3494
+ index: "gsi1"
3350
3495
  },
3351
- MailboxAttributeEntry: {
3496
+ byMessage: {
3497
+ pk: {
3498
+ field: "gsi0pk",
3499
+ composite: ["accountConfigId"]
3500
+ },
3501
+ sk: {
3502
+ field: "gsi0sk",
3503
+ composite: ["messageId", "suggestionId"]
3504
+ },
3505
+ index: "gsi0"
3506
+ },
3507
+ CalendarSuggestion: {
3352
3508
  pk: {
3353
3509
  field: "pk",
3354
- composite: ["mailboxAttributeId"]
3510
+ composite: ["accountConfigId"]
3355
3511
  },
3356
3512
  sk: {
3357
3513
  field: "sk",
3358
- composite: []
3514
+ composite: ["suggestionId"]
3359
3515
  }
3360
3516
  }
3361
3517
  },
3362
3518
  model: {
3363
- entity: "mailboxAttributeEntry",
3519
+ entity: "calendarSuggestion",
3364
3520
  service: "remit",
3365
3521
  version: "1"
3366
3522
  }
3367
3523
  };
3368
- exports.MailboxSpecialUseEntry = {
3524
+ exports.EnvelopeAddress = {
3369
3525
  attributes: {
3370
- mailboxSpecialUseId: {
3526
+ envelopeAddressId: {
3371
3527
  type: "string",
3372
3528
  required: true,
3373
3529
  validate: value => {
3374
3530
  if (typeof value === "string" && value.length < 25)
3375
- throw new Error("'mailboxSpecialUseId' must be at least 25 characters");
3531
+ throw new Error("'envelopeAddressId' must be at least 25 characters");
3376
3532
  if (typeof value === "string" && value.length > 25)
3377
- throw new Error("'mailboxSpecialUseId' must be at most 25 characters");
3533
+ throw new Error("'envelopeAddressId' must be at most 25 characters");
3378
3534
  return true;
3379
3535
  }
3380
3536
  },
3381
- mailboxId: {
3537
+ messageId: {
3382
3538
  type: "string",
3383
3539
  required: true,
3384
3540
  validate: value => {
3385
3541
  if (typeof value === "string" && value.length < 25)
3386
- throw new Error("'mailboxId' must be at least 25 characters");
3542
+ throw new Error("'messageId' must be at least 25 characters");
3387
3543
  if (typeof value === "string" && value.length > 25)
3388
- throw new Error("'mailboxId' must be at most 25 characters");
3544
+ throw new Error("'messageId' must be at most 25 characters");
3389
3545
  return true;
3390
3546
  }
3391
3547
  },
3392
- specialUse: {
3393
- type: ["All", "Archive", "Drafts", "Flagged", "Junk", "Sent", "Trash", "Important"],
3394
- required: true
3395
- }
3396
- },
3397
- indexes: {
3398
- byMailboxId: {
3399
- pk: {
3400
- field: "gsi1pk",
3401
- composite: ["mailboxId"]
3402
- },
3403
- sk: {
3404
- field: "gsi1sk",
3405
- composite: ["mailboxSpecialUseId"]
3406
- },
3407
- index: "gsi1",
3408
- collection: "mailbox"
3409
- },
3410
- MailboxSpecialUseEntry: {
3411
- pk: {
3412
- field: "pk",
3413
- composite: ["mailboxSpecialUseId"]
3414
- },
3415
- sk: {
3416
- field: "sk",
3417
- composite: []
3418
- }
3419
- }
3420
- },
3421
- model: {
3422
- entity: "mailboxSpecialUseEntry",
3423
- service: "remit",
3424
- version: "1"
3425
- }
3426
- };
3427
- exports.MailboxFlag = {
3428
- attributes: {
3429
- mailboxFlagId: {
3548
+ addressId: {
3430
3549
  type: "string",
3431
3550
  required: true,
3432
3551
  validate: value => {
3433
3552
  if (typeof value === "string" && value.length < 25)
3434
- throw new Error("'mailboxFlagId' must be at least 25 characters");
3553
+ throw new Error("'addressId' must be at least 25 characters");
3435
3554
  if (typeof value === "string" && value.length > 25)
3436
- throw new Error("'mailboxFlagId' must be at most 25 characters");
3555
+ throw new Error("'addressId' must be at most 25 characters");
3437
3556
  return true;
3438
3557
  }
3439
3558
  },
3440
- mailboxId: {
3559
+ displayName: {
3560
+ type: "string",
3561
+ required: false
3562
+ },
3563
+ normalizedEmail: {
3441
3564
  type: "string",
3565
+ required: true
3566
+ },
3567
+ addressRole: {
3568
+ type: ["from", "sender", "reply_to", "to", "cc", "bcc"],
3569
+ required: true
3570
+ },
3571
+ addressOrder: {
3572
+ type: "number",
3442
3573
  required: true,
3443
3574
  validate: value => {
3444
- if (typeof value === "string" && value.length < 25)
3445
- throw new Error("'mailboxId' must be at least 25 characters");
3446
- if (typeof value === "string" && value.length > 25)
3447
- throw new Error("'mailboxId' must be at most 25 characters");
3575
+ if (typeof value === "number" && value < 0)
3576
+ throw new Error("'addressOrder' must be at least 0");
3577
+ if (typeof value === "number" && !Number.isInteger(value))
3578
+ throw new Error("'addressOrder' must be an integer");
3448
3579
  return true;
3449
3580
  }
3450
3581
  },
3451
- flagName: {
3452
- type: (0, electrodb_1.CustomAttributeType)("any"),
3453
- required: true
3582
+ createdAt: {
3583
+ type: "number",
3584
+ readOnly: true,
3585
+ required: true,
3586
+ default: () => Date.now(),
3587
+ set: () => Date.now()
3454
3588
  },
3455
- isPermanent: {
3456
- type: "boolean",
3457
- required: true
3589
+ updatedAt: {
3590
+ type: "number",
3591
+ watch: "*",
3592
+ required: true,
3593
+ default: () => Date.now(),
3594
+ set: () => Date.now()
3458
3595
  }
3459
3596
  },
3460
3597
  indexes: {
3461
- byMailboxId: {
3598
+ byMessageId: {
3462
3599
  pk: {
3463
- field: "gsi1pk",
3464
- composite: ["mailboxId"]
3600
+ field: "gsi2pk",
3601
+ composite: ["messageId"]
3465
3602
  },
3466
3603
  sk: {
3467
- field: "gsi1sk",
3468
- composite: ["mailboxFlagId"]
3604
+ field: "gsi2sk",
3605
+ composite: ["envelopeAddressId"]
3469
3606
  },
3470
- index: "gsi1",
3471
- collection: "mailbox"
3607
+ index: "gsi2",
3608
+ collection: "messageData"
3472
3609
  },
3473
- MailboxFlag: {
3610
+ EnvelopeAddress: {
3474
3611
  pk: {
3475
3612
  field: "pk",
3476
- composite: ["mailboxFlagId"]
3613
+ composite: ["envelopeAddressId"]
3477
3614
  },
3478
3615
  sk: {
3479
3616
  field: "sk",
@@ -3482,150 +3619,163 @@ exports.MailboxFlag = {
3482
3619
  }
3483
3620
  },
3484
3621
  model: {
3485
- entity: "mailboxFlag",
3622
+ entity: "envelopeAddress",
3486
3623
  service: "remit",
3487
3624
  version: "1"
3488
3625
  }
3489
3626
  };
3490
- exports.MailboxLock = {
3627
+ exports.ConfigImport = {
3491
3628
  attributes: {
3492
- mailboxId: {
3493
- type: "string",
3494
- required: true,
3495
- validate: value => {
3496
- if (typeof value === "string" && value.length < 25)
3497
- throw new Error("'mailboxId' must be at least 25 characters");
3498
- if (typeof value === "string" && value.length > 25)
3499
- throw new Error("'mailboxId' must be at most 25 characters");
3500
- return true;
3501
- }
3502
- },
3503
- eventName: {
3504
- type: "string",
3505
- required: true
3506
- },
3507
- accountId: {
3629
+ importId: {
3508
3630
  type: "string",
3509
3631
  required: true,
3510
3632
  validate: value => {
3511
3633
  if (typeof value === "string" && value.length < 25)
3512
- throw new Error("'accountId' must be at least 25 characters");
3634
+ throw new Error("'importId' must be at least 25 characters");
3513
3635
  if (typeof value === "string" && value.length > 25)
3514
- throw new Error("'accountId' must be at most 25 characters");
3636
+ throw new Error("'importId' must be at most 25 characters");
3515
3637
  return true;
3516
3638
  }
3517
3639
  },
3518
- lockId: {
3640
+ accountConfigId: {
3519
3641
  type: "string",
3520
3642
  required: true,
3521
3643
  validate: value => {
3522
3644
  if (typeof value === "string" && value.length < 25)
3523
- throw new Error("'lockId' must be at least 25 characters");
3645
+ throw new Error("'accountConfigId' must be at least 25 characters");
3524
3646
  if (typeof value === "string" && value.length > 25)
3525
- throw new Error("'lockId' must be at most 25 characters");
3647
+ throw new Error("'accountConfigId' must be at most 25 characters");
3526
3648
  return true;
3527
3649
  }
3528
3650
  },
3529
- acquiredAt: {
3651
+ schemaVersion: {
3530
3652
  type: "number",
3531
3653
  required: true,
3532
3654
  validate: value => {
3533
3655
  if (typeof value === "number" && !Number.isInteger(value))
3534
- throw new Error("'acquiredAt' must be an integer");
3656
+ throw new Error("'schemaVersion' must be an integer");
3535
3657
  return true;
3536
3658
  }
3537
3659
  },
3538
- lockedBy: {
3539
- type: "string",
3660
+ state: {
3661
+ type: ["Pending", "Complete"],
3662
+ required: true,
3663
+ default: "Pending"
3664
+ },
3665
+ document: {
3666
+ type: (0, electrodb_1.CustomAttributeType)("any"),
3540
3667
  required: true
3541
3668
  },
3542
- ttl: {
3669
+ unresolvedRefs: {
3670
+ type: "list",
3671
+ items: {
3672
+ type: "map",
3673
+ properties: {
3674
+ kind: {
3675
+ type: ["FolderRole", "MailboxOverride", "FilterAction"],
3676
+ required: true
3677
+ },
3678
+ accountId: {
3679
+ type: "string",
3680
+ required: true
3681
+ },
3682
+ folderPath: {
3683
+ type: "string",
3684
+ required: true
3685
+ },
3686
+ target: {
3687
+ type: "string",
3688
+ required: true
3689
+ }
3690
+ }
3691
+ },
3692
+ required: true
3693
+ },
3694
+ createdAt: {
3695
+ type: "number",
3696
+ readOnly: true,
3697
+ required: true,
3698
+ default: () => Date.now(),
3699
+ set: () => Date.now()
3700
+ },
3701
+ completedAt: {
3543
3702
  type: "number",
3544
3703
  required: true,
3704
+ default: 0,
3545
3705
  validate: value => {
3546
3706
  if (typeof value === "number" && !Number.isInteger(value))
3547
- throw new Error("'ttl' must be an integer");
3707
+ throw new Error("'completedAt' must be an integer");
3548
3708
  return true;
3549
3709
  }
3710
+ },
3711
+ updatedAt: {
3712
+ type: "number",
3713
+ watch: "*",
3714
+ required: true,
3715
+ default: () => Date.now(),
3716
+ set: () => Date.now()
3550
3717
  }
3551
3718
  },
3552
3719
  indexes: {
3553
- allLocks: {
3554
- pk: {
3555
- field: "gsi2pk",
3556
- composite: []
3557
- },
3558
- sk: {
3559
- field: "gsi2sk",
3560
- composite: ["acquiredAt"]
3561
- },
3562
- index: "gsi2",
3563
- collection: "locks"
3564
- },
3565
- byAccountId: {
3720
+ byAccountConfigId: {
3566
3721
  pk: {
3567
- field: "gsi1pk",
3568
- composite: ["accountId"]
3722
+ field: "gsi0pk",
3723
+ composite: ["accountConfigId"]
3569
3724
  },
3570
3725
  sk: {
3571
- field: "gsi1sk",
3572
- composite: ["mailboxId", "eventName"]
3726
+ field: "gsi0sk",
3727
+ composite: ["createdAt"]
3573
3728
  },
3574
- index: "gsi1"
3729
+ index: "gsi0"
3575
3730
  },
3576
- MailboxLock: {
3731
+ ConfigImport: {
3577
3732
  pk: {
3578
3733
  field: "pk",
3579
- composite: ["mailboxId"]
3734
+ composite: ["importId"]
3580
3735
  },
3581
3736
  sk: {
3582
3737
  field: "sk",
3583
- composite: ["eventName"]
3738
+ composite: []
3584
3739
  }
3585
3740
  }
3586
3741
  },
3587
3742
  model: {
3588
- entity: "mailboxLock",
3743
+ entity: "configImport",
3589
3744
  service: "remit",
3590
3745
  version: "1"
3591
3746
  }
3592
3747
  };
3593
- exports.MessageFlag = {
3748
+ exports.AccountSetting = {
3594
3749
  attributes: {
3595
- messageFlagId: {
3750
+ accountSettingId: {
3596
3751
  type: "string",
3597
3752
  required: true,
3598
3753
  validate: value => {
3599
3754
  if (typeof value === "string" && value.length < 25)
3600
- throw new Error("'messageFlagId' must be at least 25 characters");
3755
+ throw new Error("'accountSettingId' must be at least 25 characters");
3601
3756
  if (typeof value === "string" && value.length > 25)
3602
- throw new Error("'messageFlagId' must be at most 25 characters");
3757
+ throw new Error("'accountSettingId' must be at most 25 characters");
3603
3758
  return true;
3604
3759
  }
3605
3760
  },
3606
- messageId: {
3761
+ accountConfigId: {
3607
3762
  type: "string",
3608
3763
  required: true,
3609
3764
  validate: value => {
3610
3765
  if (typeof value === "string" && value.length < 25)
3611
- throw new Error("'messageId' must be at least 25 characters");
3766
+ throw new Error("'accountConfigId' must be at least 25 characters");
3612
3767
  if (typeof value === "string" && value.length > 25)
3613
- throw new Error("'messageId' must be at most 25 characters");
3768
+ throw new Error("'accountConfigId' must be at most 25 characters");
3614
3769
  return true;
3615
3770
  }
3616
3771
  },
3617
- flagName: {
3618
- type: (0, electrodb_1.CustomAttributeType)("any"),
3772
+ name: {
3773
+ type: "string",
3619
3774
  required: true
3620
3775
  },
3621
- setAt: {
3622
- type: "number",
3623
- required: true,
3624
- validate: value => {
3625
- if (typeof value === "number" && !Number.isInteger(value))
3626
- throw new Error("'setAt' must be an integer");
3627
- return true;
3628
- }
3776
+ value: {
3777
+ type: (0, electrodb_1.CustomAttributeType)("any"),
3778
+ required: true
3629
3779
  },
3630
3780
  createdAt: {
3631
3781
  type: "number",
@@ -3643,22 +3793,21 @@ exports.MessageFlag = {
3643
3793
  }
3644
3794
  },
3645
3795
  indexes: {
3646
- byMessageId: {
3796
+ byAccountConfigId: {
3647
3797
  pk: {
3648
- field: "gsi2pk",
3649
- composite: ["messageId"]
3798
+ field: "gsi0pk",
3799
+ composite: ["accountConfigId"]
3650
3800
  },
3651
3801
  sk: {
3652
- field: "gsi2sk",
3653
- composite: ["messageFlagId"]
3802
+ field: "gsi0sk",
3803
+ composite: ["name"]
3654
3804
  },
3655
- index: "gsi2",
3656
- collection: "messageData"
3805
+ index: "gsi0"
3657
3806
  },
3658
- MessageFlag: {
3807
+ AccountSetting: {
3659
3808
  pk: {
3660
3809
  field: "pk",
3661
- composite: ["messageFlagId"]
3810
+ composite: ["accountSettingId"]
3662
3811
  },
3663
3812
  sk: {
3664
3813
  field: "sk",
@@ -3667,104 +3816,179 @@ exports.MessageFlag = {
3667
3816
  }
3668
3817
  },
3669
3818
  model: {
3670
- entity: "messageFlag",
3819
+ entity: "accountSetting",
3671
3820
  service: "remit",
3672
3821
  version: "1"
3673
3822
  }
3674
3823
  };
3675
- exports.MessagePlacementMove = {
3824
+ exports.MailboxAttributeEntry = {
3676
3825
  attributes: {
3677
- messageId: {
3826
+ mailboxAttributeId: {
3678
3827
  type: "string",
3679
3828
  required: true,
3680
3829
  validate: value => {
3681
3830
  if (typeof value === "string" && value.length < 25)
3682
- throw new Error("'messageId' must be at least 25 characters");
3831
+ throw new Error("'mailboxAttributeId' must be at least 25 characters");
3683
3832
  if (typeof value === "string" && value.length > 25)
3684
- throw new Error("'messageId' must be at most 25 characters");
3833
+ throw new Error("'mailboxAttributeId' must be at most 25 characters");
3685
3834
  return true;
3686
3835
  }
3687
3836
  },
3688
- accountId: {
3837
+ mailboxId: {
3689
3838
  type: "string",
3690
3839
  required: true,
3691
3840
  validate: value => {
3692
3841
  if (typeof value === "string" && value.length < 25)
3693
- throw new Error("'accountId' must be at least 25 characters");
3842
+ throw new Error("'mailboxId' must be at least 25 characters");
3694
3843
  if (typeof value === "string" && value.length > 25)
3695
- throw new Error("'accountId' must be at most 25 characters");
3844
+ throw new Error("'mailboxId' must be at most 25 characters");
3696
3845
  return true;
3697
3846
  }
3698
3847
  },
3699
- accountConfigId: {
3848
+ attributeName: {
3849
+ type: ["\NonExistent", "\Noinferiors", "\Noselect", "\HasChildren", "\HasNoChildren", "\Marked", "\Unmarked", "\Subscribed", "\Remote"],
3850
+ required: true
3851
+ }
3852
+ },
3853
+ indexes: {
3854
+ byMailboxId: {
3855
+ pk: {
3856
+ field: "gsi1pk",
3857
+ composite: ["mailboxId"]
3858
+ },
3859
+ sk: {
3860
+ field: "gsi1sk",
3861
+ composite: ["mailboxAttributeId"]
3862
+ },
3863
+ index: "gsi1",
3864
+ collection: "mailbox"
3865
+ },
3866
+ MailboxAttributeEntry: {
3867
+ pk: {
3868
+ field: "pk",
3869
+ composite: ["mailboxAttributeId"]
3870
+ },
3871
+ sk: {
3872
+ field: "sk",
3873
+ composite: []
3874
+ }
3875
+ }
3876
+ },
3877
+ model: {
3878
+ entity: "mailboxAttributeEntry",
3879
+ service: "remit",
3880
+ version: "1"
3881
+ }
3882
+ };
3883
+ exports.MailboxSpecialUseEntry = {
3884
+ attributes: {
3885
+ mailboxSpecialUseId: {
3700
3886
  type: "string",
3701
3887
  required: true,
3702
3888
  validate: value => {
3703
3889
  if (typeof value === "string" && value.length < 25)
3704
- throw new Error("'accountConfigId' must be at least 25 characters");
3890
+ throw new Error("'mailboxSpecialUseId' must be at least 25 characters");
3705
3891
  if (typeof value === "string" && value.length > 25)
3706
- throw new Error("'accountConfigId' must be at most 25 characters");
3892
+ throw new Error("'mailboxSpecialUseId' must be at most 25 characters");
3707
3893
  return true;
3708
3894
  }
3709
3895
  },
3710
- sourceMailboxId: {
3896
+ mailboxId: {
3711
3897
  type: "string",
3712
3898
  required: true,
3713
3899
  validate: value => {
3714
3900
  if (typeof value === "string" && value.length < 25)
3715
- throw new Error("'sourceMailboxId' must be at least 25 characters");
3901
+ throw new Error("'mailboxId' must be at least 25 characters");
3716
3902
  if (typeof value === "string" && value.length > 25)
3717
- throw new Error("'sourceMailboxId' must be at most 25 characters");
3903
+ throw new Error("'mailboxId' must be at most 25 characters");
3718
3904
  return true;
3719
3905
  }
3720
3906
  },
3721
- destinationMailboxId: {
3907
+ specialUse: {
3908
+ type: ["All", "Archive", "Drafts", "Flagged", "Junk", "Sent", "Trash", "Important"],
3909
+ required: true
3910
+ }
3911
+ },
3912
+ indexes: {
3913
+ byMailboxId: {
3914
+ pk: {
3915
+ field: "gsi1pk",
3916
+ composite: ["mailboxId"]
3917
+ },
3918
+ sk: {
3919
+ field: "gsi1sk",
3920
+ composite: ["mailboxSpecialUseId"]
3921
+ },
3922
+ index: "gsi1",
3923
+ collection: "mailbox"
3924
+ },
3925
+ MailboxSpecialUseEntry: {
3926
+ pk: {
3927
+ field: "pk",
3928
+ composite: ["mailboxSpecialUseId"]
3929
+ },
3930
+ sk: {
3931
+ field: "sk",
3932
+ composite: []
3933
+ }
3934
+ }
3935
+ },
3936
+ model: {
3937
+ entity: "mailboxSpecialUseEntry",
3938
+ service: "remit",
3939
+ version: "1"
3940
+ }
3941
+ };
3942
+ exports.MailboxFlag = {
3943
+ attributes: {
3944
+ mailboxFlagId: {
3722
3945
  type: "string",
3723
3946
  required: true,
3724
3947
  validate: value => {
3725
3948
  if (typeof value === "string" && value.length < 25)
3726
- throw new Error("'destinationMailboxId' must be at least 25 characters");
3949
+ throw new Error("'mailboxFlagId' must be at least 25 characters");
3727
3950
  if (typeof value === "string" && value.length > 25)
3728
- throw new Error("'destinationMailboxId' must be at most 25 characters");
3951
+ throw new Error("'mailboxFlagId' must be at most 25 characters");
3729
3952
  return true;
3730
3953
  }
3731
3954
  },
3732
- state: {
3733
- type: ["pending", "queued", "processing", "processed"],
3955
+ mailboxId: {
3956
+ type: "string",
3734
3957
  required: true,
3735
- default: "pending"
3958
+ validate: value => {
3959
+ if (typeof value === "string" && value.length < 25)
3960
+ throw new Error("'mailboxId' must be at least 25 characters");
3961
+ if (typeof value === "string" && value.length > 25)
3962
+ throw new Error("'mailboxId' must be at most 25 characters");
3963
+ return true;
3964
+ }
3736
3965
  },
3737
- createdAt: {
3738
- type: "number",
3739
- readOnly: true,
3740
- required: true,
3741
- default: () => Date.now(),
3742
- set: () => Date.now()
3966
+ flagName: {
3967
+ type: (0, electrodb_1.CustomAttributeType)("any"),
3968
+ required: true
3743
3969
  },
3744
- updatedAt: {
3745
- type: "number",
3746
- watch: "*",
3747
- required: true,
3748
- default: () => Date.now(),
3749
- set: () => Date.now()
3970
+ isPermanent: {
3971
+ type: "boolean",
3972
+ required: true
3750
3973
  }
3751
3974
  },
3752
3975
  indexes: {
3753
- byAccountId: {
3976
+ byMailboxId: {
3754
3977
  pk: {
3755
- field: "gsi0pk",
3756
- composite: ["accountId"]
3978
+ field: "gsi1pk",
3979
+ composite: ["mailboxId"]
3757
3980
  },
3758
3981
  sk: {
3759
- field: "gsi0sk",
3760
- composite: ["messageId"]
3982
+ field: "gsi1sk",
3983
+ composite: ["mailboxFlagId"]
3761
3984
  },
3762
- index: "gsi0"
3985
+ index: "gsi1",
3986
+ collection: "mailbox"
3763
3987
  },
3764
- MessagePlacementMove: {
3988
+ MailboxFlag: {
3765
3989
  pk: {
3766
3990
  field: "pk",
3767
- composite: ["messageId"]
3991
+ composite: ["mailboxFlagId"]
3768
3992
  },
3769
3993
  sk: {
3770
3994
  field: "sk",
@@ -3773,25 +3997,25 @@ exports.MessagePlacementMove = {
3773
3997
  }
3774
3998
  },
3775
3999
  model: {
3776
- entity: "messagePlacementMove",
4000
+ entity: "mailboxFlag",
3777
4001
  service: "remit",
3778
4002
  version: "1"
3779
4003
  }
3780
4004
  };
3781
- exports.MessageFlagPush = {
4005
+ exports.MailboxLock = {
3782
4006
  attributes: {
3783
- messageId: {
4007
+ mailboxId: {
3784
4008
  type: "string",
3785
4009
  required: true,
3786
4010
  validate: value => {
3787
4011
  if (typeof value === "string" && value.length < 25)
3788
- throw new Error("'messageId' must be at least 25 characters");
4012
+ throw new Error("'mailboxId' must be at least 25 characters");
3789
4013
  if (typeof value === "string" && value.length > 25)
3790
- throw new Error("'messageId' must be at most 25 characters");
4014
+ throw new Error("'mailboxId' must be at most 25 characters");
3791
4015
  return true;
3792
4016
  }
3793
4017
  },
3794
- flagName: {
4018
+ eventName: {
3795
4019
  type: "string",
3796
4020
  required: true
3797
4021
  },
@@ -3806,102 +4030,91 @@ exports.MessageFlagPush = {
3806
4030
  return true;
3807
4031
  }
3808
4032
  },
3809
- accountConfigId: {
4033
+ lockId: {
3810
4034
  type: "string",
3811
4035
  required: true,
3812
4036
  validate: value => {
3813
4037
  if (typeof value === "string" && value.length < 25)
3814
- throw new Error("'accountConfigId' must be at least 25 characters");
4038
+ throw new Error("'lockId' must be at least 25 characters");
3815
4039
  if (typeof value === "string" && value.length > 25)
3816
- throw new Error("'accountConfigId' must be at most 25 characters");
4040
+ throw new Error("'lockId' must be at most 25 characters");
3817
4041
  return true;
3818
4042
  }
3819
4043
  },
3820
- mailboxId: {
3821
- type: "string",
4044
+ acquiredAt: {
4045
+ type: "number",
3822
4046
  required: true,
3823
4047
  validate: value => {
3824
- if (typeof value === "string" && value.length < 25)
3825
- throw new Error("'mailboxId' must be at least 25 characters");
3826
- if (typeof value === "string" && value.length > 25)
3827
- throw new Error("'mailboxId' must be at most 25 characters");
4048
+ if (typeof value === "number" && !Number.isInteger(value))
4049
+ throw new Error("'acquiredAt' must be an integer");
3828
4050
  return true;
3829
4051
  }
3830
4052
  },
3831
- operation: {
3832
- type: ["add", "remove"],
4053
+ lockedBy: {
4054
+ type: "string",
3833
4055
  required: true
3834
4056
  },
3835
- state: {
3836
- type: ["pending", "queued", "processing", "processed"],
3837
- required: true,
3838
- default: "pending"
3839
- },
3840
- createdAt: {
3841
- type: "number",
3842
- readOnly: true,
3843
- required: true,
3844
- default: () => Date.now(),
3845
- set: () => Date.now()
3846
- },
3847
- updatedAt: {
4057
+ ttl: {
3848
4058
  type: "number",
3849
- watch: "*",
3850
4059
  required: true,
3851
- default: () => Date.now(),
3852
- set: () => Date.now()
4060
+ validate: value => {
4061
+ if (typeof value === "number" && !Number.isInteger(value))
4062
+ throw new Error("'ttl' must be an integer");
4063
+ return true;
4064
+ }
3853
4065
  }
3854
4066
  },
3855
4067
  indexes: {
3856
- byMailboxId: {
4068
+ allLocks: {
3857
4069
  pk: {
3858
- field: "gsi1pk",
3859
- composite: ["mailboxId"]
4070
+ field: "gsi2pk",
4071
+ composite: []
3860
4072
  },
3861
4073
  sk: {
3862
- field: "gsi1sk",
3863
- composite: ["messageId", "flagName"]
4074
+ field: "gsi2sk",
4075
+ composite: ["acquiredAt"]
3864
4076
  },
3865
- index: "gsi1"
4077
+ index: "gsi2",
4078
+ collection: "locks"
3866
4079
  },
3867
4080
  byAccountId: {
3868
4081
  pk: {
3869
- field: "gsi0pk",
4082
+ field: "gsi1pk",
3870
4083
  composite: ["accountId"]
3871
4084
  },
3872
4085
  sk: {
3873
- field: "gsi0sk",
3874
- composite: ["messageId", "flagName"]
4086
+ field: "gsi1sk",
4087
+ composite: ["mailboxId", "eventName"]
3875
4088
  },
3876
- index: "gsi0"
4089
+ index: "gsi1"
3877
4090
  },
3878
- MessageFlagPush: {
4091
+ MailboxLock: {
3879
4092
  pk: {
3880
4093
  field: "pk",
3881
- composite: ["messageId"]
4094
+ composite: ["mailboxId"]
3882
4095
  },
3883
4096
  sk: {
3884
4097
  field: "sk",
3885
- composite: ["flagName"]
4098
+ composite: ["eventName"]
3886
4099
  }
3887
4100
  }
3888
4101
  },
3889
4102
  model: {
3890
- entity: "messageFlagPush",
4103
+ entity: "mailboxLock",
3891
4104
  service: "remit",
3892
4105
  version: "1"
3893
4106
  }
3894
4107
  };
3895
- exports.Envelope = {
4108
+ exports.MessageFlag = {
3896
4109
  attributes: {
3897
- envelopeId: {
4110
+ messageFlagId: {
3898
4111
  type: "string",
3899
4112
  required: true,
3900
4113
  validate: value => {
3901
4114
  if (typeof value === "string" && value.length < 25)
3902
- throw new Error("'envelopeId' must be at least 25 characters");
4115
+ throw new Error("'messageFlagId' must be at least 25 characters");
3903
4116
  if (typeof value === "string" && value.length > 25)
3904
- throw new Error("'envelopeId' must be at most 25 characters");
4117
+ throw new Error("'messageFlagId' must be at most 25 characters");
3905
4118
  return true;
3906
4119
  }
3907
4120
  },
@@ -3916,27 +4129,19 @@ exports.Envelope = {
3916
4129
  return true;
3917
4130
  }
3918
4131
  },
3919
- dateValue: {
4132
+ flagName: {
4133
+ type: (0, electrodb_1.CustomAttributeType)("any"),
4134
+ required: true
4135
+ },
4136
+ setAt: {
3920
4137
  type: "number",
3921
4138
  required: true,
3922
4139
  validate: value => {
3923
4140
  if (typeof value === "number" && !Number.isInteger(value))
3924
- throw new Error("'dateValue' must be an integer");
4141
+ throw new Error("'setAt' must be an integer");
3925
4142
  return true;
3926
4143
  }
3927
4144
  },
3928
- dateRaw: {
3929
- type: "string",
3930
- required: true
3931
- },
3932
- subject: {
3933
- type: "string",
3934
- required: false
3935
- },
3936
- messageIdValue: {
3937
- type: "string",
3938
- required: false
3939
- },
3940
4145
  createdAt: {
3941
4146
  type: "number",
3942
4147
  readOnly: true,
@@ -3960,15 +4165,15 @@ exports.Envelope = {
3960
4165
  },
3961
4166
  sk: {
3962
4167
  field: "gsi2sk",
3963
- composite: ["envelopeId"]
4168
+ composite: ["messageFlagId"]
3964
4169
  },
3965
4170
  index: "gsi2",
3966
4171
  collection: "messageData"
3967
4172
  },
3968
- Envelope: {
4173
+ MessageFlag: {
3969
4174
  pk: {
3970
4175
  field: "pk",
3971
- composite: ["envelopeId"]
4176
+ composite: ["messageFlagId"]
3972
4177
  },
3973
4178
  sk: {
3974
4179
  field: "sk",
@@ -3977,79 +4182,72 @@ exports.Envelope = {
3977
4182
  }
3978
4183
  },
3979
4184
  model: {
3980
- entity: "envelope",
4185
+ entity: "messageFlag",
3981
4186
  service: "remit",
3982
4187
  version: "1"
3983
4188
  }
3984
4189
  };
3985
- exports.SenderSignerStanding = {
4190
+ exports.MessagePlacementMove = {
3986
4191
  attributes: {
3987
- accountConfigId: {
4192
+ messageId: {
3988
4193
  type: "string",
3989
4194
  required: true,
3990
4195
  validate: value => {
3991
4196
  if (typeof value === "string" && value.length < 25)
3992
- throw new Error("'accountConfigId' must be at least 25 characters");
4197
+ throw new Error("'messageId' must be at least 25 characters");
3993
4198
  if (typeof value === "string" && value.length > 25)
3994
- throw new Error("'accountConfigId' must be at most 25 characters");
4199
+ throw new Error("'messageId' must be at most 25 characters");
3995
4200
  return true;
3996
4201
  }
3997
4202
  },
3998
- senderKey: {
4203
+ accountId: {
3999
4204
  type: "string",
4000
4205
  required: true,
4001
4206
  validate: value => {
4002
- if (typeof value === "string" && value.length > 256)
4003
- throw new Error("'senderKey' must be at most 256 characters");
4207
+ if (typeof value === "string" && value.length < 25)
4208
+ throw new Error("'accountId' must be at least 25 characters");
4209
+ if (typeof value === "string" && value.length > 25)
4210
+ throw new Error("'accountId' must be at most 25 characters");
4004
4211
  return true;
4005
4212
  }
4006
4213
  },
4007
- signerDomain: {
4214
+ accountConfigId: {
4008
4215
  type: "string",
4009
4216
  required: true,
4010
4217
  validate: value => {
4011
- if (typeof value === "string" && value.length > 256)
4012
- throw new Error("'signerDomain' must be at most 256 characters");
4013
- return true;
4014
- }
4015
- },
4016
- messageCount: {
4017
- type: "number",
4018
- required: true,
4019
- default: 0,
4020
- validate: value => {
4021
- if (typeof value === "number" && !Number.isInteger(value))
4022
- throw new Error("'messageCount' must be an integer");
4218
+ if (typeof value === "string" && value.length < 25)
4219
+ throw new Error("'accountConfigId' must be at least 25 characters");
4220
+ if (typeof value === "string" && value.length > 25)
4221
+ throw new Error("'accountConfigId' must be at most 25 characters");
4023
4222
  return true;
4024
4223
  }
4025
4224
  },
4026
- firstSeenAt: {
4027
- type: "number",
4225
+ sourceMailboxId: {
4226
+ type: "string",
4028
4227
  required: true,
4029
4228
  validate: value => {
4030
- if (typeof value === "number" && !Number.isInteger(value))
4031
- throw new Error("'firstSeenAt' must be an integer");
4229
+ if (typeof value === "string" && value.length < 25)
4230
+ throw new Error("'sourceMailboxId' must be at least 25 characters");
4231
+ if (typeof value === "string" && value.length > 25)
4232
+ throw new Error("'sourceMailboxId' must be at most 25 characters");
4032
4233
  return true;
4033
4234
  }
4034
4235
  },
4035
- lastSeenAt: {
4036
- type: "number",
4236
+ destinationMailboxId: {
4237
+ type: "string",
4037
4238
  required: true,
4038
4239
  validate: value => {
4039
- if (typeof value === "number" && !Number.isInteger(value))
4040
- throw new Error("'lastSeenAt' must be an integer");
4240
+ if (typeof value === "string" && value.length < 25)
4241
+ throw new Error("'destinationMailboxId' must be at least 25 characters");
4242
+ if (typeof value === "string" && value.length > 25)
4243
+ throw new Error("'destinationMailboxId' must be at most 25 characters");
4041
4244
  return true;
4042
4245
  }
4043
4246
  },
4044
- userAffirmedAt: {
4045
- type: "number",
4247
+ state: {
4248
+ type: ["pending", "queued", "processing", "processed"],
4046
4249
  required: true,
4047
- default: 0,
4048
- validate: value => {
4049
- if (typeof value === "number" && !Number.isInteger(value))
4050
- throw new Error("'userAffirmedAt' must be an integer");
4051
- return true;
4052
- }
4250
+ default: "pending"
4053
4251
  },
4054
4252
  createdAt: {
4055
4253
  type: "number",
@@ -4067,71 +4265,93 @@ exports.SenderSignerStanding = {
4067
4265
  }
4068
4266
  },
4069
4267
  indexes: {
4070
- SenderSignerStanding: {
4268
+ byAccountId: {
4269
+ pk: {
4270
+ field: "gsi0pk",
4271
+ composite: ["accountId"]
4272
+ },
4273
+ sk: {
4274
+ field: "gsi0sk",
4275
+ composite: ["messageId"]
4276
+ },
4277
+ index: "gsi0"
4278
+ },
4279
+ MessagePlacementMove: {
4071
4280
  pk: {
4072
4281
  field: "pk",
4073
- composite: ["accountConfigId"]
4282
+ composite: ["messageId"]
4074
4283
  },
4075
4284
  sk: {
4076
4285
  field: "sk",
4077
- composite: ["senderKey", "signerDomain"]
4286
+ composite: []
4078
4287
  }
4079
4288
  }
4080
4289
  },
4081
4290
  model: {
4082
- entity: "senderSignerStanding",
4291
+ entity: "messagePlacementMove",
4083
4292
  service: "remit",
4084
4293
  version: "1"
4085
4294
  }
4086
4295
  };
4087
- exports.BodyPartParameter = {
4296
+ exports.MessageFlagPush = {
4088
4297
  attributes: {
4089
- bodyPartParameterId: {
4298
+ messageId: {
4090
4299
  type: "string",
4091
4300
  required: true,
4092
4301
  validate: value => {
4093
4302
  if (typeof value === "string" && value.length < 25)
4094
- throw new Error("'bodyPartParameterId' must be at least 25 characters");
4303
+ throw new Error("'messageId' must be at least 25 characters");
4095
4304
  if (typeof value === "string" && value.length > 25)
4096
- throw new Error("'bodyPartParameterId' must be at most 25 characters");
4305
+ throw new Error("'messageId' must be at most 25 characters");
4097
4306
  return true;
4098
4307
  }
4099
4308
  },
4100
- messageId: {
4309
+ flagName: {
4310
+ type: "string",
4311
+ required: true
4312
+ },
4313
+ accountId: {
4101
4314
  type: "string",
4102
4315
  required: true,
4103
4316
  validate: value => {
4104
4317
  if (typeof value === "string" && value.length < 25)
4105
- throw new Error("'messageId' must be at least 25 characters");
4318
+ throw new Error("'accountId' must be at least 25 characters");
4106
4319
  if (typeof value === "string" && value.length > 25)
4107
- throw new Error("'messageId' must be at most 25 characters");
4320
+ throw new Error("'accountId' must be at most 25 characters");
4108
4321
  return true;
4109
4322
  }
4110
4323
  },
4111
- bodyPartId: {
4324
+ accountConfigId: {
4112
4325
  type: "string",
4113
4326
  required: true,
4114
4327
  validate: value => {
4115
4328
  if (typeof value === "string" && value.length < 25)
4116
- throw new Error("'bodyPartId' must be at least 25 characters");
4329
+ throw new Error("'accountConfigId' must be at least 25 characters");
4117
4330
  if (typeof value === "string" && value.length > 25)
4118
- throw new Error("'bodyPartId' must be at most 25 characters");
4331
+ throw new Error("'accountConfigId' must be at most 25 characters");
4119
4332
  return true;
4120
4333
  }
4121
4334
  },
4122
- parameterName: {
4335
+ mailboxId: {
4123
4336
  type: "string",
4124
4337
  required: true,
4125
4338
  validate: value => {
4126
- if (typeof value === "string" && value.length < 1)
4127
- throw new Error("'parameterName' must be at least 1 characters");
4339
+ if (typeof value === "string" && value.length < 25)
4340
+ throw new Error("'mailboxId' must be at least 25 characters");
4341
+ if (typeof value === "string" && value.length > 25)
4342
+ throw new Error("'mailboxId' must be at most 25 characters");
4128
4343
  return true;
4129
4344
  }
4130
4345
  },
4131
- parameterValue: {
4132
- type: "string",
4346
+ operation: {
4347
+ type: ["add", "remove"],
4133
4348
  required: true
4134
4349
  },
4350
+ state: {
4351
+ type: ["pending", "queued", "processing", "processed"],
4352
+ required: true,
4353
+ default: "pending"
4354
+ },
4135
4355
  createdAt: {
4136
4356
  type: "number",
4137
4357
  readOnly: true,
@@ -4148,114 +4368,89 @@ exports.BodyPartParameter = {
4148
4368
  }
4149
4369
  },
4150
4370
  indexes: {
4151
- byMessageId: {
4371
+ byMailboxId: {
4152
4372
  pk: {
4153
- field: "gsi2pk",
4154
- composite: ["messageId"]
4373
+ field: "gsi1pk",
4374
+ composite: ["mailboxId"]
4155
4375
  },
4156
4376
  sk: {
4157
- field: "gsi2sk",
4158
- composite: ["bodyPartParameterId"]
4377
+ field: "gsi1sk",
4378
+ composite: ["messageId", "flagName"]
4159
4379
  },
4160
- index: "gsi2",
4161
- collection: "messageData"
4380
+ index: "gsi1"
4162
4381
  },
4163
- BodyPartParameter: {
4382
+ byAccountId: {
4383
+ pk: {
4384
+ field: "gsi0pk",
4385
+ composite: ["accountId"]
4386
+ },
4387
+ sk: {
4388
+ field: "gsi0sk",
4389
+ composite: ["messageId", "flagName"]
4390
+ },
4391
+ index: "gsi0"
4392
+ },
4393
+ MessageFlagPush: {
4164
4394
  pk: {
4165
4395
  field: "pk",
4166
- composite: ["bodyPartParameterId"]
4396
+ composite: ["messageId"]
4167
4397
  },
4168
4398
  sk: {
4169
4399
  field: "sk",
4170
- composite: []
4400
+ composite: ["flagName"]
4171
4401
  }
4172
4402
  }
4173
4403
  },
4174
4404
  model: {
4175
- entity: "bodyPartParameter",
4405
+ entity: "messageFlagPush",
4176
4406
  service: "remit",
4177
4407
  version: "1"
4178
4408
  }
4179
4409
  };
4180
- exports.RawMessageStorage = {
4410
+ exports.Envelope = {
4181
4411
  attributes: {
4182
- rawStorageId: {
4183
- type: "string",
4184
- required: true,
4185
- validate: value => {
4186
- if (typeof value === "string" && value.length < 25)
4187
- throw new Error("'rawStorageId' must be at least 25 characters");
4188
- if (typeof value === "string" && value.length > 25)
4189
- throw new Error("'rawStorageId' must be at most 25 characters");
4190
- return true;
4191
- }
4192
- },
4193
- messageId: {
4194
- type: "string",
4195
- required: true,
4196
- validate: value => {
4197
- if (typeof value === "string" && value.length < 25)
4198
- throw new Error("'messageId' must be at least 25 characters");
4199
- if (typeof value === "string" && value.length > 25)
4200
- throw new Error("'messageId' must be at most 25 characters");
4201
- return true;
4202
- }
4203
- },
4204
- storageType: {
4205
- type: ["s3", "filesystem", "inline", "database"],
4206
- required: true
4207
- },
4208
- storageLocation: {
4209
- type: "string",
4210
- required: true
4211
- },
4212
- storageKey: {
4412
+ envelopeId: {
4213
4413
  type: "string",
4214
- required: true
4215
- },
4216
- sizeBytes: {
4217
- type: "number",
4218
4414
  required: true,
4219
4415
  validate: value => {
4220
- if (typeof value === "number" && value < 0)
4221
- throw new Error("'sizeBytes' must be at least 0");
4222
- if (typeof value === "number" && !Number.isInteger(value))
4223
- throw new Error("'sizeBytes' must be an integer");
4416
+ if (typeof value === "string" && value.length < 25)
4417
+ throw new Error("'envelopeId' must be at least 25 characters");
4418
+ if (typeof value === "string" && value.length > 25)
4419
+ throw new Error("'envelopeId' must be at most 25 characters");
4224
4420
  return true;
4225
4421
  }
4226
4422
  },
4227
- checksumSha256: {
4423
+ messageId: {
4228
4424
  type: "string",
4229
4425
  required: true,
4230
4426
  validate: value => {
4231
- if (typeof value === "string" && value.length < 64)
4232
- throw new Error("'checksumSha256' must be at least 64 characters");
4233
- if (typeof value === "string" && value.length > 64)
4234
- throw new Error("'checksumSha256' must be at most 64 characters");
4427
+ if (typeof value === "string" && value.length < 25)
4428
+ throw new Error("'messageId' must be at least 25 characters");
4429
+ if (typeof value === "string" && value.length > 25)
4430
+ throw new Error("'messageId' must be at most 25 characters");
4235
4431
  return true;
4236
4432
  }
4237
4433
  },
4238
- contentEncoding: {
4239
- type: ["none", "gzip", "zstd"],
4240
- required: true
4241
- },
4242
- storedAt: {
4434
+ dateValue: {
4243
4435
  type: "number",
4244
4436
  required: true,
4245
4437
  validate: value => {
4246
4438
  if (typeof value === "number" && !Number.isInteger(value))
4247
- throw new Error("'storedAt' must be an integer");
4439
+ throw new Error("'dateValue' must be an integer");
4248
4440
  return true;
4249
4441
  }
4250
4442
  },
4251
- expiresAt: {
4252
- type: "number",
4253
- required: false,
4254
- validate: value => {
4255
- if (typeof value === "number" && !Number.isInteger(value))
4256
- throw new Error("'expiresAt' must be an integer");
4257
- return true;
4258
- }
4443
+ dateRaw: {
4444
+ type: "string",
4445
+ required: true
4446
+ },
4447
+ subject: {
4448
+ type: "string",
4449
+ required: false
4450
+ },
4451
+ messageIdValue: {
4452
+ type: "string",
4453
+ required: false
4259
4454
  },
4260
4455
  createdAt: {
4261
4456
  type: "number",
@@ -4280,15 +4475,15 @@ exports.RawMessageStorage = {
4280
4475
  },
4281
4476
  sk: {
4282
4477
  field: "gsi2sk",
4283
- composite: ["rawStorageId"]
4478
+ composite: ["envelopeId"]
4284
4479
  },
4285
4480
  index: "gsi2",
4286
4481
  collection: "messageData"
4287
4482
  },
4288
- RawMessageStorage: {
4483
+ Envelope: {
4289
4484
  pk: {
4290
4485
  field: "pk",
4291
- composite: ["rawStorageId"]
4486
+ composite: ["envelopeId"]
4292
4487
  },
4293
4488
  sk: {
4294
4489
  field: "sk",
@@ -4297,98 +4492,77 @@ exports.RawMessageStorage = {
4297
4492
  }
4298
4493
  },
4299
4494
  model: {
4300
- entity: "rawMessageStorage",
4495
+ entity: "envelope",
4301
4496
  service: "remit",
4302
4497
  version: "1"
4303
4498
  }
4304
4499
  };
4305
- exports.BodyPartStorage = {
4500
+ exports.SenderSignerStanding = {
4306
4501
  attributes: {
4307
- bodyPartStorageId: {
4502
+ accountConfigId: {
4308
4503
  type: "string",
4309
4504
  required: true,
4310
4505
  validate: value => {
4311
4506
  if (typeof value === "string" && value.length < 25)
4312
- throw new Error("'bodyPartStorageId' must be at least 25 characters");
4507
+ throw new Error("'accountConfigId' must be at least 25 characters");
4313
4508
  if (typeof value === "string" && value.length > 25)
4314
- throw new Error("'bodyPartStorageId' must be at most 25 characters");
4509
+ throw new Error("'accountConfigId' must be at most 25 characters");
4315
4510
  return true;
4316
4511
  }
4317
4512
  },
4318
- messageId: {
4513
+ senderKey: {
4319
4514
  type: "string",
4320
4515
  required: true,
4321
4516
  validate: value => {
4322
- if (typeof value === "string" && value.length < 25)
4323
- throw new Error("'messageId' must be at least 25 characters");
4324
- if (typeof value === "string" && value.length > 25)
4325
- throw new Error("'messageId' must be at most 25 characters");
4517
+ if (typeof value === "string" && value.length > 256)
4518
+ throw new Error("'senderKey' must be at most 256 characters");
4326
4519
  return true;
4327
4520
  }
4328
4521
  },
4329
- bodyPartId: {
4522
+ signerDomain: {
4330
4523
  type: "string",
4331
4524
  required: true,
4332
4525
  validate: value => {
4333
- if (typeof value === "string" && value.length < 25)
4334
- throw new Error("'bodyPartId' must be at least 25 characters");
4335
- if (typeof value === "string" && value.length > 25)
4336
- throw new Error("'bodyPartId' must be at most 25 characters");
4526
+ if (typeof value === "string" && value.length > 256)
4527
+ throw new Error("'signerDomain' must be at most 256 characters");
4337
4528
  return true;
4338
4529
  }
4339
4530
  },
4340
- storageType: {
4341
- type: ["s3", "filesystem", "inline", "database"],
4342
- required: true
4343
- },
4344
- storageLocation: {
4345
- type: "string",
4346
- required: true
4347
- },
4348
- storageKey: {
4349
- type: "string",
4350
- required: true
4351
- },
4352
- decodedSizeBytes: {
4531
+ messageCount: {
4353
4532
  type: "number",
4354
4533
  required: true,
4534
+ default: 0,
4355
4535
  validate: value => {
4356
- if (typeof value === "number" && value < 0)
4357
- throw new Error("'decodedSizeBytes' must be at least 0");
4358
4536
  if (typeof value === "number" && !Number.isInteger(value))
4359
- throw new Error("'decodedSizeBytes' must be an integer");
4537
+ throw new Error("'messageCount' must be an integer");
4360
4538
  return true;
4361
4539
  }
4362
4540
  },
4363
- checksumSha256: {
4364
- type: "string",
4541
+ firstSeenAt: {
4542
+ type: "number",
4365
4543
  required: true,
4366
4544
  validate: value => {
4367
- if (typeof value === "string" && value.length < 64)
4368
- throw new Error("'checksumSha256' must be at least 64 characters");
4369
- if (typeof value === "string" && value.length > 64)
4370
- throw new Error("'checksumSha256' must be at most 64 characters");
4545
+ if (typeof value === "number" && !Number.isInteger(value))
4546
+ throw new Error("'firstSeenAt' must be an integer");
4371
4547
  return true;
4372
4548
  }
4373
4549
  },
4374
- contentEncoding: {
4375
- type: ["none", "gzip", "zstd"],
4376
- required: true
4377
- },
4378
- isDeduped: {
4379
- type: "boolean",
4380
- required: true
4381
- },
4382
- dedupHash: {
4383
- type: "string",
4384
- required: false
4550
+ lastSeenAt: {
4551
+ type: "number",
4552
+ required: true,
4553
+ validate: value => {
4554
+ if (typeof value === "number" && !Number.isInteger(value))
4555
+ throw new Error("'lastSeenAt' must be an integer");
4556
+ return true;
4557
+ }
4385
4558
  },
4386
- storedAt: {
4559
+ userAffirmedAt: {
4387
4560
  type: "number",
4388
4561
  required: true,
4562
+ default: 0,
4389
4563
  validate: value => {
4390
4564
  if (typeof value === "number" && !Number.isInteger(value))
4391
- throw new Error("'storedAt' must be an integer");
4565
+ throw new Error("'userAffirmedAt' must be an integer");
4392
4566
  return true;
4393
4567
  }
4394
4568
  },
@@ -4408,45 +4582,33 @@ exports.BodyPartStorage = {
4408
4582
  }
4409
4583
  },
4410
4584
  indexes: {
4411
- byMessageId: {
4412
- pk: {
4413
- field: "gsi2pk",
4414
- composite: ["messageId"]
4415
- },
4416
- sk: {
4417
- field: "gsi2sk",
4418
- composite: ["bodyPartStorageId"]
4419
- },
4420
- index: "gsi2",
4421
- collection: "messageData"
4422
- },
4423
- BodyPartStorage: {
4585
+ SenderSignerStanding: {
4424
4586
  pk: {
4425
4587
  field: "pk",
4426
- composite: ["bodyPartStorageId"]
4588
+ composite: ["accountConfigId"]
4427
4589
  },
4428
4590
  sk: {
4429
4591
  field: "sk",
4430
- composite: []
4592
+ composite: ["senderKey", "signerDomain"]
4431
4593
  }
4432
4594
  }
4433
4595
  },
4434
4596
  model: {
4435
- entity: "bodyPartStorage",
4597
+ entity: "senderSignerStanding",
4436
4598
  service: "remit",
4437
4599
  version: "1"
4438
4600
  }
4439
4601
  };
4440
- exports.BodyPartContent = {
4602
+ exports.BodyPartParameter = {
4441
4603
  attributes: {
4442
- bodyPartContentId: {
4604
+ bodyPartParameterId: {
4443
4605
  type: "string",
4444
4606
  required: true,
4445
4607
  validate: value => {
4446
4608
  if (typeof value === "string" && value.length < 25)
4447
- throw new Error("'bodyPartContentId' must be at least 25 characters");
4609
+ throw new Error("'bodyPartParameterId' must be at least 25 characters");
4448
4610
  if (typeof value === "string" && value.length > 25)
4449
- throw new Error("'bodyPartContentId' must be at most 25 characters");
4611
+ throw new Error("'bodyPartParameterId' must be at most 25 characters");
4450
4612
  return true;
4451
4613
  }
4452
4614
  },
@@ -4472,21 +4634,19 @@ exports.BodyPartContent = {
4472
4634
  return true;
4473
4635
  }
4474
4636
  },
4475
- content: {
4637
+ parameterName: {
4476
4638
  type: "string",
4477
- required: true
4478
- },
4479
- contentLength: {
4480
- type: "number",
4481
4639
  required: true,
4482
4640
  validate: value => {
4483
- if (typeof value === "number" && value < 0)
4484
- throw new Error("'contentLength' must be at least 0");
4485
- if (typeof value === "number" && !Number.isInteger(value))
4486
- throw new Error("'contentLength' must be an integer");
4641
+ if (typeof value === "string" && value.length < 1)
4642
+ throw new Error("'parameterName' must be at least 1 characters");
4487
4643
  return true;
4488
4644
  }
4489
4645
  },
4646
+ parameterValue: {
4647
+ type: "string",
4648
+ required: true
4649
+ },
4490
4650
  createdAt: {
4491
4651
  type: "number",
4492
4652
  readOnly: true,
@@ -4510,15 +4670,15 @@ exports.BodyPartContent = {
4510
4670
  },
4511
4671
  sk: {
4512
4672
  field: "gsi2sk",
4513
- composite: ["bodyPartContentId"]
4673
+ composite: ["bodyPartParameterId"]
4514
4674
  },
4515
4675
  index: "gsi2",
4516
4676
  collection: "messageData"
4517
4677
  },
4518
- BodyPartContent: {
4678
+ BodyPartParameter: {
4519
4679
  pk: {
4520
4680
  field: "pk",
4521
- composite: ["bodyPartContentId"]
4681
+ composite: ["bodyPartParameterId"]
4522
4682
  },
4523
4683
  sk: {
4524
4684
  field: "sk",
@@ -4527,85 +4687,88 @@ exports.BodyPartContent = {
4527
4687
  }
4528
4688
  },
4529
4689
  model: {
4530
- entity: "bodyPartContent",
4690
+ entity: "bodyPartParameter",
4531
4691
  service: "remit",
4532
4692
  version: "1"
4533
4693
  }
4534
4694
  };
4535
- exports.CalendarCollection = {
4695
+ exports.RawMessageStorage = {
4536
4696
  attributes: {
4537
- calendarId: {
4697
+ rawStorageId: {
4538
4698
  type: "string",
4539
4699
  required: true,
4540
4700
  validate: value => {
4541
4701
  if (typeof value === "string" && value.length < 25)
4542
- throw new Error("'calendarId' must be at least 25 characters");
4702
+ throw new Error("'rawStorageId' must be at least 25 characters");
4543
4703
  if (typeof value === "string" && value.length > 25)
4544
- throw new Error("'calendarId' must be at most 25 characters");
4704
+ throw new Error("'rawStorageId' must be at most 25 characters");
4545
4705
  return true;
4546
4706
  }
4547
4707
  },
4548
- accountConfigId: {
4708
+ messageId: {
4549
4709
  type: "string",
4550
4710
  required: true,
4551
4711
  validate: value => {
4552
4712
  if (typeof value === "string" && value.length < 25)
4553
- throw new Error("'accountConfigId' must be at least 25 characters");
4713
+ throw new Error("'messageId' must be at least 25 characters");
4554
4714
  if (typeof value === "string" && value.length > 25)
4555
- throw new Error("'accountConfigId' must be at most 25 characters");
4715
+ throw new Error("'messageId' must be at most 25 characters");
4556
4716
  return true;
4557
4717
  }
4558
4718
  },
4559
- urlSegment: {
4719
+ storageType: {
4720
+ type: ["s3", "filesystem", "inline", "database"],
4721
+ required: true
4722
+ },
4723
+ storageLocation: {
4724
+ type: "string",
4725
+ required: true
4726
+ },
4727
+ storageKey: {
4560
4728
  type: "string",
4729
+ required: true
4730
+ },
4731
+ sizeBytes: {
4732
+ type: "number",
4561
4733
  required: true,
4562
4734
  validate: value => {
4563
- if (typeof value === "string" && value.length > 64)
4564
- throw new Error("'urlSegment' must be at most 64 characters");
4735
+ if (typeof value === "number" && value < 0)
4736
+ throw new Error("'sizeBytes' must be at least 0");
4737
+ if (typeof value === "number" && !Number.isInteger(value))
4738
+ throw new Error("'sizeBytes' must be an integer");
4565
4739
  return true;
4566
4740
  }
4567
4741
  },
4568
- displayName: {
4742
+ checksumSha256: {
4569
4743
  type: "string",
4570
4744
  required: true,
4571
4745
  validate: value => {
4572
- if (typeof value === "string" && value.length > 140)
4573
- throw new Error("'displayName' must be at most 140 characters");
4746
+ if (typeof value === "string" && value.length < 64)
4747
+ throw new Error("'checksumSha256' must be at least 64 characters");
4748
+ if (typeof value === "string" && value.length > 64)
4749
+ throw new Error("'checksumSha256' must be at most 64 characters");
4574
4750
  return true;
4575
4751
  }
4576
4752
  },
4577
- color: {
4578
- type: ["Cal1", "Cal2", "Cal3", "Cal4", "Cal5", "Cal6"],
4579
- required: true,
4580
- default: "Cal1"
4581
- },
4582
- componentSet: {
4583
- type: ["VeventOnly"],
4584
- required: true,
4585
- default: "VeventOnly"
4586
- },
4587
- source: {
4588
- type: ["Default", "UserCreated", "MailDerived"],
4589
- required: true,
4590
- default: "UserCreated"
4753
+ contentEncoding: {
4754
+ type: ["none", "gzip", "zstd"],
4755
+ required: true
4591
4756
  },
4592
- timezone: {
4593
- type: "string",
4757
+ storedAt: {
4758
+ type: "number",
4594
4759
  required: true,
4595
- default: "",
4596
4760
  validate: value => {
4597
- if (typeof value === "string" && value.length > 64)
4598
- throw new Error("'timezone' must be at most 64 characters");
4761
+ if (typeof value === "number" && !Number.isInteger(value))
4762
+ throw new Error("'storedAt' must be an integer");
4599
4763
  return true;
4600
4764
  }
4601
4765
  },
4602
- syncSequence: {
4766
+ expiresAt: {
4603
4767
  type: "number",
4604
- required: true,
4605
- default: 0,
4768
+ required: false,
4606
4769
  validate: value => {
4607
4770
  if (typeof value === "number" && !Number.isInteger(value))
4608
- throw new Error("'syncSequence' must be an integer");
4771
+ throw new Error("'expiresAt' must be an integer");
4609
4772
  return true;
4610
4773
  }
4611
4774
  },
@@ -4625,168 +4788,217 @@ exports.CalendarCollection = {
4625
4788
  }
4626
4789
  },
4627
4790
  indexes: {
4628
- byUrlSegment: {
4791
+ byMessageId: {
4629
4792
  pk: {
4630
- field: "gsi0pk",
4631
- composite: ["accountConfigId"]
4793
+ field: "gsi2pk",
4794
+ composite: ["messageId"]
4632
4795
  },
4633
4796
  sk: {
4634
- field: "gsi0sk",
4635
- composite: ["urlSegment"]
4797
+ field: "gsi2sk",
4798
+ composite: ["rawStorageId"]
4636
4799
  },
4637
- index: "gsi0"
4800
+ index: "gsi2",
4801
+ collection: "messageData"
4638
4802
  },
4639
- Calendar: {
4803
+ RawMessageStorage: {
4640
4804
  pk: {
4641
4805
  field: "pk",
4642
- composite: ["accountConfigId"]
4806
+ composite: ["rawStorageId"]
4643
4807
  },
4644
4808
  sk: {
4645
4809
  field: "sk",
4646
- composite: ["calendarId"]
4810
+ composite: []
4647
4811
  }
4648
4812
  }
4649
4813
  },
4650
4814
  model: {
4651
- entity: "calendar",
4815
+ entity: "rawMessageStorage",
4652
4816
  service: "remit",
4653
4817
  version: "1"
4654
4818
  }
4655
4819
  };
4656
- exports.CalendarObject = {
4820
+ exports.BodyPartStorage = {
4657
4821
  attributes: {
4658
- calendarObjectId: {
4822
+ bodyPartStorageId: {
4659
4823
  type: "string",
4660
4824
  required: true,
4661
4825
  validate: value => {
4662
4826
  if (typeof value === "string" && value.length < 25)
4663
- throw new Error("'calendarObjectId' must be at least 25 characters");
4827
+ throw new Error("'bodyPartStorageId' must be at least 25 characters");
4664
4828
  if (typeof value === "string" && value.length > 25)
4665
- throw new Error("'calendarObjectId' must be at most 25 characters");
4829
+ throw new Error("'bodyPartStorageId' must be at most 25 characters");
4666
4830
  return true;
4667
4831
  }
4668
4832
  },
4669
- calendarId: {
4833
+ messageId: {
4670
4834
  type: "string",
4671
4835
  required: true,
4672
4836
  validate: value => {
4673
4837
  if (typeof value === "string" && value.length < 25)
4674
- throw new Error("'calendarId' must be at least 25 characters");
4838
+ throw new Error("'messageId' must be at least 25 characters");
4675
4839
  if (typeof value === "string" && value.length > 25)
4676
- throw new Error("'calendarId' must be at most 25 characters");
4840
+ throw new Error("'messageId' must be at most 25 characters");
4677
4841
  return true;
4678
4842
  }
4679
4843
  },
4680
- resourceName: {
4844
+ bodyPartId: {
4681
4845
  type: "string",
4682
4846
  required: true,
4683
4847
  validate: value => {
4684
- if (typeof value === "string" && value.length > 256)
4685
- throw new Error("'resourceName' must be at most 256 characters");
4848
+ if (typeof value === "string" && value.length < 25)
4849
+ throw new Error("'bodyPartId' must be at least 25 characters");
4850
+ if (typeof value === "string" && value.length > 25)
4851
+ throw new Error("'bodyPartId' must be at most 25 characters");
4686
4852
  return true;
4687
4853
  }
4688
4854
  },
4689
- icalUid: {
4855
+ storageType: {
4856
+ type: ["s3", "filesystem", "inline", "database"],
4857
+ required: true
4858
+ },
4859
+ storageLocation: {
4860
+ type: "string",
4861
+ required: true
4862
+ },
4863
+ storageKey: {
4690
4864
  type: "string",
4865
+ required: true
4866
+ },
4867
+ decodedSizeBytes: {
4868
+ type: "number",
4691
4869
  required: true,
4692
4870
  validate: value => {
4693
- if (typeof value === "string" && value.length > 512)
4694
- throw new Error("'icalUid' must be at most 512 characters");
4871
+ if (typeof value === "number" && value < 0)
4872
+ throw new Error("'decodedSizeBytes' must be at least 0");
4873
+ if (typeof value === "number" && !Number.isInteger(value))
4874
+ throw new Error("'decodedSizeBytes' must be an integer");
4695
4875
  return true;
4696
4876
  }
4697
4877
  },
4698
- icalData: {
4699
- type: "string",
4700
- required: true
4701
- },
4702
- etag: {
4878
+ checksumSha256: {
4703
4879
  type: "string",
4704
4880
  required: true,
4705
4881
  validate: value => {
4882
+ if (typeof value === "string" && value.length < 64)
4883
+ throw new Error("'checksumSha256' must be at least 64 characters");
4706
4884
  if (typeof value === "string" && value.length > 64)
4707
- throw new Error("'etag' must be at most 64 characters");
4885
+ throw new Error("'checksumSha256' must be at most 64 characters");
4708
4886
  return true;
4709
4887
  }
4710
4888
  },
4711
- sequence: {
4889
+ contentEncoding: {
4890
+ type: ["none", "gzip", "zstd"],
4891
+ required: true
4892
+ },
4893
+ isDeduped: {
4894
+ type: "boolean",
4895
+ required: true
4896
+ },
4897
+ dedupHash: {
4898
+ type: "string",
4899
+ required: false
4900
+ },
4901
+ storedAt: {
4712
4902
  type: "number",
4713
4903
  required: true,
4714
- default: 0,
4715
4904
  validate: value => {
4716
4905
  if (typeof value === "number" && !Number.isInteger(value))
4717
- throw new Error("'sequence' must be an integer");
4906
+ throw new Error("'storedAt' must be an integer");
4718
4907
  return true;
4719
4908
  }
4720
4909
  },
4721
- syncSequence: {
4910
+ createdAt: {
4722
4911
  type: "number",
4912
+ readOnly: true,
4723
4913
  required: true,
4724
- default: 0,
4725
- validate: value => {
4726
- if (typeof value === "number" && !Number.isInteger(value))
4727
- throw new Error("'syncSequence' must be an integer");
4728
- return true;
4729
- }
4914
+ default: () => Date.now(),
4915
+ set: () => Date.now()
4730
4916
  },
4731
- summary: {
4917
+ updatedAt: {
4918
+ type: "number",
4919
+ watch: "*",
4920
+ required: true,
4921
+ default: () => Date.now(),
4922
+ set: () => Date.now()
4923
+ }
4924
+ },
4925
+ indexes: {
4926
+ byMessageId: {
4927
+ pk: {
4928
+ field: "gsi2pk",
4929
+ composite: ["messageId"]
4930
+ },
4931
+ sk: {
4932
+ field: "gsi2sk",
4933
+ composite: ["bodyPartStorageId"]
4934
+ },
4935
+ index: "gsi2",
4936
+ collection: "messageData"
4937
+ },
4938
+ BodyPartStorage: {
4939
+ pk: {
4940
+ field: "pk",
4941
+ composite: ["bodyPartStorageId"]
4942
+ },
4943
+ sk: {
4944
+ field: "sk",
4945
+ composite: []
4946
+ }
4947
+ }
4948
+ },
4949
+ model: {
4950
+ entity: "bodyPartStorage",
4951
+ service: "remit",
4952
+ version: "1"
4953
+ }
4954
+ };
4955
+ exports.BodyPartContent = {
4956
+ attributes: {
4957
+ bodyPartContentId: {
4732
4958
  type: "string",
4733
4959
  required: true,
4734
4960
  validate: value => {
4735
- if (typeof value === "string" && value.length > 512)
4736
- throw new Error("'summary' must be at most 512 characters");
4961
+ if (typeof value === "string" && value.length < 25)
4962
+ throw new Error("'bodyPartContentId' must be at least 25 characters");
4963
+ if (typeof value === "string" && value.length > 25)
4964
+ throw new Error("'bodyPartContentId' must be at most 25 characters");
4737
4965
  return true;
4738
4966
  }
4739
4967
  },
4740
- dtStart: {
4968
+ messageId: {
4741
4969
  type: "string",
4742
4970
  required: true,
4743
4971
  validate: value => {
4744
- if (typeof value === "string" && value.length > 64)
4745
- throw new Error("'dtStart' must be at most 64 characters");
4972
+ if (typeof value === "string" && value.length < 25)
4973
+ throw new Error("'messageId' must be at least 25 characters");
4974
+ if (typeof value === "string" && value.length > 25)
4975
+ throw new Error("'messageId' must be at most 25 characters");
4746
4976
  return true;
4747
4977
  }
4748
4978
  },
4749
- dtEnd: {
4979
+ bodyPartId: {
4750
4980
  type: "string",
4751
4981
  required: true,
4752
4982
  validate: value => {
4753
- if (typeof value === "string" && value.length > 64)
4754
- throw new Error("'dtEnd' must be at most 64 characters");
4983
+ if (typeof value === "string" && value.length < 25)
4984
+ throw new Error("'bodyPartId' must be at least 25 characters");
4985
+ if (typeof value === "string" && value.length > 25)
4986
+ throw new Error("'bodyPartId' must be at most 25 characters");
4755
4987
  return true;
4756
4988
  }
4757
4989
  },
4758
- allDay: {
4759
- type: "boolean",
4760
- required: true,
4761
- default: false
4762
- },
4763
- zoneCertainty: {
4764
- type: ["Local", "Explicit", "Ambiguous"],
4765
- required: true,
4766
- default: "Explicit"
4767
- },
4768
- status: {
4769
- type: ["Confirmed", "Tentative", "Cancelled"],
4770
- required: true,
4771
- default: "Confirmed"
4772
- },
4773
- transparency: {
4774
- type: ["Opaque", "Transparent"],
4775
- required: true,
4776
- default: "Opaque"
4777
- },
4778
- hasRecurrence: {
4779
- type: "boolean",
4780
- required: true,
4781
- default: false
4782
- },
4783
- expandedThrough: {
4990
+ content: {
4784
4991
  type: "string",
4992
+ required: true
4993
+ },
4994
+ contentLength: {
4995
+ type: "number",
4785
4996
  required: true,
4786
- default: "",
4787
4997
  validate: value => {
4788
- if (typeof value === "string" && value.length > 64)
4789
- throw new Error("'expandedThrough' must be at most 64 characters");
4998
+ if (typeof value === "number" && value < 0)
4999
+ throw new Error("'contentLength' must be at least 0");
5000
+ if (typeof value === "number" && !Number.isInteger(value))
5001
+ throw new Error("'contentLength' must be an integer");
4790
5002
  return true;
4791
5003
  }
4792
5004
  },
@@ -4806,41 +5018,31 @@ exports.CalendarObject = {
4806
5018
  }
4807
5019
  },
4808
5020
  indexes: {
4809
- bySyncSequence: {
4810
- pk: {
4811
- field: "gsi1pk",
4812
- composite: ["calendarId"]
4813
- },
4814
- sk: {
4815
- field: "gsi1sk",
4816
- composite: ["syncSequence"]
4817
- },
4818
- index: "gsi1"
4819
- },
4820
- byUid: {
5021
+ byMessageId: {
4821
5022
  pk: {
4822
- field: "gsi0pk",
4823
- composite: ["calendarId"]
5023
+ field: "gsi2pk",
5024
+ composite: ["messageId"]
4824
5025
  },
4825
5026
  sk: {
4826
- field: "gsi0sk",
4827
- composite: ["icalUid"]
5027
+ field: "gsi2sk",
5028
+ composite: ["bodyPartContentId"]
4828
5029
  },
4829
- index: "gsi0"
5030
+ index: "gsi2",
5031
+ collection: "messageData"
4830
5032
  },
4831
- CalendarObject: {
5033
+ BodyPartContent: {
4832
5034
  pk: {
4833
5035
  field: "pk",
4834
- composite: ["calendarId"]
5036
+ composite: ["bodyPartContentId"]
4835
5037
  },
4836
5038
  sk: {
4837
5039
  field: "sk",
4838
- composite: ["calendarObjectId"]
5040
+ composite: []
4839
5041
  }
4840
5042
  }
4841
5043
  },
4842
5044
  model: {
4843
- entity: "calendarObject",
5045
+ entity: "bodyPartContent",
4844
5046
  service: "remit",
4845
5047
  version: "1"
4846
5048
  }
@@ -4901,6 +5103,26 @@ exports.CalendarEventIndex = {
4901
5103
  required: true,
4902
5104
  default: false
4903
5105
  },
5106
+ summary: {
5107
+ type: "string",
5108
+ required: true,
5109
+ default: "",
5110
+ validate: value => {
5111
+ if (typeof value === "string" && value.length > 512)
5112
+ throw new Error("'summary' must be at most 512 characters");
5113
+ return true;
5114
+ }
5115
+ },
5116
+ status: {
5117
+ type: ["Confirmed", "Tentative", "Cancelled"],
5118
+ required: true,
5119
+ default: "Confirmed"
5120
+ },
5121
+ transparency: {
5122
+ type: ["Opaque", "Transparent"],
5123
+ required: true,
5124
+ default: "Opaque"
5125
+ },
4904
5126
  createdAt: {
4905
5127
  type: "number",
4906
5128
  readOnly: true,