From a4d73130b76a30065dc4ea5580ae551f64ba860c Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Tue, 26 Nov 2024 17:30:11 +0100 Subject: [PATCH] [doc] add accelerator cancel doc --- .../src/app/docs/api-docs/api-docs-data.ts | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts index cad4b47bf..1f83cabc9 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -9339,7 +9339,7 @@ export const restApiDocsData = [ fragment: "accelerator-history", title: "GET Acceleration History", description: { - default: "

Returns the user's past acceleration requests.

Pass one of the following for :status: all, requested, accelerating, mined, completed, failed. Pass true in :details to get a detailed history of the acceleration request.

" + default: "

Returns the user's past acceleration requests.

Pass one of the following for :status (required): all, requested, accelerating, mined, completed, failed.
Pass true in :details to get a detailed history of the acceleration request.

" }, urlString: "/v1/services/accelerator/history?status=:status&details=:details", showConditions: [""], @@ -9449,6 +9449,36 @@ export const restApiDocsData = [ } } }, + { + options: { officialOnly: true }, + type: "endpoint", + category: "accelerator-private", + httpRequestMethod: "POST", + fragment: "accelerator-cancel", + title: "POST Cancel Acceleration (Pro)", + description: { + default: "

Sends a request to cancel an acceleration in the accelerating status.
You can retreive eligible acceleration id using the history endpoint GET /api/v1/services/accelerator/history?status=accelerating." + }, + urlString: "/v1/services/accelerator/cancel", + showConditions: [""], + showJsExamples: showJsExamplesDefaultFalse, + codeExample: { + default: { + codeTemplate: { + curl: `%{1}" "[[hostname]][[baseNetworkUrl]]/api/v1/services/accelerator/cancel`, //custom interpolation technique handled in replaceCurlPlaceholder() + commonJS: ``, + esModule: `` + }, + codeSampleMainnet: { + esModule: [], + commonJS: [], + curl: ["id=42"], + headers: "X-Mempool-Auth: stacksats", + response: `HTTP/1.1 200 OK`, + }, + } + } + }, ]; export const faqData = [