@randock/nameshift-api-client 0.0.227 → 0.0.228

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.
@@ -174,6 +174,7 @@ src/models/PaginateResponse.ts
174
174
  src/models/PaginateResponseLinks.ts
175
175
  src/models/PaginateResponseMeta.ts
176
176
  src/models/ParsedDomainDto.ts
177
+ src/models/PublicAccountInformationDto.ts
177
178
  src/models/PublicDomainDto.ts
178
179
  src/models/PublicDomainDtoSeo.ts
179
180
  src/models/PublicDomainDtoSeoMoz.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.227
1
+ ## @randock/nameshift-api-client@0.0.228
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.227 --save
39
+ npm install @randock/nameshift-api-client@0.0.228 --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
- dbf86a8d4c12bdd5028424eb183d91c460c23f445c703efadb4176f2c2f3a1780f5455311ffc96fcebca586cfda4863c
47
+ 01dcf8e8243bb3614aac31618f47d631ff77c38e3d1237895528b0607e11b957a6e24ded3ef4e257a87a444454278a6d
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { RegisterAccountInput } from '../models/index';
13
+ import type { PublicAccountInformationDto, RegisterAccountInput } from '../models/index';
14
+ export interface AccountsPublicApiGetAccountInformationRequest {
15
+ accountId: string;
16
+ }
14
17
  export interface AccountsPublicApiRegisterRequest {
15
18
  registerAccountInput: RegisterAccountInput;
16
19
  }
@@ -18,6 +21,14 @@ export interface AccountsPublicApiRegisterRequest {
18
21
  *
19
22
  */
20
23
  export declare class AccountsPublicApi extends runtime.BaseAPI {
24
+ /**
25
+ *
26
+ */
27
+ getAccountInformationRaw(requestParameters: AccountsPublicApiGetAccountInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicAccountInformationDto>>;
28
+ /**
29
+ *
30
+ */
31
+ getAccountInformation(requestParameters: AccountsPublicApiGetAccountInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicAccountInformationDto>;
21
32
  /**
22
33
  *
23
34
  */
@@ -75,6 +75,50 @@ var AccountsPublicApi = /** @class */ (function (_super) {
75
75
  function AccountsPublicApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ *
80
+ */
81
+ AccountsPublicApi.prototype.getAccountInformationRaw = function (requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, response;
84
+ return __generator(this, function (_a) {
85
+ switch (_a.label) {
86
+ case 0:
87
+ if (requestParameters['accountId'] == null) {
88
+ throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAccountInformation().');
89
+ }
90
+ queryParameters = {};
91
+ headerParameters = {};
92
+ return [4 /*yield*/, this.request({
93
+ path: "/accounts/{accountId}".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
94
+ method: 'GET',
95
+ headers: headerParameters,
96
+ query: queryParameters,
97
+ }, initOverrides)];
98
+ case 1:
99
+ response = _a.sent();
100
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PublicAccountInformationDtoFromJSON)(jsonValue); })];
101
+ }
102
+ });
103
+ });
104
+ };
105
+ /**
106
+ *
107
+ */
108
+ AccountsPublicApi.prototype.getAccountInformation = function (requestParameters, initOverrides) {
109
+ return __awaiter(this, void 0, void 0, function () {
110
+ var response;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0: return [4 /*yield*/, this.getAccountInformationRaw(requestParameters, initOverrides)];
114
+ case 1:
115
+ response = _a.sent();
116
+ return [4 /*yield*/, response.value()];
117
+ case 2: return [2 /*return*/, _a.sent()];
118
+ }
119
+ });
120
+ });
121
+ };
78
122
  /**
79
123
  *
80
124
  */
