@degenerate/generic 0.1.9 → 0.1.11

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 (95) hide show
  1. package/dist/application/audit-log/create-application-audit-log.d.ts.map +1 -1
  2. package/dist/application/audit-log/create-application-audit-log.js +1 -1
  3. package/dist/application/database/firestore/generics/add-items-to-database.d.ts.map +1 -1
  4. package/dist/application/database/firestore/generics/add-items-to-database.js +2 -2
  5. package/dist/application/database/firestore/generics/add-or-update-items-to-database.d.ts.map +1 -1
  6. package/dist/application/database/firestore/generics/add-or-update-items-to-database.js +3 -3
  7. package/dist/application/database/firestore/generics/delete-items-on-database.d.ts.map +1 -1
  8. package/dist/application/database/firestore/generics/delete-items-on-database.js +2 -2
  9. package/dist/application/database/firestore/generics/get-item-from-database.d.ts.map +1 -1
  10. package/dist/application/database/firestore/generics/get-item-from-database.js +2 -2
  11. package/dist/application/database/firestore/generics/get-items-different-path-on-database.d.ts.map +1 -1
  12. package/dist/application/database/firestore/generics/get-items-different-path-on-database.js +2 -2
  13. package/dist/application/database/firestore/generics/get-items-from-database.d.ts.map +1 -1
  14. package/dist/application/database/firestore/generics/get-items-from-database.js +2 -2
  15. package/dist/application/database/firestore/generics/update-items-on-database.d.ts.map +1 -1
  16. package/dist/application/database/firestore/generics/update-items-on-database.js +2 -2
  17. package/dist/application/database/firestore/generics/update-items-properties-on-database.d.ts.map +1 -1
  18. package/dist/application/database/firestore/generics/update-items-properties-on-database.js +2 -2
  19. package/dist/authorization/jwt/sign/create-authorization-issuer.d.ts +2 -2
  20. package/dist/authorization/jwt/sign/create-authorization-issuer.d.ts.map +1 -1
  21. package/dist/authorization/jwt/sign/create-authorization-subject.d.ts +2 -2
  22. package/dist/authorization/jwt/sign/create-authorization-subject.d.ts.map +1 -1
  23. package/dist/authorization/jwt/sign/create-jwt-options.d.ts +2 -2
  24. package/dist/authorization/jwt/sign/create-jwt-options.d.ts.map +1 -1
  25. package/dist/authorization/safe/authorization/authorized-authorities.d.ts +5 -5
  26. package/dist/authorization/safe/authorization/authorized-authorities.d.ts.map +1 -1
  27. package/dist/authorization/safe/request/determine-issuer-from-request.d.ts +2 -2
  28. package/dist/authorization/safe/request/determine-issuer-from-request.d.ts.map +1 -1
  29. package/dist/authorization/safe/request/issuer/determine-issuer-from-bearer-token.d.ts +2 -2
  30. package/dist/authorization/safe/request/issuer/determine-issuer-from-bearer-token.d.ts.map +1 -1
  31. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-issuer.d.ts +2 -2
  32. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-issuer.d.ts.map +1 -1
  33. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-subject.d.ts +2 -2
  34. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-subject.d.ts.map +1 -1
  35. package/dist/helpers/request/params-object-helpers.d.ts +7 -1
  36. package/dist/helpers/request/params-object-helpers.d.ts.map +1 -1
  37. package/dist/helpers/request/params-object-helpers.js +10 -1
  38. package/dist/helpers/request/request-object-helpers.d.ts +16 -1
  39. package/dist/helpers/request/request-object-helpers.d.ts.map +1 -1
  40. package/dist/helpers/request/request-object-helpers.js +25 -2
  41. package/dist/models/application/audit-log/application-audit-log-models.d.ts +144 -60
  42. package/dist/models/application/audit-log/application-audit-log-models.d.ts.map +1 -1
  43. package/dist/models/application/audit-log/application-audit-log-models.js +87 -41
  44. package/dist/models/application/database/firestore-models.d.ts +370 -54
  45. package/dist/models/application/database/firestore-models.d.ts.map +1 -1
  46. package/dist/models/application/database/firestore-models.js +119 -1
  47. package/dist/models/authorization/authorization-models.d.ts +76 -33
  48. package/dist/models/authorization/authorization-models.d.ts.map +1 -1
  49. package/dist/models/authorization/authorization-models.js +82 -12
  50. package/dist/models/crypto/crypto-models.d.ts +10 -2
  51. package/dist/models/crypto/crypto-models.d.ts.map +1 -1
  52. package/dist/models/crypto/crypto-models.js +6 -0
  53. package/dist/models/data/data-models.d.ts +18 -5
  54. package/dist/models/data/data-models.d.ts.map +1 -1
  55. package/dist/models/data/data-models.js +24 -1
  56. package/dist/models/dynamic-execution/dynamic-execution-models.d.ts +13 -3
  57. package/dist/models/dynamic-execution/dynamic-execution-models.d.ts.map +1 -1
  58. package/dist/models/dynamic-execution/dynamic-execution-models.js +10 -0
  59. package/dist/models/events/share-event-models.d.ts +145 -24
  60. package/dist/models/events/share-event-models.d.ts.map +1 -1
  61. package/dist/models/events/share-event-models.js +53 -2
  62. package/dist/models/functions/share-data-function-models.d.ts +251 -32
  63. package/dist/models/functions/share-data-function-models.d.ts.map +1 -1
  64. package/dist/models/functions/share-data-function-models.js +100 -3
  65. package/dist/models/generic/request-response-models.d.ts +11 -3
  66. package/dist/models/generic/request-response-models.d.ts.map +1 -1
  67. package/dist/models/generic/request-response-models.js +9 -0
  68. package/dist/models/index.d.ts +2 -1
  69. package/dist/models/index.d.ts.map +1 -1
  70. package/dist/models/index.js +6 -1
  71. package/dist/models/safe/rules/share-rule-models.d.ts +931 -0
  72. package/dist/models/safe/rules/share-rule-models.d.ts.map +1 -0
  73. package/dist/models/safe/rules/share-rule-models.js +341 -0
  74. package/dist/models/safe/safe-transaction-models.d.ts +137 -20
  75. package/dist/models/safe/safe-transaction-models.d.ts.map +1 -1
  76. package/dist/models/safe/safe-transaction-models.js +88 -3
  77. package/dist/models/safe/transactions/authorities-transactions-models.d.ts +391 -0
  78. package/dist/models/safe/transactions/authorities-transactions-models.d.ts.map +1 -0
  79. package/dist/models/safe/transactions/authorities-transactions-models.js +56 -0
  80. package/dist/models/share-data/share-data.d.ts +144 -23
  81. package/dist/models/share-data/share-data.d.ts.map +1 -1
  82. package/dist/models/share-data/share-data.js +66 -1
  83. package/dist/transactions/authority/create-safe-transaction-authority-data.d.ts +14 -0
  84. package/dist/transactions/authority/create-safe-transaction-authority-data.d.ts.map +1 -0
  85. package/dist/transactions/authority/create-safe-transaction-authority-data.js +21 -0
  86. package/dist/transactions/authority/create-safe-transaction-authority.d.ts +15 -0
  87. package/dist/transactions/authority/create-safe-transaction-authority.d.ts.map +1 -0
  88. package/dist/transactions/authority/create-safe-transaction-authority.js +29 -0
  89. package/dist/transactions/index.d.ts +3 -0
  90. package/dist/transactions/index.d.ts.map +1 -0
  91. package/dist/transactions/index.js +20 -0
  92. package/package.json +2 -2
  93. package/dist/models/rules/share-rule-models.d.ts +0 -303
  94. package/dist/models/rules/share-rule-models.d.ts.map +0 -1
  95. package/dist/models/rules/share-rule-models.js +0 -93
