@degenerate/generic 0.1.11 → 0.1.13

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/models/index.d.ts +2 -1
  2. package/dist/models/index.d.ts.map +1 -1
  3. package/dist/models/index.js +2 -1
  4. package/dist/models/rules/share-rule-models.d.ts +1528 -0
  5. package/dist/models/rules/share-rule-models.d.ts.map +1 -0
  6. package/dist/models/{safe/rules → rules}/share-rule-models.js +61 -5
  7. package/dist/models/safe/safe-transaction-models.d.ts +1 -127
  8. package/dist/models/safe/safe-transaction-models.d.ts.map +1 -1
  9. package/dist/models/safe/safe-transaction-models.js +4 -43
  10. package/dist/models/safe/transactions/authorities-transactions-models.d.ts +136 -9
  11. package/dist/models/safe/transactions/authorities-transactions-models.d.ts.map +1 -1
  12. package/dist/models/safe/transactions/authorities-transactions-models.js +48 -7
  13. package/dist/models/safe/transactions/rules-transactions-models.d.ts +628 -0
  14. package/dist/models/safe/transactions/rules-transactions-models.d.ts.map +1 -0
  15. package/dist/models/safe/transactions/rules-transactions-models.js +73 -0
  16. package/dist/models/share-data/share-data.d.ts +5 -1
  17. package/dist/models/share-data/share-data.d.ts.map +1 -1
  18. package/dist/models/share-data/share-data.js +0 -5
  19. package/dist/transactions/authority/create-safe-transaction-authority-data.d.ts +2 -1
  20. package/dist/transactions/authority/create-safe-transaction-authority-data.d.ts.map +1 -1
  21. package/dist/transactions/authority/create-safe-transaction-authority.d.ts +2 -1
  22. package/dist/transactions/authority/create-safe-transaction-authority.d.ts.map +1 -1
  23. package/package.json +4 -3
  24. package/dist/models/safe/rules/share-rule-models.d.ts +0 -931
  25. package/dist/models/safe/rules/share-rule-models.d.ts.map +0 -1