@@ -0,0 +1,62 @@
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 PublicAccountInformationDto
16
+ */
17
+ export interface PublicAccountInformationDto {
18
+ /**
19
+ * The account ID
20
+ * @type {object}
21
+ * @memberof PublicAccountInformationDto
22
+ */
23
+ id: object;
24
+ /**
25
+ * The account identifier
26
+ * @type {object}
27
+ * @memberof PublicAccountInformationDto
28
+ */
29
+ identifier: object;
30
+ /**
31
+ * The account name
32
+ * @type {string}
33
+ * @memberof PublicAccountInformationDto
34
+ */
35
+ name: string | null;
36
+ /**
37
+ * The account description
38
+ * @type {string}
39
+ * @memberof PublicAccountInformationDto
40
+ */
41
+ description: string | null;
42
+ /**
43
+ * The account avatar URL
44
+ * @type {string}
45
+ * @memberof PublicAccountInformationDto
46
+ */
47
+ avatar: string | null;
48
+ /**
49
+ * The last time the account was online
50
+ * @type {Date}
51
+ * @memberof PublicAccountInformationDto
52
+ */
53
+ lastOnline: Date | null;
54
+ }
55
+ /**
56
+ * Check if a given object implements the PublicAccountInformationDto interface.
57
+ */
58
+ export declare function instanceOfPublicAccountInformationDto(value: object): value is PublicAccountInformationDto;
59
+ export declare function PublicAccountInformationDtoFromJSON(json: any): PublicAccountInformationDto;
60
+ export declare function PublicAccountInformationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicAccountInformationDto;
61
+ export declare function PublicAccountInformationDtoToJSON(json: any): PublicAccountInformationDto;
62
+ export declare function PublicAccountInformationDtoToJSONTyped(value?: PublicAccountInformationDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,71 @@
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.instanceOfPublicAccountInformationDto = instanceOfPublicAccountInformationDto;
17
+ exports.PublicAccountInformationDtoFromJSON = PublicAccountInformationDtoFromJSON;
18
+ exports.PublicAccountInformationDtoFromJSONTyped = PublicAccountInformationDtoFromJSONTyped;
19
+ exports.PublicAccountInformationDtoToJSON = PublicAccountInformationDtoToJSON;
20
+ exports.PublicAccountInformationDtoToJSONTyped = PublicAccountInformationDtoToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the PublicAccountInformationDto interface.
23
+ */
24
+ function instanceOfPublicAccountInformationDto(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('identifier' in value) || value['identifier'] === undefined)
28
+ return false;
29
+ if (!('name' in value) || value['name'] === undefined)
30
+ return false;
31
+ if (!('description' in value) || value['description'] === undefined)
32
+ return false;
33
+ if (!('avatar' in value) || value['avatar'] === undefined)
34
+ return false;
35
+ if (!('lastOnline' in value) || value['lastOnline'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function PublicAccountInformationDtoFromJSON(json) {
40
+ return PublicAccountInformationDtoFromJSONTyped(json, false);
41
+ }
42
+ function PublicAccountInformationDtoFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'id': json['id'],
48
+ 'identifier': json['identifier'],
49
+ 'name': json['name'],
50
+ 'description': json['description'],
51
+ 'avatar': json['avatar'],
52
+ 'lastOnline': (json['lastOnline'] == null ? null : new Date(json['lastOnline'])),
53
+ };
54
+ }
55
+ function PublicAccountInformationDtoToJSON(json) {
56
+ return PublicAccountInformationDtoToJSONTyped(json, false);
57
+ }
58
+ function PublicAccountInformationDtoToJSONTyped(value, ignoreDiscriminator) {
59
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'id': value['id'],
65
+ 'identifier': value['identifier'],
66
+ 'name': value['name'],
67
+ 'description': value['description'],
68
+ 'avatar': value['avatar'],
69
+ 'lastOnline': (value['lastOnline'] == null ? null : value['lastOnline'].toISOString()),
70
+ };
71
+ }
@@ -147,6 +147,7 @@ export * from './PaginateResponse';
147
147
  export * from './PaginateResponseLinks';
148
148
  export * from './PaginateResponseMeta';
149
149
  export * from './ParsedDomainDto';
150
+ export * from './PublicAccountInformationDto';
150
151
  export * from './PublicDomainDto';
151
152
  export * from './PublicDomainDtoSeo';
152
153
  export * from './PublicDomainDtoSeoMoz';
@@ -165,6 +165,7 @@ __exportStar(require("./PaginateResponse"), exports);
165
165
  __exportStar(require("./PaginateResponseLinks"), exports);
166
166
  __exportStar(require("./PaginateResponseMeta"), exports);
167
167
  __exportStar(require("./ParsedDomainDto"), exports);
168
+ __exportStar(require("./PublicAccountInformationDto"), exports);
168
169
  __exportStar(require("./PublicDomainDto"), exports);
169
170
  __exportStar(require("./PublicDomainDtoSeo"), exports);