@@ -1,84 +1,400 @@
1
- import { CollectionReference, DocumentReference } from 'firebase-admin/firestore';
2
1
  import * as admin from 'firebase-admin';
3
- import { IAdditionalApplicationAuditLogIds, ApplicationAuditLogSubType, IApplicationAuditLog } from '../audit-log/application-audit-log-models';
2
+ import { z } from 'zod';
3
+ /**
4
+ * This contains the additional information audit logs.
5
+ */
6
+ export declare const IDatabaseAuditLogUpdatesSchema: z.ZodObject<{
7
+ alai: z.ZodArray<z.ZodObject<{
8
+ referencePath: z.ZodString;
9
+ referenceId: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ referencePath: string;
12
+ referenceId: string;
13
+ }, {
14
+ referencePath: string;
15
+ referenceId: string;
16
+ }>, "many">;
17
+ auditLogSubType: z.ZodUnion<[z.ZodEnum<["administrator"]>, z.ZodEnum<["multiplePathALAI"]>, z.ZodEnum<["userRelatedProfile"]>, z.ZodEnum<["profile"]>]>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ alai: {
20
+ referencePath: string;
21
+ referenceId: string;
22
+ }[];
23
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
24
+ }, {
25
+ alai: {
26
+ referencePath: string;
27
+ referenceId: string;
28
+ }[];
29
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
30
+ }>;
31
+ export type IDatabaseAuditLogUpdates = z.infer<typeof IDatabaseAuditLogUpdatesSchema>;
4
32
  /**
5
33
  * This contains the information that is needed to pass a change to the generic database functions.
6
34
  */
