@bitgo/public-types 2.29.0 → 2.30.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.
- package/dist/src/schema/webhook/addWalletWebhookRequest.d.ts +30 -2
- package/dist/src/schema/webhook/enterpriseWebhooks.d.ts +29 -3
- package/dist/src/schema/webhook/webhook.d.ts +21 -1
- package/dist/src/schema/webhook/webhookNotification.d.ts +21 -1
- package/dist/src/schema/webhook/webhookType.d.ts +40 -41
- package/dist/src/schema/webhook/webhookType.js +41 -45
- package/dist/src/schema/webhook/webhookType.js.map +1 -1
- package/package.json +1 -1
- package/src/schema/webhook/webhookType.ts +49 -48
@@ -1,6 +1,20 @@
|
|
1
1
|
import * as t from "io-ts";
|
2
2
|
export declare const AddWalletWebhookRequestBody: {
|
3
|
-
type: t.KeyofC<
|
3
|
+
type: t.KeyofC<{
|
4
|
+
txRequest: number;
|
5
|
+
txRequestTransaction: number;
|
6
|
+
transfer: number;
|
7
|
+
transaction: number;
|
8
|
+
transactionRemoved: number;
|
9
|
+
transactionExpire: number;
|
10
|
+
pendingapproval: number;
|
11
|
+
block: number;
|
12
|
+
admin: number;
|
13
|
+
address_confirmation: number;
|
14
|
+
lowFee: number;
|
15
|
+
circuitBreaker: number;
|
16
|
+
wireWithdrawal: number;
|
17
|
+
}>;
|
4
18
|
url: import("io-ts-types").NonEmptyStringC;
|
5
19
|
label: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
6
20
|
numConfirmations: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC, t.UndefinedC]>;
|
@@ -10,7 +24,21 @@ export declare const AddWalletWebhookRequestBody: {
|
|
10
24
|
txRequestTransactionStates: t.UnionC<[t.Type<("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], ("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], unknown>, t.UndefinedC]>;
|
11
25
|
};
|
12
26
|
export declare const AddWalletWebhookRequestBodyC: t.TypeC<{
|
13
|
-
type: t.KeyofC<
|
27
|
+
type: t.KeyofC<{
|
28
|
+
txRequest: number;
|
29
|
+
txRequestTransaction: number;
|
30
|
+
transfer: number;
|
31
|
+
transaction: number;
|
32
|
+
transactionRemoved: number;
|
33
|
+
transactionExpire: number;
|
34
|
+
pendingapproval: number;
|
35
|
+
block: number;
|
36
|
+
admin: number;
|
37
|
+
address_confirmation: number;
|
38
|
+
lowFee: number;
|
39
|
+
circuitBreaker: number;
|
40
|
+
wireWithdrawal: number;
|
41
|
+
}>;
|
14
42
|
url: import("io-ts-types").NonEmptyStringC;
|
15
43
|
label: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
16
44
|
numConfirmations: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC, t.UndefinedC]>;
|
@@ -1,11 +1,17 @@
|
|
1
1
|
import * as t from "io-ts";
|
2
2
|
export declare const AddEnterpriseWebhookRequestBody: {
|
3
|
-
type: t.KeyofC<
|
3
|
+
type: t.KeyofC<{
|
4
|
+
bankAccount: number;
|
5
|
+
accessToken: number;
|
6
|
+
}>;
|
4
7
|
url: import("io-ts-types").NonEmptyStringC;
|
5
8
|
label: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
6
9
|
};
|
7
10
|
export declare const AddEnterpriseWebhookRequestBodyC: t.TypeC<{
|
8
|
-
type: t.KeyofC<
|
11
|
+
type: t.KeyofC<{
|
12
|
+
bankAccount: number;
|
13
|
+
accessToken: number;
|
14
|
+
}>;
|
9
15
|
url: import("io-ts-types").NonEmptyStringC;
|
10
16
|
label: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
11
17
|
}>;
|
@@ -38,7 +44,27 @@ export declare const ListEnterpriseWebhooksResponse: t.IntersectionC<[t.TypeC<{
|
|
38
44
|
enterpriseId: t.StringC;
|
39
45
|
organizationId: t.StringC;
|
40
46
|
userId: t.StringC;
|
41
|
-
type: t.KeyofC<
|
47
|
+
type: t.KeyofC<{
|
48
|
+
txRequest: number;
|
49
|
+
txRequestTransaction: number;
|
50
|
+
transfer: number;
|
51
|
+
transaction: number;
|
52
|
+
transactionRemoved: number;
|
53
|
+
transactionExpire: number;
|
54
|
+
pendingapproval: number;
|
55
|
+
block: number;
|
56
|
+
admin: number;
|
57
|
+
address_confirmation: number;
|
58
|
+
lowFee: number;
|
59
|
+
circuitBreaker: number;
|
60
|
+
wallet_confirmation: number;
|
61
|
+
wireWithdrawal: number;
|
62
|
+
bankAccount: number;
|
63
|
+
userKycState: number;
|
64
|
+
enterpriseKycState: number;
|
65
|
+
identityStatus: number;
|
66
|
+
accessToken: number;
|
67
|
+
}>;
|
42
68
|
numConfirmations: t.NumberC;
|
43
69
|
lastAttempt: import("io-ts-types").DateFromISOStringC;
|
44
70
|
failingSince: import("io-ts-types").DateFromISOStringC;
|
@@ -15,7 +15,27 @@ export declare const Webhook: t.IntersectionC<[t.TypeC<{
|
|
15
15
|
enterpriseId: t.StringC;
|
16
16
|
organizationId: t.StringC;
|
17
17
|
userId: t.StringC;
|
18
|
-
type: t.KeyofC<
|
18
|
+
type: t.KeyofC<{
|
19
|
+
txRequest: number;
|
20
|
+
txRequestTransaction: number;
|
21
|
+
transfer: number;
|
22
|
+
transaction: number;
|
23
|
+
transactionRemoved: number;
|
24
|
+
transactionExpire: number;
|
25
|
+
pendingapproval: number;
|
26
|
+
block: number;
|
27
|
+
admin: number;
|
28
|
+
address_confirmation: number;
|
29
|
+
lowFee: number;
|
30
|
+
circuitBreaker: number;
|
31
|
+
wallet_confirmation: number;
|
32
|
+
wireWithdrawal: number;
|
33
|
+
bankAccount: number;
|
34
|
+
userKycState: number;
|
35
|
+
enterpriseKycState: number;
|
36
|
+
identityStatus: number;
|
37
|
+
accessToken: number;
|
38
|
+
}>;
|
19
39
|
numConfirmations: t.NumberC;
|
20
40
|
lastAttempt: import("io-ts-types").DateFromISOStringC;
|
21
41
|
failingSince: import("io-ts-types").DateFromISOStringC;
|
@@ -4,7 +4,27 @@ export type WebhookNotificationState = t.TypeOf<typeof WebhookNotificationState>
|
|
4
4
|
export declare const WebhookNotification: t.IntersectionC<[t.TypeC<{
|
5
5
|
id: t.StringC;
|
6
6
|
}>, t.PartialC<{
|
7
|
-
type: t.KeyofC<
|
7
|
+
type: t.KeyofC<{
|
8
|
+
txRequest: number;
|
9
|
+
txRequestTransaction: number;
|
10
|
+
transfer: number;
|
11
|
+
transaction: number;
|
12
|
+
transactionRemoved: number;
|
13
|
+
transactionExpire: number;
|
14
|
+
pendingapproval: number;
|
15
|
+
block: number;
|
16
|
+
admin: number;
|
17
|
+
address_confirmation: number;
|
18
|
+
lowFee: number;
|
19
|
+
circuitBreaker: number;
|
20
|
+
wallet_confirmation: number;
|
21
|
+
wireWithdrawal: number;
|
22
|
+
bankAccount: number;
|
23
|
+
userKycState: number;
|
24
|
+
enterpriseKycState: number;
|
25
|
+
identityStatus: number;
|
26
|
+
accessToken: number;
|
27
|
+
}>;
|
8
28
|
wallet: t.StringC;
|
9
29
|
url: t.StringC;
|
10
30
|
hash: t.StringC;
|
@@ -1,45 +1,44 @@
|
|
1
1
|
import * as t from "io-ts";
|
2
|
-
export declare
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
2
|
+
export declare const WebhookType: t.KeyofC<{
|
3
|
+
txRequest: number;
|
4
|
+
txRequestTransaction: number;
|
5
|
+
transfer: number;
|
6
|
+
transaction: number;
|
7
|
+
transactionRemoved: number;
|
8
|
+
transactionExpire: number;
|
9
|
+
pendingapproval: number;
|
10
|
+
block: number;
|
11
|
+
admin: number;
|
12
|
+
address_confirmation: number;
|
13
|
+
lowFee: number;
|
14
|
+
circuitBreaker: number;
|
15
|
+
wallet_confirmation: number;
|
16
|
+
wireWithdrawal: number;
|
17
|
+
bankAccount: number;
|
18
|
+
userKycState: number;
|
19
|
+
enterpriseKycState: number;
|
20
|
+
identityStatus: number;
|
21
|
+
accessToken: number;
|
22
|
+
}>;
|
23
23
|
export type WebhookType = t.TypeOf<typeof WebhookType>;
|
24
|
-
export declare
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
24
|
+
export declare const WalletWebhookType: t.KeyofC<{
|
25
|
+
txRequest: number;
|
26
|
+
txRequestTransaction: number;
|
27
|
+
transfer: number;
|
28
|
+
transaction: number;
|
29
|
+
transactionRemoved: number;
|
30
|
+
transactionExpire: number;
|
31
|
+
pendingapproval: number;
|
32
|
+
block: number;
|
33
|
+
admin: number;
|
34
|
+
address_confirmation: number;
|
35
|
+
lowFee: number;
|
36
|
+
circuitBreaker: number;
|
37
|
+
wireWithdrawal: number;
|
38
|
+
}>;
|
39
39
|
export type WalletWebhookType = t.TypeOf<typeof WalletWebhookType>;
|
40
|
-
export declare
|
41
|
-
|
42
|
-
|
43
|
-
}
|
44
|
-
export declare const EnterpriseWebhookType: t.KeyofC<typeof EnterpriseWebhookTypeEnum>;
|
40
|
+
export declare const EnterpriseWebhookType: t.KeyofC<{
|
41
|
+
bankAccount: number;
|
42
|
+
accessToken: number;
|
43
|
+
}>;
|
45
44
|
export type EnterpriseWebhookType = t.TypeOf<typeof EnterpriseWebhookType>;
|
@@ -23,50 +23,46 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.EnterpriseWebhookType = exports.
|
26
|
+
exports.EnterpriseWebhookType = exports.WalletWebhookType = exports.WebhookType = void 0;
|
27
27
|
const t = __importStar(require("io-ts"));
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
}
|
49
|
-
exports.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
EnterpriseWebhookTypeEnum["bankAccount"] = "bankAccount";
|
69
|
-
EnterpriseWebhookTypeEnum["accessToken"] = "accessToken";
|
70
|
-
})(EnterpriseWebhookTypeEnum || (exports.EnterpriseWebhookTypeEnum = EnterpriseWebhookTypeEnum = {}));
|
71
|
-
exports.EnterpriseWebhookType = t.keyof(EnterpriseWebhookTypeEnum, "EnterpriseWebhookType");
|
28
|
+
exports.WebhookType = t.keyof({
|
29
|
+
txRequest: 1,
|
30
|
+
txRequestTransaction: 1,
|
31
|
+
transfer: 1,
|
32
|
+
transaction: 1,
|
33
|
+
transactionRemoved: 1,
|
34
|
+
transactionExpire: 1,
|
35
|
+
pendingapproval: 1,
|
36
|
+
block: 1,
|
37
|
+
admin: 1,
|
38
|
+
address_confirmation: 1,
|
39
|
+
lowFee: 1,
|
40
|
+
circuitBreaker: 1,
|
41
|
+
wallet_confirmation: 1,
|
42
|
+
wireWithdrawal: 1,
|
43
|
+
bankAccount: 1,
|
44
|
+
userKycState: 1,
|
45
|
+
enterpriseKycState: 1,
|
46
|
+
identityStatus: 1,
|
47
|
+
accessToken: 1,
|
48
|
+
}, "WebhookType");
|
49
|
+
exports.WalletWebhookType = t.keyof({
|
50
|
+
txRequest: 1,
|
51
|
+
txRequestTransaction: 1,
|
52
|
+
transfer: 1,
|
53
|
+
transaction: 1,
|
54
|
+
transactionRemoved: 1,
|
55
|
+
transactionExpire: 1,
|
56
|
+
pendingapproval: 1,
|
57
|
+
block: 1,
|
58
|
+
admin: 1,
|
59
|
+
address_confirmation: 1,
|
60
|
+
lowFee: 1,
|
61
|
+
circuitBreaker: 1,
|
62
|
+
wireWithdrawal: 1,
|
63
|
+
}, "WalletWebhookType");
|
64
|
+
exports.EnterpriseWebhookType = t.keyof({
|
65
|
+
bankAccount: 1,
|
66
|
+
accessToken: 1,
|
67
|
+
}, "EnterpriseWebhookType");
|
72
68
|
//# sourceMappingURL=webhookType.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"webhookType.js","sourceRoot":"","sources":["../../../../src/schema/webhook/webhookType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;
|
1
|
+
{"version":3,"file":"webhookType.js","sourceRoot":"","sources":["../../../../src/schema/webhook/webhookType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAEd,QAAA,WAAW,GAAG,CAAC,CAAC,KAAK,CAChC;IAEE,SAAS,EAAE,CAAC;IAEZ,oBAAoB,EAAE,CAAC;IACvB,QAAQ,EAAE,CAAC;IACX,WAAW,EAAE,CAAC;IACd,kBAAkB,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC;IACpB,eAAe,EAAE,CAAC;IAClB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,oBAAoB,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC;IACT,cAAc,EAAE,CAAC;IAGjB,mBAAmB,EAAE,CAAC;IAEtB,cAAc,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;IACf,kBAAkB,EAAE,CAAC;IACrB,cAAc,EAAE,CAAC;IAEjB,WAAW,EAAE,CAAC;CACf,EACD,aAAa,CACd,CAAC;AAIW,QAAA,iBAAiB,GAAG,CAAC,CAAC,KAAK,CACtC;IACE,SAAS,EAAE,CAAC;IACZ,oBAAoB,EAAE,CAAC;IACvB,QAAQ,EAAE,CAAC;IACX,WAAW,EAAE,CAAC;IACd,kBAAkB,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC;IACpB,eAAe,EAAE,CAAC;IAClB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,oBAAoB,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC;IACT,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,CAAC;CAClB,EACD,mBAAmB,CACpB,CAAC;AAGW,QAAA,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAC1C;IACE,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,CAAC;CACf,EACD,uBAAuB,CACxB,CAAC"}
|
package/package.json
CHANGED
@@ -1,62 +1,63 @@
|
|
1
1
|
import * as t from "io-ts";
|
2
2
|
|
3
|
-
export
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
3
|
+
export const WebhookType = t.keyof(
|
4
|
+
{
|
5
|
+
// Webhook for txRequest.state changes
|
6
|
+
txRequest: 1,
|
7
|
+
// Webhook for any txRequest.transactions[].state changes
|
8
|
+
txRequestTransaction: 1,
|
9
|
+
transfer: 1,
|
10
|
+
transaction: 1,
|
11
|
+
transactionRemoved: 1,
|
12
|
+
transactionExpire: 1,
|
13
|
+
pendingapproval: 1,
|
14
|
+
block: 1,
|
15
|
+
admin: 1,
|
16
|
+
address_confirmation: 1,
|
17
|
+
lowFee: 1,
|
18
|
+
circuitBreaker: 1,
|
19
|
+
|
20
|
+
// Specific to User Webhooks
|
21
|
+
wallet_confirmation: 1,
|
22
|
+
|
23
|
+
wireWithdrawal: 1,
|
24
|
+
bankAccount: 1,
|
25
|
+
userKycState: 1,
|
26
|
+
enterpriseKycState: 1,
|
27
|
+
identityStatus: 1,
|
28
|
+
|
29
|
+
accessToken: 1,
|
30
|
+
},
|
31
|
+
"WebhookType",
|
32
|
+
);
|
29
33
|
|
30
|
-
export const WebhookType = t.keyof(WebhookTypeEnum, "WebhookType");
|
31
34
|
export type WebhookType = t.TypeOf<typeof WebhookType>;
|
32
35
|
|
33
|
-
export enum WalletWebhookTypeEnum {
|
34
|
-
"txRequest" = "txRequest",
|
35
|
-
"txRequestTransaction" = "txRequestTransaction",
|
36
|
-
"transfer" = "transfer",
|
37
|
-
"transaction" = "transaction",
|
38
|
-
"transactionRemoved" = "transactionRemoved",
|
39
|
-
"transactionExpire" = "transactionExpire",
|
40
|
-
"pendingapproval" = "pendingapproval",
|
41
|
-
"block" = "block",
|
42
|
-
"admin" = "admin",
|
43
|
-
"address_confirmation" = "address_confirmation",
|
44
|
-
"lowFee" = "lowFee",
|
45
|
-
"wireWithdrawal" = "wireWithdrawal",
|
46
|
-
}
|
47
|
-
|
48
36
|
export const WalletWebhookType = t.keyof(
|
49
|
-
|
37
|
+
{
|
38
|
+
txRequest: 1,
|
39
|
+
txRequestTransaction: 1,
|
40
|
+
transfer: 1,
|
41
|
+
transaction: 1,
|
42
|
+
transactionRemoved: 1,
|
43
|
+
transactionExpire: 1,
|
44
|
+
pendingapproval: 1,
|
45
|
+
block: 1,
|
46
|
+
admin: 1,
|
47
|
+
address_confirmation: 1,
|
48
|
+
lowFee: 1,
|
49
|
+
circuitBreaker: 1,
|
50
|
+
wireWithdrawal: 1,
|
51
|
+
},
|
50
52
|
"WalletWebhookType",
|
51
53
|
);
|
52
54
|
export type WalletWebhookType = t.TypeOf<typeof WalletWebhookType>;
|
53
55
|
|
54
|
-
export enum EnterpriseWebhookTypeEnum {
|
55
|
-
"bankAccount" = "bankAccount",
|
56
|
-
"accessToken" = "accessToken",
|
57
|
-
}
|
58
56
|
export const EnterpriseWebhookType = t.keyof(
|
59
|
-
|
57
|
+
{
|
58
|
+
bankAccount: 1,
|
59
|
+
accessToken: 1,
|
60
|
+
},
|
60
61
|
"EnterpriseWebhookType",
|
61
62
|
);
|
62
63
|
export type EnterpriseWebhookType = t.TypeOf<typeof EnterpriseWebhookType>;
|