@@ -0,0 +1,628 @@
1
+ /**
2
+ * This contains the transactions for the SAFE Rules from the safe network functio s.
3
+ */
4
+ import { z } from 'zod';
5
+ import { SAFETransactionType, SAFETransactionActionType } from '../safe-transaction-models';
6
+ /**
7
+ * This contains the enums for the authorities objects in the zod format.
8
+ */
9
+ export declare enum SAFERulesTransactionType {
10
+ RULESETS = "RULESETS"
11
+ }
12
+ /**
13
+ * This contains the schemas for the authorities objects in the zod format.
14
+ */
15
+ export declare const SAFERulesTransactionTypeSchema: z.ZodEnum<["RULESETS"]>;
16
+ /**
17
+ * This is the schema for the safe transaction rule set data.
18
+ */
19
+ export declare const ISAFETransactionRuleSetDataSchema: z.ZodObject<{
20
+ rulesTransactionType: z.ZodEnum<["RULESETS"]>;
21
+ ruleSet: z.ZodObject<{
22
+ description: z.ZodOptional<z.ZodString>;
23
+ id: z.ZodString;
24
+ name: z.ZodString;
25
+ ruleGroups: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
26
+ version: z.ZodNumber;
27
+ }, "strip", z.ZodTypeAny, {
28
+ id: string;
29
+ name: string;
30
+ ruleGroups: unknown[];
31
+ version: number;
32
+ description?: string | undefined;
33
+ }, {
34
+ id: string;
35
+ name: string;
36
+ ruleGroups: unknown[];
37
+ version: number;
38
+ description?: string | undefined;
39
+ }>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ rulesTransactionType: "RULESETS";
42
+ ruleSet: {
43
+ id: string;
44
+ name: string;
45
+ ruleGroups: unknown[];
46
+ version: number;
47
+ description?: string | undefined;
48
+ };
49
+ }, {
50
+ rulesTransactionType: "RULESETS";
51
+ ruleSet: {
52
+ id: string;
53
+ name: string;
54
+ ruleGroups: unknown[];
55
+ version: number;
56
+ description?: string | undefined;
57
+ };
58
+ }>;
59
+ export type ISAFETransactionRuleSetData = z.infer<typeof ISAFETransactionRuleSetDataSchema>;
60
+ /**
61
+ * This is the schema for the safe transaction rule set
62
+ */
63
+ export declare const ISAFETransactionRuleSetSchema: z.ZodObject<z.objectUtil.extendShape<{
64
+ createdAt: z.ZodNumber;
65
+ authority: z.ZodString;
66
+ authoritySignature: z.ZodString;
67
+ transaction: z.ZodObject<{
68
+ type: z.ZodEnum<["AUTHORITY", "SHAREDATA", "FUNCTIONS", "RULES", "EVENTS", "ENDPOINTS"]>;
69
+ action: z.ZodEnum<["ADD", "DELETE", "UPDATE"]>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
72
+ action: "ADD" | "DELETE" | "UPDATE";
73
+ }, {
74
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
75
+ action: "ADD" | "DELETE" | "UPDATE";
76
+ }>;
77
+ version: z.ZodNumber;
78
+ }, {
79
+ transaction: z.ZodObject<{
80
+ type: z.ZodLiteral<SAFETransactionType.RULES>;
81
+ action: z.ZodEnum<["ADD", "DELETE", "UPDATE"]>;
82
+ data: z.ZodObject<{
83
+ rulesTransactionType: z.ZodEnum<["RULESETS"]>;
84
+ ruleSet: z.ZodObject<{
85
+ description: z.ZodOptional<z.ZodString>;
86
+ id: z.ZodString;
87
+ name: z.ZodString;
88
+ ruleGroups: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
89
+ version: z.ZodNumber;
90
+ }, "strip", z.ZodTypeAny, {
91
+ id: string;
92
+ name: string;
93
+ ruleGroups: unknown[];
94
+ version: number;
95
+ description?: string | undefined;
96
+ }, {
97
+ id: string;
98
+ name: string;
99
+ ruleGroups: unknown[];
100
+ version: number;
101
+ description?: string | undefined;
102
+ }>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ rulesTransactionType: "RULESETS";
105
+ ruleSet: {
106
+ id: string;
107
+ name: string;
108
+ ruleGroups: unknown[];
109
+ version: number;
110
+ description?: string | undefined;
111
+ };
112
+ }, {
113
+ rulesTransactionType: "RULESETS";
114
+ ruleSet: {
115
+ id: string;
116
+ name: string;
117
+ ruleGroups: unknown[];
118
+ version: number;
119
+ description?: string | undefined;
120
+ };
121
+ }>;
122
+ }, "strip", z.ZodTypeAny, {
123
+ type: SAFETransactionType.RULES;
124
+ action: "ADD" | "DELETE" | "UPDATE";
125
+ data: {
126
+ rulesTransactionType: "RULESETS";
127
+ ruleSet: {
128
+ id: string;
129
+ name: string;
130
+ ruleGroups: unknown[];
131
+ version: number;
132
+ description?: string | undefined;
133
+ };
134
+ };
135
+ }, {
136
+ type: SAFETransactionType.RULES;
137
+ action: "ADD" | "DELETE" | "UPDATE";
138
+ data: {
139
+ rulesTransactionType: "RULESETS";
140
+ ruleSet: {
141
+ id: string;
142
+ name: string;
143
+ ruleGroups: unknown[];
144
+ version: number;
145
+ description?: string | undefined;
146
+ };
147
+ };
148
+ }>;
149
+ }>, "strip", z.ZodTypeAny, {
150
+ createdAt: number;
151
+ version: number;
152
+ authority: string;
153
+ authoritySignature: string;
154
+ transaction: {
155
+ type: SAFETransactionType.RULES;
156
+ action: "ADD" | "DELETE" | "UPDATE";
157
+ data: {
158
+ rulesTransactionType: "RULESETS";
159
+ ruleSet: {
160
+ id: string;
161
+ name: string;
162
+ ruleGroups: unknown[];
163
+ version: number;
164
+ description?: string | undefined;
165
+ };
166
+ };
167
+ };
168
+ }, {
169
+ createdAt: number;
170
+ version: number;
171
+ authority: string;
172
+ authoritySignature: string;
173
+ transaction: {
174
+ type: SAFETransactionType.RULES;
175
+ action: "ADD" | "DELETE" | "UPDATE";
176
+ data: {
177
+ rulesTransactionType: "RULESETS";
178
+ ruleSet: {
179
+ id: string;
180
+ name: string;
181
+ ruleGroups: unknown[];
182
+ version: number;
183
+ description?: string | undefined;
184
+ };
185
+ };
186
+ };
187
+ }>;
188
+ /**
189
+ * This is the schema for the add rule set transaction
190
+ */
191
+ export declare const ISAFETransactionRuleSetAddSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
192
+ createdAt: z.ZodNumber;
193
+ authority: z.ZodString;
194
+ authoritySignature: z.ZodString;
195
+ transaction: z.ZodObject<{
196
+ type: z.ZodEnum<["AUTHORITY", "SHAREDATA", "FUNCTIONS", "RULES", "EVENTS", "ENDPOINTS"]>;
197
+ action: z.ZodEnum<["ADD", "DELETE", "UPDATE"]>;
198
+ }, "strip", z.ZodTypeAny, {
199
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
200
+ action: "ADD" | "DELETE" | "UPDATE";
201
+ }, {
202
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
203
+ action: "ADD" | "DELETE" | "UPDATE";
204
+ }>;
205
+ version: z.ZodNumber;
206
+ }, {
207
+ transaction: z.ZodObject<{
208
+ type: z.ZodLiteral<SAFETransactionType.RULES>;
209
+ action: z.ZodEnum<["ADD", "DELETE", "UPDATE"]>;
210
+ data: z.ZodObject<{
211
+ rulesTransactionType: z.ZodEnum<["RULESETS"]>;
212
+ ruleSet: z.ZodObject<{
213
+ description: z.ZodOptional<z.ZodString>;
214
+ id: z.ZodString;
215
+ name: z.ZodString;
216
+ ruleGroups: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
217
+ version: z.ZodNumber;
218
+ }, "strip", z.ZodTypeAny, {
219
+ id: string;
220
+ name: string;
221
+ ruleGroups: unknown[];
222
+ version: number;
223
+ description?: string | undefined;
224
+ }, {
225
+ id: string;
226
+ name: string;
227
+ ruleGroups: unknown[];
228
+ version: number;
229
+ description?: string | undefined;
230
+ }>;
231
+ }, "strip", z.ZodTypeAny, {
232
+ rulesTransactionType: "RULESETS";
233
+ ruleSet: {
234
+ id: string;
235
+ name: string;
236
+ ruleGroups: unknown[];
237
+ version: number;
238
+ description?: string | undefined;
239
+ };
240
+ }, {
241
+ rulesTransactionType: "RULESETS";
242
+ ruleSet: {
243
+ id: string;
244
+ name: string;
245
+ ruleGroups: unknown[];
246
+ version: number;
247
+ description?: string | undefined;
248
+ };
249
+ }>;
250
+ }, "strip", z.ZodTypeAny, {
251
+ type: SAFETransactionType.RULES;
252
+ action: "ADD" | "DELETE" | "UPDATE";
253
+ data: {
254
+ rulesTransactionType: "RULESETS";
255
+ ruleSet: {
256
+ id: string;
257
+ name: string;
258
+ ruleGroups: unknown[];
259
+ version: number;
260
+ description?: string | undefined;
261
+ };
262
+ };
263
+ }, {
264
+ type: SAFETransactionType.RULES;
265
+ action: "ADD" | "DELETE" | "UPDATE";
266
+ data: {
267
+ rulesTransactionType: "RULESETS";
268
+ ruleSet: {
269
+ id: string;
270
+ name: string;
271
+ ruleGroups: unknown[];
272
+ version: number;
273
+ description?: string | undefined;
274
+ };
275
+ };
276
+ }>;
277
+ }>, {
278
+ transaction: z.ZodObject<{
279
+ action: z.ZodLiteral<SAFETransactionActionType.ADD>;
280
+ data: z.ZodObject<{
281
+ rulesTransactionType: z.ZodEnum<["RULESETS"]>;
282
+ ruleSet: z.ZodObject<{
283
+ description: z.ZodOptional<z.ZodString>;
284
+ id: z.ZodString;
285
+ name: z.ZodString;
286
+ ruleGroups: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
287
+ version: z.ZodNumber;
288
+ }, "strip", z.ZodTypeAny, {
289
+ id: string;
290
+ name: string;
291
+ ruleGroups: unknown[];
292
+ version: number;
293
+ description?: string | undefined;
294
+ }, {
295
+ id: string;
296
+ name: string;
297
+ ruleGroups: unknown[];
298
+ version: number;
299
+ description?: string | undefined;
300
+ }>;
301
+ }, "strip", z.ZodTypeAny, {
302
+ rulesTransactionType: "RULESETS";
303
+ ruleSet: {
304
+ id: string;
305
+ name: string;
306
+ ruleGroups: unknown[];
307
+ version: number;
308
+ description?: string | undefined;
309
+ };
310
+ }, {
311
+ rulesTransactionType: "RULESETS";
312
+ ruleSet: {
313
+ id: string;
314
+ name: string;
315
+ ruleGroups: unknown[];
316
+ version: number;
317
+ description?: string | undefined;
318
+ };
319
+ }>;
320
+ }, "strip", z.ZodTypeAny, {
321
+ action: SAFETransactionActionType.ADD;
322
+ data: {
323
+ rulesTransactionType: "RULESETS";
324
+ ruleSet: {
325
+ id: string;
326
+ name: string;
327
+ ruleGroups: unknown[];
328
+ version: number;
329
+ description?: string | undefined;
330
+ };
331
+ };
332
+ }, {
333
+ action: SAFETransactionActionType.ADD;
334
+ data: {
335
+ rulesTransactionType: "RULESETS";
336
+ ruleSet: {
337
+ id: string;
338
+ name: string;
339
+ ruleGroups: unknown[];
340
+ version: number;
341
+ description?: string | undefined;
342
+ };
343
+ };
344
+ }>;
345
+ }>, "strip", z.ZodTypeAny, {
346
+ createdAt: number;
347
+ version: number;
348
+ authority: string;
349
+ authoritySignature: string;
350
+ transaction: {
351
+ action: SAFETransactionActionType.ADD;
352
+ data: {
353
+ rulesTransactionType: "RULESETS";
354
+ ruleSet: {
355
+ id: string;
356
+ name: string;
357
+ ruleGroups: unknown[];
358
+ version: number;
359
+ description?: string | undefined;
360
+ };
361
+ };
362
+ };
363
+ }, {
364
+ createdAt: number;
365
+ version: number;
366
+ authority: string;
367
+ authoritySignature: string;
368
+ transaction: {
369
+ action: SAFETransactionActionType.ADD;
370
+ data: {
371
+ rulesTransactionType: "RULESETS";
372
+ ruleSet: {
373
+ id: string;
374
+ name: string;
375
+ ruleGroups: unknown[];
376
+ version: number;
377
+ description?: string | undefined;
378
+ };
379
+ };
380
+ };
381
+ }>;
382
+ /**
383
+ * This is the schema for the update rule set transaction
384
+ */
385
+ export declare const ISAFETransactionRuleSetUpdateSchema: z.ZodObject<z.objectUtil.extendShape<{
386
+ createdAt: z.ZodNumber;
387
+ authority: z.ZodString;
388
+ authoritySignature: z.ZodString;
389
+ transaction: z.ZodObject<{
390
+ type: z.ZodEnum<["AUTHORITY", "SHAREDATA", "FUNCTIONS", "RULES", "EVENTS", "ENDPOINTS"]>;
391
+ action: z.ZodEnum<["ADD", "DELETE", "UPDATE"]>;
392
+ }, "strip", z.ZodTypeAny, {
393
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
394
+ action: "ADD" | "DELETE" | "UPDATE";
395
+ }, {
396
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
397
+ action: "ADD" | "DELETE" | "UPDATE";
398
+ }>;
399
+ version: z.ZodNumber;
400
+ }, {
401
+ transaction: z.ZodObject<{
402
+ action: z.ZodLiteral<SAFETransactionActionType.UPDATE>;
403
+ data: z.ZodObject<{
404
+ rulesTransactionType: z.ZodEnum<["RULESETS"]>;
405
+ ruleSet: z.ZodObject<{
406
+ description: z.ZodOptional<z.ZodString>;
407
+ id: z.ZodString;
408
+ name: z.ZodString;
409
+ ruleGroups: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
410
+ version: z.ZodNumber;
411
+ }, "strip", z.ZodTypeAny, {
412
+ id: string;
413
+ name: string;
414
+ ruleGroups: unknown[];
415
+ version: number;
416
+ description?: string | undefined;
417
+ }, {
418
+ id: string;
419
+ name: string;
420
+ ruleGroups: unknown[];
421
+ version: number;
422
+ description?: string | undefined;
423
+ }>;
424
+ }, "strip", z.ZodTypeAny, {
425
+ rulesTransactionType: "RULESETS";
426
+ ruleSet: {
427
+ id: string;
428
+ name: string;
429
+ ruleGroups: unknown[];
430
+ version: number;
431
+ description?: string | undefined;
432
+ };
433
+ }, {
434
+ rulesTransactionType: "RULESETS";
435
+ ruleSet: {
436
+ id: string;
437
+ name: string;
438
+ ruleGroups: unknown[];
439
+ version: number;
440
+ description?: string | undefined;
441
+ };
442
+ }>;
443
+ }, "strip", z.ZodTypeAny, {
444
+ action: SAFETransactionActionType.UPDATE;
445
+ data: {
446
+ rulesTransactionType: "RULESETS";
447
+ ruleSet: {
448
+ id: string;
449
+ name: string;
450
+ ruleGroups: unknown[];
451
+ version: number;
452
+ description?: string | undefined;
453
+ };
454
+ };
455
+ }, {
456
+ action: SAFETransactionActionType.UPDATE;
457
+ data: {
458
+ rulesTransactionType: "RULESETS";
459
+ ruleSet: {
460
+ id: string;
461
+ name: string;
462
+ ruleGroups: unknown[];
463
+ version: number;
464
+ description?: string | undefined;
465
+ };
466
+ };
467
+ }>;
468
+ }>, "strip", z.ZodTypeAny, {
469
+ createdAt: number;
470
+ version: number;
471
+ authority: string;
472
+ authoritySignature: string;
473
+ transaction: {
474
+ action: SAFETransactionActionType.UPDATE;
475
+ data: {
476
+ rulesTransactionType: "RULESETS";
477
+ ruleSet: {
478
+ id: string;
479
+ name: string;
480
+ ruleGroups: unknown[];
481
+ version: number;
482
+ description?: string | undefined;
483
+ };
484
+ };
485
+ };
486
+ }, {
487
+ createdAt: number;
488
+ version: number;
489
+ authority: string;
490
+ authoritySignature: string;
491
+ transaction: {
492
+ action: SAFETransactionActionType.UPDATE;
493
+ data: {
494
+ rulesTransactionType: "RULESETS";
495
+ ruleSet: {
496
+ id: string;
497
+ name: string;
498
+ ruleGroups: unknown[];
499
+ version: number;
500
+ description?: string | undefined;
501
+ };
502
+ };
503
+ };
504
+ }>;
505
+ /**
506
+ * This is the schema for the remove rule set transaction
507
+ */
508
+ export declare const ISAFETransactionRuleSetDeleteSchema: z.ZodObject<z.objectUtil.extendShape<{
509
+ createdAt: z.ZodNumber;
510
+ authority: z.ZodString;
511
+ authoritySignature: z.ZodString;
512
+ transaction: z.ZodObject<{
513
+ type: z.ZodEnum<["AUTHORITY", "SHAREDATA", "FUNCTIONS", "RULES", "EVENTS", "ENDPOINTS"]>;
514
+ action: z.ZodEnum<["ADD", "DELETE", "UPDATE"]>;
515
+ }, "strip", z.ZodTypeAny, {
516
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
517
+ action: "ADD" | "DELETE" | "UPDATE";
518
+ }, {
519
+ type: "SHAREDATA" | "FUNCTIONS" | "RULES" | "EVENTS" | "ENDPOINTS" | "AUTHORITY";
520
+ action: "ADD" | "DELETE" | "UPDATE";
521
+ }>;
522
+ version: z.ZodNumber;
523
+ }, {
524
+ transaction: z.ZodObject<{
525
+ action: z.ZodLiteral<SAFETransactionActionType.DELETE>;
526
+ data: z.ZodObject<{
527
+ rulesTransactionType: z.ZodEnum<["RULESETS"]>;
528
+ ruleSet: z.ZodObject<{
529
+ description: z.ZodOptional<z.ZodString>;
530
+ id: z.ZodString;
531
+ name: z.ZodString;
532
+ ruleGroups: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
533
+ version: z.ZodNumber;
534
+ }, "strip", z.ZodTypeAny, {
535
+ id: string;
536
+ name: string;
537
+ ruleGroups: unknown[];
538
+ version: number;
539
+ description?: string | undefined;
540
+ }, {
541
+ id: string;
542
+ name: string;
543
+ ruleGroups: unknown[];
544
+ version: number;
545
+ description?: string | undefined;
546
+ }>;
547
+ }, "strip", z.ZodTypeAny, {
548
+ rulesTransactionType: "RULESETS";
549
+ ruleSet: {
550
+ id: string;
551
+ name: string;
552
+ ruleGroups: unknown[];
553
+ version: number;
554
+ description?: string | undefined;
555
+ };
556
+ }, {
557
+ rulesTransactionType: "RULESETS";
558
+ ruleSet: {
559
+ id: string;
560
+ name: string;
561
+ ruleGroups: unknown[];
562
+ version: number;
563
+ description?: string | undefined;
564
+ };
565
+ }>;
566
+ }, "strip", z.ZodTypeAny, {
567
+ action: SAFETransactionActionType.DELETE;
568
+ data: {
569
+ rulesTransactionType: "RULESETS";
570
+ ruleSet: {
571
+ id: string;
572
+ name: string;
573
+ ruleGroups: unknown[];
574
+ version: number;
575
+ description?: string | undefined;
576
+ };
577
+ };
578
+ }, {
579
+ action: SAFETransactionActionType.DELETE;
580
+ data: {
581
+ rulesTransactionType: "RULESETS";
582
+ ruleSet: {
583
+ id: string;
584
+ name: string;
585
+ ruleGroups: unknown[];
586
+ version: number;
587
+ description?: string | undefined;
588
+ };
589
+ };
590
+ }>;
591
+ }>, "strip", z.ZodTypeAny, {
592
+ createdAt: number;
593
+ version: number;
594
+ authority: string;
595
+ authoritySignature: string;
596
+ transaction: {
597
+ action: SAFETransactionActionType.DELETE;
598
+ data: {
599
+ rulesTransactionType: "RULESETS";
600
+ ruleSet: {
601
+ id: string;
602
+ name: string;
603
+ ruleGroups: unknown[];
604
+ version: number;
605
+ description?: string | undefined;
606
+ };
607
+ };
608
+ };
609
+ }, {
610
+ createdAt: number;
611
+ version: number;
612
+ authority: string;
613
+ authoritySignature: string;
614
+ transaction: {
615
+ action: SAFETransactionActionType.DELETE;
616
+ data: {
617
+ rulesTransactionType: "RULESETS";
618
+ ruleSet: {
619
+ id: string;
620
+ name: string;
621
+ ruleGroups: unknown[];
622
+ version: number;
623
+ description?: string | undefined;
624
+ };
625
+ };
626
+ };
627
+ }>;
628
+ //# sourceMappingURL=rules-transactions-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules-transactions-models.d.ts","sourceRoot":"","sources":["../../../../src/models/safe/transactions/rules-transactions-models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAEH,mBAAmB,EACnB,yBAAyB,EAE5B,MAAM,4BAA4B,CAAC;AAIpC;;GAEG;AACH,oBAAY,wBAAwB;IAChC,QAAQ,aAAa;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,8BAA8B,yBAEzC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxC,CAAC;AAOH;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK3C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK9C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK9C,CAAC"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ISAFETransactionRuleSetDeleteSchema = exports.ISAFETransactionRuleSetUpdateSchema = exports.ISAFETransactionRuleSetAddSchema = exports.ISAFETransactionRuleSetSchema = exports.ISAFETransactionRuleSetDataSchema = exports.SAFERulesTransactionTypeSchema = exports.SAFERulesTransactionType = void 0;
4
+ /**
5
+ * This contains the transactions for the SAFE Rules from the safe network functio s.
6
+ */
7
+ const zod_1 = require("zod");
8
+ const share_rule_models_1 = require("../../rules/share-rule-models");
9
+ const safe_transaction_models_1 = require("../safe-transaction-models");
10
+ //#region Enums
11
+ /**
12
+ * This contains the enums for the authorities objects in the zod format.
13
+ */
14
+ var SAFERulesTransactionType;
15
+ (function (SAFERulesTransactionType) {
16
+ SAFERulesTransactionType["RULESETS"] = "RULESETS";
17
+ })(SAFERulesTransactionType || (exports.SAFERulesTransactionType = SAFERulesTransactionType = {}));
18
+ ;
19
+ /**
20
+ * This contains the schemas for the authorities objects in the zod format.
21
+ */
22
+ exports.SAFERulesTransactionTypeSchema = zod_1.z.enum([
23
+ 'RULESETS',
24
+ ]);
25
+ //#endregion Enums
26
+ //#region Rules Transaction
27
+ /**
28
+ * This is the schema for the safe transaction rule set data.
29
+ */
30
+ exports.ISAFETransactionRuleSetDataSchema = zod_1.z.object({
31
+ rulesTransactionType: exports.SAFERulesTransactionTypeSchema,
32
+ ruleSet: share_rule_models_1.IShareRuleSetSchema,
33
+ });
34
+ /**
35
+ * This is the schema for the safe transaction rule set
36
+ */
37
+ exports.ISAFETransactionRuleSetSchema = safe_transaction_models_1.ISAFETransactionBaseSchema.extend({
38
+ transaction: zod_1.z.object({
39
+ type: zod_1.z.literal(safe_transaction_models_1.SAFETransactionType.RULES),
40
+ action: safe_transaction_models_1.SAFETransactionActionTypeSchema,
41
+ data: exports.ISAFETransactionRuleSetDataSchema,
42
+ }),
43
+ });
44
+ //#endregion Rules Transaction
45
+ //#region RuleSet
46
+ /**
47
+ * This is the schema for the add rule set transaction
48
+ */
49
+ exports.ISAFETransactionRuleSetAddSchema = exports.ISAFETransactionRuleSetSchema.extend({
50
+ transaction: zod_1.z.object({
51
+ action: zod_1.z.literal(safe_transaction_models_1.SAFETransactionActionType.ADD),
52
+ data: exports.ISAFETransactionRuleSetDataSchema,
53
+ }),
54
+ });
55
+ /**
56
+ * This is the schema for the update rule set transaction
57
+ */
58
+ exports.ISAFETransactionRuleSetUpdateSchema = safe_transaction_models_1.ISAFETransactionBaseSchema.extend({
59
+ transaction: zod_1.z.object({
60
+ action: zod_1.z.literal(safe_transaction_models_1.SAFETransactionActionType.UPDATE),
61
+ data: exports.ISAFETransactionRuleSetDataSchema,
62
+ }),
63
+ });
64
+ /**
65
+ * This is the schema for the remove rule set transaction
66
+ */
67
+ exports.ISAFETransactionRuleSetDeleteSchema = safe_transaction_models_1.ISAFETransactionBaseSchema.extend({
68
+ transaction: zod_1.z.object({
69
+ action: zod_1.z.literal(safe_transaction_models_1.SAFETransactionActionType.DELETE),
70
+ data: exports.ISAFETransactionRuleSetDataSchema,
71
+ }),
72
+ });
73
+ //#endregion RuleSet