7
- export interface IDatabaseChangeInformation {
8
- alai: IAdditionalApplicationAuditLogIds[];
9
- auditLogSubType: ApplicationAuditLogSubType;
10
- item: unknown;
11
- itemDocRef: DocumentReference;
12
- }
35
+ export declare const IDatabaseChangeInformationSchema: z.ZodObject<{
36
+ alai: z.ZodArray<z.ZodObject<{
37
+ referencePath: z.ZodString;
38
+ referenceId: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ referencePath: string;
41
+ referenceId: string;
42
+ }, {
43
+ referencePath: string;
44
+ referenceId: string;
45
+ }>, "many">;
46
+ auditLogSubType: z.ZodUnion<[z.ZodEnum<["administrator"]>, z.ZodEnum<["multiplePathALAI"]>, z.ZodEnum<["userRelatedProfile"]>, z.ZodEnum<["profile"]>]>;
47
+ item: z.ZodUnknown;
48
+ itemDocRef: z.ZodType<admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>, z.ZodTypeDef, admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ alai: {
51
+ referencePath: string;
52
+ referenceId: string;
53
+ }[];
54
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
55
+ itemDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
56
+ item?: unknown;
57
+ }, {
58
+ alai: {
59
+ referencePath: string;
60
+ referenceId: string;
61
+ }[];
62
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
63
+ itemDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
64
+ item?: unknown;
65
+ }>;
66
+ export type IDatabaseChangeInformation = z.infer<typeof IDatabaseChangeInformationSchema>;
13
67
  /**
14
68
  * This contains the information that is needed to pass a change to the generic database functions.
15
69
  * It allows for a property of an object to be retrieved and updated without needing the original
16
70
  * object when called.
17
71
  */
18
- export interface IDatabasePropertyChangeInformation {
19
- alai: IAdditionalApplicationAuditLogIds[];
20
- auditLogSubType: ApplicationAuditLogSubType;
21
- partialObjectUpdate: any;
22
- itemDocRef: DocumentReference;
23
- }
72
+ export declare const IDatabasePropertyChangeInformationSchema: z.ZodObject<{
73
+ alai: z.ZodArray<z.ZodObject<{
74
+ referencePath: z.ZodString;
75
+ referenceId: z.ZodString;
76
+ }, "strip", z.ZodTypeAny, {
77
+ referencePath: string;
78
+ referenceId: string;
79
+ }, {
80
+ referencePath: string;
81
+ referenceId: string;
82
+ }>, "many">;
83
+ auditLogSubType: z.ZodUnion<[z.ZodEnum<["administrator"]>, z.ZodEnum<["multiplePathALAI"]>, z.ZodEnum<["userRelatedProfile"]>, z.ZodEnum<["profile"]>]>;
84
+ partialObjectUpdate: z.ZodAny;
85
+ itemDocRef: z.ZodType<admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>, z.ZodTypeDef, admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>>;
86
+ }, "strip", z.ZodTypeAny, {
87
+ alai: {
88
+ referencePath: string;
89
+ referenceId: string;
90
+ }[];
91
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
92
+ itemDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
93
+ partialObjectUpdate?: any;
94
+ }, {
95
+ alai: {
96
+ referencePath: string;
97
+ referenceId: string;
98
+ }[];
99
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
100
+ itemDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
101
+ partialObjectUpdate?: any;
102
+ }>;
103
+ export type IDatabasePropertyChangeInformation = z.infer<typeof IDatabasePropertyChangeInformationSchema>;
24
104
  /**
25
- * This contains the information records and audit logs for database changes
105
+ * This contains the information for a record and its reference
26
106
  */
27
- export interface IDatabaseUpdates {
28
- recordsandRefs: IDatabaseRecordAndRef[];
29
- auditLogInfo: IApplicationAuditLog;
30
- }
107
+ export declare const IDatabaseRecordAndRefSchema: z.ZodObject<{
108
+ record: z.ZodUnknown;
109
+ recordDocRef: z.ZodType<admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>, z.ZodTypeDef, admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ recordDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
112
+ record?: unknown;
113
+ }, {
114
+ recordDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
115
+ record?: unknown;
116
+ }>;
117
+ export type IDatabaseRecordAndRef = z.infer<typeof IDatabaseRecordAndRefSchema>;
31
118
  /**
32
- * This contains the database record and document reference to update.
119
+ * This contains the information records and audit logs for database changes
33
120
  */
