@degenerate/endpoints 0.0.11 → 0.0.12

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 (25) hide show
  1. package/dist/cors/endpoints/helpers/validate-incoming-request-data.d.ts.map +1 -1
  2. package/dist/cors/endpoints/helpers/validate-incoming-request-data.js +1 -0
  3. package/dist/cors/routes/authorities/v1.routes.d.ts.map +1 -1
  4. package/dist/cors/routes/authorities/v1.routes.js +4 -3
  5. package/dist/schema/rules-transactions.schema.d.ts +109 -281
  6. package/dist/schema/rules-transactions.schema.d.ts.map +1 -1
  7. package/dist/schema/transactions.schema.d.ts +16 -17
  8. package/dist/schema/transactions.schema.d.ts.map +1 -1
  9. package/dist/schema/transactions.schema.js +9 -11
  10. package/package.json +3 -3
  11. package/dist/cors/endpoints/authorities/validate-authorities-transaction.d.ts +0 -30
  12. package/dist/cors/endpoints/authorities/validate-authorities-transaction.d.ts.map +0 -1
  13. package/dist/cors/endpoints/authorities/validate-authorities-transaction.js +0 -155
  14. package/dist/schema/authorities-transactions.schema.d.ts +0 -306
  15. package/dist/schema/authorities-transactions.schema.d.ts.map +0 -1
  16. package/dist/schema/authorities-transactions.schema.js +0 -71
  17. package/dist/schema/rules/rules-conditions.schema.d.ts +0 -402
  18. package/dist/schema/rules/rules-conditions.schema.d.ts.map +0 -1
  19. package/dist/schema/rules/rules-conditions.schema.js +0 -99
  20. package/dist/schema/rules/rules-enums.schema.d.ts +0 -39
  21. package/dist/schema/rules/rules-enums.schema.d.ts.map +0 -1
  22. package/dist/schema/rules/rules-enums.schema.js +0 -90
  23. package/dist/schema/rules/rules.schema.d.ts +0 -2839
  24. package/dist/schema/rules/rules.schema.d.ts.map +0 -1
  25. package/dist/schema/rules/rules.schema.js +0 -76
