@bitgo/public-types 5.44.0 → 5.45.0

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.
@@ -1,4 +1,5 @@
1
1
  export * from "./enterpriseWebhooks";
2
+ export * from "./organizationWebhooks";
2
3
  export * from "./addWalletWebhookRequest";
3
4
  export * from "./webhook";
4
5
  export * from "./webhookNotification";
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./enterpriseWebhooks"), exports);
18
+ __exportStar(require("./organizationWebhooks"), exports);
18
19
  __exportStar(require("./addWalletWebhookRequest"), exports);
19
20
  __exportStar(require("./webhook"), exports);
20
21
  __exportStar(require("./webhookNotification"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/webhook/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,4DAA0C;AAC1C,4CAA0B;AAC1B,wDAAsC;AACtC,iDAA+B;AAC/B,iDAA+B;AAC/B,gDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/webhook/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,yDAAuC;AACvC,4DAA0C;AAC1C,4CAA0B;AAC1B,wDAAsC;AACtC,iDAA+B;AAC/B,iDAA+B;AAC/B,gDAA8B"}
@@ -0,0 +1,81 @@
1
+ import * as t from "io-ts";
2
+ export declare const AddOrganizationWebhookRequestBody: {
3
+ type: t.KeyofC<typeof import("./webhookType").OrganizationWebhookTypeEnum>;
4
+ url: import("io-ts-types").NonEmptyStringC;
5
+ label: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6
+ };
7
+ export declare const AddOrganizationWebhookRequestBodyC: t.TypeC<{
8
+ type: t.KeyofC<typeof import("./webhookType").OrganizationWebhookTypeEnum>;
9
+ url: import("io-ts-types").NonEmptyStringC;
10
+ label: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
11
+ }>;
12
+ export type AddOrganizationWebhookRequestBody = t.TypeOf<typeof AddOrganizationWebhookRequestBodyC>;
13
+ export declare const ListOrganizationWebhooksRequestBody: {
14
+ type: t.UnionC<[t.Type<"txRequest" | "txRequestTransaction" | "transfer" | "pendingapproval" | "bankAccount" | "userKycState" | "enterpriseKycState" | "identityStatus" | "accessToken" | "reversal", "txRequest" | "txRequestTransaction" | "transfer" | "pendingapproval" | "bankAccount" | "userKycState" | "enterpriseKycState" | "identityStatus" | "accessToken" | "reversal", unknown>, t.UndefinedC]>;
15
+ limit: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
16
+ prevId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
17
+ };
18
+ export declare const ListOrganizationWebhooksRequestBodyC: t.TypeC<{
19
+ type: t.UnionC<[t.Type<"txRequest" | "txRequestTransaction" | "transfer" | "pendingapproval" | "bankAccount" | "userKycState" | "enterpriseKycState" | "identityStatus" | "accessToken" | "reversal", "txRequest" | "txRequestTransaction" | "transfer" | "pendingapproval" | "bankAccount" | "userKycState" | "enterpriseKycState" | "identityStatus" | "accessToken" | "reversal", unknown>, t.UndefinedC]>;
20
+ limit: t.UnionC<[t.Type<string | number, string | number, unknown>, t.UndefinedC]>;
21
+ prevId: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
22
+ }>;
23
+ export type ListOrganizationWebhooksRequestBody = t.TypeOf<typeof ListOrganizationWebhooksRequestBodyC>;
24
+ export declare const ListOrganizationWebhooksResponse: t.IntersectionC<[t.TypeC<{
25
+ webhooks: t.ArrayC<t.IntersectionC<[t.TypeC<{
26
+ id: t.StringC;
27
+ created: import("io-ts-types").DateFromISOStringC;
28
+ coin: t.StringC;
29
+ url: t.StringC;
30
+ version: t.NumberC;
31
+ scope: t.KeyofC<typeof import("./webhookScope").WebhookScopeEnum>;
32
+ state: t.KeyofC<typeof import("./webhookState").WebhookStateEnum>;
33
+ successiveFailedAttempts: t.NumberC;
34
+ listenToFailureStates: t.BooleanC;
35
+ }>, t.PartialC<{
36
+ label: t.StringC;
37
+ walletId: t.StringC;
38
+ enterpriseId: t.StringC;
39
+ organizationId: t.StringC;
40
+ userId: t.StringC;
41
+ type: t.KeyofC<typeof import("./webhookType").WebhookTypeEnum>;
42
+ numConfirmations: t.NumberC;
43
+ lastAttempt: import("io-ts-types").DateFromISOStringC;
44
+ failingSince: import("io-ts-types").DateFromISOStringC;
45
+ allToken: t.BooleanC;
46
+ txRequestStates: t.ArrayC<t.KeyofC<{
47
+ pendingApproval: number;
48
+ canceled: number;
49
+ rejected: number;
50
+ initialized: number;
51
+ pendingDelivery: number;
52
+ delivered: number;
53
+ pendingUserSignature: number;
54
+ pendingUserCommitment: number;
55
+ pendingUserRShare: number;
56
+ pendingUserGShare: number;
57
+ readyToSend: number;
58
+ signed: number;
59
+ failed: number;
60
+ }>>;
61
+ txRequestTransactionStates: t.ArrayC<t.KeyofC<{
62
+ initialized: number;
63
+ pendingSignature: number;
64
+ eddsaPendingCommitment: number;
65
+ eddsaPendingRShare: number;
66
+ eddsaPendingGShare: number;
67
+ ecdsaMPCv2Round1: number;
68
+ ecdsaMPCv2Round2: number;
69
+ ecdsaMPCv2Round3: number;
70
+ readyToCombineShares: number;
71
+ signed: number;
72
+ held: number;
73
+ delivered: number;
74
+ invalidSignature: number;
75
+ rejected: number;
76
+ }>>;
77
+ }>]>>;
78
+ }>, t.PartialC<{
79
+ nextBatchPrevId: t.UnionC<[t.Type<string | undefined, string | undefined, unknown>, t.UndefinedC]>;
80
+ }>]>;
81
+ export type ListOrganizationWebhooksResponse = t.TypeOf<typeof ListOrganizationWebhooksResponse>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.ListOrganizationWebhooksResponse = exports.ListOrganizationWebhooksRequestBodyC = exports.ListOrganizationWebhooksRequestBody = exports.AddOrganizationWebhookRequestBodyC = exports.AddOrganizationWebhookRequestBody = void 0;
27
+ const webhookType_1 = require("./webhookType");
28
+ const io_ts_types_1 = require("io-ts-types");
29
+ const utils_1 = require("../../utils");
30
+ const t = __importStar(require("io-ts"));
31
+ const webhook_1 = require("./webhook");
32
+ exports.AddOrganizationWebhookRequestBody = {
33
+ type: webhookType_1.OrganizationWebhookType,
34
+ url: io_ts_types_1.NonEmptyString,
35
+ label: (0, utils_1.Optional)(t.string),
36
+ };
37
+ exports.AddOrganizationWebhookRequestBodyC = t.type({
38
+ ...exports.AddOrganizationWebhookRequestBody,
39
+ });
40
+ exports.ListOrganizationWebhooksRequestBody = {
41
+ type: (0, utils_1.Optional)(webhookType_1.OrganizationWebhookType),
42
+ limit: utils_1.optionalStringOrNumber,
43
+ prevId: utils_1.optionalString,
44
+ };
45
+ exports.ListOrganizationWebhooksRequestBodyC = t.type({
46
+ ...exports.ListOrganizationWebhooksRequestBody,
47
+ });
48
+ exports.ListOrganizationWebhooksResponse = t.intersection([
49
+ t.type({
50
+ webhooks: t.array(webhook_1.Webhook),
51
+ }),
52
+ t.partial({
53
+ nextBatchPrevId: (0, utils_1.Optional)(t.union([t.string, t.undefined])),
54
+ }),
55
+ ]);
56
+ //# sourceMappingURL=organizationWebhooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationWebhooks.js","sourceRoot":"","sources":["../../../../src/schema/webhook/organizationWebhooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwD;AACxD,6CAA6C;AAC7C,uCAA+E;AAC/E,yCAA2B;AAC3B,uCAAoC;AAEvB,QAAA,iCAAiC,GAAG;IAC/C,IAAI,EAAE,qCAAuB;IAC7B,GAAG,EAAE,4BAAc;IACnB,KAAK,EAAE,IAAA,gBAAQ,EAAC,CAAC,CAAC,MAAM,CAAC;CAC1B,CAAC;AACW,QAAA,kCAAkC,GAAG,CAAC,CAAC,IAAI,CAAC;IACvD,GAAG,yCAAiC;CACrC,CAAC,CAAC;AAMU,QAAA,mCAAmC,GAAG;IACjD,IAAI,EAAE,IAAA,gBAAQ,EAAC,qCAAuB,CAAC;IACvC,KAAK,EAAE,8BAAsB;IAC7B,MAAM,EAAE,sBAAc;CACvB,CAAC;AAEW,QAAA,oCAAoC,GAAG,CAAC,CAAC,IAAI,CAAC;IACzD,GAAG,2CAAmC;CACvC,CAAC,CAAC;AAMU,QAAA,gCAAgC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7D,CAAC,CAAC,IAAI,CAAC;QACL,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAO,CAAC;KAC3B,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,eAAe,EAAE,IAAA,gBAAQ,EAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;KAC5D,CAAC;CACH,CAAC,CAAC"}
@@ -56,3 +56,17 @@ export declare enum EnterpriseWebhookTypeEnum {
56
56
  }
57
57
  export declare const EnterpriseWebhookType: t.KeyofC<typeof EnterpriseWebhookTypeEnum>;
58
58
  export type EnterpriseWebhookType = t.TypeOf<typeof EnterpriseWebhookType>;
59
+ export declare enum OrganizationWebhookTypeEnum {
60
+ "transfer" = "transfer",
61
+ "txRequest" = "txRequest",
62
+ "pendingapproval" = "pendingapproval",
63
+ "txRequestTransaction" = "txRequestTransaction",
64
+ "bankAccount" = "bankAccount",
65
+ "identityStatus" = "identityStatus",
66
+ "userKycState" = "userKycState",
67
+ "enterpriseKycState" = "enterpriseKycState",
68
+ "accessToken" = "accessToken",
69
+ "reversal" = "reversal"
70
+ }
71
+ export declare const OrganizationWebhookType: t.KeyofC<typeof OrganizationWebhookTypeEnum>;
72
+ export type OrganizationWebhookType = t.TypeOf<typeof OrganizationWebhookType>;
@@ -23,7 +23,7 @@ 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.EnterpriseWebhookTypeEnum = exports.WalletWebhookType = exports.WalletWebhookTypeEnum = exports.WebhookType = exports.WebhookTypeEnum = void 0;
26
+ exports.OrganizationWebhookType = exports.OrganizationWebhookTypeEnum = exports.EnterpriseWebhookType = exports.EnterpriseWebhookTypeEnum = exports.WalletWebhookType = exports.WalletWebhookTypeEnum = exports.WebhookType = exports.WebhookTypeEnum = void 0;
27
27
  const t = __importStar(require("io-ts"));
28
28
  var WebhookTypeEnum;
29
29
  (function (WebhookTypeEnum) {
@@ -82,4 +82,18 @@ var EnterpriseWebhookTypeEnum;
82
82
  EnterpriseWebhookTypeEnum["reversal"] = "reversal";
83
83
  })(EnterpriseWebhookTypeEnum || (exports.EnterpriseWebhookTypeEnum = EnterpriseWebhookTypeEnum = {}));
84
84
  exports.EnterpriseWebhookType = t.keyof(EnterpriseWebhookTypeEnum, "EnterpriseWebhookType");
85
+ var OrganizationWebhookTypeEnum;
86
+ (function (OrganizationWebhookTypeEnum) {
87
+ OrganizationWebhookTypeEnum["transfer"] = "transfer";
88
+ OrganizationWebhookTypeEnum["txRequest"] = "txRequest";
89
+ OrganizationWebhookTypeEnum["pendingapproval"] = "pendingapproval";
90
+ OrganizationWebhookTypeEnum["txRequestTransaction"] = "txRequestTransaction";
91
+ OrganizationWebhookTypeEnum["bankAccount"] = "bankAccount";
92
+ OrganizationWebhookTypeEnum["identityStatus"] = "identityStatus";
93
+ OrganizationWebhookTypeEnum["userKycState"] = "userKycState";
94
+ OrganizationWebhookTypeEnum["enterpriseKycState"] = "enterpriseKycState";
95
+ OrganizationWebhookTypeEnum["accessToken"] = "accessToken";
96
+ OrganizationWebhookTypeEnum["reversal"] = "reversal";
97
+ })(OrganizationWebhookTypeEnum || (exports.OrganizationWebhookTypeEnum = OrganizationWebhookTypeEnum = {}));
98
+ exports.OrganizationWebhookType = t.keyof(OrganizationWebhookTypeEnum, "OrganizationWebhookType");
85
99
  //# sourceMappingURL=webhookType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"webhookType.js","sourceRoot":"","sources":["../../../../src/schema/webhook/webhookType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAE3B,IAAY,eAuCX;AAvCD,WAAY,eAAe;IAEzB,0CAAyB,CAAA;IAEzB,gEAA+C,CAAA;IAC/C,wCAAuB,CAAA;IACvB,8CAA6B,CAAA;IAC7B,4DAA2C,CAAA;IAC3C,0DAAyC,CAAA;IACzC,sDAAqC,CAAA;IACrC,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,gEAA+C,CAAA;IAC/C,oCAAmB,CAAA;IACnB,oDAAmC,CAAA;IAEnC,gEAA+C,CAAA;IAG/C,8DAA6C,CAAA;IAE7C,8CAA6B,CAAA;IAC7B,gDAA+B,CAAA;IAC/B,4DAA2C,CAAA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6B,CAAA;IAC7B,wDAA6B,CAAA;IAC7B,wEAA6C,CAAA;IAC7C,kDAAuB,CAAA;AACzB,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC;AACY,QAAA,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAC1C,yBAAyB,EACzB,uBAAuB,CACxB,CAAC;AAGF,IAAY,2BAWX;AAXD,WAAY,2BAA2B;IACrC,oDAAuB,CAAA;IACvB,sDAAyB,CAAA;IACzB,kEAAqC,CAAA;IACrC,4EAA+C,CAAA;IAC/C,0DAA6B,CAAA;IAC7B,gEAAmC,CAAA;IACnC,4DAA+B,CAAA;IAC/B,wEAA2C,CAAA;IAC3C,0DAA6B,CAAA;IAC7B,oDAAuB,CAAA;AACzB,CAAC,EAXW,2BAA2B,2CAA3B,2BAA2B,QAWtC;AACY,QAAA,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC5C,2BAA2B,EAC3B,yBAAyB,CAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "5.44.0",
3
+ "version": "5.45.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -1,4 +1,5 @@
1
1
  export * from "./enterpriseWebhooks";
2
+ export * from "./organizationWebhooks";
2
3
  export * from "./addWalletWebhookRequest";
3
4
  export * from "./webhook";
4
5
  export * from "./webhookNotification";
@@ -0,0 +1,44 @@
1
+ import { OrganizationWebhookType } from "./webhookType";
2
+ import { NonEmptyString } from "io-ts-types";
3
+ import { Optional, optionalString, optionalStringOrNumber } from "../../utils";
4
+ import * as t from "io-ts";
5
+ import { Webhook } from "./webhook";
6
+
7
+ export const AddOrganizationWebhookRequestBody = {
8
+ type: OrganizationWebhookType,
9
+ url: NonEmptyString,
10
+ label: Optional(t.string),
11
+ };
12
+ export const AddOrganizationWebhookRequestBodyC = t.type({
13
+ ...AddOrganizationWebhookRequestBody,
14
+ });
15
+
16
+ export type AddOrganizationWebhookRequestBody = t.TypeOf<
17
+ typeof AddOrganizationWebhookRequestBodyC
18
+ >;
19
+
20
+ export const ListOrganizationWebhooksRequestBody = {
21
+ type: Optional(OrganizationWebhookType),
22
+ limit: optionalStringOrNumber,
23
+ prevId: optionalString,
24
+ };
25
+
26
+ export const ListOrganizationWebhooksRequestBodyC = t.type({
27
+ ...ListOrganizationWebhooksRequestBody,
28
+ });
29
+
30
+ export type ListOrganizationWebhooksRequestBody = t.TypeOf<
31
+ typeof ListOrganizationWebhooksRequestBodyC
32
+ >;
33
+
34
+ export const ListOrganizationWebhooksResponse = t.intersection([
35
+ t.type({
36
+ webhooks: t.array(Webhook),
37
+ }),
38
+ t.partial({
39
+ nextBatchPrevId: Optional(t.union([t.string, t.undefined])),
40
+ }),
41
+ ]);
42
+ export type ListOrganizationWebhooksResponse = t.TypeOf<
43
+ typeof ListOrganizationWebhooksResponse
44
+ >;
@@ -79,3 +79,21 @@ export const EnterpriseWebhookType = t.keyof(
79
79
  "EnterpriseWebhookType",
80
80
  );
81
81
  export type EnterpriseWebhookType = t.TypeOf<typeof EnterpriseWebhookType>;
82
+
83
+ export enum OrganizationWebhookTypeEnum {
84
+ "transfer" = "transfer",
85
+ "txRequest" = "txRequest",
86
+ "pendingapproval" = "pendingapproval",
87
+ "txRequestTransaction" = "txRequestTransaction",
88
+ "bankAccount" = "bankAccount",
89
+ "identityStatus" = "identityStatus",
90
+ "userKycState" = "userKycState",
91
+ "enterpriseKycState" = "enterpriseKycState",
92
+ "accessToken" = "accessToken",
93
+ "reversal" = "reversal",
94
+ }
95
+ export const OrganizationWebhookType = t.keyof(
96
+ OrganizationWebhookTypeEnum,
97
+ "OrganizationWebhookType",
98
+ );
99
+ export type OrganizationWebhookType = t.TypeOf<typeof OrganizationWebhookType>;