@dfns/sdk 0.1.0-beta.1 → 0.1.0-beta.3
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.
|
@@ -79,6 +79,38 @@ export type AmountLimitPrConf = {
|
|
|
79
79
|
assetSymbol: AssetSymbol;
|
|
80
80
|
shouldIgnoreAssetsWithoutMarketValue: boolean;
|
|
81
81
|
};
|
|
82
|
+
export type CreateTransferLimitPrConf = {
|
|
83
|
+
kind: PolicyRuleKind.TransferAmountLimit;
|
|
84
|
+
limit: Amount;
|
|
85
|
+
currency: Currency;
|
|
86
|
+
};
|
|
87
|
+
export type UpdateTransferLimitPrConf = {
|
|
88
|
+
limit?: Amount;
|
|
89
|
+
currency?: Currency;
|
|
90
|
+
};
|
|
91
|
+
export type TransferLimitPrConf = {
|
|
92
|
+
limit: Amount;
|
|
93
|
+
currency: Currency;
|
|
94
|
+
};
|
|
95
|
+
export type CreateOutgoingVelocityPrConf = {
|
|
96
|
+
kind: PolicyRuleKind.PaymentAmountOutgoingVelocity;
|
|
97
|
+
velocity: Amount;
|
|
98
|
+
assetSymbol: AssetSymbol;
|
|
99
|
+
intervalInMinutes: number;
|
|
100
|
+
shouldIgnoreAssetsWithoutMarketValue: boolean;
|
|
101
|
+
};
|
|
102
|
+
export type UpdateOutgoingVelocityPrConf = {
|
|
103
|
+
velocity?: Amount;
|
|
104
|
+
assetSymbol?: AssetSymbol;
|
|
105
|
+
intervalInMinutes: number;
|
|
106
|
+
shouldIgnoreAssetsWithoutMarketValue?: boolean;
|
|
107
|
+
};
|
|
108
|
+
export type OutgoingVelocityPrConf = {
|
|
109
|
+
velocity: Amount;
|
|
110
|
+
assetSymbol: AssetSymbol;
|
|
111
|
+
intervalInMinutes: number;
|
|
112
|
+
shouldIgnoreAssetsWithoutMarketValue: boolean;
|
|
113
|
+
};
|
|
82
114
|
export type CreateRequestApprovalPcConf = {
|
|
83
115
|
kind: PolicyControlKind.RequestApproval;
|
|
84
116
|
approverUsernames?: string[];
|
|
@@ -106,6 +138,10 @@ export type PolicyManagementPreferences = {
|
|
|
106
138
|
* Sets default `AssetSymbol` for the policy rules that use it, such as Limit, Velocity, Siphoning, and others.
|
|
107
139
|
*/
|
|
108
140
|
policyRuleAssetSymbol?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Sets default interval in minutes for policy rules that use intervals, such as Velocity and Siphoning. \n\nThis setting does not update existing rules. This will only impact rules that are created after this setting is set.
|
|
143
|
+
*/
|
|
144
|
+
policyRuleVelocityIntervalInMinutes: number;
|
|
109
145
|
};
|
|
110
146
|
export type Create = {};
|
|
111
147
|
export type EmptyConfiguration = {};
|
|
@@ -167,11 +203,11 @@ export type UpdatePolicyRuleInput = {
|
|
|
167
203
|
name?: string;
|
|
168
204
|
configuration: UpdatePolicyRuleConfiguration;
|
|
169
205
|
};
|
|
170
|
-
export type CreatePolicyRuleConfiguration = CreateAmountLimitPrConf | CreateAlwaysActivatedPrConf;
|
|
171
|
-
export type UpdatePolicyRuleConfiguration = UpdateAmountLimitPrConf | UpdateAlwaysActivatedPrConf;
|
|
206
|
+
export type CreatePolicyRuleConfiguration = CreateAmountLimitPrConf | CreateTransferLimitPrConf | CreateOutgoingVelocityPrConf | CreateAlwaysActivatedPrConf;
|
|
207
|
+
export type UpdatePolicyRuleConfiguration = UpdateAmountLimitPrConf | UpdateTransferLimitPrConf | UpdateOutgoingVelocityPrConf | UpdateAlwaysActivatedPrConf;
|
|
172
208
|
export type UpdatePolicyControlConfiguration = UpdateRequestApprovalPcConf | UpdateNotifyAndAuditPcConf;
|
|
173
209
|
export type CreatePolicyControlConfiguration = CreateRequestApprovalPcConf | CreateNotifyAndAuditPcConf;
|
|
174
|
-
export type PolicyRuleConfiguration = AmountLimitPrConf | EmptyConfiguration;
|
|
210
|
+
export type PolicyRuleConfiguration = AmountLimitPrConf | TransferLimitPrConf | OutgoingVelocityPrConf | EmptyConfiguration;
|
|
175
211
|
export type PolicyControlConfiguration = NotifyAndAuditPcConf | RequestApprovalPcConf;
|
|
176
212
|
export type PolicyObjectFilter = AssetAccountFilter | PublicKeyFilter | WalletFilter;
|
|
177
213
|
export declare enum PolicyActivityKind {
|
|
@@ -199,8 +235,13 @@ export declare enum PolicyControlKind {
|
|
|
199
235
|
export declare enum PolicyRuleKind {
|
|
200
236
|
AlwaysActivated = "AlwaysActivated",
|
|
201
237
|
PaymentAmountLimit = "PaymentAmountLimit",
|
|
238
|
+
PaymentAmountOutgoingVelocity = "PaymentAmountOutgoingVelocity",
|
|
202
239
|
TransferAmountLimit = "TransferAmountLimit"
|
|
203
240
|
}
|
|
241
|
+
export declare enum Currency {
|
|
242
|
+
EUR = "EUR",
|
|
243
|
+
USD = "USD"
|
|
244
|
+
}
|
|
204
245
|
export declare enum PolicyControlStatus {
|
|
205
246
|
Enabled = "Enabled",
|
|
206
247
|
Archived = "Archived"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PolicyObjectFilterKind = exports.PolicyRuleStatus = exports.PolicyControlStatus = exports.PolicyRuleKind = exports.PolicyControlKind = exports.PolicyStatus = exports.PolicyActivityKind = void 0;
|
|
3
|
+
exports.PolicyObjectFilterKind = exports.PolicyRuleStatus = exports.PolicyControlStatus = exports.Currency = exports.PolicyRuleKind = exports.PolicyControlKind = exports.PolicyStatus = exports.PolicyActivityKind = void 0;
|
|
4
4
|
// FIXME: Missing documentation for PolicyActivityKind
|
|
5
5
|
var PolicyActivityKind;
|
|
6
6
|
(function (PolicyActivityKind) {
|
|
@@ -46,9 +46,19 @@ var PolicyRuleKind;
|
|
|
46
46
|
PolicyRuleKind["AlwaysActivated"] = "AlwaysActivated";
|
|
47
47
|
// FIXME: Missing documentation for PaymentAmountLimit
|
|
48
48
|
PolicyRuleKind["PaymentAmountLimit"] = "PaymentAmountLimit";
|
|
49
|
+
// FIXME: Missing documentation for PaymentAmountOutgoingVelocity
|
|
50
|
+
PolicyRuleKind["PaymentAmountOutgoingVelocity"] = "PaymentAmountOutgoingVelocity";
|
|
49
51
|
// FIXME: Missing documentation for TransferAmountLimit
|
|
50
52
|
PolicyRuleKind["TransferAmountLimit"] = "TransferAmountLimit";
|
|
51
53
|
})(PolicyRuleKind = exports.PolicyRuleKind || (exports.PolicyRuleKind = {}));
|
|
54
|
+
// FIXME: Missing documentation for Currency
|
|
55
|
+
var Currency;
|
|
56
|
+
(function (Currency) {
|
|
57
|
+
// FIXME: Missing documentation for EUR
|
|
58
|
+
Currency["EUR"] = "EUR";
|
|
59
|
+
// FIXME: Missing documentation for USD
|
|
60
|
+
Currency["USD"] = "USD";
|
|
61
|
+
})(Currency = exports.Currency || (exports.Currency = {}));
|
|
52
62
|
// FIXME: Missing documentation for PolicyControlStatus
|
|
53
63
|
var PolicyControlStatus;
|
|
54
64
|
(function (PolicyControlStatus) {
|