@@ -1 +1 @@
1
- {"version":3,"file":"validate-incoming-request-data.d.ts","sourceRoot":"","sources":["../../../../src/cors/endpoints/helpers/validate-incoming-request-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG1D;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,SAC9D,OAAO,OAAO,QAAQ,QAAQ,YAAY,UAa1D"}
1
+ {"version":3,"file":"validate-incoming-request-data.d.ts","sourceRoot":"","sources":["../../../../src/cors/endpoints/helpers/validate-incoming-request-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG1D;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,SAC9D,OAAO,OAAO,QAAQ,QAAQ,YAAY,UAc1D"}
@@ -11,6 +11,7 @@ const generic_1 = require("@degenerate/generic");
11
11
  */
12
12
  function validateIncomingRequestData(schema) {
13
13
  return (req, res, next) => {
14
+ console.log('req.body', req.body);
14
15
  try {
15
16
  schema.parse(req.body);
16
17
  next();
@@ -1 +1 @@
1
- {"version":3,"file":"v1.routes.d.ts","sourceRoot":"","sources":["../../../../src/cors/routes/authorities/v1.routes.ts"],"names":[],"mappings":"AAgGA,eAAO,MAAM,EAAE,4CAAS,CAAC"}
1
+ {"version":3,"file":"v1.routes.d.ts","sourceRoot":"","sources":["../../../../src/cors/routes/authorities/v1.routes.ts"],"names":[],"mappings":"AAiGA,eAAO,MAAM,EAAE,4CAAS,CAAC"}
@@ -70,10 +70,11 @@ async (req, res) => {
70
70
  /**
71
71
  * This updates the authority object.
72
72
  */
73
- router.patch(// https://{hostname}/authorities/v1
74
- '/', add_unique_tracking_1.addUniqueTracking, // add a unique tracking id to the request
73
+ router.patch(// https://{hostname}/authorities/v1/{authorityid}
74
+ '/:authorityid', add_unique_tracking_1.addUniqueTracking, // add a unique tracking id to the request
75
75
  validate_request_body_1.validateRequestBody, (0, validate_incoming_request_data_1.validateIncomingRequestData)(authorities_transactions_schema_1.ISAFETransactionAuthorityUpdateSchema), async (req, res) => {
76
- return res.status(200).send({ successful: true });
76
+ const authorityId = (0, generic_1.getAuthorityId)(req); // get the authority id.
77
+ return res.status(200).send({ successful: true, authorityId });
77
78
  });
78
79
  /**
79
80
  * This deletes the authority object.
@@ -25,43 +25,15 @@ export interface ISAFETransactionRuleSetData {
25
25
  */
26
26
  export declare const ISAFETransactionRuleSetDataSchema: z.ZodObject<{
27
27
  rulesTransactionType: z.ZodEnum<[SAFERulesTransactionType]>;
28
- ruleSet: z.ZodObject<{
29
- description: z.ZodOptional<z.ZodString>;
30
- id: z.ZodString;
31
- name: z.ZodString;
32
- ruleGroups: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
33
- version: z.ZodNumber;
34
- }, "strip", z.ZodTypeAny, {
35
- version: number;
36
- id: string;
37
- name: string;
38
- ruleGroups: any[];
39
- description?: string | undefined;
40
- }, {
41
- version: number;
42
- id: string;
43
- name: string;
44
- ruleGroups: any[];
45
- description?: string | undefined;
46
- }>;
28
+ ruleSet: any;
47
29
  }, "strip", z.ZodTypeAny, {
48
- rulesTransactionType: SAFERulesTransactionType;
49
- ruleSet: {
50
- version: number;
51
- id: string;
52
- name: string;
53
- ruleGroups: any[];
54
- description?: string | undefined;
55
- };
30
+ [x: string]: any;
31
+ rulesTransactionType?: unknown;
32
+ ruleSet?: unknown;
56
33
  }, {
57
- rulesTransactionType: SAFERulesTransactionType;
58
- ruleSet: {
59
- version: number;
60
- id: string;
61
- name: string;
62
- ruleGroups: any[];
63
- description?: string | undefined;
64
- };
34
+ [x: string]: any;
35
+ rulesTransactionType?: unknown;
36
+ ruleSet?: unknown;
65
37
  }>;
66
38
  /**
67
39
  * This is the schema for the add rule set transaction
@@ -71,14 +43,14 @@ export declare const ISAFETransactionRuleSetAddSchema: z.ZodObject<z.objectUtil.
71
43
  authority: z.ZodString;
72
44
  authoritySignature: z.ZodString;
73
45
  transaction: z.ZodObject<{
74
- type: z.ZodEnum<[SAFETransactionType.AUTHORITY, SAFETransactionType.SHAREDATA, SAFETransactionType.FUNCTIONS, SAFETransactionType.RULES, SAFETransactionType.EVENTS, SAFETransactionType.ENDPOINTS]>;
75
- action: z.ZodEnum<[SAFETransactionActionType.ADD, SAFETransactionActionType.REMOVE, SAFETransactionActionType.UPDATE]>;
46
+ type: z.ZodEnum<["AUTHORITY", "SHAREDATA", "FUNCTIONS", "RULES", "EVENTS", "ENDPOINTS"]>;
47
+ action: z.ZodEnum<["ADD", "REMOVE", "UPDATE"]>;
76
48
  }, "strip", z.ZodTypeAny, {
77
- type: SAFETransactionType;
78
- action: SAFETransactionActionType;
49
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
50
+ action: "ADD" | "REMOVE" | "UPDATE";
79
51
  }, {
80
- type: SAFETransactionType;
81
- action: SAFETransactionActionType;
52
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
53
+ action: "ADD" | "REMOVE" | "UPDATE";
82
54
  }>;
83
55
  version: z.ZodNumber;
84
56
  }, {
@@ -87,108 +59,60 @@ export declare const ISAFETransactionRuleSetAddSchema: z.ZodObject<z.objectUtil.
87
59
  action: z.ZodLiteral<SAFETransactionActionType.ADD>;
88
60
  data: z.ZodObject<{
89
61
  rulesTransactionType: z.ZodEnum<[SAFERulesTransactionType]>;
90
- ruleSet: z.ZodObject<{
91
- description: z.ZodOptional<z.ZodString>;
92
- id: z.ZodString;
93
- name: z.ZodString;
94
- ruleGroups: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
95
- version: z.ZodNumber;
96
- }, "strip", z.ZodTypeAny, {
97
- version: number;
98
- id: string;
99
- name: string;
100
- ruleGroups: any[];
101
- description?: string | undefined;
102
- }, {
103
- version: number;
104
- id: string;
105
- name: string;
106
- ruleGroups: any[];
107
- description?: string | undefined;
108
- }>;
62
+ ruleSet: any;
109
63
  }, "strip", z.ZodTypeAny, {
110
- rulesTransactionType: SAFERulesTransactionType;
111
- ruleSet: {
112
- version: number;
113
- id: string;
114
- name: string;
115
- ruleGroups: any[];
116
- description?: string | undefined;
117
- };
64
+ [x: string]: any;
65
+ rulesTransactionType?: unknown;
66
+ ruleSet?: unknown;
118
67
  }, {
119
- rulesTransactionType: SAFERulesTransactionType;
120
- ruleSet: {
121
- version: number;
122
- id: string;
123
- name: string;
124
- ruleGroups: any[];
125
- description?: string | undefined;
126
- };
68
+ [x: string]: any;
69
+ rulesTransactionType?: unknown;
70
+ ruleSet?: unknown;
127
71
  }>;
128
72
  }, "strip", z.ZodTypeAny, {
129
73
  type: SAFETransactionType.RULES;
130
- action: SAFETransactionActionType.ADD;
131
74
  data: {
132
- rulesTransactionType: SAFERulesTransactionType;
133
- ruleSet: {
134
- version: number;
135
- id: string;
136
- name: string;
137
- ruleGroups: any[];
138
- description?: string | undefined;
139
- };
75
+ [x: string]: any;
76
+ rulesTransactionType?: unknown;
77
+ ruleSet?: unknown;
140
78
  };
79
+ action: SAFETransactionActionType.ADD;
141
80
  }, {
142
81
  type: SAFETransactionType.RULES;
143
- action: SAFETransactionActionType.ADD;
144
82
  data: {
145
- rulesTransactionType: SAFERulesTransactionType;
146
- ruleSet: {
147
- version: number;
148
- id: string;
149
- name: string;
150
- ruleGroups: any[];
151
- description?: string | undefined;
152
- };
83
+ [x: string]: any;
84
+ rulesTransactionType?: unknown;
85
+ ruleSet?: unknown;
153
86
  };
87
+ action: SAFETransactionActionType.ADD;
154
88
  }>;
155
89
  }>, "strip", z.ZodTypeAny, {
90
+ createdAt: number;
91
+ authority: string;
92
+ authoritySignature: string;
156
93
  transaction: {
157
94
  type: SAFETransactionType.RULES;
158
- action: SAFETransactionActionType.ADD;
159
95
  data: {
160
- rulesTransactionType: SAFERulesTransactionType;
161
- ruleSet: {
162
- version: number;
163
- id: string;
164
- name: string;
165
- ruleGroups: any[];
166
- description?: string | undefined;
167
- };
96
+ [x: string]: any;
97
+ rulesTransactionType?: unknown;
98
+ ruleSet?: unknown;
168
99
  };
100
+ action: SAFETransactionActionType.ADD;
169
101
  };
102
+ version: number;
103
+ }, {
170
104
  createdAt: number;
171
105
  authority: string;
172
106
  authoritySignature: string;
173
- version: number;
174
- }, {
175
107
  transaction: {
176
108
  type: SAFETransactionType.RULES;
177
- action: SAFETransactionActionType.ADD;
178
109
  data: {
179
- rulesTransactionType: SAFERulesTransactionType;
180
- ruleSet: {
181
- version: number;
182
- id: string;
183
- name: string;
184
- ruleGroups: any[];
185
- description?: string | undefined;
186
- };
110
+ [x: string]: any;
111
+ rulesTransactionType?: unknown;
112
+ ruleSet?: unknown;
187
113
  };
114
+ action: SAFETransactionActionType.ADD;
188
115
  };
189
- createdAt: number;
190
- authority: string;
191
- authoritySignature: string;
192
116
  version: number;
193
117
  }>;
194
118
  /**
@@ -199,14 +123,14 @@ export declare const ISAFETransactionRuleSetUpdateSchema: z.ZodObject<z.objectUt
199
123
  authority: z.ZodString;
200
124
  authoritySignature: z.ZodString;
201
125
  transaction: z.ZodObject<{
202
- type: z.ZodEnum<[SAFETransactionType.AUTHORITY, SAFETransactionType.SHAREDATA, SAFETransactionType.FUNCTIONS, SAFETransactionType.RULES, SAFETransactionType.EVENTS, SAFETransactionType.ENDPOINTS]>;
203
- action: z.ZodEnum<[SAFETransactionActionType.ADD, SAFETransactionActionType.REMOVE, SAFETransactionActionType.UPDATE]>;
126
+ type: z.ZodEnum<["AUTHORITY", "SHAREDATA", "FUNCTIONS", "RULES", "EVENTS", "ENDPOINTS"]>;
127
+ action: z.ZodEnum<["ADD", "REMOVE", "UPDATE"]>;
204
128
  }, "strip", z.ZodTypeAny, {
205
- type: SAFETransactionType;
206
- action: SAFETransactionActionType;
129
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
130
+ action: "ADD" | "REMOVE" | "UPDATE";
207
131
  }, {
208
- type: SAFETransactionType;
209
- action: SAFETransactionActionType;
132
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
133
+ action: "ADD" | "REMOVE" | "UPDATE";
210
134
  }>;
211
135
  version: z.ZodNumber;
212
136
  }, {
@@ -215,108 +139,60 @@ export declare const ISAFETransactionRuleSetUpdateSchema: z.ZodObject<z.objectUt
215
139
  action: z.ZodLiteral<SAFETransactionActionType.UPDATE>;
216
140
  data: z.ZodObject<{
217
141
  rulesTransactionType: z.ZodEnum<[SAFERulesTransactionType]>;
218
- ruleSet: z.ZodObject<{
219
- description: z.ZodOptional<z.ZodString>;
220
- id: z.ZodString;
221
- name: z.ZodString;
222
- ruleGroups: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
223
- version: z.ZodNumber;
224
- }, "strip", z.ZodTypeAny, {
225
- version: number;
226
- id: string;
227
- name: string;
228
- ruleGroups: any[];
229
- description?: string | undefined;
230
- }, {
231
- version: number;
232
- id: string;
233
- name: string;
234
- ruleGroups: any[];
235
- description?: string | undefined;
236
- }>;
142
+ ruleSet: any;
237
143
  }, "strip", z.ZodTypeAny, {
238
- rulesTransactionType: SAFERulesTransactionType;
239
- ruleSet: {
240
- version: number;
241
- id: string;
242
- name: string;
243
- ruleGroups: any[];
244
- description?: string | undefined;
245
- };
144
+ [x: string]: any;
145
+ rulesTransactionType?: unknown;
146
+ ruleSet?: unknown;
246
147
  }, {
247
- rulesTransactionType: SAFERulesTransactionType;
248
- ruleSet: {
249
- version: number;
250
- id: string;
251
- name: string;
252
- ruleGroups: any[];
253
- description?: string | undefined;
254
- };
148
+ [x: string]: any;
149
+ rulesTransactionType?: unknown;
150
+ ruleSet?: unknown;
255
151
  }>;
256
152
  }, "strip", z.ZodTypeAny, {
257
153
  type: SAFETransactionType.RULES;
258
- action: SAFETransactionActionType.UPDATE;
259
154
  data: {
260
- rulesTransactionType: SAFERulesTransactionType;
261
- ruleSet: {
262
- version: number;
263
- id: string;
264
- name: string;
265
- ruleGroups: any[];
266
- description?: string | undefined;
267
- };
155
+ [x: string]: any;
156
+ rulesTransactionType?: unknown;
157
+ ruleSet?: unknown;
268
158
  };
159
+ action: SAFETransactionActionType.UPDATE;
269
160
  }, {
270
161
  type: SAFETransactionType.RULES;
271
- action: SAFETransactionActionType.UPDATE;
272
162
  data: {
273
- rulesTransactionType: SAFERulesTransactionType;
274
- ruleSet: {
275
- version: number;
276
- id: string;
277
- name: string;
278
- ruleGroups: any[];
279
- description?: string | undefined;
280
- };
163
+ [x: string]: any;
164
+ rulesTransactionType?: unknown;
165
+ ruleSet?: unknown;
281
166
  };
167
+ action: SAFETransactionActionType.UPDATE;
282
168
  }>;
283
169
  }>, "strip", z.ZodTypeAny, {
170
+ createdAt: number;
171
+ authority: string;
172
+ authoritySignature: string;
284
173
  transaction: {
285
174
  type: SAFETransactionType.RULES;
286
- action: SAFETransactionActionType.UPDATE;
287
175
  data: {
288
- rulesTransactionType: SAFERulesTransactionType;
289
- ruleSet: {
290
- version: number;
291
- id: string;
292
- name: string;
293
- ruleGroups: any[];
294
- description?: string | undefined;
295
- };
176
+ [x: string]: any;
177
+ rulesTransactionType?: unknown;
178
+ ruleSet?: unknown;
296
179
  };
180
+ action: SAFETransactionActionType.UPDATE;
297
181
  };
182
+ version: number;
183
+ }, {
298
184
  createdAt: number;
299
185
  authority: string;
300
186
  authoritySignature: string;
301
- version: number;
302
- }, {
303
187
  transaction: {
304
188
  type: SAFETransactionType.RULES;
305
- action: SAFETransactionActionType.UPDATE;
306
189
  data: {
307
- rulesTransactionType: SAFERulesTransactionType;
308
- ruleSet: {
309
- version: number;
310
- id: string;
311
- name: string;
312
- ruleGroups: any[];
313
- description?: string | undefined;
314
- };
190
+ [x: string]: any;
191
+ rulesTransactionType?: unknown;
192
+ ruleSet?: unknown;
315
193
  };
194
+ action: SAFETransactionActionType.UPDATE;
316
195
  };
317
- createdAt: number;
318
- authority: string;
319
- authoritySignature: string;
320
196
  version: number;
321
197
  }>;
322
198
  /**
@@ -327,14 +203,14 @@ export declare const ISAFETransactionRuleSetRemoveSchema: z.ZodObject<z.objectUt
327
203
  authority: z.ZodString;
328
204
  authoritySignature: z.ZodString;
329
205
  transaction: z.ZodObject<{
330
- type: z.ZodEnum<[SAFETransactionType.AUTHORITY, SAFETransactionType.SHAREDATA, SAFETransactionType.FUNCTIONS, SAFETransactionType.RULES, SAFETransactionType.EVENTS, SAFETransactionType.ENDPOINTS]>;
331
- action: z.ZodEnum<[SAFETransactionActionType.ADD, SAFETransactionActionType.REMOVE, SAFETransactionActionType.UPDATE]>;
206
+ type: z.ZodEnum<["AUTHORITY", "SHAREDATA", "FUNCTIONS", "RULES", "EVENTS", "ENDPOINTS"]>;
207
+ action: z.ZodEnum<["ADD", "REMOVE", "UPDATE"]>;
332
208
  }, "strip", z.ZodTypeAny, {
333
- type: SAFETransactionType;
334
- action: SAFETransactionActionType;
209
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
210
+ action: "ADD" | "REMOVE" | "UPDATE";
335
211
  }, {
336
- type: SAFETransactionType;
337
- action: SAFETransactionActionType;
212
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
213
+ action: "ADD" | "REMOVE" | "UPDATE";
338
214
  }>;
339
215
  version: z.ZodNumber;
340
216
  }, {
@@ -343,108 +219,60 @@ export declare const ISAFETransactionRuleSetRemoveSchema: z.ZodObject<z.objectUt
343
219
  action: z.ZodLiteral<SAFETransactionActionType.REMOVE>;
344
220
  data: z.ZodObject<{
345
221
  rulesTransactionType: z.ZodEnum<[SAFERulesTransactionType]>;
346
- ruleSet: z.ZodObject<{
347
- description: z.ZodOptional<z.ZodString>;
348
- id: z.ZodString;
349
- name: z.ZodString;
350
- ruleGroups: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
351
- version: z.ZodNumber;
352
- }, "strip", z.ZodTypeAny, {
353
- version: number;
354
- id: string;
355
- name: string;
356
- ruleGroups: any[];
357
- description?: string | undefined;
358
- }, {
359
- version: number;
360
- id: string;
361
- name: string;
362
- ruleGroups: any[];
363
- description?: string | undefined;
364
- }>;
222
+ ruleSet: any;
365
223
  }, "strip", z.ZodTypeAny, {
366
- rulesTransactionType: SAFERulesTransactionType;
367
- ruleSet: {
368
- version: number;
369
- id: string;
370
- name: string;
371
- ruleGroups: any[];
372
- description?: string | undefined;
373
- };
224
+ [x: string]: any;
225
+ rulesTransactionType?: unknown;
226
+ ruleSet?: unknown;
374
227
  }, {
375
- rulesTransactionType: SAFERulesTransactionType;
376
- ruleSet: {
377
- version: number;
378
- id: string;
379
- name: string;
380
- ruleGroups: any[];
381
- description?: string | undefined;
382
- };
228
+ [x: string]: any;
229
+ rulesTransactionType?: unknown;
230
+ ruleSet?: unknown;
383
231
  }>;
384
232
  }, "strip", z.ZodTypeAny, {
385
233
  type: SAFETransactionType.RULES;
386
- action: SAFETransactionActionType.REMOVE;
387
234
  data: {
388
- rulesTransactionType: SAFERulesTransactionType;
389
- ruleSet: {
390
- version: number;
391
- id: string;
392
- name: string;
393
- ruleGroups: any[];
394
- description?: string | undefined;
395
- };
235
+ [x: string]: any;
236
+ rulesTransactionType?: unknown;
237
+ ruleSet?: unknown;
396
238
  };
239
+ action: SAFETransactionActionType.REMOVE;
397
240
  }, {
398
241
  type: SAFETransactionType.RULES;
399
- action: SAFETransactionActionType.REMOVE;
400
242
  data: {
401
- rulesTransactionType: SAFERulesTransactionType;
402
- ruleSet: {
403
- version: number;
404
- id: string;
405
- name: string;
406
- ruleGroups: any[];
407
- description?: string | undefined;
408
- };
243
+ [x: string]: any;
244
+ rulesTransactionType?: unknown;
245
+ ruleSet?: unknown;
409
246
  };
247
+ action: SAFETransactionActionType.REMOVE;
410
248
  }>;
411
249
  }>, "strip", z.ZodTypeAny, {
250
+ createdAt: number;
251
+ authority: string;
252
+ authoritySignature: string;
412
253
  transaction: {
413
254
  type: SAFETransactionType.RULES;
414
- action: SAFETransactionActionType.REMOVE;
415
255
  data: {
416
- rulesTransactionType: SAFERulesTransactionType;
417
- ruleSet: {
418
- version: number;
419
- id: string;
420
- name: string;
421
- ruleGroups: any[];
422
- description?: string | undefined;
423
- };
256
+ [x: string]: any;
257
+ rulesTransactionType?: unknown;
258
+ ruleSet?: unknown;
424
259
  };
260
+ action: SAFETransactionActionType.REMOVE;
425
261
  };
262
+ version: number;
263
+ }, {
426
264
  createdAt: number;
427
265
  authority: string;
428
266
  authoritySignature: string;
429
- version: number;
430
- }, {
431
267
  transaction: {
432
268
  type: SAFETransactionType.RULES;
433
- action: SAFETransactionActionType.REMOVE;
434
269
  data: {
435
- rulesTransactionType: SAFERulesTransactionType;
436
- ruleSet: {
437
- version: number;
438
- id: string;
439
- name: string;
440
- ruleGroups: any[];
441
- description?: string | undefined;
442
- };
270
+ [x: string]: any;
271
+ rulesTransactionType?: unknown;
272
+ ruleSet?: unknown;
443
273
  };
274
+ action: SAFETransactionActionType.REMOVE;
444
275
  };
445
- createdAt: number;
446
- authority: string;
447
- authoritySignature: string;
448
276
  version: number;
449
277
  }>;
450
278
  //# sourceMappingURL=rules-transactions.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rules-transactions.schema.d.ts","sourceRoot":"","sources":["../../src/schema/rules-transactions.schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEpG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,oBAAY,wBAAwB;IAChC,QAAQ,aAAa;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,8BAA8B,uCAEzC,CAAC;AAMH;;GAEG;AACH,MAAM,WAAW,2BAA2B;IACxC,oBAAoB,EAAE,wBAAwB,CAAC;IAC/C,OAAO,EAAE,aAAa,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG5C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM3C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM9C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM9C,CAAC"}
1
+ {"version":3,"file":"rules-transactions.schema.d.ts","sourceRoot":"","sources":["../../src/schema/rules-transactions.schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEpG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,oBAAY,wBAAwB;IAChC,QAAQ,aAAa;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,8BAA8B,uCAEzC,CAAC;AAMH;;GAEG;AACH,MAAM,WAAW,2BAA2B;IACxC,oBAAoB,EAAE,wBAAwB,CAAC;IAC/C,OAAO,EAAE,aAAa,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;EAG5C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM3C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM9C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM9C,CAAC"}
@@ -1,10 +1,9 @@
1
1
  import z from 'zod';
2
- import { SAFETransactionActionType, SAFETransactionType } from '@degenerate/generic';
3
- export declare const SAFETransactionTypeSchema: z.ZodEnum<[SAFETransactionType.AUTHORITY, SAFETransactionType.SHAREDATA, SAFETransactionType.FUNCTIONS, SAFETransactionType.RULES, SAFETransactionType.EVENTS, SAFETransactionType.ENDPOINTS]>;
2
+ export declare const SAFETransactionTypeSchema: z.ZodEnum<["AUTHORITY", "SHAREDATA", "FUNCTIONS", "RULES", "EVENTS", "ENDPOINTS"]>;
4
3
  /**
5
4
  * This is the type of function that is being targetted in the transaction.
6
5
  */
7
- export declare const SAFETransactionActionTypeSchema: z.ZodEnum<[SAFETransactionActionType.ADD, SAFETransactionActionType.REMOVE, SAFETransactionActionType.UPDATE]>;
6
+ export declare const SAFETransactionActionTypeSchema: z.ZodEnum<["ADD", "REMOVE", "UPDATE"]>;
8
7
  /**
9
8
  * This is the schema for the SAFE transaction base.
10
9
  */
@@ -13,33 +12,33 @@ export declare const ISAFETransactionBaseSchema: z.ZodObject<{
13
12
  authority: z.ZodString;
14
13
  authoritySignature: z.ZodString;
15
14
  transaction: z.ZodObject<{
16
- type: z.ZodEnum<[SAFETransactionType.AUTHORITY, SAFETransactionType.SHAREDATA, SAFETransactionType.FUNCTIONS, SAFETransactionType.RULES, SAFETransactionType.EVENTS, SAFETransactionType.ENDPOINTS]>;
17
- action: z.ZodEnum<[SAFETransactionActionType.ADD, SAFETransactionActionType.REMOVE, SAFETransactionActionType.UPDATE]>;
15
+ type: z.ZodEnum<["AUTHORITY", "SHAREDATA", "FUNCTIONS", "RULES", "EVENTS", "ENDPOINTS"]>;
16
+ action: z.ZodEnum<["ADD", "REMOVE", "UPDATE"]>;
18
17
  }, "strip", z.ZodTypeAny, {
19
- type: SAFETransactionType;
20
- action: SAFETransactionActionType;
18
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
19
+ action: "ADD" | "REMOVE" | "UPDATE";
21
20
  }, {
22
- type: SAFETransactionType;
23
- action: SAFETransactionActionType;
21
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
22
+ action: "ADD" | "REMOVE" | "UPDATE";
24
23
  }>;
25
24
  version: z.ZodNumber;
26
25
  }, "strip", z.ZodTypeAny, {
27
- transaction: {
28
- type: SAFETransactionType;
29
- action: SAFETransactionActionType;
30
- };
31
26
  createdAt: number;
32
27
  authority: string;
33
28
  authoritySignature: string;
34
- version: number;
35
- }, {
36
29
  transaction: {
37
- type: SAFETransactionType;
38
- action: SAFETransactionActionType;
30
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
31
+ action: "ADD" | "REMOVE" | "UPDATE";
39
32
  };
33
+ version: number;
34
+ }, {
40
35
  createdAt: number;
41
36
  authority: string;
42
37
  authoritySignature: string;
38
+ transaction: {
39
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
40
+ action: "ADD" | "REMOVE" | "UPDATE";
41
+ };
43
42
  version: number;
44
43
  }>;
45
44
  //# sourceMappingURL=transactions.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transactions.schema.d.ts","sourceRoot":"","sources":["../../src/schema/transactions.schema.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EACH,yBAAyB,EACzB,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAM7B,eAAO,MAAM,yBAAyB,gMAOpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,+BAA+B,gHAI1C,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASrC,CAAC"}
1
+ {"version":3,"file":"transactions.schema.d.ts","sourceRoot":"","sources":["../../src/schema/transactions.schema.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,KAAK,CAAC;AAKpB,eAAO,MAAM,yBAAyB,oFAOpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,+BAA+B,wCAI1C,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASrC,CAAC"}