@remit/electrodb-entities 0.0.6 → 0.0.8

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.Label = exports.BodyPartContent = exports.BodyPartStorage = exports.RawMessageStorage = exports.BodyPartParameter = exports.Envelope = exports.MessageFlagPush = exports.MessagePlacementMove = exports.MessageFlag = exports.MailboxLock = exports.MailboxFlag = exports.MailboxSpecialUseEntry = exports.MailboxAttributeEntry = exports.AccountSetting = exports.EnvelopeAddress = exports.MessageReference = exports.BodyPart = exports.Message = exports.Address = exports.OutboxMessage = exports.ThreadMessage = exports.OrganizeJobRequest = exports.Filter = exports.Mailbox = exports.Account = exports.AccountConfig = exports.Quarantine = exports.AccountExportRequest = void 0;
3
+ exports.FilterAnchor = exports.MessageLabel = exports.BodyPartContent = exports.BodyPartStorage = exports.RawMessageStorage = exports.BodyPartParameter = exports.Envelope = exports.MessageFlagPush = exports.MessagePlacementMove = exports.MessageFlag = exports.MailboxLock = exports.MailboxFlag = exports.MailboxSpecialUseEntry = exports.MailboxAttributeEntry = exports.AccountSetting = exports.EnvelopeAddress = exports.MessageReference = exports.BodyPart = exports.Message = exports.Address = exports.OutboxMessage = exports.ThreadMessage = exports.OrganizeJobRequest = exports.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: {
@@ -1040,6 +1040,15 @@ exports.Filter = {
1040
1040
  return true;
1041
1041
  }
1042
1042
  },
1043
+ actionChangedAt: {
1044
+ type: "number",
1045
+ required: true,
1046
+ validate: value => {
1047
+ if (typeof value === "number" && !Number.isInteger(value))
1048
+ throw new Error("'actionChangedAt' must be an integer");
1049
+ return true;
1050
+ }
1051
+ },
1043
1052
  matchOperator: {
1044
1053
  type: ["And", "Or"],
1045
1054
  required: true,
@@ -1116,6 +1125,97 @@ exports.Filter = {
1116
1125
  version: "1"
1117
1126
  }
1118
1127
  };
