@rivascva/dt-idl 1.1.28 → 1.1.30

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/Makefile CHANGED
@@ -1,4 +1,3 @@
1
- install:
2
- brew install pre-commit
1
+ pre-commit-install:
3
2
  pre-commit install --hook-type pre-commit --config .githooks/pre-commit-config.yaml
4
3
  pre-commit install --hook-type pre-push --config .githooks/pre-push-config.yaml
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # Dream Trade Interface Description Language (IDL)
2
+
3
+ The API language for all Dream Trade microservices.
4
+
5
+ [![NPM Version](https://img.shields.io/npm/v/@rivascva/dt-idl.svg?style=flat)](https://www.npmjs.com/package/@rivascva/dt-idl)
6
+
7
+ ## Setup
8
+
9
+ ### 1. Install `mise`
10
+
11
+ - Install the `mise` CLI
12
+
13
+ ```bash
14
+ brew install mise
15
+ ```
16
+
17
+ - Add the `mise` activation command to your `.zshrc`
18
+
19
+ ```bash
20
+ echo 'eval "$(mise activate zsh)"' >> ~/.zshrc
21
+ ```
22
+
23
+ - Reload your `.zshrc` config (or restart your shell)
24
+
25
+ ```bash
26
+ source ~/.zshrc
27
+ ```
28
+
29
+ > Note: You can follow the official installation [docs](https://mise.jdx.dev/getting-started.html) for other options
30
+
31
+ ### 2. Install project dependencies
32
+
33
+ - Use `mise` to install project dependencies
34
+
35
+ ```bash
36
+ mise install
37
+ ```
38
+
39
+ ### 3. Install `pre-commit` hooks
40
+
41
+ - Use the makefile `pre-commit-install` command
42
+
43
+ ```bash
44
+ make pre-commit-install
45
+ ```
46
+
47
+ ### 4. Install `node` modules
48
+
49
+ - Install all `node` modules
50
+
51
+ ```bash
52
+ npm install
53
+ ```
54
+
55
+ ### Common Scripts
56
+
57
+ - `npm run lint` - Lints all typescript files
58
+ - `npm run check` - Checks the syntax of all typescript files
59
+ - `npm run gen` - Generates typescript service clients
60
+
61
+ ### Deployments
62
+
63
+ Any merge to `main` with changes to the `ts/*` directory will trigger an automatic deployment to `npm`
package/dist/index.d.ts CHANGED
@@ -274,7 +274,7 @@ interface components$1 {
274
274
  country: string;
275
275
  };
276
276
  /** @description A stock history chart entry */
277
- HistoryChartEntry: {
277
+ StockHistoryEntry: {
278
278
  /** @example 2024-12-24T02:30:00Z */
279
279
  date: string;
280
280
  /**
@@ -334,7 +334,7 @@ interface components$1 {
334
334
  /** @enum {string} */
335
335
  ErrorCode: "ERROR";
336
336
  /** @enum {string} */
337
- HistoryTimeframe: "MIN5" | "MIN15" | "MIN30" | "HOUR1" | "HOUR4" | "DAY1";
337
+ StockHistoryTimeframe: "MIN5" | "MIN15" | "MIN30" | "HOUR1" | "HOUR4" | "DAY1";
338
338
  };
339
339
  responses: {
340
340
  /** @description The resource was not found */
@@ -391,7 +391,7 @@ interface operations$1 {
391
391
  parameters: {
392
392
  query: {
393
393
  /** @description The stock history timeframe */
394
- timeframe: components$1["schemas"]["HistoryTimeframe"];
394
+ timeframe: components$1["schemas"]["StockHistoryTimeframe"];
395
395
  /** @description The stock history from date */
396
396
  from: string;
397
397
  /** @description The stock history to date */
@@ -412,7 +412,7 @@ interface operations$1 {
412
412
  [name: string]: unknown;
413
413
  };
414
414
  content: {
415
- "application/json": components$1["schemas"]["HistoryChartEntry"][];
415
+ "application/json": components$1["schemas"]["StockHistoryEntry"][];
416
416
  };
417
417
  };
418
418
  404: components$1["responses"]["NotFound"];
@@ -697,6 +697,10 @@ interface components {
697
697
  email: string;
698
698
  /** @example Sam Smith */
699
699
  name: string;
700
+ /** @example USA */
701
+ country: string;
702
+ /** @example https://www.assets.com/image.png */
703
+ imageUrl: string;
700
704
  };
701
705
  /** @description Payload to update an existing user */
702
706
  UpdateUserPayload: components["schemas"]["AddUserPayload"];
@@ -1079,8 +1083,8 @@ type FullQuote = MarketServiceSchemas['FullQuote'];
1079
1083
  type NewsArticle = MarketServiceSchemas['NewsArticle'];
1080
1084
  type StockNewsArticle = MarketServiceSchemas['StockNewsArticle'];
1081
1085
  type MarketServiceError = MarketServiceSchemas['Error'];
1082
- type HistoryTimeframe = MarketServiceSchemas['HistoryTimeframe'];
1083
- type HistoryChartEntry = MarketServiceSchemas['HistoryChartEntry'];
1086
+ type StockHistoryTimeframe = MarketServiceSchemas['StockHistoryTimeframe'];
1087
+ type StockHistoryEntry = MarketServiceSchemas['StockHistoryEntry'];
1084
1088
  type User = TradeServiceSchemas['User'];
1085
1089
  type Portfolio = TradeServiceSchemas['Portfolio'];
1086
1090
  type PortfolioType = TradeServiceSchemas['PortfolioType'];
@@ -1091,4 +1095,4 @@ type OrderType = TradeServiceSchemas['OrderType'];
1091
1095
  type Holding = TradeServiceSchemas['Holding'];
1092
1096
  type TradeServiceError = TradeServiceSchemas['Error'];
1093
1097
 
1094
- export { type AddOrderPayload, type DeleteOrderPayload, type FullQuote, type HistoryChartEntry, type HistoryTimeframe, type Holding, type MarketServiceError, type NewsArticle, type Order, type OrderType, type Portfolio, type PortfolioType, type SimpleQuote, type StockNewsArticle, type TradeServiceError, type User, createMarketServiceClient, createTradeServiceClient, isMarketServiceError, isTradeServiceError };
1098
+ export { type AddOrderPayload, type DeleteOrderPayload, 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 User, createMarketServiceClient, createTradeServiceClient, isMarketServiceError, isTradeServiceError };
package/mise.toml ADDED
@@ -0,0 +1,3 @@
1
+ [tools]
2
+ node = "22"
3
+ pre-commit = "4.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivascva/dt-idl",
3
- "version": "1.1.28",
3
+ "version": "1.1.30",
4
4
  "description": "Dream Trade - Interface Definition Language",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -55,7 +55,7 @@ paths:
55
55
  description: The stock history timeframe
56
56
  required: true
57
57
  schema:
58
- $ref: '#/components/schemas/HistoryTimeframe'
58
+ $ref: '#/components/schemas/StockHistoryTimeframe'
59
59
  example: MIN5
60
60
  - in: query
61
61
  name: from
@@ -79,7 +79,7 @@ paths:
79
79
  schema:
80
80
  type: array
81
81
  items:
82
- $ref: '#/components/schemas/HistoryChartEntry'
82
+ $ref: '#/components/schemas/StockHistoryEntry'
83
83
  404:
84
84
  $ref: '#/components/responses/NotFound'
85
85
  500:
@@ -415,7 +415,7 @@ components:
415
415
  - state
416
416
  - country
417
417
 
418
- HistoryChartEntry:
418
+ StockHistoryEntry:
419
419
  description: A stock history chart entry
420
420
  properties:
421
421
  date:
@@ -505,7 +505,7 @@ components:
505
505
  enum:
506
506
  - ERROR
507
507
 
508
- HistoryTimeframe:
508
+ StockHistoryTimeframe:
509
509
  type: string
510
510
  enum:
511
511
  - MIN5
@@ -199,9 +199,17 @@ components:
199
199
  name:
200
200
  type: string
201
201
  example: Sam Smith
202
+ country:
203
+ type: string
204
+ example: USA
205
+ imageUrl:
206
+ type: string
207
+ example: https://www.assets.com/image.png
202
208
  required:
203
209
  - email
204
210
  - name
211
+ - country
212
+ - imageUrl
205
213
 
206
214
  UpdateUserPayload:
207
215
  description: Payload to update an existing user
@@ -273,7 +273,7 @@ export interface components {
273
273
  country: string;
274
274
  };
275
275
  /** @description A stock history chart entry */
276
- HistoryChartEntry: {
276
+ StockHistoryEntry: {
277
277
  /** @example 2024-12-24T02:30:00Z */
278
278
  date: string;
279
279
  /**
@@ -333,7 +333,7 @@ export interface components {
333
333
  /** @enum {string} */
334
334
  ErrorCode: "ERROR";
335
335
  /** @enum {string} */
336
- HistoryTimeframe: "MIN5" | "MIN15" | "MIN30" | "HOUR1" | "HOUR4" | "DAY1";
336
+ StockHistoryTimeframe: "MIN5" | "MIN15" | "MIN30" | "HOUR1" | "HOUR4" | "DAY1";
337
337
  };
338
338
  responses: {
339
339
  /** @description The resource was not found */
@@ -391,7 +391,7 @@ export interface operations {
391
391
  parameters: {
392
392
  query: {
393
393
  /** @description The stock history timeframe */
394
- timeframe: components["schemas"]["HistoryTimeframe"];
394
+ timeframe: components["schemas"]["StockHistoryTimeframe"];
395
395
  /** @description The stock history from date */
396
396
  from: string;
397
397
  /** @description The stock history to date */
@@ -412,7 +412,7 @@ export interface operations {
412
412
  [name: string]: unknown;
413
413
  };
414
414
  content: {
415
- "application/json": components["schemas"]["HistoryChartEntry"][];
415
+ "application/json": components["schemas"]["StockHistoryEntry"][];
416
416
  };
417
417
  };
418
418
  404: components["responses"]["NotFound"];
@@ -85,6 +85,10 @@ export interface components {
85
85
  email: string;
86
86
  /** @example Sam Smith */
87
87
  name: string;
88
+ /** @example USA */
89
+ country: string;
90
+ /** @example https://www.assets.com/image.png */
91
+ imageUrl: string;
88
92
  };
89
93
  /** @description Payload to update an existing user */
90
94
  UpdateUserPayload: components["schemas"]["AddUserPayload"];
package/ts/types/types.ts CHANGED
@@ -10,8 +10,8 @@ export type FullQuote = MarketServiceSchemas['FullQuote'];
10
10
  export type NewsArticle = MarketServiceSchemas['NewsArticle'];
11
11
  export type StockNewsArticle = MarketServiceSchemas['StockNewsArticle'];
12
12
  export type MarketServiceError = MarketServiceSchemas['Error'];
13
- export type HistoryTimeframe = MarketServiceSchemas['HistoryTimeframe'];
14
- export type HistoryChartEntry = MarketServiceSchemas['HistoryChartEntry'];
13
+ export type StockHistoryTimeframe = MarketServiceSchemas['StockHistoryTimeframe'];
14
+ export type StockHistoryEntry = MarketServiceSchemas['StockHistoryEntry'];
15
15
 
16
16
  // Trade Service Types
17
17
  export type User = TradeServiceSchemas['User'];