@randock/nameshift-api-client 0.0.474 → 0.0.475

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 (39) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +3 -3
  3. package/dist/apis/AdminApi.d.ts +57 -1
  4. package/dist/apis/AdminApi.js +230 -0
  5. package/dist/apis/CustomerSuccessApi.d.ts +57 -1
  6. package/dist/apis/CustomerSuccessApi.js +230 -0
  7. package/dist/models/AccountNoteAuthorDto.d.ts +50 -0
  8. package/dist/models/AccountNoteAuthorDto.js +63 -0
  9. package/dist/models/AccountNoteDto.d.ts +63 -0
  10. package/dist/models/AccountNoteDto.js +72 -0
  11. package/dist/models/AccountNoteListDto.d.ts +33 -0
  12. package/dist/models/AccountNoteListDto.js +52 -0
  13. package/dist/models/AdminListAccountDto.d.ts +12 -0
  14. package/dist/models/AdminListAccountDto.js +8 -0
  15. package/dist/models/CreateAccountNoteInput.d.ts +32 -0
  16. package/dist/models/CreateAccountNoteInput.js +51 -0
  17. package/dist/models/CustomerSuccessListAccountDto.d.ts +12 -0
  18. package/dist/models/CustomerSuccessListAccountDto.js +8 -0
  19. package/dist/models/ForbiddenException.d.ts +44 -0
  20. package/dist/models/ForbiddenException.js +59 -0
  21. package/dist/models/UpdateAccountNoteInput.d.ts +32 -0
  22. package/dist/models/UpdateAccountNoteInput.js +51 -0
  23. package/dist/models/index.d.ts +6 -0
  24. package/dist/models/index.js +6 -0
  25. package/package.json +1 -1
  26. package/src/apis/AccountsApi.ts +3 -0
  27. package/src/apis/AdminApi.ts +235 -0
  28. package/src/apis/BuyersApi.ts +3 -0
  29. package/src/apis/CustomerSuccessApi.ts +238 -0
  30. package/src/apis/DomainsApi.ts +3 -0
  31. package/src/models/AccountNoteAuthorDto.ts +93 -0
  32. package/src/models/AccountNoteDto.ts +119 -0
  33. package/src/models/AccountNoteListDto.ts +74 -0
  34. package/src/models/AdminListAccountDto.ts +18 -0
  35. package/src/models/CreateAccountNoteInput.ts +66 -0
  36. package/src/models/CustomerSuccessListAccountDto.ts +18 -0
  37. package/src/models/ForbiddenException.ts +84 -0
  38. package/src/models/UpdateAccountNoteInput.ts +66 -0
  39. package/src/models/index.ts +6 -0
@@ -16,6 +16,7 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  AccountNameshiftCommissionByTypeDto,
19
+ AccountNoteListDto,
19
20
  AccountPaymentMethodProfileDto,
20
21
  AccountSettingsDto,
21
22
  AdminAccountLoginDto,