34
- export interface IDatabaseRecordAndRef {
35
- record: unknown;
36
- recordDocRef: DocumentReference;
37
- }
121
+ export declare const IDatabaseUpdatesSchema: z.ZodObject<{
122
+ recordsandRefs: z.ZodArray<z.ZodObject<{
123
+ record: z.ZodUnknown;
124
+ recordDocRef: z.ZodType<admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>, z.ZodTypeDef, admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ recordDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
127
+ record?: unknown;
128
+ }, {
129
+ recordDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
130
+ record?: unknown;
131
+ }>, "many">;
132
+ auditLogInfo: z.ZodObject<{
133
+ additionalAuditLogIds: z.ZodArray<z.ZodObject<{
134
+ referencePath: z.ZodString;
135
+ referenceId: z.ZodString;
136
+ }, "strip", z.ZodTypeAny, {
137
+ referencePath: string;
138
+ referenceId: string;
139
+ }, {
140
+ referencePath: string;
141
+ referenceId: string;
142
+ }>, "many">;
143
+ applicationAuditLogAction: z.ZodEnum<["create", "update", "delete", "read", "list", "file"]>;
144
+ applicationAuditLogType: z.ZodEnum<["authorizedAuthority", "global"]>;
145
+ applicationAuditLogSubType: z.ZodUnion<[z.ZodEnum<["administrator"]>, z.ZodEnum<["multiplePathALAI"]>, z.ZodEnum<["userRelatedProfile"]>, z.ZodEnum<["profile"]>]>;
146
+ createdAt: z.ZodNumber;
147
+ createdBy: z.ZodString;
148
+ currentData: z.ZodOptional<z.ZodAny>;
149
+ previousData: z.ZodOptional<z.ZodAny>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ additionalAuditLogIds: {
152
+ referencePath: string;
153
+ referenceId: string;
154
+ }[];
155
+ applicationAuditLogAction: "create" | "update" | "delete" | "read" | "list" | "file";
156
+ applicationAuditLogType: "authorizedAuthority" | "global";
157
+ applicationAuditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
158
+ createdAt: number;
159
+ createdBy: string;
160
+ currentData?: any;
161
+ previousData?: any;
162
+ }, {
163
+ additionalAuditLogIds: {
164
+ referencePath: string;
165
+ referenceId: string;
166
+ }[];
167
+ applicationAuditLogAction: "create" | "update" | "delete" | "read" | "list" | "file";
168
+ applicationAuditLogType: "authorizedAuthority" | "global";
169
+ applicationAuditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
170
+ createdAt: number;
171
+ createdBy: string;
172
+ currentData?: any;
173
+ previousData?: any;
174
+ }>;
175
+ }, "strip", z.ZodTypeAny, {
176
+ recordsandRefs: {
177
+ recordDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
178
+ record?: unknown;
179
+ }[];
180
+ auditLogInfo: {
181
+ additionalAuditLogIds: {
182
+ referencePath: string;
183
+ referenceId: string;
184
+ }[];
185
+ applicationAuditLogAction: "create" | "update" | "delete" | "read" | "list" | "file";
186
+ applicationAuditLogType: "authorizedAuthority" | "global";
187
+ applicationAuditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
188
+ createdAt: number;
189
+ createdBy: string;
190
+ currentData?: any;
191
+ previousData?: any;
192
+ };
193
+ }, {
194
+ recordsandRefs: {
195
+ recordDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
196
+ record?: unknown;
197
+ }[];
198
+ auditLogInfo: {
199
+ additionalAuditLogIds: {
200
+ referencePath: string;
201
+ referenceId: string;
202
+ }[];
203
+ applicationAuditLogAction: "create" | "update" | "delete" | "read" | "list" | "file";
204
+ applicationAuditLogType: "authorizedAuthority" | "global";
205
+ applicationAuditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
206
+ createdAt: number;
207
+ createdBy: string;
208
+ currentData?: any;
209
+ previousData?: any;
210
+ };
211
+ }>;
212
+ export type IDatabaseUpdates = z.infer<typeof IDatabaseUpdatesSchema>;
213
+ export declare const OrderByDirectionSchema: z.ZodEnum<["desc", "asc"]>;
214
+ export type OrderByDirection = z.infer<typeof OrderByDirectionSchema>;
215
+ export declare const WhereFilterOpSchema: z.ZodEnum<["<", "<=", "==", "!=", ">=", ">", "array-contains", "in", "not-in", "array-contains-any"]>;
216
+ export type WhereFilterOp = z.infer<typeof WhereFilterOpSchema>;
38
217
  /**
39
218
  * This contains the information to get a single item from the database.
40
219
  */
