@dfns/sdk 0.4.0 → 0.4.1

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.
@@ -3,19 +3,24 @@ export type ArchivePolicyParams = {
3
3
  };
4
4
  export type ArchivePolicyResponse = ({
5
5
  name: string;
6
- approvalGroups: {
7
- name?: string | undefined;
8
- quorum: number;
9
- approvers: {
10
- [x: string]: {
11
- [x: string]: string[];
6
+ action: {
7
+ kind: "RequestApproval";
8
+ approvalGroups: {
9
+ name?: string | undefined;
10
+ quorum: number;
11
+ approvers: {
12
+ [x: string]: {
13
+ [x: string]: string[];
14
+ };
12
15
  };
13
- };
14
- }[];
15
- autoRejectTimeout?: (number | undefined) | null;
16
+ }[];
17
+ autoRejectTimeout?: (number | undefined) | null;
18
+ } | {
19
+ kind: "Block";
20
+ };
16
21
  activityKind: "Permissions:Assign";
17
22
  rule: {
18
- kind: "AlwaysRequireApproval";
23
+ kind: "AlwaysTrigger";
19
24
  configuration: {};
20
25
  };
21
26
  filters?: {
@@ -25,19 +30,24 @@ export type ArchivePolicyResponse = ({
25
30
  } | undefined;
26
31
  } | {
27
32
  name: string;
28
- approvalGroups: {
29
- name?: string | undefined;
30
- quorum: number;
31
- approvers: {
32
- [x: string]: {
33
- [x: string]: string[];
33
+ action: {
34
+ kind: "RequestApproval";
35
+ approvalGroups: {
36
+ name?: string | undefined;
37
+ quorum: number;
38
+ approvers: {
39
+ [x: string]: {
40
+ [x: string]: string[];
41
+ };
34
42
  };
35
- };
36
- }[];
37
- autoRejectTimeout?: (number | undefined) | null;
43
+ }[];
44
+ autoRejectTimeout?: (number | undefined) | null;
45
+ } | {
46
+ kind: "Block";
47
+ };
38
48
  activityKind: "Permissions:Modify";
39
49
  rule: {
40
- kind: "AlwaysRequireApproval";
50
+ kind: "AlwaysTrigger";
41
51
  configuration: {};
42
52
  };
43
53
  filters?: {
@@ -47,19 +57,24 @@ export type ArchivePolicyResponse = ({
47
57
  } | undefined;
48
58
  } | {
49
59
  name: string;
50
- approvalGroups: {
51
- name?: string | undefined;
52
- quorum: number;
53
- approvers: {
54
- [x: string]: {
55
- [x: string]: string[];
60
+ action: {
61
+ kind: "RequestApproval";
62
+ approvalGroups: {
63
+ name?: string | undefined;
64
+ quorum: number;
65
+ approvers: {
66
+ [x: string]: {
67
+ [x: string]: string[];
68
+ };
56
69
  };
57
- };
58
- }[];
59
- autoRejectTimeout?: (number | undefined) | null;
70
+ }[];
71
+ autoRejectTimeout?: (number | undefined) | null;
72
+ } | {
73
+ kind: "Block";
74
+ };
60
75
  activityKind: "Policies:Modify";
61
76
  rule: {
62
- kind: "AlwaysRequireApproval";
77
+ kind: "AlwaysTrigger";
63
78
  configuration: {};
64
79
  };
65
80
  filters?: {
@@ -69,20 +84,30 @@ export type ArchivePolicyResponse = ({
69
84
  } | undefined;
70
85
  } | {
71
86
  name: string;
72
- approvalGroups: {
73
- name?: string | undefined;
74
- quorum: number;
75
- approvers: {
76
- [x: string]: {
77
- [x: string]: string[];
87
+ action: {
88
+ kind: "RequestApproval";
89
+ approvalGroups: {
90
+ name?: string | undefined;
91
+ quorum: number;
92
+ approvers: {
93
+ [x: string]: {
94
+ [x: string]: string[];
95
+ };
78
96
  };
79
- };
80
- }[];
81
- autoRejectTimeout?: (number | undefined) | null;
97
+ }[];
98
+ autoRejectTimeout?: (number | undefined) | null;
99
+ } | {
100
+ kind: "Block";
101
+ };
82
102
  activityKind: "Wallets:Sign";
83
103
  rule: {
84
- kind: "AlwaysRequireApproval";
104
+ kind: "AlwaysTrigger";
85
105
  configuration: {};
106
+ } | {
107
+ kind: "TransactionRecipientWhitelist";
108
+ configuration: {
109
+ addresses: string[];
110
+ };
86
111
  } | {
87
112
  kind: "TransactionAmountLimit";
88
113
  configuration: {
@@ -130,7 +155,7 @@ export type CreateApprovalDecisionResponse = {
130
155
  activity: {
131
156
  [x: string]: unknown;
132
157
  };
133
- status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "Expired";
158
+ status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "AutoDenied" | "Expired";
134
159
  expirationDate?: string | undefined;
135
160
  dateCreated?: string | undefined;
136
161
  dateUpdated: string;
@@ -152,19 +177,24 @@ export type CreateApprovalDecisionRequest = CreateApprovalDecisionParams & {
152
177
  };
153
178
  export type CreatePolicyBody = {
154
179
  name: string;
155
- approvalGroups: {
156
- name?: string | undefined;
157
- quorum: number;
158
- approvers: {
159
- [x: string]: {
160
- [x: string]: string[];
180
+ action: {
181
+ kind: "RequestApproval";
182
+ approvalGroups: {
183
+ name?: string | undefined;
184
+ quorum: number;
185
+ approvers: {
186
+ [x: string]: {
187
+ [x: string]: string[];
188
+ };
161
189
  };
162
- };
163
- }[];
164
- autoRejectTimeout?: (number | undefined) | null;
190
+ }[];
191
+ autoRejectTimeout?: (number | undefined) | null;
192
+ } | {
193
+ kind: "Block";
194
+ };
165
195
  activityKind: "Permissions:Assign";
166
196
  rule: {
167
- kind: "AlwaysRequireApproval";
197
+ kind: "AlwaysTrigger";
168
198
  configuration: {};
169
199
  };
170
200
  filters?: {
@@ -174,19 +204,24 @@ export type CreatePolicyBody = {
174
204
  } | undefined;
175
205
  } | {
176
206
  name: string;
177
- approvalGroups: {
178
- name?: string | undefined;
179
- quorum: number;
180
- approvers: {
181
- [x: string]: {
182
- [x: string]: string[];
207
+ action: {
208
+ kind: "RequestApproval";
209
+ approvalGroups: {
210
+ name?: string | undefined;
211
+ quorum: number;
212
+ approvers: {
213
+ [x: string]: {
214
+ [x: string]: string[];
215
+ };
183
216
  };
184
- };
185
- }[];
186
- autoRejectTimeout?: (number | undefined) | null;
217
+ }[];
218
+ autoRejectTimeout?: (number | undefined) | null;
219
+ } | {
220
+ kind: "Block";
221
+ };
187
222
  activityKind: "Permissions:Modify";
188
223
  rule: {
189
- kind: "AlwaysRequireApproval";
224
+ kind: "AlwaysTrigger";
190
225
  configuration: {};
191
226
  };
192
227
  filters?: {
@@ -196,19 +231,24 @@ export type CreatePolicyBody = {
196
231
  } | undefined;
197
232
  } | {
198
233
  name: string;
199
- approvalGroups: {
200
- name?: string | undefined;
201
- quorum: number;
202
- approvers: {
203
- [x: string]: {
204
- [x: string]: string[];
234
+ action: {
235
+ kind: "RequestApproval";
236
+ approvalGroups: {
237
+ name?: string | undefined;
238
+ quorum: number;
239
+ approvers: {
240
+ [x: string]: {
241
+ [x: string]: string[];
242
+ };
205
243
  };
206
- };
207
- }[];
208
- autoRejectTimeout?: (number | undefined) | null;
244
+ }[];
245
+ autoRejectTimeout?: (number | undefined) | null;
246
+ } | {
247
+ kind: "Block";
248
+ };
209
249
  activityKind: "Policies:Modify";
210
250
  rule: {
211
- kind: "AlwaysRequireApproval";
251
+ kind: "AlwaysTrigger";
212
252
  configuration: {};
213
253
  };
214
254
  filters?: {
@@ -218,20 +258,30 @@ export type CreatePolicyBody = {
218
258
  } | undefined;
219
259
  } | {
220
260
  name: string;
221
- approvalGroups: {
222
- name?: string | undefined;
223
- quorum: number;
224
- approvers: {
225
- [x: string]: {
226
- [x: string]: string[];
261
+ action: {
262
+ kind: "RequestApproval";
263
+ approvalGroups: {
264
+ name?: string | undefined;
265
+ quorum: number;
266
+ approvers: {
267
+ [x: string]: {
268
+ [x: string]: string[];
269
+ };
227
270
  };
228
- };
229
- }[];
230
- autoRejectTimeout?: (number | undefined) | null;
271
+ }[];
272
+ autoRejectTimeout?: (number | undefined) | null;
273
+ } | {
274
+ kind: "Block";
275
+ };
231
276
  activityKind: "Wallets:Sign";
232
277
  rule: {
233
- kind: "AlwaysRequireApproval";
278
+ kind: "AlwaysTrigger";
234
279
  configuration: {};
280
+ } | {
281
+ kind: "TransactionRecipientWhitelist";
282
+ configuration: {
283
+ addresses: string[];
284
+ };
235
285
  } | {
236
286
  kind: "TransactionAmountLimit";
237
287
  configuration: {
@@ -260,19 +310,24 @@ export type CreatePolicyBody = {
260
310
  };
261
311
  export type CreatePolicyResponse = ({
262
312
  name: string;
263
- approvalGroups: {
264
- name?: string | undefined;
265
- quorum: number;
266
- approvers: {
267
- [x: string]: {
268
- [x: string]: string[];
313
+ action: {
314
+ kind: "RequestApproval";
315
+ approvalGroups: {
316
+ name?: string | undefined;
317
+ quorum: number;
318
+ approvers: {
319
+ [x: string]: {
320
+ [x: string]: string[];
321
+ };
269
322
  };
270
- };
271
- }[];
272
- autoRejectTimeout?: (number | undefined) | null;
323
+ }[];
324
+ autoRejectTimeout?: (number | undefined) | null;
325
+ } | {
326
+ kind: "Block";
327
+ };
273
328
  activityKind: "Permissions:Assign";
274
329
  rule: {
275
- kind: "AlwaysRequireApproval";
330
+ kind: "AlwaysTrigger";
276
331
  configuration: {};
277
332
  };
278
333
  filters?: {
@@ -282,19 +337,24 @@ export type CreatePolicyResponse = ({
282
337
  } | undefined;
283
338
  } | {
284
339
  name: string;
285
- approvalGroups: {
286
- name?: string | undefined;
287
- quorum: number;
288
- approvers: {
289
- [x: string]: {
290
- [x: string]: string[];
340
+ action: {
341
+ kind: "RequestApproval";
342
+ approvalGroups: {
343
+ name?: string | undefined;
344
+ quorum: number;
345
+ approvers: {
346
+ [x: string]: {
347
+ [x: string]: string[];
348
+ };
291
349
  };
292
- };
293
- }[];
294
- autoRejectTimeout?: (number | undefined) | null;
350
+ }[];
351
+ autoRejectTimeout?: (number | undefined) | null;
352
+ } | {
353
+ kind: "Block";
354
+ };
295
355
  activityKind: "Permissions:Modify";
296
356
  rule: {
297
- kind: "AlwaysRequireApproval";
357
+ kind: "AlwaysTrigger";
298
358
  configuration: {};
299
359
  };
300
360
  filters?: {
@@ -304,19 +364,24 @@ export type CreatePolicyResponse = ({
304
364
  } | undefined;
305
365
  } | {
306
366
  name: string;
307
- approvalGroups: {
308
- name?: string | undefined;
309
- quorum: number;
310
- approvers: {
311
- [x: string]: {
312
- [x: string]: string[];
367
+ action: {
368
+ kind: "RequestApproval";
369
+ approvalGroups: {
370
+ name?: string | undefined;
371
+ quorum: number;
372
+ approvers: {
373
+ [x: string]: {
374
+ [x: string]: string[];
375
+ };
313
376
  };
314
- };
315
- }[];
316
- autoRejectTimeout?: (number | undefined) | null;
377
+ }[];
378
+ autoRejectTimeout?: (number | undefined) | null;
379
+ } | {
380
+ kind: "Block";
381
+ };
317
382
  activityKind: "Policies:Modify";
318
383
  rule: {
319
- kind: "AlwaysRequireApproval";
384
+ kind: "AlwaysTrigger";
320
385
  configuration: {};
321
386
  };
322
387
  filters?: {
@@ -326,20 +391,30 @@ export type CreatePolicyResponse = ({
326
391
  } | undefined;
327
392
  } | {
328
393
  name: string;
329
- approvalGroups: {
330
- name?: string | undefined;
331
- quorum: number;
332
- approvers: {
333
- [x: string]: {
334
- [x: string]: string[];
394
+ action: {
395
+ kind: "RequestApproval";
396
+ approvalGroups: {
397
+ name?: string | undefined;
398
+ quorum: number;
399
+ approvers: {
400
+ [x: string]: {
401
+ [x: string]: string[];
402
+ };
335
403
  };
336
- };
337
- }[];
338
- autoRejectTimeout?: (number | undefined) | null;
404
+ }[];
405
+ autoRejectTimeout?: (number | undefined) | null;
406
+ } | {
407
+ kind: "Block";
408
+ };
339
409
  activityKind: "Wallets:Sign";
340
410
  rule: {
341
- kind: "AlwaysRequireApproval";
411
+ kind: "AlwaysTrigger";
342
412
  configuration: {};
413
+ } | {
414
+ kind: "TransactionRecipientWhitelist";
415
+ configuration: {
416
+ addresses: string[];
417
+ };
343
418
  } | {
344
419
  kind: "TransactionAmountLimit";
345
420
  configuration: {
@@ -379,19 +454,24 @@ export type GetPolicyParams = {
379
454
  };
380
455
  export type GetPolicyResponse = (({
381
456
  name: string;
382
- approvalGroups: {
383
- name?: string | undefined;
384
- quorum: number;
385
- approvers: {
386
- [x: string]: {
387
- [x: string]: string[];
457
+ action: {
458
+ kind: "RequestApproval";
459
+ approvalGroups: {
460
+ name?: string | undefined;
461
+ quorum: number;
462
+ approvers: {
463
+ [x: string]: {
464
+ [x: string]: string[];
465
+ };
388
466
  };
389
- };
390
- }[];
391
- autoRejectTimeout?: (number | undefined) | null;
467
+ }[];
468
+ autoRejectTimeout?: (number | undefined) | null;
469
+ } | {
470
+ kind: "Block";
471
+ };
392
472
  activityKind: "Permissions:Assign";
393
473
  rule: {
394
- kind: "AlwaysRequireApproval";
474
+ kind: "AlwaysTrigger";
395
475
  configuration: {};
396
476
  };
397
477
  filters?: {
@@ -401,19 +481,24 @@ export type GetPolicyResponse = (({
401
481
  } | undefined;
402
482
  } | {
403
483
  name: string;
404
- approvalGroups: {
405
- name?: string | undefined;
406
- quorum: number;
407
- approvers: {
408
- [x: string]: {
409
- [x: string]: string[];
484
+ action: {
485
+ kind: "RequestApproval";
486
+ approvalGroups: {
487
+ name?: string | undefined;
488
+ quorum: number;
489
+ approvers: {
490
+ [x: string]: {
491
+ [x: string]: string[];
492
+ };
410
493
  };
411
- };
412
- }[];
413
- autoRejectTimeout?: (number | undefined) | null;
494
+ }[];
495
+ autoRejectTimeout?: (number | undefined) | null;
496
+ } | {
497
+ kind: "Block";
498
+ };
414
499
  activityKind: "Permissions:Modify";
415
500
  rule: {
416
- kind: "AlwaysRequireApproval";
501
+ kind: "AlwaysTrigger";
417
502
  configuration: {};
418
503
  };
419
504
  filters?: {
@@ -423,19 +508,24 @@ export type GetPolicyResponse = (({
423
508
  } | undefined;
424
509
  } | {
425
510
  name: string;
426
- approvalGroups: {
427
- name?: string | undefined;
428
- quorum: number;
429
- approvers: {
430
- [x: string]: {
431
- [x: string]: string[];
511
+ action: {
512
+ kind: "RequestApproval";
513
+ approvalGroups: {
514
+ name?: string | undefined;
515
+ quorum: number;
516
+ approvers: {
517
+ [x: string]: {
518
+ [x: string]: string[];
519
+ };
432
520
  };
433
- };
434
- }[];
435
- autoRejectTimeout?: (number | undefined) | null;
521
+ }[];
522
+ autoRejectTimeout?: (number | undefined) | null;
523
+ } | {
524
+ kind: "Block";
525
+ };
436
526
  activityKind: "Policies:Modify";
437
527
  rule: {
438
- kind: "AlwaysRequireApproval";
528
+ kind: "AlwaysTrigger";
439
529
  configuration: {};
440
530
  };
441
531
  filters?: {
@@ -445,20 +535,30 @@ export type GetPolicyResponse = (({
445
535
  } | undefined;
446
536
  } | {
447
537
  name: string;
448
- approvalGroups: {
449
- name?: string | undefined;
450
- quorum: number;
451
- approvers: {
452
- [x: string]: {
453
- [x: string]: string[];
538
+ action: {
539
+ kind: "RequestApproval";
540
+ approvalGroups: {
541
+ name?: string | undefined;
542
+ quorum: number;
543
+ approvers: {
544
+ [x: string]: {
545
+ [x: string]: string[];
546
+ };
454
547
  };
455
- };
456
- }[];
457
- autoRejectTimeout?: (number | undefined) | null;
548
+ }[];
549
+ autoRejectTimeout?: (number | undefined) | null;
550
+ } | {
551
+ kind: "Block";
552
+ };
458
553
  activityKind: "Wallets:Sign";
459
554
  rule: {
460
- kind: "AlwaysRequireApproval";
555
+ kind: "AlwaysTrigger";
461
556
  configuration: {};
557
+ } | {
558
+ kind: "TransactionRecipientWhitelist";
559
+ configuration: {
560
+ addresses: string[];
561
+ };
462
562
  } | {
463
563
  kind: "TransactionAmountLimit";
464
564
  configuration: {
@@ -503,19 +603,24 @@ export type GetPolicyResponse = (({
503
603
  entityId: string;
504
604
  body: ({
505
605
  name: string;
506
- approvalGroups: {
507
- name?: string | undefined;
508
- quorum: number;
509
- approvers: {
510
- [x: string]: {
511
- [x: string]: string[];
606
+ action: {
607
+ kind: "RequestApproval";
608
+ approvalGroups: {
609
+ name?: string | undefined;
610
+ quorum: number;
611
+ approvers: {
612
+ [x: string]: {
613
+ [x: string]: string[];
614
+ };
512
615
  };
513
- };
514
- }[];
515
- autoRejectTimeout?: (number | undefined) | null;
616
+ }[];
617
+ autoRejectTimeout?: (number | undefined) | null;
618
+ } | {
619
+ kind: "Block";
620
+ };
516
621
  activityKind: "Permissions:Assign";
517
622
  rule: {
518
- kind: "AlwaysRequireApproval";
623
+ kind: "AlwaysTrigger";
519
624
  configuration: {};
520
625
  };
521
626
  filters?: {
@@ -525,19 +630,24 @@ export type GetPolicyResponse = (({
525
630
  } | undefined;
526
631
  } | {
527
632
  name: string;
528
- approvalGroups: {
529
- name?: string | undefined;
530
- quorum: number;
531
- approvers: {
532
- [x: string]: {
533
- [x: string]: string[];
633
+ action: {
634
+ kind: "RequestApproval";
635
+ approvalGroups: {
636
+ name?: string | undefined;
637
+ quorum: number;
638
+ approvers: {
639
+ [x: string]: {
640
+ [x: string]: string[];
641
+ };
534
642
  };
535
- };
536
- }[];
537
- autoRejectTimeout?: (number | undefined) | null;
643
+ }[];
644
+ autoRejectTimeout?: (number | undefined) | null;
645
+ } | {
646
+ kind: "Block";
647
+ };
538
648
  activityKind: "Permissions:Modify";
539
649
  rule: {
540
- kind: "AlwaysRequireApproval";
650
+ kind: "AlwaysTrigger";
541
651
  configuration: {};
542
652
  };
543
653
  filters?: {
@@ -547,19 +657,24 @@ export type GetPolicyResponse = (({
547
657
  } | undefined;
548
658
  } | {
549
659
  name: string;
550
- approvalGroups: {
551
- name?: string | undefined;
552
- quorum: number;
553
- approvers: {
554
- [x: string]: {
555
- [x: string]: string[];
660
+ action: {
661
+ kind: "RequestApproval";
662
+ approvalGroups: {
663
+ name?: string | undefined;
664
+ quorum: number;
665
+ approvers: {
666
+ [x: string]: {
667
+ [x: string]: string[];
668
+ };
556
669
  };
557
- };
558
- }[];
559
- autoRejectTimeout?: (number | undefined) | null;
670
+ }[];
671
+ autoRejectTimeout?: (number | undefined) | null;
672
+ } | {
673
+ kind: "Block";
674
+ };
560
675
  activityKind: "Policies:Modify";
561
676
  rule: {
562
- kind: "AlwaysRequireApproval";
677
+ kind: "AlwaysTrigger";
563
678
  configuration: {};
564
679
  };
565
680
  filters?: {
@@ -569,20 +684,30 @@ export type GetPolicyResponse = (({
569
684
  } | undefined;
570
685
  } | {
571
686
  name: string;
572
- approvalGroups: {
573
- name?: string | undefined;
574
- quorum: number;
575
- approvers: {
576
- [x: string]: {
577
- [x: string]: string[];
687
+ action: {
688
+ kind: "RequestApproval";
689
+ approvalGroups: {
690
+ name?: string | undefined;
691
+ quorum: number;
692
+ approvers: {
693
+ [x: string]: {
694
+ [x: string]: string[];
695
+ };
578
696
  };
579
- };
580
- }[];
581
- autoRejectTimeout?: (number | undefined) | null;
697
+ }[];
698
+ autoRejectTimeout?: (number | undefined) | null;
699
+ } | {
700
+ kind: "Block";
701
+ };
582
702
  activityKind: "Wallets:Sign";
583
703
  rule: {
584
- kind: "AlwaysRequireApproval";
704
+ kind: "AlwaysTrigger";
585
705
  configuration: {};
706
+ } | {
707
+ kind: "TransactionRecipientWhitelist";
708
+ configuration: {
709
+ addresses: string[];
710
+ };
586
711
  } | {
587
712
  kind: "TransactionAmountLimit";
588
713
  configuration: {
@@ -622,7 +747,7 @@ export type GetPolicyRequest = GetPolicyParams;
622
747
  export type ListApprovalsQuery = {
623
748
  limit?: string | undefined;
624
749
  paginationToken?: string | undefined;
625
- status?: ("Pending" | "Approved" | "Denied" | "AutoApproved" | "Expired") | undefined;
750
+ status?: ("Pending" | "Approved" | "Denied" | "AutoApproved" | "AutoDenied" | "Expired") | undefined;
626
751
  triggerStatus?: ("Triggered" | "Skipped") | undefined;
627
752
  initiatorId?: string | undefined;
628
753
  approverId?: string | undefined;
@@ -636,7 +761,7 @@ export type ListApprovalsResponse = {
636
761
  activity: {
637
762
  [x: string]: unknown;
638
763
  };
639
- status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "Expired";
764
+ status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "AutoDenied" | "Expired";
640
765
  expirationDate?: string | undefined;
641
766
  dateCreated?: string | undefined;
642
767
  dateUpdated: string;
@@ -666,19 +791,24 @@ export type ListPoliciesQuery = {
666
791
  export type ListPoliciesResponse = {
667
792
  items: ((({
668
793
  name: string;
669
- approvalGroups: {
670
- name?: string | undefined;
671
- quorum: number;
672
- approvers: {
673
- [x: string]: {
674
- [x: string]: string[];
794
+ action: {
795
+ kind: "RequestApproval";
796
+ approvalGroups: {
797
+ name?: string | undefined;
798
+ quorum: number;
799
+ approvers: {
800
+ [x: string]: {
801
+ [x: string]: string[];
802
+ };
675
803
  };
676
- };
677
- }[];
678
- autoRejectTimeout?: (number | undefined) | null;
804
+ }[];
805
+ autoRejectTimeout?: (number | undefined) | null;
806
+ } | {
807
+ kind: "Block";
808
+ };
679
809
  activityKind: "Permissions:Assign";
680
810
  rule: {
681
- kind: "AlwaysRequireApproval";
811
+ kind: "AlwaysTrigger";
682
812
  configuration: {};
683
813
  };
684
814
  filters?: {
@@ -688,19 +818,24 @@ export type ListPoliciesResponse = {
688
818
  } | undefined;
689
819
  } | {
690
820
  name: string;
691
- approvalGroups: {
692
- name?: string | undefined;
693
- quorum: number;
694
- approvers: {
695
- [x: string]: {
696
- [x: string]: string[];
821
+ action: {
822
+ kind: "RequestApproval";
823
+ approvalGroups: {
824
+ name?: string | undefined;
825
+ quorum: number;
826
+ approvers: {
827
+ [x: string]: {
828
+ [x: string]: string[];
829
+ };
697
830
  };
698
- };
699
- }[];
700
- autoRejectTimeout?: (number | undefined) | null;
831
+ }[];
832
+ autoRejectTimeout?: (number | undefined) | null;
833
+ } | {
834
+ kind: "Block";
835
+ };
701
836
  activityKind: "Permissions:Modify";
702
837
  rule: {
703
- kind: "AlwaysRequireApproval";
838
+ kind: "AlwaysTrigger";
704
839
  configuration: {};
705
840
  };
706
841
  filters?: {
@@ -710,19 +845,24 @@ export type ListPoliciesResponse = {
710
845
  } | undefined;
711
846
  } | {
712
847
  name: string;
713
- approvalGroups: {
714
- name?: string | undefined;
715
- quorum: number;
716
- approvers: {
717
- [x: string]: {
718
- [x: string]: string[];
848
+ action: {
849
+ kind: "RequestApproval";
850
+ approvalGroups: {
851
+ name?: string | undefined;
852
+ quorum: number;
853
+ approvers: {
854
+ [x: string]: {
855
+ [x: string]: string[];
856
+ };
719
857
  };
720
- };
721
- }[];
722
- autoRejectTimeout?: (number | undefined) | null;
858
+ }[];
859
+ autoRejectTimeout?: (number | undefined) | null;
860
+ } | {
861
+ kind: "Block";
862
+ };
723
863
  activityKind: "Policies:Modify";
724
864
  rule: {
725
- kind: "AlwaysRequireApproval";
865
+ kind: "AlwaysTrigger";
726
866
  configuration: {};
727
867
  };
728
868
  filters?: {
@@ -732,20 +872,30 @@ export type ListPoliciesResponse = {
732
872
  } | undefined;
733
873
  } | {
734
874
  name: string;
735
- approvalGroups: {
736
- name?: string | undefined;
737
- quorum: number;
738
- approvers: {
739
- [x: string]: {
740
- [x: string]: string[];
875
+ action: {
876
+ kind: "RequestApproval";
877
+ approvalGroups: {
878
+ name?: string | undefined;
879
+ quorum: number;
880
+ approvers: {
881
+ [x: string]: {
882
+ [x: string]: string[];
883
+ };
741
884
  };
742
- };
743
- }[];
744
- autoRejectTimeout?: (number | undefined) | null;
885
+ }[];
886
+ autoRejectTimeout?: (number | undefined) | null;
887
+ } | {
888
+ kind: "Block";
889
+ };
745
890
  activityKind: "Wallets:Sign";
746
891
  rule: {
747
- kind: "AlwaysRequireApproval";
892
+ kind: "AlwaysTrigger";
748
893
  configuration: {};
894
+ } | {
895
+ kind: "TransactionRecipientWhitelist";
896
+ configuration: {
897
+ addresses: string[];
898
+ };
749
899
  } | {
750
900
  kind: "TransactionAmountLimit";
751
901
  configuration: {
@@ -790,19 +940,24 @@ export type ListPoliciesResponse = {
790
940
  entityId: string;
791
941
  body: ({
792
942
  name: string;
793
- approvalGroups: {
794
- name?: string | undefined;
795
- quorum: number;
796
- approvers: {
797
- [x: string]: {
798
- [x: string]: string[];
943
+ action: {
944
+ kind: "RequestApproval";
945
+ approvalGroups: {
946
+ name?: string | undefined;
947
+ quorum: number;
948
+ approvers: {
949
+ [x: string]: {
950
+ [x: string]: string[];
951
+ };
799
952
  };
800
- };
801
- }[];
802
- autoRejectTimeout?: (number | undefined) | null;
953
+ }[];
954
+ autoRejectTimeout?: (number | undefined) | null;
955
+ } | {
956
+ kind: "Block";
957
+ };
803
958
  activityKind: "Permissions:Assign";
804
959
  rule: {
805
- kind: "AlwaysRequireApproval";
960
+ kind: "AlwaysTrigger";
806
961
  configuration: {};
807
962
  };
808
963
  filters?: {
@@ -812,19 +967,24 @@ export type ListPoliciesResponse = {
812
967
  } | undefined;
813
968
  } | {
814
969
  name: string;
815
- approvalGroups: {
816
- name?: string | undefined;
817
- quorum: number;
818
- approvers: {
819
- [x: string]: {
820
- [x: string]: string[];
970
+ action: {
971
+ kind: "RequestApproval";
972
+ approvalGroups: {
973
+ name?: string | undefined;
974
+ quorum: number;
975
+ approvers: {
976
+ [x: string]: {
977
+ [x: string]: string[];
978
+ };
821
979
  };
822
- };
823
- }[];
824
- autoRejectTimeout?: (number | undefined) | null;
980
+ }[];
981
+ autoRejectTimeout?: (number | undefined) | null;
982
+ } | {
983
+ kind: "Block";
984
+ };
825
985
  activityKind: "Permissions:Modify";
826
986
  rule: {
827
- kind: "AlwaysRequireApproval";
987
+ kind: "AlwaysTrigger";
828
988
  configuration: {};
829
989
  };
830
990
  filters?: {
@@ -834,19 +994,24 @@ export type ListPoliciesResponse = {
834
994
  } | undefined;
835
995
  } | {
836
996
  name: string;
837
- approvalGroups: {
838
- name?: string | undefined;
839
- quorum: number;
840
- approvers: {
841
- [x: string]: {
842
- [x: string]: string[];
997
+ action: {
998
+ kind: "RequestApproval";
999
+ approvalGroups: {
1000
+ name?: string | undefined;
1001
+ quorum: number;
1002
+ approvers: {
1003
+ [x: string]: {
1004
+ [x: string]: string[];
1005
+ };
843
1006
  };
844
- };
845
- }[];
846
- autoRejectTimeout?: (number | undefined) | null;
1007
+ }[];
1008
+ autoRejectTimeout?: (number | undefined) | null;
1009
+ } | {
1010
+ kind: "Block";
1011
+ };
847
1012
  activityKind: "Policies:Modify";
848
1013
  rule: {
849
- kind: "AlwaysRequireApproval";
1014
+ kind: "AlwaysTrigger";
850
1015
  configuration: {};
851
1016
  };
852
1017
  filters?: {
@@ -856,20 +1021,30 @@ export type ListPoliciesResponse = {
856
1021
  } | undefined;
857
1022
  } | {
858
1023
  name: string;
859
- approvalGroups: {
860
- name?: string | undefined;
861
- quorum: number;
862
- approvers: {
863
- [x: string]: {
864
- [x: string]: string[];
1024
+ action: {
1025
+ kind: "RequestApproval";
1026
+ approvalGroups: {
1027
+ name?: string | undefined;
1028
+ quorum: number;
1029
+ approvers: {
1030
+ [x: string]: {
1031
+ [x: string]: string[];
1032
+ };
865
1033
  };
866
- };
867
- }[];
868
- autoRejectTimeout?: (number | undefined) | null;
1034
+ }[];
1035
+ autoRejectTimeout?: (number | undefined) | null;
1036
+ } | {
1037
+ kind: "Block";
1038
+ };
869
1039
  activityKind: "Wallets:Sign";
870
1040
  rule: {
871
- kind: "AlwaysRequireApproval";
1041
+ kind: "AlwaysTrigger";
872
1042
  configuration: {};
1043
+ } | {
1044
+ kind: "TransactionRecipientWhitelist";
1045
+ configuration: {
1046
+ addresses: string[];
1047
+ };
873
1048
  } | {
874
1049
  kind: "TransactionAmountLimit";
875
1050
  configuration: {
@@ -912,19 +1087,24 @@ export type ListPoliciesRequest = {
912
1087
  };
913
1088
  export type UpdatePolicyBody = {
914
1089
  name: string;
915
- approvalGroups: {
916
- name?: string | undefined;
917
- quorum: number;
918
- approvers: {
919
- [x: string]: {
920
- [x: string]: string[];
1090
+ action: {
1091
+ kind: "RequestApproval";
1092
+ approvalGroups: {
1093
+ name?: string | undefined;
1094
+ quorum: number;
1095
+ approvers: {
1096
+ [x: string]: {
1097
+ [x: string]: string[];
1098
+ };
921
1099
  };
922
- };
923
- }[];
924
- autoRejectTimeout?: (number | undefined) | null;
1100
+ }[];
1101
+ autoRejectTimeout?: (number | undefined) | null;
1102
+ } | {
1103
+ kind: "Block";
1104
+ };
925
1105
  activityKind: "Permissions:Assign";
926
1106
  rule: {
927
- kind: "AlwaysRequireApproval";
1107
+ kind: "AlwaysTrigger";
928
1108
  configuration: {};
929
1109
  };
930
1110
  filters?: {
@@ -934,19 +1114,24 @@ export type UpdatePolicyBody = {
934
1114
  } | undefined;
935
1115
  } | {
936
1116
  name: string;
937
- approvalGroups: {
938
- name?: string | undefined;
939
- quorum: number;
940
- approvers: {
941
- [x: string]: {
942
- [x: string]: string[];
1117
+ action: {
1118
+ kind: "RequestApproval";
1119
+ approvalGroups: {
1120
+ name?: string | undefined;
1121
+ quorum: number;
1122
+ approvers: {
1123
+ [x: string]: {
1124
+ [x: string]: string[];
1125
+ };
943
1126
  };
944
- };
945
- }[];
946
- autoRejectTimeout?: (number | undefined) | null;
1127
+ }[];
1128
+ autoRejectTimeout?: (number | undefined) | null;
1129
+ } | {
1130
+ kind: "Block";
1131
+ };
947
1132
  activityKind: "Permissions:Modify";
948
1133
  rule: {
949
- kind: "AlwaysRequireApproval";
1134
+ kind: "AlwaysTrigger";
950
1135
  configuration: {};
951
1136
  };
952
1137
  filters?: {
@@ -956,19 +1141,24 @@ export type UpdatePolicyBody = {
956
1141
  } | undefined;
957
1142
  } | {
958
1143
  name: string;
959
- approvalGroups: {
960
- name?: string | undefined;
961
- quorum: number;
962
- approvers: {
963
- [x: string]: {
964
- [x: string]: string[];
1144
+ action: {
1145
+ kind: "RequestApproval";
1146
+ approvalGroups: {
1147
+ name?: string | undefined;
1148
+ quorum: number;
1149
+ approvers: {
1150
+ [x: string]: {
1151
+ [x: string]: string[];
1152
+ };
965
1153
  };
966
- };
967
- }[];
968
- autoRejectTimeout?: (number | undefined) | null;
1154
+ }[];
1155
+ autoRejectTimeout?: (number | undefined) | null;
1156
+ } | {
1157
+ kind: "Block";
1158
+ };
969
1159
  activityKind: "Policies:Modify";
970
1160
  rule: {
971
- kind: "AlwaysRequireApproval";
1161
+ kind: "AlwaysTrigger";
972
1162
  configuration: {};
973
1163
  };
974
1164
  filters?: {
@@ -978,20 +1168,30 @@ export type UpdatePolicyBody = {
978
1168
  } | undefined;
979
1169
  } | {
980
1170
  name: string;
981
- approvalGroups: {
982
- name?: string | undefined;
983
- quorum: number;
984
- approvers: {
985
- [x: string]: {
986
- [x: string]: string[];
1171
+ action: {
1172
+ kind: "RequestApproval";
1173
+ approvalGroups: {
1174
+ name?: string | undefined;
1175
+ quorum: number;
1176
+ approvers: {
1177
+ [x: string]: {
1178
+ [x: string]: string[];
1179
+ };
987
1180
  };
988
- };
989
- }[];
990
- autoRejectTimeout?: (number | undefined) | null;
1181
+ }[];
1182
+ autoRejectTimeout?: (number | undefined) | null;
1183
+ } | {
1184
+ kind: "Block";
1185
+ };
991
1186
  activityKind: "Wallets:Sign";
992
1187
  rule: {
993
- kind: "AlwaysRequireApproval";
1188
+ kind: "AlwaysTrigger";
994
1189
  configuration: {};
1190
+ } | {
1191
+ kind: "TransactionRecipientWhitelist";
1192
+ configuration: {
1193
+ addresses: string[];
1194
+ };
995
1195
  } | {
996
1196
  kind: "TransactionAmountLimit";
997
1197
  configuration: {
@@ -1023,19 +1223,24 @@ export type UpdatePolicyParams = {
1023
1223
  };
1024
1224
  export type UpdatePolicyResponse = ({
1025
1225
  name: string;
1026
- approvalGroups: {
1027
- name?: string | undefined;
1028
- quorum: number;
1029
- approvers: {
1030
- [x: string]: {
1031
- [x: string]: string[];
1226
+ action: {
1227
+ kind: "RequestApproval";
1228
+ approvalGroups: {
1229
+ name?: string | undefined;
1230
+ quorum: number;
1231
+ approvers: {
1232
+ [x: string]: {
1233
+ [x: string]: string[];
1234
+ };
1032
1235
  };
1033
- };
1034
- }[];
1035
- autoRejectTimeout?: (number | undefined) | null;
1236
+ }[];
1237
+ autoRejectTimeout?: (number | undefined) | null;
1238
+ } | {
1239
+ kind: "Block";
1240
+ };
1036
1241
  activityKind: "Permissions:Assign";
1037
1242
  rule: {
1038
- kind: "AlwaysRequireApproval";
1243
+ kind: "AlwaysTrigger";
1039
1244
  configuration: {};
1040
1245
  };
1041
1246
  filters?: {
@@ -1045,19 +1250,24 @@ export type UpdatePolicyResponse = ({
1045
1250
  } | undefined;
1046
1251
  } | {
1047
1252
  name: string;
1048
- approvalGroups: {
1049
- name?: string | undefined;
1050
- quorum: number;
1051
- approvers: {
1052
- [x: string]: {
1053
- [x: string]: string[];
1253
+ action: {
1254
+ kind: "RequestApproval";
1255
+ approvalGroups: {
1256
+ name?: string | undefined;
1257
+ quorum: number;
1258
+ approvers: {
1259
+ [x: string]: {
1260
+ [x: string]: string[];
1261
+ };
1054
1262
  };
1055
- };
1056
- }[];
1057
- autoRejectTimeout?: (number | undefined) | null;
1263
+ }[];
1264
+ autoRejectTimeout?: (number | undefined) | null;
1265
+ } | {
1266
+ kind: "Block";
1267
+ };
1058
1268
  activityKind: "Permissions:Modify";
1059
1269
  rule: {
1060
- kind: "AlwaysRequireApproval";
1270
+ kind: "AlwaysTrigger";
1061
1271
  configuration: {};
1062
1272
  };
1063
1273
  filters?: {
@@ -1067,19 +1277,24 @@ export type UpdatePolicyResponse = ({
1067
1277
  } | undefined;
1068
1278
  } | {
1069
1279
  name: string;
1070
- approvalGroups: {
1071
- name?: string | undefined;
1072
- quorum: number;
1073
- approvers: {
1074
- [x: string]: {
1075
- [x: string]: string[];
1280
+ action: {
1281
+ kind: "RequestApproval";
1282
+ approvalGroups: {
1283
+ name?: string | undefined;
1284
+ quorum: number;
1285
+ approvers: {
1286
+ [x: string]: {
1287
+ [x: string]: string[];
1288
+ };
1076
1289
  };
1077
- };
1078
- }[];
1079
- autoRejectTimeout?: (number | undefined) | null;
1290
+ }[];
1291
+ autoRejectTimeout?: (number | undefined) | null;
1292
+ } | {
1293
+ kind: "Block";
1294
+ };
1080
1295
  activityKind: "Policies:Modify";
1081
1296
  rule: {
1082
- kind: "AlwaysRequireApproval";
1297
+ kind: "AlwaysTrigger";
1083
1298
  configuration: {};
1084
1299
  };
1085
1300
  filters?: {
@@ -1089,20 +1304,30 @@ export type UpdatePolicyResponse = ({
1089
1304
  } | undefined;
1090
1305
  } | {
1091
1306
  name: string;
1092
- approvalGroups: {
1093
- name?: string | undefined;
1094
- quorum: number;
1095
- approvers: {
1096
- [x: string]: {
1097
- [x: string]: string[];
1307
+ action: {
1308
+ kind: "RequestApproval";
1309
+ approvalGroups: {
1310
+ name?: string | undefined;
1311
+ quorum: number;
1312
+ approvers: {
1313
+ [x: string]: {
1314
+ [x: string]: string[];
1315
+ };
1098
1316
  };
1099
- };
1100
- }[];
1101
- autoRejectTimeout?: (number | undefined) | null;
1317
+ }[];
1318
+ autoRejectTimeout?: (number | undefined) | null;
1319
+ } | {
1320
+ kind: "Block";
1321
+ };
1102
1322
  activityKind: "Wallets:Sign";
1103
1323
  rule: {
1104
- kind: "AlwaysRequireApproval";
1324
+ kind: "AlwaysTrigger";
1105
1325
  configuration: {};
1326
+ } | {
1327
+ kind: "TransactionRecipientWhitelist";
1328
+ configuration: {
1329
+ addresses: string[];
1330
+ };
1106
1331
  } | {
1107
1332
  kind: "TransactionAmountLimit";
1108
1333
  configuration: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfns/sdk",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "dependencies": {
5
5
  "buffer": "6.0.3",
6
6
  "cross-fetch": "3.1.6",