@rivascva/dt-idl 1.1.39 → 1.1.41

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 CHANGED
@@ -490,14 +490,18 @@ function mergeHeaders(...allHeaders) {
490
490
  const createMarketServiceClient = (options) => createClient(options);
491
491
  const createTradeServiceClient = (options) => createClient(options);
492
492
  const createUserServiceClient = (options) => createClient(options);
493
+ const createAssetServiceClient = (options) => createClient(options);
493
494
 
494
495
  const isMarketServiceError = (error) => typeof error === 'object';
495
496
  const isTradeServiceError = (error) => typeof error === 'object';
496
497
  const isUserServiceError = (error) => typeof error === 'object';
498
+ const isAssetServiceError = (error) => typeof error === 'object';
497
499
 
500
+ exports.createAssetServiceClient = createAssetServiceClient;
498
501
  exports.createMarketServiceClient = createMarketServiceClient;
499
502
  exports.createTradeServiceClient = createTradeServiceClient;
500
503
  exports.createUserServiceClient = createUserServiceClient;
504
+ exports.isAssetServiceError = isAssetServiceError;
501
505
  exports.isMarketServiceError = isMarketServiceError;
502
506
  exports.isTradeServiceError = isTradeServiceError;
503
507
  exports.isUserServiceError = isUserServiceError;
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { ClientOptions } from 'openapi-fetch';
5
5
  * This file was auto-generated by openapi-typescript.
6
6
  * Do not make direct changes to the file.
7
7
  */
8
- interface paths$2 {
8
+ interface paths$3 {
9
9
  "/stocks/{symbol}": {
10
10
  parameters: {
11
11
  query?: never;
@@ -14,7 +14,7 @@ interface paths$2 {
14
14
  cookie?: never;
15
15
  };
16
16
  /** @description Gets the full quote for the given stock symbol */
17
- get: operations$2["getStock"];
17
+ get: operations$3["getStock"];
18
18
  put?: never;
19
19
  post?: never;
20
20
  delete?: never;
@@ -31,7 +31,7 @@ interface paths$2 {
31
31
  cookie?: never;
32
32
  };
33
33
  /** @description Gets the price history chart for the given stock symbol */
34
- get: operations$2["getStockHistory"];
34
+ get: operations$3["getStockHistory"];
35
35
  put?: never;
36
36
  post?: never;
37
37
  delete?: never;
@@ -48,7 +48,7 @@ interface paths$2 {
48
48
  cookie?: never;
49
49
  };
50
50
  /** @description Gets the simple quotes for the given stock symbols */
51
- get: operations$2["getStocksBySymbols"];
51
+ get: operations$3["getStocksBySymbols"];
52
52
  put?: never;
53
53
  post?: never;
54
54
  delete?: never;
@@ -65,7 +65,7 @@ interface paths$2 {
65
65
  cookie?: never;
66
66
  };
67
67
  /** @description Gets the simple quotes for the given stock exchange */
68
- get: operations$2["getStocksByExchange"];
68
+ get: operations$3["getStocksByExchange"];
69
69
  put?: never;
70
70
  post?: never;
71
71
  delete?: never;
@@ -82,7 +82,7 @@ interface paths$2 {
82
82
  cookie?: never;
83
83
  };
84
84
  /** @description Gets the simple quotes for the market gainers */
85
- get: operations$2["getMarketGainersStocks"];
85
+ get: operations$3["getMarketGainersStocks"];
86
86
  put?: never;
87
87
  post?: never;
88
88
  delete?: never;
@@ -99,7 +99,7 @@ interface paths$2 {
99
99
  cookie?: never;
100
100
  };
101
101
  /** @description Gets the simple quotes for the market losers */
102
- get: operations$2["getMarketLosersStocks"];
102
+ get: operations$3["getMarketLosersStocks"];
103
103
  put?: never;
104
104
  post?: never;
105
105
  delete?: never;
@@ -116,7 +116,7 @@ interface paths$2 {
116
116
  cookie?: never;
117
117
  };
118
118
  /** @description Gets the simple quotes for the market active */
119
- get: operations$2["getMarketActiveStocks"];
119
+ get: operations$3["getMarketActiveStocks"];
120
120
  put?: never;
121
121
  post?: never;
122
122
  delete?: never;
@@ -133,7 +133,7 @@ interface paths$2 {
133
133
  cookie?: never;
134
134
  };
135
135
  /** @description Gets the simple quotes that fuzzy match the search query */
136
- get: operations$2["getSearchStocks"];
136
+ get: operations$3["getSearchStocks"];
137
137
  put?: never;
138
138
  post?: never;
139
139
  delete?: never;
@@ -150,7 +150,7 @@ interface paths$2 {
150
150
  cookie?: never;
151
151
  };
152
152
  /** @description Gets the latest news articles */
153
- get: operations$2["getNews"];
153
+ get: operations$3["getNews"];
154
154
  put?: never;
155
155
  post?: never;
156
156
  delete?: never;
@@ -167,7 +167,7 @@ interface paths$2 {
167
167
  cookie?: never;
168
168
  };
169
169
  /** @description Gets the latest stock news articles for the given stock symbols */
170
- get: operations$2["getNewsBySymbols"];
170
+ get: operations$3["getNewsBySymbols"];
171
171
  put?: never;
172
172
  post?: never;
173
173
  delete?: never;
@@ -177,7 +177,7 @@ interface paths$2 {
177
177
  trace?: never;
178
178
  };
179
179
  }
180
- interface components$2 {
180
+ interface components$3 {
181
181
  schemas: {
182
182
  /** @description A simple stock quote */
183
183
  SimpleQuote: {
@@ -202,7 +202,7 @@ interface components$2 {
202
202
  percentChange: number;
203
203
  };
204
204
  /** @description A full stock quote */
205
- FullQuote: components$2["schemas"]["SimpleQuote"] & {
205
+ FullQuote: components$3["schemas"]["SimpleQuote"] & {
206
206
  /**
207
207
  * Format: double
208
208
  * @example 180.75
@@ -315,7 +315,7 @@ interface components$2 {
315
315
  thumbnail: string;
316
316
  };
317
317
  /** @description A stock news article */
318
- StockNewsArticle: components$2["schemas"]["NewsArticle"] & {
318
+ StockNewsArticle: components$3["schemas"]["NewsArticle"] & {
319
319
  /** @example AAPL */
320
320
  symbol: string;
321
321
  };
@@ -327,7 +327,7 @@ interface components$2 {
327
327
  */
328
328
  status: number;
329
329
  /** @example ERROR */
330
- code: components$2["schemas"]["ErrorCode"];
330
+ code: components$3["schemas"]["ErrorCode"];
331
331
  /** @example Error */
332
332
  message: string;
333
333
  };
@@ -343,7 +343,7 @@ interface components$2 {
343
343
  [name: string]: unknown;
344
344
  };
345
345
  content: {
346
- "application/json": components$2["schemas"]["Error"];
346
+ "application/json": components$3["schemas"]["Error"];
347
347
  };
348
348
  };
349
349
  /** @description There was an internal server error */
@@ -352,7 +352,7 @@ interface components$2 {
352
352
  [name: string]: unknown;
353
353
  };
354
354
  content: {
355
- "application/json": components$2["schemas"]["Error"];
355
+ "application/json": components$3["schemas"]["Error"];
356
356
  };
357
357
  };
358
358
  };
@@ -361,7 +361,7 @@ interface components$2 {
361
361
  headers: never;
362
362
  pathItems: never;
363
363
  }
364
- interface operations$2 {
364
+ interface operations$3 {
365
365
  getStock: {
366
366
  parameters: {
367
367
  query?: never;
@@ -380,18 +380,18 @@ interface operations$2 {
380
380
  [name: string]: unknown;
381
381
  };
382
382
  content: {
383
- "application/json": components$2["schemas"]["FullQuote"];
383
+ "application/json": components$3["schemas"]["FullQuote"];
384
384
  };
385
385
  };
386
- 404: components$2["responses"]["NotFound"];
387
- 500: components$2["responses"]["InternalServerError"];
386
+ 404: components$3["responses"]["NotFound"];
387
+ 500: components$3["responses"]["InternalServerError"];
388
388
  };
389
389
  };
390
390
  getStockHistory: {
391
391
  parameters: {
392
392
  query: {
393
393
  /** @description The stock history timeframe */
394
- timeframe: components$2["schemas"]["StockHistoryTimeframe"];
394
+ timeframe: components$3["schemas"]["StockHistoryTimeframe"];
395
395
  /** @description The stock history from date */
396
396
  from: string;
397
397
  /** @description The stock history to date */
@@ -412,11 +412,11 @@ interface operations$2 {
412
412
  [name: string]: unknown;
413
413
  };
414
414
  content: {
415
- "application/json": components$2["schemas"]["StockHistoryEntry"][];
415
+ "application/json": components$3["schemas"]["StockHistoryEntry"][];
416
416
  };
417
417
  };
418
- 404: components$2["responses"]["NotFound"];
419
- 500: components$2["responses"]["InternalServerError"];
418
+ 404: components$3["responses"]["NotFound"];
419
+ 500: components$3["responses"]["InternalServerError"];
420
420
  };
421
421
  };
422
422
  getStocksBySymbols: {
@@ -437,11 +437,11 @@ interface operations$2 {
437
437
  [name: string]: unknown;
438
438
  };
439
439
  content: {
440
- "application/json": components$2["schemas"]["SimpleQuote"][];
440
+ "application/json": components$3["schemas"]["SimpleQuote"][];
441
441
  };
442
442
  };
443
- 404: components$2["responses"]["NotFound"];
444
- 500: components$2["responses"]["InternalServerError"];
443
+ 404: components$3["responses"]["NotFound"];
444
+ 500: components$3["responses"]["InternalServerError"];
445
445
  };
446
446
  };
447
447
  getStocksByExchange: {
@@ -462,11 +462,11 @@ interface operations$2 {
462
462
  [name: string]: unknown;
463
463
  };
464
464
  content: {
465
- "application/json": components$2["schemas"]["SimpleQuote"][];
465
+ "application/json": components$3["schemas"]["SimpleQuote"][];
466
466
  };
467
467
  };
468
- 404: components$2["responses"]["NotFound"];
469
- 500: components$2["responses"]["InternalServerError"];
468
+ 404: components$3["responses"]["NotFound"];
469
+ 500: components$3["responses"]["InternalServerError"];
470
470
  };
471
471
  };
472
472
  getMarketGainersStocks: {
@@ -484,10 +484,10 @@ interface operations$2 {
484
484
  [name: string]: unknown;
485
485
  };
486
486
  content: {
487
- "application/json": components$2["schemas"]["SimpleQuote"][];
487
+ "application/json": components$3["schemas"]["SimpleQuote"][];
488
488
  };
489
489
  };
490
- 500: components$2["responses"]["InternalServerError"];
490
+ 500: components$3["responses"]["InternalServerError"];
491
491
  };
492
492
  };
493
493
  getMarketLosersStocks: {
@@ -505,10 +505,10 @@ interface operations$2 {
505
505
  [name: string]: unknown;
506
506
  };
507
507
  content: {
508
- "application/json": components$2["schemas"]["SimpleQuote"][];
508
+ "application/json": components$3["schemas"]["SimpleQuote"][];
509
509
  };
510
510
  };
511
- 500: components$2["responses"]["InternalServerError"];
511
+ 500: components$3["responses"]["InternalServerError"];
512
512
  };
513
513
  };
514
514
  getMarketActiveStocks: {
@@ -526,10 +526,10 @@ interface operations$2 {
526
526
  [name: string]: unknown;
527
527
  };
528
528
  content: {
529
- "application/json": components$2["schemas"]["SimpleQuote"][];
529
+ "application/json": components$3["schemas"]["SimpleQuote"][];
530
530
  };
531
531
  };
532
- 500: components$2["responses"]["InternalServerError"];
532
+ 500: components$3["responses"]["InternalServerError"];
533
533
  };
