zklighter-perps 1.0.214 → 1.0.216
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/.circleci/openapi_postprocess.py +26 -16
- package/.openapi-generator/FILES +5 -0
- package/apis/PushnotifApi.ts +361 -0
- package/apis/index.ts +1 -0
- package/models/PushNotifDeliveryResult.ts +79 -0
- package/models/Referral.ts +16 -0
- package/models/ReqGetPushNotifSettings.ts +78 -0
- package/models/RespGetLeaseOptions.ts +9 -0
- package/models/RespGetPushNotifSettings.ts +87 -0
- package/models/TradeStats.ts +124 -0
- package/models/index.ts +4 -0
- package/openapi.json +367 -2
- package/package.json +1 -1
|
@@ -5,28 +5,38 @@ FILE = "./openapi.json"
|
|
|
5
5
|
with open(FILE, "r") as f:
|
|
6
6
|
data = json.load(f)
|
|
7
7
|
for path in data["paths"]:
|
|
8
|
-
|
|
8
|
+
methods = list(data["paths"][path].keys())
|
|
9
|
+
has_multiple_methods = len(methods) > 1
|
|
10
|
+
|
|
11
|
+
for method in methods:
|
|
9
12
|
if "api/v1/" in path:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
base_name = path.split("api/v1/")[1].replace("/", "_")
|
|
14
|
+
data["paths"][path][method]["summary"] = base_name
|
|
15
|
+
if has_multiple_methods:
|
|
16
|
+
data["paths"][path][method]["operationId"] = f"{base_name}_{method}"
|
|
17
|
+
else:
|
|
18
|
+
data["paths"][path][method]["operationId"] = base_name
|
|
16
19
|
elif "api/v2/" in path:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
base_name = path.split("api/v2/")[1].replace("/", "_") + "_v2"
|
|
21
|
+
data["paths"][path][method]["summary"] = base_name
|
|
22
|
+
if has_multiple_methods:
|
|
23
|
+
data["paths"][path][method]["operationId"] = f"{base_name}_{method}"
|
|
24
|
+
else:
|
|
25
|
+
data["paths"][path][method]["operationId"] = base_name
|
|
23
26
|
else:
|
|
24
|
-
|
|
25
|
-
data["paths"][path][method]["
|
|
27
|
+
base_name = path.split("/")[-1]
|
|
28
|
+
data["paths"][path][method]["summary"] = base_name
|
|
29
|
+
if has_multiple_methods:
|
|
30
|
+
data["paths"][path][method]["operationId"] = f"{base_name}_{method}"
|
|
31
|
+
else:
|
|
32
|
+
data["paths"][path][method]["operationId"] = base_name
|
|
26
33
|
|
|
27
34
|
if data["paths"][path][method]["summary"] == "":
|
|
28
35
|
data["paths"][path][method]["summary"] = "status"
|
|
29
|
-
|
|
36
|
+
if has_multiple_methods:
|
|
37
|
+
data["paths"][path][method]["operationId"] = f"status_{method}"
|
|
38
|
+
else:
|
|
39
|
+
data["paths"][path][method]["operationId"] = "status"
|
|
30
40
|
|
|
31
41
|
# Fix enum placement for array types: move enum from array level into items
|
|
32
42
|
for defn in data["definitions"].values():
|
package/.openapi-generator/FILES
CHANGED
|
@@ -9,6 +9,7 @@ apis/GeoApi.ts
|
|
|
9
9
|
apis/InfoApi.ts
|
|
10
10
|
apis/NotificationApi.ts
|
|
11
11
|
apis/OrderApi.ts
|
|
12
|
+
apis/PushnotifApi.ts
|
|
12
13
|
apis/ReferralApi.ts
|
|
13
14
|
apis/RootApi.ts
|
|
14
15
|
apis/TransactionApi.ts
|
|
@@ -102,6 +103,7 @@ models/PriceLevel.ts
|
|
|
102
103
|
models/PublicPoolInfo.ts
|
|
103
104
|
models/PublicPoolMetadata.ts
|
|
104
105
|
models/PublicPoolShare.ts
|
|
106
|
+
models/PushNotifDeliveryResult.ts
|
|
105
107
|
models/Referral.ts
|
|
106
108
|
models/ReferralCode.ts
|
|
107
109
|
models/ReferralPointEntry.ts
|
|
@@ -144,6 +146,7 @@ models/ReqGetOrderBookOrders.ts
|
|
|
144
146
|
models/ReqGetOrderBooks.ts
|
|
145
147
|
models/ReqGetPositionFunding.ts
|
|
146
148
|
models/ReqGetPublicPoolsMetadata.ts
|
|
149
|
+
models/ReqGetPushNotifSettings.ts
|
|
147
150
|
models/ReqGetRangeWithCursor.ts
|
|
148
151
|
models/ReqGetRangeWithIndex.ts
|
|
149
152
|
models/ReqGetRangeWithIndexSortable.ts
|
|
@@ -167,6 +170,7 @@ models/RespGetFastwithdrawalInfo.ts
|
|
|
167
170
|
models/RespGetIsNextBridgeFast.ts
|
|
168
171
|
models/RespGetLeaseOptions.ts
|
|
169
172
|
models/RespGetLeases.ts
|
|
173
|
+
models/RespGetPushNotifSettings.ts
|
|
170
174
|
models/RespPostApiToken.ts
|
|
171
175
|
models/RespPublicPoolsMetadata.ts
|
|
172
176
|
models/RespRevokeApiToken.ts
|
|
@@ -190,6 +194,7 @@ models/SubAccounts.ts
|
|
|
190
194
|
models/SystemConfig.ts
|
|
191
195
|
models/Ticker.ts
|
|
192
196
|
models/Trade.ts
|
|
197
|
+
models/TradeStats.ts
|
|
193
198
|
models/Trades.ts
|
|
194
199
|
models/TransferFeeInfo.ts
|
|
195
200
|
models/TransferHistory.ts
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
RespGetPushNotifSettings,
|
|
19
|
+
ResultCode,
|
|
20
|
+
} from '../models/index';
|
|
21
|
+
import {
|
|
22
|
+
RespGetPushNotifSettingsFromJSON,
|
|
23
|
+
RespGetPushNotifSettingsToJSON,
|
|
24
|
+
ResultCodeFromJSON,
|
|
25
|
+
ResultCodeToJSON,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
|
|
28
|
+
export interface PushnotifRegisterRequest {
|
|
29
|
+
account_index: number;
|
|
30
|
+
expo_token: string;
|
|
31
|
+
platform: PushnotifRegisterPlatformEnum;
|
|
32
|
+
auth?: string;
|
|
33
|
+
app_version?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface PushnotifSettingsGetRequest {
|
|
37
|
+
account_index: number;
|
|
38
|
+
expo_token: string;
|
|
39
|
+
authorization?: string;
|
|
40
|
+
auth?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface PushnotifSettingsPostRequest {
|
|
44
|
+
account_index: number;
|
|
45
|
+
expo_token: string;
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
auth?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface PushnotifUnregisterRequest {
|
|
51
|
+
account_index: number;
|
|
52
|
+
expo_token: string;
|
|
53
|
+
auth?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
*/
|
|
59
|
+
export class PushnotifApi extends runtime.BaseAPI {
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Register device for push notifications
|
|
63
|
+
* pushnotif_register
|
|
64
|
+
*/
|
|
65
|
+
async pushnotifRegisterRaw(requestParameters: PushnotifRegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
66
|
+
if (requestParameters['account_index'] == null) {
|
|
67
|
+
throw new runtime.RequiredError(
|
|
68
|
+
'account_index',
|
|
69
|
+
'Required parameter "account_index" was null or undefined when calling pushnotifRegister().'
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (requestParameters['expo_token'] == null) {
|
|
74
|
+
throw new runtime.RequiredError(
|
|
75
|
+
'expo_token',
|
|
76
|
+
'Required parameter "expo_token" was null or undefined when calling pushnotifRegister().'
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (requestParameters['platform'] == null) {
|
|
81
|
+
throw new runtime.RequiredError(
|
|
82
|
+
'platform',
|
|
83
|
+
'Required parameter "platform" was null or undefined when calling pushnotifRegister().'
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const queryParameters: any = {};
|
|
88
|
+
|
|
89
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
90
|
+
|
|
91
|
+
const consumes: runtime.Consume[] = [
|
|
92
|
+
{ contentType: 'multipart/form-data' },
|
|
93
|
+
];
|
|
94
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
95
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
96
|
+
|
|
97
|
+
let formParams: { append(param: string, value: any): any };
|
|
98
|
+
let useForm = false;
|
|
99
|
+
if (useForm) {
|
|
100
|
+
formParams = new FormData();
|
|
101
|
+
} else {
|
|
102
|
+
formParams = new URLSearchParams();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (requestParameters['auth'] != null) {
|
|
106
|
+
formParams.append('auth', requestParameters['auth'] as any);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (requestParameters['account_index'] != null) {
|
|
110
|
+
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (requestParameters['expo_token'] != null) {
|
|
114
|
+
formParams.append('expo_token', requestParameters['expo_token'] as any);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (requestParameters['platform'] != null) {
|
|
118
|
+
formParams.append('platform', requestParameters['platform'] as any);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (requestParameters['app_version'] != null) {
|
|
122
|
+
formParams.append('app_version', requestParameters['app_version'] as any);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const response = await this.request({
|
|
126
|
+
path: `/api/v1/pushnotif/register`,
|
|
127
|
+
method: 'POST',
|
|
128
|
+
headers: headerParameters,
|
|
129
|
+
query: queryParameters,
|
|
130
|
+
body: formParams,
|
|
131
|
+
}, initOverrides);
|
|
132
|
+
|
|
133
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Register device for push notifications
|
|
138
|
+
* pushnotif_register
|
|
139
|
+
*/
|
|
140
|
+
async pushnotifRegister(requestParameters: PushnotifRegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
|
141
|
+
const response = await this.pushnotifRegisterRaw(requestParameters, initOverrides);
|
|
142
|
+
return await response.value();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Get push notification settings
|
|
147
|
+
* pushnotif_settings
|
|
148
|
+
*/
|
|
149
|
+
async pushnotifSettingsGetRaw(requestParameters: PushnotifSettingsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetPushNotifSettings>> {
|
|
150
|
+
if (requestParameters['account_index'] == null) {
|
|
151
|
+
throw new runtime.RequiredError(
|
|
152
|
+
'account_index',
|
|
153
|
+
'Required parameter "account_index" was null or undefined when calling pushnotifSettingsGet().'
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (requestParameters['expo_token'] == null) {
|
|
158
|
+
throw new runtime.RequiredError(
|
|
159
|
+
'expo_token',
|
|
160
|
+
'Required parameter "expo_token" was null or undefined when calling pushnotifSettingsGet().'
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const queryParameters: any = {};
|
|
165
|
+
|
|
166
|
+
if (requestParameters['authorization'] != null) {
|
|
167
|
+
queryParameters['authorization'] = requestParameters['authorization'];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (requestParameters['auth'] != null) {
|
|
171
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (requestParameters['account_index'] != null) {
|
|
175
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (requestParameters['expo_token'] != null) {
|
|
179
|
+
queryParameters['expo_token'] = requestParameters['expo_token'];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
183
|
+
|
|
184
|
+
const response = await this.request({
|
|
185
|
+
path: `/api/v1/pushnotif/settings`,
|
|
186
|
+
method: 'GET',
|
|
187
|
+
headers: headerParameters,
|
|
188
|
+
query: queryParameters,
|
|
189
|
+
}, initOverrides);
|
|
190
|
+
|
|
191
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespGetPushNotifSettingsFromJSON(jsonValue));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Get push notification settings
|
|
196
|
+
* pushnotif_settings
|
|
197
|
+
*/
|
|
198
|
+
async pushnotifSettingsGet(requestParameters: PushnotifSettingsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetPushNotifSettings> {
|
|
199
|
+
const response = await this.pushnotifSettingsGetRaw(requestParameters, initOverrides);
|
|
200
|
+
return await response.value();
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Update push notification settings
|
|
205
|
+
* pushnotif_settings
|
|
206
|
+
*/
|
|
207
|
+
async pushnotifSettingsPostRaw(requestParameters: PushnotifSettingsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
208
|
+
if (requestParameters['account_index'] == null) {
|
|
209
|
+
throw new runtime.RequiredError(
|
|
210
|
+
'account_index',
|
|
211
|
+
'Required parameter "account_index" was null or undefined when calling pushnotifSettingsPost().'
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (requestParameters['expo_token'] == null) {
|
|
216
|
+
throw new runtime.RequiredError(
|
|
217
|
+
'expo_token',
|
|
218
|
+
'Required parameter "expo_token" was null or undefined when calling pushnotifSettingsPost().'
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (requestParameters['enabled'] == null) {
|
|
223
|
+
throw new runtime.RequiredError(
|
|
224
|
+
'enabled',
|
|
225
|
+
'Required parameter "enabled" was null or undefined when calling pushnotifSettingsPost().'
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const queryParameters: any = {};
|
|
230
|
+
|
|
231
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
232
|
+
|
|
233
|
+
const consumes: runtime.Consume[] = [
|
|
234
|
+
{ contentType: 'multipart/form-data' },
|
|
235
|
+
];
|
|
236
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
237
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
238
|
+
|
|
239
|
+
let formParams: { append(param: string, value: any): any };
|
|
240
|
+
let useForm = false;
|
|
241
|
+
if (useForm) {
|
|
242
|
+
formParams = new FormData();
|
|
243
|
+
} else {
|
|
244
|
+
formParams = new URLSearchParams();
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (requestParameters['auth'] != null) {
|
|
248
|
+
formParams.append('auth', requestParameters['auth'] as any);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (requestParameters['account_index'] != null) {
|
|
252
|
+
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (requestParameters['expo_token'] != null) {
|
|
256
|
+
formParams.append('expo_token', requestParameters['expo_token'] as any);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (requestParameters['enabled'] != null) {
|
|
260
|
+
formParams.append('enabled', requestParameters['enabled'] as any);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
const response = await this.request({
|
|
264
|
+
path: `/api/v1/pushnotif/settings`,
|
|
265
|
+
method: 'POST',
|
|
266
|
+
headers: headerParameters,
|
|
267
|
+
query: queryParameters,
|
|
268
|
+
body: formParams,
|
|
269
|
+
}, initOverrides);
|
|
270
|
+
|
|
271
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Update push notification settings
|
|
276
|
+
* pushnotif_settings
|
|
277
|
+
*/
|
|
278
|
+
async pushnotifSettingsPost(requestParameters: PushnotifSettingsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
|
279
|
+
const response = await this.pushnotifSettingsPostRaw(requestParameters, initOverrides);
|
|
280
|
+
return await response.value();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Unregister device from push notifications
|
|
285
|
+
* pushnotif_unregister
|
|
286
|
+
*/
|
|
287
|
+
async pushnotifUnregisterRaw(requestParameters: PushnotifUnregisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
288
|
+
if (requestParameters['account_index'] == null) {
|
|
289
|
+
throw new runtime.RequiredError(
|
|
290
|
+
'account_index',
|
|
291
|
+
'Required parameter "account_index" was null or undefined when calling pushnotifUnregister().'
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (requestParameters['expo_token'] == null) {
|
|
296
|
+
throw new runtime.RequiredError(
|
|
297
|
+
'expo_token',
|
|
298
|
+
'Required parameter "expo_token" was null or undefined when calling pushnotifUnregister().'
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const queryParameters: any = {};
|
|
303
|
+
|
|
304
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
305
|
+
|
|
306
|
+
const consumes: runtime.Consume[] = [
|
|
307
|
+
{ contentType: 'multipart/form-data' },
|
|
308
|
+
];
|
|
309
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
310
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
311
|
+
|
|
312
|
+
let formParams: { append(param: string, value: any): any };
|
|
313
|
+
let useForm = false;
|
|
314
|
+
if (useForm) {
|
|
315
|
+
formParams = new FormData();
|
|
316
|
+
} else {
|
|
317
|
+
formParams = new URLSearchParams();
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
if (requestParameters['auth'] != null) {
|
|
321
|
+
formParams.append('auth', requestParameters['auth'] as any);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (requestParameters['account_index'] != null) {
|
|
325
|
+
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (requestParameters['expo_token'] != null) {
|
|
329
|
+
formParams.append('expo_token', requestParameters['expo_token'] as any);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const response = await this.request({
|
|
333
|
+
path: `/api/v1/pushnotif/unregister`,
|
|
334
|
+
method: 'POST',
|
|
335
|
+
headers: headerParameters,
|
|
336
|
+
query: queryParameters,
|
|
337
|
+
body: formParams,
|
|
338
|
+
}, initOverrides);
|
|
339
|
+
|
|
340
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Unregister device from push notifications
|
|
345
|
+
* pushnotif_unregister
|
|
346
|
+
*/
|
|
347
|
+
async pushnotifUnregister(requestParameters: PushnotifUnregisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
|
348
|
+
const response = await this.pushnotifUnregisterRaw(requestParameters, initOverrides);
|
|
349
|
+
return await response.value();
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* @export
|
|
356
|
+
*/
|
|
357
|
+
export const PushnotifRegisterPlatformEnum = {
|
|
358
|
+
Ios: 'ios',
|
|
359
|
+
Android: 'android'
|
|
360
|
+
} as const;
|
|
361
|
+
export type PushnotifRegisterPlatformEnum = typeof PushnotifRegisterPlatformEnum[keyof typeof PushnotifRegisterPlatformEnum];
|
package/apis/index.ts
CHANGED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface PushNotifDeliveryResult
|
|
20
|
+
*/
|
|
21
|
+
export interface PushNotifDeliveryResult {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof PushNotifDeliveryResult
|
|
26
|
+
*/
|
|
27
|
+
expo_token: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PushNotifDeliveryResult
|
|
32
|
+
*/
|
|
33
|
+
status: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof PushNotifDeliveryResult
|
|
38
|
+
*/
|
|
39
|
+
error: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the PushNotifDeliveryResult interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfPushNotifDeliveryResult(value: object): value is PushNotifDeliveryResult {
|
|
46
|
+
if (!('expo_token' in value) || value['expo_token'] === undefined) return false;
|
|
47
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
48
|
+
if (!('error' in value) || value['error'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function PushNotifDeliveryResultFromJSON(json: any): PushNotifDeliveryResult {
|
|
53
|
+
return PushNotifDeliveryResultFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function PushNotifDeliveryResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushNotifDeliveryResult {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'expo_token': json['expo_token'],
|
|
63
|
+
'status': json['status'],
|
|
64
|
+
'error': json['error'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function PushNotifDeliveryResultToJSON(value?: PushNotifDeliveryResult | null): any {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'expo_token': value['expo_token'],
|
|
75
|
+
'status': value['status'],
|
|
76
|
+
'error': value['error'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
package/models/Referral.ts
CHANGED
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { TradeStats } from './TradeStats';
|
|
17
|
+
import {
|
|
18
|
+
TradeStatsFromJSON,
|
|
19
|
+
TradeStatsFromJSONTyped,
|
|
20
|
+
TradeStatsToJSON,
|
|
21
|
+
} from './TradeStats';
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
*
|
|
18
25
|
* @export
|
|
@@ -37,6 +44,12 @@ export interface Referral {
|
|
|
37
44
|
* @memberof Referral
|
|
38
45
|
*/
|
|
39
46
|
used_at: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {TradeStats}
|
|
50
|
+
* @memberof Referral
|
|
51
|
+
*/
|
|
52
|
+
trade_stats: TradeStats;
|
|
40
53
|
}
|
|
41
54
|
|
|
42
55
|
/**
|
|
@@ -46,6 +59,7 @@ export function instanceOfReferral(value: object): value is Referral {
|
|
|
46
59
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
47
60
|
if (!('referral_code' in value) || value['referral_code'] === undefined) return false;
|
|
48
61
|
if (!('used_at' in value) || value['used_at'] === undefined) return false;
|
|
62
|
+
if (!('trade_stats' in value) || value['trade_stats'] === undefined) return false;
|
|
49
63
|
return true;
|
|
50
64
|
}
|
|
51
65
|
|
|
@@ -62,6 +76,7 @@ export function ReferralFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
62
76
|
'l1_address': json['l1_address'],
|
|
63
77
|
'referral_code': json['referral_code'],
|
|
64
78
|
'used_at': json['used_at'],
|
|
79
|
+
'trade_stats': TradeStatsFromJSON(json['trade_stats']),
|
|
65
80
|
};
|
|
66
81
|
}
|
|
67
82
|
|
|
@@ -74,6 +89,7 @@ export function ReferralToJSON(value?: Referral | null): any {
|
|
|
74
89
|
'l1_address': value['l1_address'],
|
|
75
90
|
'referral_code': value['referral_code'],
|
|
76
91
|
'used_at': value['used_at'],
|
|
92
|
+
'trade_stats': TradeStatsToJSON(value['trade_stats']),
|
|
77
93
|
};
|
|
78
94
|
}
|
|
79
95
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ReqGetPushNotifSettings
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetPushNotifSettings {
|
|
22
|
+
/**
|
|
23
|
+
* made optional to support header auth clients
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetPushNotifSettings
|
|
26
|
+
*/
|
|
27
|
+
auth?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ReqGetPushNotifSettings
|
|
32
|
+
*/
|
|
33
|
+
account_index: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ReqGetPushNotifSettings
|
|
38
|
+
*/
|
|
39
|
+
expo_token: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the ReqGetPushNotifSettings interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfReqGetPushNotifSettings(value: object): value is ReqGetPushNotifSettings {
|
|
46
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
47
|
+
if (!('expo_token' in value) || value['expo_token'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ReqGetPushNotifSettingsFromJSON(json: any): ReqGetPushNotifSettings {
|
|
52
|
+
return ReqGetPushNotifSettingsFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ReqGetPushNotifSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetPushNotifSettings {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
62
|
+
'account_index': json['account_index'],
|
|
63
|
+
'expo_token': json['expo_token'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function ReqGetPushNotifSettingsToJSON(value?: ReqGetPushNotifSettings | null): any {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'auth': value['auth'],
|
|
74
|
+
'account_index': value['account_index'],
|
|
75
|
+
'expo_token': value['expo_token'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|