@rivascva/dt-idl 1.1.36 → 1.1.38
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/dist/index.cjs.js +4 -4
- package/dist/index.d.ts +8 -9
- package/dist/index.esm.js +3 -3
- package/package.json +1 -1
- package/redocly.yaml +3 -3
- package/services/dt-trade-service.yaml +0 -2
- package/services/{dt-app-service.yaml → dt-user-service.yaml} +2 -3
- package/ts/clients/clients.ts +3 -3
- package/ts/clients/errors.ts +2 -2
- package/ts/services/dt-trade-service.ts +0 -1
- package/ts/types/types.ts +7 -7
- /package/ts/services/{dt-app-service.ts → dt-user-service.ts} +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -489,15 +489,15 @@ function mergeHeaders(...allHeaders) {
|
|
|
489
489
|
|
|
490
490
|
const createMarketServiceClient = (options) => createClient(options);
|
|
491
491
|
const createTradeServiceClient = (options) => createClient(options);
|
|
492
|
-
const
|
|
492
|
+
const createUserServiceClient = (options) => createClient(options);
|
|
493
493
|
|
|
494
494
|
const isMarketServiceError = (error) => typeof error === 'object';
|
|
495
495
|
const isTradeServiceError = (error) => typeof error === 'object';
|
|
496
|
-
const
|
|
496
|
+
const isUserServiceError = (error) => typeof error === 'object';
|
|
497
497
|
|
|
498
|
-
exports.createAppServiceClient = createAppServiceClient;
|
|
499
498
|
exports.createMarketServiceClient = createMarketServiceClient;
|
|
500
499
|
exports.createTradeServiceClient = createTradeServiceClient;
|
|
501
|
-
exports.
|
|
500
|
+
exports.createUserServiceClient = createUserServiceClient;
|
|
502
501
|
exports.isMarketServiceError = isMarketServiceError;
|
|
503
502
|
exports.isTradeServiceError = isTradeServiceError;
|
|
503
|
+
exports.isUserServiceError = isUserServiceError;
|
package/dist/index.d.ts
CHANGED
|
@@ -1103,7 +1103,6 @@ interface operations$1 {
|
|
|
1103
1103
|
};
|
|
1104
1104
|
};
|
|
1105
1105
|
400: components$1["responses"]["BadRequest"];
|
|
1106
|
-
404: components$1["responses"]["NotFound"];
|
|
1107
1106
|
500: components$1["responses"]["InternalServerError"];
|
|
1108
1107
|
};
|
|
1109
1108
|
};
|
|
@@ -1449,7 +1448,7 @@ interface operations {
|
|
|
1449
1448
|
|
|
1450
1449
|
declare const createMarketServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths$2, `${string}/${string}`>;
|
|
1451
1450
|
declare const createTradeServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths$1, `${string}/${string}`>;
|
|
1452
|
-
declare const
|
|
1451
|
+
declare const createUserServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths, `${string}/${string}`>;
|
|
1453
1452
|
|
|
1454
1453
|
declare const isMarketServiceError: (error: unknown) => error is {
|
|
1455
1454
|
status: number;
|
|
@@ -1461,7 +1460,7 @@ declare const isTradeServiceError: (error: unknown) => error is {
|
|
|
1461
1460
|
code: "ERROR" | "NOT_ENOUGH_CASH" | "NOT_ENOUGH_SHARES" | "UNDELETABLE";
|
|
1462
1461
|
message: string;
|
|
1463
1462
|
};
|
|
1464
|
-
declare const
|
|
1463
|
+
declare const isUserServiceError: (error: unknown) => error is {
|
|
1465
1464
|
status: number;
|
|
1466
1465
|
code: "ERROR";
|
|
1467
1466
|
message: string;
|
|
@@ -1469,7 +1468,7 @@ declare const isAppServiceError: (error: unknown) => error is {
|
|
|
1469
1468
|
|
|
1470
1469
|
type MarketServiceSchemas = components$2['schemas'];
|
|
1471
1470
|
type TradeServiceSchemas = components$1['schemas'];
|
|
1472
|
-
type
|
|
1471
|
+
type UserServiceSchemas = components['schemas'];
|
|
1473
1472
|
type SimpleQuote = MarketServiceSchemas['SimpleQuote'];
|
|
1474
1473
|
type FullQuote = MarketServiceSchemas['FullQuote'];
|
|
1475
1474
|
type NewsArticle = MarketServiceSchemas['NewsArticle'];
|
|
@@ -1484,9 +1483,9 @@ type Order = TradeServiceSchemas['Order'];
|
|
|
1484
1483
|
type OrderType = TradeServiceSchemas['OrderType'];
|
|
1485
1484
|
type Holding = TradeServiceSchemas['Holding'];
|
|
1486
1485
|
type TradeServiceError = TradeServiceSchemas['Error'];
|
|
1487
|
-
type User =
|
|
1488
|
-
type AddUserPayload =
|
|
1489
|
-
type UpdateUserPayload =
|
|
1490
|
-
type
|
|
1486
|
+
type User = UserServiceSchemas['User'];
|
|
1487
|
+
type AddUserPayload = UserServiceSchemas['AddUserPayload'];
|
|
1488
|
+
type UpdateUserPayload = UserServiceSchemas['UpdateUserPayload'];
|
|
1489
|
+
type UserServiceError = UserServiceSchemas['Error'];
|
|
1491
1490
|
|
|
1492
|
-
export { type AddOrderPayload, type AddUserPayload, type
|
|
1491
|
+
export { type AddOrderPayload, type AddUserPayload, type FullQuote, type Holding, type MarketServiceError, type NewsArticle, type Order, type OrderType, type Portfolio, type PortfolioType, type SimpleQuote, type StockHistoryEntry, type StockHistoryTimeframe, type StockNewsArticle, type TradeServiceError, type UpdateUserPayload, type User, type UserServiceError, createMarketServiceClient, createTradeServiceClient, createUserServiceClient, isMarketServiceError, isTradeServiceError, isUserServiceError };
|
package/dist/index.esm.js
CHANGED
|
@@ -487,10 +487,10 @@ function mergeHeaders(...allHeaders) {
|
|
|
487
487
|
|
|
488
488
|
const createMarketServiceClient = (options) => createClient(options);
|
|
489
489
|
const createTradeServiceClient = (options) => createClient(options);
|
|
490
|
-
const
|
|
490
|
+
const createUserServiceClient = (options) => createClient(options);
|
|
491
491
|
|
|
492
492
|
const isMarketServiceError = (error) => typeof error === 'object';
|
|
493
493
|
const isTradeServiceError = (error) => typeof error === 'object';
|
|
494
|
-
const
|
|
494
|
+
const isUserServiceError = (error) => typeof error === 'object';
|
|
495
495
|
|
|
496
|
-
export {
|
|
496
|
+
export { createMarketServiceClient, createTradeServiceClient, createUserServiceClient, isMarketServiceError, isTradeServiceError, isUserServiceError };
|
package/package.json
CHANGED
package/redocly.yaml
CHANGED
|
@@ -7,7 +7,7 @@ apis:
|
|
|
7
7
|
root: ./services/dt-trade-service.yaml
|
|
8
8
|
x-openapi-ts:
|
|
9
9
|
output: ./ts/services/dt-trade-service.ts
|
|
10
|
-
dt-
|
|
11
|
-
root: ./services/dt-
|
|
10
|
+
dt-user-service@v1:
|
|
11
|
+
root: ./services/dt-user-service.yaml
|
|
12
12
|
x-openapi-ts:
|
|
13
|
-
output: ./ts/services/dt-
|
|
13
|
+
output: ./ts/services/dt-user-service.ts
|
package/ts/clients/clients.ts
CHANGED
|
@@ -2,7 +2,7 @@ import createClient, { ClientOptions } from 'openapi-fetch';
|
|
|
2
2
|
|
|
3
3
|
import { paths as MarketServicePaths } from '@ts/services/dt-market-service';
|
|
4
4
|
import { paths as TradeServicePaths } from '@ts/services/dt-trade-service';
|
|
5
|
-
import { paths as
|
|
5
|
+
import { paths as UserServicePaths } from '@ts/services/dt-user-service';
|
|
6
6
|
|
|
7
7
|
export const createMarketServiceClient = (options: ClientOptions) =>
|
|
8
8
|
createClient<MarketServicePaths>(options);
|
|
@@ -10,5 +10,5 @@ export const createMarketServiceClient = (options: ClientOptions) =>
|
|
|
10
10
|
export const createTradeServiceClient = (options: ClientOptions) =>
|
|
11
11
|
createClient<TradeServicePaths>(options);
|
|
12
12
|
|
|
13
|
-
export const
|
|
14
|
-
createClient<
|
|
13
|
+
export const createUserServiceClient = (options: ClientOptions) =>
|
|
14
|
+
createClient<UserServicePaths>(options);
|
package/ts/clients/errors.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MarketServiceError, TradeServiceError,
|
|
1
|
+
import { MarketServiceError, TradeServiceError, UserServiceError } from '@ts/types';
|
|
2
2
|
|
|
3
3
|
export const isMarketServiceError = (error: unknown): error is MarketServiceError =>
|
|
4
4
|
typeof error === 'object';
|
|
@@ -6,5 +6,5 @@ export const isMarketServiceError = (error: unknown): error is MarketServiceErro
|
|
|
6
6
|
export const isTradeServiceError = (error: unknown): error is TradeServiceError =>
|
|
7
7
|
typeof error === 'object';
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const isUserServiceError = (error: unknown): error is UserServiceError =>
|
|
10
10
|
typeof error === 'object';
|
package/ts/types/types.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { components as MarketServiceComponents } from '@ts/services/dt-market-service';
|
|
2
2
|
import { components as TradeServiceComponents } from '@ts/services/dt-trade-service';
|
|
3
|
-
import { components as
|
|
3
|
+
import { components as UserServiceComponents } from '@ts/services/dt-user-service';
|
|
4
4
|
|
|
5
5
|
type MarketServiceSchemas = MarketServiceComponents['schemas'];
|
|
6
6
|
type TradeServiceSchemas = TradeServiceComponents['schemas'];
|
|
7
|
-
type
|
|
7
|
+
type UserServiceSchemas = UserServiceComponents['schemas'];
|
|
8
8
|
|
|
9
9
|
// Market Service Types
|
|
10
10
|
export type SimpleQuote = MarketServiceSchemas['SimpleQuote'];
|
|
@@ -24,8 +24,8 @@ export type OrderType = TradeServiceSchemas['OrderType'];
|
|
|
24
24
|
export type Holding = TradeServiceSchemas['Holding'];
|
|
25
25
|
export type TradeServiceError = TradeServiceSchemas['Error'];
|
|
26
26
|
|
|
27
|
-
//
|
|
28
|
-
export type User =
|
|
29
|
-
export type AddUserPayload =
|
|
30
|
-
export type UpdateUserPayload =
|
|
31
|
-
export type
|
|
27
|
+
// User Service Types
|
|
28
|
+
export type User = UserServiceSchemas['User'];
|
|
29
|
+
export type AddUserPayload = UserServiceSchemas['AddUserPayload'];
|
|
30
|
+
export type UpdateUserPayload = UserServiceSchemas['UpdateUserPayload'];
|
|
31
|
+
export type UserServiceError = UserServiceSchemas['Error'];
|
|
File without changes
|