41
- export interface IDatabaseGetItem extends IDatabaseAuditLogUpdates {
42
- itemDocRef: DocumentReference;
220
+ export declare const IDatabaseGetItemSchema: z.ZodObject<z.objectUtil.extendShape<{
221
+ alai: z.ZodArray<z.ZodObject<{
222
+ referencePath: z.ZodString;
223
+ referenceId: z.ZodString;
224
+ }, "strip", z.ZodTypeAny, {
225
+ referencePath: string;
226
+ referenceId: string;
227
+ }, {
228
+ referencePath: string;
229
+ referenceId: string;
230
+ }>, "many">;
231
+ auditLogSubType: z.ZodUnion<[z.ZodEnum<["administrator"]>, z.ZodEnum<["multiplePathALAI"]>, z.ZodEnum<["userRelatedProfile"]>, z.ZodEnum<["profile"]>]>;
232
+ }, {
233
+ itemDocRef: z.ZodType<admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>, z.ZodTypeDef, admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>>;
234
+ throwErrorOnNotFound: z.ZodBoolean;
235
+ }>, "strip", z.ZodTypeAny, {
236
+ alai: {
237
+ referencePath: string;
238
+ referenceId: string;
239
+ }[];
240
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
241
+ itemDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
43
242
  throwErrorOnNotFound: boolean;
44
- }
45
- /**
46
- * This contains the information that is needed to get multiple items from the database.
47
- */
48
- export interface IDatabaseGetInformation extends IDatabaseAuditLogUpdates {
49
- itemColRef: CollectionReference;
50
- lastId: string;
51
- orderBy?: IDatabaseOrderBy;
52
- queryFields: IDatabaseQueryFields[];
53
- isMaxSizeDocumentSet?: boolean;
54
- }
243
+ }, {
244
+ alai: {
245
+ referencePath: string;
246
+ referenceId: string;
247
+ }[];
248
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
249
+ itemDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
250
+ throwErrorOnNotFound: boolean;
251
+ }>;
252
+ export type IDatabaseGetItem = z.infer<typeof IDatabaseGetItemSchema>;
55
253
  /**
56
254
  * This contains the information that is needed to get information from the database.
57
255
  */
58
- export interface IDatabaseOrderBy {
256
+ export declare const IDatabaseOrderBySchema: z.ZodObject<{
257
+ fieldPath: z.ZodUnion<[z.ZodString, z.ZodType<admin.firestore.FieldPath, z.ZodTypeDef, admin.firestore.FieldPath>]>;
258
+ direction: z.ZodEnum<["desc", "asc"]>;
259
+ }, "strip", z.ZodTypeAny, {
260
+ fieldPath: string | admin.firestore.FieldPath;
261
+ direction: "desc" | "asc";
262
+ }, {
59
263
  fieldPath: string | admin.firestore.FieldPath;
60
- direction: admin.firestore.OrderByDirection;
61
- }
264
+ direction: "desc" | "asc";
265
+ }>;
266
+ export type IDatabaseOrderBy = z.infer<typeof IDatabaseOrderBySchema>;
62
267
  /**
63
268
  * This contains the query information for the database if it is required
64
269
  */
65
- export interface IDatabaseQueryFields {
270
+ export declare const IDatabaseQueryFieldsSchema: z.ZodObject<{
271
+ fieldPath: z.ZodUnion<[z.ZodString, z.ZodType<admin.firestore.FieldPath, z.ZodTypeDef, admin.firestore.FieldPath>]>;
272
+ opStr: z.ZodEnum<["<", "<=", "==", "!=", ">=", ">", "array-contains", "in", "not-in", "array-contains-any"]>;
273
+ value: z.ZodAny;
274
+ }, "strip", z.ZodTypeAny, {
66
275
  fieldPath: string | admin.firestore.FieldPath;
67
- opStr: admin.firestore.WhereFilterOp;
68
- value: any;
69
- }
276
+ opStr: "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains" | "in" | "not-in" | "array-contains-any";
277
+ value?: any;
278
+ }, {
279
+ fieldPath: string | admin.firestore.FieldPath;
280
+ opStr: "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains" | "in" | "not-in" | "array-contains-any";
281
+ value?: any;
282
+ }>;
283
+ export type IDatabaseQueryFields = z.infer<typeof IDatabaseQueryFieldsSchema>;
70
284
  /**
71
- * This contains the information to delete a single item from the database.
285
+ * This contains the information that is needed to get multiple items from the database.
72
286
  */
