@remit/electrodb-entities 0.0.6 → 0.0.7

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: {
@@ -1116,6 +1116,97 @@ exports.Filter = {
1116
1116
  version: "1"
1117
1117
  }
1118
1118
  };
1119
+ exports.Label = {
1120
+ attributes: {
1121
+ labelId: {
1122
+ type: "string",
1123
+ required: true,
1124
+ validate: value => {
1125
+ if (typeof value === "string" && value.length < 25)
1126
+ throw new Error("'labelId' must be at least 25 characters");
1127
+ if (typeof value === "string" && value.length > 25)
1128
+ throw new Error("'labelId' must be at most 25 characters");
1129
+ return true;
1130
+ }
1131
+ },
1132
+ accountConfigId: {
1133
+ type: "string",
1134
+ required: true,
1135
+ validate: value => {
1136
+ if (typeof value === "string" && value.length < 25)
1137
+ throw new Error("'accountConfigId' must be at least 25 characters");
1138
+ if (typeof value === "string" && value.length > 25)
1139
+ throw new Error("'accountConfigId' must be at most 25 characters");
1140
+ return true;
1141
+ }
1142
+ },
1143
+ name: {
1144
+ type: "string",
1145
+ required: true,
1146
+ validate: value => {
1147
+ if (typeof value === "string" && value.length > 140)
1148
+ throw new Error("'name' must be at most 140 characters");
1149
+ return true;
1150
+ }
1151
+ },
1152
+ normalizedName: {
1153
+ type: "string",
1154
+ required: true,
1155
+ validate: value => {
1156
+ if (typeof value === "string" && value.length > 140)
1157
+ throw new Error("'normalizedName' must be at most 140 characters");
1158
+ return true;
1159
+ }
1160
+ },
1161
+ color: {
1162
+ type: ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"],
1163
+ required: true,
1164
+ default: "Default"
1165
+ },
1166
+ createdAt: {
1167
+ type: "number",
1168
+ readOnly: true,
1169
+ required: true,
1170
+ default: () => Date.now(),
1171
+ set: () => Date.now()
1172
+ },
1173
+ updatedAt: {
1174
+ type: "number",
1175
+ watch: "*",
1176
+ required: true,
1177
+ default: () => Date.now(),
1178
+ set: () => Date.now()
1179
+ }
1180
+ },
1181
+ indexes: {
1182
+ byNormalizedName: {
1183
+ pk: {
1184
+ field: "gsi0pk",
1185
+ composite: ["accountConfigId"]
1186
+ },
1187
+ sk: {
1188
+ field: "gsi0sk",
1189
+ composite: ["normalizedName"]
1190
+ },
1191
+ index: "gsi0"
1192
+ },
1193
+ Label: {
1194
+ pk: {
1195
+ field: "pk",
1196
+ composite: ["accountConfigId"]
1197
+ },
1198
+ sk: {
1199
+ field: "sk",
1200
+ composite: ["labelId"]
1201
+ }
1202
+ }
1203
+ },
1204
+ model: {
1205
+ entity: "label",
1206
+ service: "remit",
1207
+ version: "1"
1208
+ }
1209
+ };
1119
1210
  exports.OrganizeJobRequest = {
1120
1211
  attributes: {
1121
1212
  organizeJobId: {
@@ -3979,97 +4070,6 @@ exports.BodyPartContent = {
3979
4070
  version: "1"
3980
4071
  }
3981
4072
  };
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
4073
  exports.MessageLabel = {
4074
4074
  attributes: {
4075
4075
  messageLabelId: {
package/index.d.cts CHANGED
@@ -828,6 +828,77 @@ export declare const Filter: {
828
828
  readonly version: "1";
829
829
  };
830
830
  };
831
+ export declare const Label: {
832
+ readonly attributes: {
833
+ readonly labelId: {
834
+ readonly type: "string";
835
+ readonly required: true;
836
+ readonly validate: (value: unknown) => boolean;
837
+ };
838
+ readonly accountConfigId: {
839
+ readonly type: "string";
840
+ readonly required: true;
841
+ readonly validate: (value: unknown) => boolean;
842
+ };
843
+ readonly name: {
844
+ readonly type: "string";
845
+ readonly required: true;
846
+ readonly validate: (value: unknown) => boolean;
847
+ };
848
+ readonly normalizedName: {
849
+ readonly type: "string";
850
+ readonly required: true;
851
+ readonly validate: (value: unknown) => boolean;
852
+ };
853
+ readonly color: {
854
+ readonly type: readonly ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"];
855
+ readonly required: true;
856
+ readonly default: "Default";
857
+ };
858
+ readonly createdAt: {
859
+ readonly type: "number";
860
+ readonly readOnly: true;
861
+ readonly required: true;
862
+ readonly default: () => any;
863
+ readonly set: () => any;
864
+ };
865
+ readonly updatedAt: {
866
+ readonly type: "number";
867
+ readonly watch: "*";
868
+ readonly required: true;
869
+ readonly default: () => any;
870
+ readonly set: () => any;
871
+ };
872
+ };
873
+ readonly indexes: {
874
+ readonly byNormalizedName: {
875
+ readonly pk: {
876
+ readonly field: "gsi0pk";
877
+ readonly composite: readonly ["accountConfigId"];
878
+ };
879
+ readonly sk: {
880
+ readonly field: "gsi0sk";
881
+ readonly composite: readonly ["normalizedName"];
882
+ };
883
+ readonly index: "gsi0";
884
+ };
885
+ readonly Label: {
886
+ readonly pk: {
887
+ readonly field: "pk";
888
+ readonly composite: readonly ["accountConfigId"];
889
+ };
890
+ readonly sk: {
891
+ readonly field: "sk";
892
+ readonly composite: readonly ["labelId"];
893
+ };
894
+ };
895
+ };
896
+ readonly model: {
897
+ readonly entity: "label";
898
+ readonly service: "remit";
899
+ readonly version: "1";
900
+ };
901
+ };
831
902
  export declare const OrganizeJobRequest: {
832
903
  readonly attributes: {
833
904
  readonly organizeJobId: {
@@ -3119,77 +3190,6 @@ export declare const BodyPartContent: {
3119
3190
  readonly version: "1";
3120
3191
  };
3121
3192
  };
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
3193
  export declare const MessageLabel: {
3194
3194
  readonly attributes: {
3195
3195
  readonly messageLabelId: {
package/index.d.mts CHANGED
@@ -828,6 +828,77 @@ export declare const Filter: {
828
828
  readonly version: "1";
829
829
  };
830
830
  };
831
+ export declare const Label: {
832
+ readonly attributes: {
833
+ readonly labelId: {
834
+ readonly type: "string";
835
+ readonly required: true;
836
+ readonly validate: (value: unknown) => boolean;
837
+ };
838
+ readonly accountConfigId: {
839
+ readonly type: "string";
840
+ readonly required: true;
841
+ readonly validate: (value: unknown) => boolean;
842
+ };
843
+ readonly name: {
844
+ readonly type: "string";
845
+ readonly required: true;
846
+ readonly validate: (value: unknown) => boolean;
847
+ };
848
+ readonly normalizedName: {
849
+ readonly type: "string";
850
+ readonly required: true;
851
+ readonly validate: (value: unknown) => boolean;
852
+ };
853
+ readonly color: {
854
+ readonly type: readonly ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"];
855
+ readonly required: true;
856
+ readonly default: "Default";
857
+ };
858
+ readonly createdAt: {
859
+ readonly type: "number";
860
+ readonly readOnly: true;
861
+ readonly required: true;
862
+ readonly default: () => any;
863
+ readonly set: () => any;
864
+ };
865
+ readonly updatedAt: {
866
+ readonly type: "number";
867
+ readonly watch: "*";
868
+ readonly required: true;
869
+ readonly default: () => any;
870
+ readonly set: () => any;
871
+ };
872
+ };
873
+ readonly indexes: {
874
+ readonly byNormalizedName: {
875
+ readonly pk: {
876
+ readonly field: "gsi0pk";
877
+ readonly composite: readonly ["accountConfigId"];
878
+ };
879
+ readonly sk: {
880
+ readonly field: "gsi0sk";
881
+ readonly composite: readonly ["normalizedName"];
882
+ };
883
+ readonly index: "gsi0";
884
+ };
885
+ readonly Label: {
886
+ readonly pk: {
887
+ readonly field: "pk";
888
+ readonly composite: readonly ["accountConfigId"];
889
+ };
890
+ readonly sk: {
891
+ readonly field: "sk";
892
+ readonly composite: readonly ["labelId"];
893
+ };
894
+ };
895
+ };
896
+ readonly model: {
897
+ readonly entity: "label";
898
+ readonly service: "remit";
899
+ readonly version: "1";
900
+ };
901
+ };
831
902
  export declare const OrganizeJobRequest: {
832
903
  readonly attributes: {
833
904
  readonly organizeJobId: {
@@ -3119,77 +3190,6 @@ export declare const BodyPartContent: {
3119
3190
  readonly version: "1";
3120
3191
  };
3121
3192
  };
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
3193
  export declare const MessageLabel: {
3194
3194
  readonly attributes: {
3195
3195
  readonly messageLabelId: {
package/index.d.ts CHANGED
@@ -828,6 +828,77 @@ export declare const Filter: {
828
828
  readonly version: "1";
829
829
  };
830
830
  };
831
+ export declare const Label: {
832
+ readonly attributes: {
833
+ readonly labelId: {
834
+ readonly type: "string";
835
+ readonly required: true;
836
+ readonly validate: (value: unknown) => boolean;
837
+ };
838
+ readonly accountConfigId: {
839
+ readonly type: "string";
840
+ readonly required: true;
841
+ readonly validate: (value: unknown) => boolean;
842
+ };
843
+ readonly name: {
844
+ readonly type: "string";
845
+ readonly required: true;
846
+ readonly validate: (value: unknown) => boolean;
847
+ };
848
+ readonly normalizedName: {
849
+ readonly type: "string";
850
+ readonly required: true;
851
+ readonly validate: (value: unknown) => boolean;
852
+ };
853
+ readonly color: {
854
+ readonly type: readonly ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"];
855
+ readonly required: true;
856
+ readonly default: "Default";
857
+ };
858
+ readonly createdAt: {
859
+ readonly type: "number";
860
+ readonly readOnly: true;
861
+ readonly required: true;
862
+ readonly default: () => any;
863
+ readonly set: () => any;
864
+ };
865
+ readonly updatedAt: {
866
+ readonly type: "number";
867
+ readonly watch: "*";
868
+ readonly required: true;
869
+ readonly default: () => any;
870
+ readonly set: () => any;
871
+ };
872
+ };
873
+ readonly indexes: {
874
+ readonly byNormalizedName: {
875
+ readonly pk: {
876
+ readonly field: "gsi0pk";
877
+ readonly composite: readonly ["accountConfigId"];
878
+ };
879
+ readonly sk: {
880
+ readonly field: "gsi0sk";
881
+ readonly composite: readonly ["normalizedName"];
882
+ };
883
+ readonly index: "gsi0";
884
+ };
885
+ readonly Label: {
886
+ readonly pk: {
887
+ readonly field: "pk";
888
+ readonly composite: readonly ["accountConfigId"];
889
+ };
890
+ readonly sk: {
891
+ readonly field: "sk";
892
+ readonly composite: readonly ["labelId"];
893
+ };
894
+ };
895
+ };
896
+ readonly model: {
897
+ readonly entity: "label";
898
+ readonly service: "remit";
899
+ readonly version: "1";
900
+ };
901
+ };
831
902
  export declare const OrganizeJobRequest: {
832
903
  readonly attributes: {
833
904
  readonly organizeJobId: {
@@ -3119,77 +3190,6 @@ export declare const BodyPartContent: {
3119
3190
  readonly version: "1";
3120
3191
  };
3121
3192
  };
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
3193
  export declare const MessageLabel: {
3194
3194
  readonly attributes: {
3195
3195
  readonly messageLabelId: {
package/index.mjs CHANGED
@@ -1113,6 +1113,97 @@ export const Filter = {
1113
1113
  version: "1"
1114
1114
  }
1115
1115
  };
1116
+ export const Label = {
1117
+ attributes: {
1118
+ labelId: {
1119
+ type: "string",
1120
+ required: true,
1121
+ validate: value => {
1122
+ if (typeof value === "string" && value.length < 25)
1123
+ throw new Error("'labelId' must be at least 25 characters");
1124
+ if (typeof value === "string" && value.length > 25)
1125
+ throw new Error("'labelId' must be at most 25 characters");
1126
+ return true;
1127
+ }
1128
+ },
1129
+ accountConfigId: {
1130
+ type: "string",
1131
+ required: true,
1132
+ validate: value => {
1133
+ if (typeof value === "string" && value.length < 25)
1134
+ throw new Error("'accountConfigId' must be at least 25 characters");
1135
+ if (typeof value === "string" && value.length > 25)
1136
+ throw new Error("'accountConfigId' must be at most 25 characters");
1137
+ return true;
1138
+ }
1139
+ },
1140
+ name: {
1141
+ type: "string",
1142
+ required: true,
1143
+ validate: value => {
1144
+ if (typeof value === "string" && value.length > 140)
1145
+ throw new Error("'name' must be at most 140 characters");
1146
+ return true;
1147
+ }
1148
+ },
1149
+ normalizedName: {
1150
+ type: "string",
1151
+ required: true,
1152
+ validate: value => {
1153
+ if (typeof value === "string" && value.length > 140)
1154
+ throw new Error("'normalizedName' must be at most 140 characters");
1155
+ return true;
1156
+ }
1157
+ },
1158
+ color: {
1159
+ type: ["Default", "Red", "Orange", "Yellow", "Green", "Teal", "Blue", "Purple", "Gray"],
1160
+ required: true,
1161
+ default: "Default"
1162
+ },
1163
+ createdAt: {
1164
+ type: "number",
1165
+ readOnly: true,
1166
+ required: true,
1167
+ default: () => Date.now(),
1168
+ set: () => Date.now()
1169
+ },
1170
+ updatedAt: {
1171
+ type: "number",
1172
+ watch: "*",
1173
+ required: true,
1174
+ default: () => Date.now(),
1175
+ set: () => Date.now()
1176
+ }
1177
+ },
1178
+ indexes: {
1179
+ byNormalizedName: {
1180
+ pk: {
1181
+ field: "gsi0pk",
1182
+ composite: ["accountConfigId"]
1183
+ },
1184
+ sk: {
1185
+ field: "gsi0sk",
1186
+ composite: ["normalizedName"]
1187
+ },
1188
+ index: "gsi0"
1189
+ },
1190
+ Label: {
1191
+ pk: {
1192
+ field: "pk",
1193
+ composite: ["accountConfigId"]
1194
+ },
1195
+ sk: {
1196
+ field: "sk",
1197
+ composite: ["labelId"]
1198
+ }
1199
+ }
1200
+ },
1201
+ model: {
1202
+ entity: "label",
1203
+ service: "remit",
1204
+ version: "1"
1205
+ }
1206
+ };
1116
1207
  export const OrganizeJobRequest = {
1117
1208
  attributes: {
1118
1209
  organizeJobId: {
@@ -3976,97 +4067,6 @@ export const BodyPartContent = {
3976
4067
  version: "1"
3977
4068
  }
3978
4069
  };
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
4070
  export const MessageLabel = {
4071
4071
  attributes: {
4072
4072
  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.7",
4
4
  "description": "ElectroDB entities",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",