170
171
  __exportStar(require("./PublicDomainDtoSeoMoz"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.227",
3
+ "version": "0.0.228",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -16,6 +16,8 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ConflictException,
19
+ NotFoundException,
20
+ PublicAccountInformationDto,
19
21
  RegisterAccountInput,
20
22
  ThrottlerException,
21
23
  ValidationException,
@@ -23,6 +25,10 @@ import type {
23
25
  import {
24
26
  ConflictExceptionFromJSON,
25
27
  ConflictExceptionToJSON,
28
+ NotFoundExceptionFromJSON,
29
+ NotFoundExceptionToJSON,
30
+ PublicAccountInformationDtoFromJSON,
31
+ PublicAccountInformationDtoToJSON,
26
32
  RegisterAccountInputFromJSON,
27
33
  RegisterAccountInputToJSON,
28
34
  ThrottlerExceptionFromJSON,
@@ -31,6 +37,10 @@ import {
31
37
  ValidationExceptionToJSON,
32
38
  } from '../models/index';
33
39
 
40
+ export interface AccountsPublicApiGetAccountInformationRequest {
41
+ accountId: string;
42
+ }
43
+
34
44
  export interface AccountsPublicApiRegisterRequest {
35
45
  registerAccountInput: RegisterAccountInput;
36
46
  }
@@ -40,6 +50,39 @@ export interface AccountsPublicApiRegisterRequest {
40
50
  */
41
51
  export class AccountsPublicApi extends runtime.BaseAPI {
42
52
 
53
+ /**
54
+ *
55
+ */
56
+ async getAccountInformationRaw(requestParameters: AccountsPublicApiGetAccountInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicAccountInformationDto>> {
57
+ if (requestParameters['accountId'] == null) {
58
+ throw new runtime.RequiredError(
59
+ 'accountId',
60
+ 'Required parameter "accountId" was null or undefined when calling getAccountInformation().'
61
+ );
62
+ }
63
+
64
+ const queryParameters: any = {};
65
+
66
+ const headerParameters: runtime.HTTPHeaders = {};
67
+
68
+ const response = await this.request({
69
+ path: `/accounts/{accountId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
70
+ method: 'GET',
71
+ headers: headerParameters,
72
+ query: queryParameters,
73
+ }, initOverrides);
74
+
75
+ return new runtime.JSONApiResponse(response, (jsonValue) => PublicAccountInformationDtoFromJSON(jsonValue));
76
+ }
77
+
78
+ /**
79
+ *
80
+ */
81
+ async getAccountInformation(requestParameters: AccountsPublicApiGetAccountInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicAccountInformationDto> {
82
+ const response = await this.getAccountInformationRaw(requestParameters, initOverrides);
83
+ return await response.value();
84
+ }
85
+
43
86
  /**
44
87
  *
45
88
  */
@@ -0,0 +1,111 @@
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 PublicAccountInformationDto
20
+ */
21
+ export interface PublicAccountInformationDto {
22
+ /**
23
+ * The account ID
24
+ * @type {object}
25
+ * @memberof PublicAccountInformationDto
26
+ */
27
+ id: object;
28
+ /**
29
+ * The account identifier
30
+ * @type {object}
31
+ * @memberof PublicAccountInformationDto
32
+ */
33
+ identifier: object;
34
+ /**
35
+ * The account name
36
+ * @type {string}
37
+ * @memberof PublicAccountInformationDto
38
+ */
39
+ name: string | null;
40
+ /**
41
+ * The account description
42
+ * @type {string}
43
+ * @memberof PublicAccountInformationDto
44
+ */
45
+ description: string | null;
46
+ /**
47
+ * The account avatar URL
48
+ * @type {string}
49
+ * @memberof PublicAccountInformationDto
50
+ */
51
+ avatar: string | null;
52
+ /**
53
+ * The last time the account was online
54
+ * @type {Date}
55
+ * @memberof PublicAccountInformationDto
56
+ */
57
+ lastOnline: Date | null;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the PublicAccountInformationDto interface.
62
+ */
63
+ export function instanceOfPublicAccountInformationDto(value: object): value is PublicAccountInformationDto {
64
+ if (!('id' in value) || value['id'] === undefined) return false;
65
+ if (!('identifier' in value) || value['identifier'] === undefined) return false;
66
+ if (!('name' in value) || value['name'] === undefined) return false;
67
+ if (!('description' in value) || value['description'] === undefined) return false;
68
+ if (!('avatar' in value) || value['avatar'] === undefined) return false;
69
+ if (!('lastOnline' in value) || value['lastOnline'] === undefined) return false;
70
+ return true;
71
+ }
72
+
73
+ export function PublicAccountInformationDtoFromJSON(json: any): PublicAccountInformationDto {
74
+ return PublicAccountInformationDtoFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function PublicAccountInformationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicAccountInformationDto {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'id': json['id'],
84
+ 'identifier': json['identifier'],
85
+ 'name': json['name'],
86
+ 'description': json['description'],
87
+ 'avatar': json['avatar'],
88
+ 'lastOnline': (json['lastOnline'] == null ? null : new Date(json['lastOnline'])),
89
+ };
90
+ }
91
+
92
+ export function PublicAccountInformationDtoToJSON(json: any): PublicAccountInformationDto {
93
+ return PublicAccountInformationDtoToJSONTyped(json, false);
94
+ }
95
+
96
+ export function PublicAccountInformationDtoToJSONTyped(value?: PublicAccountInformationDto | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'id': value['id'],
104
+ 'identifier': value['identifier'],
105
+ 'name': value['name'],
106
+ 'description': value['description'],
107
+ 'avatar': value['avatar'],
108
+ 'lastOnline': (value['lastOnline'] == null ? null : (value['lastOnline'] as any).toISOString()),
109
+ };
110
+ }
111
+
@@ -149,6 +149,7 @@ export * from './PaginateResponse';
149
149
  export * from './PaginateResponseLinks';
150
150
  export * from './PaginateResponseMeta';
151
151
  export * from './ParsedDomainDto';
152
+ export * from './PublicAccountInformationDto';
152
153
  export * from './PublicDomainDto';
153
154
  export * from './PublicDomainDtoSeo';
154
155
  export * from './PublicDomainDtoSeoMoz';