@lwshen/vault-hub-ts-fetch-client 0.20250717.143220 → 0.20250717.153004

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.
@@ -18,6 +18,7 @@ src/models/SignupRequest.ts
18
18
  src/models/SignupResponse.ts
19
19
  src/models/UpdateVaultRequest.ts
20
20
  src/models/Vault.ts
21
+ src/models/VaultLite.ts
21
22
  src/models/index.ts
22
23
  src/runtime.ts
23
24
  tsconfig.json
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @lwshen/vault-hub-ts-fetch-client@0.20250717.143220
1
+ ## @lwshen/vault-hub-ts-fetch-client@0.20250717.153004
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @lwshen/vault-hub-ts-fetch-client@0.20250717.143220 --save
39
+ npm install @lwshen/vault-hub-ts-fetch-client@0.20250717.153004 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateVaultRequest, UpdateVaultRequest, Vault } from '../models/index';
13
+ import type { CreateVaultRequest, UpdateVaultRequest, Vault, VaultLite } from '../models/index';
14
14
  export interface CreateVaultOperationRequest {
15
15
  createVaultRequest: CreateVaultRequest;
16
16
  }
@@ -20,9 +20,6 @@ export interface DeleteVaultRequest {
20
20
  export interface GetVaultRequest {
21
21
  uniqueId: string;
22
22
  }
23
- export interface GetVaultsRequest {
24
- category?: string;
25
- }
26
23
  export interface UpdateVaultOperationRequest {
27
24
  uniqueId: string;
28
25
  updateVaultRequest: UpdateVaultRequest;
@@ -58,11 +55,11 @@ export declare class VaultApi extends runtime.BaseAPI {
58
55
  /**
59
56
  * Get all vaults for the current user
60
57
  */
61
- getVaultsRaw(requestParameters: GetVaultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Vault>>>;
58
+ getVaultsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<VaultLite>>>;
62
59
  /**
63
60
  * Get all vaults for the current user
64
61
  */
65
- getVaults(category?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Vault>>;
62
+ getVaults(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<VaultLite>>;
66
63
  /**
67
64
  * Update a vault
68
65
  */
@@ -210,16 +210,13 @@ var VaultApi = /** @class */ (function (_super) {
210
210
  /**
211
211
  * Get all vaults for the current user
212
212
  */
213
- VaultApi.prototype.getVaultsRaw = function (requestParameters, initOverrides) {
213
+ VaultApi.prototype.getVaultsRaw = function (initOverrides) {
214
214
  return __awaiter(this, void 0, void 0, function () {
215
215
  var queryParameters, headerParameters, response;
216
216
  return __generator(this, function (_a) {
217
217
  switch (_a.label) {
218
218
  case 0:
219
219
  queryParameters = {};
220
- if (requestParameters['category'] != null) {
221
- queryParameters['category'] = requestParameters['category'];
222
- }
223
220
  headerParameters = {};
224
221
  return [4 /*yield*/, this.request({
225
222
  path: "/api/vaults",
@@ -229,7 +226,7 @@ var VaultApi = /** @class */ (function (_super) {
229
226
  }, initOverrides)];
230
227
  case 1:
231
228
  response = _a.sent();
232
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.VaultFromJSON); })];
229
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.VaultLiteFromJSON); })];
233
230
  }
234
231
  });
235
232
  });
@@ -237,12 +234,12 @@ var VaultApi = /** @class */ (function (_super) {
237
234
  /**
238
235
  * Get all vaults for the current user
239
236
  */
240
- VaultApi.prototype.getVaults = function (category, initOverrides) {
237
+ VaultApi.prototype.getVaults = function (initOverrides) {
241
238
  return __awaiter(this, void 0, void 0, function () {
242
239
  var response;
243
240
  return __generator(this, function (_a) {
244
241
  switch (_a.label) {
245
- case 0: return [4 /*yield*/, this.getVaultsRaw({ category: category }, initOverrides)];
242
+ case 0: return [4 /*yield*/, this.getVaultsRaw(initOverrides)];
246
243
  case 1:
247
244
  response = _a.sent();
248
245
  return [4 /*yield*/, response.value()];
@@ -21,6 +21,12 @@ export interface Vault {
21
21
  * @memberof Vault
22
22
  */
23
23
  uniqueId: string;
24
+ /**
25
+ * ID of the user who owns this vault
26
+ * @type {number}
27
+ * @memberof Vault
28
+ */
29
+ userId?: number;
24
30
  /**
25
31
  * Human-readable name
26
32
  * @type {string}
@@ -39,6 +39,7 @@ function VaultFromJSONTyped(json, ignoreDiscriminator) {
39
39
  }
40
40
  return {
41
41
  'uniqueId': json['unique_id'],
42
+ 'userId': json['user_id'] == null ? undefined : json['user_id'],
42
43
  'name': json['name'],
43
44
  'value': json['value'],
44
45
  'description': json['description'] == null ? undefined : json['description'],
@@ -57,6 +58,7 @@ function VaultToJSONTyped(value, ignoreDiscriminator) {
57
58
  }
58
59
  return {
59
60
  'unique_id': value['uniqueId'],
61
+ 'user_id': value['userId'],
60
62
  'name': value['name'],
61
63
  'value': value['value'],
62
64
  'description': value['description'],
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Vault Hub Server
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface VaultLite
16
+ */
17
+ export interface VaultLite {
18
+ /**
19
+ * Unique identifier for the vault
20
+ * @type {string}
21
+ * @memberof VaultLite
22
+ */
23
+ uniqueId: string;
24
+ /**
25
+ * Human-readable name
26
+ * @type {string}
27
+ * @memberof VaultLite
28
+ */
29
+ name: string;
30
+ /**
31
+ * Human-readable description
32
+ * @type {string}
33
+ * @memberof VaultLite
34
+ */
35
+ description?: string;
36
+ /**
37
+ * Category/type of vault
38
+ * @type {string}
39
+ * @memberof VaultLite
40
+ */
41
+ category?: string;
42
+ /**
43
+ *
44
+ * @type {Date}
45
+ * @memberof VaultLite
46
+ */
47
+ updatedAt?: Date;
48
+ }
49
+ /**
50
+ * Check if a given object implements the VaultLite interface.
51
+ */
52
+ export declare function instanceOfVaultLite(value: object): value is VaultLite;
53
+ export declare function VaultLiteFromJSON(json: any): VaultLite;
54
+ export declare function VaultLiteFromJSONTyped(json: any, ignoreDiscriminator: boolean): VaultLite;
55
+ export declare function VaultLiteToJSON(json: any): VaultLite;
56
+ export declare function VaultLiteToJSONTyped(value?: VaultLite | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Vault Hub Server
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfVaultLite = instanceOfVaultLite;
17
+ exports.VaultLiteFromJSON = VaultLiteFromJSON;
18
+ exports.VaultLiteFromJSONTyped = VaultLiteFromJSONTyped;
19
+ exports.VaultLiteToJSON = VaultLiteToJSON;
20
+ exports.VaultLiteToJSONTyped = VaultLiteToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the VaultLite interface.
23
+ */
24
+ function instanceOfVaultLite(value) {
25
+ if (!('uniqueId' in value) || value['uniqueId'] === undefined)
26
+ return false;
27
+ if (!('name' in value) || value['name'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function VaultLiteFromJSON(json) {
32
+ return VaultLiteFromJSONTyped(json, false);
33
+ }
34
+ function VaultLiteFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'uniqueId': json['unique_id'],
40
+ 'name': json['name'],
41
+ 'description': json['description'] == null ? undefined : json['description'],
42
+ 'category': json['category'] == null ? undefined : json['category'],
43
+ 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
44
+ };
45
+ }
46
+ function VaultLiteToJSON(json) {
47
+ return VaultLiteToJSONTyped(json, false);
48
+ }
49
+ function VaultLiteToJSONTyped(value, ignoreDiscriminator) {
50
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'unique_id': value['uniqueId'],
56
+ 'name': value['name'],
57
+ 'description': value['description'],
58
+ 'category': value['category'],
59
+ 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
60
+ };
61
+ }
@@ -7,3 +7,4 @@ export * from './SignupRequest';
7
7
  export * from './SignupResponse';
8
8
  export * from './UpdateVaultRequest';
9
9
  export * from './Vault';
10
+ export * from './VaultLite';
@@ -25,3 +25,4 @@ __exportStar(require("./SignupRequest"), exports);
25
25
  __exportStar(require("./SignupResponse"), exports);
26
26
  __exportStar(require("./UpdateVaultRequest"), exports);
27
27
  __exportStar(require("./Vault"), exports);
28
+ __exportStar(require("./VaultLite"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lwshen/vault-hub-ts-fetch-client",
3
- "version": "0.20250717.143220",
3
+ "version": "0.20250717.153004",
4
4
  "description": "OpenAPI client for @lwshen/vault-hub-ts-fetch-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -18,6 +18,7 @@ import type {
18
18
  CreateVaultRequest,
19
19
  UpdateVaultRequest,
20
20
  Vault,
21
+ VaultLite,
21
22
  } from '../models/index';
22
23
  import {
23
24
  CreateVaultRequestFromJSON,
@@ -26,6 +27,8 @@ import {
26
27
  UpdateVaultRequestToJSON,
27
28
  VaultFromJSON,
28
29
  VaultToJSON,
30
+ VaultLiteFromJSON,
31
+ VaultLiteToJSON,
29
32
  } from '../models/index';
30
33
 
31
34
  export interface CreateVaultOperationRequest {
@@ -40,10 +43,6 @@ export interface GetVaultRequest {
40
43
  uniqueId: string;
41
44
  }
42
45
 
43
- export interface GetVaultsRequest {
44
- category?: string;
45
- }
46
-
47
46
  export interface UpdateVaultOperationRequest {
48
47
  uniqueId: string;
49
48
  updateVaultRequest: UpdateVaultRequest;
@@ -158,13 +157,9 @@ export class VaultApi extends runtime.BaseAPI {
158
157
  /**
159
158
  * Get all vaults for the current user
160
159
  */
161
- async getVaultsRaw(requestParameters: GetVaultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Vault>>> {
160
+ async getVaultsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<VaultLite>>> {
162
161
  const queryParameters: any = {};
163
162
 
164
- if (requestParameters['category'] != null) {
165
- queryParameters['category'] = requestParameters['category'];
166
- }
167
-
168
163
  const headerParameters: runtime.HTTPHeaders = {};
169
164
 
170
165
  const response = await this.request({
@@ -174,14 +169,14 @@ export class VaultApi extends runtime.BaseAPI {
174
169
  query: queryParameters,
175
170
  }, initOverrides);
176
171
 
177
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(VaultFromJSON));
172
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(VaultLiteFromJSON));
178
173
  }
179
174
 
180
175
  /**
181
176
  * Get all vaults for the current user
182
177
  */
183
- async getVaults(category?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Vault>> {
184
- const response = await this.getVaultsRaw({ category: category }, initOverrides);
178
+ async getVaults(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<VaultLite>> {
179
+ const response = await this.getVaultsRaw(initOverrides);
185
180
  return await response.value();
186
181
  }
187
182
 
@@ -25,6 +25,12 @@ export interface Vault {
25
25
  * @memberof Vault
26
26
  */
27
27
  uniqueId: string;
28
+ /**
29
+ * ID of the user who owns this vault
30
+ * @type {number}
31
+ * @memberof Vault
32
+ */
33
+ userId?: number;
28
34
  /**
29
35
  * Human-readable name
30
36
  * @type {string}
@@ -84,6 +90,7 @@ export function VaultFromJSONTyped(json: any, ignoreDiscriminator: boolean): Vau
84
90
  return {
85
91
 
86
92
  'uniqueId': json['unique_id'],
93
+ 'userId': json['user_id'] == null ? undefined : json['user_id'],
87
94
  'name': json['name'],
88
95
  'value': json['value'],
89
96
  'description': json['description'] == null ? undefined : json['description'],
@@ -105,6 +112,7 @@ export function VaultToJSONTyped(value?: Vault | null, ignoreDiscriminator: bool
105
112
  return {
106
113
 
107
114
  'unique_id': value['uniqueId'],
115
+ 'user_id': value['userId'],
108
116
  'name': value['name'],
109
117
  'value': value['value'],
110
118
  'description': value['description'],
@@ -0,0 +1,99 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Vault Hub Server
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface VaultLite
20
+ */
21
+ export interface VaultLite {
22
+ /**
23
+ * Unique identifier for the vault
24
+ * @type {string}
25
+ * @memberof VaultLite
26
+ */
27
+ uniqueId: string;
28
+ /**
29
+ * Human-readable name
30
+ * @type {string}
31
+ * @memberof VaultLite
32
+ */
33
+ name: string;
34
+ /**
35
+ * Human-readable description
36
+ * @type {string}
37
+ * @memberof VaultLite
38
+ */
39
+ description?: string;
40
+ /**
41
+ * Category/type of vault
42
+ * @type {string}
43
+ * @memberof VaultLite
44
+ */
45
+ category?: string;
46
+ /**
47
+ *
48
+ * @type {Date}
49
+ * @memberof VaultLite
50
+ */
51
+ updatedAt?: Date;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the VaultLite interface.
56
+ */
57
+ export function instanceOfVaultLite(value: object): value is VaultLite {
58
+ if (!('uniqueId' in value) || value['uniqueId'] === undefined) return false;
59
+ if (!('name' in value) || value['name'] === undefined) return false;
60
+ return true;
61
+ }
62
+
63
+ export function VaultLiteFromJSON(json: any): VaultLite {
64
+ return VaultLiteFromJSONTyped(json, false);
65
+ }
66
+
67
+ export function VaultLiteFromJSONTyped(json: any, ignoreDiscriminator: boolean): VaultLite {
68
+ if (json == null) {
69
+ return json;
70
+ }
71
+ return {
72
+
73
+ 'uniqueId': json['unique_id'],
74
+ 'name': json['name'],
75
+ 'description': json['description'] == null ? undefined : json['description'],
76
+ 'category': json['category'] == null ? undefined : json['category'],
77
+ 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
78
+ };
79
+ }
80
+
81
+ export function VaultLiteToJSON(json: any): VaultLite {
82
+ return VaultLiteToJSONTyped(json, false);
83
+ }
84
+
85
+ export function VaultLiteToJSONTyped(value?: VaultLite | null, ignoreDiscriminator: boolean = false): any {
86
+ if (value == null) {
87
+ return value;
88
+ }
89
+
90
+ return {
91
+
92
+ 'unique_id': value['uniqueId'],
93
+ 'name': value['name'],
94
+ 'description': value['description'],
95
+ 'category': value['category'],
96
+ 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
97
+ };
98
+ }
99
+
@@ -9,3 +9,4 @@ export * from './SignupRequest';
9
9
  export * from './SignupResponse';
10
10
  export * from './UpdateVaultRequest';
11
11
  export * from './Vault';
12
+ export * from './VaultLite';