@dfns/sdk 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dfnsApiClient.d.ts +5 -0
- package/dfnsApiClient.js +7 -0
- package/dfnsDelegatedApiClient.d.ts +5 -0
- package/dfnsDelegatedApiClient.js +7 -0
- package/generated/permissions/client.d.ts +14 -0
- package/generated/permissions/client.js +104 -0
- package/generated/permissions/delegatedClient.d.ts +20 -0
- package/generated/permissions/delegatedClient.js +180 -0
- package/generated/permissions/index.d.ts +3 -0
- package/generated/permissions/index.js +19 -0
- package/generated/permissions/types.d.ts +225 -0
- package/generated/permissions/types.js +2 -0
- package/generated/policies/types.d.ts +392 -10
- package/generated/wallets/types.d.ts +23 -23
- package/package.json +1 -1
- package/types/permissions.d.ts +1 -0
- package/types/permissions.js +17 -0
|
@@ -13,8 +13,118 @@ export type ArchivePolicyResponse = {
|
|
|
13
13
|
operationKind: "Create" | "Update" | "Delete";
|
|
14
14
|
status: "Applied" | "Failed" | "Pending" | "Rejected";
|
|
15
15
|
entityId: string;
|
|
16
|
-
body: {
|
|
17
|
-
|
|
16
|
+
body: ({
|
|
17
|
+
name: string;
|
|
18
|
+
approvalGroups: {
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
quorum: number;
|
|
21
|
+
approvers?: {
|
|
22
|
+
[x: string]: {
|
|
23
|
+
[x: string]: string[];
|
|
24
|
+
};
|
|
25
|
+
} | undefined;
|
|
26
|
+
}[];
|
|
27
|
+
autoRejectTimeout?: number | undefined;
|
|
28
|
+
activityKind: "Permissions:Assign";
|
|
29
|
+
rule: {
|
|
30
|
+
kind: "AlwaysRequireApproval";
|
|
31
|
+
configuration: {};
|
|
32
|
+
};
|
|
33
|
+
filters?: {
|
|
34
|
+
[x: string]: {
|
|
35
|
+
[x: string]: string[];
|
|
36
|
+
};
|
|
37
|
+
} | undefined;
|
|
38
|
+
} | {
|
|
39
|
+
name: string;
|
|
40
|
+
approvalGroups: {
|
|
41
|
+
name?: string | undefined;
|
|
42
|
+
quorum: number;
|
|
43
|
+
approvers?: {
|
|
44
|
+
[x: string]: {
|
|
45
|
+
[x: string]: string[];
|
|
46
|
+
};
|
|
47
|
+
} | undefined;
|
|
48
|
+
}[];
|
|
49
|
+
autoRejectTimeout?: number | undefined;
|
|
50
|
+
activityKind: "Permissions:Modify";
|
|
51
|
+
rule: {
|
|
52
|
+
kind: "AlwaysRequireApproval";
|
|
53
|
+
configuration: {};
|
|
54
|
+
};
|
|
55
|
+
filters?: {
|
|
56
|
+
[x: string]: {
|
|
57
|
+
[x: string]: string[];
|
|
58
|
+
};
|
|
59
|
+
} | undefined;
|
|
60
|
+
} | {
|
|
61
|
+
name: string;
|
|
62
|
+
approvalGroups: {
|
|
63
|
+
name?: string | undefined;
|
|
64
|
+
quorum: number;
|
|
65
|
+
approvers?: {
|
|
66
|
+
[x: string]: {
|
|
67
|
+
[x: string]: string[];
|
|
68
|
+
};
|
|
69
|
+
} | undefined;
|
|
70
|
+
}[];
|
|
71
|
+
autoRejectTimeout?: number | undefined;
|
|
72
|
+
activityKind: "Policies:Modify";
|
|
73
|
+
rule: {
|
|
74
|
+
kind: "AlwaysRequireApproval";
|
|
75
|
+
configuration: {};
|
|
76
|
+
};
|
|
77
|
+
filters?: {
|
|
78
|
+
[x: string]: {
|
|
79
|
+
[x: string]: string[];
|
|
80
|
+
};
|
|
81
|
+
} | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
name: string;
|
|
84
|
+
approvalGroups: {
|
|
85
|
+
name?: string | undefined;
|
|
86
|
+
quorum: number;
|
|
87
|
+
approvers?: {
|
|
88
|
+
[x: string]: {
|
|
89
|
+
[x: string]: string[];
|
|
90
|
+
};
|
|
91
|
+
} | undefined;
|
|
92
|
+
}[];
|
|
93
|
+
autoRejectTimeout?: number | undefined;
|
|
94
|
+
activityKind: "Wallets:Sign";
|
|
95
|
+
rule: {
|
|
96
|
+
kind: "AlwaysRequireApproval";
|
|
97
|
+
configuration: {};
|
|
98
|
+
} | {
|
|
99
|
+
kind: "TransactionAmountLimit";
|
|
100
|
+
configuration: {
|
|
101
|
+
limit: number;
|
|
102
|
+
currency: "EUR" | "USD";
|
|
103
|
+
};
|
|
104
|
+
} | {
|
|
105
|
+
kind: "TransactionAmountVelocity";
|
|
106
|
+
configuration: {
|
|
107
|
+
limit: number;
|
|
108
|
+
currency: "EUR" | "USD";
|
|
109
|
+
timeframe: number;
|
|
110
|
+
};
|
|
111
|
+
} | {
|
|
112
|
+
kind: "TransactionCountVelocity";
|
|
113
|
+
configuration: {
|
|
114
|
+
limit: number;
|
|
115
|
+
timeframe: number;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
filters?: {
|
|
119
|
+
[x: string]: {
|
|
120
|
+
[x: string]: string[];
|
|
121
|
+
};
|
|
122
|
+
} | undefined;
|
|
123
|
+
}) & {
|
|
124
|
+
id: string;
|
|
125
|
+
status: "Active" | "Archived";
|
|
126
|
+
dateCreated?: string | undefined;
|
|
127
|
+
dateUpdated?: string | undefined;
|
|
18
128
|
};
|
|
19
129
|
dateCreated: Date;
|
|
20
130
|
dateResolved: Date;
|
|
@@ -136,11 +246,24 @@ export type CreatePolicyBody = {
|
|
|
136
246
|
kind: "AlwaysRequireApproval";
|
|
137
247
|
configuration: {};
|
|
138
248
|
} | {
|
|
139
|
-
kind: "
|
|
249
|
+
kind: "TransactionAmountLimit";
|
|
140
250
|
configuration: {
|
|
141
251
|
limit: number;
|
|
142
252
|
currency: "EUR" | "USD";
|
|
143
253
|
};
|
|
254
|
+
} | {
|
|
255
|
+
kind: "TransactionAmountVelocity";
|
|
256
|
+
configuration: {
|
|
257
|
+
limit: number;
|
|
258
|
+
currency: "EUR" | "USD";
|
|
259
|
+
timeframe: number;
|
|
260
|
+
};
|
|
261
|
+
} | {
|
|
262
|
+
kind: "TransactionCountVelocity";
|
|
263
|
+
configuration: {
|
|
264
|
+
limit: number;
|
|
265
|
+
timeframe: number;
|
|
266
|
+
};
|
|
144
267
|
};
|
|
145
268
|
filters?: {
|
|
146
269
|
[x: string]: {
|
|
@@ -160,8 +283,118 @@ export type CreatePolicyResponse = {
|
|
|
160
283
|
operationKind: "Create" | "Update" | "Delete";
|
|
161
284
|
status: "Applied" | "Failed" | "Pending" | "Rejected";
|
|
162
285
|
entityId: string;
|
|
163
|
-
body: {
|
|
164
|
-
|
|
286
|
+
body: ({
|
|
287
|
+
name: string;
|
|
288
|
+
approvalGroups: {
|
|
289
|
+
name?: string | undefined;
|
|
290
|
+
quorum: number;
|
|
291
|
+
approvers?: {
|
|
292
|
+
[x: string]: {
|
|
293
|
+
[x: string]: string[];
|
|
294
|
+
};
|
|
295
|
+
} | undefined;
|
|
296
|
+
}[];
|
|
297
|
+
autoRejectTimeout?: number | undefined;
|
|
298
|
+
activityKind: "Permissions:Assign";
|
|
299
|
+
rule: {
|
|
300
|
+
kind: "AlwaysRequireApproval";
|
|
301
|
+
configuration: {};
|
|
302
|
+
};
|
|
303
|
+
filters?: {
|
|
304
|
+
[x: string]: {
|
|
305
|
+
[x: string]: string[];
|
|
306
|
+
};
|
|
307
|
+
} | undefined;
|
|
308
|
+
} | {
|
|
309
|
+
name: string;
|
|
310
|
+
approvalGroups: {
|
|
311
|
+
name?: string | undefined;
|
|
312
|
+
quorum: number;
|
|
313
|
+
approvers?: {
|
|
314
|
+
[x: string]: {
|
|
315
|
+
[x: string]: string[];
|
|
316
|
+
};
|
|
317
|
+
} | undefined;
|
|
318
|
+
}[];
|
|
319
|
+
autoRejectTimeout?: number | undefined;
|
|
320
|
+
activityKind: "Permissions:Modify";
|
|
321
|
+
rule: {
|
|
322
|
+
kind: "AlwaysRequireApproval";
|
|
323
|
+
configuration: {};
|
|
324
|
+
};
|
|
325
|
+
filters?: {
|
|
326
|
+
[x: string]: {
|
|
327
|
+
[x: string]: string[];
|
|
328
|
+
};
|
|
329
|
+
} | undefined;
|
|
330
|
+
} | {
|
|
331
|
+
name: string;
|
|
332
|
+
approvalGroups: {
|
|
333
|
+
name?: string | undefined;
|
|
334
|
+
quorum: number;
|
|
335
|
+
approvers?: {
|
|
336
|
+
[x: string]: {
|
|
337
|
+
[x: string]: string[];
|
|
338
|
+
};
|
|
339
|
+
} | undefined;
|
|
340
|
+
}[];
|
|
341
|
+
autoRejectTimeout?: number | undefined;
|
|
342
|
+
activityKind: "Policies:Modify";
|
|
343
|
+
rule: {
|
|
344
|
+
kind: "AlwaysRequireApproval";
|
|
345
|
+
configuration: {};
|
|
346
|
+
};
|
|
347
|
+
filters?: {
|
|
348
|
+
[x: string]: {
|
|
349
|
+
[x: string]: string[];
|
|
350
|
+
};
|
|
351
|
+
} | undefined;
|
|
352
|
+
} | {
|
|
353
|
+
name: string;
|
|
354
|
+
approvalGroups: {
|
|
355
|
+
name?: string | undefined;
|
|
356
|
+
quorum: number;
|
|
357
|
+
approvers?: {
|
|
358
|
+
[x: string]: {
|
|
359
|
+
[x: string]: string[];
|
|
360
|
+
};
|
|
361
|
+
} | undefined;
|
|
362
|
+
}[];
|
|
363
|
+
autoRejectTimeout?: number | undefined;
|
|
364
|
+
activityKind: "Wallets:Sign";
|
|
365
|
+
rule: {
|
|
366
|
+
kind: "AlwaysRequireApproval";
|
|
367
|
+
configuration: {};
|
|
368
|
+
} | {
|
|
369
|
+
kind: "TransactionAmountLimit";
|
|
370
|
+
configuration: {
|
|
371
|
+
limit: number;
|
|
372
|
+
currency: "EUR" | "USD";
|
|
373
|
+
};
|
|
374
|
+
} | {
|
|
375
|
+
kind: "TransactionAmountVelocity";
|
|
376
|
+
configuration: {
|
|
377
|
+
limit: number;
|
|
378
|
+
currency: "EUR" | "USD";
|
|
379
|
+
timeframe: number;
|
|
380
|
+
};
|
|
381
|
+
} | {
|
|
382
|
+
kind: "TransactionCountVelocity";
|
|
383
|
+
configuration: {
|
|
384
|
+
limit: number;
|
|
385
|
+
timeframe: number;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
filters?: {
|
|
389
|
+
[x: string]: {
|
|
390
|
+
[x: string]: string[];
|
|
391
|
+
};
|
|
392
|
+
} | undefined;
|
|
393
|
+
}) & {
|
|
394
|
+
id: string;
|
|
395
|
+
status: "Active" | "Archived";
|
|
396
|
+
dateCreated?: string | undefined;
|
|
397
|
+
dateUpdated?: string | undefined;
|
|
165
398
|
};
|
|
166
399
|
dateCreated: Date;
|
|
167
400
|
dateResolved: Date;
|
|
@@ -255,11 +488,24 @@ export type GetPolicyResponse = ({
|
|
|
255
488
|
kind: "AlwaysRequireApproval";
|
|
256
489
|
configuration: {};
|
|
257
490
|
} | {
|
|
258
|
-
kind: "
|
|
491
|
+
kind: "TransactionAmountLimit";
|
|
259
492
|
configuration: {
|
|
260
493
|
limit: number;
|
|
261
494
|
currency: "EUR" | "USD";
|
|
262
495
|
};
|
|
496
|
+
} | {
|
|
497
|
+
kind: "TransactionAmountVelocity";
|
|
498
|
+
configuration: {
|
|
499
|
+
limit: number;
|
|
500
|
+
currency: "EUR" | "USD";
|
|
501
|
+
timeframe: number;
|
|
502
|
+
};
|
|
503
|
+
} | {
|
|
504
|
+
kind: "TransactionCountVelocity";
|
|
505
|
+
configuration: {
|
|
506
|
+
limit: number;
|
|
507
|
+
timeframe: number;
|
|
508
|
+
};
|
|
263
509
|
};
|
|
264
510
|
filters?: {
|
|
265
511
|
[x: string]: {
|
|
@@ -401,10 +647,23 @@ export type ListPoliciesResponse = {
|
|
|
401
647
|
kind: "AlwaysRequireApproval";
|
|
402
648
|
configuration: {};
|
|
403
649
|
} | {
|
|
404
|
-
kind: "
|
|
650
|
+
kind: "TransactionAmountLimit";
|
|
651
|
+
configuration: {
|
|
652
|
+
limit: number;
|
|
653
|
+
currency: "EUR" | "USD";
|
|
654
|
+
};
|
|
655
|
+
} | {
|
|
656
|
+
kind: "TransactionAmountVelocity";
|
|
405
657
|
configuration: {
|
|
406
658
|
limit: number;
|
|
407
659
|
currency: "EUR" | "USD";
|
|
660
|
+
timeframe: number;
|
|
661
|
+
};
|
|
662
|
+
} | {
|
|
663
|
+
kind: "TransactionCountVelocity";
|
|
664
|
+
configuration: {
|
|
665
|
+
limit: number;
|
|
666
|
+
timeframe: number;
|
|
408
667
|
};
|
|
409
668
|
};
|
|
410
669
|
filters?: {
|
|
@@ -506,10 +765,23 @@ export type UpdatePolicyBody = {
|
|
|
506
765
|
kind: "AlwaysRequireApproval";
|
|
507
766
|
configuration: {};
|
|
508
767
|
} | {
|
|
509
|
-
kind: "
|
|
768
|
+
kind: "TransactionAmountLimit";
|
|
769
|
+
configuration: {
|
|
770
|
+
limit: number;
|
|
771
|
+
currency: "EUR" | "USD";
|
|
772
|
+
};
|
|
773
|
+
} | {
|
|
774
|
+
kind: "TransactionAmountVelocity";
|
|
510
775
|
configuration: {
|
|
511
776
|
limit: number;
|
|
512
777
|
currency: "EUR" | "USD";
|
|
778
|
+
timeframe: number;
|
|
779
|
+
};
|
|
780
|
+
} | {
|
|
781
|
+
kind: "TransactionCountVelocity";
|
|
782
|
+
configuration: {
|
|
783
|
+
limit: number;
|
|
784
|
+
timeframe: number;
|
|
513
785
|
};
|
|
514
786
|
};
|
|
515
787
|
filters?: {
|
|
@@ -533,8 +805,118 @@ export type UpdatePolicyResponse = {
|
|
|
533
805
|
operationKind: "Create" | "Update" | "Delete";
|
|
534
806
|
status: "Applied" | "Failed" | "Pending" | "Rejected";
|
|
535
807
|
entityId: string;
|
|
536
|
-
body: {
|
|
537
|
-
|
|
808
|
+
body: ({
|
|
809
|
+
name: string;
|
|
810
|
+
approvalGroups: {
|
|
811
|
+
name?: string | undefined;
|
|
812
|
+
quorum: number;
|
|
813
|
+
approvers?: {
|
|
814
|
+
[x: string]: {
|
|
815
|
+
[x: string]: string[];
|
|
816
|
+
};
|
|
817
|
+
} | undefined;
|
|
818
|
+
}[];
|
|
819
|
+
autoRejectTimeout?: number | undefined;
|
|
820
|
+
activityKind: "Permissions:Assign";
|
|
821
|
+
rule: {
|
|
822
|
+
kind: "AlwaysRequireApproval";
|
|
823
|
+
configuration: {};
|
|
824
|
+
};
|
|
825
|
+
filters?: {
|
|
826
|
+
[x: string]: {
|
|
827
|
+
[x: string]: string[];
|
|
828
|
+
};
|
|
829
|
+
} | undefined;
|
|
830
|
+
} | {
|
|
831
|
+
name: string;
|
|
832
|
+
approvalGroups: {
|
|
833
|
+
name?: string | undefined;
|
|
834
|
+
quorum: number;
|
|
835
|
+
approvers?: {
|
|
836
|
+
[x: string]: {
|
|
837
|
+
[x: string]: string[];
|
|
838
|
+
};
|
|
839
|
+
} | undefined;
|
|
840
|
+
}[];
|
|
841
|
+
autoRejectTimeout?: number | undefined;
|
|
842
|
+
activityKind: "Permissions:Modify";
|
|
843
|
+
rule: {
|
|
844
|
+
kind: "AlwaysRequireApproval";
|
|
845
|
+
configuration: {};
|
|
846
|
+
};
|
|
847
|
+
filters?: {
|
|
848
|
+
[x: string]: {
|
|
849
|
+
[x: string]: string[];
|
|
850
|
+
};
|
|
851
|
+
} | undefined;
|
|
852
|
+
} | {
|
|
853
|
+
name: string;
|
|
854
|
+
approvalGroups: {
|
|
855
|
+
name?: string | undefined;
|
|
856
|
+
quorum: number;
|
|
857
|
+
approvers?: {
|
|
858
|
+
[x: string]: {
|
|
859
|
+
[x: string]: string[];
|
|
860
|
+
};
|
|
861
|
+
} | undefined;
|
|
862
|
+
}[];
|
|
863
|
+
autoRejectTimeout?: number | undefined;
|
|
864
|
+
activityKind: "Policies:Modify";
|
|
865
|
+
rule: {
|
|
866
|
+
kind: "AlwaysRequireApproval";
|
|
867
|
+
configuration: {};
|
|
868
|
+
};
|
|
869
|
+
filters?: {
|
|
870
|
+
[x: string]: {
|
|
871
|
+
[x: string]: string[];
|
|
872
|
+
};
|
|
873
|
+
} | undefined;
|
|
874
|
+
} | {
|
|
875
|
+
name: string;
|
|
876
|
+
approvalGroups: {
|
|
877
|
+
name?: string | undefined;
|
|
878
|
+
quorum: number;
|
|
879
|
+
approvers?: {
|
|
880
|
+
[x: string]: {
|
|
881
|
+
[x: string]: string[];
|
|
882
|
+
};
|
|
883
|
+
} | undefined;
|
|
884
|
+
}[];
|
|
885
|
+
autoRejectTimeout?: number | undefined;
|
|
886
|
+
activityKind: "Wallets:Sign";
|
|
887
|
+
rule: {
|
|
888
|
+
kind: "AlwaysRequireApproval";
|
|
889
|
+
configuration: {};
|
|
890
|
+
} | {
|
|
891
|
+
kind: "TransactionAmountLimit";
|
|
892
|
+
configuration: {
|
|
893
|
+
limit: number;
|
|
894
|
+
currency: "EUR" | "USD";
|
|
895
|
+
};
|
|
896
|
+
} | {
|
|
897
|
+
kind: "TransactionAmountVelocity";
|
|
898
|
+
configuration: {
|
|
899
|
+
limit: number;
|
|
900
|
+
currency: "EUR" | "USD";
|
|
901
|
+
timeframe: number;
|
|
902
|
+
};
|
|
903
|
+
} | {
|
|
904
|
+
kind: "TransactionCountVelocity";
|
|
905
|
+
configuration: {
|
|
906
|
+
limit: number;
|
|
907
|
+
timeframe: number;
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
filters?: {
|
|
911
|
+
[x: string]: {
|
|
912
|
+
[x: string]: string[];
|
|
913
|
+
};
|
|
914
|
+
} | undefined;
|
|
915
|
+
}) & {
|
|
916
|
+
id: string;
|
|
917
|
+
status: "Active" | "Archived";
|
|
918
|
+
dateCreated?: string | undefined;
|
|
919
|
+
dateUpdated?: string | undefined;
|
|
538
920
|
};
|
|
539
921
|
dateCreated: Date;
|
|
540
922
|
dateResolved: Date;
|