534
534
  };
535
535
  getSearchStocks: {
@@ -552,10 +552,10 @@ interface operations$2 {
552
552
  [name: string]: unknown;
553
553
  };
554
554
  content: {
555
- "application/json": components$2["schemas"]["SimpleQuote"][];
555
+ "application/json": components$3["schemas"]["SimpleQuote"][];
556
556
  };
557
557
  };
558
- 500: components$2["responses"]["InternalServerError"];
558
+ 500: components$3["responses"]["InternalServerError"];
559
559
  };
560
560
  };
561
561
  getNews: {
@@ -576,10 +576,10 @@ interface operations$2 {
576
576
  [name: string]: unknown;
577
577
  };
578
578
  content: {
579
- "application/json": components$2["schemas"]["NewsArticle"][];
579
+ "application/json": components$3["schemas"]["NewsArticle"][];
580
580
  };
581
581
  };
582
- 500: components$2["responses"]["InternalServerError"];
582
+ 500: components$3["responses"]["InternalServerError"];
583
583
  };
584
584
  };
585
585
  getNewsBySymbols: {
@@ -603,11 +603,11 @@ interface operations$2 {
603
603
  [name: string]: unknown;
604
604
  };
605
605
  content: {
606
- "application/json": components$2["schemas"]["StockNewsArticle"][];
606
+ "application/json": components$3["schemas"]["StockNewsArticle"][];
607
607
  };
608
608
  };
