@randock/nameshift-api-client 0.0.366 → 0.0.367

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.
@@ -243,6 +243,7 @@ src/models/LeaseToOwnConfigurationDto.ts
243
243
  src/models/LeaseToOwnConfigurationInput.ts
244
244
  src/models/LeaseToOwnConfigurationPresetsDto.ts
245
245
  src/models/LeaseToOwnDto.ts
246
+ src/models/LedgerMutationAttachmentDto.ts
246
247
  src/models/LedgerMutationDto.ts
247
248
  src/models/LedgerMutationsDto.ts
248
249
  src/models/List200Response.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.366
1
+ ## @randock/nameshift-api-client@0.0.367
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 @randock/nameshift-api-client@0.0.366 --save
39
+ npm install @randock/nameshift-api-client@0.0.367 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
44
44
  ```
45
45
  npm install PATH_TO_GENERATED_PACKAGE --save
46
46
  ```
47
- cb2f5f5f448dc6b306e243f3d4db3ce360d0a0fe0cb71171f164301d3ff5a154dde74728357cfc28dbe177e2e9e8c184
47
+ 168200f0dc67814e3f8c5cbe333f0cdc9c9bcc4ef5cd0c7411e5d473da20c9d915af0d0b91f0fb76be3c0c488134e5a0
@@ -79,6 +79,9 @@ export interface AdminApiGetAllSubscriptionsRequest {
79
79
  export interface AdminApiGetCompanyStatsRequest {
80
80
  dateRange?: any | null;
81
81
  }
82
+ export interface AdminApiGetLedgerMutationAttachmentRequest {
83
+ attachmentId: string;
84
+ }
82
85
  export interface AdminApiGetSubscriptionDetailsRequest {
83
86
  subscriptionId: string;
84
87
  }
@@ -279,6 +282,14 @@ export declare class AdminApi extends runtime.BaseAPI {
279
282
  *
280
283
  */
281
284
  getCompanyStats(requestParameters?: AdminApiGetCompanyStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCompanyStatsDto>;
285
+ /**
286
+ *
287
+ */
288
+ getLedgerMutationAttachmentRaw(requestParameters: AdminApiGetLedgerMutationAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
289
+ /**
290
+ *
291
+ */
292
+ getLedgerMutationAttachment(requestParameters: AdminApiGetLedgerMutationAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
282
293
  /**
283
294
  *
284
295
  */
@@ -991,6 +991,57 @@ var AdminApi = /** @class */ (function (_super) {
991
991
  });
992
992
  });
993
993
  };
994
+ /**
995
+ *
996
+ */
997
+ AdminApi.prototype.getLedgerMutationAttachmentRaw = function (requestParameters, initOverrides) {
998
+ return __awaiter(this, void 0, void 0, function () {
999
+ var queryParameters, headerParameters, token, tokenString, response;
1000
+ return __generator(this, function (_a) {
1001
+ switch (_a.label) {
1002
+ case 0:
1003
+ if (requestParameters['attachmentId'] == null) {
1004
+ throw new runtime.RequiredError('attachmentId', 'Required parameter "attachmentId" was null or undefined when calling getLedgerMutationAttachment().');
1005
+ }
1006
+ queryParameters = {};
1007
+ headerParameters = {};
1008
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1009
+ token = this.configuration.accessToken;
1010
+ return [4 /*yield*/, token("bearer", [])];
1011
+ case 1:
1012
+ tokenString = _a.sent();
1013
+ if (tokenString) {
1014
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
1015
+ }
1016
+ _a.label = 2;
1017
+ case 2: return [4 /*yield*/, this.request({
1018
+ path: "/admin/stats/attachments/{attachmentId}".replace("{".concat("attachmentId", "}"), encodeURIComponent(String(requestParameters['attachmentId']))),
1019
+ method: 'GET',
1020
+ headers: headerParameters,
1021
+ query: queryParameters,
1022
+ }, initOverrides)];
1023
+ case 3:
1024
+ response = _a.sent();
1025
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
1026
+ }
1027
+ });
1028
+ });
1029
+ };
1030
+ /**
1031
+ *
1032
+ */
1033
+ AdminApi.prototype.getLedgerMutationAttachment = function (requestParameters, initOverrides) {
1034
+ return __awaiter(this, void 0, void 0, function () {
1035
+ return __generator(this, function (_a) {
1036
+ switch (_a.label) {
1037
+ case 0: return [4 /*yield*/, this.getLedgerMutationAttachmentRaw(requestParameters, initOverrides)];
1038
+ case 1:
1039
+ _a.sent();
1040
+ return [2 /*return*/];
1041
+ }
1042
+ });
1043
+ });
1044
+ };
994
1045
  /**
995
1046
  *
996
1047
  */
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift API
4
+ *
5
+ * The version of the OpenAPI document: 1.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 LedgerMutationAttachmentDto
16
+ */
17
+ export interface LedgerMutationAttachmentDto {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof LedgerMutationAttachmentDto
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof LedgerMutationAttachmentDto
28
+ */
29
+ filename: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the LedgerMutationAttachmentDto interface.
33
+ */
34
+ export declare function instanceOfLedgerMutationAttachmentDto(value: object): value is LedgerMutationAttachmentDto;
35
+ export declare function LedgerMutationAttachmentDtoFromJSON(json: any): LedgerMutationAttachmentDto;
36
+ export declare function LedgerMutationAttachmentDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LedgerMutationAttachmentDto;
37
+ export declare function LedgerMutationAttachmentDtoToJSON(json: any): LedgerMutationAttachmentDto;
38
+ export declare function LedgerMutationAttachmentDtoToJSONTyped(value?: LedgerMutationAttachmentDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * Nameshift API
7
+ *
8
+ * The version of the OpenAPI document: 1.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.instanceOfLedgerMutationAttachmentDto = instanceOfLedgerMutationAttachmentDto;
17
+ exports.LedgerMutationAttachmentDtoFromJSON = LedgerMutationAttachmentDtoFromJSON;
18
+ exports.LedgerMutationAttachmentDtoFromJSONTyped = LedgerMutationAttachmentDtoFromJSONTyped;
19
+ exports.LedgerMutationAttachmentDtoToJSON = LedgerMutationAttachmentDtoToJSON;
20
+ exports.LedgerMutationAttachmentDtoToJSONTyped = LedgerMutationAttachmentDtoToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the LedgerMutationAttachmentDto interface.
23
+ */
24
+ function instanceOfLedgerMutationAttachmentDto(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('filename' in value) || value['filename'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function LedgerMutationAttachmentDtoFromJSON(json) {
32
+ return LedgerMutationAttachmentDtoFromJSONTyped(json, false);
33
+ }
34
+ function LedgerMutationAttachmentDtoFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'id': json['id'],
40
+ 'filename': json['filename'],
41
+ };
42
+ }
43
+ function LedgerMutationAttachmentDtoToJSON(json) {
44
+ return LedgerMutationAttachmentDtoToJSONTyped(json, false);
45
+ }
46
+ function LedgerMutationAttachmentDtoToJSONTyped(value, ignoreDiscriminator) {
47
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'id': value['id'],
53
+ 'filename': value['filename'],
54
+ };
55
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { LedgerMutationAttachmentDto } from './LedgerMutationAttachmentDto';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -51,6 +52,12 @@ export interface LedgerMutationDto {
51
52
  * @memberof LedgerMutationDto
52
53
  */
53
54
  date: Date;
55
+ /**
56
+ *
57
+ * @type {Array<LedgerMutationAttachmentDto>}
58
+ * @memberof LedgerMutationDto
59
+ */
60
+ attachments: Array<LedgerMutationAttachmentDto>;
54
61
  }
55
62
  /**
56
63
  * Check if a given object implements the LedgerMutationDto interface.
@@ -18,6 +18,7 @@ exports.LedgerMutationDtoFromJSON = LedgerMutationDtoFromJSON;
18
18
  exports.LedgerMutationDtoFromJSONTyped = LedgerMutationDtoFromJSONTyped;
19
19
  exports.LedgerMutationDtoToJSON = LedgerMutationDtoToJSON;
20
20
  exports.LedgerMutationDtoToJSONTyped = LedgerMutationDtoToJSONTyped;
21
+ var LedgerMutationAttachmentDto_1 = require("./LedgerMutationAttachmentDto");
21
22
  /**
22
23
  * Check if a given object implements the LedgerMutationDto interface.
23
24
  */
@@ -34,6 +35,8 @@ function instanceOfLedgerMutationDto(value) {
34
35
  return false;
35
36
  if (!('date' in value) || value['date'] === undefined)
36
37
  return false;
38
+ if (!('attachments' in value) || value['attachments'] === undefined)
39
+ return false;
37
40
  return true;
38
41
  }
39
42
  function LedgerMutationDtoFromJSON(json) {
@@ -50,6 +53,7 @@ function LedgerMutationDtoFromJSONTyped(json, ignoreDiscriminator) {
50
53
  'credit': json['credit'],
51
54
  'description': json['description'],
52
55
  'date': (new Date(json['date'])),
56
+ 'attachments': (json['attachments'].map(LedgerMutationAttachmentDto_1.LedgerMutationAttachmentDtoFromJSON)),
53
57
  };
54
58
  }
55
59
  function LedgerMutationDtoToJSON(json) {
@@ -67,5 +71,6 @@ function LedgerMutationDtoToJSONTyped(value, ignoreDiscriminator) {
67
71
  'credit': value['credit'],
68
72
  'description': value['description'],
69
73
  'date': ((value['date']).toISOString()),
74
+ 'attachments': (value['attachments'].map(LedgerMutationAttachmentDto_1.LedgerMutationAttachmentDtoToJSON)),
70
75
  };
71
76
  }
@@ -208,6 +208,7 @@ export * from './LeaseToOwnConfigurationDto';
208
208
  export * from './LeaseToOwnConfigurationInput';
209
209
  export * from './LeaseToOwnConfigurationPresetsDto';
210
210
  export * from './LeaseToOwnDto';
211
+ export * from './LedgerMutationAttachmentDto';
211
212
  export * from './LedgerMutationDto';
212
213
  export * from './LedgerMutationsDto';
213
214
  export * from './List200Response';
@@ -226,6 +226,7 @@ __exportStar(require("./LeaseToOwnConfigurationDto"), exports);
226
226
  __exportStar(require("./LeaseToOwnConfigurationInput"), exports);
227
227
  __exportStar(require("./LeaseToOwnConfigurationPresetsDto"), exports);
228
228
  __exportStar(require("./LeaseToOwnDto"), exports);
229
+ __exportStar(require("./LedgerMutationAttachmentDto"), exports);
229
230
  __exportStar(require("./LedgerMutationDto"), exports);
230
231
  __exportStar(require("./LedgerMutationsDto"), exports);
231
232
  __exportStar(require("./List200Response"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.366",
3
+ "version": "0.0.367",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -187,6 +187,10 @@ export interface AdminApiGetCompanyStatsRequest {
187
187
  dateRange?: any | null;
188
188
  }
189
189
 
190
+ export interface AdminApiGetLedgerMutationAttachmentRequest {
191
+ attachmentId: string;
192
+ }
193
+
190
194
  export interface AdminApiGetSubscriptionDetailsRequest {
191
195
  subscriptionId: string;
192
196
  }
@@ -999,6 +1003,46 @@ export class AdminApi extends runtime.BaseAPI {
999
1003
  return await response.value();
1000
1004
  }
1001
1005
 
1006
+ /**
1007
+ *
1008
+ */
1009
+ async getLedgerMutationAttachmentRaw(requestParameters: AdminApiGetLedgerMutationAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1010
+ if (requestParameters['attachmentId'] == null) {
1011
+ throw new runtime.RequiredError(
1012
+ 'attachmentId',
1013
+ 'Required parameter "attachmentId" was null or undefined when calling getLedgerMutationAttachment().'
1014
+ );
1015
+ }
1016
+
1017
+ const queryParameters: any = {};
1018
+
1019
+ const headerParameters: runtime.HTTPHeaders = {};
1020
+
1021
+ if (this.configuration && this.configuration.accessToken) {
1022
+ const token = this.configuration.accessToken;
1023
+ const tokenString = await token("bearer", []);
1024
+
1025
+ if (tokenString) {
1026
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1027
+ }
1028
+ }
1029
+ const response = await this.request({
1030
+ path: `/admin/stats/attachments/{attachmentId}`.replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId']))),
1031
+ method: 'GET',
1032
+ headers: headerParameters,
1033
+ query: queryParameters,
1034
+ }, initOverrides);
1035
+
1036
+ return new runtime.VoidApiResponse(response);
1037
+ }
1038
+
1039
+ /**
1040
+ *
1041
+ */
1042
+ async getLedgerMutationAttachment(requestParameters: AdminApiGetLedgerMutationAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1043
+ await this.getLedgerMutationAttachmentRaw(requestParameters, initOverrides);
1044
+ }
1045
+
1002
1046
  /**
1003
1047
  *
1004
1048
  */
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.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 LedgerMutationAttachmentDto
20
+ */
21
+ export interface LedgerMutationAttachmentDto {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof LedgerMutationAttachmentDto
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof LedgerMutationAttachmentDto
32
+ */
33
+ filename: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the LedgerMutationAttachmentDto interface.
38
+ */
39
+ export function instanceOfLedgerMutationAttachmentDto(value: object): value is LedgerMutationAttachmentDto {
40
+ if (!('id' in value) || value['id'] === undefined) return false;
41
+ if (!('filename' in value) || value['filename'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function LedgerMutationAttachmentDtoFromJSON(json: any): LedgerMutationAttachmentDto {
46
+ return LedgerMutationAttachmentDtoFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function LedgerMutationAttachmentDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): LedgerMutationAttachmentDto {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'id': json['id'],
56
+ 'filename': json['filename'],
57
+ };
58
+ }
59
+
60
+ export function LedgerMutationAttachmentDtoToJSON(json: any): LedgerMutationAttachmentDto {
61
+ return LedgerMutationAttachmentDtoToJSONTyped(json, false);
62
+ }
63
+
64
+ export function LedgerMutationAttachmentDtoToJSONTyped(value?: LedgerMutationAttachmentDto | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'id': value['id'],
72
+ 'filename': value['filename'],
73
+ };
74
+ }
75
+
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { LedgerMutationAttachmentDto } from './LedgerMutationAttachmentDto';
17
+ import {
18
+ LedgerMutationAttachmentDtoFromJSON,
19
+ LedgerMutationAttachmentDtoFromJSONTyped,
20
+ LedgerMutationAttachmentDtoToJSON,
21
+ LedgerMutationAttachmentDtoToJSONTyped,
22
+ } from './LedgerMutationAttachmentDto';
23
+
16
24
  /**
17
25
  *
18
26
  * @export
@@ -55,6 +63,12 @@ export interface LedgerMutationDto {
55
63
  * @memberof LedgerMutationDto
56
64
  */
57
65
  date: Date;
66
+ /**
67
+ *
68
+ * @type {Array<LedgerMutationAttachmentDto>}
69
+ * @memberof LedgerMutationDto
70
+ */
71
+ attachments: Array<LedgerMutationAttachmentDto>;
58
72
  }
59
73
 
60
74
  /**
@@ -67,6 +81,7 @@ export function instanceOfLedgerMutationDto(value: object): value is LedgerMutat
67
81
  if (!('credit' in value) || value['credit'] === undefined) return false;
68
82
  if (!('description' in value) || value['description'] === undefined) return false;
69
83
  if (!('date' in value) || value['date'] === undefined) return false;
84
+ if (!('attachments' in value) || value['attachments'] === undefined) return false;
70
85
  return true;
71
86
  }
72
87
 
@@ -86,6 +101,7 @@ export function LedgerMutationDtoFromJSONTyped(json: any, ignoreDiscriminator: b
86
101
  'credit': json['credit'],
87
102
  'description': json['description'],
88
103
  'date': (new Date(json['date'])),
104
+ 'attachments': ((json['attachments'] as Array<any>).map(LedgerMutationAttachmentDtoFromJSON)),
89
105
  };
90
106
  }
91
107
 
@@ -106,6 +122,7 @@ export function LedgerMutationDtoToJSONTyped(value?: LedgerMutationDto | null, i
106
122
  'credit': value['credit'],
107
123
  'description': value['description'],
108
124
  'date': ((value['date']).toISOString()),
125
+ 'attachments': ((value['attachments'] as Array<any>).map(LedgerMutationAttachmentDtoToJSON)),
109
126
  };
110
127
  }
111
128
 
@@ -210,6 +210,7 @@ export * from './LeaseToOwnConfigurationDto';
210
210
  export * from './LeaseToOwnConfigurationInput';
211
211
  export * from './LeaseToOwnConfigurationPresetsDto';
212
212
  export * from './LeaseToOwnDto';
213
+ export * from './LedgerMutationAttachmentDto';
213
214
  export * from './LedgerMutationDto';
214
215
  export * from './LedgerMutationsDto';
215
216
  export * from './List200Response';