@randock/nameshift-api-client 0.0.474 → 0.0.476

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.
Files changed (52) hide show
  1. package/.openapi-generator/FILES +7 -0
  2. package/README.md +3 -3
  3. package/dist/apis/AdminApi.d.ts +71 -1
  4. package/dist/apis/AdminApi.js +288 -0
  5. package/dist/apis/BuyersApi.d.ts +15 -1
  6. package/dist/apis/BuyersApi.js +58 -0
  7. package/dist/apis/CustomerSuccessApi.d.ts +57 -1
  8. package/dist/apis/CustomerSuccessApi.js +230 -0
  9. package/dist/models/AccountNoteAuthorDto.d.ts +50 -0
  10. package/dist/models/AccountNoteAuthorDto.js +63 -0
  11. package/dist/models/AccountNoteDto.d.ts +63 -0
  12. package/dist/models/AccountNoteDto.js +72 -0
  13. package/dist/models/AccountNoteListDto.d.ts +33 -0
  14. package/dist/models/AccountNoteListDto.js +52 -0
  15. package/dist/models/AdminListAccountDto.d.ts +12 -0
  16. package/dist/models/AdminListAccountDto.js +8 -0
  17. package/dist/models/BuyerSubscriptionListItemDto.d.ts +7 -0
  18. package/dist/models/BuyerSubscriptionListItemDto.js +5 -0
  19. package/dist/models/CompanyInformationDto.d.ts +2 -2
  20. package/dist/models/CreateAccountNoteInput.d.ts +32 -0
  21. package/dist/models/CreateAccountNoteInput.js +51 -0
  22. package/dist/models/CustomerSuccessListAccountDto.d.ts +12 -0
  23. package/dist/models/CustomerSuccessListAccountDto.js +8 -0
  24. package/dist/models/ForbiddenException.d.ts +44 -0
  25. package/dist/models/ForbiddenException.js +59 -0
  26. package/dist/models/SubscriptionDetailsDto.d.ts +7 -0
  27. package/dist/models/SubscriptionDetailsDto.js +5 -0
  28. package/dist/models/UpdateAccountNoteInput.d.ts +32 -0
  29. package/dist/models/UpdateAccountNoteInput.js +51 -0
  30. package/dist/models/UpdateSubscriptionBuyerInformationInput.d.ts +33 -0
  31. package/dist/models/UpdateSubscriptionBuyerInformationInput.js +52 -0
  32. package/dist/models/index.d.ts +7 -0
  33. package/dist/models/index.js +7 -0
  34. package/package.json +1 -1
  35. package/src/apis/AccountsApi.ts +3 -0
  36. package/src/apis/AdminApi.ts +295 -0
  37. package/src/apis/BuyersApi.ts +63 -0
  38. package/src/apis/CustomerSuccessApi.ts +238 -0
  39. package/src/apis/DomainsApi.ts +3 -0
  40. package/src/models/AccountNoteAuthorDto.ts +93 -0
  41. package/src/models/AccountNoteDto.ts +119 -0
  42. package/src/models/AccountNoteListDto.ts +74 -0
  43. package/src/models/AdminListAccountDto.ts +18 -0
  44. package/src/models/BuyerSubscriptionListItemDto.ts +16 -0
  45. package/src/models/CompanyInformationDto.ts +2 -2
  46. package/src/models/CreateAccountNoteInput.ts +66 -0
  47. package/src/models/CustomerSuccessListAccountDto.ts +18 -0
  48. package/src/models/ForbiddenException.ts +84 -0
  49. package/src/models/SubscriptionDetailsDto.ts +16 -0
  50. package/src/models/UpdateAccountNoteInput.ts +66 -0
  51. package/src/models/UpdateSubscriptionBuyerInformationInput.ts +74 -0
  52. package/src/models/index.ts +7 -0
@@ -15,19 +15,44 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ AccountNoteListDto,
19
+ CreateAccountNoteInput,
20
+ ForbiddenException,
18
21
  ListCustomerSuccessAccountDomains200Response,
19
22
  ListCustomerSuccessAccounts200Response,
23
+ NotFoundException,
24
+ UpdateAccountNoteInput,
20
25
  ValidationException,
21
26
  } from '../models/index';
