zklighter-perps 1.0.355 → 1.0.356

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.
@@ -254,6 +254,7 @@ models/ReqGetPositionFunding.ts
254
254
  models/ReqGetPriceOracleInfo.ts
255
255
  models/ReqGetPublicPoolsMetadata.ts
256
256
  models/ReqGetPublicProfiles.ts
257
+ models/ReqGetPushNotifRegistered.ts
257
258
  models/ReqGetPushNotifSettings.ts
258
259
  models/ReqGetRFQ.ts
259
260
  models/ReqGetRangeWithCursor.ts
@@ -311,6 +312,7 @@ models/RespGetLeases.ts
311
312
  models/RespGetMakerOnlyApiKeys.ts
312
313
  models/RespGetMarketMetrics.ts
313
314
  models/RespGetPublicProfiles.ts
315
+ models/RespGetPushNotifRegistered.ts
314
316
  models/RespGetPushNotifSettings.ts
315
317
  models/RespGetRFQ.ts
316
318
  models/RespGetUpDownCandles.ts
@@ -15,10 +15,13 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ RespGetPushNotifRegistered,
18
19
  RespGetPushNotifSettings,
19
20
  ResultCode,
20
21
  } from '../models/index';
21
22
  import {
23
+ RespGetPushNotifRegisteredFromJSON,
24
+ RespGetPushNotifRegisteredToJSON,
22
25
  RespGetPushNotifSettingsFromJSON,
23
26
  RespGetPushNotifSettingsToJSON,
24
27
  ResultCodeFromJSON,
@@ -34,6 +37,12 @@ export interface PushnotifRegisterRequest {
34
37
  language?: string;
35
38
  }
36
39
 
40
+ export interface PushnotifRegisteredRequest {
41
+ account_index: number;
42
+ authorization?: string;
43
+ auth?: string;
44
+ }
45
+
37
46
  export interface PushnotifSettingsGetRequest {
38
47
  account_index: number;
39
48
  authorization?: string;
@@ -147,6 +156,53 @@ export class PushnotifApi extends runtime.BaseAPI {
147
156
  return await response.value();
148
157
  }
149
158
 
159
+ /**
160
+ * Check whether the account has an active push notification token
161
+ * pushnotif_registered
162
+ */
163
+ async pushnotifRegisteredRaw(requestParameters: PushnotifRegisteredRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetPushNotifRegistered>> {
164
+ if (requestParameters['account_index'] == null) {
165
+ throw new runtime.RequiredError(
166
+ 'account_index',
167
+ 'Required parameter "account_index" was null or undefined when calling pushnotifRegistered().'
168
+ );
169
+ }
170
+
171
+ const queryParameters: any = {};
172
+
173
+ if (requestParameters['authorization'] != null) {
174
+ queryParameters['authorization'] = requestParameters['authorization'];
175
+ }
176
+
177
+ if (requestParameters['auth'] != null) {
178
+ queryParameters['auth'] = requestParameters['auth'];
179
+ }
180
+
181
+ if (requestParameters['account_index'] != null) {
182
+ queryParameters['account_index'] = requestParameters['account_index'];
183
+ }
184
+
185
+ const headerParameters: runtime.HTTPHeaders = {};
186
+
187
+ const response = await this.request({
188
+ path: `/api/v1/pushnotif/registered`,
189
+ method: 'GET',
190
+ headers: headerParameters,
191
+ query: queryParameters,
192
+ }, initOverrides);
193
+
194
+ return new runtime.JSONApiResponse(response, (jsonValue) => RespGetPushNotifRegisteredFromJSON(jsonValue));
195
+ }
196
+
197
+ /**
198
+ * Check whether the account has an active push notification token
199
+ * pushnotif_registered
200
+ */
201
+ async pushnotifRegistered(requestParameters: PushnotifRegisteredRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetPushNotifRegistered> {
202
+ const response = await this.pushnotifRegisteredRaw(requestParameters, initOverrides);
203
+ return await response.value();
204
+ }
205
+
150
206
  /**
151
207
  * Get push notification settings
152
208
  * pushnotif_settings
@@ -0,0 +1,69 @@
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 ReqGetPushNotifRegistered
20
+ */
21
+ export interface ReqGetPushNotifRegistered {
22
+ /**
23
+ * made optional to support header auth clients
24
+ * @type {string}
25
+ * @memberof ReqGetPushNotifRegistered
26
+ */
27
+ auth?: string;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ReqGetPushNotifRegistered
32
+ */
33
+ account_index: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ReqGetPushNotifRegistered interface.
38
+ */
39
+ export function instanceOfReqGetPushNotifRegistered(value: object): value is ReqGetPushNotifRegistered {
40
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
41
+ return true;
42
+ }
43
+
44
+ export function ReqGetPushNotifRegisteredFromJSON(json: any): ReqGetPushNotifRegistered {
45
+ return ReqGetPushNotifRegisteredFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function ReqGetPushNotifRegisteredFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetPushNotifRegistered {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+
54
+ 'auth': json['auth'] == null ? undefined : json['auth'],
55
+ 'account_index': json['account_index'],
56
+ };
57
+ }
58
+
59
+ export function ReqGetPushNotifRegisteredToJSON(value?: ReqGetPushNotifRegistered | null): any {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+
65
+ 'auth': value['auth'],
66
+ 'account_index': value['account_index'],
67
+ };
68
+ }
69
+
@@ -0,0 +1,87 @@
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 RespGetPushNotifRegistered
20
+ */
21
+ export interface RespGetPushNotifRegistered {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof RespGetPushNotifRegistered
26
+ */
27
+ code: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof RespGetPushNotifRegistered
32
+ */
33
+ message?: string;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof RespGetPushNotifRegistered
38
+ */
39
+ registered: boolean;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof RespGetPushNotifRegistered
44
+ */
45
+ platform: string;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the RespGetPushNotifRegistered interface.
50
+ */
51
+ export function instanceOfRespGetPushNotifRegistered(value: object): value is RespGetPushNotifRegistered {
52
+ if (!('code' in value) || value['code'] === undefined) return false;
53
+ if (!('registered' in value) || value['registered'] === undefined) return false;
54
+ if (!('platform' in value) || value['platform'] === undefined) return false;
55
+ return true;
56
+ }
57
+
58
+ export function RespGetPushNotifRegisteredFromJSON(json: any): RespGetPushNotifRegistered {
59
+ return RespGetPushNotifRegisteredFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function RespGetPushNotifRegisteredFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespGetPushNotifRegistered {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'code': json['code'],
69
+ 'message': json['message'] == null ? undefined : json['message'],
70
+ 'registered': json['registered'],
71
+ 'platform': json['platform'],
72
+ };
73
+ }
74
+
75
+ export function RespGetPushNotifRegisteredToJSON(value?: RespGetPushNotifRegistered | null): any {
76
+ if (value == null) {
77
+ return value;
78
+ }
79
+ return {
80
+
81
+ 'code': value['code'],
82
+ 'message': value['message'],
83
+ 'registered': value['registered'],
84
+ 'platform': value['platform'],
85
+ };
86
+ }
87
+
package/models/index.ts CHANGED
@@ -225,6 +225,7 @@ export * from './ReqGetPositionFunding';
225
225
  export * from './ReqGetPriceOracleInfo';
226
226
  export * from './ReqGetPublicPoolsMetadata';
227
227
  export * from './ReqGetPublicProfiles';
228
+ export * from './ReqGetPushNotifRegistered';
228
229
  export * from './ReqGetPushNotifSettings';
229
230
  export * from './ReqGetRFQ';
230
231
  export * from './ReqGetRangeWithCursor';
@@ -282,6 +283,7 @@ export * from './RespGetLeases';
282
283
  export * from './RespGetMakerOnlyApiKeys';
283
284
  export * from './RespGetMarketMetrics';
284
285
  export * from './RespGetPublicProfiles';
286
+ export * from './RespGetPushNotifRegistered';
285
287
  export * from './RespGetPushNotifSettings';
286
288
  export * from './RespGetRFQ';
287
289
  export * from './RespGetUpDownCandles';
package/openapi.json CHANGED
@@ -5998,6 +5998,56 @@
5998
5998
  "description": "Register device for push notifications"
5999
5999
  }
6000
6000
  },
6001
+ "/api/v1/pushnotif/registered": {
6002
+ "get": {
6003
+ "summary": "pushnotif_registered",
6004
+ "operationId": "pushnotif_registered",
6005
+ "responses": {
6006
+ "200": {
6007
+ "description": "A successful response.",
6008
+ "schema": {
6009
+ "$ref": "#/definitions/RespGetPushNotifRegistered"
6010
+ }
6011
+ },
6012
+ "400": {
6013
+ "description": "Bad request",
6014
+ "schema": {
6015
+ "$ref": "#/definitions/ResultCode"
6016
+ }
6017
+ }
6018
+ },
6019
+ "parameters": [
6020
+ {
6021
+ "name": "authorization",
6022
+ "description": " make required after integ is done",
6023
+ "in": "query",
6024
+ "required": false,
6025
+ "type": "string"
6026
+ },
6027
+ {
6028
+ "name": "auth",
6029
+ "description": " made optional to support header auth clients",
6030
+ "in": "query",
6031
+ "required": false,
6032
+ "type": "string"
6033
+ },
6034
+ {
6035
+ "name": "account_index",
6036
+ "in": "query",
6037
+ "required": true,
6038
+ "type": "integer",
6039
+ "format": "int64"
6040
+ }
6041
+ ],
6042
+ "tags": [
6043
+ "pushnotif"
6044
+ ],
6045
+ "consumes": [
6046
+ "multipart/form-data"
6047
+ ],
6048
+ "description": "Check whether the account has an active push notification token"
6049
+ }
6050
+ },
6001
6051
  "/api/v1/pushnotif/settings": {
6002
6052
  "get": {
6003
6053
  "summary": "pushnotif_settings",
@@ -19302,6 +19352,23 @@
19302
19352
  "l1_addresses"
19303
19353
  ]
19304
19354
  },
19355
+ "ReqGetPushNotifRegistered": {
19356
+ "type": "object",
19357
+ "properties": {
19358
+ "auth": {
19359
+ "type": "string",
19360
+ "description": " made optional to support header auth clients"
19361
+ },
19362
+ "account_index": {
19363
+ "type": "integer",
19364
+ "format": "int64"
19365
+ }
19366
+ },
19367
+ "title": "ReqGetPushNotifRegistered",
19368
+ "required": [
19369
+ "account_index"
19370
+ ]
19371
+ },
19305
19372
  "ReqGetPushNotifSettings": {
19306
19373
  "type": "object",
19307
19374
  "properties": {
@@ -21821,6 +21888,32 @@
21821
21888
  "profiles"
21822
21889
  ]
21823
21890
  },
21891
+ "RespGetPushNotifRegistered": {
21892
+ "type": "object",
21893
+ "properties": {
21894
+ "code": {
21895
+ "type": "integer",
21896
+ "format": "int32",
21897
+ "example": "200"
21898
+ },
21899
+ "message": {
21900
+ "type": "string"
21901
+ },
21902
+ "registered": {
21903
+ "type": "boolean",
21904
+ "format": "boolean"
21905
+ },
21906
+ "platform": {
21907
+ "type": "string"
21908
+ }
21909
+ },
21910
+ "title": "RespGetPushNotifRegistered",
21911
+ "required": [
21912
+ "code",
21913
+ "registered",
21914
+ "platform"
21915
+ ]
21916
+ },
21824
21917
  "RespGetPushNotifSettings": {
21825
21918
  "type": "object",
21826
21919
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.355",
3
+ "version": "1.0.356",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {