@deeprelay/sdk 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +116 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +24 -0
- package/LICENSE +204 -0
- package/README.md +189 -4
- package/dist/apis/BillingApi.d.ts +131 -0
- package/dist/apis/BillingApi.js +361 -0
- package/dist/apis/InferenceApi.d.ts +199 -0
- package/dist/apis/InferenceApi.js +531 -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 +131 -0
- package/dist/esm/apis/BillingApi.js +357 -0
- package/dist/esm/apis/InferenceApi.d.ts +199 -0
- package/dist/esm/apis/InferenceApi.js +527 -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/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/SubscriptionPlan.d.ts +46 -0
- package/dist/esm/models/SubscriptionPlan.js +50 -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 +47 -0
- package/dist/esm/models/index.js +49 -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/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/SubscriptionPlan.d.ts +46 -0
- package/dist/models/SubscriptionPlan.js +57 -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 +47 -0
- package/dist/models/index.js +65 -0
- package/dist/runtime.d.ts +185 -0
- package/dist/runtime.js +371 -0
- package/docs/Balance.md +45 -0
- package/docs/BillingApi.md +503 -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 +787 -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/SubscriptionPlan.md +39 -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 +431 -0
- package/src/apis/InferenceApi.ts +686 -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/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/SubscriptionPlan.ts +92 -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 +49 -0
- package/src/runtime.ts +454 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -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
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
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 configured allowances — the denominators of the usage meter. Always present, including for an organization that has not subscribed, where it describes what subscribing would provide.
|
|
18
|
+
*
|
|
19
|
+
* Token figures are WEIGHTED tokens: every model carries a usage factor, so a model at factor 2 spends two of these per token it serves.
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @interface SubscriptionQuota
|
|
23
|
+
*/
|
|
24
|
+
export interface SubscriptionQuota {
|
|
25
|
+
/**
|
|
26
|
+
* Weighted input tokens included per billing period.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof SubscriptionQuota
|
|
29
|
+
*/
|
|
30
|
+
inputTokensMonthly: number;
|
|
31
|
+
/**
|
|
32
|
+
* Weighted output tokens included per billing period. Reasoning tokens are output tokens.
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof SubscriptionQuota
|
|
35
|
+
*/
|
|
36
|
+
outputTokensMonthly: number;
|
|
37
|
+
/**
|
|
38
|
+
* Weighted input+output tokens allowed over a ROLLING 7-day window. This cap slides with the clock; it does not reset with the billing period.
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof SubscriptionQuota
|
|
41
|
+
*/
|
|
42
|
+
weeklyTokens: number;
|
|
43
|
+
/**
|
|
44
|
+
* Per-period backstop on list-price metered cost, in micro-cents (1e-6 cent). 0 means no backstop is configured on this deployment.
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof SubscriptionQuota
|
|
47
|
+
*/
|
|
48
|
+
maxUsageMicroCents: number;
|
|
49
|
+
/**
|
|
50
|
+
* Deprecated and always 0. There is no subscriber discount on pay-as-you-go spend: a request that exhausts the plan quota bills at list rates, the same rates an org without a subscription pays. The field is retained so existing deserializers keep working and will be removed in the next breaking revision. Do not display it.
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof SubscriptionQuota
|
|
53
|
+
* @deprecated
|
|
54
|
+
*/
|
|
55
|
+
paygDiscountBp: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the SubscriptionQuota interface.
|
|
60
|
+
*/
|
|
61
|
+
export function instanceOfSubscriptionQuota(value: object): value is SubscriptionQuota {
|
|
62
|
+
if ((!('inputTokensMonthly' in (value as Record<string, any>)) && !('input_tokens_monthly' in (value as Record<string, any>))) || ((value as Record<string, any>)['inputTokensMonthly'] === undefined && (value as Record<string, any>)['input_tokens_monthly'] === undefined)) return false;
|
|
63
|
+
if ((!('outputTokensMonthly' in (value as Record<string, any>)) && !('output_tokens_monthly' in (value as Record<string, any>))) || ((value as Record<string, any>)['outputTokensMonthly'] === undefined && (value as Record<string, any>)['output_tokens_monthly'] === undefined)) return false;
|
|
64
|
+
if ((!('weeklyTokens' in (value as Record<string, any>)) && !('weekly_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['weeklyTokens'] === undefined && (value as Record<string, any>)['weekly_tokens'] === undefined)) return false;
|
|
65
|
+
if ((!('maxUsageMicroCents' in (value as Record<string, any>)) && !('max_usage_micro_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['maxUsageMicroCents'] === undefined && (value as Record<string, any>)['max_usage_micro_cents'] === undefined)) return false;
|
|
66
|
+
if ((!('paygDiscountBp' in (value as Record<string, any>)) && !('payg_discount_bp' in (value as Record<string, any>))) || ((value as Record<string, any>)['paygDiscountBp'] === undefined && (value as Record<string, any>)['payg_discount_bp'] === undefined)) return false;
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function SubscriptionQuotaFromJSON(json: any): SubscriptionQuota {
|
|
71
|
+
return SubscriptionQuotaFromJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function SubscriptionQuotaFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionQuota {
|
|
75
|
+
if (json == null) {
|
|
76
|
+
return json;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'inputTokensMonthly': json['input_tokens_monthly'],
|
|
81
|
+
'outputTokensMonthly': json['output_tokens_monthly'],
|
|
82
|
+
'weeklyTokens': json['weekly_tokens'],
|
|
83
|
+
'maxUsageMicroCents': json['max_usage_micro_cents'],
|
|
84
|
+
'paygDiscountBp': json['payg_discount_bp'],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function SubscriptionQuotaToJSON(json: any): SubscriptionQuota {
|
|
89
|
+
return SubscriptionQuotaToJSONTyped(json, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function SubscriptionQuotaToJSONTyped(value?: SubscriptionQuota | null, ignoreDiscriminator: boolean = false): any {
|
|
93
|
+
if (value == null) {
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
|
|
99
|
+
'input_tokens_monthly': value['inputTokensMonthly'],
|
|
100
|
+
'output_tokens_monthly': value['outputTokensMonthly'],
|
|
101
|
+
'weekly_tokens': value['weeklyTokens'],
|
|
102
|
+
'max_usage_micro_cents': value['maxUsageMicroCents'],
|
|
103
|
+
'payg_discount_bp': value['paygDiscountBp'],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
* Consumption against the quota, from the same factor-weighted read the request-time gate evaluates — so this meter and enforcement cannot disagree.
|
|
18
|
+
*
|
|
19
|
+
* Present only for an entitled subscription whose meter could be read. Its absence is never a statement that nothing was used.
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @interface SubscriptionUsage
|
|
23
|
+
*/
|
|
24
|
+
export interface SubscriptionUsage {
|
|
25
|
+
/**
|
|
26
|
+
* Start of the window the period figures were summed over: the subscription's current period, or the UTC calendar month when the billing provider has not reported one yet.
|
|
27
|
+
* @type {Date}
|
|
28
|
+
* @memberof SubscriptionUsage
|
|
29
|
+
*/
|
|
30
|
+
periodStart: Date;
|
|
31
|
+
/**
|
|
32
|
+
* End of that window.
|
|
33
|
+
* @type {Date}
|
|
34
|
+
* @memberof SubscriptionUsage
|
|
35
|
+
*/
|
|
36
|
+
periodEnd: Date;
|
|
37
|
+
/**
|
|
38
|
+
* Weighted input tokens spent this period, against `quota.input_tokens_monthly`.
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof SubscriptionUsage
|
|
41
|
+
*/
|
|
42
|
+
weightedInputTokens: number;
|
|
43
|
+
/**
|
|
44
|
+
* Weighted output tokens spent this period, against `quota.output_tokens_monthly`.
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof SubscriptionUsage
|
|
47
|
+
*/
|
|
48
|
+
weightedOutputTokens: number;
|
|
49
|
+
/**
|
|
50
|
+
* Weighted input+output tokens over the trailing 7 days, against `quota.weekly_tokens`. A rolling figure, not a period one — it can be non-zero moments after a period rolls over.
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof SubscriptionUsage
|
|
53
|
+
*/
|
|
54
|
+
weeklyWeightedTokens: number;
|
|
55
|
+
/**
|
|
56
|
+
* List-price metered cost of this period's plan traffic in micro-cents (1e-6 cent), against `quota.max_usage_micro_cents`.
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof SubscriptionUsage
|
|
59
|
+
*/
|
|
60
|
+
costMicroCents: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Check if a given object implements the SubscriptionUsage interface.
|
|
65
|
+
*/
|
|
66
|
+
export function instanceOfSubscriptionUsage(value: object): value is SubscriptionUsage {
|
|
67
|
+
if ((!('periodStart' in (value as Record<string, any>)) && !('period_start' in (value as Record<string, any>))) || ((value as Record<string, any>)['periodStart'] === undefined && (value as Record<string, any>)['period_start'] === undefined)) return false;
|
|
68
|
+
if ((!('periodEnd' in (value as Record<string, any>)) && !('period_end' in (value as Record<string, any>))) || ((value as Record<string, any>)['periodEnd'] === undefined && (value as Record<string, any>)['period_end'] === undefined)) return false;
|
|
69
|
+
if ((!('weightedInputTokens' in (value as Record<string, any>)) && !('weighted_input_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['weightedInputTokens'] === undefined && (value as Record<string, any>)['weighted_input_tokens'] === undefined)) return false;
|
|
70
|
+
if ((!('weightedOutputTokens' in (value as Record<string, any>)) && !('weighted_output_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['weightedOutputTokens'] === undefined && (value as Record<string, any>)['weighted_output_tokens'] === undefined)) return false;
|
|
71
|
+
if ((!('weeklyWeightedTokens' in (value as Record<string, any>)) && !('weekly_weighted_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['weeklyWeightedTokens'] === undefined && (value as Record<string, any>)['weekly_weighted_tokens'] === undefined)) return false;
|
|
72
|
+
if ((!('costMicroCents' in (value as Record<string, any>)) && !('cost_micro_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['costMicroCents'] === undefined && (value as Record<string, any>)['cost_micro_cents'] === undefined)) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function SubscriptionUsageFromJSON(json: any): SubscriptionUsage {
|
|
77
|
+
return SubscriptionUsageFromJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function SubscriptionUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionUsage {
|
|
81
|
+
if (json == null) {
|
|
82
|
+
return json;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'periodStart': (new Date(json['period_start'])),
|
|
87
|
+
'periodEnd': (new Date(json['period_end'])),
|
|
88
|
+
'weightedInputTokens': json['weighted_input_tokens'],
|
|
89
|
+
'weightedOutputTokens': json['weighted_output_tokens'],
|
|
90
|
+
'weeklyWeightedTokens': json['weekly_weighted_tokens'],
|
|
91
|
+
'costMicroCents': json['cost_micro_cents'],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function SubscriptionUsageToJSON(json: any): SubscriptionUsage {
|
|
96
|
+
return SubscriptionUsageToJSONTyped(json, false);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function SubscriptionUsageToJSONTyped(value?: SubscriptionUsage | null, ignoreDiscriminator: boolean = false): any {
|
|
100
|
+
if (value == null) {
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return {
|
|
105
|
+
|
|
106
|
+
'period_start': value['periodStart'].toISOString(),
|
|
107
|
+
'period_end': value['periodEnd'].toISOString(),
|
|
108
|
+
'weighted_input_tokens': value['weightedInputTokens'],
|
|
109
|
+
'weighted_output_tokens': value['weightedOutputTokens'],
|
|
110
|
+
'weekly_weighted_tokens': value['weeklyWeightedTokens'],
|
|
111
|
+
'cost_micro_cents': value['costMicroCents'],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
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 UpdateSpendingLimitRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface UpdateSpendingLimitRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Monthly limit in USD (minimum 1.00).
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof UpdateSpendingLimitRequest
|
|
26
|
+
*/
|
|
27
|
+
monthlyLimitDollars: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {UpdateSpendingLimitRequestEnforcementEnum}
|
|
31
|
+
* @memberof UpdateSpendingLimitRequest
|
|
32
|
+
*/
|
|
33
|
+
enforcement?: UpdateSpendingLimitRequestEnforcementEnum;
|
|
34
|
+
/**
|
|
35
|
+
* Hours after the limit is reached before auto-terminate; null = never.
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof UpdateSpendingLimitRequest
|
|
38
|
+
*/
|
|
39
|
+
autoTerminateHours?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Opt-in daily cap in USD. Omit = unchanged, 0 = clear, > 0 = set.
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof UpdateSpendingLimitRequest
|
|
44
|
+
*/
|
|
45
|
+
dailyLimitDollars?: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export const UpdateSpendingLimitRequestEnforcementEnum = {
|
|
53
|
+
StopRunning: 'stop_running',
|
|
54
|
+
BlockLaunch: 'block_launch',
|
|
55
|
+
NotifyOnly: 'notify_only'
|
|
56
|
+
} as const;
|
|
57
|
+
export type UpdateSpendingLimitRequestEnforcementEnum = typeof UpdateSpendingLimitRequestEnforcementEnum[keyof typeof UpdateSpendingLimitRequestEnforcementEnum];
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the UpdateSpendingLimitRequest interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfUpdateSpendingLimitRequest(value: object): value is UpdateSpendingLimitRequest {
|
|
64
|
+
if ((!('monthlyLimitDollars' in (value as Record<string, any>)) && !('monthly_limit_dollars' in (value as Record<string, any>))) || ((value as Record<string, any>)['monthlyLimitDollars'] === undefined && (value as Record<string, any>)['monthly_limit_dollars'] === undefined)) return false;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function UpdateSpendingLimitRequestFromJSON(json: any): UpdateSpendingLimitRequest {
|
|
69
|
+
return UpdateSpendingLimitRequestFromJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function UpdateSpendingLimitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSpendingLimitRequest {
|
|
73
|
+
if (json == null) {
|
|
74
|
+
return json;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'monthlyLimitDollars': json['monthly_limit_dollars'],
|
|
79
|
+
'enforcement': json['enforcement'] == null ? undefined : json['enforcement'],
|
|
80
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
81
|
+
'dailyLimitDollars': json['daily_limit_dollars'] == null ? undefined : json['daily_limit_dollars'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function UpdateSpendingLimitRequestToJSON(json: any): UpdateSpendingLimitRequest {
|
|
86
|
+
return UpdateSpendingLimitRequestToJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function UpdateSpendingLimitRequestToJSONTyped(value?: UpdateSpendingLimitRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
90
|
+
if (value == null) {
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'monthly_limit_dollars': value['monthlyLimitDollars'],
|
|
97
|
+
'enforcement': value['enforcement'],
|
|
98
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
99
|
+
'daily_limit_dollars': value['dailyLimitDollars'],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
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 Usage
|
|
20
|
+
*/
|
|
21
|
+
export interface Usage {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof Usage
|
|
26
|
+
*/
|
|
27
|
+
promptTokens: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof Usage
|
|
32
|
+
*/
|
|
33
|
+
completionTokens: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof Usage
|
|
38
|
+
*/
|
|
39
|
+
totalTokens: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the Usage interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfUsage(value: object): value is Usage {
|
|
46
|
+
if ((!('promptTokens' in (value as Record<string, any>)) && !('prompt_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['promptTokens'] === undefined && (value as Record<string, any>)['prompt_tokens'] === undefined)) return false;
|
|
47
|
+
if ((!('completionTokens' in (value as Record<string, any>)) && !('completion_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['completionTokens'] === undefined && (value as Record<string, any>)['completion_tokens'] === undefined)) return false;
|
|
48
|
+
if ((!('totalTokens' in (value as Record<string, any>)) && !('total_tokens' in (value as Record<string, any>))) || ((value as Record<string, any>)['totalTokens'] === undefined && (value as Record<string, any>)['total_tokens'] === undefined)) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function UsageFromJSON(json: any): Usage {
|
|
53
|
+
return UsageFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function UsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Usage {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'promptTokens': json['prompt_tokens'],
|
|
63
|
+
'completionTokens': json['completion_tokens'],
|
|
64
|
+
'totalTokens': json['total_tokens'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function UsageToJSON(json: any): Usage {
|
|
69
|
+
return UsageToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function UsageToJSONTyped(value?: Usage | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'prompt_tokens': value['promptTokens'],
|
|
80
|
+
'completion_tokens': value['completionTokens'],
|
|
81
|
+
'total_tokens': value['totalTokens'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
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 UsageBucket
|
|
20
|
+
*/
|
|
21
|
+
export interface UsageBucket {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {Date}
|
|
25
|
+
* @memberof UsageBucket
|
|
26
|
+
*/
|
|
27
|
+
bucketStart: Date;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof UsageBucket
|
|
32
|
+
*/
|
|
33
|
+
instanceId?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof UsageBucket
|
|
38
|
+
*/
|
|
39
|
+
gpuType?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof UsageBucket
|
|
44
|
+
*/
|
|
45
|
+
gpuSeconds: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof UsageBucket
|
|
50
|
+
*/
|
|
51
|
+
costCents: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the UsageBucket interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfUsageBucket(value: object): value is UsageBucket {
|
|
58
|
+
if ((!('bucketStart' in (value as Record<string, any>)) && !('bucket_start' in (value as Record<string, any>))) || ((value as Record<string, any>)['bucketStart'] === undefined && (value as Record<string, any>)['bucket_start'] === undefined)) return false;
|
|
59
|
+
if ((!('gpuSeconds' in (value as Record<string, any>)) && !('gpu_seconds' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuSeconds'] === undefined && (value as Record<string, any>)['gpu_seconds'] === undefined)) return false;
|
|
60
|
+
if ((!('costCents' in (value as Record<string, any>)) && !('cost_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['costCents'] === undefined && (value as Record<string, any>)['cost_cents'] === undefined)) return false;
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function UsageBucketFromJSON(json: any): UsageBucket {
|
|
65
|
+
return UsageBucketFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function UsageBucketFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageBucket {
|
|
69
|
+
if (json == null) {
|
|
70
|
+
return json;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'bucketStart': (new Date(json['bucket_start'])),
|
|
75
|
+
'instanceId': json['instance_id'] == null ? undefined : json['instance_id'],
|
|
76
|
+
'gpuType': json['gpu_type'] == null ? undefined : json['gpu_type'],
|
|
77
|
+
'gpuSeconds': json['gpu_seconds'],
|
|
78
|
+
'costCents': json['cost_cents'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function UsageBucketToJSON(json: any): UsageBucket {
|
|
83
|
+
return UsageBucketToJSONTyped(json, false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function UsageBucketToJSONTyped(value?: UsageBucket | null, ignoreDiscriminator: boolean = false): any {
|
|
87
|
+
if (value == null) {
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
|
|
93
|
+
'bucket_start': value['bucketStart'].toISOString(),
|
|
94
|
+
'instance_id': value['instanceId'],
|
|
95
|
+
'gpu_type': value['gpuType'],
|
|
96
|
+
'gpu_seconds': value['gpuSeconds'],
|
|
97
|
+
'cost_cents': value['costCents'],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
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 { UsageBucket } from './UsageBucket';
|
|
17
|
+
import {
|
|
18
|
+
UsageBucketFromJSON,
|
|
19
|
+
UsageBucketFromJSONTyped,
|
|
20
|
+
UsageBucketToJSON,
|
|
21
|
+
UsageBucketToJSONTyped,
|
|
22
|
+
} from './UsageBucket';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UsagePage
|
|
28
|
+
*/
|
|
29
|
+
export interface UsagePage {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<UsageBucket>}
|
|
33
|
+
* @memberof UsagePage
|
|
34
|
+
*/
|
|
35
|
+
data: Array<UsageBucket>;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UsagePage
|
|
40
|
+
*/
|
|
41
|
+
nextCursor: string | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the UsagePage interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfUsagePage(value: object): value is UsagePage {
|
|
48
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
49
|
+
if ((!('nextCursor' in (value as Record<string, any>)) && !('next_cursor' in (value as Record<string, any>))) || ((value as Record<string, any>)['nextCursor'] === undefined && (value as Record<string, any>)['next_cursor'] === undefined)) return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function UsagePageFromJSON(json: any): UsagePage {
|
|
54
|
+
return UsagePageFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function UsagePageFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsagePage {
|
|
58
|
+
if (json == null) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'data': ((json['data'] as Array<any>).map(UsageBucketFromJSON)),
|
|
64
|
+
'nextCursor': json['next_cursor'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function UsagePageToJSON(json: any): UsagePage {
|
|
69
|
+
return UsagePageToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function UsagePageToJSONTyped(value?: UsagePage | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'data': ((value['data'] as Array<any>).map(UsageBucketToJSON)),
|
|
80
|
+
'next_cursor': value['nextCursor'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|