@remit/electrodb-entities 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs 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.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;
3
+ exports.FilterAnchor = exports.MessageLabel = exports.CalendarFeedToken = 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: {
@@ -2831,6 +2831,11 @@ exports.Message = {
2831
2831
  required: true,
2832
2832
  default: "uncategorized"
2833
2833
  },
2834
+ classificationState: {
2835
+ type: ["NotExamined", "Examined"],
2836
+ required: true,
2837
+ default: "NotExamined"
2838
+ },
2834
2839
  authenticity: {
2835
2840
  type: "map",
2836
2841
  properties: {
@@ -5167,6 +5172,104 @@ exports.CalendarEventIndex = {
5167
5172
  version: "1"
5168
5173
  }
5169
5174
  };
5175
+ exports.CalendarFeedToken = {
5176
+ attributes: {
5177
+ feedTokenId: {
5178
+ type: "string",
5179
+ required: true,
5180
+ validate: value => {
5181
+ if (typeof value === "string" && value.length < 25)
5182
+ throw new Error("'feedTokenId' must be at least 25 characters");
5183
+ if (typeof value === "string" && value.length > 25)
5184
+ throw new Error("'feedTokenId' must be at most 25 characters");
5185
+ return true;
5186
+ }
5187
+ },
5188
+ accountConfigId: {
5189
+ type: "string",
5190
+ required: true,
5191
+ validate: value => {
5192
+ if (typeof value === "string" && value.length < 25)
5193
+ throw new Error("'accountConfigId' must be at least 25 characters");
5194
+ if (typeof value === "string" && value.length > 25)
5195
+ throw new Error("'accountConfigId' must be at most 25 characters");
5196
+ return true;
5197
+ }
5198
+ },
5199
+ calendarId: {
5200
+ type: "string",
5201
+ required: true,
5202
+ validate: value => {
5203
+ if (typeof value === "string" && value.length < 25)
5204
+ throw new Error("'calendarId' must be at least 25 characters");
5205
+ if (typeof value === "string" && value.length > 25)
5206
+ throw new Error("'calendarId' must be at most 25 characters");
5207
+ return true;
5208
+ }
5209
+ },
5210
+ tokenHash: {
5211
+ type: "string",
5212
+ required: true,
5213
+ validate: value => {
5214
+ if (typeof value === "string" && value.length > 64)
5215
+ throw new Error("'tokenHash' must be at most 64 characters");
5216
+ return true;
5217
+ }
5218
+ },
5219
+ createdAt: {
5220
+ type: "number",
5221
+ readOnly: true,
5222
+ required: true,
5223
+ default: () => Date.now(),
5224
+ set: () => Date.now()
5225
+ },
5226
+ rotatedAt: {
5227
+ type: "number",
5228
+ required: true,
5229
+ default: 0,
5230
+ validate: value => {
5231
+ if (typeof value === "number" && !Number.isInteger(value))
5232
+ throw new Error("'rotatedAt' must be an integer");
5233
+ return true;
5234
+ }
5235
+ },
5236
+ updatedAt: {
5237
+ type: "number",
5238
+ watch: "*",
5239
+ required: true,
5240
+ default: () => Date.now(),
5241
+ set: () => Date.now()
5242
+ }
5243
+ },
5244
+ indexes: {
5245
+ byTokenHash: {
5246
+ pk: {
5247
+ field: "gsi0pk",
5248
+ composite: ["tokenHash"]
5249
+ },
5250
+ sk: {
5251
+ field: "gsi0sk",
5252
+ composite: []
5253
+ },
5254
+ index: "gsi0"
5255
+ },
5256
+ CalendarFeedToken: {
5257
+ pk: {
5258
+ field: "pk",
5259
+ composite: ["accountConfigId"]
5260
+ },
5261
+ sk: {
5262
+ field: "sk",
5263
+ composite: ["feedTokenId"]
5264
+ }
5265
+ }
5266
+ },
5267
+ model: {
5268
+ entity: "calendarFeedToken",
5269
+ service: "remit",
5270
+ version: "1"
5271
+ }
5272
+ };
5170
5273
  exports.MessageLabel = {
5171
5274
  attributes: {
5172
5275
  messageLabelId: {
package/index.d.cts CHANGED
@@ -2175,6 +2175,11 @@ export declare const Message: {
2175
2175
  readonly required: true;
2176
2176
  readonly default: "uncategorized";
2177
2177
  };
2178
+ readonly classificationState: {
2179
+ readonly type: readonly ["NotExamined", "Examined"];
2180
+ readonly required: true;
2181
+ readonly default: "NotExamined";
2182
+ };
2178
2183
  readonly authenticity: {
2179
2184
  readonly type: "map";
2180
2185
  readonly properties: {
@@ -4021,6 +4026,78 @@ export declare const CalendarEventIndex: {
4021
4026
  readonly version: "1";
4022
4027
  };
4023
4028
  };
4029
+ export declare const CalendarFeedToken: {
4030
+ readonly attributes: {
4031
+ readonly feedTokenId: {
4032
+ readonly type: "string";
4033
+ readonly required: true;
4034
+ readonly validate: (value: unknown) => boolean;
4035
+ };
4036
+ readonly accountConfigId: {
4037
+ readonly type: "string";
4038
+ readonly required: true;
4039
+ readonly validate: (value: unknown) => boolean;
4040
+ };
4041
+ readonly calendarId: {
4042
+ readonly type: "string";
4043
+ readonly required: true;
4044
+ readonly validate: (value: unknown) => boolean;
4045
+ };
4046
+ readonly tokenHash: {
4047
+ readonly type: "string";
4048
+ readonly required: true;
4049
+ readonly validate: (value: unknown) => boolean;
4050
+ };
4051
+ readonly createdAt: {
4052
+ readonly type: "number";
4053
+ readonly readOnly: true;
4054
+ readonly required: true;
4055
+ readonly default: () => any;
4056
+ readonly set: () => any;
4057
+ };
4058
+ readonly rotatedAt: {
4059
+ readonly type: "number";
4060
+ readonly required: true;
4061
+ readonly default: 0;
4062
+ readonly validate: (value: unknown) => boolean;
4063
+ };
4064
+ readonly updatedAt: {
4065
+ readonly type: "number";
4066
+ readonly watch: "*";
4067
+ readonly required: true;
4068
+ readonly default: () => any;
4069
+ readonly set: () => any;
4070
+ };
4071
+ };
4072
+ readonly indexes: {
4073
+ readonly byTokenHash: {
4074
+ readonly pk: {
4075
+ readonly field: "gsi0pk";
4076
+ readonly composite: readonly ["tokenHash"];
4077
+ };
4078
+ readonly sk: {
4079
+ readonly field: "gsi0sk";
4080
+ readonly composite: readonly [];
4081
+ };
4082
+ readonly index: "gsi0";
4083
+ };
4084
+ readonly CalendarFeedToken: {
4085
+ readonly pk: {
4086
+ readonly field: "pk";
4087
+ readonly composite: readonly ["accountConfigId"];
4088
+ };
4089
+ readonly sk: {
4090
+ readonly field: "sk";
4091
+ readonly composite: readonly ["feedTokenId"];
4092
+ };
4093
+ };
4094
+ };
4095
+ readonly model: {
4096
+ readonly entity: "calendarFeedToken";
4097
+ readonly service: "remit";
4098
+ readonly version: "1";
4099
+ };
4100
+ };
4024
4101
  export declare const MessageLabel: {
4025
4102
  readonly attributes: {
4026
4103
  readonly messageLabelId: {
package/index.d.mts CHANGED
@@ -2175,6 +2175,11 @@ export declare const Message: {
2175
2175
  readonly required: true;
2176
2176
  readonly default: "uncategorized";
2177
2177
  };
2178
+ readonly classificationState: {
2179
+ readonly type: readonly ["NotExamined", "Examined"];
2180
+ readonly required: true;
2181
+ readonly default: "NotExamined";
2182
+ };
2178
2183
  readonly authenticity: {
2179
2184
  readonly type: "map";
2180
2185
  readonly properties: {
@@ -4021,6 +4026,78 @@ export declare const CalendarEventIndex: {
4021
4026
  readonly version: "1";
4022
4027
  };
4023
4028
  };
4029
+ export declare const CalendarFeedToken: {
4030
+ readonly attributes: {
4031
+ readonly feedTokenId: {
4032
+ readonly type: "string";
4033
+ readonly required: true;
4034
+ readonly validate: (value: unknown) => boolean;
4035
+ };
4036
+ readonly accountConfigId: {
4037
+ readonly type: "string";
4038
+ readonly required: true;
4039
+ readonly validate: (value: unknown) => boolean;
4040
+ };
4041
+ readonly calendarId: {
4042
+ readonly type: "string";
4043
+ readonly required: true;
4044
+ readonly validate: (value: unknown) => boolean;
4045
+ };
4046
+ readonly tokenHash: {
4047
+ readonly type: "string";
4048
+ readonly required: true;
4049
+ readonly validate: (value: unknown) => boolean;
4050
+ };
4051
+ readonly createdAt: {
4052
+ readonly type: "number";
4053
+ readonly readOnly: true;
4054
+ readonly required: true;
4055
+ readonly default: () => any;
4056
+ readonly set: () => any;
4057
+ };
4058
+ readonly rotatedAt: {
4059
+ readonly type: "number";
4060
+ readonly required: true;
4061
+ readonly default: 0;
4062
+ readonly validate: (value: unknown) => boolean;
4063
+ };
4064
+ readonly updatedAt: {
4065
+ readonly type: "number";
4066
+ readonly watch: "*";
4067
+ readonly required: true;
4068
+ readonly default: () => any;
4069
+ readonly set: () => any;
4070
+ };
4071
+ };
4072
+ readonly indexes: {
4073
+ readonly byTokenHash: {
4074
+ readonly pk: {
4075
+ readonly field: "gsi0pk";
4076
+ readonly composite: readonly ["tokenHash"];
4077
+ };
4078
+ readonly sk: {
4079
+ readonly field: "gsi0sk";
4080
+ readonly composite: readonly [];
4081
+ };
4082
+ readonly index: "gsi0";
4083
+ };
4084
+ readonly CalendarFeedToken: {
4085
+ readonly pk: {
4086
+ readonly field: "pk";
4087
+ readonly composite: readonly ["accountConfigId"];
4088
+ };
4089
+ readonly sk: {
4090
+ readonly field: "sk";
4091
+ readonly composite: readonly ["feedTokenId"];
4092
+ };
4093
+ };
4094
+ };
4095
+ readonly model: {
4096
+ readonly entity: "calendarFeedToken";
4097
+ readonly service: "remit";
4098
+ readonly version: "1";
4099
+ };
4100
+ };
4024
4101
  export declare const MessageLabel: {
4025
4102
  readonly attributes: {
4026
4103
  readonly messageLabelId: {
package/index.d.ts CHANGED
@@ -2175,6 +2175,11 @@ export declare const Message: {
2175
2175
  readonly required: true;
2176
2176
  readonly default: "uncategorized";
2177
2177
  };
2178
+ readonly classificationState: {
2179
+ readonly type: readonly ["NotExamined", "Examined"];
2180
+ readonly required: true;
2181
+ readonly default: "NotExamined";
2182
+ };
2178
2183
  readonly authenticity: {
2179
2184
  readonly type: "map";
2180
2185
  readonly properties: {
@@ -4021,6 +4026,78 @@ export declare const CalendarEventIndex: {
4021
4026
  readonly version: "1";
4022
4027
  };
4023
4028
  };
4029
+ export declare const CalendarFeedToken: {
4030
+ readonly attributes: {
4031
+ readonly feedTokenId: {
4032
+ readonly type: "string";
4033
+ readonly required: true;
4034
+ readonly validate: (value: unknown) => boolean;
4035
+ };
4036
+ readonly accountConfigId: {
4037
+ readonly type: "string";
4038
+ readonly required: true;
4039
+ readonly validate: (value: unknown) => boolean;
4040
+ };
4041
+ readonly calendarId: {
4042
+ readonly type: "string";
4043
+ readonly required: true;
4044
+ readonly validate: (value: unknown) => boolean;
4045
+ };
4046
+ readonly tokenHash: {
4047
+ readonly type: "string";
4048
+ readonly required: true;
4049
+ readonly validate: (value: unknown) => boolean;
4050
+ };
4051
+ readonly createdAt: {
4052
+ readonly type: "number";
4053
+ readonly readOnly: true;
4054
+ readonly required: true;
4055
+ readonly default: () => any;
4056
+ readonly set: () => any;
4057
+ };
4058
+ readonly rotatedAt: {
4059
+ readonly type: "number";
4060
+ readonly required: true;
4061
+ readonly default: 0;
4062
+ readonly validate: (value: unknown) => boolean;
4063
+ };
4064
+ readonly updatedAt: {
4065
+ readonly type: "number";
4066
+ readonly watch: "*";
4067
+ readonly required: true;
4068
+ readonly default: () => any;
4069
+ readonly set: () => any;
4070
+ };
4071
+ };
4072
+ readonly indexes: {
4073
+ readonly byTokenHash: {
4074
+ readonly pk: {
4075
+ readonly field: "gsi0pk";
4076
+ readonly composite: readonly ["tokenHash"];
4077
+ };
4078
+ readonly sk: {
4079
+ readonly field: "gsi0sk";
4080
+ readonly composite: readonly [];
4081
+ };
4082
+ readonly index: "gsi0";
4083
+ };
4084
+ readonly CalendarFeedToken: {
4085
+ readonly pk: {
4086
+ readonly field: "pk";
4087
+ readonly composite: readonly ["accountConfigId"];
4088
+ };
4089
+ readonly sk: {
4090
+ readonly field: "sk";
4091
+ readonly composite: readonly ["feedTokenId"];
4092
+ };
4093
+ };
4094
+ };
4095
+ readonly model: {
4096
+ readonly entity: "calendarFeedToken";
4097
+ readonly service: "remit";
4098
+ readonly version: "1";
4099
+ };
4100
+ };
4024
4101
  export declare const MessageLabel: {
4025
4102
  readonly attributes: {
4026
4103
  readonly messageLabelId: {
package/index.mjs CHANGED
@@ -2828,6 +2828,11 @@ export const Message = {
2828
2828
  required: true,
2829
2829
  default: "uncategorized"
2830
2830
  },
2831
+ classificationState: {
2832
+ type: ["NotExamined", "Examined"],
2833
+ required: true,
2834
+ default: "NotExamined"
2835
+ },
2831
2836
  authenticity: {
2832
2837
  type: "map",
2833
2838
  properties: {
@@ -5164,6 +5169,104 @@ export const CalendarEventIndex = {
5164
5169
  version: "1"
5165
5170
  }
5166
5171
  };
5172
+ export const CalendarFeedToken = {
5173
+ attributes: {
5174
+ feedTokenId: {
5175
+ type: "string",
5176
+ required: true,
5177
+ validate: value => {
5178
+ if (typeof value === "string" && value.length < 25)
5179
+ throw new Error("'feedTokenId' must be at least 25 characters");
5180
+ if (typeof value === "string" && value.length > 25)
5181
+ throw new Error("'feedTokenId' must be at most 25 characters");
5182
+ return true;
5183
+ }
5184
+ },
5185
+ accountConfigId: {
5186
+ type: "string",
5187
+ required: true,
5188
+ validate: value => {
5189
+ if (typeof value === "string" && value.length < 25)
5190
+ throw new Error("'accountConfigId' must be at least 25 characters");
5191
+ if (typeof value === "string" && value.length > 25)
5192
+ throw new Error("'accountConfigId' must be at most 25 characters");
5193
+ return true;
5194
+ }
5195
+ },
5196
+ calendarId: {
5197
+ type: "string",
5198
+ required: true,
5199
+ validate: value => {
5200
+ if (typeof value === "string" && value.length < 25)
5201
+ throw new Error("'calendarId' must be at least 25 characters");
5202
+ if (typeof value === "string" && value.length > 25)
5203
+ throw new Error("'calendarId' must be at most 25 characters");
5204
+ return true;
5205
+ }
5206
+ },
5207
+ tokenHash: {
5208
+ type: "string",
5209
+ required: true,
5210
+ validate: value => {
5211
+ if (typeof value === "string" && value.length > 64)
5212
+ throw new Error("'tokenHash' must be at most 64 characters");
5213
+ return true;
5214
+ }
5215
+ },
5216
+ createdAt: {
5217
+ type: "number",
5218
+ readOnly: true,
5219
+ required: true,
5220
+ default: () => Date.now(),
5221
+ set: () => Date.now()
5222
+ },
5223
+ rotatedAt: {
5224
+ type: "number",
5225
+ required: true,
5226
+ default: 0,
5227
+ validate: value => {
5228
+ if (typeof value === "number" && !Number.isInteger(value))
5229
+ throw new Error("'rotatedAt' must be an integer");
5230
+ return true;
5231
+ }
5232
+ },
5233
+ updatedAt: {
5234
+ type: "number",
5235
+ watch: "*",
5236
+ required: true,
5237
+ default: () => Date.now(),
5238
+ set: () => Date.now()
5239
+ }
5240
+ },
5241
+ indexes: {
5242
+ byTokenHash: {
5243
+ pk: {
5244
+ field: "gsi0pk",
5245
+ composite: ["tokenHash"]
5246
+ },
5247
+ sk: {
5248
+ field: "gsi0sk",
5249
+ composite: []
5250
+ },
5251
+ index: "gsi0"
5252
+ },
5253
+ CalendarFeedToken: {
5254
+ pk: {
5255
+ field: "pk",
5256
+ composite: ["accountConfigId"]
5257
+ },
5258
+ sk: {
5259
+ field: "sk",
5260
+ composite: ["feedTokenId"]
5261
+ }
5262
+ }
5263
+ },
5264
+ model: {
5265
+ entity: "calendarFeedToken",
5266
+ service: "remit",
5267
+ version: "1"
5268
+ }
5269
+ };
5167
5270
  export const MessageLabel = {
5168
5271
  attributes: {
5169
5272
  messageLabelId: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/electrodb-entities",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "ElectroDB entities",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",