From 8f01e01fd2a6bf9bc60d3f97d93058b968cf6159 Mon Sep 17 00:00:00 2001 From: Andrew Jiang Date: Thu, 8 Aug 2024 21:39:28 -0400 Subject: [PATCH] feat: playground settings (#1224) Co-authored-by: Rohin Bhargava Co-authored-by: Rohin Bhargava --- .../navigation/definition/__package__.yml | 34 +++- .../navigation/types/ApiPackageNode.ts | 2 + .../navigation/types/ApiReferenceNode.ts | 5 +- .../navigation/types/EndpointNode.ts | 2 + .../navigation/types/EnvironmentId.ts | 8 + .../types/PlaygroundButtonSettings.ts | 9 + .../navigation/types/PlaygroundSettings.ts | 14 ++ .../navigation/types/WebSocketNode.ts | 2 + .../api/resources/navigation/types/index.ts | 3 + .../__snapshots__/primer.test.ts.snap | 160 ++++++++++++++++-- .../ApiReferenceNavigationConverter.ts | 14 +- .../converters/NavigationConfigConverter.ts | 12 +- .../generated/api/types/ApiPackageNode.ts | 2 + .../generated/api/types/ApiReferenceNode.ts | 5 +- .../generated/api/types/EndpointNode.ts | 2 + .../generated/api/types/EnvironmentId.ts | 16 ++ .../api/types/PlaygroundButtonSettings.ts | 9 + .../generated/api/types/PlaygroundSettings.ts | 14 ++ .../generated/api/types/WebSocketNode.ts | 2 + .../navigation/generated/api/types/index.ts | 3 + .../utils/convertLoadDocsForUrlResponse.ts | 4 +- packages/ui/app/src/api-page/ApiPage.tsx | 6 +- .../endpoints/EndpointContentCodeSnippets.tsx | 18 +- .../app/src/api-page/web-socket/WebSocket.tsx | 16 +- .../src/api-playground/PlaygroundEndpoint.tsx | 4 + .../api-playground/PlaygroundEndpointPath.tsx | 3 + .../api-playground/PlaygroundWebSocket.tsx | 3 + packages/ui/app/src/atoms/apis.ts | 2 +- .../components/MaybeEnvironmentDropdown.tsx | 10 +- packages/ui/app/src/docs/DocsMainContent.tsx | 2 +- .../ui/app/src/hooks/usePlaygroundSettings.ts | 21 +++ packages/ui/app/src/resolver/ResolvedPath.ts | 2 +- .../util/convertNavigatableToResolvedPath.ts | 4 +- .../navigation/types/ApiPackageNode.d.ts | 2 + .../navigation/types/ApiReferenceNode.d.ts | 5 +- .../navigation/types/EndpointNode.d.ts | 2 + .../navigation/types/EnvironmentId.d.ts | 7 + .../navigation/types/EnvironmentId.js | 4 + .../types/PlaygroundButtonSettings.d.ts | 7 + .../types/PlaygroundButtonSettings.js | 4 + .../navigation/types/PlaygroundSettings.d.ts | 12 ++ .../navigation/types/PlaygroundSettings.js | 4 + .../navigation/types/WebSocketNode.d.ts | 2 + .../api/resources/navigation/types/index.d.ts | 3 + .../api/resources/navigation/types/index.js | 3 + 45 files changed, 422 insertions(+), 46 deletions(-) create mode 100644 packages/fdr-sdk/src/client/generated/api/resources/navigation/types/EnvironmentId.ts create mode 100644 packages/fdr-sdk/src/client/generated/api/resources/navigation/types/PlaygroundButtonSettings.ts create mode 100644 packages/fdr-sdk/src/client/generated/api/resources/navigation/types/PlaygroundSettings.ts create mode 100644 packages/fdr-sdk/src/navigation/generated/api/types/EnvironmentId.ts create mode 100644 packages/fdr-sdk/src/navigation/generated/api/types/PlaygroundButtonSettings.ts create mode 100644 packages/fdr-sdk/src/navigation/generated/api/types/PlaygroundSettings.ts create mode 100644 packages/ui/app/src/hooks/usePlaygroundSettings.ts create mode 100644 servers/fdr/src/api/generated/api/resources/navigation/types/EnvironmentId.d.ts create mode 100644 servers/fdr/src/api/generated/api/resources/navigation/types/EnvironmentId.js create mode 100644 servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundButtonSettings.d.ts create mode 100644 servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundButtonSettings.js create mode 100644 servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundSettings.d.ts create mode 100644 servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundSettings.js diff --git a/fern/apis/navigation/definition/__package__.yml b/fern/apis/navigation/definition/__package__.yml index d8ad7b5a60..5249c7587f 100644 --- a/fern/apis/navigation/definition/__package__.yml +++ b/fern/apis/navigation/definition/__package__.yml @@ -8,6 +8,9 @@ types: TabId: string PageId: string NodeId: string + EnvironmentId: + type: string + docs: Identifier for an API environment (i.e. "Prod", "Staging", "Dev") ApiDefinitionId: string EndpointId: string @@ -203,11 +206,30 @@ types: - WithRedirect properties: type: literal<"apiReference"> - disableLongScrolling: optional + paginated: + type: optional + docs: If true, long-scrolling will be disabled. showErrors: optional hideTitle: optional children: list changelog: optional + playground: + # enabled: optional (this is currently controlled in feature flags, global boolean) + type: optional + docs: Settings for the api playground that affects all endpoints. + + PlaygroundSettings: + properties: + allowedEnvironments: + type: optional> + docs: | + A list of environment IDs that are allowed to be used in the playground. + If not provided, all environments are allowed. And if the provided list is empty, the playground should be disabled. + button: optional + + PlaygroundButtonSettings: + properties: + href: optional EndpointNode: extends: @@ -218,6 +240,9 @@ types: method: HttpMethod endpointId: EndpointId isResponseStream: optional + playground: + type: optional + docs: Settings for the api playground that affect this endpoint specifically. WebSocketNode: extends: @@ -226,6 +251,9 @@ types: properties: type: literal<"webSocket"> webSocketId: WebSocketId + playground: + type: optional + docs: Settings for the api playground that affect this endpoint specifically. WebhookNode: extends: @@ -235,6 +263,7 @@ types: type: literal<"webhook"> method: HttpMethod webhookId: WebhookId + # note: webhooks do not have a playground ApiPackageNode: extends: @@ -245,6 +274,9 @@ types: properties: type: literal<"apiPackage"> children: list + playground: + type: optional + docs: Settings for the api playground that is applied only to descendants of this api package. # utilities diff --git a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/ApiPackageNode.ts b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/ApiPackageNode.ts index 9b95a5fc7d..8091c0d8c0 100644 --- a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/ApiPackageNode.ts +++ b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/ApiPackageNode.ts @@ -11,4 +11,6 @@ export interface ApiPackageNode FernRegistry.navigation.WithRedirect { type: "apiPackage"; children: FernRegistry.navigation.ApiPackageChild[]; + /** Settings for the api playground that is applied only to descendants of this api package. */ + playground?: FernRegistry.navigation.PlaygroundSettings; } diff --git a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/ApiReferenceNode.ts b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/ApiReferenceNode.ts index 84a2f65da6..6d9e6ae755 100644 --- a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/ApiReferenceNode.ts +++ b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/ApiReferenceNode.ts @@ -10,9 +10,12 @@ export interface ApiReferenceNode FernRegistry.navigation.WithApiDefinitionId, FernRegistry.navigation.WithRedirect { type: "apiReference"; - disableLongScrolling?: boolean; + /** If true, long-scrolling will be disabled. */ + paginated?: boolean; showErrors?: boolean; hideTitle?: boolean; children: FernRegistry.navigation.ApiPackageChild[]; changelog?: FernRegistry.navigation.ChangelogNode; + /** Settings for the api playground that affects all endpoints. */ + playground?: FernRegistry.navigation.PlaygroundSettings; } diff --git a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/EndpointNode.ts b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/EndpointNode.ts index 2f3b83416d..70a130891c 100644 --- a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/EndpointNode.ts +++ b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/EndpointNode.ts @@ -11,4 +11,6 @@ export interface EndpointNode method: FernRegistry.navigation.HttpMethod; endpointId: FernRegistry.navigation.EndpointId; isResponseStream?: boolean; + /** Settings for the api playground that affect this endpoint specifically. */ + playground?: FernRegistry.navigation.PlaygroundSettings; } diff --git a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/EnvironmentId.ts b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/EnvironmentId.ts new file mode 100644 index 0000000000..aaa51576b8 --- /dev/null +++ b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/EnvironmentId.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Identifier for an API environment (i.e. "Prod", "Staging", "Dev") + */ +export type EnvironmentId = string; diff --git a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/PlaygroundButtonSettings.ts b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/PlaygroundButtonSettings.ts new file mode 100644 index 0000000000..a1ad3ed655 --- /dev/null +++ b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/PlaygroundButtonSettings.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernRegistry from "../../../index"; + +export interface PlaygroundButtonSettings { + href?: FernRegistry.navigation.Url; +} diff --git a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/PlaygroundSettings.ts b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/PlaygroundSettings.ts new file mode 100644 index 0000000000..cf9258bc0a --- /dev/null +++ b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/PlaygroundSettings.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernRegistry from "../../../index"; + +export interface PlaygroundSettings { + /** + * A list of environment IDs that are allowed to be used in the playground. + * If not provided, all environments are allowed. And if the provided list is empty, the playground should be disabled. + */ + allowedEnvironments?: FernRegistry.navigation.EnvironmentId[]; + button?: FernRegistry.navigation.PlaygroundButtonSettings; +} diff --git a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/WebSocketNode.ts b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/WebSocketNode.ts index b2c066ffd1..e0cb183e65 100644 --- a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/WebSocketNode.ts +++ b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/WebSocketNode.ts @@ -9,4 +9,6 @@ export interface WebSocketNode FernRegistry.navigation.WithApiDefinitionId { type: "webSocket"; webSocketId: FernRegistry.navigation.WebSocketId; + /** Settings for the api playground that affect this endpoint specifically. */ + playground?: FernRegistry.navigation.PlaygroundSettings; } diff --git a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/index.ts b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/index.ts index 07926ce3df..6f04539073 100644 --- a/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/index.ts +++ b/packages/fdr-sdk/src/client/generated/api/resources/navigation/types/index.ts @@ -4,6 +4,7 @@ export * from "./VersionId"; export * from "./TabId"; export * from "./PageId"; export * from "./NodeId"; +export * from "./EnvironmentId"; export * from "./ApiDefinitionId"; export * from "./EndpointId"; export * from "./WebSocketId"; @@ -32,6 +33,8 @@ export * from "./ChangelogYearNode"; export * from "./ChangelogMonthNode"; export * from "./ChangelogEntryNode"; export * from "./ApiReferenceNode"; +export * from "./PlaygroundSettings"; +export * from "./PlaygroundButtonSettings"; export * from "./EndpointNode"; export * from "./WebSocketNode"; export * from "./WebhookNode"; diff --git a/packages/fdr-sdk/src/navigation/__test__/__snapshots__/primer.test.ts.snap b/packages/fdr-sdk/src/navigation/__test__/__snapshots__/primer.test.ts.snap index ef2960b625..c2cdc51aed 100644 --- a/packages/fdr-sdk/src/navigation/__test__/__snapshots__/primer.test.ts.snap +++ b/packages/fdr-sdk/src/navigation/__test__/__snapshots__/primer.test.ts.snap @@ -644,6 +644,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.retrieveClientSideToken", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/client-session-api/retrieve-client-side-token", "title": "Retrieve a client session", "type": "endpoint", @@ -657,6 +658,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.createClientSideToken", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/client-session-api/create-client-side-token", "title": "Create a client session", "type": "endpoint", @@ -670,6 +672,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.updateClientSideToken", "isResponseStream": false, "method": "PATCH", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/client-session-api/update-client-side-token", "title": "Update client session", "type": "endpoint", @@ -680,6 +683,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_clientSessionApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/client-session-api/retrieve-client-side-token", "slug": "docs/api/v2.2/api-reference/client-session-api", "title": "Client Session API", @@ -698,6 +702,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.listPayments", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/list-payments", "title": "Search & list payments", "type": "endpoint", @@ -711,6 +716,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.createPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/create-payment", "title": "Create a payment", "type": "endpoint", @@ -724,6 +730,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.authorizePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/authorize-payment", "title": "Authorize a payment", "type": "endpoint", @@ -737,6 +744,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.capturePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/capture-payment", "title": "Capture a payment", "type": "endpoint", @@ -750,6 +758,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.cancelPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/cancel-payment", "title": "Cancel a payment", "type": "endpoint", @@ -763,6 +772,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.refundPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/refund-payment", "title": "Refund a payment", "type": "endpoint", @@ -776,6 +786,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.resumePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/resume-payment", "title": "Resume a payment", "type": "endpoint", @@ -789,6 +800,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.adjustAuthorization", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/adjust-authorization", "title": "Adjust authorized amount", "type": "endpoint", @@ -802,6 +814,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.getPaymentById", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/get-payment-by-id", "title": "Get a payment", "type": "endpoint", @@ -812,6 +825,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/payments-api/list-payments", "slug": "docs/api/v2.2/api-reference/payments-api", "title": "Payments API", @@ -830,6 +844,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.vault_payment_method_payment_methods__token__vault_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "title": "Save a payment method token", "type": "endpoint", @@ -843,6 +858,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.get_payment_methods_payment_methods_get", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payment-methods-api/get-payment-methods-payment-methods-get", "title": "List saved payment methods", "type": "endpoint", @@ -856,6 +872,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.delete_payment_method_payment_methods__token__delete", "isResponseStream": false, "method": "DELETE", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payment-methods-api/delete-payment-method-payment-methods-token-delete", "title": "Delete a saved payment method", "type": "endpoint", @@ -869,6 +886,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.set_payment_method_default_payment_methods__token__default_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payment-methods-api/set-payment-method-default-payment-methods-token-default-post", "title": "Update the default saved payment method", "type": "endpoint", @@ -879,6 +897,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_paymentMethodsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "slug": "docs/api/v2.2/api-reference/payment-methods-api", "title": "Payment Methods API", @@ -897,6 +916,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_observabilityApiBeta.subpackage_observabilityApiBeta.external_payment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/observability-api-beta/external-payment", "title": "Create an external payment", "type": "endpoint", @@ -910,6 +930,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_observabilityApiBeta.subpackage_observabilityApiBeta.external_payment_update", "isResponseStream": false, "method": "PATCH", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/observability-api-beta/external-payment-update", "title": "Update an external payment", "type": "endpoint", @@ -920,6 +941,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_observabilityApiBeta", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/observability-api-beta/external-payment", "slug": "docs/api/v2.2/api-reference/observability-api-beta", "title": "Observability API (Beta)", @@ -938,6 +960,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_loyaltyApi.subpackage_loyaltyApi.get_loyalty_customer", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/loyalty-api/get-loyalty-customer", "title": "Get a loyalty customer's points balance", "type": "endpoint", @@ -951,6 +974,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_loyaltyApi.subpackage_loyaltyApi.get_loyalty_customer_transactions", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/loyalty-api/get-loyalty-customer-transactions", "title": "List the transactions for a customer", "type": "endpoint", @@ -964,6 +988,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_loyaltyApi.subpackage_loyaltyApi.post_loyalty_transaction", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/loyalty-api/post-loyalty-transaction", "title": "Create a loyalty transaction", "type": "endpoint", @@ -974,19 +999,21 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.api-reference.subpackage_loyaltyApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/loyalty-api/get-loyalty-customer", "slug": "docs/api/v2.2/api-reference/loyalty-api", "title": "Loyalty API", "type": "apiPackage", }, ], - "disableLongScrolling": undefined, "hidden": undefined, "hideTitle": undefined, "icon": undefined, "id": "root..v2.2.uv.api-reference", "noindex": undefined, "overviewPageId": undefined, + "paginated": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/client-session-api/retrieve-client-side-token", "showErrors": true, "slug": "docs/api/v2.2/api-reference", @@ -1032,6 +1059,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.webhooks.subpackage_paymentWebhooks", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/webhooks/payment-webhooks/payment-status-webhook-event", "slug": "docs/api/v2.2/webhooks/payment-webhooks", "title": "Payment Webhooks", @@ -1071,19 +1099,21 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.2.uv.webhooks.subpackage_disputeChargebacksWebhooks", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/webhooks/dispute-chargebacks-webhooks/dispute-open-webhook-event", "slug": "docs/api/v2.2/webhooks/dispute-chargebacks-webhooks", "title": "Dispute Chargebacks Webhooks", "type": "apiPackage", }, ], - "disableLongScrolling": undefined, "hidden": undefined, "hideTitle": undefined, "icon": undefined, "id": "root..v2.2.uv.webhooks", "noindex": undefined, "overviewPageId": undefined, + "paginated": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/webhooks/payment-webhooks/payment-status-webhook-event", "showErrors": false, "slug": "docs/api/v2.2/webhooks", @@ -1201,6 +1231,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.retrieveClientSideToken", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/client-session-api/retrieve-client-side-token", "title": "Retrieve a client session", "type": "endpoint", @@ -1214,6 +1245,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.createClientSideToken", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/client-session-api/create-client-side-token", "title": "Create a client session", "type": "endpoint", @@ -1227,6 +1259,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.updateClientSideToken", "isResponseStream": false, "method": "PATCH", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/client-session-api/update-client-side-token", "title": "Update client session", "type": "endpoint", @@ -1237,6 +1270,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_clientSessionApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/api-reference/client-session-api/retrieve-client-side-token", "slug": "docs/api/v2.1/api-reference/client-session-api", "title": "Client Session API", @@ -1255,6 +1289,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.listPayments", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/list-payments", "title": "Search & list payments", "type": "endpoint", @@ -1268,6 +1303,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.createPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/create-payment", "title": "Create a payment", "type": "endpoint", @@ -1281,6 +1317,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.capturePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/capture-payment", "title": "Capture a payment", "type": "endpoint", @@ -1294,6 +1331,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.cancelPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/cancel-payment", "title": "Cancel a payment", "type": "endpoint", @@ -1307,6 +1345,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.refundPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/refund-payment", "title": "Refund a payment", "type": "endpoint", @@ -1320,6 +1359,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.resumePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/resume-payment", "title": "Resume a payment", "type": "endpoint", @@ -1333,6 +1373,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.getPaymentById", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/get-payment-by-id", "title": "Get a payment", "type": "endpoint", @@ -1343,6 +1384,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/api-reference/payments-api/list-payments", "slug": "docs/api/v2.1/api-reference/payments-api", "title": "Payments API", @@ -1361,6 +1403,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.vault_payment_method_payment_methods__token__vault_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "title": "Save a payment method token", "type": "endpoint", @@ -1374,6 +1417,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.get_payment_methods_payment_methods_get", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payment-methods-api/get-payment-methods-payment-methods-get", "title": "List saved payment methods", "type": "endpoint", @@ -1387,6 +1431,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.delete_payment_method_payment_methods__token__delete", "isResponseStream": false, "method": "DELETE", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payment-methods-api/delete-payment-method-payment-methods-token-delete", "title": "Delete a saved payment method", "type": "endpoint", @@ -1400,6 +1445,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.set_payment_method_default_payment_methods__token__default_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payment-methods-api/set-payment-method-default-payment-methods-token-default-post", "title": "Update the default saved payment method", "type": "endpoint", @@ -1410,19 +1456,21 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.api-reference.subpackage_paymentMethodsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "slug": "docs/api/v2.1/api-reference/payment-methods-api", "title": "Payment Methods API", "type": "apiPackage", }, ], - "disableLongScrolling": undefined, "hidden": undefined, "hideTitle": undefined, "icon": undefined, "id": "root..v2.1.uv.api-reference", "noindex": undefined, "overviewPageId": undefined, + "paginated": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/api-reference/client-session-api/retrieve-client-side-token", "showErrors": true, "slug": "docs/api/v2.1/api-reference", @@ -1447,6 +1495,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.webhooks.subpackage_paymentWebhooks.subpackage_paymentWebhooks.payment_status_webhook_event", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/webhooks/payment-webhooks/payment-status-webhook-event", "title": "Payment Status Update", "type": "endpoint", @@ -1460,6 +1509,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.webhooks.subpackage_paymentWebhooks.subpackage_paymentWebhooks.payment_refund_webhook_event", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/webhooks/payment-webhooks/payment-refund-webhook-event", "title": "Payment Refund", "type": "endpoint", @@ -1470,6 +1520,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.webhooks.subpackage_paymentWebhooks", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/webhooks/payment-webhooks/payment-status-webhook-event", "slug": "docs/api/v2.1/webhooks/payment-webhooks", "title": "Payment Webhooks", @@ -1488,6 +1539,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.webhooks.subpackage_disputeChargebacksWebhooks.subpackage_disputeChargebacksWebhooks.dispute_open_webhook_event", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/webhooks/dispute-chargebacks-webhooks/dispute-open-webhook-event", "title": "Dispute Open", "type": "endpoint", @@ -1498,19 +1550,21 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.1.uv.webhooks.subpackage_disputeChargebacksWebhooks", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/webhooks/dispute-chargebacks-webhooks/dispute-open-webhook-event", "slug": "docs/api/v2.1/webhooks/dispute-chargebacks-webhooks", "title": "Dispute Chargebacks Webhooks", "type": "apiPackage", }, ], - "disableLongScrolling": undefined, "hidden": undefined, "hideTitle": undefined, "icon": undefined, "id": "root..v2.1.uv.webhooks", "noindex": undefined, "overviewPageId": undefined, + "paginated": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/webhooks/payment-webhooks/payment-status-webhook-event", "showErrors": false, "slug": "docs/api/v2.1/webhooks", @@ -1628,6 +1682,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.createClientSideToken", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/client-session-api/create-client-side-token", "title": "Create a client session", "type": "endpoint", @@ -1638,6 +1693,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_clientSessionApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2/api-reference/client-session-api/create-client-side-token", "slug": "docs/api/v2/api-reference/client-session-api", "title": "Client Session API", @@ -1656,6 +1712,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.listPayments", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/list-payments", "title": "Search & list payments", "type": "endpoint", @@ -1669,6 +1726,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.createPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/create-payment", "title": "Create a payment", "type": "endpoint", @@ -1682,6 +1740,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.capturePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/capture-payment", "title": "Capture a payment", "type": "endpoint", @@ -1695,6 +1754,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.cancelPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/cancel-payment", "title": "Cancel a payment", "type": "endpoint", @@ -1708,6 +1768,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.refundPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/refund-payment", "title": "Refund a payment", "type": "endpoint", @@ -1721,6 +1782,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.resumePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/resume-payment", "title": "Resume a payment", "type": "endpoint", @@ -1734,6 +1796,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.getPaymentById", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/get-payment-by-id", "title": "Get a payment", "type": "endpoint", @@ -1744,6 +1807,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2/api-reference/payments-api/list-payments", "slug": "docs/api/v2/api-reference/payments-api", "title": "Payments API", @@ -1762,6 +1826,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.vault_payment_method_payment_methods__token__vault_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "title": "Save a payment method token", "type": "endpoint", @@ -1775,6 +1840,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.get_payment_methods_payment_methods_get", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2/api-reference/payment-methods-api/get-payment-methods-payment-methods-get", "title": "List saved payment methods", "type": "endpoint", @@ -1788,6 +1854,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.delete_payment_method_payment_methods__token__delete", "isResponseStream": false, "method": "DELETE", + "playground": undefined, "slug": "docs/api/v2/api-reference/payment-methods-api/delete-payment-method-payment-methods-token-delete", "title": "Delete a saved payment method", "type": "endpoint", @@ -1801,6 +1868,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.set_payment_method_default_payment_methods__token__default_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payment-methods-api/set-payment-method-default-payment-methods-token-default-post", "title": "Update the default saved payment method", "type": "endpoint", @@ -1811,19 +1879,21 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/introdu "id": "root..v2.uv.api-reference.subpackage_paymentMethodsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "slug": "docs/api/v2/api-reference/payment-methods-api", "title": "Payment Methods API", "type": "apiPackage", }, ], - "disableLongScrolling": undefined, "hidden": undefined, "hideTitle": undefined, "icon": undefined, "id": "root..v2.uv.api-reference", "noindex": undefined, "overviewPageId": undefined, + "paginated": undefined, + "playground": undefined, "pointsTo": "docs/api/v2/api-reference/client-session-api/create-client-side-token", "showErrors": true, "slug": "docs/api/v2/api-reference", @@ -2353,6 +2423,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.retrieveClientSideToken", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/client-session-api/retrieve-client-side-token", "title": "Retrieve a client session", "type": "endpoint", @@ -2366,6 +2437,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.createClientSideToken", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/client-session-api/create-client-side-token", "title": "Create a client session", "type": "endpoint", @@ -2379,6 +2451,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.updateClientSideToken", "isResponseStream": false, "method": "PATCH", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/client-session-api/update-client-side-token", "title": "Update client session", "type": "endpoint", @@ -2389,6 +2462,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_clientSessionApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/client-session-api/retrieve-client-side-token", "slug": "docs/api/v2.2/api-reference/client-session-api", "title": "Client Session API", @@ -2407,6 +2481,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.listPayments", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/list-payments", "title": "Search & list payments", "type": "endpoint", @@ -2420,6 +2495,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.createPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/create-payment", "title": "Create a payment", "type": "endpoint", @@ -2433,6 +2509,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.authorizePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/authorize-payment", "title": "Authorize a payment", "type": "endpoint", @@ -2446,6 +2523,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.capturePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/capture-payment", "title": "Capture a payment", "type": "endpoint", @@ -2459,6 +2537,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.cancelPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/cancel-payment", "title": "Cancel a payment", "type": "endpoint", @@ -2472,6 +2551,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.refundPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/refund-payment", "title": "Refund a payment", "type": "endpoint", @@ -2485,6 +2565,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.resumePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/resume-payment", "title": "Resume a payment", "type": "endpoint", @@ -2498,6 +2579,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.adjustAuthorization", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/adjust-authorization", "title": "Adjust authorized amount", "type": "endpoint", @@ -2511,6 +2593,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.getPaymentById", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payments-api/get-payment-by-id", "title": "Get a payment", "type": "endpoint", @@ -2521,6 +2604,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/payments-api/list-payments", "slug": "docs/api/v2.2/api-reference/payments-api", "title": "Payments API", @@ -2539,6 +2623,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.vault_payment_method_payment_methods__token__vault_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "title": "Save a payment method token", "type": "endpoint", @@ -2552,6 +2637,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.get_payment_methods_payment_methods_get", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payment-methods-api/get-payment-methods-payment-methods-get", "title": "List saved payment methods", "type": "endpoint", @@ -2565,6 +2651,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.delete_payment_method_payment_methods__token__delete", "isResponseStream": false, "method": "DELETE", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payment-methods-api/delete-payment-method-payment-methods-token-delete", "title": "Delete a saved payment method", "type": "endpoint", @@ -2578,6 +2665,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.set_payment_method_default_payment_methods__token__default_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/payment-methods-api/set-payment-method-default-payment-methods-token-default-post", "title": "Update the default saved payment method", "type": "endpoint", @@ -2588,6 +2676,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_paymentMethodsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "slug": "docs/api/v2.2/api-reference/payment-methods-api", "title": "Payment Methods API", @@ -2606,6 +2695,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_observabilityApiBeta.subpackage_observabilityApiBeta.external_payment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/observability-api-beta/external-payment", "title": "Create an external payment", "type": "endpoint", @@ -2619,6 +2709,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_observabilityApiBeta.subpackage_observabilityApiBeta.external_payment_update", "isResponseStream": false, "method": "PATCH", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/observability-api-beta/external-payment-update", "title": "Update an external payment", "type": "endpoint", @@ -2629,6 +2720,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_observabilityApiBeta", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/observability-api-beta/external-payment", "slug": "docs/api/v2.2/api-reference/observability-api-beta", "title": "Observability API (Beta)", @@ -2647,6 +2739,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_loyaltyApi.subpackage_loyaltyApi.get_loyalty_customer", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/loyalty-api/get-loyalty-customer", "title": "Get a loyalty customer's points balance", "type": "endpoint", @@ -2660,6 +2753,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_loyaltyApi.subpackage_loyaltyApi.get_loyalty_customer_transactions", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/loyalty-api/get-loyalty-customer-transactions", "title": "List the transactions for a customer", "type": "endpoint", @@ -2673,6 +2767,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_loyaltyApi.subpackage_loyaltyApi.post_loyalty_transaction", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.2/api-reference/loyalty-api/post-loyalty-transaction", "title": "Create a loyalty transaction", "type": "endpoint", @@ -2683,19 +2778,21 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.api-reference.subpackage_loyaltyApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/loyalty-api/get-loyalty-customer", "slug": "docs/api/v2.2/api-reference/loyalty-api", "title": "Loyalty API", "type": "apiPackage", }, ], - "disableLongScrolling": undefined, "hidden": undefined, "hideTitle": undefined, "icon": undefined, "id": "root..v2.2.uv.api-reference", "noindex": undefined, "overviewPageId": undefined, + "paginated": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/api-reference/client-session-api/retrieve-client-side-token", "showErrors": true, "slug": "docs/api/v2.2/api-reference", @@ -2741,6 +2838,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.webhooks.subpackage_paymentWebhooks", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/webhooks/payment-webhooks/payment-status-webhook-event", "slug": "docs/api/v2.2/webhooks/payment-webhooks", "title": "Payment Webhooks", @@ -2780,19 +2878,21 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.2.uv.webhooks.subpackage_disputeChargebacksWebhooks", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/webhooks/dispute-chargebacks-webhooks/dispute-open-webhook-event", "slug": "docs/api/v2.2/webhooks/dispute-chargebacks-webhooks", "title": "Dispute Chargebacks Webhooks", "type": "apiPackage", }, ], - "disableLongScrolling": undefined, "hidden": undefined, "hideTitle": undefined, "icon": undefined, "id": "root..v2.2.uv.webhooks", "noindex": undefined, "overviewPageId": undefined, + "paginated": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.2/webhooks/payment-webhooks/payment-status-webhook-event", "showErrors": false, "slug": "docs/api/v2.2/webhooks", @@ -2910,6 +3010,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.retrieveClientSideToken", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/client-session-api/retrieve-client-side-token", "title": "Retrieve a client session", "type": "endpoint", @@ -2923,6 +3024,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.createClientSideToken", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/client-session-api/create-client-side-token", "title": "Create a client session", "type": "endpoint", @@ -2936,6 +3038,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.updateClientSideToken", "isResponseStream": false, "method": "PATCH", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/client-session-api/update-client-side-token", "title": "Update client session", "type": "endpoint", @@ -2946,6 +3049,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_clientSessionApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/api-reference/client-session-api/retrieve-client-side-token", "slug": "docs/api/v2.1/api-reference/client-session-api", "title": "Client Session API", @@ -2964,6 +3068,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.listPayments", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/list-payments", "title": "Search & list payments", "type": "endpoint", @@ -2977,6 +3082,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.createPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/create-payment", "title": "Create a payment", "type": "endpoint", @@ -2990,6 +3096,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.capturePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/capture-payment", "title": "Capture a payment", "type": "endpoint", @@ -3003,6 +3110,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.cancelPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/cancel-payment", "title": "Cancel a payment", "type": "endpoint", @@ -3016,6 +3124,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.refundPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/refund-payment", "title": "Refund a payment", "type": "endpoint", @@ -3029,6 +3138,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.resumePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/resume-payment", "title": "Resume a payment", "type": "endpoint", @@ -3042,6 +3152,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.getPaymentById", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payments-api/get-payment-by-id", "title": "Get a payment", "type": "endpoint", @@ -3052,6 +3163,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/api-reference/payments-api/list-payments", "slug": "docs/api/v2.1/api-reference/payments-api", "title": "Payments API", @@ -3070,6 +3182,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.vault_payment_method_payment_methods__token__vault_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "title": "Save a payment method token", "type": "endpoint", @@ -3083,6 +3196,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.get_payment_methods_payment_methods_get", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payment-methods-api/get-payment-methods-payment-methods-get", "title": "List saved payment methods", "type": "endpoint", @@ -3096,6 +3210,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.delete_payment_method_payment_methods__token__delete", "isResponseStream": false, "method": "DELETE", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payment-methods-api/delete-payment-method-payment-methods-token-delete", "title": "Delete a saved payment method", "type": "endpoint", @@ -3109,6 +3224,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.set_payment_method_default_payment_methods__token__default_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/api-reference/payment-methods-api/set-payment-method-default-payment-methods-token-default-post", "title": "Update the default saved payment method", "type": "endpoint", @@ -3119,19 +3235,21 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.api-reference.subpackage_paymentMethodsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "slug": "docs/api/v2.1/api-reference/payment-methods-api", "title": "Payment Methods API", "type": "apiPackage", }, ], - "disableLongScrolling": undefined, "hidden": undefined, "hideTitle": undefined, "icon": undefined, "id": "root..v2.1.uv.api-reference", "noindex": undefined, "overviewPageId": undefined, + "paginated": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/api-reference/client-session-api/retrieve-client-side-token", "showErrors": true, "slug": "docs/api/v2.1/api-reference", @@ -3156,6 +3274,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.webhooks.subpackage_paymentWebhooks.subpackage_paymentWebhooks.payment_status_webhook_event", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/webhooks/payment-webhooks/payment-status-webhook-event", "title": "Payment Status Update", "type": "endpoint", @@ -3169,6 +3288,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.webhooks.subpackage_paymentWebhooks.subpackage_paymentWebhooks.payment_refund_webhook_event", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/webhooks/payment-webhooks/payment-refund-webhook-event", "title": "Payment Refund", "type": "endpoint", @@ -3179,6 +3299,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.webhooks.subpackage_paymentWebhooks", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/webhooks/payment-webhooks/payment-status-webhook-event", "slug": "docs/api/v2.1/webhooks/payment-webhooks", "title": "Payment Webhooks", @@ -3197,6 +3318,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.webhooks.subpackage_disputeChargebacksWebhooks.subpackage_disputeChargebacksWebhooks.dispute_open_webhook_event", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2.1/webhooks/dispute-chargebacks-webhooks/dispute-open-webhook-event", "title": "Dispute Open", "type": "endpoint", @@ -3207,19 +3329,21 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.1.uv.webhooks.subpackage_disputeChargebacksWebhooks", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/webhooks/dispute-chargebacks-webhooks/dispute-open-webhook-event", "slug": "docs/api/v2.1/webhooks/dispute-chargebacks-webhooks", "title": "Dispute Chargebacks Webhooks", "type": "apiPackage", }, ], - "disableLongScrolling": undefined, "hidden": undefined, "hideTitle": undefined, "icon": undefined, "id": "root..v2.1.uv.webhooks", "noindex": undefined, "overviewPageId": undefined, + "paginated": undefined, + "playground": undefined, "pointsTo": "docs/api/v2.1/webhooks/payment-webhooks/payment-status-webhook-event", "showErrors": false, "slug": "docs/api/v2.1/webhooks", @@ -3337,6 +3461,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_clientSessionApi.subpackage_clientSessionApi.createClientSideToken", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/client-session-api/create-client-side-token", "title": "Create a client session", "type": "endpoint", @@ -3347,6 +3472,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_clientSessionApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2/api-reference/client-session-api/create-client-side-token", "slug": "docs/api/v2/api-reference/client-session-api", "title": "Client Session API", @@ -3365,6 +3491,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.listPayments", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/list-payments", "title": "Search & list payments", "type": "endpoint", @@ -3378,6 +3505,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.createPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/create-payment", "title": "Create a payment", "type": "endpoint", @@ -3391,6 +3519,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.capturePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/capture-payment", "title": "Capture a payment", "type": "endpoint", @@ -3404,6 +3533,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.cancelPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/cancel-payment", "title": "Cancel a payment", "type": "endpoint", @@ -3417,6 +3547,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.refundPayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/refund-payment", "title": "Refund a payment", "type": "endpoint", @@ -3430,6 +3561,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.resumePayment", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/resume-payment", "title": "Resume a payment", "type": "endpoint", @@ -3443,6 +3575,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentsApi.subpackage_paymentsApi.getPaymentById", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2/api-reference/payments-api/get-payment-by-id", "title": "Get a payment", "type": "endpoint", @@ -3453,6 +3586,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2/api-reference/payments-api/list-payments", "slug": "docs/api/v2/api-reference/payments-api", "title": "Payments API", @@ -3471,6 +3605,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.vault_payment_method_payment_methods__token__vault_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "title": "Save a payment method token", "type": "endpoint", @@ -3484,6 +3619,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.get_payment_methods_payment_methods_get", "isResponseStream": false, "method": "GET", + "playground": undefined, "slug": "docs/api/v2/api-reference/payment-methods-api/get-payment-methods-payment-methods-get", "title": "List saved payment methods", "type": "endpoint", @@ -3497,6 +3633,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.delete_payment_method_payment_methods__token__delete", "isResponseStream": false, "method": "DELETE", + "playground": undefined, "slug": "docs/api/v2/api-reference/payment-methods-api/delete-payment-method-payment-methods-token-delete", "title": "Delete a saved payment method", "type": "endpoint", @@ -3510,6 +3647,7 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentMethodsApi.subpackage_paymentMethodsApi.set_payment_method_default_payment_methods__token__default_post", "isResponseStream": false, "method": "POST", + "playground": undefined, "slug": "docs/api/v2/api-reference/payment-methods-api/set-payment-method-default-payment-methods-token-default-post", "title": "Update the default saved payment method", "type": "endpoint", @@ -3520,19 +3658,21 @@ exports[`getNavigationRoot > primer > gets navigation root for /docs/api/v2.1/ap "id": "root..v2.uv.api-reference.subpackage_paymentMethodsApi", "noindex": undefined, "overviewPageId": undefined, + "playground": undefined, "pointsTo": "docs/api/v2/api-reference/payment-methods-api/vault-payment-method-payment-methods-token-vault-post", "slug": "docs/api/v2/api-reference/payment-methods-api", "title": "Payment Methods API", "type": "apiPackage", }, ], - "disableLongScrolling": undefined, "hidden": undefined, "hideTitle": undefined, "icon": undefined, "id": "root..v2.uv.api-reference", "noindex": undefined, "overviewPageId": undefined, + "paginated": undefined, + "playground": undefined, "pointsTo": "docs/api/v2/api-reference/client-session-api/create-client-side-token", "showErrors": true, "slug": "docs/api/v2/api-reference", diff --git a/packages/fdr-sdk/src/navigation/converters/ApiReferenceNavigationConverter.ts b/packages/fdr-sdk/src/navigation/converters/ApiReferenceNavigationConverter.ts index 5d0dc4e3d2..07b29b6266 100644 --- a/packages/fdr-sdk/src/navigation/converters/ApiReferenceNavigationConverter.ts +++ b/packages/fdr-sdk/src/navigation/converters/ApiReferenceNavigationConverter.ts @@ -23,7 +23,7 @@ export class ApiReferenceNavigationConverter { idgen?: NodeIdGenerator, lexicographic?: boolean, disableEndpointPairs?: boolean, - disableLongScrolling?: boolean, + paginated?: boolean, ) { return new ApiReferenceNavigationConverter( apiSection, @@ -34,7 +34,7 @@ export class ApiReferenceNavigationConverter { idgen ?? new NodeIdGenerator(), lexicographic, disableEndpointPairs, - disableLongScrolling, + paginated, ).convert(); } @@ -54,7 +54,7 @@ export class ApiReferenceNavigationConverter { idgen: NodeIdGenerator, private lexicographic: boolean = false, private disableEndpointPairs: boolean = false, - private disableLongScrolling: boolean | undefined, + private paginated: boolean | undefined, ) { this.apiDefinitionId = FernNavigation.ApiDefinitionId(api.id); this.#holder = ApiDefinitionHolder.create(api); @@ -95,8 +95,7 @@ export class ApiReferenceNavigationConverter { apiDefinitionId: FernNavigation.ApiDefinitionId(this.apiSection.api), overviewPageId, noindex, - disableLongScrolling: - this.disableLongScrolling ?? (this.apiSection.longScrolling === false ? true : undefined), + paginated: this.paginated ?? (this.apiSection.longScrolling === false ? true : undefined), slug: slug.get(), icon: this.apiSection.icon, hidden: this.apiSection.hidden, @@ -106,6 +105,7 @@ export class ApiReferenceNavigationConverter { children, availability: undefined, pointsTo, + playground: undefined, }; }); } @@ -136,6 +136,7 @@ export class ApiReferenceNavigationConverter { apiDefinitionId: this.apiDefinitionId, availability: convertAvailability(endpoint.availability), isResponseStream: endpoint.response?.type.type === "stream", + playground: undefined, }; }); } @@ -155,6 +156,7 @@ export class ApiReferenceNavigationConverter { hidden: undefined, apiDefinitionId: this.apiDefinitionId, availability: convertAvailability(webSocket.availability), + playground: undefined, })); } @@ -251,6 +253,7 @@ export class ApiReferenceNavigationConverter { availability: undefined, apiDefinitionId: this.apiDefinitionId, pointsTo, + playground: undefined, }; }); if (child != null) { @@ -389,6 +392,7 @@ export class ApiReferenceNavigationConverter { availability: undefined, apiDefinitionId: this.apiDefinitionId, pointsTo: followRedirects(convertedItems), + playground: undefined, }); }); }, diff --git a/packages/fdr-sdk/src/navigation/converters/NavigationConfigConverter.ts b/packages/fdr-sdk/src/navigation/converters/NavigationConfigConverter.ts index 98f39305a8..92fe5f4b7c 100644 --- a/packages/fdr-sdk/src/navigation/converters/NavigationConfigConverter.ts +++ b/packages/fdr-sdk/src/navigation/converters/NavigationConfigConverter.ts @@ -24,7 +24,7 @@ export class NavigationConfigConverter { private basePath: string | undefined, private lexicographic?: boolean, private disableEndpointPairs?: boolean, - private disableLongScrolling?: boolean, + private paginated?: boolean, ) {} public static convert( @@ -36,7 +36,7 @@ export class NavigationConfigConverter { basePath: string | undefined, lexicographic?: boolean, disableEndpointPairs?: boolean, - disableLongScrolling?: boolean, + paginated?: boolean, ): FernNavigation.RootNode { return new NavigationConfigConverter( title, @@ -47,7 +47,7 @@ export class NavigationConfigConverter { basePath, lexicographic, disableEndpointPairs, - disableLongScrolling, + paginated, ).convert(); } @@ -312,7 +312,7 @@ export class NavigationConfigConverter { this.#idgen, this.lexicographic, this.disableEndpointPairs, - this.disableLongScrolling, + this.paginated, ); }, changelog: (changelog) => @@ -326,8 +326,8 @@ export class NavigationConfigConverter { // Note: apiSection.node is imported from `navigation`, and is guaranteed to be a FernNavigation.ApiReferenceNode apiV2: (apiSection) => { const node = apiSection.node as unknown as FernNavigation.ApiReferenceNode; - if (this.disableLongScrolling) { - node.disableLongScrolling = true; + if (this.paginated) { + node.paginated = true; } return node; }, diff --git a/packages/fdr-sdk/src/navigation/generated/api/types/ApiPackageNode.ts b/packages/fdr-sdk/src/navigation/generated/api/types/ApiPackageNode.ts index 1d77cb944a..4543636fe0 100644 --- a/packages/fdr-sdk/src/navigation/generated/api/types/ApiPackageNode.ts +++ b/packages/fdr-sdk/src/navigation/generated/api/types/ApiPackageNode.ts @@ -11,4 +11,6 @@ export interface ApiPackageNode FernNavigation.WithRedirect { type: "apiPackage"; children: FernNavigation.ApiPackageChild[]; + /** Settings for the api playground that is applied only to descendants of this api package. */ + playground: FernNavigation.PlaygroundSettings | undefined; } diff --git a/packages/fdr-sdk/src/navigation/generated/api/types/ApiReferenceNode.ts b/packages/fdr-sdk/src/navigation/generated/api/types/ApiReferenceNode.ts index d05f4eecd3..c3cf9cfaa9 100644 --- a/packages/fdr-sdk/src/navigation/generated/api/types/ApiReferenceNode.ts +++ b/packages/fdr-sdk/src/navigation/generated/api/types/ApiReferenceNode.ts @@ -10,9 +10,12 @@ export interface ApiReferenceNode FernNavigation.WithApiDefinitionId, FernNavigation.WithRedirect { type: "apiReference"; - disableLongScrolling: boolean | undefined; + /** If true, long-scrolling will be disabled. */ + paginated: boolean | undefined; showErrors: boolean | undefined; hideTitle: boolean | undefined; children: FernNavigation.ApiPackageChild[]; changelog: FernNavigation.ChangelogNode | undefined; + /** Settings for the api playground that affects all endpoints. */ + playground: FernNavigation.PlaygroundSettings | undefined; } diff --git a/packages/fdr-sdk/src/navigation/generated/api/types/EndpointNode.ts b/packages/fdr-sdk/src/navigation/generated/api/types/EndpointNode.ts index a87663f9ea..a731a37f28 100644 --- a/packages/fdr-sdk/src/navigation/generated/api/types/EndpointNode.ts +++ b/packages/fdr-sdk/src/navigation/generated/api/types/EndpointNode.ts @@ -9,4 +9,6 @@ export interface EndpointNode extends FernNavigation.WithNodeMetadata, FernNavig method: FernNavigation.HttpMethod; endpointId: FernNavigation.EndpointId; isResponseStream: boolean | undefined; + /** Settings for the api playground that affect this endpoint specifically. */ + playground: FernNavigation.PlaygroundSettings | undefined; } diff --git a/packages/fdr-sdk/src/navigation/generated/api/types/EnvironmentId.ts b/packages/fdr-sdk/src/navigation/generated/api/types/EnvironmentId.ts new file mode 100644 index 0000000000..85727da601 --- /dev/null +++ b/packages/fdr-sdk/src/navigation/generated/api/types/EnvironmentId.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernNavigation from "../index"; + +/** + * Identifier for an API environment (i.e. "Prod", "Staging", "Dev") + */ +export type EnvironmentId = string & { + EnvironmentId: void; +}; + +export function EnvironmentId(value: string): FernNavigation.EnvironmentId { + return value as unknown as FernNavigation.EnvironmentId; +} diff --git a/packages/fdr-sdk/src/navigation/generated/api/types/PlaygroundButtonSettings.ts b/packages/fdr-sdk/src/navigation/generated/api/types/PlaygroundButtonSettings.ts new file mode 100644 index 0000000000..18dfcb17e0 --- /dev/null +++ b/packages/fdr-sdk/src/navigation/generated/api/types/PlaygroundButtonSettings.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernNavigation from "../index"; + +export interface PlaygroundButtonSettings { + href: FernNavigation.Url | undefined; +} diff --git a/packages/fdr-sdk/src/navigation/generated/api/types/PlaygroundSettings.ts b/packages/fdr-sdk/src/navigation/generated/api/types/PlaygroundSettings.ts new file mode 100644 index 0000000000..65e74e4297 --- /dev/null +++ b/packages/fdr-sdk/src/navigation/generated/api/types/PlaygroundSettings.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernNavigation from "../index"; + +export interface PlaygroundSettings { + /** + * A list of environment IDs that are allowed to be used in the playground. + * If not provided, all environments are allowed. And if the provided list is empty, the playground should be disabled. + */ + allowedEnvironments: FernNavigation.EnvironmentId[] | undefined; + button: FernNavigation.PlaygroundButtonSettings | undefined; +} diff --git a/packages/fdr-sdk/src/navigation/generated/api/types/WebSocketNode.ts b/packages/fdr-sdk/src/navigation/generated/api/types/WebSocketNode.ts index 21169b40f4..7c1866ca2a 100644 --- a/packages/fdr-sdk/src/navigation/generated/api/types/WebSocketNode.ts +++ b/packages/fdr-sdk/src/navigation/generated/api/types/WebSocketNode.ts @@ -7,4 +7,6 @@ import * as FernNavigation from "../index"; export interface WebSocketNode extends FernNavigation.WithNodeMetadata, FernNavigation.WithApiDefinitionId { type: "webSocket"; webSocketId: FernNavigation.WebSocketId; + /** Settings for the api playground that affect this endpoint specifically. */ + playground: FernNavigation.PlaygroundSettings | undefined; } diff --git a/packages/fdr-sdk/src/navigation/generated/api/types/index.ts b/packages/fdr-sdk/src/navigation/generated/api/types/index.ts index 07926ce3df..6f04539073 100644 --- a/packages/fdr-sdk/src/navigation/generated/api/types/index.ts +++ b/packages/fdr-sdk/src/navigation/generated/api/types/index.ts @@ -4,6 +4,7 @@ export * from "./VersionId"; export * from "./TabId"; export * from "./PageId"; export * from "./NodeId"; +export * from "./EnvironmentId"; export * from "./ApiDefinitionId"; export * from "./EndpointId"; export * from "./WebSocketId"; @@ -32,6 +33,8 @@ export * from "./ChangelogYearNode"; export * from "./ChangelogMonthNode"; export * from "./ChangelogEntryNode"; export * from "./ApiReferenceNode"; +export * from "./PlaygroundSettings"; +export * from "./PlaygroundButtonSettings"; export * from "./EndpointNode"; export * from "./WebSocketNode"; export * from "./WebhookNode"; diff --git a/packages/fdr-sdk/src/navigation/utils/convertLoadDocsForUrlResponse.ts b/packages/fdr-sdk/src/navigation/utils/convertLoadDocsForUrlResponse.ts index 5b6bc5d848..9b3b1bcaba 100644 --- a/packages/fdr-sdk/src/navigation/utils/convertLoadDocsForUrlResponse.ts +++ b/packages/fdr-sdk/src/navigation/utils/convertLoadDocsForUrlResponse.ts @@ -9,7 +9,7 @@ import { getNoIndexFromFrontmatter } from "./getNoIndexFromFrontmatter"; export function convertLoadDocsForUrlResponse( response: DocsV2Read.LoadDocsForUrlResponse, disableEndpointPairs: boolean = false, - disableLongScrolling?: boolean, + paginated?: boolean, ): FernNavigation.RootNode { const noindexMap: Record = {}; const fullSlugMap: Record = {}; @@ -39,7 +39,7 @@ export function convertLoadDocsForUrlResponse( response.baseUrl.basePath, isLexicographicSortEnabled(response.baseUrl.domain), disableEndpointPairs, - disableLongScrolling, + paginated, ); } diff --git a/packages/ui/app/src/api-page/ApiPage.tsx b/packages/ui/app/src/api-page/ApiPage.tsx index 06b0b83268..2a1dd6a757 100644 --- a/packages/ui/app/src/api-page/ApiPage.tsx +++ b/packages/ui/app/src/api-page/ApiPage.tsx @@ -12,11 +12,11 @@ export declare namespace ApiPage { export interface Props { initialApi: ResolvedRootPackage; showErrors: boolean; - disableLongScrolling: boolean; + paginated: boolean; } } -export const ApiPage: React.FC = ({ initialApi, showErrors, disableLongScrolling }) => { +export const ApiPage: React.FC = ({ initialApi, showErrors, paginated }) => { const hydrated = useIsReady(); const setDefinitions = useSetAtom(APIS_ATOM); useEffect(() => { @@ -25,7 +25,7 @@ export const ApiPage: React.FC = ({ initialApi, showErrors, disab return ( - {disableLongScrolling ? ( + {paginated ? ( ) : ( @@ -165,12 +168,15 @@ const UnmemoizedEndpointContentCodeSnippets: React.FC - {node != null && ( - - )} + {node != null && + (!environmentFilters || + (environmentFilters && + environmentFilters.includes(selectedEnvironmentId as EnvironmentId))) && ( + + )} {clients.length > 1 ? ( = ({ websocket, isLastInApi, types }) const maybeNode = nodes.get(websocket.nodeId); const node = maybeNode != null && FernNavigation.isApiLeaf(maybeNode) ? maybeNode : undefined; + const environmentFilters = usePlaygroundSettings(); + const route = `/${websocket.slug}`; const ref = useRef(null); @@ -310,7 +314,17 @@ const WebhookContent: FC = ({ websocket, isLastInApi, types })
: undefined} + actions={ + node != null && + selectedEnvironmentId && + (!environmentFilters || + (environmentFilters && + environmentFilters.includes( + selectedEnvironmentId as EnvironmentId, + ))) ? ( + + ) : undefined + } disableClipboard={true} > diff --git a/packages/ui/app/src/api-playground/PlaygroundEndpoint.tsx b/packages/ui/app/src/api-playground/PlaygroundEndpoint.tsx index 512aca2e3c..1e9dc1bcf7 100644 --- a/packages/ui/app/src/api-playground/PlaygroundEndpoint.tsx +++ b/packages/ui/app/src/api-playground/PlaygroundEndpoint.tsx @@ -17,6 +17,7 @@ import { usePlaygroundEndpointFormState, } from "../atoms"; import { useSelectedEnvironmentId } from "../atoms/environment"; +import { usePlaygroundSettings } from "../hooks/usePlaygroundSettings"; import { ResolvedEndpointDefinition, ResolvedFormDataRequestProperty, @@ -181,6 +182,8 @@ export const PlaygroundEndpoint: FC = ({ endpoint, type const selectedEnvironmentId = useSelectedEnvironmentId(); + const environmentFilters = usePlaygroundSettings(); + return (
@@ -190,6 +193,7 @@ export const PlaygroundEndpoint: FC = ({ endpoint, type formState={formState} sendRequest={sendRequest} environment={resolveEnvironment(endpoint, selectedEnvironmentId)} + environmentFilters={environmentFilters} path={endpoint.path} queryParameters={endpoint.queryParameters} sendRequestIcon={} diff --git a/packages/ui/app/src/api-playground/PlaygroundEndpointPath.tsx b/packages/ui/app/src/api-playground/PlaygroundEndpointPath.tsx index c389c28be4..68a38b29f3 100644 --- a/packages/ui/app/src/api-playground/PlaygroundEndpointPath.tsx +++ b/packages/ui/app/src/api-playground/PlaygroundEndpointPath.tsx @@ -17,6 +17,7 @@ import { buildRequestUrl, unknownToString } from "./utils"; interface PlaygroundEndpointPathProps { method: APIV1Read.HttpMethod | undefined; environment: APIV1Read.Environment | undefined; + environmentFilters: APIV1Read.EnvironmentId[] | undefined; formState: PlaygroundRequestFormState; path: ResolvedEndpointPathParts[]; queryParameters: ResolvedObjectProperty[]; @@ -27,6 +28,7 @@ interface PlaygroundEndpointPathProps { export const PlaygroundEndpointPath: FC = ({ environment, + environmentFilters, method, formState, path, @@ -52,6 +54,7 @@ export const PlaygroundEndpointPath: FC = ({ {environment != null && ( = ({ websocket, t useEffect(() => () => socket.current?.close(), []); const selectedEnvironmentId = useSelectedEnvironmentId(); + const environmentFilters = usePlaygroundSettings(); const baseUrl = resolveEnvironment(websocket, selectedEnvironmentId)?.baseUrl; const startSession = useCallback(async () => { @@ -147,6 +149,7 @@ export const PlaygroundWebSocket: FC = ({ websocket, t : null } environment={resolveEnvironment(websocket, selectedEnvironmentId)} + environmentFilters={environmentFilters} path={websocket.path} queryParameters={websocket.queryParameters} sendRequestButtonLabel={ diff --git a/packages/ui/app/src/atoms/apis.ts b/packages/ui/app/src/atoms/apis.ts index 2ab213b90f..5599f2f28a 100644 --- a/packages/ui/app/src/atoms/apis.ts +++ b/packages/ui/app/src/atoms/apis.ts @@ -21,7 +21,7 @@ export function useFlattenedApis(): Record { const IS_API_REFERENCE_PAGINATED = atom((get) => { let isApiScrollingDisabled = get(FEATURE_FLAGS_ATOM).isApiScrollingDisabled; const resolvedPath = get(RESOLVED_PATH_ATOM); - if (resolvedPath.type === "api-page" && resolvedPath.disableLongScrolling) { + if (resolvedPath.type === "api-page" && resolvedPath.paginated) { isApiScrollingDisabled = true; } return isApiScrollingDisabled; diff --git a/packages/ui/app/src/components/MaybeEnvironmentDropdown.tsx b/packages/ui/app/src/components/MaybeEnvironmentDropdown.tsx index 2d1fc7c8bf..c482e50902 100644 --- a/packages/ui/app/src/components/MaybeEnvironmentDropdown.tsx +++ b/packages/ui/app/src/components/MaybeEnvironmentDropdown.tsx @@ -10,24 +10,26 @@ interface MaybeEnvironmentDropdownProps { urlTextStyle?: string; protocolTextStyle?: string; small?: boolean; + environmentFilters?: APIV1Read.EnvironmentId[]; } export function MaybeEnvironmentDropdown(props: MaybeEnvironmentDropdownProps): ReactElement | null { const [allEnvironmentIds] = useAtom(ALL_ENVIRONMENTS_ATOM); const [selectedEnvironmentId, setSelectedEnvironmentId] = useAtom(SELECTED_ENVIRONMENT_ATOM); - const { selectedEnvironment, urlTextStyle, protocolTextStyle, small } = props; + const { selectedEnvironment, urlTextStyle, protocolTextStyle, small, environmentFilters } = props; const url = selectedEnvironment?.baseUrl && parse(selectedEnvironment?.baseUrl); + const environmentIds = environmentFilters ? environmentFilters : allEnvironmentIds; + return ( - {allEnvironmentIds.length > 1 ? ( + {environmentIds && environmentIds.length > 1 ? ( ({ + options={environmentIds.map((env) => ({ value: env, label: env, type: "value", - // tooltip: "Select environment", }))} onValueChange={(value) => { setSelectedEnvironmentId(value); diff --git a/packages/ui/app/src/docs/DocsMainContent.tsx b/packages/ui/app/src/docs/DocsMainContent.tsx index 76e2ff503b..f0c28de263 100644 --- a/packages/ui/app/src/docs/DocsMainContent.tsx +++ b/packages/ui/app/src/docs/DocsMainContent.tsx @@ -39,7 +39,7 @@ function DocsMainContentInternal(): ReactElement | null { ), changelog: (resolvedPath) => , diff --git a/packages/ui/app/src/hooks/usePlaygroundSettings.ts b/packages/ui/app/src/hooks/usePlaygroundSettings.ts new file mode 100644 index 0000000000..fc18f76b60 --- /dev/null +++ b/packages/ui/app/src/hooks/usePlaygroundSettings.ts @@ -0,0 +1,21 @@ +import { EnvironmentId } from "@fern-api/fdr-sdk/navigation"; +import { useNavigationNodes, useResolvedPath } from "../atoms"; + +export function usePlaygroundSettings(): EnvironmentId[] | undefined { + let depth = 0; + + const resolvedPath = useResolvedPath(); + const navigationNodes = useNavigationNodes(); + const slug = resolvedPath.slug; + let cursor = navigationNodes.slugMap.get(slug); + while (cursor && cursor.slug && depth < 100) { + if (cursor && (cursor.type === "endpoint" || cursor.type === "webSocket" || cursor.type === "apiPackage")) { + return cursor.playground?.allowedEnvironments; + } + const newSlug = slug.split("/"); + newSlug.pop(); + cursor = navigationNodes.slugMap.get(newSlug.join("/")); + depth += 1; + } + return; +} diff --git a/packages/ui/app/src/resolver/ResolvedPath.ts b/packages/ui/app/src/resolver/ResolvedPath.ts index 8522c92dcb..46bf122a3c 100644 --- a/packages/ui/app/src/resolver/ResolvedPath.ts +++ b/packages/ui/app/src/resolver/ResolvedPath.ts @@ -48,7 +48,7 @@ export declare namespace ResolvedPath { title: string; slug: FernNavigation.Slug; api: string; - disableLongScrolling: boolean; + paginated: boolean; apiDefinition: ResolvedRootPackage; showErrors: boolean; neighbors: Neighbors; diff --git a/packages/ui/app/src/util/convertNavigatableToResolvedPath.ts b/packages/ui/app/src/util/convertNavigatableToResolvedPath.ts index 63263cf674..1f54ead22d 100644 --- a/packages/ui/app/src/util/convertNavigatableToResolvedPath.ts +++ b/packages/ui/app/src/util/convertNavigatableToResolvedPath.ts @@ -149,7 +149,7 @@ export async function convertNavigatableToResolvedPath({ }; } else if (apiReference != null) { // if long scrolling is disabled, we should render a markdown page by itself - if (apiReference.disableLongScrolling && FernNavigation.hasMarkdown(node)) { + if (apiReference.paginated && FernNavigation.hasMarkdown(node)) { return resolveMarkdownPage(node, found, apis, pages, mdxOptions, featureFlags, domain, neighbors); } @@ -176,7 +176,7 @@ export async function convertNavigatableToResolvedPath({ title: node.title, api: apiReference.apiDefinitionId, apiDefinition, - disableLongScrolling: apiReference.disableLongScrolling ?? false, + paginated: apiReference.paginated ?? false, // artifacts: apiSection.artifacts ?? null, // TODO: add artifacts showErrors: apiReference.showErrors ?? false, neighbors, diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/ApiPackageNode.d.ts b/servers/fdr/src/api/generated/api/resources/navigation/types/ApiPackageNode.d.ts index 31e0cfd15b..45bdcf87a6 100644 --- a/servers/fdr/src/api/generated/api/resources/navigation/types/ApiPackageNode.d.ts +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/ApiPackageNode.d.ts @@ -5,4 +5,6 @@ import * as FernRegistry from "../../.."; export interface ApiPackageNode extends FernRegistry.navigation.WithNodeMetadata, FernRegistry.navigation.WithOverviewPage, FernRegistry.navigation.WithApiDefinitionId, FernRegistry.navigation.WithRedirect { type: "apiPackage"; children: FernRegistry.navigation.ApiPackageChild[]; + /** Settings for the api playground that is applied only to descendants of this api package. */ + playground?: FernRegistry.navigation.PlaygroundSettings; } diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/ApiReferenceNode.d.ts b/servers/fdr/src/api/generated/api/resources/navigation/types/ApiReferenceNode.d.ts index 78be2984d2..56e5e3a37f 100644 --- a/servers/fdr/src/api/generated/api/resources/navigation/types/ApiReferenceNode.d.ts +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/ApiReferenceNode.d.ts @@ -4,9 +4,12 @@ import * as FernRegistry from "../../.."; export interface ApiReferenceNode extends FernRegistry.navigation.WithNodeMetadata, FernRegistry.navigation.WithOverviewPage, FernRegistry.navigation.WithApiDefinitionId, FernRegistry.navigation.WithRedirect { type: "apiReference"; - disableLongScrolling?: boolean; + /** If true, long-scrolling will be disabled. */ + paginated?: boolean; showErrors?: boolean; hideTitle?: boolean; children: FernRegistry.navigation.ApiPackageChild[]; changelog?: FernRegistry.navigation.ChangelogNode; + /** Settings for the api playground that affects all endpoints. */ + playground?: FernRegistry.navigation.PlaygroundSettings; } diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/EndpointNode.d.ts b/servers/fdr/src/api/generated/api/resources/navigation/types/EndpointNode.d.ts index 22caebed95..5a6b7fd107 100644 --- a/servers/fdr/src/api/generated/api/resources/navigation/types/EndpointNode.d.ts +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/EndpointNode.d.ts @@ -7,4 +7,6 @@ export interface EndpointNode extends FernRegistry.navigation.WithNodeMetadata, method: FernRegistry.navigation.HttpMethod; endpointId: FernRegistry.navigation.EndpointId; isResponseStream?: boolean; + /** Settings for the api playground that affect this endpoint specifically. */ + playground?: FernRegistry.navigation.PlaygroundSettings; } diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/EnvironmentId.d.ts b/servers/fdr/src/api/generated/api/resources/navigation/types/EnvironmentId.d.ts new file mode 100644 index 0000000000..8de560fcac --- /dev/null +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/EnvironmentId.d.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +/** + * Identifier for an API environment (i.e. "Prod", "Staging", "Dev") + */ +export declare type EnvironmentId = string; diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/EnvironmentId.js b/servers/fdr/src/api/generated/api/resources/navigation/types/EnvironmentId.js new file mode 100644 index 0000000000..0b46289f5b --- /dev/null +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/EnvironmentId.js @@ -0,0 +1,4 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export {}; diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundButtonSettings.d.ts b/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundButtonSettings.d.ts new file mode 100644 index 0000000000..f304aae08c --- /dev/null +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundButtonSettings.d.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as FernRegistry from "../../.."; +export interface PlaygroundButtonSettings { + href?: FernRegistry.navigation.Url; +} diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundButtonSettings.js b/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundButtonSettings.js new file mode 100644 index 0000000000..0b46289f5b --- /dev/null +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundButtonSettings.js @@ -0,0 +1,4 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export {}; diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundSettings.d.ts b/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundSettings.d.ts new file mode 100644 index 0000000000..fbfb426b35 --- /dev/null +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundSettings.d.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as FernRegistry from "../../.."; +export interface PlaygroundSettings { + /** + * A list of environment IDs that are allowed to be used in the playground. + * If not provided, all environments are allowed. And if the provided list is empty, the playground should be disabled. + */ + allowedEnvironments?: FernRegistry.navigation.EnvironmentId[]; + button?: FernRegistry.navigation.PlaygroundButtonSettings; +} diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundSettings.js b/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundSettings.js new file mode 100644 index 0000000000..0b46289f5b --- /dev/null +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/PlaygroundSettings.js @@ -0,0 +1,4 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export {}; diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/WebSocketNode.d.ts b/servers/fdr/src/api/generated/api/resources/navigation/types/WebSocketNode.d.ts index 82c2e0afab..8d8f815686 100644 --- a/servers/fdr/src/api/generated/api/resources/navigation/types/WebSocketNode.d.ts +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/WebSocketNode.d.ts @@ -5,4 +5,6 @@ import * as FernRegistry from "../../.."; export interface WebSocketNode extends FernRegistry.navigation.WithNodeMetadata, FernRegistry.navigation.WithApiDefinitionId { type: "webSocket"; webSocketId: FernRegistry.navigation.WebSocketId; + /** Settings for the api playground that affect this endpoint specifically. */ + playground?: FernRegistry.navigation.PlaygroundSettings; } diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/index.d.ts b/servers/fdr/src/api/generated/api/resources/navigation/types/index.d.ts index 07926ce3df..6f04539073 100644 --- a/servers/fdr/src/api/generated/api/resources/navigation/types/index.d.ts +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/index.d.ts @@ -4,6 +4,7 @@ export * from "./VersionId"; export * from "./TabId"; export * from "./PageId"; export * from "./NodeId"; +export * from "./EnvironmentId"; export * from "./ApiDefinitionId"; export * from "./EndpointId"; export * from "./WebSocketId"; @@ -32,6 +33,8 @@ export * from "./ChangelogYearNode"; export * from "./ChangelogMonthNode"; export * from "./ChangelogEntryNode"; export * from "./ApiReferenceNode"; +export * from "./PlaygroundSettings"; +export * from "./PlaygroundButtonSettings"; export * from "./EndpointNode"; export * from "./WebSocketNode"; export * from "./WebhookNode"; diff --git a/servers/fdr/src/api/generated/api/resources/navigation/types/index.js b/servers/fdr/src/api/generated/api/resources/navigation/types/index.js index 07926ce3df..6f04539073 100644 --- a/servers/fdr/src/api/generated/api/resources/navigation/types/index.js +++ b/servers/fdr/src/api/generated/api/resources/navigation/types/index.js @@ -4,6 +4,7 @@ export * from "./VersionId"; export * from "./TabId"; export * from "./PageId"; export * from "./NodeId"; +export * from "./EnvironmentId"; export * from "./ApiDefinitionId"; export * from "./EndpointId"; export * from "./WebSocketId"; @@ -32,6 +33,8 @@ export * from "./ChangelogYearNode"; export * from "./ChangelogMonthNode"; export * from "./ChangelogEntryNode"; export * from "./ApiReferenceNode"; +export * from "./PlaygroundSettings"; +export * from "./PlaygroundButtonSettings"; export * from "./EndpointNode"; export * from "./WebSocketNode"; export * from "./WebhookNode";