@rivascva/dt-idl 1.1.41 → 1.1.43

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.d.ts CHANGED
@@ -1262,6 +1262,21 @@ interface paths {
1262
1262
  }
1263
1263
  interface components {
1264
1264
  schemas: {
1265
+ /** @description Payload to upload an image */
1266
+ UploadImagePayload: {
1267
+ /** Format: binary */
1268
+ file: string;
1269
+ type: components["schemas"]["ImageType"];
1270
+ };
1271
+ /** @description Response from uploading an image */
1272
+ UploadImageResponse: {
1273
+ /** @example https://bucket.s3.region.amazonaws.com/key */
1274
+ url: string;
1275
+ };
1276
+ DeleteImagePayload: {
1277
+ /** @example https://bucket.s3.region.amazonaws.com/key */
1278
+ url: string;
1279
+ };
1265
1280
  /** @description A generic error */
1266
1281
  Error: {
1267
1282
  /**
@@ -1331,11 +1346,7 @@ interface operations {
1331
1346
  /** @description The request body to upload an image */
1332
1347
  requestBody: {
1333
1348
  content: {
1334
- "multipart/form-data": {
1335
- /** Format: binary */
1336
- file: string;
1337
- type: components["schemas"]["ImageType"];
1338
- };
1349
+ "multipart/form-data": components["schemas"]["UploadImagePayload"];
1339
1350
  };
1340
1351
  };
1341
1352
  responses: {
@@ -1345,10 +1356,7 @@ interface operations {
1345
1356
  [name: string]: unknown;
1346
1357
  };
1347
1358
  content: {
1348
- "application/json": {
1349
- /** @example https://s3-us-east-1.amazonaws.com/image.png */
1350
- url: string;
1351
- };
1359
+ "application/json": components["schemas"]["UploadImageResponse"];
1352
1360
  };
1353
1361
  };
1354
1362
  400: components["responses"]["BadRequest"];
@@ -1365,10 +1373,7 @@ interface operations {
1365
1373
  /** @description The request body to delete an image */
1366
1374
  requestBody: {
1367
1375
  content: {
1368
- "application/json": {
1369
- /** @example https://s3-us-east-1.amazonaws.com/image.png */
1370
- url: string;
1371
- };
1376
+ "application/json": components["schemas"]["DeleteImagePayload"];
1372
1377
  };
1373
1378
  };
1374
1379
  responses: {
@@ -1427,7 +1432,9 @@ type User = UserServiceSchemas['User'];
1427
1432
  type AddUserPayload = UserServiceSchemas['AddUserPayload'];
1428
1433
  type UpdateUserPayload = UserServiceSchemas['UpdateUserPayload'];
1429
1434
  type UserServiceError = UserServiceSchemas['Error'];
1430
- type AssetServiceError = AssetServiceSchemas['Error'];
1431
1435
  type ImageType = AssetServiceSchemas['ImageType'];
1436
+ type UploadImagePayload = AssetServiceSchemas['UploadImagePayload'];
1437
+ type DeleteImagePayload = AssetServiceSchemas['DeleteImagePayload'];
1438
+ type AssetServiceError = AssetServiceSchemas['Error'];
1432
1439
 
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 };
1440
+ export { type AddOrderPayload, type AddUserPayload, type AssetServiceError, type DeleteImagePayload, 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 UploadImagePayload, type User, type UserServiceError, 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.41",
3
+ "version": "1.1.43",
4
4
  "description": "Dream Trade - Interface Definition Language",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -20,29 +20,14 @@ paths:
20
20
  content:
21
21
  multipart/form-data:
22
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
23
+ $ref: '#/components/schemas/UploadImagePayload'
33
24
  responses:
34
25
  200:
35
26
  description: Success
36
27
  content:
37
28
  application/json:
38
29
  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
30
+ $ref: '#/components/schemas/UploadImageResponse'
46
31
  400:
47
32
  $ref: '#/components/responses/BadRequest'
48
33
  500:
@@ -58,13 +43,7 @@ paths:
58
43
  content:
59
44
  application/json:
60
45
  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
46
+ $ref: '#/components/schemas/DeleteImagePayload'
68
47
  responses:
69
48
  204:
70
49
  $ref: '#/components/responses/NoContent'
@@ -75,6 +54,38 @@ paths:
75
54
 
76
55
  components:
77
56
  schemas:
57
+ UploadImagePayload:
58
+ description: Payload to upload an image
59
+ type: object
60
+ properties:
61
+ file:
62
+ type: string
63
+ format: binary
64
+ type:
65
+ $ref: '#/components/schemas/ImageType'
66
+ required:
67
+ - file
68
+ - type
69
+
70
+ UploadImageResponse:
71
+ description: Response from uploading an image
72
+ type: object
73
+ properties:
74
+ url:
75
+ type: string
76
+ example: https://bucket.s3.region.amazonaws.com/key
77
+ required:
78
+ - url
79
+
80
+ DeleteImagePayload:
81
+ type: object
82
+ properties:
83
+ url:
84
+ type: string
85
+ example: https://bucket.s3.region.amazonaws.com/key
86
+ required:
87
+ - url
88
+
78
89
  Error:
79
90
  description: A generic error
80
91
  properties:
@@ -26,6 +26,21 @@ export interface paths {
26
26
  export type webhooks = Record<string, never>;
27
27
  export interface components {
28
28
  schemas: {
29
+ /** @description Payload to upload an image */
30
+ UploadImagePayload: {
31
+ /** Format: binary */
32
+ file: string;
33
+ type: components["schemas"]["ImageType"];
34
+ };
35
+ /** @description Response from uploading an image */
36
+ UploadImageResponse: {
37
+ /** @example https://bucket.s3.region.amazonaws.com/key */
38
+ url: string;
39
+ };
40
+ DeleteImagePayload: {
41
+ /** @example https://bucket.s3.region.amazonaws.com/key */
42
+ url: string;
43
+ };
29
44
  /** @description A generic error */
30
45
  Error: {
31
46
  /**
@@ -96,11 +111,7 @@ export interface operations {
96
111
  /** @description The request body to upload an image */
97
112
  requestBody: {
98
113
  content: {
99
- "multipart/form-data": {
100
- /** Format: binary */
101
- file: string;
102
- type: components["schemas"]["ImageType"];
103
- };
114
+ "multipart/form-data": components["schemas"]["UploadImagePayload"];
104
115
  };
105
116
  };
106
117
  responses: {
@@ -110,10 +121,7 @@ export interface operations {
110
121
  [name: string]: unknown;
111
122
  };
112
123
  content: {
113
- "application/json": {
114
- /** @example https://s3-us-east-1.amazonaws.com/image.png */
115
- url: string;
116
- };
124
+ "application/json": components["schemas"]["UploadImageResponse"];
117
125
  };
118
126
  };
119
127
  400: components["responses"]["BadRequest"];
@@ -130,10 +138,7 @@ export interface operations {
130
138
  /** @description The request body to delete an image */
131
139
  requestBody: {
132
140
  content: {
133
- "application/json": {
134
- /** @example https://s3-us-east-1.amazonaws.com/image.png */
135
- url: string;
136
- };
141
+ "application/json": components["schemas"]["DeleteImagePayload"];
137
142
  };
138
143
  };
139
144
  responses: {
package/ts/types/types.ts CHANGED
@@ -33,5 +33,7 @@ export type UpdateUserPayload = UserServiceSchemas['UpdateUserPayload'];
33
33
  export type UserServiceError = UserServiceSchemas['Error'];
34
34
 
35
35
  // Asset Service Types
36
- export type AssetServiceError = AssetServiceSchemas['Error'];
37
36
  export type ImageType = AssetServiceSchemas['ImageType'];
37
+ export type UploadImagePayload = AssetServiceSchemas['UploadImagePayload'];
38
+ export type DeleteImagePayload = AssetServiceSchemas['DeleteImagePayload'];
39
+ export type AssetServiceError = AssetServiceSchemas['Error'];