73
- export interface IDatabaseDeleteItem extends IDatabaseAuditLogUpdates {
74
- itemDocRef: DocumentReference;
75
- throwErrorOnNotFound: boolean;
76
- }
287
+ export declare const IDatabaseGetInformationSchema: z.ZodObject<z.objectUtil.extendShape<{
288
+ alai: z.ZodArray<z.ZodObject<{
289
+ referencePath: z.ZodString;
290
+ referenceId: z.ZodString;
291
+ }, "strip", z.ZodTypeAny, {
292
+ referencePath: string;
293
+ referenceId: string;
294
+ }, {
295
+ referencePath: string;
296
+ referenceId: string;
297
+ }>, "many">;
298
+ auditLogSubType: z.ZodUnion<[z.ZodEnum<["administrator"]>, z.ZodEnum<["multiplePathALAI"]>, z.ZodEnum<["userRelatedProfile"]>, z.ZodEnum<["profile"]>]>;
299
+ }, {
300
+ itemColRef: z.ZodType<admin.firestore.CollectionReference<admin.firestore.DocumentData, admin.firestore.DocumentData>, z.ZodTypeDef, admin.firestore.CollectionReference<admin.firestore.DocumentData, admin.firestore.DocumentData>>;
301
+ lastId: z.ZodString;
302
+ orderBy: z.ZodOptional<z.ZodObject<{
303
+ fieldPath: z.ZodUnion<[z.ZodString, z.ZodType<admin.firestore.FieldPath, z.ZodTypeDef, admin.firestore.FieldPath>]>;
304
+ direction: z.ZodEnum<["desc", "asc"]>;
305
+ }, "strip", z.ZodTypeAny, {
306
+ fieldPath: string | admin.firestore.FieldPath;
307
+ direction: "desc" | "asc";
308
+ }, {
309
+ fieldPath: string | admin.firestore.FieldPath;
310
+ direction: "desc" | "asc";
311
+ }>>;
312
+ queryFields: z.ZodArray<z.ZodObject<{
313
+ fieldPath: z.ZodUnion<[z.ZodString, z.ZodType<admin.firestore.FieldPath, z.ZodTypeDef, admin.firestore.FieldPath>]>;
314
+ opStr: z.ZodEnum<["<", "<=", "==", "!=", ">=", ">", "array-contains", "in", "not-in", "array-contains-any"]>;
315
+ value: z.ZodAny;
316
+ }, "strip", z.ZodTypeAny, {
317
+ fieldPath: string | admin.firestore.FieldPath;
318
+ opStr: "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains" | "in" | "not-in" | "array-contains-any";
319
+ value?: any;
320
+ }, {
321
+ fieldPath: string | admin.firestore.FieldPath;
322
+ opStr: "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains" | "in" | "not-in" | "array-contains-any";
323
+ value?: any;
324
+ }>, "many">;
325
+ isMaxSizeDocumentSet: z.ZodOptional<z.ZodBoolean>;
326
+ }>, "strip", z.ZodTypeAny, {
327
+ alai: {
328
+ referencePath: string;
329
+ referenceId: string;
330
+ }[];
331
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
332
+ itemColRef: admin.firestore.CollectionReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
333
+ lastId: string;
334
+ queryFields: {
335
+ fieldPath: string | admin.firestore.FieldPath;
336
+ opStr: "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains" | "in" | "not-in" | "array-contains-any";
337
+ value?: any;
338
+ }[];
339
+ orderBy?: {
340
+ fieldPath: string | admin.firestore.FieldPath;
341
+ direction: "desc" | "asc";
342
+ } | undefined;
343
+ isMaxSizeDocumentSet?: boolean | undefined;
344
+ }, {
345
+ alai: {
346
+ referencePath: string;
347
+ referenceId: string;
348
+ }[];
349
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
350
+ itemColRef: admin.firestore.CollectionReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
351
+ lastId: string;
352
+ queryFields: {
353
+ fieldPath: string | admin.firestore.FieldPath;
354
+ opStr: "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains" | "in" | "not-in" | "array-contains-any";
355
+ value?: any;
356
+ }[];
357
+ orderBy?: {
358
+ fieldPath: string | admin.firestore.FieldPath;
359
+ direction: "desc" | "asc";
360
+ } | undefined;
361
+ isMaxSizeDocumentSet?: boolean | undefined;
362
+ }>;
363
+ export type IDatabaseGetInformation = z.infer<typeof IDatabaseGetInformationSchema>;
77
364
  /**
78
- * This contains the additional information audit logs.
365
+ * This contains the information to delete a single item from the database.
79
366
  */