22
27
  import {
28
+ AccountNoteListDtoFromJSON,
29
+ AccountNoteListDtoToJSON,
30
+ CreateAccountNoteInputFromJSON,
31
+ CreateAccountNoteInputToJSON,
32
+ ForbiddenExceptionFromJSON,
33
+ ForbiddenExceptionToJSON,
23
34
  ListCustomerSuccessAccountDomains200ResponseFromJSON,
24
35
  ListCustomerSuccessAccountDomains200ResponseToJSON,
25
36
  ListCustomerSuccessAccounts200ResponseFromJSON,
26
37
  ListCustomerSuccessAccounts200ResponseToJSON,
38
+ NotFoundExceptionFromJSON,
39
+ NotFoundExceptionToJSON,
40
+ UpdateAccountNoteInputFromJSON,
41
+ UpdateAccountNoteInputToJSON,
27
42
  ValidationExceptionFromJSON,
28
43
  ValidationExceptionToJSON,
29
44
  } from '../models/index';
30
45
 
46
+ export interface CustomerSuccessApiCreateCustomerSuccessAccountNoteRequest {
47
+ accountId: string;
48
+ createAccountNoteInput: CreateAccountNoteInput;
49
+ }
50
+
51
+ export interface CustomerSuccessApiDeleteCustomerSuccessAccountNoteRequest {
52
+ accountId: string;
53
+ noteId: string;
54
+ }
55
+
31
56
  export interface CustomerSuccessApiListCustomerSuccessAccountDomainsRequest {
32
57
  accountId: string;
33
58
  filter?: { [key: string]: string; };
@@ -38,6 +63,10 @@ export interface CustomerSuccessApiListCustomerSuccessAccountDomainsRequest {
38
63
  filterPointingDnsStatus?: string;
39
64
  }
40
65
 
66
+ export interface CustomerSuccessApiListCustomerSuccessAccountNotesRequest {
67
+ accountId: string;
68
+ }
69
+
41
70
  export interface CustomerSuccessApiListCustomerSuccessAccountsRequest {
42
71
  filter?: { [key: string]: string; };
43
72
  page?: number;
@@ -48,11 +77,118 @@ export interface CustomerSuccessApiListCustomerSuccessAccountsRequest {
48
77
  filterAffiliateIdentifier?: string;
49
78
  }
50
79
 
80
+ export interface CustomerSuccessApiUpdateCustomerSuccessAccountNoteRequest {
81
+ accountId: string;
82
+ noteId: string;
83
+ updateAccountNoteInput: UpdateAccountNoteInput;
84
+ }
85
+
51
86
  /**
52
87
  *
53
88
  */
54
89
  export class CustomerSuccessApi extends runtime.BaseAPI {
55
90
 
91
+ /**
92
+ * Adds a private note to a seller account.
93
+ * Create account note
94
+ */
95
+ async createCustomerSuccessAccountNoteRaw(requestParameters: CustomerSuccessApiCreateCustomerSuccessAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
96
+ if (requestParameters['accountId'] == null) {
97
+ throw new runtime.RequiredError(
98
+ 'accountId',
99
+ 'Required parameter "accountId" was null or undefined when calling createCustomerSuccessAccountNote().'
100
+ );
101
+ }
102
+
103
+ if (requestParameters['createAccountNoteInput'] == null) {
104
+ throw new runtime.RequiredError(
105
+ 'createAccountNoteInput',
106
+ 'Required parameter "createAccountNoteInput" was null or undefined when calling createCustomerSuccessAccountNote().'
107
+ );
108
+ }
109
+
110
+ const queryParameters: any = {};
111
+
112
+ const headerParameters: runtime.HTTPHeaders = {};
113
+
114
+ headerParameters['Content-Type'] = 'application/json';
115
+
116
+ if (this.configuration && this.configuration.accessToken) {
117
+ const token = this.configuration.accessToken;
118
+ const tokenString = await token("bearer", []);
119
+
120
+ if (tokenString) {
121
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
122
+ }
123
+ }
124
+ const response = await this.request({
125
+ path: `/customer-success/accounts/{accountId}/notes`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
126
+ method: 'POST',
127
+ headers: headerParameters,
128
+ query: queryParameters,
129
+ body: CreateAccountNoteInputToJSON(requestParameters['createAccountNoteInput']),
130
+ }, initOverrides);
131
+
132
+ return new runtime.VoidApiResponse(response);
133
+ }
134
+
135
+ /**
136
+ * Adds a private note to a seller account.
137
+ * Create account note
138
+ */
139
+ async createCustomerSuccessAccountNote(requestParameters: CustomerSuccessApiCreateCustomerSuccessAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
140
+ await this.createCustomerSuccessAccountNoteRaw(requestParameters, initOverrides);
141
+ }
142
+
143
+ /**
144
+ * Soft-deletes a note. Only its author, or a super admin, may do so.
145
+ * Delete account note
146
+ */
147
+ async deleteCustomerSuccessAccountNoteRaw(requestParameters: CustomerSuccessApiDeleteCustomerSuccessAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
148
+ if (requestParameters['accountId'] == null) {
149
+ throw new runtime.RequiredError(
150
+ 'accountId',
151
+ 'Required parameter "accountId" was null or undefined when calling deleteCustomerSuccessAccountNote().'
152
+ );
153
+ }
154
+
155
+ if (requestParameters['noteId'] == null) {
156
+ throw new runtime.RequiredError(
157
+ 'noteId',
158
+ 'Required parameter "noteId" was null or undefined when calling deleteCustomerSuccessAccountNote().'
159
+ );
160
+ }
161
+
162
+ const queryParameters: any = {};
163
+
164
+ const headerParameters: runtime.HTTPHeaders = {};
165
+
166
+ if (this.configuration && this.configuration.accessToken) {
167
+ const token = this.configuration.accessToken;
168
+ const tokenString = await token("bearer", []);
169
+
170
+ if (tokenString) {
171
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
172
+ }
173
+ }
174
+ const response = await this.request({
175
+ path: `/customer-success/accounts/{accountId}/notes/{noteId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"noteId"}}`, encodeURIComponent(String(requestParameters['noteId']))),
176
+ method: 'DELETE',
177
+ headers: headerParameters,
178
+ query: queryParameters,
179
+ }, initOverrides);
180
+
181
+ return new runtime.VoidApiResponse(response);
182
+ }
183
+
184
+ /**
185
+ * Soft-deletes a note. Only its author, or a super admin, may do so.
186
+ * Delete account note
187
+ */
188
+ async deleteCustomerSuccessAccountNote(requestParameters: CustomerSuccessApiDeleteCustomerSuccessAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
189
+ await this.deleteCustomerSuccessAccountNoteRaw(requestParameters, initOverrides);
190
+ }
191
+
56
192
  /**
57
193
  * Lists the domains of a single seller account for customer success follow-up. The account is taken from the path and cannot be widened through filters.
58
194
  * List account domains
@@ -120,6 +256,49 @@ export class CustomerSuccessApi extends runtime.BaseAPI {
120
256
  return await response.value();
121
257
  }
122
258
 
259
+ /**
260
+ * Lists the private notes of a seller account, oldest first. Every internal role sees the same notes.
261
+ * List account notes
262
+ */
263
+ async listCustomerSuccessAccountNotesRaw(requestParameters: CustomerSuccessApiListCustomerSuccessAccountNotesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountNoteListDto>> {
264
+ if (requestParameters['accountId'] == null) {
265
+ throw new runtime.RequiredError(
266
+ 'accountId',
267
+ 'Required parameter "accountId" was null or undefined when calling listCustomerSuccessAccountNotes().'
268
+ );
269
+ }
270
+
271
+ const queryParameters: any = {};
272
+
273
+ const headerParameters: runtime.HTTPHeaders = {};
274
+
275
+ if (this.configuration && this.configuration.accessToken) {
276
+ const token = this.configuration.accessToken;
277
+ const tokenString = await token("bearer", []);
278
+
279
+ if (tokenString) {
280
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
281
+ }
282
+ }
283
+ const response = await this.request({
284
+ path: `/customer-success/accounts/{accountId}/notes`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
285
+ method: 'GET',
286
+ headers: headerParameters,
287
+ query: queryParameters,
288
+ }, initOverrides);
289
+
290
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountNoteListDtoFromJSON(jsonValue));
291
+ }
292
+
293
+ /**
294
+ * Lists the private notes of a seller account, oldest first. Every internal role sees the same notes.
295
+ * List account notes
296
+ */
297
+ async listCustomerSuccessAccountNotes(requestParameters: CustomerSuccessApiListCustomerSuccessAccountNotesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountNoteListDto> {
298
+ const response = await this.listCustomerSuccessAccountNotesRaw(requestParameters, initOverrides);
299
+ return await response.value();
300
+ }
301
+
123
302
  /**
124
303
  * Lists seller accounts for customer success follow-up.
125
304
  * List accounts
@@ -184,4 +363,63 @@ export class CustomerSuccessApi extends runtime.BaseAPI {
184
363
  return await response.value();
185
364
  }
186
365
 
366
+ /**
367
+ * Updates the body of a note. Only its author, or a super admin, may do so.
368
+ * Update account note
369
+ */
370
+ async updateCustomerSuccessAccountNoteRaw(requestParameters: CustomerSuccessApiUpdateCustomerSuccessAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
371
+ if (requestParameters['accountId'] == null) {
372
+ throw new runtime.RequiredError(
373
+ 'accountId',
374
+ 'Required parameter "accountId" was null or undefined when calling updateCustomerSuccessAccountNote().'
375
+ );
376
+ }
377
+
378
+ if (requestParameters['noteId'] == null) {
379
+ throw new runtime.RequiredError(
380
+ 'noteId',
381
+ 'Required parameter "noteId" was null or undefined when calling updateCustomerSuccessAccountNote().'
382
+ );
383
+ }
384
+
385
+ if (requestParameters['updateAccountNoteInput'] == null) {
386
+ throw new runtime.RequiredError(
387
+ 'updateAccountNoteInput',
388
+ 'Required parameter "updateAccountNoteInput" was null or undefined when calling updateCustomerSuccessAccountNote().'
389
+ );
390
+ }
391
+
392
+ const queryParameters: any = {};
393
+
394
+ const headerParameters: runtime.HTTPHeaders = {};
395
+
396
+ headerParameters['Content-Type'] = 'application/json';
397
+
398
+ if (this.configuration && this.configuration.accessToken) {
399
+ const token = this.configuration.accessToken;
400
+ const tokenString = await token("bearer", []);
401
+
402
+ if (tokenString) {
403
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
404
+ }
405
+ }
406
+ const response = await this.request({
407
+ path: `/customer-success/accounts/{accountId}/notes/{noteId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"noteId"}}`, encodeURIComponent(String(requestParameters['noteId']))),
408
+ method: 'PATCH',
409
+ headers: headerParameters,
410
+ query: queryParameters,
411
+ body: UpdateAccountNoteInputToJSON(requestParameters['updateAccountNoteInput']),
412
+ }, initOverrides);
413
+
414
+ return new runtime.VoidApiResponse(response);
415
+ }
416
+
417
+ /**
418
+ * Updates the body of a note. Only its author, or a super admin, may do so.
419
+ * Update account note
420
+ */
421
+ async updateCustomerSuccessAccountNote(requestParameters: CustomerSuccessApiUpdateCustomerSuccessAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
422
+ await this.updateCustomerSuccessAccountNoteRaw(requestParameters, initOverrides);
423
+ }
424
+
187
425
  }
@@ -28,6 +28,7 @@ import type {
28
28
  DomainSearchTranslationDto,
29
29
  DomainUrlDto,
30
30
  DomainVerificationStatusDto,
31
+ ForbiddenException,
31
32
  GetAllDomainTransfers200Response,
32
33
  IntersectionDomainDtoWithHijackerDtoWithAccountDto,
33
34
  JobDto,
@@ -70,6 +71,8 @@ import {
70
71
  DomainUrlDtoToJSON,
71
72
  DomainVerificationStatusDtoFromJSON,
72
73
  DomainVerificationStatusDtoToJSON,
74
+ ForbiddenExceptionFromJSON,
75
+ ForbiddenExceptionToJSON,
73
76
  GetAllDomainTransfers200ResponseFromJSON,
74
77
  GetAllDomainTransfers200ResponseToJSON,
75
78
  IntersectionDomainDtoWithHijackerDtoWithAccountDtoFromJSON,
@@ -0,0 +1,93 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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 AccountNoteAuthorDto
20
+ */
21
+ export interface AccountNoteAuthorDto {
22
+ /**
23
+ * Author id.
24
+ * @type {string}
25
+ * @memberof AccountNoteAuthorDto
26
+ */
27
+ id: string;
28
+ /**
29
+ * Author full name.
30
+ * @type {string}
31
+ * @memberof AccountNoteAuthorDto
32
+ */
33
+ name: string;
34
+ /**
35
+ * Author email address.
36
+ * @type {string}
37
+ * @memberof AccountNoteAuthorDto
38
+ */
39
+ email: string;
40
+ /**
41
+ * Identifier of the account the author belongs to.
42
+ * @type {string}
43
+ * @memberof AccountNoteAuthorDto
44
+ */
45
+ accountIdentifier: string;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the AccountNoteAuthorDto interface.
50
+ */
51
+ export function instanceOfAccountNoteAuthorDto(value: object): value is AccountNoteAuthorDto {
52
+ if (!('id' in value) || value['id'] === undefined) return false;
53
+ if (!('name' in value) || value['name'] === undefined) return false;
54
+ if (!('email' in value) || value['email'] === undefined) return false;
55
+ if (!('accountIdentifier' in value) || value['accountIdentifier'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function AccountNoteAuthorDtoFromJSON(json: any): AccountNoteAuthorDto {
60
+ return AccountNoteAuthorDtoFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function AccountNoteAuthorDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountNoteAuthorDto {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'id': json['id'],
70
+ 'name': json['name'],
71
+ 'email': json['email'],
72
+ 'accountIdentifier': json['accountIdentifier'],
73
+ };
74
+ }
75
+
76
+ export function AccountNoteAuthorDtoToJSON(json: any): AccountNoteAuthorDto {
77
+ return AccountNoteAuthorDtoToJSONTyped(json, false);
78
+ }
79
+
80
+ export function AccountNoteAuthorDtoToJSONTyped(value?: AccountNoteAuthorDto | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'id': value['id'],
88
+ 'name': value['name'],
89
+ 'email': value['email'],
90
+ 'accountIdentifier': value['accountIdentifier'],
91
+ };
92
+ }
93
+
@@ -0,0 +1,119 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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
+ import type { AccountNoteAuthorDto } from './AccountNoteAuthorDto';
17
+ import {
18
+ AccountNoteAuthorDtoFromJSON,
19
+ AccountNoteAuthorDtoFromJSONTyped,
20
+ AccountNoteAuthorDtoToJSON,
21
+ AccountNoteAuthorDtoToJSONTyped,
22
+ } from './AccountNoteAuthorDto';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface AccountNoteDto
28
+ */
29
+ export interface AccountNoteDto {
30
+ /**
31
+ * Note id.
32
+ * @type {string}
33
+ * @memberof AccountNoteDto
34
+ */
35
+ id: string;
36
+ /**
37
+ * Id of the account the note belongs to.
38
+ * @type {string}
39
+ * @memberof AccountNoteDto
40
+ */
41
+ accountId: string;
42
+ /**
43
+ * Note body as sanitized HTML.
44
+ * @type {string}
45
+ * @memberof AccountNoteDto
46
+ */
47
+ body: string;
48
+ /**
49
+ * Internal user who wrote the note.
50
+ * @type {AccountNoteAuthorDto}
51
+ * @memberof AccountNoteDto
52
+ */
53
+ author: AccountNoteAuthorDto;
54
+ /**
55
+ * When the note was created.
56
+ * @type {Date}
57
+ * @memberof AccountNoteDto
58
+ */
59
+ createdAt: Date;
60
+ /**
61
+ * When the note was last updated.
62
+ * @type {Date}
63
+ * @memberof AccountNoteDto
64
+ */
65
+ updatedAt: Date;
66
+ }
67
+
68
+ /**
69
+ * Check if a given object implements the AccountNoteDto interface.
70
+ */
71
+ export function instanceOfAccountNoteDto(value: object): value is AccountNoteDto {
72
+ if (!('id' in value) || value['id'] === undefined) return false;
73
+ if (!('accountId' in value) || value['accountId'] === undefined) return false;
74
+ if (!('body' in value) || value['body'] === undefined) return false;
75
+ if (!('author' in value) || value['author'] === undefined) return false;
76
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
77
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
78
+ return true;
79
+ }
80
+
81
+ export function AccountNoteDtoFromJSON(json: any): AccountNoteDto {
82
+ return AccountNoteDtoFromJSONTyped(json, false);
83
+ }
84
+
85
+ export function AccountNoteDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountNoteDto {
86
+ if (json == null) {
87
+ return json;
88
+ }
89
+ return {
90
+
91
+ 'id': json['id'],
92
+ 'accountId': json['accountId'],
93
+ 'body': json['body'],
94
+ 'author': AccountNoteAuthorDtoFromJSON(json['author']),
95
+ 'createdAt': (new Date(json['createdAt'])),
96
+ 'updatedAt': (new Date(json['updatedAt'])),
97
+ };
98
+ }
99
+
100
+ export function AccountNoteDtoToJSON(json: any): AccountNoteDto {
101
+ return AccountNoteDtoToJSONTyped(json, false);
102
+ }
103
+
104
+ export function AccountNoteDtoToJSONTyped(value?: AccountNoteDto | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'id': value['id'],
112
+ 'accountId': value['accountId'],
113
+ 'body': value['body'],
114
+ 'author': AccountNoteAuthorDtoToJSON(value['author']),
115
+ 'createdAt': ((value['createdAt']).toISOString()),
116
+ 'updatedAt': ((value['updatedAt']).toISOString()),
117
+ };
118
+ }
119
+
@@ -0,0 +1,74 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
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
+ import type { AccountNoteDto } from './AccountNoteDto';
17
+ import {
18
+ AccountNoteDtoFromJSON,
19
+ AccountNoteDtoFromJSONTyped,
20
+ AccountNoteDtoToJSON,
21
+ AccountNoteDtoToJSONTyped,
22
+ } from './AccountNoteDto';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface AccountNoteListDto
28
+ */
29
+ export interface AccountNoteListDto {
30
+ /**
31
+ * Notes of the account, oldest first.
32
+ * @type {Array<AccountNoteDto>}
33
+ * @memberof AccountNoteListDto
34
+ */
35
+ data: Array<AccountNoteDto>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the AccountNoteListDto interface.
40
+ */
41
+ export function instanceOfAccountNoteListDto(value: object): value is AccountNoteListDto {
42
+ if (!('data' in value) || value['data'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function AccountNoteListDtoFromJSON(json: any): AccountNoteListDto {
47
+ return AccountNoteListDtoFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function AccountNoteListDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountNoteListDto {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'data': ((json['data'] as Array<any>).map(AccountNoteDtoFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function AccountNoteListDtoToJSON(json: any): AccountNoteListDto {
61
+ return AccountNoteListDtoToJSONTyped(json, false);
62
+ }
63
+
64
+ export function AccountNoteListDtoToJSONTyped(value?: AccountNoteListDto | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'data': ((value['data'] as Array<any>).map(AccountNoteDtoToJSON)),
72
+ };
73
+ }
74
+
@@ -60,6 +60,18 @@ export interface AdminListAccountDto {
60
60
  * @memberof AdminListAccountDto
61
61
  */
62
62
  identifier: string;
63
+ /**
64
+ * Number of private notes written about the account.
65
+ * @type {number}
66
+ * @memberof AdminListAccountDto
67
+ */
68
+ notesNumber: number;
69
+ /**
70
+ * When any of the account notes was last written or edited. Null when there are none.
71
+ * @type {Date}
72
+ * @memberof AdminListAccountDto
73
+ */
74
+ notesLastUpdatedAt: Date | null;
63
75
  /**
64
76
  * Account creation date.
65
77
  * @type {Date}
@@ -194,6 +206,8 @@ export type AdminListAccountDtoPayoutProviderEnum = typeof AdminListAccountDtoPa
194
206
  export function instanceOfAdminListAccountDto(value: object): value is AdminListAccountDto {
195
207
  if (!('id' in value) || value['id'] === undefined) return false;
196
208
  if (!('identifier' in value) || value['identifier'] === undefined) return false;
209
+ if (!('notesNumber' in value) || value['notesNumber'] === undefined) return false;
210
+ if (!('notesLastUpdatedAt' in value) || value['notesLastUpdatedAt'] === undefined) return false;
197
211
  if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
198
212
  if (!('name' in value) || value['name'] === undefined) return false;
199
213
  if (!('type' in value) || value['type'] === undefined) return false;
@@ -225,6 +239,8 @@ export function AdminListAccountDtoFromJSONTyped(json: any, ignoreDiscriminator:
225
239
 
226
240
  'id': json['id'],
227
241
  'identifier': json['identifier'],
242
+ 'notesNumber': json['notesNumber'],
243
+ 'notesLastUpdatedAt': (json['notesLastUpdatedAt'] == null ? null : new Date(json['notesLastUpdatedAt'])),
228
244
  'createdAt': (new Date(json['createdAt'])),
229
245
  'name': json['name'],
230
246
  'type': json['type'],
@@ -257,6 +273,8 @@ export function AdminListAccountDtoToJSONTyped(value?: AdminListAccountDto | nul
257
273
 
258
274
  'id': value['id'],
259
275
  'identifier': value['identifier'],
276
+ 'notesNumber': value['notesNumber'],
277
+ 'notesLastUpdatedAt': (value['notesLastUpdatedAt'] == null ? null : (value['notesLastUpdatedAt'] as any).toISOString()),
260
278
  'createdAt': ((value['createdAt']).toISOString()),
261
279
  'name': value['name'],
262
280
  'type': value['type'],
@@ -27,6 +27,13 @@ import {
27
27
  MoneyDtoToJSON,
28
28
  MoneyDtoToJSONTyped,
29
29
  } from './MoneyDto';
30
+ import type { BillingInformationDto } from './BillingInformationDto';
31
+ import {
32
+ BillingInformationDtoFromJSON,
33
+ BillingInformationDtoFromJSONTyped,
34
+ BillingInformationDtoToJSON,
35
+ BillingInformationDtoToJSONTyped,
36
+ } from './BillingInformationDto';
30
37
 
31
38
  /**
32
39
  *
@@ -124,6 +131,12 @@ export interface BuyerSubscriptionListItemDto {
124
131
  * @memberof BuyerSubscriptionListItemDto
125
132
  */
126
133
  canManageDomainDns: boolean;
134
+ /**
135
+ * Billing information of the subscription. It is the one used to build the invoices of the upcoming renewals.
136
+ * @type {BillingInformationDto}
137
+ * @memberof BuyerSubscriptionListItemDto
138
+ */
139
+ buyerInformation: BillingInformationDto;
127
140
  }
128
141
 
129
142
 
@@ -177,6 +190,7 @@ export function instanceOfBuyerSubscriptionListItemDto(value: object): value is
177
190
  if (!('renewAt' in value) || value['renewAt'] === undefined) return false;
178
191
  if (!('paymentUrl' in value) || value['paymentUrl'] === undefined) return false;
179
192
  if (!('canManageDomainDns' in value) || value['canManageDomainDns'] === undefined) return false;
193
+ if (!('buyerInformation' in value) || value['buyerInformation'] === undefined) return false;
180
194
  return true;
181
195
  }
182
196
 
@@ -205,6 +219,7 @@ export function BuyerSubscriptionListItemDtoFromJSONTyped(json: any, ignoreDiscr
205
219
  'renewAt': (new Date(json['renewAt'])),
206
220
  'paymentUrl': json['paymentUrl'],
207
221
  'canManageDomainDns': json['canManageDomainDns'],
222
+ 'buyerInformation': BillingInformationDtoFromJSON(json['buyerInformation']),
208
223
  };
209
224
  }
210
225
 
@@ -234,6 +249,7 @@ export function BuyerSubscriptionListItemDtoToJSONTyped(value?: BuyerSubscriptio
234
249
  'renewAt': ((value['renewAt']).toISOString()),
235
250
  'paymentUrl': value['paymentUrl'],
236
251
  'canManageDomainDns': value['canManageDomainDns'],
252
+ 'buyerInformation': BillingInformationDtoToJSON(value['buyerInformation']),
237
253
  };
238
254
  }
239
255