@deeprelay/sdk 0.1.1 → 0.2.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 +4 -8
- package/README.md +6 -6
- package/dist/apis/BillingApi.d.ts +29 -0
- package/dist/apis/BillingApi.js +88 -0
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +0 -1
- package/dist/esm/apis/BillingApi.d.ts +29 -0
- package/dist/esm/apis/BillingApi.js +88 -0
- package/dist/esm/apis/index.d.ts +0 -1
- package/dist/esm/apis/index.js +0 -1
- package/dist/esm/models/RefereeStatus.d.ts +79 -0
- package/dist/esm/models/RefereeStatus.js +70 -0
- package/dist/esm/models/Referral.d.ts +94 -0
- package/dist/esm/models/Referral.js +82 -0
- package/dist/esm/models/VideoJob.d.ts +6 -0
- package/dist/esm/models/VideoJob.js +2 -0
- package/dist/esm/models/index.d.ts +2 -3
- package/dist/esm/models/index.js +2 -3
- package/dist/esm/runtime.js +1 -1
- package/dist/models/RefereeStatus.d.ts +79 -0
- package/dist/models/RefereeStatus.js +78 -0
- package/dist/models/Referral.d.ts +94 -0
- package/dist/models/Referral.js +89 -0
- package/dist/models/VideoJob.d.ts +6 -0
- package/dist/models/VideoJob.js +2 -0
- package/dist/models/index.d.ts +2 -3
- package/dist/models/index.js +2 -3
- package/dist/runtime.js +1 -1
- package/docs/BillingApi.md +134 -0
- package/docs/RefereeStatus.md +47 -0
- package/docs/Referral.md +55 -0
- package/docs/VideoJob.md +2 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +98 -0
- package/src/apis/index.ts +0 -1
- package/src/models/RefereeStatus.ts +131 -0
- package/src/models/Referral.ts +164 -0
- package/src/models/VideoJob.ts +8 -0
- package/src/models/index.ts +2 -3
- package/src/runtime.ts +1 -1
- package/dist/apis/OperationsApi.d.ts +0 -33
- package/dist/apis/OperationsApi.js +0 -79
- package/dist/esm/apis/OperationsApi.d.ts +0 -33
- package/dist/esm/apis/OperationsApi.js +0 -75
- package/dist/esm/models/Operation.d.ts +0 -107
- package/dist/esm/models/Operation.js +0 -86
- package/dist/esm/models/OperationError.d.ts +0 -38
- package/dist/esm/models/OperationError.js +0 -43
- package/dist/esm/models/OperationResult.d.ts +0 -44
- package/dist/esm/models/OperationResult.js +0 -45
- package/dist/models/Operation.d.ts +0 -107
- package/dist/models/Operation.js +0 -94
- package/dist/models/OperationError.d.ts +0 -38
- package/dist/models/OperationError.js +0 -50
- package/dist/models/OperationResult.d.ts +0 -44
- package/dist/models/OperationResult.js +0 -52
- package/docs/Operation.md +0 -52
- package/docs/OperationError.md +0 -36
- package/docs/OperationResult.md +0 -39
- package/docs/OperationsApi.md +0 -80
- package/src/apis/OperationsApi.ts +0 -89
- package/src/models/Operation.ts +0 -179
- package/src/models/OperationError.ts +0 -73
- package/src/models/OperationResult.ts +0 -81
|
@@ -0,0 +1,164 @@
|
|
|
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 { RefereeStatus } from './RefereeStatus';
|
|
17
|
+
import {
|
|
18
|
+
RefereeStatusFromJSON,
|
|
19
|
+
RefereeStatusFromJSONTyped,
|
|
20
|
+
RefereeStatusToJSON,
|
|
21
|
+
RefereeStatusToJSONTyped,
|
|
22
|
+
} from './RefereeStatus';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The organization's referral-program view: its invite link, the program terms, its referrer stats, and (only when it was itself referred) its referee progress. Amounts are USD cents.
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface Referral
|
|
29
|
+
*/
|
|
30
|
+
export interface Referral {
|
|
31
|
+
/**
|
|
32
|
+
* The organization's shareable referral code, e.g. `GPU-7KQ2-M4XP`.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof Referral
|
|
35
|
+
*/
|
|
36
|
+
code: string;
|
|
37
|
+
/**
|
|
38
|
+
* The ready-to-share invite link, `{site}/r/{code}`.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof Referral
|
|
41
|
+
*/
|
|
42
|
+
inviteUrl: string;
|
|
43
|
+
/**
|
|
44
|
+
* Friends who signed up through the link but have not yet reached the spend gate.
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof Referral
|
|
47
|
+
*/
|
|
48
|
+
pending: number;
|
|
49
|
+
/**
|
|
50
|
+
* Friends past the spend gate whose reward is inside the chargeback hold.
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof Referral
|
|
53
|
+
*/
|
|
54
|
+
qualified: number;
|
|
55
|
+
/**
|
|
56
|
+
* Referrals that have paid out.
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof Referral
|
|
59
|
+
*/
|
|
60
|
+
settled: number;
|
|
61
|
+
/**
|
|
62
|
+
* Total credit paid to this organization as a referrer.
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof Referral
|
|
65
|
+
*/
|
|
66
|
+
earnedCents: number;
|
|
67
|
+
/**
|
|
68
|
+
* Credit paid to the referrer per settled referral.
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof Referral
|
|
71
|
+
*/
|
|
72
|
+
rewardCents: number;
|
|
73
|
+
/**
|
|
74
|
+
* Credit paid to the referred friend per settled referral.
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @memberof Referral
|
|
77
|
+
*/
|
|
78
|
+
refereeRewardCents: number;
|
|
79
|
+
/**
|
|
80
|
+
* The friend's cumulative inference spend that qualifies a referral.
|
|
81
|
+
* @type {number}
|
|
82
|
+
* @memberof Referral
|
|
83
|
+
*/
|
|
84
|
+
qualifySpendCents: number;
|
|
85
|
+
/**
|
|
86
|
+
* Days between qualification and payout (chargeback hold).
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof Referral
|
|
89
|
+
*/
|
|
90
|
+
holdDays: number;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {RefereeStatus}
|
|
94
|
+
* @memberof Referral
|
|
95
|
+
*/
|
|
96
|
+
referred?: RefereeStatus;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Check if a given object implements the Referral interface.
|
|
101
|
+
*/
|
|
102
|
+
export function instanceOfReferral(value: object): value is Referral {
|
|
103
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
104
|
+
if ((!('inviteUrl' in (value as Record<string, any>)) && !('invite_url' in (value as Record<string, any>))) || ((value as Record<string, any>)['inviteUrl'] === undefined && (value as Record<string, any>)['invite_url'] === undefined)) return false;
|
|
105
|
+
if (!('pending' in value) || value['pending'] === undefined) return false;
|
|
106
|
+
if (!('qualified' in value) || value['qualified'] === undefined) return false;
|
|
107
|
+
if (!('settled' in value) || value['settled'] === undefined) return false;
|
|
108
|
+
if ((!('earnedCents' in (value as Record<string, any>)) && !('earned_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['earnedCents'] === undefined && (value as Record<string, any>)['earned_cents'] === undefined)) return false;
|
|
109
|
+
if ((!('rewardCents' in (value as Record<string, any>)) && !('reward_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['rewardCents'] === undefined && (value as Record<string, any>)['reward_cents'] === undefined)) return false;
|
|
110
|
+
if ((!('refereeRewardCents' in (value as Record<string, any>)) && !('referee_reward_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['refereeRewardCents'] === undefined && (value as Record<string, any>)['referee_reward_cents'] === undefined)) return false;
|
|
111
|
+
if ((!('qualifySpendCents' in (value as Record<string, any>)) && !('qualify_spend_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['qualifySpendCents'] === undefined && (value as Record<string, any>)['qualify_spend_cents'] === undefined)) return false;
|
|
112
|
+
if ((!('holdDays' in (value as Record<string, any>)) && !('hold_days' in (value as Record<string, any>))) || ((value as Record<string, any>)['holdDays'] === undefined && (value as Record<string, any>)['hold_days'] === undefined)) return false;
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function ReferralFromJSON(json: any): Referral {
|
|
117
|
+
return ReferralFromJSONTyped(json, false);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function ReferralFromJSONTyped(json: any, ignoreDiscriminator: boolean): Referral {
|
|
121
|
+
if (json == null) {
|
|
122
|
+
return json;
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
|
|
126
|
+
'code': json['code'],
|
|
127
|
+
'inviteUrl': json['invite_url'],
|
|
128
|
+
'pending': json['pending'],
|
|
129
|
+
'qualified': json['qualified'],
|
|
130
|
+
'settled': json['settled'],
|
|
131
|
+
'earnedCents': json['earned_cents'],
|
|
132
|
+
'rewardCents': json['reward_cents'],
|
|
133
|
+
'refereeRewardCents': json['referee_reward_cents'],
|
|
134
|
+
'qualifySpendCents': json['qualify_spend_cents'],
|
|
135
|
+
'holdDays': json['hold_days'],
|
|
136
|
+
'referred': json['referred'] == null ? undefined : RefereeStatusFromJSON(json['referred']),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function ReferralToJSON(json: any): Referral {
|
|
141
|
+
return ReferralToJSONTyped(json, false);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function ReferralToJSONTyped(value?: Referral | null, ignoreDiscriminator: boolean = false): any {
|
|
145
|
+
if (value == null) {
|
|
146
|
+
return value;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
|
|
151
|
+
'code': value['code'],
|
|
152
|
+
'invite_url': value['inviteUrl'],
|
|
153
|
+
'pending': value['pending'],
|
|
154
|
+
'qualified': value['qualified'],
|
|
155
|
+
'settled': value['settled'],
|
|
156
|
+
'earned_cents': value['earnedCents'],
|
|
157
|
+
'reward_cents': value['rewardCents'],
|
|
158
|
+
'referee_reward_cents': value['refereeRewardCents'],
|
|
159
|
+
'qualify_spend_cents': value['qualifySpendCents'],
|
|
160
|
+
'hold_days': value['holdDays'],
|
|
161
|
+
'referred': RefereeStatusToJSON(value['referred']),
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
package/src/models/VideoJob.ts
CHANGED
|
@@ -85,6 +85,12 @@ export interface VideoJob {
|
|
|
85
85
|
* @memberof VideoJob
|
|
86
86
|
*/
|
|
87
87
|
error?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Human-readable reason behind `error`, when the upstream supplied one. `error` classifies the failure, `error_message` explains it (for example a requested duration outside the model's supported range). Sanitized before storage; only ever present alongside `error`.
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof VideoJob
|
|
92
|
+
*/
|
|
93
|
+
errorMessage?: string;
|
|
88
94
|
/**
|
|
89
95
|
* Final billed cost in cents; present once the job completes (failed/cancelled jobs are never billed).
|
|
90
96
|
* @type {number}
|
|
@@ -152,6 +158,7 @@ export function VideoJobFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
152
158
|
'completedAt': json['completed_at'] == null ? undefined : json['completed_at'],
|
|
153
159
|
'expiresAt': json['expires_at'] == null ? undefined : json['expires_at'],
|
|
154
160
|
'error': json['error'] == null ? undefined : json['error'],
|
|
161
|
+
'errorMessage': json['error_message'] == null ? undefined : json['error_message'],
|
|
155
162
|
'costCents': json['cost_cents'] == null ? undefined : json['cost_cents'],
|
|
156
163
|
};
|
|
157
164
|
}
|
|
@@ -178,6 +185,7 @@ export function VideoJobToJSONTyped(value?: VideoJob | null, ignoreDiscriminator
|
|
|
178
185
|
'completed_at': value['completedAt'],
|
|
179
186
|
'expires_at': value['expiresAt'],
|
|
180
187
|
'error': value['error'],
|
|
188
|
+
'error_message': value['errorMessage'],
|
|
181
189
|
'cost_cents': value['costCents'],
|
|
182
190
|
};
|
|
183
191
|
}
|
package/src/models/index.ts
CHANGED
|
@@ -27,11 +27,10 @@ export * from './ModelPricing';
|
|
|
27
27
|
export * from './ModelRate';
|
|
28
28
|
export * from './OpenAIErrorEnvelope';
|
|
29
29
|
export * from './OpenAIErrorEnvelopeError';
|
|
30
|
-
export * from './Operation';
|
|
31
|
-
export * from './OperationError';
|
|
32
|
-
export * from './OperationResult';
|
|
33
30
|
export * from './PeakWindow';
|
|
34
31
|
export * from './Problem';
|
|
32
|
+
export * from './RefereeStatus';
|
|
33
|
+
export * from './Referral';
|
|
35
34
|
export * from './SpendingLimit';
|
|
36
35
|
export * from './StreamOptions';
|
|
37
36
|
export * from './Subscription';
|
package/src/runtime.ts
CHANGED
|
@@ -75,7 +75,7 @@ export class Configuration {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
get headers(): HTTPHeaders | undefined {
|
|
78
|
-
return { 'User-Agent': 'deeprelay-sdk-ts/0.
|
|
78
|
+
return { 'User-Agent': 'deeprelay-sdk-ts/0.2.0', ...this.configuration.headers };
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
get credentials(): RequestCredentials | undefined {
|
|
@@ -1,33 +0,0 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
-
import { type Operation } from '../models/Operation';
|
|
14
|
-
export interface GetOperationRequest {
|
|
15
|
-
id: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
export declare class OperationsApi extends runtime.BaseAPI {
|
|
21
|
-
/**
|
|
22
|
-
* Creates request options for getOperation without sending the request
|
|
23
|
-
*/
|
|
24
|
-
getOperationRequestOpts(requestParameters: GetOperationRequest): Promise<runtime.RequestOpts>;
|
|
25
|
-
/**
|
|
26
|
-
* Get an async operation status
|
|
27
|
-
*/
|
|
28
|
-
getOperationRaw(requestParameters: GetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Operation>>;
|
|
29
|
-
/**
|
|
30
|
-
* Get an async operation status
|
|
31
|
-
*/
|
|
32
|
-
getOperation(requestParameters: GetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Operation>;
|
|
33
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.OperationsApi = void 0;
|
|
26
|
-
const runtime = require("../runtime");
|
|
27
|
-
const Operation_1 = require("../models/Operation");
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
class OperationsApi extends runtime.BaseAPI {
|
|
32
|
-
/**
|
|
33
|
-
* Creates request options for getOperation without sending the request
|
|
34
|
-
*/
|
|
35
|
-
getOperationRequestOpts(requestParameters) {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
if (requestParameters['id'] == null) {
|
|
38
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getOperation().');
|
|
39
|
-
}
|
|
40
|
-
const queryParameters = {};
|
|
41
|
-
const headerParameters = {};
|
|
42
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
43
|
-
const token = this.configuration.accessToken;
|
|
44
|
-
const tokenString = yield token("bearerAuth", []);
|
|
45
|
-
if (tokenString) {
|
|
46
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
let urlPath = `/operations/{id}`;
|
|
50
|
-
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
51
|
-
return {
|
|
52
|
-
path: urlPath,
|
|
53
|
-
method: 'GET',
|
|
54
|
-
headers: headerParameters,
|
|
55
|
-
query: queryParameters,
|
|
56
|
-
};
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Get an async operation status
|
|
61
|
-
*/
|
|
62
|
-
getOperationRaw(requestParameters, initOverrides) {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const requestOptions = yield this.getOperationRequestOpts(requestParameters);
|
|
65
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
66
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, Operation_1.OperationFromJSON)(jsonValue));
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Get an async operation status
|
|
71
|
-
*/
|
|
72
|
-
getOperation(requestParameters, initOverrides) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
const response = yield this.getOperationRaw(requestParameters, initOverrides);
|
|
75
|
-
return yield response.value();
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.OperationsApi = OperationsApi;
|
|
@@ -1,33 +0,0 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
-
import { type Operation } from '../models/Operation';
|
|
14
|
-
export interface GetOperationRequest {
|
|
15
|
-
id: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
export declare class OperationsApi extends runtime.BaseAPI {
|
|
21
|
-
/**
|
|
22
|
-
* Creates request options for getOperation without sending the request
|
|
23
|
-
*/
|
|
24
|
-
getOperationRequestOpts(requestParameters: GetOperationRequest): Promise<runtime.RequestOpts>;
|
|
25
|
-
/**
|
|
26
|
-
* Get an async operation status
|
|
27
|
-
*/
|
|
28
|
-
getOperationRaw(requestParameters: GetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Operation>>;
|
|
29
|
-
/**
|
|
30
|
-
* Get an async operation status
|
|
31
|
-
*/
|
|
32
|
-
getOperation(requestParameters: GetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Operation>;
|
|
33
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
import * as runtime from '../runtime';
|
|
24
|
-
import { OperationFromJSON, } from '../models/Operation';
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
export class OperationsApi extends runtime.BaseAPI {
|
|
29
|
-
/**
|
|
30
|
-
* Creates request options for getOperation without sending the request
|
|
31
|
-
*/
|
|
32
|
-
getOperationRequestOpts(requestParameters) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
if (requestParameters['id'] == null) {
|
|
35
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getOperation().');
|
|
36
|
-
}
|
|
37
|
-
const queryParameters = {};
|
|
38
|
-
const headerParameters = {};
|
|
39
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
40
|
-
const token = this.configuration.accessToken;
|
|
41
|
-
const tokenString = yield token("bearerAuth", []);
|
|
42
|
-
if (tokenString) {
|
|
43
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
let urlPath = `/operations/{id}`;
|
|
47
|
-
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
48
|
-
return {
|
|
49
|
-
path: urlPath,
|
|
50
|
-
method: 'GET',
|
|
51
|
-
headers: headerParameters,
|
|
52
|
-
query: queryParameters,
|
|
53
|
-
};
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Get an async operation status
|
|
58
|
-
*/
|
|
59
|
-
getOperationRaw(requestParameters, initOverrides) {
|
|
60
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const requestOptions = yield this.getOperationRequestOpts(requestParameters);
|
|
62
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
63
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => OperationFromJSON(jsonValue));
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Get an async operation status
|
|
68
|
-
*/
|
|
69
|
-
getOperation(requestParameters, initOverrides) {
|
|
70
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
const response = yield this.getOperationRaw(requestParameters, initOverrides);
|
|
72
|
-
return yield response.value();
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
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 { OperationResult } from './OperationResult';
|
|
13
|
-
import type { OperationError } from './OperationError';
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @export
|
|
17
|
-
* @interface Operation
|
|
18
|
-
*/
|
|
19
|
-
export interface Operation {
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
* @type {string}
|
|
23
|
-
* @memberof Operation
|
|
24
|
-
*/
|
|
25
|
-
operationId: string;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @type {OperationKindEnum}
|
|
29
|
-
* @memberof Operation
|
|
30
|
-
*/
|
|
31
|
-
kind: OperationKindEnum;
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @type {OperationStateEnum}
|
|
35
|
-
* @memberof Operation
|
|
36
|
-
*/
|
|
37
|
-
state: OperationStateEnum;
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @type {string}
|
|
41
|
-
* @memberof Operation
|
|
42
|
-
*/
|
|
43
|
-
resourceId?: string;
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* @type {OperationError}
|
|
47
|
-
* @memberof Operation
|
|
48
|
-
*/
|
|
49
|
-
error?: OperationError;
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
* @type {OperationResult}
|
|
53
|
-
* @memberof Operation
|
|
54
|
-
*/
|
|
55
|
-
result?: OperationResult;
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
* @type {Date}
|
|
59
|
-
* @memberof Operation
|
|
60
|
-
*/
|
|
61
|
-
createdAt: Date;
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
* @type {Date}
|
|
65
|
-
* @memberof Operation
|
|
66
|
-
*/
|
|
67
|
-
updatedAt?: Date;
|
|
68
|
-
/**
|
|
69
|
-
*
|
|
70
|
-
* @type {Date}
|
|
71
|
-
* @memberof Operation
|
|
72
|
-
*/
|
|
73
|
-
completedAt?: Date;
|
|
74
|
-
/**
|
|
75
|
-
* Create-time advisories, present only on the synchronous 202 from POST /instances (never on GET /operations/{id} polls) — e.g. the model-size guard failing open because a template deploy's MODEL is a gated or unknown Hugging Face repo whose size could not be verified.
|
|
76
|
-
* @type {Array<string>}
|
|
77
|
-
* @memberof Operation
|
|
78
|
-
*/
|
|
79
|
-
warnings?: Array<string>;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* @export
|
|
83
|
-
*/
|
|
84
|
-
export declare const OperationKindEnum: {
|
|
85
|
-
readonly InstanceCreate: "instance.create";
|
|
86
|
-
readonly InstanceDelete: "instance.delete";
|
|
87
|
-
};
|
|
88
|
-
export type OperationKindEnum = typeof OperationKindEnum[keyof typeof OperationKindEnum];
|
|
89
|
-
/**
|
|
90
|
-
* @export
|
|
91
|
-
*/
|
|
92
|
-
export declare const OperationStateEnum: {
|
|
93
|
-
readonly Pending: "pending";
|
|
94
|
-
readonly InProgress: "in_progress";
|
|
95
|
-
readonly Succeeded: "succeeded";
|
|
96
|
-
readonly Failed: "failed";
|
|
97
|
-
readonly Cancelled: "cancelled";
|
|
98
|
-
};
|
|
99
|
-
export type OperationStateEnum = typeof OperationStateEnum[keyof typeof OperationStateEnum];
|
|
100
|
-
/**
|
|
101
|
-
* Check if a given object implements the Operation interface.
|
|
102
|
-
*/
|
|
103
|
-
export declare function instanceOfOperation(value: object): value is Operation;
|
|
104
|
-
export declare function OperationFromJSON(json: any): Operation;
|
|
105
|
-
export declare function OperationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Operation;
|
|
106
|
-
export declare function OperationToJSON(json: any): Operation;
|
|
107
|
-
export declare function OperationToJSONTyped(value?: Operation | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -1,86 +0,0 @@
|
|
|
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 { OperationResultFromJSON, OperationResultToJSON, } from './OperationResult';
|
|
15
|
-
import { OperationErrorFromJSON, OperationErrorToJSON, } from './OperationError';
|
|
16
|
-
/**
|
|
17
|
-
* @export
|
|
18
|
-
*/
|
|
19
|
-
export const OperationKindEnum = {
|
|
20
|
-
InstanceCreate: 'instance.create',
|
|
21
|
-
InstanceDelete: 'instance.delete'
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @export
|
|
25
|
-
*/
|
|
26
|
-
export const OperationStateEnum = {
|
|
27
|
-
Pending: 'pending',
|
|
28
|
-
InProgress: 'in_progress',
|
|
29
|
-
Succeeded: 'succeeded',
|
|
30
|
-
Failed: 'failed',
|
|
31
|
-
Cancelled: 'cancelled'
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Check if a given object implements the Operation interface.
|
|
35
|
-
*/
|
|
36
|
-
export function instanceOfOperation(value) {
|
|
37
|
-
if ((!('operationId' in value) && !('operation_id' in value)) || (value['operationId'] === undefined && value['operation_id'] === undefined))
|
|
38
|
-
return false;
|
|
39
|
-
if (!('kind' in value) || value['kind'] === undefined)
|
|
40
|
-
return false;
|
|
41
|
-
if (!('state' in value) || value['state'] === undefined)
|
|
42
|
-
return false;
|
|
43
|
-
if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
|
|
44
|
-
return false;
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
export function OperationFromJSON(json) {
|
|
48
|
-
return OperationFromJSONTyped(json, false);
|
|
49
|
-
}
|
|
50
|
-
export function OperationFromJSONTyped(json, ignoreDiscriminator) {
|
|
51
|
-
if (json == null) {
|
|
52
|
-
return json;
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
'operationId': json['operation_id'],
|
|
56
|
-
'kind': json['kind'],
|
|
57
|
-
'state': json['state'],
|
|
58
|
-
'resourceId': json['resource_id'] == null ? undefined : json['resource_id'],
|
|
59
|
-
'error': json['error'] == null ? undefined : OperationErrorFromJSON(json['error']),
|
|
60
|
-
'result': json['result'] == null ? undefined : OperationResultFromJSON(json['result']),
|
|
61
|
-
'createdAt': (new Date(json['created_at'])),
|
|
62
|
-
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
63
|
-
'completedAt': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])),
|
|
64
|
-
'warnings': json['warnings'] == null ? undefined : json['warnings'],
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export function OperationToJSON(json) {
|
|
68
|
-
return OperationToJSONTyped(json, false);
|
|
69
|
-
}
|
|
70
|
-
export function OperationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
71
|
-
if (value == null) {
|
|
72
|
-
return value;
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
'operation_id': value['operationId'],
|
|
76
|
-
'kind': value['kind'],
|
|
77
|
-
'state': value['state'],
|
|
78
|
-
'resource_id': value['resourceId'],
|
|
79
|
-
'error': OperationErrorToJSON(value['error']),
|
|
80
|
-
'result': OperationResultToJSON(value['result']),
|
|
81
|
-
'created_at': value['createdAt'].toISOString(),
|
|
82
|
-
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
83
|
-
'completed_at': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
|
|
84
|
-
'warnings': value['warnings'],
|
|
85
|
-
};
|
|
86
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
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 OperationError
|
|
16
|
-
*/
|
|
17
|
-
export interface OperationError {
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof OperationError
|
|
22
|
-
*/
|
|
23
|
-
code?: string;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof OperationError
|
|
28
|
-
*/
|
|
29
|
-
detail?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the OperationError interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfOperationError(value: object): value is OperationError;
|
|
35
|
-
export declare function OperationErrorFromJSON(json: any): OperationError;
|
|
36
|
-
export declare function OperationErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperationError;
|
|
37
|
-
export declare function OperationErrorToJSON(json: any): OperationError;
|
|
38
|
-
export declare function OperationErrorToJSONTyped(value?: OperationError | null, ignoreDiscriminator?: boolean): any;
|