80
- export interface IDatabaseAuditLogUpdates {
81
- alai: IAdditionalApplicationAuditLogIds[];
82
- auditLogSubType: ApplicationAuditLogSubType;
83
- }
367
+ export declare const IDatabaseDeleteItemSchema: z.ZodObject<z.objectUtil.extendShape<{
368
+ alai: z.ZodArray<z.ZodObject<{
369
+ referencePath: z.ZodString;
370
+ referenceId: z.ZodString;
371
+ }, "strip", z.ZodTypeAny, {
372
+ referencePath: string;
373
+ referenceId: string;
374
+ }, {
375
+ referencePath: string;
376
+ referenceId: string;
377
+ }>, "many">;
378
+ auditLogSubType: z.ZodUnion<[z.ZodEnum<["administrator"]>, z.ZodEnum<["multiplePathALAI"]>, z.ZodEnum<["userRelatedProfile"]>, z.ZodEnum<["profile"]>]>;
379
+ }, {
380
+ itemDocRef: z.ZodType<admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>, z.ZodTypeDef, admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>>;
381
+ throwErrorOnNotFound: z.ZodBoolean;
382
+ }>, "strip", z.ZodTypeAny, {
383
+ alai: {
384
+ referencePath: string;
385
+ referenceId: string;
386
+ }[];
387
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
388
+ itemDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
389
+ throwErrorOnNotFound: boolean;
390
+ }, {
391
+ alai: {
392
+ referencePath: string;
393
+ referenceId: string;
394
+ }[];
395
+ auditLogSubType: "administrator" | "multiplePathALAI" | "userRelatedProfile" | "profile";
396
+ itemDocRef: admin.firestore.DocumentReference<admin.firestore.DocumentData, admin.firestore.DocumentData>;
397
+ throwErrorOnNotFound: boolean;
398
+ }>;
399
+ export type IDatabaseDeleteItem = z.infer<typeof IDatabaseDeleteItemSchema>;
84
400
  //# sourceMappingURL=firestore-models.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"firestore-models.d.ts","sourceRoot":"","sources":["../../../../src/models/application/database/firestore-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EACH,iCAAiC,EACjC,0BAA0B,EAC1B,oBAAoB,EACvB,MAAM,2CAA2C,CAAC;AAMnD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,iCAAiC,EAAE,CAAC;IAC1C,eAAe,EAAE,0BAA0B,CAAC;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,iBAAiB,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IAC/C,IAAI,EAAE,iCAAiC,EAAE,CAAC;IAC1C,eAAe,EAAE,0BAA0B,CAAC;IAE5C,mBAAmB,EAAE,GAAG,CAAC;IACzB,UAAU,EAAE,iBAAiB,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,cAAc,EAAE,qBAAqB,EAAE,CAAC;IACxC,YAAY,EAAE,oBAAoB,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,iBAAiB,CAAC;CACnC;AAMD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,wBAAwB;IAC9D,UAAU,EAAE,iBAAiB,CAAC;IAC9B,oBAAoB,EAAE,OAAO,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,wBAAwB;IACrE,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;IAC9C,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;IAC9C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IAErC,KAAK,EAAE,GAAG,CAAC;CACd;AAMD;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB;IACjE,UAAU,EAAE,iBAAiB,CAAC;IAC9B,oBAAoB,EAAE,OAAO,CAAC;CACjC;AAMD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,iCAAiC,EAAE,CAAC;IAC1C,eAAe,EAAE,0BAA0B,CAAC;CAC/C"}
