@bitgo/public-types 6.76.0 → 6.77.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.
- package/dist/src/schema/index.d.ts +1 -0
- package/dist/src/schema/index.js +1 -0
- package/dist/src/schema/index.js.map +1 -1
- package/dist/src/schema/key/index.d.ts +1 -0
- package/dist/src/schema/key/index.js +18 -0
- package/dist/src/schema/key/index.js.map +1 -0
- package/dist/src/schema/key/requests.d.ts +17 -0
- package/dist/src/schema/key/requests.js +34 -0
- package/dist/src/schema/key/requests.js.map +1 -0
- package/package.json +1 -1
- package/src/schema/index.ts +1 -0
- package/src/schema/key/index.ts +1 -0
- package/src/schema/key/requests.ts +33 -0
package/dist/src/schema/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,uDAAqC;AACrC,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,wCAAsB;AACtB,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,yCAAuB;AACvB,yCAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,uDAAqC;AACrC,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,wCAAsB;AACtB,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,yCAAuB;AACvB,yCAAuB;AACvB,wCAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/key/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
export declare const KeyBulkUpdateBody: t.TypeC<{
|
|
3
|
+
updates: t.ArrayC<t.IntersectionC<[t.TypeC<{
|
|
4
|
+
keyId: t.StringC;
|
|
5
|
+
encryptedPrv: t.StringC;
|
|
6
|
+
}>, t.PartialC<{
|
|
7
|
+
expectedOldEncryptedPrv: t.StringC;
|
|
8
|
+
}>]>>;
|
|
9
|
+
}>;
|
|
10
|
+
export type KeyBulkUpdateBody = t.TypeOf<typeof KeyBulkUpdateBody>;
|
|
11
|
+
export declare const KeyBulkUpdateResponse: t.TypeC<{
|
|
12
|
+
updates: t.ArrayC<t.TypeC<{
|
|
13
|
+
keyId: t.StringC;
|
|
14
|
+
updated: t.BooleanC;
|
|
15
|
+
}>>;
|
|
16
|
+
}>;
|
|
17
|
+
export type KeyBulkUpdateResponse = t.TypeOf<typeof KeyBulkUpdateResponse>;
|
|
@@ -0,0 +1,34 @@
|
|
|
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.KeyBulkUpdateResponse = exports.KeyBulkUpdateBody = void 0;
|
|
27
|
+
const t = __importStar(require("io-ts"));
|
|
28
|
+
const KeyBulkUpdate = t.intersection([
|
|
29
|
+
t.type({ keyId: t.string, encryptedPrv: t.string }),
|
|
30
|
+
t.partial({ expectedOldEncryptedPrv: t.string }),
|
|
31
|
+
], "KeyBulkUpdate");
|
|
32
|
+
exports.KeyBulkUpdateBody = t.type({ updates: t.array(KeyBulkUpdate) }, "KeyBulkUpdateBody");
|
|
33
|
+
exports.KeyBulkUpdateResponse = t.type({ updates: t.array(t.type({ keyId: t.string, updated: t.boolean })) }, "KeyBulkUpdateResponse");
|
|
34
|
+
//# sourceMappingURL=requests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requests.js","sourceRoot":"","sources":["../../../../src/schema/key/requests.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAE3B,MAAM,aAAa,GAAG,CAAC,CAAC,YAAY,CAClC;IACE,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;IACnD,CAAC,CAAC,OAAO,CAAC,EAAE,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;CACjD,EACD,eAAe,CAChB,CAAC;AAQW,QAAA,iBAAiB,GAAG,CAAC,CAAC,IAAI,CACrC,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,EACnC,mBAAmB,CACpB,CAAC;AAQW,QAAA,qBAAqB,GAAG,CAAC,CAAC,IAAI,CACzC,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EACrE,uBAAuB,CACxB,CAAC"}
|
package/package.json
CHANGED
package/src/schema/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
|
|
3
|
+
const KeyBulkUpdate = t.intersection(
|
|
4
|
+
[
|
|
5
|
+
t.type({ keyId: t.string, encryptedPrv: t.string }),
|
|
6
|
+
t.partial({ expectedOldEncryptedPrv: t.string }),
|
|
7
|
+
],
|
|
8
|
+
"KeyBulkUpdate",
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Request body for PUT /api/v2/key/bulk. Each update carries the client's re-encrypted,
|
|
13
|
+
* opaque key envelope; plaintext passphrases are never sent to the server. When present,
|
|
14
|
+
* `expectedOldEncryptedPrv` is used as a per-key compare-and-swap value so a stale rotation
|
|
15
|
+
* is rejected instead of silently mixing old and new envelopes.
|
|
16
|
+
*/
|
|
17
|
+
export const KeyBulkUpdateBody = t.type(
|
|
18
|
+
{ updates: t.array(KeyBulkUpdate) },
|
|
19
|
+
"KeyBulkUpdateBody",
|
|
20
|
+
);
|
|
21
|
+
/** @experimental */
|
|
22
|
+
export type KeyBulkUpdateBody = t.TypeOf<typeof KeyBulkUpdateBody>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Response for PUT /api/v2/key/bulk. Each item reports whether the corresponding key envelope
|
|
26
|
+
* was updated; the full key document is intentionally not part of this wire contract.
|
|
27
|
+
*/
|
|
28
|
+
export const KeyBulkUpdateResponse = t.type(
|
|
29
|
+
{ updates: t.array(t.type({ keyId: t.string, updated: t.boolean })) },
|
|
30
|
+
"KeyBulkUpdateResponse",
|
|
31
|
+
);
|
|
32
|
+
/** @experimental */
|
|
33
|
+
export type KeyBulkUpdateResponse = t.TypeOf<typeof KeyBulkUpdateResponse>;
|