@@ -34,11 +35,13 @@ import type {
34
35
  CommissionListDto,
35
36
  CommissionSimulationResultDto,
36
37
  ConflictException,
38
+ CreateAccountNoteInput,
37
39
  CreateChallengeInput,
38
40
  DomainLockDto,
39
41
  DomainStatsDto,
40
42
  DomainTldsDto,
41
43
  DomainTransferDetailsDto,
44
+ ForbiddenException,
42
45
  GetAccountChallengeRewardUsagesListDto,
43
46
  GetAllAuctions200Response,
44
47
  GetAllFeatureFlags200Response,
@@ -65,6 +68,7 @@ import type {
65
68
  StatsFilterInputDateRange,
66
69
  SubscriptionDetailsDto,
67
70
  UpdateAccountChallengeRewardBalanceInput,
71
+ UpdateAccountNoteInput,
68
72
  UpdateChallengeInput,
69
73
  UpdateFeatureFlagInput,
70
74
  UpdateMarketplaceInput,
@@ -73,6 +77,8 @@ import type {
73
77
  import {
74
78
  AccountNameshiftCommissionByTypeDtoFromJSON,
75
79
  AccountNameshiftCommissionByTypeDtoToJSON,
80
+ AccountNoteListDtoFromJSON,
81
+ AccountNoteListDtoToJSON,
76
82
  AccountPaymentMethodProfileDtoFromJSON,
77
83
  AccountPaymentMethodProfileDtoToJSON,
78
84
  AccountSettingsDtoFromJSON,
@@ -109,6 +115,8 @@ import {
109
115
  CommissionSimulationResultDtoToJSON,
110
116
  ConflictExceptionFromJSON,
111
117
  ConflictExceptionToJSON,
118
+ CreateAccountNoteInputFromJSON,
119
+ CreateAccountNoteInputToJSON,
112
120
  CreateChallengeInputFromJSON,
113
121
  CreateChallengeInputToJSON,
114
122
  DomainLockDtoFromJSON,
@@ -119,6 +127,8 @@ import {
119
127
  DomainTldsDtoToJSON,
120
128
  DomainTransferDetailsDtoFromJSON,
121
129
  DomainTransferDetailsDtoToJSON,
130
+ ForbiddenExceptionFromJSON,
131
+ ForbiddenExceptionToJSON,
122
132
  GetAccountChallengeRewardUsagesListDtoFromJSON,
123
133
  GetAccountChallengeRewardUsagesListDtoToJSON,
124
134
  GetAllAuctions200ResponseFromJSON,
@@ -171,6 +181,8 @@ import {
171
181
  SubscriptionDetailsDtoToJSON,
172
182
  UpdateAccountChallengeRewardBalanceInputFromJSON,
173
183
  UpdateAccountChallengeRewardBalanceInputToJSON,
184
+ UpdateAccountNoteInputFromJSON,
185
+ UpdateAccountNoteInputToJSON,
174
186
  UpdateChallengeInputFromJSON,
175
187
  UpdateChallengeInputToJSON,
176
188
  UpdateFeatureFlagInputFromJSON,
@@ -221,6 +233,11 @@ export interface AdminApiCheckDomainNameserverRequest {
221
233
  domainId: string;
222
234
  }
223
235
 
236
+ export interface AdminApiCreateAccountNoteRequest {
237
+ accountId: string;
238
+ createAccountNoteInput: CreateAccountNoteInput;
239
+ }
240
+
224
241
  export interface AdminApiCreateChallengeRequest {
225
242
  createChallengeInput: CreateChallengeInput;
226
243
  }
@@ -229,6 +246,11 @@ export interface AdminApiCreateNegativeInvoiceRequest {
229
246
  invoiceId: string;
230
247
  }
231
248
 
249
+ export interface AdminApiDeleteAccountNoteRequest {
250
+ accountId: string;
251
+ noteId: string;
252
+ }
253
+
232
254
  export interface AdminApiDeleteChallengeRequest {
233
255
  id: string;
234
256
  }
@@ -361,6 +383,10 @@ export interface AdminApiLinkBankDepositToInvoiceRequest {
361
383
  linkBankDepositToInvoiceInput: LinkBankDepositToInvoiceInput;
362
384
  }
363
385
 
386
+ export interface AdminApiListAccountNotesRequest {
387
+ accountId: string;
388
+ }
389
+
364
390
  export interface AdminApiListAccountsRequest {
365
391
  filter?: { [key: string]: string; };
366
392
  page?: number;
@@ -490,6 +516,12 @@ export interface AdminApiUpdateAccountChallengeRewardBalancePointsRequest {
490
516
  updateAccountChallengeRewardBalanceInput: UpdateAccountChallengeRewardBalanceInput;
491
517
  }
492
518
 
519
+ export interface AdminApiUpdateAccountNoteRequest {
520
+ accountId: string;
521
+ noteId: string;
522
+ updateAccountNoteInput: UpdateAccountNoteInput;
523
+ }
524
+
493
525
  export interface AdminApiUpdateAccountSettingsRequest {
494
526
  accountId: string;
495
527
  adminAccountSettingsInput: AdminAccountSettingsInput;
@@ -910,6 +942,58 @@ export class AdminApi extends runtime.BaseAPI {
910
942
  await this.checkDomainNameserverRaw(requestParameters, initOverrides);
911
943
  }
912
944
 
945
+ /**
946
+ * Adds a private note to a seller account.
947
+ * Create account note
948
+ */
949
+ async createAccountNoteRaw(requestParameters: AdminApiCreateAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
950
+ if (requestParameters['accountId'] == null) {
951
+ throw new runtime.RequiredError(
952
+ 'accountId',
953
+ 'Required parameter "accountId" was null or undefined when calling createAccountNote().'
954
+ );
955
+ }
956
+
957
+ if (requestParameters['createAccountNoteInput'] == null) {
958
+ throw new runtime.RequiredError(
959
+ 'createAccountNoteInput',
960
+ 'Required parameter "createAccountNoteInput" was null or undefined when calling createAccountNote().'
961
+ );
962
+ }
963
+
964
+ const queryParameters: any = {};
965
+
966
+ const headerParameters: runtime.HTTPHeaders = {};
967
+
968
+ headerParameters['Content-Type'] = 'application/json';
969
+
970
+ if (this.configuration && this.configuration.accessToken) {
971
+ const token = this.configuration.accessToken;
972
+ const tokenString = await token("bearer", []);
973
+
974
+ if (tokenString) {
975
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
976
+ }
977
+ }
978
+ const response = await this.request({
979
+ path: `/admin/accounts/{accountId}/notes`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
980
+ method: 'POST',
981
+ headers: headerParameters,
982
+ query: queryParameters,
983
+ body: CreateAccountNoteInputToJSON(requestParameters['createAccountNoteInput']),
984
+ }, initOverrides);
985
+
986
+ return new runtime.VoidApiResponse(response);
987
+ }
988
+
989
+ /**
990
+ * Adds a private note to a seller account.
991
+ * Create account note
992
+ */
993
+ async createAccountNote(requestParameters: AdminApiCreateAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
994
+ await this.createAccountNoteRaw(requestParameters, initOverrides);
995
+ }
996
+
913
997
  /**
914
998
  * Creates a new challenge.
915
999
  * Create challenge
@@ -998,6 +1082,55 @@ export class AdminApi extends runtime.BaseAPI {
998
1082
  return await response.value();
999
1083
  }
1000
1084
 
1085
+ /**
1086
+ * Soft-deletes a note. Only its author, or a super admin, may do so.
1087
+ * Delete account note
1088
+ */
1089
+ async deleteAccountNoteRaw(requestParameters: AdminApiDeleteAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1090
+ if (requestParameters['accountId'] == null) {
1091
+ throw new runtime.RequiredError(
1092
+ 'accountId',
1093
+ 'Required parameter "accountId" was null or undefined when calling deleteAccountNote().'
1094
+ );
1095
+ }
1096
+
1097
+ if (requestParameters['noteId'] == null) {
1098
+ throw new runtime.RequiredError(
1099
+ 'noteId',
1100
+ 'Required parameter "noteId" was null or undefined when calling deleteAccountNote().'
1101
+ );
1102
+ }
1103
+
1104
+ const queryParameters: any = {};
1105
+
1106
+ const headerParameters: runtime.HTTPHeaders = {};
1107
+
1108
+ if (this.configuration && this.configuration.accessToken) {
1109
+ const token = this.configuration.accessToken;
1110
+ const tokenString = await token("bearer", []);
1111
+
1112
+ if (tokenString) {
1113
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1114
+ }
1115
+ }
1116
+ const response = await this.request({
1117
+ path: `/admin/accounts/{accountId}/notes/{noteId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"noteId"}}`, encodeURIComponent(String(requestParameters['noteId']))),
1118
+ method: 'DELETE',
1119
+ headers: headerParameters,
1120
+ query: queryParameters,
1121
+ }, initOverrides);
1122
+
1123
+ return new runtime.VoidApiResponse(response);
1124
+ }
1125
+
1126
+ /**
1127
+ * Soft-deletes a note. Only its author, or a super admin, may do so.
1128
+ * Delete account note
1129
+ */
1130
+ async deleteAccountNote(requestParameters: AdminApiDeleteAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1131
+ await this.deleteAccountNoteRaw(requestParameters, initOverrides);
1132
+ }
1133
+
1001
1134
  /**
1002
1135
  * Soft-deletes a multi-count challenge. At least one challenge of each type must remain.
1003
1136
  * Delete challenge
@@ -2159,6 +2292,49 @@ export class AdminApi extends runtime.BaseAPI {
2159
2292
  await this.linkBankDepositToInvoiceRaw(requestParameters, initOverrides);
2160
2293
  }
2161
2294
 
2295
+ /**
2296
+ * Lists the private notes of a seller account, oldest first. Every internal role sees the same notes.
2297
+ * List account notes
2298
+ */
2299
+ async listAccountNotesRaw(requestParameters: AdminApiListAccountNotesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountNoteListDto>> {
2300
+ if (requestParameters['accountId'] == null) {
2301
+ throw new runtime.RequiredError(
2302
+ 'accountId',
2303
+ 'Required parameter "accountId" was null or undefined when calling listAccountNotes().'
2304
+ );
2305
+ }
2306
+
2307
+ const queryParameters: any = {};
2308
+
2309
+ const headerParameters: runtime.HTTPHeaders = {};
2310
+
2311
+ if (this.configuration && this.configuration.accessToken) {
2312
+ const token = this.configuration.accessToken;
2313
+ const tokenString = await token("bearer", []);
2314
+
2315
+ if (tokenString) {
2316
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
2317
+ }
2318
+ }
2319
+ const response = await this.request({
2320
+ path: `/admin/accounts/{accountId}/notes`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
2321
+ method: 'GET',
2322
+ headers: headerParameters,
2323
+ query: queryParameters,
2324
+ }, initOverrides);
2325
+
2326
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountNoteListDtoFromJSON(jsonValue));
2327
+ }
2328
+
2329
+ /**
2330
+ * Lists the private notes of a seller account, oldest first. Every internal role sees the same notes.
2331
+ * List account notes
2332
+ */
2333
+ async listAccountNotes(requestParameters: AdminApiListAccountNotesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountNoteListDto> {
2334
+ const response = await this.listAccountNotesRaw(requestParameters, initOverrides);
2335
+ return await response.value();
2336
+ }
2337
+
2162
2338
  /**
2163
2339
  * Lists all seller accounts.
2164
2340
  * List accounts
@@ -3429,6 +3605,65 @@ export class AdminApi extends runtime.BaseAPI {
3429
3605
  await this.updateAccountChallengeRewardBalancePointsRaw(requestParameters, initOverrides);
3430
3606
  }
3431
3607
 
3608
+ /**
3609
+ * Updates the body of a note. Only its author, or a super admin, may do so.
3610
+ * Update account note
3611
+ */
3612
+ async updateAccountNoteRaw(requestParameters: AdminApiUpdateAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
3613
+ if (requestParameters['accountId'] == null) {
3614
+ throw new runtime.RequiredError(
3615
+ 'accountId',
3616
+ 'Required parameter "accountId" was null or undefined when calling updateAccountNote().'
3617
+ );
3618
+ }
3619
+
3620
+ if (requestParameters['noteId'] == null) {
3621
+ throw new runtime.RequiredError(
3622
+ 'noteId',
3623
+ 'Required parameter "noteId" was null or undefined when calling updateAccountNote().'
3624
+ );
3625
+ }
3626
+
3627
+ if (requestParameters['updateAccountNoteInput'] == null) {
3628
+ throw new runtime.RequiredError(
3629
+ 'updateAccountNoteInput',
3630
+ 'Required parameter "updateAccountNoteInput" was null or undefined when calling updateAccountNote().'
3631
+ );
3632
+ }
3633
+
3634
+ const queryParameters: any = {};
3635
+
3636
+ const headerParameters: runtime.HTTPHeaders = {};
3637
+
3638
+ headerParameters['Content-Type'] = 'application/json';
3639
+
3640
+ if (this.configuration && this.configuration.accessToken) {
3641
+ const token = this.configuration.accessToken;
3642
+ const tokenString = await token("bearer", []);
3643
+
3644
+ if (tokenString) {
3645
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
3646
+ }
3647
+ }
3648
+ const response = await this.request({
3649
+ path: `/admin/accounts/{accountId}/notes/{noteId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"noteId"}}`, encodeURIComponent(String(requestParameters['noteId']))),
3650
+ method: 'PATCH',
3651
+ headers: headerParameters,
3652
+ query: queryParameters,
3653
+ body: UpdateAccountNoteInputToJSON(requestParameters['updateAccountNoteInput']),
3654
+ }, initOverrides);
3655
+
3656
+ return new runtime.VoidApiResponse(response);
3657
+ }
3658
+
3659
+ /**
3660
+ * Updates the body of a note. Only its author, or a super admin, may do so.
3661
+ * Update account note
3662
+ */
3663
+ async updateAccountNote(requestParameters: AdminApiUpdateAccountNoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
3664
+ await this.updateAccountNoteRaw(requestParameters, initOverrides);
3665
+ }
3666
+
3432
3667
  /**
3433
3668
  * Updates admin-managed account settings.
3434
3669
  * Update account settings
@@ -32,6 +32,7 @@ import type {
32
32
  BuyerSessionDto,
33
33
  BuyerTaskDetailsDto,
34
34
  CreateBuyerLeadMessageInput,
35
+ ForbiddenException,
35
36
  GetBuyerAuctions200Response,
36
37
  GetBuyerInvoices200Response,
37
38
  GetBuyerLeads200Response,
@@ -95,6 +96,8 @@ import {
95
96
  BuyerTaskDetailsDtoToJSON,
96
97
  CreateBuyerLeadMessageInputFromJSON,
97
98
  CreateBuyerLeadMessageInputToJSON,
99
+ ForbiddenExceptionFromJSON,
100
+ ForbiddenExceptionToJSON,
98
101
  GetBuyerAuctions200ResponseFromJSON,
99
102
  GetBuyerAuctions200ResponseToJSON,
100
103
  GetBuyerInvoices200ResponseFromJSON,
@@ -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,