1128
+ exports.Label = {
1129
+ attributes: {
1130
+ labelId: {
1131
+ type: "string",
1132
+ required: true,
1133
+ validate: value => {
1134
+ if (typeof value === "string" && value.length < 25)
1135
+ throw new Error("'labelId' must be at least 25 characters");
1136
+ if (typeof value === "string" && value.length > 25)
1137
+ throw new Error("'labelId' must be at most 25 characters");
1138
+ return true;
1139
+ }
1140
+ },
1141
+ accountConfigId: {
1142
+ type: "string",
1143
+ required: true,
1144
+ validate: value => {
1145
+ if (typeof value === "string" && value.length < 25)
1146
+ throw new Error("'accountConfigId' must be at least 25 characters");
1147
+ if (typeof value === "string" && value.length > 25)
1148
+ throw new Error("'accountConfigId' must be at most 25 characters");
1149
+ return true;
1150
+ }
1151
+ },
1152
+ name: {
1153
+ type: "string",
1154
+ required: true,
1155
+ validate: value => {
1156
+ if (typeof value === "string" && value.length > 140)
1157
+ throw new Error("'name' must be at most 140 characters");
1158
+ return true;
1159
+ }
1160
+ },
1161
+ normalizedName: {
1162
+ type: "string",
1163
+ required: true,
1164
+ validate: value => {
1165
+ if (typeof value === "string" && value.length > 140)
1166
+ throw new Error("'normalizedName' must be at most 140 characters");
1167
+ return true;
1168
+ }
1169
+ },
1170
+ color: {
1171
+ type: ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"],
1172
+ required: true,
1173
+ default: "Default"
1174
+ },
1175
+ createdAt: {
1176
+ type: "number",
1177
+ readOnly: true,
1178
+ required: true,
1179
+ default: () => Date.now(),
1180
+ set: () => Date.now()
1181
+ },
1182
+ updatedAt: {
1183
+ type: "number",
1184
+ watch: "*",
1185
+ required: true,
1186
+ default: () => Date.now(),
1187
+ set: () => Date.now()
1188
+ }
1189
+ },
1190
+ indexes: {
1191
+ byNormalizedName: {
1192
+ pk: {
1193
+ field: "gsi0pk",
1194
+ composite: ["accountConfigId"]
1195
+ },
1196
+ sk: {
1197
+ field: "gsi0sk",
1198
+ composite: ["normalizedName"]
1199
+ },
1200
+ index: "gsi0"
1201
+ },
1202
+ Label: {
1203
+ pk: {
1204
+ field: "pk",
1205
+ composite: ["accountConfigId"]
1206
+ },
1207
+ sk: {
1208
+ field: "sk",
1209
+ composite: ["labelId"]
1210
+ }
1211
+ }
1212
+ },
1213
+ model: {
1214
+ entity: "label",
1215
+ service: "remit",
1216
+ version: "1"
1217
+ }
1218
+ };
1119
1219
  exports.OrganizeJobRequest = {
1120
1220
  attributes: {
1121
1221
  organizeJobId: {
@@ -3979,97 +4079,6 @@ exports.BodyPartContent = {
3979
4079
  version: "1"
3980
4080
  }
3981
4081
  };
3982
- exports.Label = {
3983
- attributes: {
3984
- labelId: {
3985
- type: "string",
3986
- required: true,
3987
- validate: value => {
3988
- if (typeof value === "string" && value.length < 25)
3989
- throw new Error("'labelId' must be at least 25 characters");
3990
- if (typeof value === "string" && value.length > 25)
3991
- throw new Error("'labelId' must be at most 25 characters");
3992
- return true;
3993
- }
3994
- },
3995
- accountConfigId: {
3996
- type: "string",
3997
- required: true,
3998
- validate: value => {
3999
- if (typeof value === "string" && value.length < 25)
4000
- throw new Error("'accountConfigId' must be at least 25 characters");
4001
- if (typeof value === "string" && value.length > 25)
4002
- throw new Error("'accountConfigId' must be at most 25 characters");
4003
- return true;
4004
- }
4005
- },
4006
- name: {
4007
- type: "string",
4008
- required: true,
4009
- validate: value => {
4010
- if (typeof value === "string" && value.length > 140)
4011
- throw new Error("'name' must be at most 140 characters");
4012
- return true;
4013
- }
4014
- },
4015
- normalizedName: {
4016
- type: "string",
4017
- required: true,
4018
- validate: value => {
4019
- if (typeof value === "string" && value.length > 140)
4020
- throw new Error("'normalizedName' must be at most 140 characters");
4021
- return true;
4022
- }
4023
- },
4024
- color: {
4025
- type: ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"],
4026
- required: true,
4027
- default: "Default"
4028
- },
4029
- createdAt: {
4030
- type: "number",
4031
- readOnly: true,
4032
- required: true,
4033
- default: () => Date.now(),
4034
- set: () => Date.now()
4035
- },
4036
- updatedAt: {
4037
- type: "number",
4038
- watch: "*",
4039
- required: true,
4040
- default: () => Date.now(),
4041
- set: () => Date.now()
4042
- }
4043
- },
4044
- indexes: {
4045
- byNormalizedName: {
4046
- pk: {
4047
- field: "gsi0pk",
4048
- composite: ["accountConfigId"]
4049
- },
4050
- sk: {
4051
- field: "gsi0sk",
4052
- composite: ["normalizedName"]
4053
- },
4054
- index: "gsi0"
4055
- },
4056
- Label: {
4057
- pk: {
4058
- field: "pk",
4059
- composite: ["accountConfigId"]
4060
- },
4061
- sk: {
4062
- field: "sk",
4063
- composite: ["labelId"]
4064
- }
4065
- }
4066
- },
4067
- model: {
4068
- entity: "label",
4069
- service: "remit",
4070
- version: "1"
4071
- }
4072
- };
4073
4082
  exports.MessageLabel = {
4074
4083
  attributes: {
4075
4084
  messageLabelId: {
package/index.d.cts CHANGED
@@ -752,6 +752,11 @@ export declare const Filter: {
752
752
  readonly required: true;
753
753
  readonly validate: (value: unknown) => boolean;
754
754
  };
755
+ readonly actionChangedAt: {
756
+ readonly type: "number";
757
+ readonly required: true;
758
+ readonly validate: (value: unknown) => boolean;
759
+ };
755
760
  readonly matchOperator: {
756
761
  readonly type: readonly ["And", "Or"];
757
762
  readonly required: true;
@@ -828,6 +833,77 @@ export declare const Filter: {
828
833
  readonly version: "1";
829
834
  };
830
835
  };
836
+ export declare const Label: {
837
+ readonly attributes: {
838
+ readonly labelId: {
839
+ readonly type: "string";
840
+ readonly required: true;
841
+ readonly validate: (value: unknown) => boolean;
842
+ };
843
+ readonly accountConfigId: {
844
+ readonly type: "string";
845
+ readonly required: true;
846
+ readonly validate: (value: unknown) => boolean;
847
+ };
848
+ readonly name: {
849
+ readonly type: "string";
850
+ readonly required: true;
851
+ readonly validate: (value: unknown) => boolean;
852
+ };
853
+ readonly normalizedName: {
854
+ readonly type: "string";
855
+ readonly required: true;
856
+ readonly validate: (value: unknown) => boolean;
857
+ };
858
+ readonly color: {
859
+ readonly type: readonly ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"];
860
+ readonly required: true;
861
+ readonly default: "Default";
862
+ };
863
+ readonly createdAt: {
864
+ readonly type: "number";
865
+ readonly readOnly: true;
866
+ readonly required: true;
867
+ readonly default: () => any;
868
+ readonly set: () => any;
869
+ };
870
+ readonly updatedAt: {
871
+ readonly type: "number";
872
+ readonly watch: "*";
873
+ readonly required: true;
874
+ readonly default: () => any;
875
+ readonly set: () => any;
876
+ };
877
+ };
878
+ readonly indexes: {
879
+ readonly byNormalizedName: {
880
+ readonly pk: {
881
+ readonly field: "gsi0pk";
882
+ readonly composite: readonly ["accountConfigId"];
883
+ };
884
+ readonly sk: {
885
+ readonly field: "gsi0sk";
886
+ readonly composite: readonly ["normalizedName"];
887
+ };
888
+ readonly index: "gsi0";
889
+ };
890
+ readonly Label: {
891
+ readonly pk: {
892
+ readonly field: "pk";
893
+ readonly composite: readonly ["accountConfigId"];
894
+ };
895
+ readonly sk: {
896
+ readonly field: "sk";
897
+ readonly composite: readonly ["labelId"];
898
+ };
899
+ };
900
+ };
901
+ readonly model: {
902
+ readonly entity: "label";
903
+ readonly service: "remit";
904
+ readonly version: "1";
905
+ };
906
+ };
831
907
  export declare const OrganizeJobRequest: {
832
908
  readonly attributes: {
833
909
  readonly organizeJobId: {
@@ -3119,77 +3195,6 @@ export declare const BodyPartContent: {
3119
3195
  readonly version: "1";
3120
3196
  };
3121
3197
  };
3122
- export declare const Label: {
3123
- readonly attributes: {
3124
- readonly labelId: {
3125
- readonly type: "string";
3126
- readonly required: true;
3127
- readonly validate: (value: unknown) => boolean;
3128
- };
3129
- readonly accountConfigId: {
3130
- readonly type: "string";
3131
- readonly required: true;
3132
- readonly validate: (value: unknown) => boolean;
3133
- };
3134
- readonly name: {
3135
- readonly type: "string";
3136
- readonly required: true;
3137
- readonly validate: (value: unknown) => boolean;
3138
- };
3139
- readonly normalizedName: {
3140
- readonly type: "string";
3141
- readonly required: true;
3142
- readonly validate: (value: unknown) => boolean;
3143
- };
3144
- readonly color: {
3145
- readonly type: readonly ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"];
3146
- readonly required: true;
3147
- readonly default: "Default";
3148
- };
3149
- readonly createdAt: {
3150
- readonly type: "number";
3151
- readonly readOnly: true;
3152
- readonly required: true;
3153
- readonly default: () => any;
3154
- readonly set: () => any;
3155
- };
3156
- readonly updatedAt: {
3157
- readonly type: "number";
3158
- readonly watch: "*";
3159
- readonly required: true;
3160
- readonly default: () => any;
3161
- readonly set: () => any;
3162
- };
3163
- };
3164
- readonly indexes: {
3165
- readonly byNormalizedName: {
3166
- readonly pk: {
3167
- readonly field: "gsi0pk";
3168
- readonly composite: readonly ["accountConfigId"];
3169
- };
3170
- readonly sk: {
3171
- readonly field: "gsi0sk";
3172
- readonly composite: readonly ["normalizedName"];
3173
- };
3174
- readonly index: "gsi0";
3175
- };
3176
- readonly Label: {
3177
- readonly pk: {
3178
- readonly field: "pk";
3179
- readonly composite: readonly ["accountConfigId"];
3180
- };
3181
- readonly sk: {
3182
- readonly field: "sk";
3183
- readonly composite: readonly ["labelId"];
3184
- };
3185
- };
3186
- };
3187
- readonly model: {
3188
- readonly entity: "label";
3189
- readonly service: "remit";
3190
- readonly version: "1";
3191
- };
3192
- };
3193
3198
  export declare const MessageLabel: {
3194
3199
  readonly attributes: {
3195
3200
  readonly messageLabelId: {
package/index.d.mts CHANGED
@@ -752,6 +752,11 @@ export declare const Filter: {
752
752
  readonly required: true;
753
753
  readonly validate: (value: unknown) => boolean;
754
754
  };
755
+ readonly actionChangedAt: {
756
+ readonly type: "number";
757
+ readonly required: true;
758
+ readonly validate: (value: unknown) => boolean;
759
+ };
755
760
  readonly matchOperator: {
756
761
  readonly type: readonly ["And", "Or"];
757
762
  readonly required: true;
@@ -828,6 +833,77 @@ export declare const Filter: {
828
833
  readonly version: "1";
829
834
  };
830
835
  };
836
+ export declare const Label: {
837
+ readonly attributes: {
838
+ readonly labelId: {
839
+ readonly type: "string";
840
+ readonly required: true;
841
+ readonly validate: (value: unknown) => boolean;
842
+ };
843
+ readonly accountConfigId: {
844
+ readonly type: "string";
845
+ readonly required: true;
846
+ readonly validate: (value: unknown) => boolean;
847
+ };
848
+ readonly name: {
849
+ readonly type: "string";
850
+ readonly required: true;
851
+ readonly validate: (value: unknown) => boolean;
852
+ };
853
+ readonly normalizedName: {
854
+ readonly type: "string";
855
+ readonly required: true;
856
+ readonly validate: (value: unknown) => boolean;
857
+ };
858
+ readonly color: {
859
+ readonly type: readonly ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"];
860
+ readonly required: true;
861
+ readonly default: "Default";
862
+ };
863
+ readonly createdAt: {
864
+ readonly type: "number";
865
+ readonly readOnly: true;
866
+ readonly required: true;
867
+ readonly default: () => any;
868
+ readonly set: () => any;
869
+ };
870
+ readonly updatedAt: {
871
+ readonly type: "number";
872
+ readonly watch: "*";
873
+ readonly required: true;
874
+ readonly default: () => any;
875
+ readonly set: () => any;
876
+ };
877
+ };
878
+ readonly indexes: {
879
+ readonly byNormalizedName: {
880
+ readonly pk: {
881
+ readonly field: "gsi0pk";
882
+ readonly composite: readonly ["accountConfigId"];
883
+ };
884
+ readonly sk: {
885
+ readonly field: "gsi0sk";
886
+ readonly composite: readonly ["normalizedName"];
887
+ };
888
+ readonly index: "gsi0";
889
+ };
890
+ readonly Label: {
891
+ readonly pk: {
892
+ readonly field: "pk";
893
+ readonly composite: readonly ["accountConfigId"];
894
+ };
895
+ readonly sk: {
896
+ readonly field: "sk";
897
+ readonly composite: readonly ["labelId"];
898
+ };
899
+ };
900
+ };
901
+ readonly model: {
902
+ readonly entity: "label";
903
+ readonly service: "remit";
904
+ readonly version: "1";
905
+ };
906
+ };
831
907
  export declare const OrganizeJobRequest: {
832
908
  readonly attributes: {
833
909
  readonly organizeJobId: {
@@ -3119,77 +3195,6 @@ export declare const BodyPartContent: {
3119
3195
  readonly version: "1";
3120
3196
  };
3121
3197
  };
3122
- export declare const Label: {
3123
- readonly attributes: {
3124
- readonly labelId: {
3125
- readonly type: "string";
3126
- readonly required: true;
3127
- readonly validate: (value: unknown) => boolean;
3128
- };
3129
- readonly accountConfigId: {
3130
- readonly type: "string";
3131
- readonly required: true;
3132
- readonly validate: (value: unknown) => boolean;
3133
- };
3134
- readonly name: {
3135
- readonly type: "string";
3136
- readonly required: true;
3137
- readonly validate: (value: unknown) => boolean;
3138
- };
3139
- readonly normalizedName: {
3140
- readonly type: "string";
3141
- readonly required: true;
3142
- readonly validate: (value: unknown) => boolean;
3143
- };
3144
- readonly color: {
3145
- readonly type: readonly ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"];
3146
- readonly required: true;
3147
- readonly default: "Default";
3148
- };
3149
- readonly createdAt: {
3150
- readonly type: "number";
3151
- readonly readOnly: true;
3152
- readonly required: true;
3153
- readonly default: () => any;
3154
- readonly set: () => any;
3155
- };
3156
- readonly updatedAt: {
3157
- readonly type: "number";
3158
- readonly watch: "*";
3159
- readonly required: true;
3160
- readonly default: () => any;
3161
- readonly set: () => any;
3162
- };
3163
- };
3164
- readonly indexes: {
3165
- readonly byNormalizedName: {
3166
- readonly pk: {
3167
- readonly field: "gsi0pk";
3168
- readonly composite: readonly ["accountConfigId"];
3169
- };
3170
- readonly sk: {
3171
- readonly field: "gsi0sk";
3172
- readonly composite: readonly ["normalizedName"];
3173
- };
3174
- readonly index: "gsi0";
3175
- };
3176
- readonly Label: {
3177
- readonly pk: {
3178
- readonly field: "pk";
3179
- readonly composite: readonly ["accountConfigId"];
3180
- };
3181
- readonly sk: {
3182
- readonly field: "sk";
3183
- readonly composite: readonly ["labelId"];
3184
- };
3185
- };
3186
- };
3187
- readonly model: {
3188
- readonly entity: "label";
3189
- readonly service: "remit";
3190
- readonly version: "1";
3191
- };
3192
- };
3193
3198
  export declare const MessageLabel: {
3194
3199
  readonly attributes: {
3195
3200
  readonly messageLabelId: {
package/index.d.ts CHANGED
@@ -752,6 +752,11 @@ export declare const Filter: {
752
752
  readonly required: true;
753
753
  readonly validate: (value: unknown) => boolean;
754
754
  };
755
+ readonly actionChangedAt: {
756
+ readonly type: "number";
757
+ readonly required: true;
758
+ readonly validate: (value: unknown) => boolean;
759
+ };
755
760
  readonly matchOperator: {
756
761
  readonly type: readonly ["And", "Or"];
757
762
  readonly required: true;
@@ -828,6 +833,77 @@ export declare const Filter: {
828
833
  readonly version: "1";
829
834
  };
830
835
  };
836
+ export declare const Label: {
837
+ readonly attributes: {
838
+ readonly labelId: {
839
+ readonly type: "string";
840
+ readonly required: true;
841
+ readonly validate: (value: unknown) => boolean;
842
+ };
843
+ readonly accountConfigId: {
844
+ readonly type: "string";
845
+ readonly required: true;
846
+ readonly validate: (value: unknown) => boolean;
847
+ };
848
+ readonly name: {
849
+ readonly type: "string";
850
+ readonly required: true;
851
+ readonly validate: (value: unknown) => boolean;
852
+ };
853
+ readonly normalizedName: {
854
+ readonly type: "string";
855
+ readonly required: true;
856
+ readonly validate: (value: unknown) => boolean;
857
+ };
858
+ readonly color: {
859
+ readonly type: readonly ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"];
860
+ readonly required: true;
861
+ readonly default: "Default";
862
+ };
863
+ readonly createdAt: {
864
+ readonly type: "number";
865
+ readonly readOnly: true;
866
+ readonly required: true;
867
+ readonly default: () => any;
868
+ readonly set: () => any;
869
+ };
870
+ readonly updatedAt: {
871
+ readonly type: "number";
872
+ readonly watch: "*";
873
+ readonly required: true;
874
+ readonly default: () => any;
875
+ readonly set: () => any;
876
+ };
877
+ };
878
+ readonly indexes: {
879
+ readonly byNormalizedName: {
880
+ readonly pk: {
881
+ readonly field: "gsi0pk";
882
+ readonly composite: readonly ["accountConfigId"];
883
+ };
884
+ readonly sk: {
885
+ readonly field: "gsi0sk";
886
+ readonly composite: readonly ["normalizedName"];
887
+ };
888
+ readonly index: "gsi0";
889
+ };
890
+ readonly Label: {
891
+ readonly pk: {
892
+ readonly field: "pk";
893
+ readonly composite: readonly ["accountConfigId"];
894
+ };
895
+ readonly sk: {
896
+ readonly field: "sk";
897
+ readonly composite: readonly ["labelId"];
898
+ };
899
+ };
900
+ };
901
+ readonly model: {
902
+ readonly entity: "label";
903
+ readonly service: "remit";
904
+ readonly version: "1";
905
+ };
906
+ };
831
907
  export declare const OrganizeJobRequest: {
832
908
  readonly attributes: {
833
909
  readonly organizeJobId: {
@@ -3119,77 +3195,6 @@ export declare const BodyPartContent: {
3119
3195
  readonly version: "1";
3120
3196
  };
3121
3197
  };
3122
- export declare const Label: {
3123
- readonly attributes: {
3124
- readonly labelId: {
3125
- readonly type: "string";
3126
- readonly required: true;
3127
- readonly validate: (value: unknown) => boolean;
3128
- };
3129
- readonly accountConfigId: {
3130
- readonly type: "string";
3131
- readonly required: true;
3132
- readonly validate: (value: unknown) => boolean;
3133
- };
3134
- readonly name: {
3135
- readonly type: "string";
3136
- readonly required: true;
3137
- readonly validate: (value: unknown) => boolean;
3138
- };
3139
- readonly normalizedName: {
3140
- readonly type: "string";
3141
- readonly required: true;
3142
- readonly validate: (value: unknown) => boolean;
3143
- };
3144
- readonly color: {
3145
- readonly type: readonly ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"];
3146
- readonly required: true;
3147
- readonly default: "Default";
3148
- };
3149
- readonly createdAt: {
3150
- readonly type: "number";
3151
- readonly readOnly: true;
3152
- readonly required: true;
3153
- readonly default: () => any;
3154
- readonly set: () => any;
3155
- };
3156
- readonly updatedAt: {
3157
- readonly type: "number";
3158
- readonly watch: "*";
3159
- readonly required: true;
3160
- readonly default: () => any;
3161
- readonly set: () => any;
3162
- };
3163
- };
3164
- readonly indexes: {
3165
- readonly byNormalizedName: {
3166
- readonly pk: {
3167
- readonly field: "gsi0pk";
3168
- readonly composite: readonly ["accountConfigId"];
3169
- };
3170
- readonly sk: {
3171
- readonly field: "gsi0sk";
3172
- readonly composite: readonly ["normalizedName"];
3173
- };
3174
- readonly index: "gsi0";
3175
- };
3176
- readonly Label: {
3177
- readonly pk: {
3178
- readonly field: "pk";
3179
- readonly composite: readonly ["accountConfigId"];
3180
- };
3181
- readonly sk: {
3182
- readonly field: "sk";
3183
- readonly composite: readonly ["labelId"];
3184
- };
3185
- };
3186
- };
3187
- readonly model: {
3188
- readonly entity: "label";
3189
- readonly service: "remit";
3190
- readonly version: "1";
3191
- };
3192
- };
3193
3198
  export declare const MessageLabel: {
3194
3199
  readonly attributes: {
3195
3200
  readonly messageLabelId: {
package/index.mjs CHANGED
@@ -1037,6 +1037,15 @@ export const Filter = {
1037
1037
  return true;
1038
1038
  }
1039
1039
  },
1040
+ actionChangedAt: {
1041
+ type: "number",
1042
+ required: true,
1043
+ validate: value => {
1044
+ if (typeof value === "number" && !Number.isInteger(value))
1045
+ throw new Error("'actionChangedAt' must be an integer");
1046
+ return true;
1047
+ }
1048
+ },
1040
1049
  matchOperator: {
1041
1050
  type: ["And", "Or"],
1042
1051
  required: true,
@@ -1113,6 +1122,97 @@ export const Filter = {
1113
1122
  version: "1"
1114
1123
  }
1115
1124
  };
1125
+ export const Label = {
1126
+ attributes: {
1127
+ labelId: {
1128
+ type: "string",
1129
+ required: true,
1130
+ validate: value => {
1131
+ if (typeof value === "string" && value.length < 25)
1132
+ throw new Error("'labelId' must be at least 25 characters");
1133
+ if (typeof value === "string" && value.length > 25)
1134
+ throw new Error("'labelId' must be at most 25 characters");
1135
+ return true;
1136
+ }
1137
+ },
1138
+ accountConfigId: {
1139
+ type: "string",
1140
+ required: true,
1141
+ validate: value => {
1142
+ if (typeof value === "string" && value.length < 25)
1143
+ throw new Error("'accountConfigId' must be at least 25 characters");
1144
+ if (typeof value === "string" && value.length > 25)
1145
+ throw new Error("'accountConfigId' must be at most 25 characters");
1146
+ return true;
1147
+ }
1148
+ },
1149
+ name: {
1150
+ type: "string",
1151
+ required: true,
1152
+ validate: value => {
1153
+ if (typeof value === "string" && value.length > 140)
1154
+ throw new Error("'name' must be at most 140 characters");
1155
+ return true;
1156
+ }
1157
+ },
1158
+ normalizedName: {
1159
+ type: "string",
1160
+ required: true,
1161
+ validate: value => {
1162
+ if (typeof value === "string" && value.length > 140)
1163
+ throw new Error("'normalizedName' must be at most 140 characters");
1164
+ return true;
1165
+ }
1166
+ },
1167
+ color: {
1168
+ type: ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"],
1169
+ required: true,
1170
+ default: "Default"
1171
+ },
1172
+ createdAt: {
1173
+ type: "number",
1174
+ readOnly: true,
1175
+ required: true,
1176
+ default: () => Date.now(),
1177
+ set: () => Date.now()
1178
+ },
1179
+ updatedAt: {
1180
+ type: "number",
1181
+ watch: "*",
1182
+ required: true,
1183
+ default: () => Date.now(),
1184
+ set: () => Date.now()
1185
+ }
1186
+ },
1187
+ indexes: {
1188
+ byNormalizedName: {
1189
+ pk: {
1190
+ field: "gsi0pk",
1191
+ composite: ["accountConfigId"]
1192
+ },
1193
+ sk: {
1194
+ field: "gsi0sk",
1195
+ composite: ["normalizedName"]
1196
+ },
1197
+ index: "gsi0"
1198
+ },
1199
+ Label: {
1200
+ pk: {
1201
+ field: "pk",
1202
+ composite: ["accountConfigId"]
1203
+ },
1204
+ sk: {
1205
+ field: "sk",
1206
+ composite: ["labelId"]
1207
+ }
1208
+ }
1209
+ },
1210
+ model: {
1211
+ entity: "label",
1212
+ service: "remit",
1213
+ version: "1"
1214
+ }
1215
+ };
1116
1216
  export const OrganizeJobRequest = {
1117
1217
  attributes: {
1118
1218
  organizeJobId: {
@@ -3976,97 +4076,6 @@ export const BodyPartContent = {
3976
4076
  version: "1"
3977
4077
  }
3978
4078
  };
3979
- export const Label = {
3980
- attributes: {
3981
- labelId: {
3982
- type: "string",
3983
- required: true,
3984
- validate: value => {
3985
- if (typeof value === "string" && value.length < 25)
3986
- throw new Error("'labelId' must be at least 25 characters");
3987
- if (typeof value === "string" && value.length > 25)
3988
- throw new Error("'labelId' must be at most 25 characters");
3989
- return true;
3990
- }
3991
- },
3992
- accountConfigId: {
3993
- type: "string",
3994
- required: true,
3995
- validate: value => {
3996
- if (typeof value === "string" && value.length < 25)
3997
- throw new Error("'accountConfigId' must be at least 25 characters");
3998
- if (typeof value === "string" && value.length > 25)
3999
- throw new Error("'accountConfigId' must be at most 25 characters");
4000
- return true;
4001
- }
4002
- },
4003
- name: {
4004
- type: "string",
4005
- required: true,
4006
- validate: value => {
4007
- if (typeof value === "string" && value.length > 140)
4008
- throw new Error("'name' must be at most 140 characters");
4009
- return true;
4010
- }
4011
- },
4012
- normalizedName: {
4013
- type: "string",
4014
- required: true,
4015
- validate: value => {
4016
- if (typeof value === "string" && value.length > 140)
4017
- throw new Error("'normalizedName' must be at most 140 characters");
4018
- return true;
4019
- }
4020
- },
4021
- color: {
4022
- type: ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"],
4023
- required: true,
4024
- default: "Default"
4025
- },
4026
- createdAt: {
4027
- type: "number",
4028
- readOnly: true,
4029
- required: true,
4030
- default: () => Date.now(),
4031
- set: () => Date.now()
4032
- },
4033
- updatedAt: {
4034
- type: "number",
4035
- watch: "*",
4036
- required: true,
4037
- default: () => Date.now(),
4038
- set: () => Date.now()
4039
- }
4040
- },
4041
- indexes: {
4042
- byNormalizedName: {
4043
- pk: {
4044
- field: "gsi0pk",
4045
- composite: ["accountConfigId"]
4046
- },
4047
- sk: {
4048
- field: "gsi0sk",
4049
- composite: ["normalizedName"]
4050
- },
4051
- index: "gsi0"
4052
- },
4053
- Label: {
4054
- pk: {
4055
- field: "pk",
4056
- composite: ["accountConfigId"]
4057
- },
4058
- sk: {
4059
- field: "sk",
4060
- composite: ["labelId"]
4061
- }
4062
- }
4063
- },
4064
- model: {
4065
- entity: "label",
4066
- service: "remit",
4067
- version: "1"
4068
- }
4069
- };
4070
4079
  export const MessageLabel = {
4071
4080
  attributes: {
4072
4081
  messageLabelId: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/electrodb-entities",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "ElectroDB entities",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",