1
+ {"version":3,"file":"firestore-models.d.ts","sourceRoot":"","sources":["../../../../src/models/application/database/firestore-models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB;;GAEG;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;EAGzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAMtF;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F;;;;GAIG;AACH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKnD,CAAC;AAEH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAE1G;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;EAGtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAQtE,eAAO,MAAM,sBAAsB,4BAA0B,CAAC;AAG9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,eAAO,MAAM,mBAAmB,uGAA8G,CAAA;AAC9I,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AAGH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;EAIrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAG9E;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxC,CAAC;AAGH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAOpF;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -1,4 +1,122 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.IDatabaseDeleteItemSchema = exports.IDatabaseGetInformationSchema = exports.IDatabaseQueryFieldsSchema = exports.IDatabaseOrderBySchema = exports.IDatabaseGetItemSchema = exports.WhereFilterOpSchema = exports.OrderByDirectionSchema = exports.IDatabaseUpdatesSchema = exports.IDatabaseRecordAndRefSchema = exports.IDatabasePropertyChangeInformationSchema = exports.IDatabaseChangeInformationSchema = exports.IDatabaseAuditLogUpdatesSchema = void 0;
27
+ const admin = __importStar(require("firebase-admin"));
28
+ const zod_1 = require("zod");
29
+ const firestore_1 = require("firebase-admin/firestore");
30
+ const application_audit_log_models_1 = require("../audit-log/application-audit-log-models");
31
+ //#region Backend Data Models
32
+ //#region Audit Log Information
33
+ /**
34
+ * This contains the additional information audit logs.
35
+ */
36
+ exports.IDatabaseAuditLogUpdatesSchema = zod_1.z.object({
37
+ alai: zod_1.z.array(application_audit_log_models_1.AdditionalApplicationAuditLogIdsSchema), // the additional application audit log ids
38
+ auditLogSubType: application_audit_log_models_1.ApplicationAuditLogSubTypeSchema, // the audit log sub type
39
+ });
3
40
  //#endregion Audit Log Information
4
- //#endregion Backend Data Models
41
+ //#region Database Change Information
42
+ /**
43
+ * This contains the information that is needed to pass a change to the generic database functions.
44
+ */
45
+ exports.IDatabaseChangeInformationSchema = zod_1.z.object({
46
+ alai: zod_1.z.array(application_audit_log_models_1.AdditionalApplicationAuditLogIdsSchema), // the additional application audit log ids
47
+ auditLogSubType: application_audit_log_models_1.ApplicationAuditLogSubTypeSchema, // the audit log sub type
48
+ item: zod_1.z.unknown(), // the item to add to the database
49
+ itemDocRef: zod_1.z.custom(arg => arg instanceof firestore_1.DocumentReference), // the item document reference (where to add the item to the database)
50
+ });
51
+ /**
52
+ * This contains the information that is needed to pass a change to the generic database functions.
53
+ * It allows for a property of an object to be retrieved and updated without needing the original
54
+ * object when called.
55
+ */
56
+ exports.IDatabasePropertyChangeInformationSchema = zod_1.z.object({
57
+ alai: zod_1.z.array(application_audit_log_models_1.AdditionalApplicationAuditLogIdsSchema), // the additional application audit log ids
58
+ auditLogSubType: application_audit_log_models_1.ApplicationAuditLogSubTypeSchema, // the audit log sub type
59
+ partialObjectUpdate: zod_1.z.any(), // the partial object to update
60
+ itemDocRef: zod_1.z.custom(arg => arg instanceof firestore_1.DocumentReference), // the item document reference (where to add the item to the database)
61
+ });
62
+ /**
63
+ * This contains the information for a record and its reference
64
+ */
65
+ exports.IDatabaseRecordAndRefSchema = zod_1.z.object({
66
+ record: zod_1.z.unknown(), // the record to update
67
+ recordDocRef: zod_1.z.custom(arg => arg instanceof firestore_1.DocumentReference), // the record document reference
68
+ });
69
+ /**
70
+ * This contains the information records and audit logs for database changes
71
+ */
72
+ exports.IDatabaseUpdatesSchema = zod_1.z.object({
73
+ recordsandRefs: zod_1.z.array(exports.IDatabaseRecordAndRefSchema), // the record to update
74
+ auditLogInfo: application_audit_log_models_1.IApplicationAuditLogSchema, // the audit logs to add
75
+ });
76
+ //#endregion Database Change Information
77
+ //#region Database Get Information
78
+ // Define the OrderByDirection schema
79
+ exports.OrderByDirectionSchema = zod_1.z.enum(['desc', 'asc']);
80
+ // Define the WhereFilterOpSchema schema
81
+ exports.WhereFilterOpSchema = zod_1.z.enum(['<', '<=', '==', '!=', '>=', '>', 'array-contains', 'in', 'not-in', 'array-contains-any']);
82
+ /**
83
+ * This contains the information to get a single item from the database.
84
+ */
85
+ exports.IDatabaseGetItemSchema = exports.IDatabaseAuditLogUpdatesSchema.extend({
86
+ itemDocRef: zod_1.z.custom(arg => arg instanceof firestore_1.DocumentReference), // the document reference to get the item from
87
+ throwErrorOnNotFound: zod_1.z.boolean(), // if true, then throw an error if the item is not found.
88
+ });
89
+ /**
90
+ * This contains the information that is needed to get information from the database.
91
+ */
92
+ exports.IDatabaseOrderBySchema = zod_1.z.object({
93
+ fieldPath: zod_1.z.union([zod_1.z.string(), zod_1.z.instanceof(admin.firestore.FieldPath)]), // the field to order by
94
+ direction: exports.OrderByDirectionSchema, // the direction to order by
95
+ });
96
+ /**
97
+ * This contains the query information for the database if it is required
98
+ */
99
+ exports.IDatabaseQueryFieldsSchema = zod_1.z.object({
100
+ fieldPath: zod_1.z.union([zod_1.z.string(), zod_1.z.instanceof(admin.firestore.FieldPath)]),
101
+ opStr: exports.WhereFilterOpSchema,
102
+ value: zod_1.z.any(),
103
+ });
104
+ /**
105
+ * This contains the information that is needed to get multiple items from the database.
106
+ */
107
+ exports.IDatabaseGetInformationSchema = exports.IDatabaseAuditLogUpdatesSchema.extend({
108
+ itemColRef: zod_1.z.custom(arg => arg instanceof firestore_1.CollectionReference), // the collection reference to get the items from
109
+ lastId: zod_1.z.string(), // the last id to get the next set of items.
110
+ orderBy: exports.IDatabaseOrderBySchema.optional(), // how to order the items
111
+ queryFields: zod_1.z.array(exports.IDatabaseQueryFieldsSchema), // the fields to query
112
+ isMaxSizeDocumentSet: zod_1.z.boolean().optional(), // if true, then the max size document the max number of docs to return
113
+ });
114
+ //#endregion Database Get Information
115
+ //#region Database Delete Information
116
+ /**
117
+ * This contains the information to delete a single item from the database.
118
+ */
119
+ exports.IDatabaseDeleteItemSchema = exports.IDatabaseAuditLogUpdatesSchema.extend({
120
+ itemDocRef: zod_1.z.custom(arg => arg instanceof firestore_1.DocumentReference), // the document reference to get the item to delete
121
+ throwErrorOnNotFound: zod_1.z.boolean(), // if true, then throw an error if the item is not found.
122
+ });