609
- 404: components$2["responses"]["NotFound"];
610
- 500: components$2["responses"]["InternalServerError"];
609
+ 404: components$3["responses"]["NotFound"];
610
+ 500: components$3["responses"]["InternalServerError"];
611
611
  };
612
612
  };
613
613
  }
@@ -616,7 +616,7 @@ interface operations$2 {
616
616
  * This file was auto-generated by openapi-typescript.
617
617
  * Do not make direct changes to the file.
618
618
  */
619
- interface paths$1 {
619
+ interface paths$2 {
620
620
  "/portfolios": {
621
621
  parameters: {
622
622
  query?: never;
@@ -627,7 +627,7 @@ interface paths$1 {
627
627
  get?: never;
628
628
  put?: never;
629
629
  /** @description Adds a new portfolio */
630
- post: operations$1["addPortfolio"];
630
+ post: operations$2["addPortfolio"];
631
631
  delete?: never;
632
632
  options?: never;
633
633
  head?: never;
@@ -643,7 +643,7 @@ interface paths$1 {
643
643
  };
644
644
  get?: never;
645
645
  /** @description Updates an existing portfolio */
646
- put: operations$1["updatePortfolio"];
646
+ put: operations$2["updatePortfolio"];
647
647
  post?: never;
648
648
  delete?: never;
649
649
  options?: never;
@@ -659,7 +659,7 @@ interface paths$1 {
659
659
  cookie?: never;
660
660
  };
661
661
  /** @description Gets the portfolios for the given user */
662
- get: operations$1["getPortfoliosByUser"];
662
+ get: operations$2["getPortfoliosByUser"];
663
663
  put?: never;
664
664
  post?: never;
665
665
  delete?: never;
@@ -678,7 +678,7 @@ interface paths$1 {
678
678
  get?: never;
679
679
  put?: never;
680
680
  /** @description Adds a new order */
681
- post: operations$1["addOrder"];
681
+ post: operations$2["addOrder"];
682
682
  delete?: never;
683
683
  options?: never;
684
684
  head?: never;
@@ -696,21 +696,21 @@ interface paths$1 {
696
696
  put?: never;
697
697
  post?: never;
698
698
  /** @description Deletes an existing order */
699
- delete: operations$1["deleteOrder"];
699
+ delete: operations$2["deleteOrder"];
700
700
  options?: never;
701
701
  head?: never;
702
702
  patch?: never;
703
703
  trace?: never;
704
704
  };
705
705
  }
706
- interface components$1 {
706
+ interface components$2 {
707
707
  schemas: {
708
708
  /** @description Payload to add a new portfolio */
709
709
  AddPortfolioPayload: {
710
710
  /** @example 123456 */
711
711
  userId: string;
712
712
  /** @example PERSONAL */
713
- type: components$1["schemas"]["PortfolioType"];
713
+ type: components$2["schemas"]["PortfolioType"];
714
714
  /**
715
715
  * Format: double
716
716
  * @example 10500.25
@@ -718,13 +718,13 @@ interface components$1 {
718
718
  cash: number;
719
719
  };
720
720
  /** @description Payload to update an existing portfolio */
721
- UpdatePortfolioPayload: components$1["schemas"]["AddPortfolioPayload"];
721
+ UpdatePortfolioPayload: components$2["schemas"]["AddPortfolioPayload"];
722
722
  /** @description A trading portfolio */
723
- Portfolio: components$1["schemas"]["AddPortfolioPayload"] & {
723
+ Portfolio: components$2["schemas"]["AddPortfolioPayload"] & {
724
724
  /** @example 123456 */
725
725
  id: string;
726
- holdings: components$1["schemas"]["Holding"][];
727
- orders: components$1["schemas"]["Order"][];
726
+ holdings: components$2["schemas"]["Holding"][];
727
+ orders: components$2["schemas"]["Order"][];
728
728
  /**
729
729
  * Format: int64
730
730
  * @example 1713398544000
@@ -768,7 +768,7 @@ interface components$1 {
768
768
  /** @example 123456 */
769
769
  portfolioId: string;
770
770
  /** @example BUY */
771
- type: components$1["schemas"]["OrderType"];
771
+ type: components$2["schemas"]["OrderType"];
772
772
  /** @example AAPL */
773
773
  symbol: string;
774
774
  /**
@@ -783,7 +783,7 @@ interface components$1 {
783
783
  shares: number;
784
784
  };
785
785
  /** @description An order */
786
- Order: components$1["schemas"]["AddOrderPayload"] & {
786
+ Order: components$2["schemas"]["AddOrderPayload"] & {
787
787
  /** @example 123456 */
788
788
  id: string;
789
789
  /**
@@ -815,7 +815,7 @@ interface components$1 {
815
815
  */
816
816
  status: number;
817
817
  /** @example ERROR */
818
- code: components$1["schemas"]["ErrorCode"];
818
+ code: components$2["schemas"]["ErrorCode"];
819
819
  /** @example Error */
820
820
  message: string;
821
821
  };
@@ -840,7 +840,7 @@ interface components$1 {
840
840
  [name: string]: unknown;
841
841
  };
842
842
  content: {
843
- "application/json": components$1["schemas"]["Error"];
843
+ "application/json": components$2["schemas"]["Error"];
844
844
  };
845
845
  };
846
846
  /** @description Invalid request payload */
@@ -849,7 +849,7 @@ interface components$1 {
849
849
  [name: string]: unknown;
850
850
  };
851
851
  content: {
852
- "application/json": components$1["schemas"]["Error"];
852
+ "application/json": components$2["schemas"]["Error"];
853
853
  };
854
854
  };
855
855
  /** @description There was an internal server error */
@@ -858,7 +858,7 @@ interface components$1 {
858
858
  [name: string]: unknown;
859
859
  };
860
860
  content: {
861
- "application/json": components$1["schemas"]["Error"];
861
+ "application/json": components$2["schemas"]["Error"];
862
862
  };
863
863
  };
864
864
  };
@@ -867,7 +867,7 @@ interface components$1 {
867
867
  headers: never;
868
868
  pathItems: never;
869
869
  }
870
- interface operations$1 {
870
+ interface operations$2 {
871
871
  addPortfolio: {
872
872
  parameters: {
873
873
  query?: never;
@@ -878,7 +878,7 @@ interface operations$1 {
878
878
  /** @description The request body to add a portfolio */
879
879
  requestBody: {
880
880
  content: {
881
- "application/json": components$1["schemas"]["AddPortfolioPayload"];
881
+ "application/json": components$2["schemas"]["AddPortfolioPayload"];
882
882
  };
883
883
  };
884
884
  responses: {
@@ -888,11 +888,12 @@ interface operations$1 {
888
888
  [name: string]: unknown;
889
889
  };
890
890
  content: {
891
- "application/json": components$1["schemas"]["Portfolio"];
891
+ "application/json": components$2["schemas"]["Portfolio"];
892
892
  };
893
893
  };
894
- 400: components$1["responses"]["BadRequest"];
895
- 500: components$1["responses"]["InternalServerError"];
894
+ 400: components$2["responses"]["BadRequest"];
895
+ 404: components$2["responses"]["NotFound"];
896
+ 500: components$2["responses"]["InternalServerError"];
896
897
  };
897
898
  };
898
899
  updatePortfolio: {
@@ -908,7 +909,7 @@ interface operations$1 {
908
909
  /** @description The request body to update a portfolio */
909
910
  requestBody: {
910
911
  content: {
911
- "application/json": components$1["schemas"]["UpdatePortfolioPayload"];
912
+ "application/json": components$2["schemas"]["UpdatePortfolioPayload"];
912
913
  };
913
914
  };
914
915
  responses: {
@@ -918,12 +919,12 @@ interface operations$1 {
918
919
  [name: string]: unknown;
919
920
  };
920
921
  content: {
921
- "application/json": components$1["schemas"]["Portfolio"];
922
+ "application/json": components$2["schemas"]["Portfolio"];
922
923
  };
923
924
  };
924
- 400: components$1["responses"]["BadRequest"];
925
- 404: components$1["responses"]["NotFound"];
926
- 500: components$1["responses"]["InternalServerError"];
925
+ 400: components$2["responses"]["BadRequest"];
926
+ 404: components$2["responses"]["NotFound"];
927
+ 500: components$2["responses"]["InternalServerError"];
927
928
  };
928
929
  };
929
930
  getPortfoliosByUser: {
@@ -944,11 +945,11 @@ interface operations$1 {
944
945
  [name: string]: unknown;
945
946
  };
946
947
  content: {
947
- "application/json": components$1["schemas"]["Portfolio"][];
948
+ "application/json": components$2["schemas"]["Portfolio"][];
948
949
  };
949
950
  };
950
- 404: components$1["responses"]["NotFound"];
951
- 500: components$1["responses"]["InternalServerError"];
951
+ 404: components$2["responses"]["NotFound"];
952
+ 500: components$2["responses"]["InternalServerError"];
952
953
  };
953
954
  };
954
955
  addOrder: {
@@ -961,7 +962,7 @@ interface operations$1 {
961
962
  /** @description The request body to add an order */
962
963
  requestBody: {
963
964
  content: {
964
- "application/json": components$1["schemas"]["AddOrderPayload"];
965
+ "application/json": components$2["schemas"]["AddOrderPayload"];
965
966
  };
966
967
  };
967
968
  responses: {
@@ -971,12 +972,12 @@ interface operations$1 {
971
972
  [name: string]: unknown;
972
973
  };
973
974
  content: {
974
- "application/json": components$1["schemas"]["Order"];
975
+ "application/json": components$2["schemas"]["Order"];
975
976
  };
976
977
  };
977
- 400: components$1["responses"]["BadRequest"];
978
- 404: components$1["responses"]["NotFound"];
979
- 500: components$1["responses"]["InternalServerError"];
978
+ 400: components$2["responses"]["BadRequest"];
979
+ 404: components$2["responses"]["NotFound"];
980
+ 500: components$2["responses"]["InternalServerError"];
980
981
  };
981
982
  };
982
983
  deleteOrder: {
@@ -991,10 +992,10 @@ interface operations$1 {
991
992
  };
992
993
  requestBody?: never;
993
994
  responses: {
994
- 204: components$1["responses"]["NoContent"];
995
- 400: components$1["responses"]["BadRequest"];
996
- 404: components$1["responses"]["NotFound"];
997
- 500: components$1["responses"]["InternalServerError"];
995
+ 204: components$2["responses"]["NoContent"];
996
+ 400: components$2["responses"]["BadRequest"];
997
+ 404: components$2["responses"]["NotFound"];
998
+ 500: components$2["responses"]["InternalServerError"];
998
999
  };
999
1000
  };
1000
1001
  }
@@ -1003,7 +1004,7 @@ interface operations$1 {
1003
1004
  * This file was auto-generated by openapi-typescript.
1004
1005
  * Do not make direct changes to the file.
1005
1006
  */
1006
- interface paths {
1007
+ interface paths$1 {
1007
1008
  "/users": {
1008
1009
  parameters: {
1009
1010
  query?: never;
@@ -1012,10 +1013,10 @@ interface paths {
1012
1013
  cookie?: never;
1013
1014
  };
1014
1015
  /** @description Gets all users */
1015
- get: operations["getUsers"];
1016
+ get: operations$1["getUsers"];
1016
1017
  put?: never;
1017
1018
  /** @description Adds a new user */
1018
- post: operations["addUser"];
1019
+ post: operations$1["addUser"];
1019
1020
  delete?: never;
1020
1021
  options?: never;
1021
1022
  head?: never;
@@ -1030,9 +1031,9 @@ interface paths {
1030
1031
  cookie?: never;
1031
1032
  };
1032
1033
  /** @description Gets a user */
1033
- get: operations["getUser"];
1034
+ get: operations$1["getUser"];
1034
1035
  /** @description Updates an existing user */
1035
- put: operations["updateUser"];
1036
+ put: operations$1["updateUser"];
1036
1037
  post?: never;
1037
1038
  delete?: never;
1038
1039
  options?: never;
@@ -1041,7 +1042,7 @@ interface paths {
1041
1042
  trace?: never;
1042
1043
  };
1043
1044
  }
1044
- interface components {
1045
+ interface components$1 {
1045
1046
  schemas: {
1046
1047
  /** @description Payload to add a new user */
1047
1048
  AddUserPayload: {
@@ -1055,9 +1056,9 @@ interface components {
1055
1056
  imageUrl?: string;
1056
1057
  };
1057
1058
  /** @description Payload to update an existing user */
1058
- UpdateUserPayload: components["schemas"]["AddUserPayload"];
1059
+ UpdateUserPayload: components$1["schemas"]["AddUserPayload"];
1059
1060
  /** @description A user */
1060
- User: components["schemas"]["AddUserPayload"] & {
1061
+ User: components$1["schemas"]["AddUserPayload"] & {
1061
1062
  /** @example 123456 */
1062
1063
  id: string;
1063
1064
  /**
@@ -1079,7 +1080,7 @@ interface components {
1079
1080
  */
1080
1081
  status: number;
1081
1082
  /** @example ERROR */
1082
- code: components["schemas"]["ErrorCode"];
1083
+ code: components$1["schemas"]["ErrorCode"];
1083
1084
  /** @example Error */
1084
1085
  message: string;
1085
1086
  };
@@ -1100,7 +1101,7 @@ interface components {
1100
1101
  [name: string]: unknown;
1101
1102
  };
1102
1103
  content: {
1103
- "application/json": components["schemas"]["Error"];
1104
+ "application/json": components$1["schemas"]["Error"];
1104
1105
  };
1105
1106
  };
1106
1107
  /** @description Invalid request payload */
@@ -1109,7 +1110,7 @@ interface components {
1109
1110
  [name: string]: unknown;
1110
1111
  };
1111
1112
  content: {
1112
- "application/json": components["schemas"]["Error"];
1113
+ "application/json": components$1["schemas"]["Error"];
1113
1114
  };
1114
1115
  };
1115
1116
  /** @description There was an internal server error */
@@ -1118,7 +1119,7 @@ interface components {
1118
1119
  [name: string]: unknown;
1119
1120
  };
1120
1121
  content: {
1121
- "application/json": components["schemas"]["Error"];
1122
+ "application/json": components$1["schemas"]["Error"];
1122
1123
  };
1123
1124
  };
1124
1125
  };
@@ -1127,7 +1128,7 @@ interface components {
1127
1128
  headers: never;
1128
1129
  pathItems: never;
1129
1130
  }
1130
- interface operations {
1131
+ interface operations$1 {
1131
1132
  getUsers: {
1132
1133
  parameters: {
1133
1134
  query?: never;
@@ -1143,11 +1144,11 @@ interface operations {
1143
1144
  [name: string]: unknown;
1144
1145
  };
1145
1146
  content: {
1146
- "application/json": components["schemas"]["User"][];
1147
+ "application/json": components$1["schemas"]["User"][];
1147
1148
  };
1148
1149
  };
1149
- 404: components["responses"]["NotFound"];
1150
- 500: components["responses"]["InternalServerError"];
1150
+ 404: components$1["responses"]["NotFound"];
1151
+ 500: components$1["responses"]["InternalServerError"];
1151
1152
  };
1152
1153
  };
1153
1154
  addUser: {
@@ -1160,7 +1161,7 @@ interface operations {
1160
1161
  /** @description The request body to add a user */
1161
1162
  requestBody: {
1162
1163
  content: {
1163
- "application/json": components["schemas"]["AddUserPayload"];
1164
+ "application/json": components$1["schemas"]["AddUserPayload"];
1164
1165
  };
1165
1166
  };
1166
1167
  responses: {
@@ -1170,11 +1171,11 @@ interface operations {
1170
1171
  [name: string]: unknown;
1171
1172
  };
1172
1173
  content: {
1173
- "application/json": components["schemas"]["User"];
1174
+ "application/json": components$1["schemas"]["User"];
1174
1175
  };
1175
1176
  };
1176
- 400: components["responses"]["BadRequest"];
1177
- 500: components["responses"]["InternalServerError"];
1177
+ 400: components$1["responses"]["BadRequest"];
1178
+ 500: components$1["responses"]["InternalServerError"];
1178
1179
  };
1179
1180
  };
1180
1181
  getUser: {
@@ -1195,11 +1196,11 @@ interface operations {
1195
1196
  [name: string]: unknown;
1196
1197
  };
1197
1198
  content: {
1198
- "application/json": components["schemas"]["User"];
1199
+ "application/json": components$1["schemas"]["User"];
1199
1200
  };
1200
1201
  };
1201
- 404: components["responses"]["NotFound"];
1202
- 500: components["responses"]["InternalServerError"];
1202
+ 404: components$1["responses"]["NotFound"];
1203
+ 500: components$1["responses"]["InternalServerError"];
1203
1204
  };
1204
1205
  };
1205
1206
  updateUser: {
@@ -1215,7 +1216,7 @@ interface operations {
1215
1216
  /** @description The request body to update a user */
1216
1217
  requestBody: {
1217
1218
  content: {
1218
- "application/json": components["schemas"]["UpdateUserPayload"];
1219
+ "application/json": components$1["schemas"]["UpdateUserPayload"];
1219
1220
  };
1220
1221
  };
1221
1222
  responses: {
@@ -1225,19 +1226,163 @@ interface operations {
1225
1226
  [name: string]: unknown;
1226
1227
  };
1227
1228
  content: {
1228
- "application/json": components["schemas"]["User"];
1229
+ "application/json": components$1["schemas"]["User"];
1230
+ };
1231
+ };
1232
+ 400: components$1["responses"]["BadRequest"];
1233
+ 404: components$1["responses"]["NotFound"];
1234
+ 500: components$1["responses"]["InternalServerError"];
1235
+ };
1236
+ };
1237
+ }
1238
+
1239
+ /**
1240
+ * This file was auto-generated by openapi-typescript.
1241
+ * Do not make direct changes to the file.
1242
+ */
1243
+ interface paths {
1244
+ "/images": {
1245
+ parameters: {
1246
+ query?: never;
1247
+ header?: never;
1248
+ path?: never;
1249
+ cookie?: never;
1250
+ };
1251
+ get?: never;
1252
+ /** @description Uploads an image */
1253
+ put: operations["uploadImage"];
1254
+ post?: never;
1255
+ /** @description Deletes an image */
1256
+ delete: operations["deleteImage"];
1257
+ options?: never;
1258
+ head?: never;
1259
+ patch?: never;
1260
+ trace?: never;
1261
+ };
1262
+ }
1263
+ interface components {
1264
+ schemas: {
1265
+ /** @description A generic error */
1266
+ Error: {
1267
+ /**
1268
+ * Format: int64
1269
+ * @example 500
1270
+ */
1271
+ status: number;
1272
+ /** @example ERROR */
1273
+ code: components["schemas"]["ErrorCode"];
1274
+ /** @example Error */
1275
+ message: string;
1276
+ };
1277
+ /** @enum {string} */
1278
+ ErrorCode: "ERROR";
1279
+ /** @enum {string} */
1280
+ ImageType: "USER_IMAGE";
1281
+ };
1282
+ responses: {
1283
+ /** @description No content */
1284
+ NoContent: {
1285
+ headers: {
1286
+ [name: string]: unknown;
1287
+ };
1288
+ content?: never;
1289
+ };
1290
+ /** @description Invalid request payload */
1291
+ BadRequest: {
1292
+ headers: {
1293
+ [name: string]: unknown;
1294
+ };
1295
+ content: {
1296
+ "application/json": components["schemas"]["Error"];
1297
+ };
1298
+ };
1299
+ /** @description The resource was not found */
1300
+ NotFound: {
1301
+ headers: {
1302
+ [name: string]: unknown;
1303
+ };
1304
+ content: {
1305
+ "application/json": components["schemas"]["Error"];
1306
+ };
1307
+ };
1308
+ /** @description There was an internal server error */
1309
+ InternalServerError: {
1310
+ headers: {
1311
+ [name: string]: unknown;
1312
+ };
1313
+ content: {
1314
+ "application/json": components["schemas"]["Error"];
1315
+ };
1316
+ };
1317
+ };
1318
+ parameters: never;
1319
+ requestBodies: never;
1320
+ headers: never;
1321
+ pathItems: never;
1322
+ }
1323
+ interface operations {
1324
+ uploadImage: {
1325
+ parameters: {
1326
+ query?: never;
1327
+ header?: never;
1328
+ path?: never;
1329
+ cookie?: never;
1330
+ };
1331
+ /** @description The request body to upload an image */
1332
+ requestBody: {
1333
+ content: {
1334
+ "multipart/form-data": {
1335
+ /** Format: binary */
1336
+ file: string;
1337
+ type: components["schemas"]["ImageType"];
1338
+ };
1339
+ };
1340
+ };
1341
+ responses: {
1342
+ /** @description Success */
1343
+ 200: {
1344
+ headers: {
1345
+ [name: string]: unknown;
1346
+ };
1347
+ content: {
1348
+ "application/json": {
1349
+ /** @example https://s3-us-east-1.amazonaws.com/image.png */
1350
+ url: string;
1351
+ };
1229
1352
  };
1230
1353
  };
1231
1354
  400: components["responses"]["BadRequest"];
1355
+ 500: components["responses"]["InternalServerError"];
1356
+ };
1357
+ };
1358
+ deleteImage: {
1359
+ parameters: {
1360
+ query?: never;
1361
+ header?: never;
1362
+ path?: never;
1363
+ cookie?: never;
1364
+ };
1365
+ /** @description The request body to delete an image */
1366
+ requestBody: {
1367
+ content: {
1368
+ "application/json": {
1369
+ /** @example https://s3-us-east-1.amazonaws.com/image.png */
1370
+ url: string;
1371
+ };
1372
+ };
1373
+ };
1374
+ responses: {
1375
+ 204: components["responses"]["NoContent"];
1232
1376
  404: components["responses"]["NotFound"];
1233
1377
  500: components["responses"]["InternalServerError"];
1234
1378
  };
1235
1379
  };
1236
1380
  }
1237
1381
 
1238
- declare const createMarketServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths$2, `${string}/${string}`>;
1239
- declare const createTradeServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths$1, `${string}/${string}`>;
1240
- declare const createUserServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths, `${string}/${string}`>;
1382
+ declare const createMarketServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths$3, `${string}/${string}`>;
1383
+ declare const createTradeServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths$2, `${string}/${string}`>;
1384
+ declare const createUserServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths$1, `${string}/${string}`>;
1385
+ declare const createAssetServiceClient: (options: ClientOptions) => openapi_fetch.Client<paths, `${string}/${string}`>;
1241
1386
 
1242
1387
  declare const isMarketServiceError: (error: unknown) => error is {
1243
1388
  status: number;
@@ -1254,10 +1399,16 @@ declare const isUserServiceError: (error: unknown) => error is {
1254
1399
  code: "ERROR";
1255
1400
  message: string;
1256
1401
  };
1402
+ declare const isAssetServiceError: (error: unknown) => error is {
1403
+ status: number;
1404
+ code: "ERROR";
1405
+ message: string;
1406
+ };
1257
1407
 
1258
- type MarketServiceSchemas = components$2['schemas'];
1259
- type TradeServiceSchemas = components$1['schemas'];
1260
- type UserServiceSchemas = components['schemas'];
1408
+ type MarketServiceSchemas = components$3['schemas'];
1409
+ type TradeServiceSchemas = components$2['schemas'];
1410
+ type UserServiceSchemas = components$1['schemas'];
1411
+ type AssetServiceSchemas = components['schemas'];
1261
1412
  type SimpleQuote = MarketServiceSchemas['SimpleQuote'];
1262
1413
  type FullQuote = MarketServiceSchemas['FullQuote'];
1263
1414
  type NewsArticle = MarketServiceSchemas['NewsArticle'];
@@ -1276,5 +1427,7 @@ type User = UserServiceSchemas['User'];
1276
1427
  type AddUserPayload = UserServiceSchemas['AddUserPayload'];
1277
1428
  type UpdateUserPayload = UserServiceSchemas['UpdateUserPayload'];
1278
1429
  type UserServiceError = UserServiceSchemas['Error'];
1430
+ type AssetServiceError = AssetServiceSchemas['Error'];
1431
+ type ImageType = AssetServiceSchemas['ImageType'];
1279
1432
 
1280
- 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 };
1433
+ export { type AddOrderPayload, type AddUserPayload, type AssetServiceError, type FullQuote, type Holding, type ImageType, 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, createAssetServiceClient, createMarketServiceClient, createTradeServiceClient, createUserServiceClient, isAssetServiceError, isMarketServiceError, isTradeServiceError, isUserServiceError };
package/dist/index.esm.js CHANGED
@@ -488,9 +488,11 @@ function mergeHeaders(...allHeaders) {
488
488
  const createMarketServiceClient = (options) => createClient(options);
489
489
  const createTradeServiceClient = (options) => createClient(options);
490
490
  const createUserServiceClient = (options) => createClient(options);
491
+ const createAssetServiceClient = (options) => createClient(options);
491
492
 
492
493
  const isMarketServiceError = (error) => typeof error === 'object';
493
494
  const isTradeServiceError = (error) => typeof error === 'object';
494
495
  const isUserServiceError = (error) => typeof error === 'object';
496
+ const isAssetServiceError = (error) => typeof error === 'object';
495
497
 
496
- export { createMarketServiceClient, createTradeServiceClient, createUserServiceClient, isMarketServiceError, isTradeServiceError, isUserServiceError };
498
+ export { createAssetServiceClient, createMarketServiceClient, createTradeServiceClient, createUserServiceClient, isAssetServiceError, isMarketServiceError, isTradeServiceError, isUserServiceError };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivascva/dt-idl",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "description": "Dream Trade - Interface Definition Language",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
package/redocly.yaml CHANGED
@@ -11,3 +11,7 @@ apis:
11
11
  root: ./services/dt-user-service.yaml
12
12
  x-openapi-ts:
13
13
  output: ./ts/services/dt-user-service.ts
14
+ dt-asset-service@v1:
15
+ root: ./services/dt-asset-service.yaml
16
+ x-openapi-ts:
17
+ output: ./ts/services/dt-asset-service.ts
@@ -0,0 +1,129 @@
1
+ openapi: 3.0.0
2
+
3
+ info:
4
+ version: 1.0.0
5
+ title: Dream Trade Asset Service
6
+ description: Manage assets across services.
7
+ servers:
8
+ - url: http://localhost:8085/v1
9
+
10
+ paths:
11
+ /images:
12
+ put:
13
+ description: Uploads an image
14
+ operationId: uploadImage
15
+ tags:
16
+ - Images
17
+ requestBody:
18
+ description: The request body to upload an image
19
+ required: true
20
+ content:
21
+ multipart/form-data:
22
+ schema:
23
+ type: object
24
+ properties:
25
+ file:
26
+ type: string
27
+ format: binary
28
+ type:
29
+ $ref: '#/components/schemas/ImageType'
30
+ required:
31
+ - file
32
+ - type
33
+ responses:
34
+ 200:
35
+ description: Success
36
+ content:
37
+ application/json:
38
+ schema:
39
+ type: object
40
+ properties:
41
+ url:
42
+ type: string
43
+ example: https://s3-us-east-1.amazonaws.com/image.png
44
+ required:
45
+ - url
46
+ 400:
47
+ $ref: '#/components/responses/BadRequest'
48
+ 500:
49
+ $ref: '#/components/responses/InternalServerError'
50
+ delete:
51
+ description: Deletes an image
52
+ operationId: deleteImage
53
+ tags:
54
+ - Images
55
+ requestBody:
56
+ description: The request body to delete an image
57
+ required: true
58
+ content:
59
+ application/json:
60
+ schema:
61
+ type: object
62
+ properties:
63
+ url:
64
+ type: string
65
+ example: https://s3-us-east-1.amazonaws.com/image.png
66
+ required:
67
+ - url
68
+ responses:
69
+ 204:
70
+ $ref: '#/components/responses/NoContent'
71
+ 404:
72
+ $ref: '#/components/responses/NotFound'
73
+ 500:
74
+ $ref: '#/components/responses/InternalServerError'
75
+
76
+ components:
77
+ schemas:
78
+ Error:
79
+ description: A generic error
80
+ properties:
81
+ status:
82
+ type: integer
83
+ format: int64
84
+ example: 500
85
+ code:
86
+ $ref: '#/components/schemas/ErrorCode'
87
+ example: ERROR
88
+ message:
89
+ type: string
90
+ example: Error
91
+ required:
92
+ - status
93
+ - code
94
+ - message
95
+
96
+ ErrorCode:
97
+ type: string
98
+ enum:
99
+ - ERROR
100
+
101
+ ImageType:
102
+ type: string
103
+ enum:
104
+ - USER_IMAGE
105
+
106
+ responses:
107
+ NoContent:
108
+ description: No content
109
+
110
+ BadRequest:
111
+ description: Invalid request payload
112
+ content:
113
+ application/json:
114
+ schema:
115
+ $ref: '#/components/schemas/Error'
116
+
117
+ NotFound:
118
+ description: The resource was not found
119
+ content:
120
+ application/json:
121
+ schema:
122
+ $ref: '#/components/schemas/Error'
123
+
124
+ InternalServerError:
125
+ description: There was an internal server error
126
+ content:
127
+ application/json:
128
+ schema:
129
+ $ref: '#/components/schemas/Error'
@@ -31,6 +31,8 @@ paths:
31
31
  $ref: '#/components/schemas/Portfolio'
32
32
  400:
33
33
  $ref: '#/components/responses/BadRequest'
34
+ 404:
35
+ $ref: '#/components/responses/NotFound'
34
36
  500:
35
37
  $ref: '#/components/responses/InternalServerError'
36
38
 
@@ -3,6 +3,7 @@ import createClient, { ClientOptions } from 'openapi-fetch';
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
5
  import { paths as UserServicePaths } from '@ts/services/dt-user-service';
6
+ import { paths as AssetServicePaths } from '@ts/services/dt-asset-service';
6
7
 
7
8
  export const createMarketServiceClient = (options: ClientOptions) =>
8
9
  createClient<MarketServicePaths>(options);
@@ -12,3 +13,6 @@ export const createTradeServiceClient = (options: ClientOptions) =>
12
13
 
13
14
  export const createUserServiceClient = (options: ClientOptions) =>
14
15
  createClient<UserServicePaths>(options);
16
+
17
+ export const createAssetServiceClient = (options: ClientOptions) =>
18
+ createClient<AssetServicePaths>(options);
@@ -1,4 +1,9 @@
1
- import { MarketServiceError, TradeServiceError, UserServiceError } from '@ts/types';
1
+ import {
2
+ MarketServiceError,
3
+ TradeServiceError,
4
+ UserServiceError,
5
+ AssetServiceError,
6
+ } from '@ts/types';
2
7
 
3
8
  export const isMarketServiceError = (error: unknown): error is MarketServiceError =>
4
9
  typeof error === 'object';
@@ -8,3 +13,6 @@ export const isTradeServiceError = (error: unknown): error is TradeServiceError
8
13
 
9
14
  export const isUserServiceError = (error: unknown): error is UserServiceError =>
10
15
  typeof error === 'object';
16
+
17
+ export const isAssetServiceError = (error: unknown): error is AssetServiceError =>
18
+ typeof error === 'object';
@@ -0,0 +1,145 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/images": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ get?: never;
15
+ /** @description Uploads an image */
16
+ put: operations["uploadImage"];
17
+ post?: never;
18
+ /** @description Deletes an image */
19
+ delete: operations["deleteImage"];
20
+ options?: never;
21
+ head?: never;
22
+ patch?: never;
23
+ trace?: never;
24
+ };
25
+ }
26
+ export type webhooks = Record<string, never>;
27
+ export interface components {
28
+ schemas: {
29
+ /** @description A generic error */
30
+ Error: {
31
+ /**
32
+ * Format: int64
33
+ * @example 500
34
+ */
35
+ status: number;
36
+ /** @example ERROR */
37
+ code: components["schemas"]["ErrorCode"];
38
+ /** @example Error */
39
+ message: string;
40
+ };
41
+ /** @enum {string} */
42
+ ErrorCode: "ERROR";
43
+ /** @enum {string} */
44
+ ImageType: "USER_IMAGE";
45
+ };
46
+ responses: {
47
+ /** @description No content */
48
+ NoContent: {
49
+ headers: {
50
+ [name: string]: unknown;
51
+ };
52
+ content?: never;
53
+ };
54
+ /** @description Invalid request payload */
55
+ BadRequest: {
56
+ headers: {
57
+ [name: string]: unknown;
58
+ };
59
+ content: {
60
+ "application/json": components["schemas"]["Error"];
61
+ };
62
+ };
63
+ /** @description The resource was not found */
64
+ NotFound: {
65
+ headers: {
66
+ [name: string]: unknown;
67
+ };
68
+ content: {
69
+ "application/json": components["schemas"]["Error"];
70
+ };
71
+ };
72
+ /** @description There was an internal server error */
73
+ InternalServerError: {
74
+ headers: {
75
+ [name: string]: unknown;
76
+ };
77
+ content: {
78
+ "application/json": components["schemas"]["Error"];
79
+ };
80
+ };
81
+ };
82
+ parameters: never;
83
+ requestBodies: never;
84
+ headers: never;
85
+ pathItems: never;
86
+ }
87
+ export type $defs = Record<string, never>;
88
+ export interface operations {
89
+ uploadImage: {
90
+ parameters: {
91
+ query?: never;
92
+ header?: never;
93
+ path?: never;
94
+ cookie?: never;
95
+ };
96
+ /** @description The request body to upload an image */
97
+ requestBody: {
98
+ content: {
99
+ "multipart/form-data": {
100
+ /** Format: binary */
101
+ file: string;
102
+ type: components["schemas"]["ImageType"];
103
+ };
104
+ };
105
+ };
106
+ responses: {
107
+ /** @description Success */
108
+ 200: {
109
+ headers: {
110
+ [name: string]: unknown;
111
+ };
112
+ content: {
113
+ "application/json": {
114
+ /** @example https://s3-us-east-1.amazonaws.com/image.png */
115
+ url: string;
116
+ };
117
+ };
118
+ };
119
+ 400: components["responses"]["BadRequest"];
120
+ 500: components["responses"]["InternalServerError"];
121
+ };
122
+ };
123
+ deleteImage: {
124
+ parameters: {
125
+ query?: never;
126
+ header?: never;
127
+ path?: never;
128
+ cookie?: never;
129
+ };
130
+ /** @description The request body to delete an image */
131
+ requestBody: {
132
+ content: {
133
+ "application/json": {
134
+ /** @example https://s3-us-east-1.amazonaws.com/image.png */
135
+ url: string;
136
+ };
137
+ };
138
+ };
139
+ responses: {
140
+ 204: components["responses"]["NoContent"];
141
+ 404: components["responses"]["NotFound"];
142
+ 500: components["responses"]["InternalServerError"];
143
+ };
144
+ };
145
+ }
@@ -281,6 +281,7 @@ export interface operations {
281
281
  };
282
282
  };
283
283
  400: components["responses"]["BadRequest"];
284
+ 404: components["responses"]["NotFound"];
284
285
  500: components["responses"]["InternalServerError"];
285
286
  };
286
287
  };
package/ts/types/types.ts CHANGED
@@ -1,10 +1,12 @@
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
3
  import { components as UserServiceComponents } from '@ts/services/dt-user-service';
4
+ import { components as AssetServiceComponents } from '@ts/services/dt-asset-service';
4
5
 
5
6
  type MarketServiceSchemas = MarketServiceComponents['schemas'];
6
7
  type TradeServiceSchemas = TradeServiceComponents['schemas'];
7
8
  type UserServiceSchemas = UserServiceComponents['schemas'];
9
+ type AssetServiceSchemas = AssetServiceComponents['schemas'];
8
10
 
9
11
  // Market Service Types
10
12
  export type SimpleQuote = MarketServiceSchemas['SimpleQuote'];
@@ -29,3 +31,7 @@ export type User = UserServiceSchemas['User'];
29
31
  export type AddUserPayload = UserServiceSchemas['AddUserPayload'];
30
32
  export type UpdateUserPayload = UserServiceSchemas['UpdateUserPayload'];
31
33
  export type UserServiceError = UserServiceSchemas['Error'];
34
+
35
+ // Asset Service Types
36
+ export type AssetServiceError = AssetServiceSchemas['Error'];
37
+ export type ImageType = AssetServiceSchemas['ImageType'];