@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
|
@@ -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,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* deeprelay Public Developer API
|
|
6
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@deeprelay.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.InferencePreflightReasonEnum = exports.InferencePreflightVerdictEnum = void 0;
|
|
17
|
+
exports.instanceOfInferencePreflight = instanceOfInferencePreflight;
|
|
18
|
+
exports.InferencePreflightFromJSON = InferencePreflightFromJSON;
|
|
19
|
+
exports.InferencePreflightFromJSONTyped = InferencePreflightFromJSONTyped;
|
|
20
|
+
exports.InferencePreflightToJSON = InferencePreflightToJSON;
|
|
21
|
+
exports.InferencePreflightToJSONTyped = InferencePreflightToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.InferencePreflightVerdictEnum = {
|
|
26
|
+
Ok: 'ok',
|
|
27
|
+
Warn: 'warn',
|
|
28
|
+
Block: 'block'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
exports.InferencePreflightReasonEnum = {
|
|
34
|
+
PlanCovered: 'plan_covered',
|
|
35
|
+
Payg: 'payg',
|
|
36
|
+
NotPlanCovered: 'not_plan_covered',
|
|
37
|
+
SubscriptionQuotaExhausted: 'subscription_quota_exhausted',
|
|
38
|
+
InsufficientBalance: 'insufficient_balance',
|
|
39
|
+
DailyLimitReached: 'daily_limit_reached',
|
|
40
|
+
MonthlyLimitReached: 'monthly_limit_reached',
|
|
41
|
+
PreflightUnavailable: 'preflight_unavailable'
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the InferencePreflight interface.
|
|
45
|
+
*/
|
|
46
|
+
function instanceOfInferencePreflight(value) {
|
|
47
|
+
if (!('model' in value) || value['model'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('verdict' in value) || value['verdict'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if (!('message' in value) || value['message'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
if ((!('planCovered' in value) && !('plan_covered' in value)) || (value['planCovered'] === undefined && value['plan_covered'] === undefined))
|
|
54
|
+
return false;
|
|
55
|
+
if (!('subscribed' in value) || value['subscribed'] === undefined)
|
|
56
|
+
return false;
|
|
57
|
+
if (!('funded' in value) || value['funded'] === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
function InferencePreflightFromJSON(json) {
|
|
62
|
+
return InferencePreflightFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
function InferencePreflightFromJSONTyped(json, ignoreDiscriminator) {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
'model': json['model'],
|
|
70
|
+
'verdict': json['verdict'],
|
|
71
|
+
'reason': json['reason'] == null ? undefined : json['reason'],
|
|
72
|
+
'message': json['message'],
|
|
73
|
+
'planCovered': json['plan_covered'],
|
|
74
|
+
'subscribed': json['subscribed'],
|
|
75
|
+
'funded': json['funded'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function InferencePreflightToJSON(json) {
|
|
79
|
+
return InferencePreflightToJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
function InferencePreflightToJSONTyped(value, ignoreDiscriminator = false) {
|
|
82
|
+
if (value == null) {
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
'model': value['model'],
|
|
87
|
+
'verdict': value['verdict'],
|
|
88
|
+
'reason': value['reason'],
|
|
89
|
+
'message': value['message'],
|
|
90
|
+
'plan_covered': value['planCovered'],
|
|
91
|
+
'subscribed': value['subscribed'],
|
|
92
|
+
'funded': value['funded'],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
@@ -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,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* deeprelay Public Developer API
|
|
6
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@deeprelay.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfSubscriptionCheckoutRequest = instanceOfSubscriptionCheckoutRequest;
|
|
17
|
+
exports.SubscriptionCheckoutRequestFromJSON = SubscriptionCheckoutRequestFromJSON;
|
|
18
|
+
exports.SubscriptionCheckoutRequestFromJSONTyped = SubscriptionCheckoutRequestFromJSONTyped;
|
|
19
|
+
exports.SubscriptionCheckoutRequestToJSON = SubscriptionCheckoutRequestToJSON;
|
|
20
|
+
exports.SubscriptionCheckoutRequestToJSONTyped = SubscriptionCheckoutRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the SubscriptionCheckoutRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfSubscriptionCheckoutRequest(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function SubscriptionCheckoutRequestFromJSON(json) {
|
|
28
|
+
return SubscriptionCheckoutRequestFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function SubscriptionCheckoutRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'successUrl': json['success_url'] == null ? undefined : json['success_url'],
|
|
36
|
+
'cancelUrl': json['cancel_url'] == null ? undefined : json['cancel_url'],
|
|
37
|
+
'planKey': json['plan_key'] == null ? undefined : json['plan_key'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function SubscriptionCheckoutRequestToJSON(json) {
|
|
41
|
+
return SubscriptionCheckoutRequestToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function SubscriptionCheckoutRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'success_url': value['successUrl'],
|
|
49
|
+
'cancel_url': value['cancelUrl'],
|
|
50
|
+
'plan_key': value['planKey'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -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,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* deeprelay Public Developer API
|
|
6
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@deeprelay.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfSubscriptionCheckoutSession = instanceOfSubscriptionCheckoutSession;
|
|
17
|
+
exports.SubscriptionCheckoutSessionFromJSON = SubscriptionCheckoutSessionFromJSON;
|
|
18
|
+
exports.SubscriptionCheckoutSessionFromJSONTyped = SubscriptionCheckoutSessionFromJSONTyped;
|
|
19
|
+
exports.SubscriptionCheckoutSessionToJSON = SubscriptionCheckoutSessionToJSON;
|
|
20
|
+
exports.SubscriptionCheckoutSessionToJSONTyped = SubscriptionCheckoutSessionToJSONTyped;
|
|
21
|
+
const SubscriptionPlan_1 = require("./SubscriptionPlan");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the SubscriptionCheckoutSession interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfSubscriptionCheckoutSession(value) {
|
|
26
|
+
if ((!('checkoutUrl' in value) && !('checkout_url' in value)) || (value['checkoutUrl'] === undefined && value['checkout_url'] === undefined))
|
|
27
|
+
return false;
|
|
28
|
+
if ((!('sessionId' in value) && !('session_id' in value)) || (value['sessionId'] === undefined && value['session_id'] === undefined))
|
|
29
|
+
return false;
|
|
30
|
+
if (!('plan' in value) || value['plan'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function SubscriptionCheckoutSessionFromJSON(json) {
|
|
35
|
+
return SubscriptionCheckoutSessionFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
function SubscriptionCheckoutSessionFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'checkoutUrl': json['checkout_url'],
|
|
43
|
+
'sessionId': json['session_id'],
|
|
44
|
+
'plan': (0, SubscriptionPlan_1.SubscriptionPlanFromJSON)(json['plan']),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function SubscriptionCheckoutSessionToJSON(json) {
|
|
48
|
+
return SubscriptionCheckoutSessionToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function SubscriptionCheckoutSessionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'checkout_url': value['checkoutUrl'],
|
|
56
|
+
'session_id': value['sessionId'],
|
|
57
|
+
'plan': (0, SubscriptionPlan_1.SubscriptionPlanToJSON)(value['plan']),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -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,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* deeprelay Public Developer API
|
|
6
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@deeprelay.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfSubscriptionPortalRequest = instanceOfSubscriptionPortalRequest;
|
|
17
|
+
exports.SubscriptionPortalRequestFromJSON = SubscriptionPortalRequestFromJSON;
|
|
18
|
+
exports.SubscriptionPortalRequestFromJSONTyped = SubscriptionPortalRequestFromJSONTyped;
|
|
19
|
+
exports.SubscriptionPortalRequestToJSON = SubscriptionPortalRequestToJSON;
|
|
20
|
+
exports.SubscriptionPortalRequestToJSONTyped = SubscriptionPortalRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the SubscriptionPortalRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfSubscriptionPortalRequest(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function SubscriptionPortalRequestFromJSON(json) {
|
|
28
|
+
return SubscriptionPortalRequestFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function SubscriptionPortalRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'returnUrl': json['return_url'] == null ? undefined : json['return_url'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function SubscriptionPortalRequestToJSON(json) {
|
|
39
|
+
return SubscriptionPortalRequestToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function SubscriptionPortalRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'return_url': value['returnUrl'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -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,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* deeprelay Public Developer API
|
|
6
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@deeprelay.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfSubscriptionPortalSession = instanceOfSubscriptionPortalSession;
|
|
17
|
+
exports.SubscriptionPortalSessionFromJSON = SubscriptionPortalSessionFromJSON;
|
|
18
|
+
exports.SubscriptionPortalSessionFromJSONTyped = SubscriptionPortalSessionFromJSONTyped;
|
|
19
|
+
exports.SubscriptionPortalSessionToJSON = SubscriptionPortalSessionToJSON;
|
|
20
|
+
exports.SubscriptionPortalSessionToJSONTyped = SubscriptionPortalSessionToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the SubscriptionPortalSession interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfSubscriptionPortalSession(value) {
|
|
25
|
+
if ((!('portalUrl' in value) && !('portal_url' in value)) || (value['portalUrl'] === undefined && value['portal_url'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function SubscriptionPortalSessionFromJSON(json) {
|
|
30
|
+
return SubscriptionPortalSessionFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function SubscriptionPortalSessionFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'portalUrl': json['portal_url'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function SubscriptionPortalSessionToJSON(json) {
|
|
41
|
+
return SubscriptionPortalSessionToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function SubscriptionPortalSessionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'portal_url': value['portalUrl'],
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -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/models/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __exportStar(require("./ImagesGenerationsRequest"), exports);
|
|
|
34
34
|
__exportStar(require("./ImagesResponse"), exports);
|
|
35
35
|
__exportStar(require("./ImagesResponseDataInner"), exports);
|
|
36
36
|
__exportStar(require("./ImagesResponseUsage"), exports);
|
|
37
|
+
__exportStar(require("./InferencePreflight"), exports);
|
|
37
38
|
__exportStar(require("./ListDeposits200Response"), exports);
|
|
38
39
|
__exportStar(require("./Model"), exports);
|
|
39
40
|
__exportStar(require("./ModelList"), exports);
|
|
@@ -50,7 +51,11 @@ __exportStar(require("./Problem"), exports);
|
|
|
50
51
|
__exportStar(require("./SpendingLimit"), exports);
|
|
51
52
|
__exportStar(require("./StreamOptions"), exports);
|
|
52
53
|
__exportStar(require("./Subscription"), exports);
|
|
54
|
+
__exportStar(require("./SubscriptionCheckoutRequest"), exports);
|
|
55
|
+
__exportStar(require("./SubscriptionCheckoutSession"), exports);
|
|
53
56
|
__exportStar(require("./SubscriptionPlan"), exports);
|
|
57
|
+
__exportStar(require("./SubscriptionPortalRequest"), exports);
|
|
58
|
+
__exportStar(require("./SubscriptionPortalSession"), exports);
|
|
54
59
|
__exportStar(require("./SubscriptionPrice"), exports);
|
|
55
60
|
__exportStar(require("./SubscriptionQuota"), exports);
|
|
56
61
|
__exportStar(require("./SubscriptionUsage"), exports);
|
package/dist/runtime.js
CHANGED
|
@@ -69,7 +69,7 @@ class Configuration {
|
|
|
69
69
|
return undefined;
|
|
70
70
|
}
|
|
71
71
|
get headers() {
|
|
72
|
-
return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.1.
|
|
72
|
+
return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.1.1' }, this.configuration.headers);
|
|
73
73
|
}
|
|
74
74
|
get credentials() {
|
|
75
75
|
return this.configuration.credentials;
|