From 5585dcfddb2f9e7fe9f251dba91725d28db440fb Mon Sep 17 00:00:00 2001 From: Tim Hawbaker Date: Sun, 28 May 2023 11:44:28 -0700 Subject: [PATCH 1/4] fix get_private_key route --- .../public/v1/public_api.fetcher.ts | 74 ++++++------ .../public/v1/public_api.swagger.json | 106 +++++++++--------- .../coordinator/public/v1/public_api.types.ts | 60 +++++----- 3 files changed, 120 insertions(+), 120 deletions(-) diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts index 11032ec5c..0b47fdf3b 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts @@ -102,6 +102,43 @@ export const postGetPolicy = (input: TPostGetPolicyInput) => body: input.body, }); +/** + * `POST /public/v1/query/get_private_key` + */ +type TPostGetPrivateKeyBody = + operations["PublicApiService_GetPrivateKey"]["parameters"]["body"]["body"]; + +/** + * `POST /public/v1/query/get_private_key` + */ +export type TPostGetPrivateKeyResponse = + operations["PublicApiService_GetPrivateKey"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/query/get_private_key` + */ +export type TPostGetPrivateKeyInput = { body: TPostGetPrivateKeyBody }; + +/** + * Get Private Key + * + * Get details about a Private Key + * + * `POST /public/v1/query/get_private_key` + */ +export const postGetPrivateKey = (input: TPostGetPrivateKeyInput) => + request< + TPostGetPrivateKeyResponse, + TPostGetPrivateKeyBody, + never, + never, + never + >({ + uri: "/public/v1/query/get_private_key", + method: "POST", + body: input.body, + }); + /** * `POST /public/v1/query/get_user` */ @@ -710,40 +747,3 @@ export const postSignTransaction = (input: TPostSignTransactionInput) => method: "POST", body: input.body, }); - -/** - * `POST /tkhq/public/v1/query/get_private_key` - */ -type TPostGetPrivateKeyBody = - operations["PublicApiService_GetPrivateKey"]["parameters"]["body"]["body"]; - -/** - * `POST /tkhq/public/v1/query/get_private_key` - */ -export type TPostGetPrivateKeyResponse = - operations["PublicApiService_GetPrivateKey"]["responses"]["200"]["schema"]; - -/** - * `POST /tkhq/public/v1/query/get_private_key` - */ -export type TPostGetPrivateKeyInput = { body: TPostGetPrivateKeyBody }; - -/** - * Get Private Key - * - * Get details about a Private Key - * - * `POST /tkhq/public/v1/query/get_private_key` - */ -export const postGetPrivateKey = (input: TPostGetPrivateKeyInput) => - request< - TPostGetPrivateKeyResponse, - TPostGetPrivateKeyBody, - never, - never, - never - >({ - uri: "/tkhq/public/v1/query/get_private_key", - method: "POST", - body: input.body, - }); diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json index b80e6a16f..6eb60b300 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json @@ -178,6 +178,59 @@ } } }, + "/public/v1/query/get_private_key": { + "post": { + "summary": "Get Private Key", + "description": "Get details about a Private Key", + "operationId": "PublicApiService_GetPrivateKey", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetPrivateKeyResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetPrivateKeyRequest" + } + } + ], + "tags": ["Private Keys"], + "x-readme": { + "code-samples": [ + { + "code": "turnkey request --host coordinator-beta.turnkey.io --path /public/v1/query/get_private_key --body '{\n\t\"organizationId\": \"'\"$ORGANIZATION_ID\"'\",\n\t\"privateKeyId\": \"'\"$PRIVATE_KEY_ID\"'\"\n}'", + "install": "brew tap tkhq/tap \u0026\u0026 brew install turnkey", + "language": "curl", + "name": "Turnkey CLI" + } + ] + } + } + }, "/public/v1/query/get_user": { "post": { "summary": "Get User", @@ -1079,59 +1132,6 @@ ] } } - }, - "/tkhq/public/v1/query/get_private_key": { - "post": { - "summary": "Get Private Key", - "description": "Get details about a Private Key", - "operationId": "PublicApiService_GetPrivateKey", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetPrivateKeyResponse" - } - }, - "403": { - "description": "Returned when the user does not have permission to access the resource.", - "schema": {} - }, - "404": { - "description": "Returned when the resource does not exist.", - "schema": { - "type": "string", - "format": "string" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1GetPrivateKeyRequest" - } - } - ], - "tags": ["Private Keys"], - "x-readme": { - "code-samples": [ - { - "code": "turnkey request --host coordinator-beta.turnkey.io --path /public/v1/query/get_private_key --body '{\n\t\"organizationId\": \"'\"$ORGANIZATION_ID\"'\",\n\t\"privateKeyId\": \"'\"$PRIVATE_KEY_ID\"'\"\n}'", - "install": "brew tap tkhq/tap \u0026\u0026 brew install turnkey", - "language": "curl", - "name": "Turnkey CLI" - } - ] - } - } } }, "definitions": { diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts index b248f401a..e98c59049 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts @@ -16,6 +16,10 @@ export type paths = { /** Get details about a Policy */ post: operations["PublicApiService_GetPolicy"]; }; + "/public/v1/query/get_private_key": { + /** Get details about a Private Key */ + post: operations["PublicApiService_GetPrivateKey"]; + }; "/public/v1/query/get_user": { /** Get details about a User */ post: operations["PublicApiService_GetUser"]; @@ -84,10 +88,6 @@ export type paths = { /** Sign a transaction with a Private Key */ post: operations["PublicApiService_SignTransaction"]; }; - "/tkhq/public/v1/query/get_private_key": { - /** Get details about a Private Key */ - post: operations["PublicApiService_GetPrivateKey"]; - }; }; export type definitions = { @@ -1401,6 +1401,32 @@ export type operations = { }; }; }; + /** Get details about a Private Key */ + PublicApiService_GetPrivateKey: { + parameters: { + body: { + body: definitions["v1GetPrivateKeyRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1GetPrivateKeyResponse"]; + }; + /** Returned when the user does not have permission to access the resource. */ + 403: { + schema: unknown; + }; + /** Returned when the resource does not exist. */ + 404: { + schema: string; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; /** Get details about a User */ PublicApiService_GetUser: { parameters: { @@ -1843,32 +1869,6 @@ export type operations = { }; }; }; - /** Get details about a Private Key */ - PublicApiService_GetPrivateKey: { - parameters: { - body: { - body: definitions["v1GetPrivateKeyRequest"]; - }; - }; - responses: { - /** A successful response. */ - 200: { - schema: definitions["v1GetPrivateKeyResponse"]; - }; - /** Returned when the user does not have permission to access the resource. */ - 403: { - schema: unknown; - }; - /** Returned when the resource does not exist. */ - 404: { - schema: string; - }; - /** An unexpected error response. */ - default: { - schema: definitions["rpcStatus"]; - }; - }; - }; }; export type external = {}; From de6344c28f194350e677abf7127000f0684db00d Mon Sep 17 00:00:00 2001 From: Keyan Zhang Date: Thu, 1 Jun 2023 15:12:01 -0700 Subject: [PATCH 2/4] Update proto --- .../public/v1/public_api.fetcher.ts | 86 +++++++++ .../public/v1/public_api.swagger.json | 179 +++++++++++++++++- .../coordinator/public/v1/public_api.types.ts | 100 +++++++++- 3 files changed, 363 insertions(+), 2 deletions(-) diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts index 0b47fdf3b..6fbcbcd2e 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts @@ -747,3 +747,89 @@ export const postSignTransaction = (input: TPostSignTransactionInput) => method: "POST", body: input.body, }); + +/** + * `POST /public/v1/user_tags/update` + */ +type TPostUpdateUserTagBody = + operations["PublicApiService_UpdateUserTag"]["parameters"]["body"]["body"]; + +/** + * `POST /public/v1/user_tags/update` + */ +export type TPostUpdateUserTagResponse = + operations["PublicApiService_UpdateUserTag"]["responses"]["200"]["schema"]; + +/** + * `POST /public/v1/user_tags/update` + */ +export type TPostUpdateUserTagInput = { body: TPostUpdateUserTagBody }; + +/** + * Update User Tag + * + * Update user tag attributes such as its name or associated users. + * + * `POST /public/v1/user_tags/update` + */ +export const postUpdateUserTag = (input: TPostUpdateUserTagInput) => + request< + TPostUpdateUserTagResponse, + TPostUpdateUserTagBody, + never, + never, + never + >({ + uri: "/public/v1/user_tags/update", + method: "POST", + body: input.body, + }); + +/** + * `POST /tkhq/public/v1/query/get_private_key` + * + * @deprecated + */ +type TPostGetPrivateKeyBackwardsCompatBody = + operations["PublicApiService_GetPrivateKeyBackwardsCompat"]["parameters"]["body"]["body"]; + +/** + * `POST /tkhq/public/v1/query/get_private_key` + * + * @deprecated + */ +export type TPostGetPrivateKeyBackwardsCompatResponse = + operations["PublicApiService_GetPrivateKeyBackwardsCompat"]["responses"]["200"]["schema"]; + +/** + * `POST /tkhq/public/v1/query/get_private_key` + * + * @deprecated + */ +export type TPostGetPrivateKeyBackwardsCompatInput = { + body: TPostGetPrivateKeyBackwardsCompatBody; +}; + +/** + * Get Private Key + * + * Get details about a Private Key + * + * `POST /tkhq/public/v1/query/get_private_key` + * + * @deprecated + */ +export const postGetPrivateKeyBackwardsCompat = ( + input: TPostGetPrivateKeyBackwardsCompatInput +) => + request< + TPostGetPrivateKeyBackwardsCompatResponse, + TPostGetPrivateKeyBackwardsCompatBody, + never, + never, + never + >({ + uri: "/tkhq/public/v1/query/get_private_key", + method: "POST", + body: input.body, + }); diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json index 6eb60b300..4369253f1 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json @@ -1132,6 +1132,113 @@ ] } } + }, + "/public/v1/user_tags/update": { + "post": { + "summary": "Update User Tag", + "description": "Update user tag attributes such as its name or associated users.", + "operationId": "PublicApiService_UpdateUserTag", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ActivityResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateUserTagRequest" + } + } + ], + "tags": ["User Tags"], + "x-readme": { + "code-samples": [ + { + "code": "turnkey request --host coordinator-beta.turnkey.io --path /public/v1/user_tags/update --body '{\n\t\"timestampMs\": \"'\"$(date +%s)\"'000\",\n\t\"type\": \"ACTIVITY_TYPE_UPDATE_USER_TAG\",\n\t\"organizationId\": \"'\"$ORGANIZATION_ID\"'\",\n\t\"parameters\": {\n\t\t\"userTagId\": \"'\"$USER_TAG_ID\"'\",\n\t\t\"userTagName\": \"\",\n\t\t\"addUserIds\": \"\",\n\t\t\"removeUserIds\": \"\"\n\t}\n}'", + "install": "brew tap tkhq/tap \u0026\u0026 brew install turnkey", + "language": "curl", + "name": "Turnkey CLI" + } + ] + } + } + }, + "/tkhq/public/v1/query/get_private_key": { + "post": { + "summary": "Get Private Key", + "description": "Get details about a Private Key", + "operationId": "PublicApiService_GetPrivateKeyBackwardsCompat", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetPrivateKeyResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetPrivateKeyRequest" + } + } + ], + "tags": ["Private Keys"], + "deprecated": true, + "x-readme": { + "code-samples": [ + { + "code": "turnkey request --host coordinator-beta.turnkey.io --path /public/v1/query/get_private_key --body '{\n\t\"organizationId\": \"'\"$ORGANIZATION_ID\"'\",\n\t\"privateKeyId\": \"'\"$PRIVATE_KEY_ID\"'\"\n}'", + "install": "brew tap tkhq/tap \u0026\u0026 brew install turnkey", + "language": "curl", + "name": "Turnkey CLI" + } + ] + } + } } }, "definitions": { @@ -1502,7 +1609,8 @@ "ACTIVITY_TYPE_CREATE_POLICY_V2", "ACTIVITY_TYPE_CREATE_POLICY_V3", "ACTIVITY_TYPE_CREATE_API_ONLY_USERS", - "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" + "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM", + "ACTIVITY_TYPE_UPDATE_USER_TAG" ], "description": "Type of Activity, such as Add User, or Sign Transaction." }, @@ -2885,6 +2993,9 @@ }, "updateRootQuorumIntent": { "$ref": "#/definitions/v1UpdateRootQuorumIntent" + }, + "updateUserTagIntent": { + "$ref": "#/definitions/v1UpdateUserTagIntent" } }, "description": "Intent object crafted by Turnkey based on the user request, used to assess the permissibility of an action.", @@ -3347,6 +3458,9 @@ }, "updateRootQuorumResult": { "$ref": "#/definitions/v1UpdateRootQuorumResult" + }, + "updateUserTagResult": { + "$ref": "#/definitions/v1UpdateUserTagResult" } }, "description": "Result of the intended action." @@ -3592,6 +3706,69 @@ "v1UpdateRootQuorumResult": { "type": "object" }, + "v1UpdateUserTagIntent": { + "type": "object", + "properties": { + "userTagId": { + "type": "string", + "description": "Unique identifier for a given User Tag.", + "title": "@inject_tag: validate:\"uuid\"" + }, + "userTagName": { + "type": "string", + "description": "The new, human-readable name for the tag with the given ID.", + "title": "@inject_tag: validate:\"required,tk_label,tk_label_length\"" + }, + "addUserIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of User IDs to add.", + "title": "@inject_tag: validate:\"dive,uuid\"" + }, + "removeUserIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of User IDs to remove.", + "title": "@inject_tag: validate:\"dive,uuid\"" + } + }, + "required": ["userTagId", "userTagName", "addUserIds", "removeUserIds"] + }, + "v1UpdateUserTagRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_UPDATE_USER_TAG"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/v1UpdateUserTagIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "v1UpdateUserTagResult": { + "type": "object", + "properties": { + "userTagId": { + "type": "string", + "description": "Unique identifier for a given User Tag." + } + }, + "required": ["userTagId"] + }, "v1User": { "type": "object", "properties": { diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts index e98c59049..68055a395 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts @@ -88,6 +88,14 @@ export type paths = { /** Sign a transaction with a Private Key */ post: operations["PublicApiService_SignTransaction"]; }; + "/public/v1/user_tags/update": { + /** Update user tag attributes such as its name or associated users. */ + post: operations["PublicApiService_UpdateUserTag"]; + }; + "/tkhq/public/v1/query/get_private_key": { + /** Get details about a Private Key */ + post: operations["PublicApiService_GetPrivateKeyBackwardsCompat"]; + }; }; export type definitions = { @@ -314,7 +322,8 @@ export type definitions = { | "ACTIVITY_TYPE_CREATE_POLICY_V2" | "ACTIVITY_TYPE_CREATE_POLICY_V3" | "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" - | "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM"; + | "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" + | "ACTIVITY_TYPE_UPDATE_USER_TAG"; v1ApiKey: { credential: definitions["v1Credential"]; /** @description Unique identifier for a given API Key. */ @@ -938,6 +947,7 @@ export type definitions = { createPolicyIntentV3?: definitions["v1CreatePolicyIntentV3"]; createApiOnlyUsersIntent?: definitions["v1CreateApiOnlyUsersIntent"]; updateRootQuorumIntent?: definitions["v1UpdateRootQuorumIntent"]; + updateUserTagIntent?: definitions["v1UpdateUserTagIntent"]; }; v1Invitation: { /** @description Unique identifier for a given Invitation object. */ @@ -1124,6 +1134,7 @@ export type definitions = { deletePaymentMethodResult?: definitions["v1DeletePaymentMethodResult"]; createApiOnlyUsersResult?: definitions["v1CreateApiOnlyUsersResult"]; updateRootQuorumResult?: definitions["v1UpdateRootQuorumResult"]; + updateUserTagResult?: definitions["v1UpdateUserTagResult"]; }; v1SelectorV2: { subject?: string; @@ -1251,6 +1262,41 @@ export type definitions = { userIds: string[]; }; v1UpdateRootQuorumResult: { [key: string]: unknown }; + v1UpdateUserTagIntent: { + /** + * @inject_tag: validate:"uuid" + * @description Unique identifier for a given User Tag. + */ + userTagId: string; + /** + * @inject_tag: validate:"required,tk_label,tk_label_length" + * @description The new, human-readable name for the tag with the given ID. + */ + userTagName: string; + /** + * @inject_tag: validate:"dive,uuid" + * @description A list of User IDs to add. + */ + addUserIds: string[]; + /** + * @inject_tag: validate:"dive,uuid" + * @description A list of User IDs to remove. + */ + removeUserIds: string[]; + }; + v1UpdateUserTagRequest: { + /** @enum {string} */ + type: "ACTIVITY_TYPE_UPDATE_USER_TAG"; + /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */ + timestampMs: string; + /** @description Unique identifier for a given Organization. */ + organizationId: string; + parameters: definitions["v1UpdateUserTagIntent"]; + }; + v1UpdateUserTagResult: { + /** @description Unique identifier for a given User Tag. */ + userTagId: string; + }; v1User: { /** @description Unique identifier for a given User. */ userId: string; @@ -1869,6 +1915,58 @@ export type operations = { }; }; }; + /** Update user tag attributes such as its name or associated users. */ + PublicApiService_UpdateUserTag: { + parameters: { + body: { + body: definitions["v1UpdateUserTagRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1ActivityResponse"]; + }; + /** Returned when the user does not have permission to access the resource. */ + 403: { + schema: unknown; + }; + /** Returned when the resource does not exist. */ + 404: { + schema: string; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; + /** Get details about a Private Key */ + PublicApiService_GetPrivateKeyBackwardsCompat: { + parameters: { + body: { + body: definitions["v1GetPrivateKeyRequest"]; + }; + }; + responses: { + /** A successful response. */ + 200: { + schema: definitions["v1GetPrivateKeyResponse"]; + }; + /** Returned when the user does not have permission to access the resource. */ + 403: { + schema: unknown; + }; + /** Returned when the resource does not exist. */ + 404: { + schema: string; + }; + /** An unexpected error response. */ + default: { + schema: definitions["rpcStatus"]; + }; + }; + }; }; export type external = {}; From df769a253c6bfa0a45ce7858d1c6b5f5b24f6ff5 Mon Sep 17 00:00:00 2001 From: Keyan Zhang Date: Thu, 1 Jun 2023 15:16:16 -0700 Subject: [PATCH 3/4] Version bump and CHANGELOG --- packages/cosmjs/CHANGELOG.md | 12 ++++++++++++ packages/cosmjs/package.json | 2 +- packages/ethers/CHANGELOG.md | 12 ++++++++++++ packages/ethers/package.json | 2 +- packages/http/CHANGELOG.md | 6 ++++++ packages/http/package.json | 2 +- 6 files changed, 33 insertions(+), 3 deletions(-) diff --git a/packages/cosmjs/CHANGELOG.md b/packages/cosmjs/CHANGELOG.md index da8356ea7..08a2ef6bc 100644 --- a/packages/cosmjs/CHANGELOG.md +++ b/packages/cosmjs/CHANGELOG.md @@ -1,5 +1,17 @@ # @turnkey/cosmjs +## 0.3.0 + +### Minor Changes + +- No public facing changes + +### Patch Changes + +- Updated dependencies + - @turnkey/http@0.16.0 + - Fix `.postGetPrivateKey(...)`'s underlying path, while adding `@deprecated` `.postGetPrivateKeyBackwardsCompat(...)` for backward compatibility + ## 0.2.1 ### Patch Changes diff --git a/packages/cosmjs/package.json b/packages/cosmjs/package.json index d656457b1..23c1f5dfe 100644 --- a/packages/cosmjs/package.json +++ b/packages/cosmjs/package.json @@ -1,6 +1,6 @@ { "name": "@turnkey/cosmjs", - "version": "0.2.1", + "version": "0.3.0", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "Apache-2.0", diff --git a/packages/ethers/CHANGELOG.md b/packages/ethers/CHANGELOG.md index a25499204..4fe19da27 100644 --- a/packages/ethers/CHANGELOG.md +++ b/packages/ethers/CHANGELOG.md @@ -1,5 +1,17 @@ # @turnkey/ethers +## 0.15.0 + +### Minor Changes + +- No public facing changes + +### Patch Changes + +- Updated dependencies + - @turnkey/http@0.16.0 + - Fix `.postGetPrivateKey(...)`'s underlying path, while adding `@deprecated` `.postGetPrivateKeyBackwardsCompat(...)` for backward compatibility + ## 0.14.1 ### Patch Changes diff --git a/packages/ethers/package.json b/packages/ethers/package.json index c43c723a6..560727f96 100644 --- a/packages/ethers/package.json +++ b/packages/ethers/package.json @@ -1,6 +1,6 @@ { "name": "@turnkey/ethers", - "version": "0.14.1", + "version": "0.15.0", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "Apache-2.0", diff --git a/packages/http/CHANGELOG.md b/packages/http/CHANGELOG.md index d55be9ab5..a7b4601c5 100644 --- a/packages/http/CHANGELOG.md +++ b/packages/http/CHANGELOG.md @@ -1,5 +1,11 @@ # @turnkey/http +## 0.16.0 + +### Minor Changes + +- Fix `.postGetPrivateKey(...)`'s underlying path, while adding `@deprecated` `.postGetPrivateKeyBackwardsCompat(...)` for backward compatibility + ## 0.15.0 ### Minor Changes diff --git a/packages/http/package.json b/packages/http/package.json index cab03ec01..e6890576a 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -1,6 +1,6 @@ { "name": "@turnkey/http", - "version": "0.15.0", + "version": "0.16.0", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "Apache-2.0", From eebacc99108a2397cfe630012c083eb7bcdbcafe Mon Sep 17 00:00:00 2001 From: Keyan Zhang Date: Thu, 1 Jun 2023 15:26:49 -0700 Subject: [PATCH 4/4] Update proto again to point to the released version (06/01) --- .../public/v1/public_api.fetcher.ts | 37 ------ .../public/v1/public_api.swagger.json | 125 +----------------- .../coordinator/public/v1/public_api.types.ts | 70 +--------- 3 files changed, 2 insertions(+), 230 deletions(-) diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts index 6fbcbcd2e..e99d40ad8 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.fetcher.ts @@ -748,43 +748,6 @@ export const postSignTransaction = (input: TPostSignTransactionInput) => body: input.body, }); -/** - * `POST /public/v1/user_tags/update` - */ -type TPostUpdateUserTagBody = - operations["PublicApiService_UpdateUserTag"]["parameters"]["body"]["body"]; - -/** - * `POST /public/v1/user_tags/update` - */ -export type TPostUpdateUserTagResponse = - operations["PublicApiService_UpdateUserTag"]["responses"]["200"]["schema"]; - -/** - * `POST /public/v1/user_tags/update` - */ -export type TPostUpdateUserTagInput = { body: TPostUpdateUserTagBody }; - -/** - * Update User Tag - * - * Update user tag attributes such as its name or associated users. - * - * `POST /public/v1/user_tags/update` - */ -export const postUpdateUserTag = (input: TPostUpdateUserTagInput) => - request< - TPostUpdateUserTagResponse, - TPostUpdateUserTagBody, - never, - never, - never - >({ - uri: "/public/v1/user_tags/update", - method: "POST", - body: input.body, - }); - /** * `POST /tkhq/public/v1/query/get_private_key` * diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json index 4369253f1..9e6a79679 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.swagger.json @@ -1133,59 +1133,6 @@ } } }, - "/public/v1/user_tags/update": { - "post": { - "summary": "Update User Tag", - "description": "Update user tag attributes such as its name or associated users.", - "operationId": "PublicApiService_UpdateUserTag", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ActivityResponse" - } - }, - "403": { - "description": "Returned when the user does not have permission to access the resource.", - "schema": {} - }, - "404": { - "description": "Returned when the resource does not exist.", - "schema": { - "type": "string", - "format": "string" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1UpdateUserTagRequest" - } - } - ], - "tags": ["User Tags"], - "x-readme": { - "code-samples": [ - { - "code": "turnkey request --host coordinator-beta.turnkey.io --path /public/v1/user_tags/update --body '{\n\t\"timestampMs\": \"'\"$(date +%s)\"'000\",\n\t\"type\": \"ACTIVITY_TYPE_UPDATE_USER_TAG\",\n\t\"organizationId\": \"'\"$ORGANIZATION_ID\"'\",\n\t\"parameters\": {\n\t\t\"userTagId\": \"'\"$USER_TAG_ID\"'\",\n\t\t\"userTagName\": \"\",\n\t\t\"addUserIds\": \"\",\n\t\t\"removeUserIds\": \"\"\n\t}\n}'", - "install": "brew tap tkhq/tap \u0026\u0026 brew install turnkey", - "language": "curl", - "name": "Turnkey CLI" - } - ] - } - } - }, "/tkhq/public/v1/query/get_private_key": { "post": { "summary": "Get Private Key", @@ -1609,8 +1556,7 @@ "ACTIVITY_TYPE_CREATE_POLICY_V2", "ACTIVITY_TYPE_CREATE_POLICY_V3", "ACTIVITY_TYPE_CREATE_API_ONLY_USERS", - "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM", - "ACTIVITY_TYPE_UPDATE_USER_TAG" + "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" ], "description": "Type of Activity, such as Add User, or Sign Transaction." }, @@ -2993,9 +2939,6 @@ }, "updateRootQuorumIntent": { "$ref": "#/definitions/v1UpdateRootQuorumIntent" - }, - "updateUserTagIntent": { - "$ref": "#/definitions/v1UpdateUserTagIntent" } }, "description": "Intent object crafted by Turnkey based on the user request, used to assess the permissibility of an action.", @@ -3458,9 +3401,6 @@ }, "updateRootQuorumResult": { "$ref": "#/definitions/v1UpdateRootQuorumResult" - }, - "updateUserTagResult": { - "$ref": "#/definitions/v1UpdateUserTagResult" } }, "description": "Result of the intended action." @@ -3706,69 +3646,6 @@ "v1UpdateRootQuorumResult": { "type": "object" }, - "v1UpdateUserTagIntent": { - "type": "object", - "properties": { - "userTagId": { - "type": "string", - "description": "Unique identifier for a given User Tag.", - "title": "@inject_tag: validate:\"uuid\"" - }, - "userTagName": { - "type": "string", - "description": "The new, human-readable name for the tag with the given ID.", - "title": "@inject_tag: validate:\"required,tk_label,tk_label_length\"" - }, - "addUserIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of User IDs to add.", - "title": "@inject_tag: validate:\"dive,uuid\"" - }, - "removeUserIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of User IDs to remove.", - "title": "@inject_tag: validate:\"dive,uuid\"" - } - }, - "required": ["userTagId", "userTagName", "addUserIds", "removeUserIds"] - }, - "v1UpdateUserTagRequest": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": ["ACTIVITY_TYPE_UPDATE_USER_TAG"] - }, - "timestampMs": { - "type": "string", - "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." - }, - "organizationId": { - "type": "string", - "description": "Unique identifier for a given Organization." - }, - "parameters": { - "$ref": "#/definitions/v1UpdateUserTagIntent" - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "v1UpdateUserTagResult": { - "type": "object", - "properties": { - "userTagId": { - "type": "string", - "description": "Unique identifier for a given User Tag." - } - }, - "required": ["userTagId"] - }, "v1User": { "type": "object", "properties": { diff --git a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts index 68055a395..bdcbe0eaa 100644 --- a/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts +++ b/packages/http/src/__generated__/services/coordinator/public/v1/public_api.types.ts @@ -88,10 +88,6 @@ export type paths = { /** Sign a transaction with a Private Key */ post: operations["PublicApiService_SignTransaction"]; }; - "/public/v1/user_tags/update": { - /** Update user tag attributes such as its name or associated users. */ - post: operations["PublicApiService_UpdateUserTag"]; - }; "/tkhq/public/v1/query/get_private_key": { /** Get details about a Private Key */ post: operations["PublicApiService_GetPrivateKeyBackwardsCompat"]; @@ -322,8 +318,7 @@ export type definitions = { | "ACTIVITY_TYPE_CREATE_POLICY_V2" | "ACTIVITY_TYPE_CREATE_POLICY_V3" | "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" - | "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" - | "ACTIVITY_TYPE_UPDATE_USER_TAG"; + | "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM"; v1ApiKey: { credential: definitions["v1Credential"]; /** @description Unique identifier for a given API Key. */ @@ -947,7 +942,6 @@ export type definitions = { createPolicyIntentV3?: definitions["v1CreatePolicyIntentV3"]; createApiOnlyUsersIntent?: definitions["v1CreateApiOnlyUsersIntent"]; updateRootQuorumIntent?: definitions["v1UpdateRootQuorumIntent"]; - updateUserTagIntent?: definitions["v1UpdateUserTagIntent"]; }; v1Invitation: { /** @description Unique identifier for a given Invitation object. */ @@ -1134,7 +1128,6 @@ export type definitions = { deletePaymentMethodResult?: definitions["v1DeletePaymentMethodResult"]; createApiOnlyUsersResult?: definitions["v1CreateApiOnlyUsersResult"]; updateRootQuorumResult?: definitions["v1UpdateRootQuorumResult"]; - updateUserTagResult?: definitions["v1UpdateUserTagResult"]; }; v1SelectorV2: { subject?: string; @@ -1262,41 +1255,6 @@ export type definitions = { userIds: string[]; }; v1UpdateRootQuorumResult: { [key: string]: unknown }; - v1UpdateUserTagIntent: { - /** - * @inject_tag: validate:"uuid" - * @description Unique identifier for a given User Tag. - */ - userTagId: string; - /** - * @inject_tag: validate:"required,tk_label,tk_label_length" - * @description The new, human-readable name for the tag with the given ID. - */ - userTagName: string; - /** - * @inject_tag: validate:"dive,uuid" - * @description A list of User IDs to add. - */ - addUserIds: string[]; - /** - * @inject_tag: validate:"dive,uuid" - * @description A list of User IDs to remove. - */ - removeUserIds: string[]; - }; - v1UpdateUserTagRequest: { - /** @enum {string} */ - type: "ACTIVITY_TYPE_UPDATE_USER_TAG"; - /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */ - timestampMs: string; - /** @description Unique identifier for a given Organization. */ - organizationId: string; - parameters: definitions["v1UpdateUserTagIntent"]; - }; - v1UpdateUserTagResult: { - /** @description Unique identifier for a given User Tag. */ - userTagId: string; - }; v1User: { /** @description Unique identifier for a given User. */ userId: string; @@ -1915,32 +1873,6 @@ export type operations = { }; }; }; - /** Update user tag attributes such as its name or associated users. */ - PublicApiService_UpdateUserTag: { - parameters: { - body: { - body: definitions["v1UpdateUserTagRequest"]; - }; - }; - responses: { - /** A successful response. */ - 200: { - schema: definitions["v1ActivityResponse"]; - }; - /** Returned when the user does not have permission to access the resource. */ - 403: { - schema: unknown; - }; - /** Returned when the resource does not exist. */ - 404: { - schema: string; - }; - /** An unexpected error response. */ - default: { - schema: definitions["rpcStatus"]; - }; - }; - }; /** Get details about a Private Key */ PublicApiService_GetPrivateKeyBackwardsCompat: { parameters: {