@deeprelay/sdk 0.1.0 → 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 +10 -0
- package/README.md +10 -2
- package/dist/apis/BillingApi.d.ts +38 -0
- package/dist/apis/BillingApi.js +96 -0
- package/dist/apis/InferenceApi.d.ts +18 -0
- package/dist/apis/InferenceApi.js +51 -0
- package/dist/esm/apis/BillingApi.d.ts +38 -0
- package/dist/esm/apis/BillingApi.js +96 -0
- package/dist/esm/apis/InferenceApi.d.ts +18 -0
- package/dist/esm/apis/InferenceApi.js +51 -0
- package/dist/esm/models/InferencePreflight.d.ts +92 -0
- package/dist/esm/models/InferencePreflight.js +86 -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/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/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/InferencePreflight.d.ts +92 -0
- package/dist/models/InferencePreflight.js +94 -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/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/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/runtime.js +1 -1
- package/docs/BillingApi.md +154 -0
- package/docs/InferenceApi.md +74 -0
- package/docs/InferencePreflight.md +47 -0
- package/docs/SubscriptionCheckoutRequest.md +39 -0
- package/docs/SubscriptionCheckoutSession.md +38 -0
- package/docs/SubscriptionPortalRequest.md +35 -0
- package/docs/SubscriptionPortalSession.md +34 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +128 -0
- package/src/apis/InferenceApi.ts +67 -0
- package/src/models/InferencePreflight.ts +147 -0
- package/src/models/SubscriptionCheckoutRequest.ts +82 -0
- package/src/models/SubscriptionCheckoutSession.ts +92 -0
- package/src/models/SubscriptionPortalRequest.ts +65 -0
- package/src/models/SubscriptionPortalSession.ts +66 -0
- package/src/models/index.ts +5 -0
- package/src/runtime.ts +1 -1
|
@@ -27,6 +27,7 @@ import { EmbeddingsRequestToJSON, } from '../models/EmbeddingsRequest';
|
|
|
27
27
|
import { EmbeddingsResponseFromJSON, } from '../models/EmbeddingsResponse';
|
|
28
28
|
import { ImagesGenerationsRequestToJSON, } from '../models/ImagesGenerationsRequest';
|
|
29
29
|
import { ImagesResponseFromJSON, } from '../models/ImagesResponse';
|
|
30
|
+
import { InferencePreflightFromJSON, } from '../models/InferencePreflight';
|
|
30
31
|
import { ModelFromJSON, } from '../models/Model';
|
|
31
32
|
import { ModelListFromJSON, } from '../models/ModelList';
|
|
32
33
|
import { VideoCreateRequestToJSON, } from '../models/VideoCreateRequest';
|
|
@@ -422,6 +423,56 @@ export class InferenceApi extends runtime.BaseAPI {
|
|
|
422
423
|
return yield response.value();
|
|
423
424
|
});
|
|
424
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* Creates request options for inferencePreflight without sending the request
|
|
428
|
+
*/
|
|
429
|
+
inferencePreflightRequestOpts(requestParameters) {
|
|
430
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
431
|
+
if (requestParameters['model'] == null) {
|
|
432
|
+
throw new runtime.RequiredError('model', 'Required parameter "model" was null or undefined when calling inferencePreflight().');
|
|
433
|
+
}
|
|
434
|
+
const queryParameters = {};
|
|
435
|
+
if (requestParameters['model'] != null) {
|
|
436
|
+
queryParameters['model'] = requestParameters['model'];
|
|
437
|
+
}
|
|
438
|
+
const headerParameters = {};
|
|
439
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
440
|
+
const token = this.configuration.accessToken;
|
|
441
|
+
const tokenString = yield token("bearerAuth", []);
|
|
442
|
+
if (tokenString) {
|
|
443
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
let urlPath = `/inference/preflight`;
|
|
447
|
+
return {
|
|
448
|
+
path: urlPath,
|
|
449
|
+
method: 'GET',
|
|
450
|
+
headers: headerParameters,
|
|
451
|
+
query: queryParameters,
|
|
452
|
+
};
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Answers \"what happens if I call this model right now?\" before the call is made: whether the plan covers the model, whether the organization is subscribed, and whether there is credit to pay if it is not covered. Requires the `serverless:read` scope. Nothing is sent, counted, charged, or reserved. The verdict is computed from the state of the SAME gates that judge the real request — plan coverage, subscription entitlement, remaining plan quota, credit balance and self-set spending caps — so the advice cannot drift from enforcement. It is deliberately NOT a dry run: no per-request cost estimate is quoted, because that figure changes with every prompt and quoting it would invite clients to cache it. The gates consulted depend on the model\'s MODALITY, because the endpoints do not all meet the same ones. Chat, embeddings and image requests meet the full gate (balance, then the organization\'s opt-in daily cap, then its monthly cap). Video creation meets only the balance check, so an organization past its own spending cap but holding credit is reported as fundable for video — which is what the video endpoint will in fact do. Predicting the strictest gate rather than the applicable one would make this endpoint refuse requests the API accepts. The same is true of the plan: video creation does not run the subscription gate, so `plan_covered` is false for a video model even if an operator has placed it on the plan\'s covered list. That is a deliberate divergence from the same-named field on `/v1/models`, which reports the platform\'s configuration. Here it means \"the plan covers this REQUEST\" — describing what will happen is the entire job of a preflight. One caveat on \"read-only\": resolving the balance creates the organization\'s balance row if it has never had one (idempotent, org-scoped, and the same row the first real request would create). Nothing else is written. The case this exists for is `warn` / `not_plan_covered`. A subscriber calling a model outside the plan IS served and IS charged pay-as-you-go, and nothing in the response to that request says so — the first signal used to be the invoice. `funded` is a boolean and never a figure. This route is on the inference read scope, so it must not disclose the organization\'s balance; use `/billing/balance` for the number. Failure posture is the opposite of the request gate\'s: any gate that cannot be read degrades the verdict toward `ok`, never toward `block`. A false `block` would stop a customer whose request would have succeeded, while a false `ok` costs them one honest error from the real call.
|
|
457
|
+
* Check whether a model request would be served, and at whose expense
|
|
458
|
+
*/
|
|
459
|
+
inferencePreflightRaw(requestParameters, initOverrides) {
|
|
460
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
461
|
+
const requestOptions = yield this.inferencePreflightRequestOpts(requestParameters);
|
|
462
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
463
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InferencePreflightFromJSON(jsonValue));
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Answers \"what happens if I call this model right now?\" before the call is made: whether the plan covers the model, whether the organization is subscribed, and whether there is credit to pay if it is not covered. Requires the `serverless:read` scope. Nothing is sent, counted, charged, or reserved. The verdict is computed from the state of the SAME gates that judge the real request — plan coverage, subscription entitlement, remaining plan quota, credit balance and self-set spending caps — so the advice cannot drift from enforcement. It is deliberately NOT a dry run: no per-request cost estimate is quoted, because that figure changes with every prompt and quoting it would invite clients to cache it. The gates consulted depend on the model\'s MODALITY, because the endpoints do not all meet the same ones. Chat, embeddings and image requests meet the full gate (balance, then the organization\'s opt-in daily cap, then its monthly cap). Video creation meets only the balance check, so an organization past its own spending cap but holding credit is reported as fundable for video — which is what the video endpoint will in fact do. Predicting the strictest gate rather than the applicable one would make this endpoint refuse requests the API accepts. The same is true of the plan: video creation does not run the subscription gate, so `plan_covered` is false for a video model even if an operator has placed it on the plan\'s covered list. That is a deliberate divergence from the same-named field on `/v1/models`, which reports the platform\'s configuration. Here it means \"the plan covers this REQUEST\" — describing what will happen is the entire job of a preflight. One caveat on \"read-only\": resolving the balance creates the organization\'s balance row if it has never had one (idempotent, org-scoped, and the same row the first real request would create). Nothing else is written. The case this exists for is `warn` / `not_plan_covered`. A subscriber calling a model outside the plan IS served and IS charged pay-as-you-go, and nothing in the response to that request says so — the first signal used to be the invoice. `funded` is a boolean and never a figure. This route is on the inference read scope, so it must not disclose the organization\'s balance; use `/billing/balance` for the number. Failure posture is the opposite of the request gate\'s: any gate that cannot be read degrades the verdict toward `ok`, never toward `block`. A false `block` would stop a customer whose request would have succeeded, while a false `ok` costs them one honest error from the real call.
|
|
468
|
+
* Check whether a model request would be served, and at whose expense
|
|
469
|
+
*/
|
|
470
|
+
inferencePreflight(requestParameters, initOverrides) {
|
|
471
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
472
|
+
const response = yield this.inferencePreflightRaw(requestParameters, initOverrides);
|
|
473
|
+
return yield response.value();
|
|
474
|
+
});
|
|
475
|
+
}
|
|
425
476
|
/**
|
|
426
477
|
* Creates request options for listModels without sending the request
|
|
427
478
|
*/
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* deeprelay Public Developer API
|
|
3
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@deeprelay.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The verdict for one (organization, model) pair: what would happen if the model were invoked right now.
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface InferencePreflight
|
|
17
|
+
*/
|
|
18
|
+
export interface InferencePreflight {
|
|
19
|
+
/**
|
|
20
|
+
* The canonical catalog id the request resolved to.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof InferencePreflight
|
|
23
|
+
*/
|
|
24
|
+
model: string;
|
|
25
|
+
/**
|
|
26
|
+
* `ok` — the request will be served (covered by the plan, or payable). `warn` — it will be served AND charged in a way the caller may not expect. `block` — it will be refused (402 or 429).
|
|
27
|
+
* @type {InferencePreflightVerdictEnum}
|
|
28
|
+
* @memberof InferencePreflight
|
|
29
|
+
*/
|
|
30
|
+
verdict: InferencePreflightVerdictEnum;
|
|
31
|
+
/**
|
|
32
|
+
* Stable code explaining the verdict, for clients that need their own wording. Absent on a plain `ok` that needs no explanation.
|
|
33
|
+
* @type {InferencePreflightReasonEnum}
|
|
34
|
+
* @memberof InferencePreflight
|
|
35
|
+
*/
|
|
36
|
+
reason?: InferencePreflightReasonEnum;
|
|
37
|
+
/**
|
|
38
|
+
* A ready-to-print sentence, phrased for this exact plan/credit combination. Prefer it over composing one from verdict and reason: it improves without a client release.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof InferencePreflight
|
|
41
|
+
*/
|
|
42
|
+
message: string;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the subscription tier covers this model. A property of the PLATFORM, not of the caller — it stays true for an organization that has no subscription, which is what makes the "this is included in the plan" upsell honest.
|
|
45
|
+
* @type {boolean}
|
|
46
|
+
* @memberof InferencePreflight
|
|
47
|
+
*/
|
|
48
|
+
planCovered: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the organization is entitled to the plan right now.
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof InferencePreflight
|
|
53
|
+
*/
|
|
54
|
+
subscribed: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether a pay-as-you-go request could be paid for right now: a positive credit balance AND no self-set spending cap already at its limit. A boolean and never a figure — this route is on the inference read scope and must not disclose the balance.
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof InferencePreflight
|
|
59
|
+
*/
|
|
60
|
+
funded: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const InferencePreflightVerdictEnum: {
|
|
66
|
+
readonly Ok: "ok";
|
|
67
|
+
readonly Warn: "warn";
|
|
68
|
+
readonly Block: "block";
|
|
69
|
+
};
|
|
70
|
+
export type InferencePreflightVerdictEnum = typeof InferencePreflightVerdictEnum[keyof typeof InferencePreflightVerdictEnum];
|
|
71
|
+
/**
|
|
72
|
+
* @export
|
|
73
|
+
*/
|
|
74
|
+
export declare const InferencePreflightReasonEnum: {
|
|
75
|
+
readonly PlanCovered: "plan_covered";
|
|
76
|
+
readonly Payg: "payg";
|
|
77
|
+
readonly NotPlanCovered: "not_plan_covered";
|
|
78
|
+
readonly SubscriptionQuotaExhausted: "subscription_quota_exhausted";
|
|
79
|
+
readonly InsufficientBalance: "insufficient_balance";
|
|
80
|
+
readonly DailyLimitReached: "daily_limit_reached";
|
|
81
|
+
readonly MonthlyLimitReached: "monthly_limit_reached";
|
|
82
|
+
readonly PreflightUnavailable: "preflight_unavailable";
|
|
83
|
+
};
|
|
84
|
+
export type InferencePreflightReasonEnum = typeof InferencePreflightReasonEnum[keyof typeof InferencePreflightReasonEnum];
|
|
85
|
+
/**
|
|
86
|
+
* Check if a given object implements the InferencePreflight interface.
|
|
87
|
+
*/
|
|
88
|
+
export declare function instanceOfInferencePreflight(value: object): value is InferencePreflight;
|
|
89
|
+
export declare function InferencePreflightFromJSON(json: any): InferencePreflight;
|
|
90
|
+
export declare function InferencePreflightFromJSONTyped(json: any, ignoreDiscriminator: boolean): InferencePreflight;
|
|
91
|
+
export declare function InferencePreflightToJSON(json: any): InferencePreflight;
|
|
92
|
+
export declare function InferencePreflightToJSONTyped(value?: InferencePreflight | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const InferencePreflightVerdictEnum = {
|
|
18
|
+
Ok: 'ok',
|
|
19
|
+
Warn: 'warn',
|
|
20
|
+
Block: 'block'
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const InferencePreflightReasonEnum = {
|
|
26
|
+
PlanCovered: 'plan_covered',
|
|
27
|
+
Payg: 'payg',
|
|
28
|
+
NotPlanCovered: 'not_plan_covered',
|
|
29
|
+
SubscriptionQuotaExhausted: 'subscription_quota_exhausted',
|
|
30
|
+
InsufficientBalance: 'insufficient_balance',
|
|
31
|
+
DailyLimitReached: 'daily_limit_reached',
|
|
32
|
+
MonthlyLimitReached: 'monthly_limit_reached',
|
|
33
|
+
PreflightUnavailable: 'preflight_unavailable'
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Check if a given object implements the InferencePreflight interface.
|
|
37
|
+
*/
|
|
38
|
+
export function instanceOfInferencePreflight(value) {
|
|
39
|
+
if (!('model' in value) || value['model'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('verdict' in value) || value['verdict'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('message' in value) || value['message'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if ((!('planCovered' in value) && !('plan_covered' in value)) || (value['planCovered'] === undefined && value['plan_covered'] === undefined))
|
|
46
|
+
return false;
|
|
47
|
+
if (!('subscribed' in value) || value['subscribed'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('funded' in value) || value['funded'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
export function InferencePreflightFromJSON(json) {
|
|
54
|
+
return InferencePreflightFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
export function InferencePreflightFromJSONTyped(json, ignoreDiscriminator) {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'model': json['model'],
|
|
62
|
+
'verdict': json['verdict'],
|
|
63
|
+
'reason': json['reason'] == null ? undefined : json['reason'],
|
|
64
|
+
'message': json['message'],
|
|
65
|
+
'planCovered': json['plan_covered'],
|
|
66
|
+
'subscribed': json['subscribed'],
|
|
67
|
+
'funded': json['funded'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export function InferencePreflightToJSON(json) {
|
|
71
|
+
return InferencePreflightToJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
export function InferencePreflightToJSONTyped(value, ignoreDiscriminator = false) {
|
|
74
|
+
if (value == null) {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
'model': value['model'],
|
|
79
|
+
'verdict': value['verdict'],
|
|
80
|
+
'reason': value['reason'],
|
|
81
|
+
'message': value['message'],
|
|
82
|
+
'plan_covered': value['planCovered'],
|
|
83
|
+
'subscribed': value['subscribed'],
|
|
84
|
+
'funded': value['funded'],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* deeprelay Public Developer API
|
|
3
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@deeprelay.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Optional overrides for a checkout mint. Every field has a deployment default, so an empty body is the normal call.
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SubscriptionCheckoutRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface SubscriptionCheckoutRequest {
|
|
19
|
+
/**
|
|
20
|
+
* Where the provider returns after a completed payment. Defaults to the deployment's configured URL.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof SubscriptionCheckoutRequest
|
|
23
|
+
*/
|
|
24
|
+
successUrl?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Where the provider returns if checkout is abandoned. Defaults to the deployment's configured URL.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof SubscriptionCheckoutRequest
|
|
29
|
+
*/
|
|
30
|
+
cancelUrl?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Pins the plan the client displayed. An unknown key is a 400 rather than a silent purchase of a different tier.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof SubscriptionCheckoutRequest
|
|
35
|
+
*/
|
|
36
|
+
planKey?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the SubscriptionCheckoutRequest interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfSubscriptionCheckoutRequest(value: object): value is SubscriptionCheckoutRequest;
|
|
42
|
+
export declare function SubscriptionCheckoutRequestFromJSON(json: any): SubscriptionCheckoutRequest;
|
|
43
|
+
export declare function SubscriptionCheckoutRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionCheckoutRequest;
|
|
44
|
+
export declare function SubscriptionCheckoutRequestToJSON(json: any): SubscriptionCheckoutRequest;
|
|
45
|
+
export declare function SubscriptionCheckoutRequestToJSONTyped(value?: SubscriptionCheckoutRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
* Check if a given object implements the SubscriptionCheckoutRequest interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfSubscriptionCheckoutRequest(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function SubscriptionCheckoutRequestFromJSON(json) {
|
|
21
|
+
return SubscriptionCheckoutRequestFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function SubscriptionCheckoutRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'successUrl': json['success_url'] == null ? undefined : json['success_url'],
|
|
29
|
+
'cancelUrl': json['cancel_url'] == null ? undefined : json['cancel_url'],
|
|
30
|
+
'planKey': json['plan_key'] == null ? undefined : json['plan_key'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function SubscriptionCheckoutRequestToJSON(json) {
|
|
34
|
+
return SubscriptionCheckoutRequestToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function SubscriptionCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'success_url': value['successUrl'],
|
|
42
|
+
'cancel_url': value['cancelUrl'],
|
|
43
|
+
'plan_key': value['planKey'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* deeprelay Public Developer API
|
|
3
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@deeprelay.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { SubscriptionPlan } from './SubscriptionPlan';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SubscriptionCheckoutSession
|
|
17
|
+
*/
|
|
18
|
+
export interface SubscriptionCheckoutSession {
|
|
19
|
+
/**
|
|
20
|
+
* The hosted page the customer must open to pay.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof SubscriptionCheckoutSession
|
|
23
|
+
*/
|
|
24
|
+
checkoutUrl: string;
|
|
25
|
+
/**
|
|
26
|
+
* Checkout session id, for support correlation.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof SubscriptionCheckoutSession
|
|
29
|
+
*/
|
|
30
|
+
sessionId: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {SubscriptionPlan}
|
|
34
|
+
* @memberof SubscriptionCheckoutSession
|
|
35
|
+
*/
|
|
36
|
+
plan: SubscriptionPlan;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the SubscriptionCheckoutSession interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfSubscriptionCheckoutSession(value: object): value is SubscriptionCheckoutSession;
|
|
42
|
+
export declare function SubscriptionCheckoutSessionFromJSON(json: any): SubscriptionCheckoutSession;
|
|
43
|
+
export declare function SubscriptionCheckoutSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionCheckoutSession;
|
|
44
|
+
export declare function SubscriptionCheckoutSessionToJSON(json: any): SubscriptionCheckoutSession;
|
|
45
|
+
export declare function SubscriptionCheckoutSessionToJSONTyped(value?: SubscriptionCheckoutSession | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
import { SubscriptionPlanFromJSON, SubscriptionPlanToJSON, } from './SubscriptionPlan';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the SubscriptionCheckoutSession interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfSubscriptionCheckoutSession(value) {
|
|
19
|
+
if ((!('checkoutUrl' in value) && !('checkout_url' in value)) || (value['checkoutUrl'] === undefined && value['checkout_url'] === undefined))
|
|
20
|
+
return false;
|
|
21
|
+
if ((!('sessionId' in value) && !('session_id' in value)) || (value['sessionId'] === undefined && value['session_id'] === undefined))
|
|
22
|
+
return false;
|
|
23
|
+
if (!('plan' in value) || value['plan'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
export function SubscriptionCheckoutSessionFromJSON(json) {
|
|
28
|
+
return SubscriptionCheckoutSessionFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
export function SubscriptionCheckoutSessionFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'checkoutUrl': json['checkout_url'],
|
|
36
|
+
'sessionId': json['session_id'],
|
|
37
|
+
'plan': SubscriptionPlanFromJSON(json['plan']),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function SubscriptionCheckoutSessionToJSON(json) {
|
|
41
|
+
return SubscriptionCheckoutSessionToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
export function SubscriptionCheckoutSessionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'checkout_url': value['checkoutUrl'],
|
|
49
|
+
'session_id': value['sessionId'],
|
|
50
|
+
'plan': SubscriptionPlanToJSON(value['plan']),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* deeprelay Public Developer API
|
|
3
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@deeprelay.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Optional overrides for a billing-portal mint.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SubscriptionPortalRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface SubscriptionPortalRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Where the provider returns when the customer leaves the portal. Defaults to the deployment's configured URL.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SubscriptionPortalRequest
|
|
22
|
+
*/
|
|
23
|
+
returnUrl?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the SubscriptionPortalRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfSubscriptionPortalRequest(value: object): value is SubscriptionPortalRequest;
|
|
29
|
+
export declare function SubscriptionPortalRequestFromJSON(json: any): SubscriptionPortalRequest;
|
|
30
|
+
export declare function SubscriptionPortalRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPortalRequest;
|
|
31
|
+
export declare function SubscriptionPortalRequestToJSON(json: any): SubscriptionPortalRequest;
|
|
32
|
+
export declare function SubscriptionPortalRequestToJSONTyped(value?: SubscriptionPortalRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
* Check if a given object implements the SubscriptionPortalRequest interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfSubscriptionPortalRequest(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function SubscriptionPortalRequestFromJSON(json) {
|
|
21
|
+
return SubscriptionPortalRequestFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function SubscriptionPortalRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'returnUrl': json['return_url'] == null ? undefined : json['return_url'],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function SubscriptionPortalRequestToJSON(json) {
|
|
32
|
+
return SubscriptionPortalRequestToJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function SubscriptionPortalRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
35
|
+
if (value == null) {
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'return_url': value['returnUrl'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* deeprelay Public Developer API
|
|
3
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@deeprelay.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SubscriptionPortalSession
|
|
16
|
+
*/
|
|
17
|
+
export interface SubscriptionPortalSession {
|
|
18
|
+
/**
|
|
19
|
+
* The hosted billing portal — cancel, resume, change payment method, download invoices.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SubscriptionPortalSession
|
|
22
|
+
*/
|
|
23
|
+
portalUrl: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the SubscriptionPortalSession interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfSubscriptionPortalSession(value: object): value is SubscriptionPortalSession;
|
|
29
|
+
export declare function SubscriptionPortalSessionFromJSON(json: any): SubscriptionPortalSession;
|
|
30
|
+
export declare function SubscriptionPortalSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPortalSession;
|
|
31
|
+
export declare function SubscriptionPortalSessionToJSON(json: any): SubscriptionPortalSession;
|
|
32
|
+
export declare function SubscriptionPortalSessionToJSONTyped(value?: SubscriptionPortalSession | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* Check if a given object implements the SubscriptionPortalSession interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfSubscriptionPortalSession(value) {
|
|
18
|
+
if ((!('portalUrl' in value) && !('portal_url' in value)) || (value['portalUrl'] === undefined && value['portal_url'] === undefined))
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
export function SubscriptionPortalSessionFromJSON(json) {
|
|
23
|
+
return SubscriptionPortalSessionFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function SubscriptionPortalSessionFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if (json == null) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
'portalUrl': json['portal_url'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function SubscriptionPortalSessionToJSON(json) {
|
|
34
|
+
return SubscriptionPortalSessionToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function SubscriptionPortalSessionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'portal_url': value['portalUrl'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -16,6 +16,7 @@ export * from './ImagesGenerationsRequest';
|
|
|
16
16
|
export * from './ImagesResponse';
|
|
17
17
|
export * from './ImagesResponseDataInner';
|
|
18
18
|
export * from './ImagesResponseUsage';
|
|
19
|
+
export * from './InferencePreflight';
|
|
19
20
|
export * from './ListDeposits200Response';
|
|
20
21
|
export * from './Model';
|
|
21
22
|
export * from './ModelList';
|
|
@@ -32,7 +33,11 @@ export * from './Problem';
|
|
|
32
33
|
export * from './SpendingLimit';
|
|
33
34
|
export * from './StreamOptions';
|
|
34
35
|
export * from './Subscription';
|
|
36
|
+
export * from './SubscriptionCheckoutRequest';
|
|
37
|
+
export * from './SubscriptionCheckoutSession';
|
|
35
38
|
export * from './SubscriptionPlan';
|
|
39
|
+
export * from './SubscriptionPortalRequest';
|
|
40
|
+
export * from './SubscriptionPortalSession';
|
|
36
41
|
export * from './SubscriptionPrice';
|
|
37
42
|
export * from './SubscriptionQuota';
|
|
38
43
|
export * from './SubscriptionUsage';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export * from './ImagesGenerationsRequest';
|
|
|
18
18
|
export * from './ImagesResponse';
|
|
19
19
|
export * from './ImagesResponseDataInner';
|
|
20
20
|
export * from './ImagesResponseUsage';
|
|
21
|
+
export * from './InferencePreflight';
|
|
21
22
|
export * from './ListDeposits200Response';
|
|
22
23
|
export * from './Model';
|
|
23
24
|
export * from './ModelList';
|
|
@@ -34,7 +35,11 @@ export * from './Problem';
|
|
|
34
35
|
export * from './SpendingLimit';
|
|
35
36
|
export * from './StreamOptions';
|
|
36
37
|
export * from './Subscription';
|
|
38
|
+
export * from './SubscriptionCheckoutRequest';
|
|
39
|
+
export * from './SubscriptionCheckoutSession';
|
|
37
40
|
export * from './SubscriptionPlan';
|
|
41
|
+
export * from './SubscriptionPortalRequest';
|
|
42
|
+
export * from './SubscriptionPortalSession';
|
|
38
43
|
export * from './SubscriptionPrice';
|
|
39
44
|
export * from './SubscriptionQuota';
|
|
40
45
|
export * from './SubscriptionUsage';
|
package/dist/esm/runtime.js
CHANGED
|
@@ -61,7 +61,7 @@ export class Configuration {
|
|
|
61
61
|
return undefined;
|
|
62
62
|
}
|
|
63
63
|
get headers() {
|
|
64
|
-
return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.1.
|
|
64
|
+
return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.1.1' }, this.configuration.headers);
|
|
65
65
|
}
|
|
66
66
|
get credentials() {
|
|
67
67
|
return this.configuration.credentials;
|