@deeprelay/sdk 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +126 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +24 -0
- package/LICENSE +204 -0
- package/README.md +197 -4
- package/dist/apis/BillingApi.d.ts +169 -0
- package/dist/apis/BillingApi.js +457 -0
- package/dist/apis/InferenceApi.d.ts +217 -0
- package/dist/apis/InferenceApi.js +582 -0
- package/dist/apis/MetaApi.d.ts +44 -0
- package/dist/apis/MetaApi.js +105 -0
- package/dist/apis/OperationsApi.d.ts +33 -0
- package/dist/apis/OperationsApi.js +79 -0
- package/dist/apis/UsageApi.d.ts +56 -0
- package/dist/apis/UsageApi.js +109 -0
- package/dist/apis/WebhooksApi.d.ts +82 -0
- package/dist/apis/WebhooksApi.js +224 -0
- package/dist/apis/index.d.ts +6 -0
- package/dist/apis/index.js +24 -0
- package/dist/esm/apis/BillingApi.d.ts +169 -0
- package/dist/esm/apis/BillingApi.js +453 -0
- package/dist/esm/apis/InferenceApi.d.ts +217 -0
- package/dist/esm/apis/InferenceApi.js +578 -0
- package/dist/esm/apis/MetaApi.d.ts +44 -0
- package/dist/esm/apis/MetaApi.js +101 -0
- package/dist/esm/apis/OperationsApi.d.ts +33 -0
- package/dist/esm/apis/OperationsApi.js +75 -0
- package/dist/esm/apis/UsageApi.d.ts +56 -0
- package/dist/esm/apis/UsageApi.js +105 -0
- package/dist/esm/apis/WebhooksApi.d.ts +82 -0
- package/dist/esm/apis/WebhooksApi.js +220 -0
- package/dist/esm/apis/index.d.ts +6 -0
- package/dist/esm/apis/index.js +8 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/Balance.d.ts +65 -0
- package/dist/esm/models/Balance.js +63 -0
- package/dist/esm/models/ChatChoice.d.ts +55 -0
- package/dist/esm/models/ChatChoice.js +55 -0
- package/dist/esm/models/ChatCompletionRequest.d.ts +64 -0
- package/dist/esm/models/ChatCompletionRequest.js +57 -0
- package/dist/esm/models/ChatCompletionResponse.d.ts +71 -0
- package/dist/esm/models/ChatCompletionResponse.js +73 -0
- package/dist/esm/models/ChatMessage.d.ts +47 -0
- package/dist/esm/models/ChatMessage.js +55 -0
- package/dist/esm/models/CreateCryptoDepositRequest.d.ts +64 -0
- package/dist/esm/models/CreateCryptoDepositRequest.js +68 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +50 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.js +58 -0
- package/dist/esm/models/CryptoDeposit.d.ts +114 -0
- package/dist/esm/models/CryptoDeposit.js +90 -0
- package/dist/esm/models/Embedding.d.ts +51 -0
- package/dist/esm/models/Embedding.js +59 -0
- package/dist/esm/models/EmbeddingsRequest.d.ts +64 -0
- package/dist/esm/models/EmbeddingsRequest.js +60 -0
- package/dist/esm/models/EmbeddingsRequestInput.d.ts +21 -0
- package/dist/esm/models/EmbeddingsRequestInput.js +47 -0
- package/dist/esm/models/EmbeddingsResponse.d.ts +59 -0
- package/dist/esm/models/EmbeddingsResponse.js +65 -0
- package/dist/esm/models/EmbeddingsUsage.d.ts +38 -0
- package/dist/esm/models/EmbeddingsUsage.js +47 -0
- package/dist/esm/models/GetHealth200Response.d.ts +39 -0
- package/dist/esm/models/GetHealth200Response.js +47 -0
- package/dist/esm/models/ImagesGenerationsRequest.d.ts +63 -0
- package/dist/esm/models/ImagesGenerationsRequest.js +59 -0
- package/dist/esm/models/ImagesResponse.d.ts +46 -0
- package/dist/esm/models/ImagesResponse.js +53 -0
- package/dist/esm/models/ImagesResponseDataInner.d.ts +32 -0
- package/dist/esm/models/ImagesResponseDataInner.js +43 -0
- package/dist/esm/models/ImagesResponseUsage.d.ts +32 -0
- package/dist/esm/models/ImagesResponseUsage.js +43 -0
- package/dist/esm/models/InferencePreflight.d.ts +92 -0
- package/dist/esm/models/InferencePreflight.js +86 -0
- package/dist/esm/models/ListDeposits200Response.d.ts +39 -0
- package/dist/esm/models/ListDeposits200Response.js +48 -0
- package/dist/esm/models/Model.d.ts +152 -0
- package/dist/esm/models/Model.js +110 -0
- package/dist/esm/models/ModelList.d.ts +46 -0
- package/dist/esm/models/ModelList.js +56 -0
- package/dist/esm/models/ModelParametersInner.d.ts +72 -0
- package/dist/esm/models/ModelParametersInner.js +64 -0
- package/dist/esm/models/ModelPricing.d.ts +126 -0
- package/dist/esm/models/ModelPricing.js +78 -0
- package/dist/esm/models/ModelRate.d.ts +62 -0
- package/dist/esm/models/ModelRate.js +51 -0
- package/dist/esm/models/OpenAIErrorEnvelope.d.ts +33 -0
- package/dist/esm/models/OpenAIErrorEnvelope.js +44 -0
- package/dist/esm/models/OpenAIErrorEnvelopeError.d.ts +50 -0
- package/dist/esm/models/OpenAIErrorEnvelopeError.js +53 -0
- package/dist/esm/models/Operation.d.ts +107 -0
- package/dist/esm/models/Operation.js +86 -0
- package/dist/esm/models/OperationError.d.ts +38 -0
- package/dist/esm/models/OperationError.js +43 -0
- package/dist/esm/models/OperationResult.d.ts +44 -0
- package/dist/esm/models/OperationResult.js +45 -0
- package/dist/esm/models/PeakWindow.d.ts +38 -0
- package/dist/esm/models/PeakWindow.js +47 -0
- package/dist/esm/models/Problem.d.ts +87 -0
- package/dist/esm/models/Problem.js +87 -0
- package/dist/esm/models/SpendingLimit.d.ts +101 -0
- package/dist/esm/models/SpendingLimit.js +85 -0
- package/dist/esm/models/StreamOptions.d.ts +32 -0
- package/dist/esm/models/StreamOptions.js +41 -0
- package/dist/esm/models/Subscription.d.ts +78 -0
- package/dist/esm/models/Subscription.js +68 -0
- package/dist/esm/models/SubscriptionCheckoutRequest.d.ts +45 -0
- package/dist/esm/models/SubscriptionCheckoutRequest.js +45 -0
- package/dist/esm/models/SubscriptionCheckoutSession.d.ts +45 -0
- package/dist/esm/models/SubscriptionCheckoutSession.js +52 -0
- package/dist/esm/models/SubscriptionPlan.d.ts +46 -0
- package/dist/esm/models/SubscriptionPlan.js +50 -0
- package/dist/esm/models/SubscriptionPortalRequest.d.ts +32 -0
- package/dist/esm/models/SubscriptionPortalRequest.js +41 -0
- package/dist/esm/models/SubscriptionPortalSession.d.ts +32 -0
- package/dist/esm/models/SubscriptionPortalSession.js +43 -0
- package/dist/esm/models/SubscriptionPrice.d.ts +53 -0
- package/dist/esm/models/SubscriptionPrice.js +55 -0
- package/dist/esm/models/SubscriptionQuota.d.ts +60 -0
- package/dist/esm/models/SubscriptionQuota.js +59 -0
- package/dist/esm/models/SubscriptionUsage.d.ts +65 -0
- package/dist/esm/models/SubscriptionUsage.js +63 -0
- package/dist/esm/models/UpdateSpendingLimitRequest.d.ts +59 -0
- package/dist/esm/models/UpdateSpendingLimitRequest.js +57 -0
- package/dist/esm/models/Usage.d.ts +44 -0
- package/dist/esm/models/Usage.js +51 -0
- package/dist/esm/models/UsageBucket.d.ts +56 -0
- package/dist/esm/models/UsageBucket.js +55 -0
- package/dist/esm/models/UsagePage.d.ts +39 -0
- package/dist/esm/models/UsagePage.js +48 -0
- package/dist/esm/models/VideoCreateRequest.d.ts +50 -0
- package/dist/esm/models/VideoCreateRequest.js +51 -0
- package/dist/esm/models/VideoJob.d.ts +117 -0
- package/dist/esm/models/VideoJob.js +94 -0
- package/dist/esm/models/VideoList.d.ts +52 -0
- package/dist/esm/models/VideoList.js +60 -0
- package/dist/esm/models/WebhookEndpoint.d.ts +74 -0
- package/dist/esm/models/WebhookEndpoint.js +72 -0
- package/dist/esm/models/WebhookEndpointPage.d.ts +39 -0
- package/dist/esm/models/WebhookEndpointPage.js +48 -0
- package/dist/esm/models/index.d.ts +52 -0
- package/dist/esm/models/index.js +54 -0
- package/dist/esm/runtime.d.ts +185 -0
- package/dist/esm/runtime.js +354 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/Balance.d.ts +65 -0
- package/dist/models/Balance.js +70 -0
- package/dist/models/ChatChoice.d.ts +55 -0
- package/dist/models/ChatChoice.js +63 -0
- package/dist/models/ChatCompletionRequest.d.ts +64 -0
- package/dist/models/ChatCompletionRequest.js +64 -0
- package/dist/models/ChatCompletionResponse.d.ts +71 -0
- package/dist/models/ChatCompletionResponse.js +81 -0
- package/dist/models/ChatMessage.d.ts +47 -0
- package/dist/models/ChatMessage.js +63 -0
- package/dist/models/CreateCryptoDepositRequest.d.ts +64 -0
- package/dist/models/CreateCryptoDepositRequest.js +76 -0
- package/dist/models/CreateWebhookEndpointRequest.d.ts +50 -0
- package/dist/models/CreateWebhookEndpointRequest.js +66 -0
- package/dist/models/CryptoDeposit.d.ts +114 -0
- package/dist/models/CryptoDeposit.js +98 -0
- package/dist/models/Embedding.d.ts +51 -0
- package/dist/models/Embedding.js +67 -0
- package/dist/models/EmbeddingsRequest.d.ts +64 -0
- package/dist/models/EmbeddingsRequest.js +68 -0
- package/dist/models/EmbeddingsRequestInput.d.ts +21 -0
- package/dist/models/EmbeddingsRequestInput.js +53 -0
- package/dist/models/EmbeddingsResponse.d.ts +59 -0
- package/dist/models/EmbeddingsResponse.js +73 -0
- package/dist/models/EmbeddingsUsage.d.ts +38 -0
- package/dist/models/EmbeddingsUsage.js +54 -0
- package/dist/models/GetHealth200Response.d.ts +39 -0
- package/dist/models/GetHealth200Response.js +55 -0
- package/dist/models/ImagesGenerationsRequest.d.ts +63 -0
- package/dist/models/ImagesGenerationsRequest.js +67 -0
- package/dist/models/ImagesResponse.d.ts +46 -0
- package/dist/models/ImagesResponse.js +60 -0
- package/dist/models/ImagesResponseDataInner.d.ts +32 -0
- package/dist/models/ImagesResponseDataInner.js +50 -0
- package/dist/models/ImagesResponseUsage.d.ts +32 -0
- package/dist/models/ImagesResponseUsage.js +50 -0
- package/dist/models/InferencePreflight.d.ts +92 -0
- package/dist/models/InferencePreflight.js +94 -0
- package/dist/models/ListDeposits200Response.d.ts +39 -0
- package/dist/models/ListDeposits200Response.js +55 -0
- package/dist/models/Model.d.ts +152 -0
- package/dist/models/Model.js +118 -0
- package/dist/models/ModelList.d.ts +46 -0
- package/dist/models/ModelList.js +64 -0
- package/dist/models/ModelParametersInner.d.ts +72 -0
- package/dist/models/ModelParametersInner.js +72 -0
- package/dist/models/ModelPricing.d.ts +126 -0
- package/dist/models/ModelPricing.js +86 -0
- package/dist/models/ModelRate.d.ts +62 -0
- package/dist/models/ModelRate.js +58 -0
- package/dist/models/OpenAIErrorEnvelope.d.ts +33 -0
- package/dist/models/OpenAIErrorEnvelope.js +51 -0
- package/dist/models/OpenAIErrorEnvelopeError.d.ts +50 -0
- package/dist/models/OpenAIErrorEnvelopeError.js +60 -0
- package/dist/models/Operation.d.ts +107 -0
- package/dist/models/Operation.js +94 -0
- package/dist/models/OperationError.d.ts +38 -0
- package/dist/models/OperationError.js +50 -0
- package/dist/models/OperationResult.d.ts +44 -0
- package/dist/models/OperationResult.js +52 -0
- package/dist/models/PeakWindow.d.ts +38 -0
- package/dist/models/PeakWindow.js +54 -0
- package/dist/models/Problem.d.ts +87 -0
- package/dist/models/Problem.js +95 -0
- package/dist/models/SpendingLimit.d.ts +101 -0
- package/dist/models/SpendingLimit.js +93 -0
- package/dist/models/StreamOptions.d.ts +32 -0
- package/dist/models/StreamOptions.js +48 -0
- package/dist/models/Subscription.d.ts +78 -0
- package/dist/models/Subscription.js +75 -0
- package/dist/models/SubscriptionCheckoutRequest.d.ts +45 -0
- package/dist/models/SubscriptionCheckoutRequest.js +52 -0
- package/dist/models/SubscriptionCheckoutSession.d.ts +45 -0
- package/dist/models/SubscriptionCheckoutSession.js +59 -0
- package/dist/models/SubscriptionPlan.d.ts +46 -0
- package/dist/models/SubscriptionPlan.js +57 -0
- package/dist/models/SubscriptionPortalRequest.d.ts +32 -0
- package/dist/models/SubscriptionPortalRequest.js +48 -0
- package/dist/models/SubscriptionPortalSession.d.ts +32 -0
- package/dist/models/SubscriptionPortalSession.js +50 -0
- package/dist/models/SubscriptionPrice.d.ts +53 -0
- package/dist/models/SubscriptionPrice.js +62 -0
- package/dist/models/SubscriptionQuota.d.ts +60 -0
- package/dist/models/SubscriptionQuota.js +66 -0
- package/dist/models/SubscriptionUsage.d.ts +65 -0
- package/dist/models/SubscriptionUsage.js +70 -0
- package/dist/models/UpdateSpendingLimitRequest.d.ts +59 -0
- package/dist/models/UpdateSpendingLimitRequest.js +65 -0
- package/dist/models/Usage.d.ts +44 -0
- package/dist/models/Usage.js +58 -0
- package/dist/models/UsageBucket.d.ts +56 -0
- package/dist/models/UsageBucket.js +62 -0
- package/dist/models/UsagePage.d.ts +39 -0
- package/dist/models/UsagePage.js +55 -0
- package/dist/models/VideoCreateRequest.d.ts +50 -0
- package/dist/models/VideoCreateRequest.js +58 -0
- package/dist/models/VideoJob.d.ts +117 -0
- package/dist/models/VideoJob.js +102 -0
- package/dist/models/VideoList.d.ts +52 -0
- package/dist/models/VideoList.js +68 -0
- package/dist/models/WebhookEndpoint.d.ts +74 -0
- package/dist/models/WebhookEndpoint.js +80 -0
- package/dist/models/WebhookEndpointPage.d.ts +39 -0
- package/dist/models/WebhookEndpointPage.js +55 -0
- package/dist/models/index.d.ts +52 -0
- package/dist/models/index.js +70 -0
- package/dist/runtime.d.ts +185 -0
- package/dist/runtime.js +371 -0
- package/docs/Balance.md +45 -0
- package/docs/BillingApi.md +657 -0
- package/docs/ChatChoice.md +38 -0
- package/docs/ChatCompletionRequest.md +44 -0
- package/docs/ChatCompletionResponse.md +44 -0
- package/docs/ChatMessage.md +36 -0
- package/docs/CreateCryptoDepositRequest.md +38 -0
- package/docs/CreateWebhookEndpointRequest.md +36 -0
- package/docs/CryptoDeposit.md +55 -0
- package/docs/Embedding.md +38 -0
- package/docs/EmbeddingsRequest.md +42 -0
- package/docs/EmbeddingsRequestInput.md +33 -0
- package/docs/EmbeddingsResponse.md +40 -0
- package/docs/EmbeddingsUsage.md +37 -0
- package/docs/GetHealth200Response.md +34 -0
- package/docs/ImagesGenerationsRequest.md +42 -0
- package/docs/ImagesResponse.md +38 -0
- package/docs/ImagesResponseDataInner.md +34 -0
- package/docs/ImagesResponseUsage.md +34 -0
- package/docs/InferenceApi.md +861 -0
- package/docs/InferencePreflight.md +47 -0
- package/docs/ListDeposits200Response.md +36 -0
- package/docs/MetaApi.md +126 -0
- package/docs/Model.md +64 -0
- package/docs/ModelList.md +36 -0
- package/docs/ModelParametersInner.md +44 -0
- package/docs/ModelPricing.md +62 -0
- package/docs/ModelRate.md +45 -0
- package/docs/OpenAIErrorEnvelope.md +34 -0
- package/docs/OpenAIErrorEnvelopeError.md +40 -0
- package/docs/Operation.md +52 -0
- package/docs/OperationError.md +36 -0
- package/docs/OperationResult.md +39 -0
- package/docs/OperationsApi.md +80 -0
- package/docs/PeakWindow.md +37 -0
- package/docs/Problem.md +44 -0
- package/docs/SpendingLimit.md +54 -0
- package/docs/StreamOptions.md +34 -0
- package/docs/Subscription.md +49 -0
- package/docs/SubscriptionCheckoutRequest.md +39 -0
- package/docs/SubscriptionCheckoutSession.md +38 -0
- package/docs/SubscriptionPlan.md +39 -0
- package/docs/SubscriptionPortalRequest.md +35 -0
- package/docs/SubscriptionPortalSession.md +34 -0
- package/docs/SubscriptionPrice.md +41 -0
- package/docs/SubscriptionQuota.md +43 -0
- package/docs/SubscriptionUsage.md +45 -0
- package/docs/UpdateSpendingLimitRequest.md +40 -0
- package/docs/Usage.md +38 -0
- package/docs/UsageApi.md +95 -0
- package/docs/UsageBucket.md +42 -0
- package/docs/UsagePage.md +36 -0
- package/docs/VideoCreateRequest.md +40 -0
- package/docs/VideoJob.md +56 -0
- package/docs/VideoList.md +38 -0
- package/docs/WebhookEndpoint.md +44 -0
- package/docs/WebhookEndpointPage.md +36 -0
- package/docs/WebhooksApi.md +302 -0
- package/package.json +16 -7
- package/src/apis/BillingApi.ts +559 -0
- package/src/apis/InferenceApi.ts +753 -0
- package/src/apis/MetaApi.ts +103 -0
- package/src/apis/OperationsApi.ts +89 -0
- package/src/apis/UsageApi.ts +129 -0
- package/src/apis/WebhooksApi.ts +277 -0
- package/src/apis/index.ts +8 -0
- package/src/index.ts +5 -0
- package/src/models/Balance.ts +114 -0
- package/src/models/ChatChoice.ts +102 -0
- package/src/models/ChatCompletionRequest.ts +122 -0
- package/src/models/ChatCompletionResponse.ts +138 -0
- package/src/models/ChatMessage.ts +87 -0
- package/src/models/CreateCryptoDepositRequest.ts +108 -0
- package/src/models/CreateWebhookEndpointRequest.ts +90 -0
- package/src/models/CryptoDeposit.ts +177 -0
- package/src/models/Embedding.ts +96 -0
- package/src/models/EmbeddingsRequest.ts +117 -0
- package/src/models/EmbeddingsRequestInput.ts +59 -0
- package/src/models/EmbeddingsResponse.ts +120 -0
- package/src/models/EmbeddingsUsage.ts +75 -0
- package/src/models/GetHealth200Response.ts +75 -0
- package/src/models/ImagesGenerationsRequest.ts +109 -0
- package/src/models/ImagesResponse.ts +99 -0
- package/src/models/ImagesResponseDataInner.ts +66 -0
- package/src/models/ImagesResponseUsage.ts +66 -0
- package/src/models/InferencePreflight.ts +147 -0
- package/src/models/ListDeposits200Response.ts +83 -0
- package/src/models/Model.ts +241 -0
- package/src/models/ModelList.ts +95 -0
- package/src/models/ModelParametersInner.ts +120 -0
- package/src/models/ModelPricing.ts +203 -0
- package/src/models/ModelRate.ts +105 -0
- package/src/models/OpenAIErrorEnvelope.ts +74 -0
- package/src/models/OpenAIErrorEnvelopeError.ts +92 -0
- package/src/models/Operation.ts +179 -0
- package/src/models/OperationError.ts +73 -0
- package/src/models/OperationResult.ts +81 -0
- package/src/models/PeakWindow.ts +75 -0
- package/src/models/Problem.ts +139 -0
- package/src/models/SpendingLimit.ts +165 -0
- package/src/models/StreamOptions.ts +65 -0
- package/src/models/Subscription.ts +149 -0
- package/src/models/SubscriptionCheckoutRequest.ts +82 -0
- package/src/models/SubscriptionCheckoutSession.ts +92 -0
- package/src/models/SubscriptionPlan.ts +92 -0
- package/src/models/SubscriptionPortalRequest.ts +65 -0
- package/src/models/SubscriptionPortalSession.ts +66 -0
- package/src/models/SubscriptionPrice.ts +96 -0
- package/src/models/SubscriptionQuota.ts +106 -0
- package/src/models/SubscriptionUsage.ts +114 -0
- package/src/models/UpdateSpendingLimitRequest.ts +102 -0
- package/src/models/Usage.ts +84 -0
- package/src/models/UsageBucket.ts +100 -0
- package/src/models/UsagePage.ts +83 -0
- package/src/models/VideoCreateRequest.ts +91 -0
- package/src/models/VideoJob.ts +184 -0
- package/src/models/VideoList.ts +104 -0
- package/src/models/WebhookEndpoint.ts +125 -0
- package/src/models/WebhookEndpointPage.ts +83 -0
- package/src/models/index.ts +54 -0
- package/src/runtime.ts +454 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { SubscriptionPlan } from './SubscriptionPlan';
|
|
17
|
+
import {
|
|
18
|
+
SubscriptionPlanFromJSON,
|
|
19
|
+
SubscriptionPlanFromJSONTyped,
|
|
20
|
+
SubscriptionPlanToJSON,
|
|
21
|
+
SubscriptionPlanToJSONTyped,
|
|
22
|
+
} from './SubscriptionPlan';
|
|
23
|
+
import type { SubscriptionUsage } from './SubscriptionUsage';
|
|
24
|
+
import {
|
|
25
|
+
SubscriptionUsageFromJSON,
|
|
26
|
+
SubscriptionUsageFromJSONTyped,
|
|
27
|
+
SubscriptionUsageToJSON,
|
|
28
|
+
SubscriptionUsageToJSONTyped,
|
|
29
|
+
} from './SubscriptionUsage';
|
|
30
|
+
import type { SubscriptionQuota } from './SubscriptionQuota';
|
|
31
|
+
import {
|
|
32
|
+
SubscriptionQuotaFromJSON,
|
|
33
|
+
SubscriptionQuotaFromJSONTyped,
|
|
34
|
+
SubscriptionQuotaToJSON,
|
|
35
|
+
SubscriptionQuotaToJSONTyped,
|
|
36
|
+
} from './SubscriptionQuota';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The organization's flat subscription tier: entitlement, billing period, the configured quota, and consumption against it. The console and this endpoint assemble it from the same source, so the two surfaces cannot report different numbers.
|
|
40
|
+
*
|
|
41
|
+
* @export
|
|
42
|
+
* @interface Subscription
|
|
43
|
+
*/
|
|
44
|
+
export interface Subscription {
|
|
45
|
+
/**
|
|
46
|
+
* Whether the organization is entitled to the plan right now. Only an `active` or `trialing` subscription entitles, including a short grace window past the period end that absorbs renewal webhook lag; a failed payment (`past_due`) cuts access immediately. Render from this; do not re-derive entitlement from `status` and the period bounds.
|
|
47
|
+
* @type {boolean}
|
|
48
|
+
* @memberof Subscription
|
|
49
|
+
*/
|
|
50
|
+
subscribed: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Raw subscription status — "active", "trialing", "past_due", "canceled" and so on — or "none" when the organization never subscribed.
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof Subscription
|
|
55
|
+
*/
|
|
56
|
+
status: string;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the subscription stops at the end of the current period instead of renewing.
|
|
59
|
+
* @type {boolean}
|
|
60
|
+
* @memberof Subscription
|
|
61
|
+
*/
|
|
62
|
+
cancelAtPeriodEnd: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Start of the current billing period. Absent until the billing provider has reported a period for this subscription.
|
|
65
|
+
* @type {Date}
|
|
66
|
+
* @memberof Subscription
|
|
67
|
+
*/
|
|
68
|
+
currentPeriodStart?: Date;
|
|
69
|
+
/**
|
|
70
|
+
* End of the current billing period. Absent under the same condition as current_period_start.
|
|
71
|
+
* @type {Date}
|
|
72
|
+
* @memberof Subscription
|
|
73
|
+
*/
|
|
74
|
+
currentPeriodEnd?: Date;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {SubscriptionPlan}
|
|
78
|
+
* @memberof Subscription
|
|
79
|
+
*/
|
|
80
|
+
plan: SubscriptionPlan;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @type {SubscriptionQuota}
|
|
84
|
+
* @memberof Subscription
|
|
85
|
+
*/
|
|
86
|
+
quota: SubscriptionQuota;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {SubscriptionUsage}
|
|
90
|
+
* @memberof Subscription
|
|
91
|
+
*/
|
|
92
|
+
usage?: SubscriptionUsage;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Check if a given object implements the Subscription interface.
|
|
97
|
+
*/
|
|
98
|
+
export function instanceOfSubscription(value: object): value is Subscription {
|
|
99
|
+
if (!('subscribed' in value) || value['subscribed'] === undefined) return false;
|
|
100
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
101
|
+
if ((!('cancelAtPeriodEnd' in (value as Record<string, any>)) && !('cancel_at_period_end' in (value as Record<string, any>))) || ((value as Record<string, any>)['cancelAtPeriodEnd'] === undefined && (value as Record<string, any>)['cancel_at_period_end'] === undefined)) return false;
|
|
102
|
+
if (!('plan' in value) || value['plan'] === undefined) return false;
|
|
103
|
+
if (!('quota' in value) || value['quota'] === undefined) return false;
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function SubscriptionFromJSON(json: any): Subscription {
|
|
108
|
+
return SubscriptionFromJSONTyped(json, false);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function SubscriptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Subscription {
|
|
112
|
+
if (json == null) {
|
|
113
|
+
return json;
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'subscribed': json['subscribed'],
|
|
118
|
+
'status': json['status'],
|
|
119
|
+
'cancelAtPeriodEnd': json['cancel_at_period_end'],
|
|
120
|
+
'currentPeriodStart': json['current_period_start'] == null ? undefined : (new Date(json['current_period_start'])),
|
|
121
|
+
'currentPeriodEnd': json['current_period_end'] == null ? undefined : (new Date(json['current_period_end'])),
|
|
122
|
+
'plan': SubscriptionPlanFromJSON(json['plan']),
|
|
123
|
+
'quota': SubscriptionQuotaFromJSON(json['quota']),
|
|
124
|
+
'usage': json['usage'] == null ? undefined : SubscriptionUsageFromJSON(json['usage']),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function SubscriptionToJSON(json: any): Subscription {
|
|
129
|
+
return SubscriptionToJSONTyped(json, false);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function SubscriptionToJSONTyped(value?: Subscription | null, ignoreDiscriminator: boolean = false): any {
|
|
133
|
+
if (value == null) {
|
|
134
|
+
return value;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
|
|
139
|
+
'subscribed': value['subscribed'],
|
|
140
|
+
'status': value['status'],
|
|
141
|
+
'cancel_at_period_end': value['cancelAtPeriodEnd'],
|
|
142
|
+
'current_period_start': value['currentPeriodStart'] == null ? value['currentPeriodStart'] : value['currentPeriodStart'].toISOString(),
|
|
143
|
+
'current_period_end': value['currentPeriodEnd'] == null ? value['currentPeriodEnd'] : value['currentPeriodEnd'].toISOString(),
|
|
144
|
+
'plan': SubscriptionPlanToJSON(value['plan']),
|
|
145
|
+
'quota': SubscriptionQuotaToJSON(value['quota']),
|
|
146
|
+
'usage': SubscriptionUsageToJSON(value['usage']),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Optional overrides for a checkout mint. Every field has a deployment default, so an empty body is the normal call.
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface SubscriptionCheckoutRequest
|
|
21
|
+
*/
|
|
22
|
+
export interface SubscriptionCheckoutRequest {
|
|
23
|
+
/**
|
|
24
|
+
* Where the provider returns after a completed payment. Defaults to the deployment's configured URL.
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof SubscriptionCheckoutRequest
|
|
27
|
+
*/
|
|
28
|
+
successUrl?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Where the provider returns if checkout is abandoned. Defaults to the deployment's configured URL.
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof SubscriptionCheckoutRequest
|
|
33
|
+
*/
|
|
34
|
+
cancelUrl?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Pins the plan the client displayed. An unknown key is a 400 rather than a silent purchase of a different tier.
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof SubscriptionCheckoutRequest
|
|
39
|
+
*/
|
|
40
|
+
planKey?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the SubscriptionCheckoutRequest interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfSubscriptionCheckoutRequest(value: object): value is SubscriptionCheckoutRequest {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function SubscriptionCheckoutRequestFromJSON(json: any): SubscriptionCheckoutRequest {
|
|
51
|
+
return SubscriptionCheckoutRequestFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function SubscriptionCheckoutRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionCheckoutRequest {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'successUrl': json['success_url'] == null ? undefined : json['success_url'],
|
|
61
|
+
'cancelUrl': json['cancel_url'] == null ? undefined : json['cancel_url'],
|
|
62
|
+
'planKey': json['plan_key'] == null ? undefined : json['plan_key'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function SubscriptionCheckoutRequestToJSON(json: any): SubscriptionCheckoutRequest {
|
|
67
|
+
return SubscriptionCheckoutRequestToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function SubscriptionCheckoutRequestToJSONTyped(value?: SubscriptionCheckoutRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'success_url': value['successUrl'],
|
|
78
|
+
'cancel_url': value['cancelUrl'],
|
|
79
|
+
'plan_key': value['planKey'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { SubscriptionPlan } from './SubscriptionPlan';
|
|
17
|
+
import {
|
|
18
|
+
SubscriptionPlanFromJSON,
|
|
19
|
+
SubscriptionPlanFromJSONTyped,
|
|
20
|
+
SubscriptionPlanToJSON,
|
|
21
|
+
SubscriptionPlanToJSONTyped,
|
|
22
|
+
} from './SubscriptionPlan';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface SubscriptionCheckoutSession
|
|
28
|
+
*/
|
|
29
|
+
export interface SubscriptionCheckoutSession {
|
|
30
|
+
/**
|
|
31
|
+
* The hosted page the customer must open to pay.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof SubscriptionCheckoutSession
|
|
34
|
+
*/
|
|
35
|
+
checkoutUrl: string;
|
|
36
|
+
/**
|
|
37
|
+
* Checkout session id, for support correlation.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof SubscriptionCheckoutSession
|
|
40
|
+
*/
|
|
41
|
+
sessionId: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {SubscriptionPlan}
|
|
45
|
+
* @memberof SubscriptionCheckoutSession
|
|
46
|
+
*/
|
|
47
|
+
plan: SubscriptionPlan;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the SubscriptionCheckoutSession interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfSubscriptionCheckoutSession(value: object): value is SubscriptionCheckoutSession {
|
|
54
|
+
if ((!('checkoutUrl' in (value as Record<string, any>)) && !('checkout_url' in (value as Record<string, any>))) || ((value as Record<string, any>)['checkoutUrl'] === undefined && (value as Record<string, any>)['checkout_url'] === undefined)) return false;
|
|
55
|
+
if ((!('sessionId' in (value as Record<string, any>)) && !('session_id' in (value as Record<string, any>))) || ((value as Record<string, any>)['sessionId'] === undefined && (value as Record<string, any>)['session_id'] === undefined)) return false;
|
|
56
|
+
if (!('plan' in value) || value['plan'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function SubscriptionCheckoutSessionFromJSON(json: any): SubscriptionCheckoutSession {
|
|
61
|
+
return SubscriptionCheckoutSessionFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function SubscriptionCheckoutSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionCheckoutSession {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'checkoutUrl': json['checkout_url'],
|
|
71
|
+
'sessionId': json['session_id'],
|
|
72
|
+
'plan': SubscriptionPlanFromJSON(json['plan']),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function SubscriptionCheckoutSessionToJSON(json: any): SubscriptionCheckoutSession {
|
|
77
|
+
return SubscriptionCheckoutSessionToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function SubscriptionCheckoutSessionToJSONTyped(value?: SubscriptionCheckoutSession | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'checkout_url': value['checkoutUrl'],
|
|
88
|
+
'session_id': value['sessionId'],
|
|
89
|
+
'plan': SubscriptionPlanToJSON(value['plan']),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { SubscriptionPrice } from './SubscriptionPrice';
|
|
17
|
+
import {
|
|
18
|
+
SubscriptionPriceFromJSON,
|
|
19
|
+
SubscriptionPriceFromJSONTyped,
|
|
20
|
+
SubscriptionPriceToJSON,
|
|
21
|
+
SubscriptionPriceToJSONTyped,
|
|
22
|
+
} from './SubscriptionPrice';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* What the organization is — or would be — subscribing to. Always present, including for an organization that never subscribed: it is what a point of purchase renders before sending anyone to pay.
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface SubscriptionPlan
|
|
29
|
+
*/
|
|
30
|
+
export interface SubscriptionPlan {
|
|
31
|
+
/**
|
|
32
|
+
* Stable identifier for the tier. Send it as `plan_key` on /billing/subscription/checkout to pin the plan you displayed.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof SubscriptionPlan
|
|
35
|
+
*/
|
|
36
|
+
key: string;
|
|
37
|
+
/**
|
|
38
|
+
* Human-facing plan name.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof SubscriptionPlan
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {SubscriptionPrice}
|
|
46
|
+
* @memberof SubscriptionPlan
|
|
47
|
+
*/
|
|
48
|
+
price?: SubscriptionPrice;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the SubscriptionPlan interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfSubscriptionPlan(value: object): value is SubscriptionPlan {
|
|
55
|
+
if (!('key' in value) || value['key'] === undefined) return false;
|
|
56
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function SubscriptionPlanFromJSON(json: any): SubscriptionPlan {
|
|
61
|
+
return SubscriptionPlanFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function SubscriptionPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPlan {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'key': json['key'],
|
|
71
|
+
'name': json['name'],
|
|
72
|
+
'price': json['price'] == null ? undefined : SubscriptionPriceFromJSON(json['price']),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function SubscriptionPlanToJSON(json: any): SubscriptionPlan {
|
|
77
|
+
return SubscriptionPlanToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function SubscriptionPlanToJSONTyped(value?: SubscriptionPlan | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'key': value['key'],
|
|
88
|
+
'name': value['name'],
|
|
89
|
+
'price': SubscriptionPriceToJSON(value['price']),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Optional overrides for a billing-portal mint.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SubscriptionPortalRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SubscriptionPortalRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Where the provider returns when the customer leaves the portal. Defaults to the deployment's configured URL.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SubscriptionPortalRequest
|
|
26
|
+
*/
|
|
27
|
+
returnUrl?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the SubscriptionPortalRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfSubscriptionPortalRequest(value: object): value is SubscriptionPortalRequest {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function SubscriptionPortalRequestFromJSON(json: any): SubscriptionPortalRequest {
|
|
38
|
+
return SubscriptionPortalRequestFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function SubscriptionPortalRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPortalRequest {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'returnUrl': json['return_url'] == null ? undefined : json['return_url'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function SubscriptionPortalRequestToJSON(json: any): SubscriptionPortalRequest {
|
|
52
|
+
return SubscriptionPortalRequestToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function SubscriptionPortalRequestToJSONTyped(value?: SubscriptionPortalRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'return_url': value['returnUrl'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SubscriptionPortalSession
|
|
20
|
+
*/
|
|
21
|
+
export interface SubscriptionPortalSession {
|
|
22
|
+
/**
|
|
23
|
+
* The hosted billing portal — cancel, resume, change payment method, download invoices.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SubscriptionPortalSession
|
|
26
|
+
*/
|
|
27
|
+
portalUrl: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the SubscriptionPortalSession interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfSubscriptionPortalSession(value: object): value is SubscriptionPortalSession {
|
|
34
|
+
if ((!('portalUrl' in (value as Record<string, any>)) && !('portal_url' in (value as Record<string, any>))) || ((value as Record<string, any>)['portalUrl'] === undefined && (value as Record<string, any>)['portal_url'] === undefined)) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function SubscriptionPortalSessionFromJSON(json: any): SubscriptionPortalSession {
|
|
39
|
+
return SubscriptionPortalSessionFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function SubscriptionPortalSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPortalSession {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'portalUrl': json['portal_url'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function SubscriptionPortalSessionToJSON(json: any): SubscriptionPortalSession {
|
|
53
|
+
return SubscriptionPortalSessionToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function SubscriptionPortalSessionToJSONTyped(value?: SubscriptionPortalSession | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'portal_url': value['portalUrl'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* The plan's recurring charge, read live from the billing provider — the single source of truth, never a number embedded in code.
|
|
18
|
+
*
|
|
19
|
+
* ABSENT means "price unavailable right now" (billing unconfigured, or the provider could not be reached). It NEVER means free. Render the plan without a figure rather than substituting one; the hosted checkout page always shows the real amount.
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @interface SubscriptionPrice
|
|
23
|
+
*/
|
|
24
|
+
export interface SubscriptionPrice {
|
|
25
|
+
/**
|
|
26
|
+
* Amount in the currency's minor unit (299 = $2.99).
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof SubscriptionPrice
|
|
29
|
+
*/
|
|
30
|
+
amountCents: number;
|
|
31
|
+
/**
|
|
32
|
+
* ISO 4217 currency code, lower-case (e.g. "usd").
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof SubscriptionPrice
|
|
35
|
+
*/
|
|
36
|
+
currency: string;
|
|
37
|
+
/**
|
|
38
|
+
* Recurrence unit — "day", "week", "month" or "year".
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof SubscriptionPrice
|
|
41
|
+
*/
|
|
42
|
+
interval: string;
|
|
43
|
+
/**
|
|
44
|
+
* How many intervals between charges ("month", 1 = monthly).
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof SubscriptionPrice
|
|
47
|
+
*/
|
|
48
|
+
intervalCount: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the SubscriptionPrice interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfSubscriptionPrice(value: object): value is SubscriptionPrice {
|
|
55
|
+
if ((!('amountCents' in (value as Record<string, any>)) && !('amount_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['amountCents'] === undefined && (value as Record<string, any>)['amount_cents'] === undefined)) return false;
|
|
56
|
+
if (!('currency' in value) || value['currency'] === undefined) return false;
|
|
57
|
+
if (!('interval' in value) || value['interval'] === undefined) return false;
|
|
58
|
+
if ((!('intervalCount' in (value as Record<string, any>)) && !('interval_count' in (value as Record<string, any>))) || ((value as Record<string, any>)['intervalCount'] === undefined && (value as Record<string, any>)['interval_count'] === undefined)) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function SubscriptionPriceFromJSON(json: any): SubscriptionPrice {
|
|
63
|
+
return SubscriptionPriceFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function SubscriptionPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPrice {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'amountCents': json['amount_cents'],
|
|
73
|
+
'currency': json['currency'],
|
|
74
|
+
'interval': json['interval'],
|
|
75
|
+
'intervalCount': json['interval_count'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function SubscriptionPriceToJSON(json: any): SubscriptionPrice {
|
|
80
|
+
return SubscriptionPriceToJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function SubscriptionPriceToJSONTyped(value?: SubscriptionPrice | null, ignoreDiscriminator: boolean = false): any {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'amount_cents': value['amountCents'],
|
|
91
|
+
'currency': value['currency'],
|
|
92
|
+
'interval': value['interval'],
|
|
93
|
+
'interval_count': value['intervalCount'],
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|