zklighter-perps 1.0.294 → 1.0.296

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.
@@ -285,6 +285,8 @@ for definition_name, property_names in nullable_properties.items():
285
285
  # These fields use `omitempty` in server.api and are absent when FMP has no
286
286
  # value. They are optional rather than nullable in the generated SDK.
287
287
  optional_properties = {
288
+ "RespStockFinancials": {"stock_financials"},
289
+ "StockFinancialEarnings": {"history"},
288
290
  "StockFinancialEarningsEvent": {"timing"},
289
291
  "StockFinancialPeriod": {"reported_currency"},
290
292
  "StockFinancialProfile": {
@@ -294,6 +296,8 @@ optional_properties = {
294
296
  "sector",
295
297
  "country",
296
298
  },
299
+ "StockFinancialStatements": {"annual", "quarterly"},
300
+ "Token": {"backend_symbol"},
297
301
  "UpcomingEarning": {"currency", "timing"},
298
302
  }
299
303
 
@@ -26,7 +26,8 @@ import {
26
26
  } from '../models/index';
27
27
 
28
28
  export interface StockFinancialsRequest {
29
- market_id: number;
29
+ market_id?: number;
30
+ fields?: string;
30
31
  }
31
32
 
32
33
  /**
@@ -35,23 +36,20 @@ export interface StockFinancialsRequest {
35
36
  export class StockfinancialsApi extends runtime.BaseAPI {
36
37
 
37
38
  /**
38
- * Get stock financials
39
+ * Get stock financials. Returns stock_financial for a single market_id, or stock_financials for every stock market when market_id is omitted. fields narrows the response to a subset of currency, exchange, industry, sector, country, market_cap, next_earnings; omit it to get the full record, which requires market_id.
39
40
  * stockFinancials
40
41
  */
41
42
  async stockFinancialsRaw(requestParameters: StockFinancialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespStockFinancials>> {
42
- if (requestParameters['market_id'] == null) {
43
- throw new runtime.RequiredError(
44
- 'market_id',
45
- 'Required parameter "market_id" was null or undefined when calling stockFinancials().'
46
- );
47
- }
48
-
49
43
  const queryParameters: any = {};
50
44
 
51
45
  if (requestParameters['market_id'] != null) {
52
46
  queryParameters['market_id'] = requestParameters['market_id'];
53
47
  }
54
48
 
49
+ if (requestParameters['fields'] != null) {
50
+ queryParameters['fields'] = requestParameters['fields'];
51
+ }
52
+
55
53
  const headerParameters: runtime.HTTPHeaders = {};
56
54
 
57
55
  const response = await this.request({
@@ -65,10 +63,10 @@ export class StockfinancialsApi extends runtime.BaseAPI {
65
63
  }
66
64
 
67
65
  /**
68
- * Get stock financials
66
+ * Get stock financials. Returns stock_financial for a single market_id, or stock_financials for every stock market when market_id is omitted. fields narrows the response to a subset of currency, exchange, industry, sector, country, market_cap, next_earnings; omit it to get the full record, which requires market_id.
69
67
  * stockFinancials
70
68
  */
71
- async stockFinancials(requestParameters: StockFinancialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespStockFinancials> {
69
+ async stockFinancials(requestParameters: StockFinancialsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespStockFinancials> {
72
70
  const response = await this.stockFinancialsRaw(requestParameters, initOverrides);
73
71
  return await response.value();
74
72
  }
@@ -24,14 +24,19 @@ export interface ReqGetStockFinancials {
24
24
  * @type {number}
25
25
  * @memberof ReqGetStockFinancials
26
26
  */
27
- market_id: number;
27
+ market_id?: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetStockFinancials
32
+ */
33
+ fields?: string;
28
34
  }
29
35
 
30
36
  /**
31
37
  * Check if a given object implements the ReqGetStockFinancials interface.
32
38
  */
33
39
  export function instanceOfReqGetStockFinancials(value: object): value is ReqGetStockFinancials {
34
- if (!('market_id' in value) || value['market_id'] === undefined) return false;
35
40
  return true;
36
41
  }
37
42
 
@@ -45,7 +50,8 @@ export function ReqGetStockFinancialsFromJSONTyped(json: any, ignoreDiscriminato
45
50
  }
46
51
  return {
47
52
 
48
- 'market_id': json['market_id'],
53
+ 'market_id': json['market_id'] == null ? undefined : json['market_id'],
54
+ 'fields': json['fields'] == null ? undefined : json['fields'],
49
55
  };
50
56
  }
51
57
 
@@ -56,6 +62,7 @@ export function ReqGetStockFinancialsToJSON(value?: ReqGetStockFinancials | null
56
62
  return {
57
63
 
58
64
  'market_id': value['market_id'],
65
+ 'fields': value['fields'],
59
66
  };
60
67
  }
61
68
 
@@ -44,6 +44,12 @@ export interface RespStockFinancials {
44
44
  * @memberof RespStockFinancials
45
45
  */
46
46
  stock_financial: StockFinancial;
47
+ /**
48
+ *
49
+ * @type {Array<StockFinancial>}
50
+ * @memberof RespStockFinancials
51
+ */
52
+ stock_financials?: Array<StockFinancial>;
47
53
  }
48
54
 
49
55
  /**
@@ -68,6 +74,7 @@ export function RespStockFinancialsFromJSONTyped(json: any, ignoreDiscriminator:
68
74
  'code': json['code'],
69
75
  'message': json['message'] == null ? undefined : json['message'],
70
76
  'stock_financial': StockFinancialFromJSON(json['stock_financial']),
77
+ 'stock_financials': json['stock_financials'] == null ? undefined : ((json['stock_financials'] as Array<any>).map(StockFinancialFromJSON)),
71
78
  };
72
79
  }
73
80
 
@@ -80,6 +87,7 @@ export function RespStockFinancialsToJSON(value?: RespStockFinancials | null): a
80
87
  'code': value['code'],
81
88
  'message': value['message'],
82
89
  'stock_financial': StockFinancialToJSON(value['stock_financial']),
90
+ 'stock_financials': value['stock_financials'] == null ? undefined : ((value['stock_financials'] as Array<any>).map(StockFinancialToJSON)),
83
91
  };
84
92
  }
85
93
 
@@ -43,14 +43,13 @@ export interface StockFinancialEarnings {
43
43
  * @type {Array<StockFinancialHistoricalEarning>}
44
44
  * @memberof StockFinancialEarnings
45
45
  */
46
- history: Array<StockFinancialHistoricalEarning>;
46
+ history?: Array<StockFinancialHistoricalEarning>;
47
47
  }
48
48
 
49
49
  /**
50
50
  * Check if a given object implements the StockFinancialEarnings interface.
51
51
  */
52
52
  export function instanceOfStockFinancialEarnings(value: object): value is StockFinancialEarnings {
53
- if (!('history' in value) || value['history'] === undefined) return false;
54
53
  return true;
55
54
  }
56
55
 
@@ -65,7 +64,7 @@ export function StockFinancialEarningsFromJSONTyped(json: any, ignoreDiscriminat
65
64
  return {
66
65
 
67
66
  'next': json['next'] == null ? undefined : StockFinancialEarningsEventFromJSON(json['next']),
68
- 'history': ((json['history'] as Array<any>).map(StockFinancialHistoricalEarningFromJSON)),
67
+ 'history': json['history'] == null ? undefined : ((json['history'] as Array<any>).map(StockFinancialHistoricalEarningFromJSON)),
69
68
  };
70
69
  }
71
70
 
@@ -76,7 +75,7 @@ export function StockFinancialEarningsToJSON(value?: StockFinancialEarnings | nu
76
75
  return {
77
76
 
78
77
  'next': StockFinancialEarningsEventToJSON(value['next']),
79
- 'history': ((value['history'] as Array<any>).map(StockFinancialHistoricalEarningToJSON)),
78
+ 'history': value['history'] == null ? undefined : ((value['history'] as Array<any>).map(StockFinancialHistoricalEarningToJSON)),
80
79
  };
81
80
  }
82
81
 
@@ -31,21 +31,19 @@ export interface StockFinancialStatements {
31
31
  * @type {Array<StockFinancialPeriod>}
32
32
  * @memberof StockFinancialStatements
33
33
  */
34
- annual: Array<StockFinancialPeriod>;
34
+ annual?: Array<StockFinancialPeriod>;
35
35
  /**
36
36
  *
37
37
  * @type {Array<StockFinancialPeriod>}
38
38
  * @memberof StockFinancialStatements
39
39
  */
40
- quarterly: Array<StockFinancialPeriod>;
40
+ quarterly?: Array<StockFinancialPeriod>;
41
41
  }
42
42
 
43
43
  /**
44
44
  * Check if a given object implements the StockFinancialStatements interface.
45
45
  */
46
46
  export function instanceOfStockFinancialStatements(value: object): value is StockFinancialStatements {
47
- if (!('annual' in value) || value['annual'] === undefined) return false;
48
- if (!('quarterly' in value) || value['quarterly'] === undefined) return false;
49
47
  return true;
50
48
  }
51
49
 
@@ -59,8 +57,8 @@ export function StockFinancialStatementsFromJSONTyped(json: any, ignoreDiscrimin
59
57
  }
60
58
  return {
61
59
 
62
- 'annual': ((json['annual'] as Array<any>).map(StockFinancialPeriodFromJSON)),
63
- 'quarterly': ((json['quarterly'] as Array<any>).map(StockFinancialPeriodFromJSON)),
60
+ 'annual': json['annual'] == null ? undefined : ((json['annual'] as Array<any>).map(StockFinancialPeriodFromJSON)),
61
+ 'quarterly': json['quarterly'] == null ? undefined : ((json['quarterly'] as Array<any>).map(StockFinancialPeriodFromJSON)),
64
62
  };
65
63
  }
66
64
 
@@ -70,8 +68,8 @@ export function StockFinancialStatementsToJSON(value?: StockFinancialStatements
70
68
  }
71
69
  return {
72
70
 
73
- 'annual': ((value['annual'] as Array<any>).map(StockFinancialPeriodToJSON)),
74
- 'quarterly': ((value['quarterly'] as Array<any>).map(StockFinancialPeriodToJSON)),
71
+ 'annual': value['annual'] == null ? undefined : ((value['annual'] as Array<any>).map(StockFinancialPeriodToJSON)),
72
+ 'quarterly': value['quarterly'] == null ? undefined : ((value['quarterly'] as Array<any>).map(StockFinancialPeriodToJSON)),
75
73
  };
76
74
  }
77
75
 
package/models/Token.ts CHANGED
@@ -30,7 +30,7 @@ export interface Token {
30
30
  * @type {string}
31
31
  * @memberof Token
32
32
  */
33
- backend_symbol: string;
33
+ backend_symbol?: string;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -139,7 +139,6 @@ export type TokenAssetTypeEnum = typeof TokenAssetTypeEnum[keyof typeof TokenAss
139
139
  */
140
140
  export function instanceOfToken(value: object): value is Token {
141
141
  if (!('symbol' in value) || value['symbol'] === undefined) return false;
142
- if (!('backend_symbol' in value) || value['backend_symbol'] === undefined) return false;
143
142
  if (!('name' in value) || value['name'] === undefined) return false;
144
143
  if (!('logo' in value) || value['logo'] === undefined) return false;
145
144
  if (!('logo_extension' in value) || value['logo_extension'] === undefined) return false;
@@ -166,7 +165,7 @@ export function TokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tok
166
165
  return {
167
166
 
168
167
  'symbol': json['symbol'],
169
- 'backend_symbol': json['backend_symbol'],
168
+ 'backend_symbol': json['backend_symbol'] == null ? undefined : json['backend_symbol'],
170
169
  'name': json['name'],
171
170
  'logo': json['logo'],
172
171
  'logo_extension': json['logo_extension'],
package/openapi.json CHANGED
@@ -4627,9 +4627,16 @@
4627
4627
  {
4628
4628
  "name": "market_id",
4629
4629
  "in": "query",
4630
- "required": true,
4630
+ "required": false,
4631
4631
  "type": "integer",
4632
- "format": "int16"
4632
+ "format": "int16",
4633
+ "default": "-1"
4634
+ },
4635
+ {
4636
+ "name": "fields",
4637
+ "in": "query",
4638
+ "required": false,
4639
+ "type": "string"
4633
4640
  }
4634
4641
  ],
4635
4642
  "tags": [
@@ -4638,7 +4645,7 @@
4638
4645
  "consumes": [
4639
4646
  "multipart/form-data"
4640
4647
  ],
4641
- "description": "Get stock financials"
4648
+ "description": "Get stock financials. Returns stock_financial for a single market_id, or stock_financials for every stock market when market_id is omitted. fields narrows the response to a subset of currency, exchange, industry, sector, country, market_cap, next_earnings; omit it to get the full record, which requires market_id."
4642
4649
  }
4643
4650
  },
4644
4651
  "/api/v1/syntheticSpotInfo": {
@@ -12591,13 +12598,14 @@
12591
12598
  "properties": {
12592
12599
  "market_id": {
12593
12600
  "type": "integer",
12594
- "format": "int16"
12601
+ "format": "int16",
12602
+ "default": "-1"
12603
+ },
12604
+ "fields": {
12605
+ "type": "string"
12595
12606
  }
12596
12607
  },
12597
- "title": "ReqGetStockFinancials",
12598
- "required": [
12599
- "market_id"
12600
- ]
12608
+ "title": "ReqGetStockFinancials"
12601
12609
  },
12602
12610
  "ReqGetSyntheticSpotInfo": {
12603
12611
  "type": "object",
@@ -14256,6 +14264,12 @@
14256
14264
  },
14257
14265
  "stock_financial": {
14258
14266
  "$ref": "#/definitions/StockFinancial"
14267
+ },
14268
+ "stock_financials": {
14269
+ "type": "array",
14270
+ "items": {
14271
+ "$ref": "#/definitions/StockFinancial"
14272
+ }
14259
14273
  }
14260
14274
  },
14261
14275
  "title": "RespStockFinancials",
@@ -15070,10 +15084,7 @@
15070
15084
  }
15071
15085
  }
15072
15086
  },
15073
- "title": "StockFinancialEarnings",
15074
- "required": [
15075
- "history"
15076
- ]
15087
+ "title": "StockFinancialEarnings"
15077
15088
  },
15078
15089
  "StockFinancialEarningsEvent": {
15079
15090
  "type": "object",
@@ -15223,11 +15234,7 @@
15223
15234
  }
15224
15235
  }
15225
15236
  },
15226
- "title": "StockFinancialStatements",
15227
- "required": [
15228
- "annual",
15229
- "quarterly"
15230
- ]
15237
+ "title": "StockFinancialStatements"
15231
15238
  },
15232
15239
  "StockIncomeStatement": {
15233
15240
  "type": "object",
@@ -15521,7 +15528,6 @@
15521
15528
  "title": "Token",
15522
15529
  "required": [
15523
15530
  "symbol",
15524
- "backend_symbol",
15525
15531
  "name",
15526
15532
  "logo",
15527
15533
  "logo_extension",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.294",
3
+ "version": "1.0.296",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {