@randock/nameshift-api-client 0.0.531 → 0.0.533

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 (42) hide show
  1. package/.openapi-generator/FILES +3 -0
  2. package/README.md +3 -3
  3. package/dist/apis/AdminApi.d.ts +2 -2
  4. package/dist/apis/AdminApi.js +2 -2
  5. package/dist/apis/UsersApi.d.ts +34 -1
  6. package/dist/apis/UsersApi.js +185 -0
  7. package/dist/models/AccountSettingsDto.d.ts +14 -0
  8. package/dist/models/AccountSettingsDto.js +12 -1
  9. package/dist/models/AccountSettingsInput.d.ts +14 -0
  10. package/dist/models/AccountSettingsInput.js +10 -1
  11. package/dist/models/AdminUserNewsletterInput.d.ts +3 -1
  12. package/dist/models/AdminUserNewsletterInput.js +3 -1
  13. package/dist/models/LeadDto.d.ts +6 -0
  14. package/dist/models/LeadDto.js +4 -0
  15. package/dist/models/ListLeadsResultItem.d.ts +6 -0
  16. package/dist/models/ListLeadsResultItem.js +4 -0
  17. package/dist/models/ManualLeadDetails.d.ts +6 -0
  18. package/dist/models/ManualLeadDetails.js +4 -0
  19. package/dist/models/NewsletterSubscriptionState.d.ts +28 -0
  20. package/dist/models/NewsletterSubscriptionState.js +54 -0
  21. package/dist/models/SellerLeadDetails.d.ts +6 -0
  22. package/dist/models/SellerLeadDetails.js +4 -0
  23. package/dist/models/UpdateUserNewsletterSubscriptionInput.d.ts +32 -0
  24. package/dist/models/UpdateUserNewsletterSubscriptionInput.js +51 -0
  25. package/dist/models/UserNewsletterSubscriptionDto.d.ts +51 -0
  26. package/dist/models/UserNewsletterSubscriptionDto.js +64 -0
  27. package/dist/models/index.d.ts +3 -0
  28. package/dist/models/index.js +3 -0
  29. package/package.json +1 -1
  30. package/src/apis/AdminApi.ts +2 -2
  31. package/src/apis/UsersApi.ts +140 -0
  32. package/src/models/AccountSettingsDto.ts +18 -0
  33. package/src/models/AccountSettingsInput.ts +17 -0
  34. package/src/models/AdminUserNewsletterInput.ts +4 -2
  35. package/src/models/LeadDto.ts +9 -0
  36. package/src/models/ListLeadsResultItem.ts +9 -0
  37. package/src/models/ManualLeadDetails.ts +9 -0
  38. package/src/models/NewsletterSubscriptionState.ts +56 -0
  39. package/src/models/SellerLeadDetails.ts +9 -0
  40. package/src/models/UpdateUserNewsletterSubscriptionInput.ts +66 -0
  41. package/src/models/UserNewsletterSubscriptionDto.ts +103 -0
  42. package/src/models/index.ts +3 -0
@@ -115,6 +115,8 @@ function instanceOfManualLeadDetails(value) {
115
115
  return false;
116
116
  if (!('acceptedAt' in value) || value['acceptedAt'] === undefined)
117
117
  return false;
118
+ if (!('awaitingSellerFirstMessage' in value) || value['awaitingSellerFirstMessage'] === undefined)
119
+ return false;
118
120
  if (!('buyer' in value) || value['buyer'] === undefined)
119
121
  return false;
120
122
  if (!('domainLockConfiguration' in value) || value['domainLockConfiguration'] === undefined)
@@ -152,6 +154,7 @@ function ManualLeadDetailsFromJSONTyped(json, ignoreDiscriminator) {
152
154
  'leadOfferExpirationConfiguration': (0, LeadOfferExpirationConfigurationDto_1.LeadOfferExpirationConfigurationDtoFromJSON)(json['leadOfferExpirationConfiguration']),
153
155
  'canBeClosedBySeller': json['canBeClosedBySeller'],
154
156
  'acceptedAt': (json['acceptedAt'] == null ? null : new Date(json['acceptedAt'])),
157
+ 'awaitingSellerFirstMessage': json['awaitingSellerFirstMessage'],
155
158
  'buyer': (0, ManualLeadBuyerDto_1.ManualLeadBuyerDtoFromJSON)(json['buyer']),
156
159
  'domainLockConfiguration': (0, DomainLockConfigurationDto_1.DomainLockConfigurationDtoFromJSON)(json['domainLockConfiguration']),
157
160
  };
@@ -188,6 +191,7 @@ function ManualLeadDetailsToJSONTyped(value, ignoreDiscriminator) {
188
191
  'leadOfferExpirationConfiguration': (0, LeadOfferExpirationConfigurationDto_1.LeadOfferExpirationConfigurationDtoToJSON)(value['leadOfferExpirationConfiguration']),
189
192
  'canBeClosedBySeller': value['canBeClosedBySeller'],
190
193
  'acceptedAt': (value['acceptedAt'] == null ? null : value['acceptedAt'].toISOString()),
194
+ 'awaitingSellerFirstMessage': value['awaitingSellerFirstMessage'],
191
195
  'buyer': (0, ManualLeadBuyerDto_1.ManualLeadBuyerDtoToJSON)(value['buyer']),
192
196
  'domainLockConfiguration': (0, DomainLockConfigurationDto_1.DomainLockConfigurationDtoToJSON)(value['domainLockConfiguration']),
193
197
  };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Nameshift
3
+ * 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.
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
+ * subscribed: getting the newsletter (the switch is on). switched_off: switched off by the user, by "Disable all notifications" or by an admin; switching on brings them back right away. unsubscribed_by_email: unsubscribed with the link in a newsletter; switching on may send a confirmation email. pending_confirmation: a confirmation email was sent; back once the user opens its link. bounced: mail to the email bounced; a new email address is needed.
14
+ * @export
15
+ */
16
+ export declare const NewsletterSubscriptionState: {
17
+ readonly SUBSCRIBED: "subscribed";
18
+ readonly SWITCHED_OFF: "switched_off";
19
+ readonly UNSUBSCRIBED_BY_EMAIL: "unsubscribed_by_email";
20
+ readonly PENDING_CONFIRMATION: "pending_confirmation";
21
+ readonly BOUNCED: "bounced";
22
+ };
23
+ export type NewsletterSubscriptionState = typeof NewsletterSubscriptionState[keyof typeof NewsletterSubscriptionState];
24
+ export declare function instanceOfNewsletterSubscriptionState(value: any): boolean;
25
+ export declare function NewsletterSubscriptionStateFromJSON(json: any): NewsletterSubscriptionState;
26
+ export declare function NewsletterSubscriptionStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewsletterSubscriptionState;
27
+ export declare function NewsletterSubscriptionStateToJSON(value?: NewsletterSubscriptionState | null): any;
28
+ export declare function NewsletterSubscriptionStateToJSONTyped(value: any, ignoreDiscriminator: boolean): NewsletterSubscriptionState;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * 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.
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.NewsletterSubscriptionState = void 0;
17
+ exports.instanceOfNewsletterSubscriptionState = instanceOfNewsletterSubscriptionState;
18
+ exports.NewsletterSubscriptionStateFromJSON = NewsletterSubscriptionStateFromJSON;
19
+ exports.NewsletterSubscriptionStateFromJSONTyped = NewsletterSubscriptionStateFromJSONTyped;
20
+ exports.NewsletterSubscriptionStateToJSON = NewsletterSubscriptionStateToJSON;
21
+ exports.NewsletterSubscriptionStateToJSONTyped = NewsletterSubscriptionStateToJSONTyped;
22
+ /**
23
+ * subscribed: getting the newsletter (the switch is on). switched_off: switched off by the user, by "Disable all notifications" or by an admin; switching on brings them back right away. unsubscribed_by_email: unsubscribed with the link in a newsletter; switching on may send a confirmation email. pending_confirmation: a confirmation email was sent; back once the user opens its link. bounced: mail to the email bounced; a new email address is needed.
24
+ * @export
25
+ */
26
+ exports.NewsletterSubscriptionState = {
27
+ SUBSCRIBED: 'subscribed',
28
+ SWITCHED_OFF: 'switched_off',
29
+ UNSUBSCRIBED_BY_EMAIL: 'unsubscribed_by_email',
30
+ PENDING_CONFIRMATION: 'pending_confirmation',
31
+ BOUNCED: 'bounced'
32
+ };
33
+ function instanceOfNewsletterSubscriptionState(value) {
34
+ for (var key in exports.NewsletterSubscriptionState) {
35
+ if (Object.prototype.hasOwnProperty.call(exports.NewsletterSubscriptionState, key)) {
36
+ if (exports.NewsletterSubscriptionState[key] === value) {
37
+ return true;
38
+ }
39
+ }
40
+ }
41
+ return false;
42
+ }
43
+ function NewsletterSubscriptionStateFromJSON(json) {
44
+ return NewsletterSubscriptionStateFromJSONTyped(json, false);
45
+ }
46
+ function NewsletterSubscriptionStateFromJSONTyped(json, ignoreDiscriminator) {
47
+ return json;
48
+ }
49
+ function NewsletterSubscriptionStateToJSON(value) {
50
+ return value;
51
+ }
52
+ function NewsletterSubscriptionStateToJSONTyped(value, ignoreDiscriminator) {
53
+ return value;
54
+ }
@@ -161,6 +161,12 @@ export interface SellerLeadDetails {
161
161
  * @memberof SellerLeadDetails
162
162
  */
163
163
  acceptedAt: Date | null;
164
+ /**
165
+ * Whether the buyer has to wait for the seller to write first. Only an information request can wait, when the seller chose to reply first; the buyer can neither write nor make an offer until the seller has written or made an offer.
166
+ * @type {boolean}
167
+ * @memberof SellerLeadDetails
168
+ */
169
+ awaitingSellerFirstMessage: boolean;
164
170
  /**
165
171
  * Buyer details associated with the lead.
166
172
  * @type {BuyerDto}
@@ -115,6 +115,8 @@ function instanceOfSellerLeadDetails(value) {
115
115
  return false;
116
116
  if (!('acceptedAt' in value) || value['acceptedAt'] === undefined)
117
117
  return false;
118
+ if (!('awaitingSellerFirstMessage' in value) || value['awaitingSellerFirstMessage'] === undefined)
119
+ return false;
118
120
  if (!('buyer' in value) || value['buyer'] === undefined)
119
121
  return false;
120
122
  if (!('isMutedForSeller' in value) || value['isMutedForSeller'] === undefined)
@@ -154,6 +156,7 @@ function SellerLeadDetailsFromJSONTyped(json, ignoreDiscriminator) {
154
156
  'leadOfferExpirationConfiguration': (0, LeadOfferExpirationConfigurationDto_1.LeadOfferExpirationConfigurationDtoFromJSON)(json['leadOfferExpirationConfiguration']),
155
157
  'canBeClosedBySeller': json['canBeClosedBySeller'],
156
158
  'acceptedAt': (json['acceptedAt'] == null ? null : new Date(json['acceptedAt'])),
159
+ 'awaitingSellerFirstMessage': json['awaitingSellerFirstMessage'],
157
160
  'buyer': (0, BuyerDto_1.BuyerDtoFromJSON)(json['buyer']),
158
161
  'isMutedForSeller': json['isMutedForSeller'],
159
162
  'domainLockConfiguration': (0, DomainLockConfigurationDto_1.DomainLockConfigurationDtoFromJSON)(json['domainLockConfiguration']),
@@ -191,6 +194,7 @@ function SellerLeadDetailsToJSONTyped(value, ignoreDiscriminator) {
191
194
  'leadOfferExpirationConfiguration': (0, LeadOfferExpirationConfigurationDto_1.LeadOfferExpirationConfigurationDtoToJSON)(value['leadOfferExpirationConfiguration']),
192
195
  'canBeClosedBySeller': value['canBeClosedBySeller'],
193
196
  'acceptedAt': (value['acceptedAt'] == null ? null : value['acceptedAt'].toISOString()),
197
+ 'awaitingSellerFirstMessage': value['awaitingSellerFirstMessage'],
194
198
  'buyer': (0, BuyerDto_1.BuyerDtoToJSON)(value['buyer']),
195
199
  'isMutedForSeller': value['isMutedForSeller'],
196
200
  'domainLockConfiguration': (0, DomainLockConfigurationDto_1.DomainLockConfigurationDtoToJSON)(value['domainLockConfiguration']),
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Nameshift
3
+ * 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.
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 UpdateUserNewsletterSubscriptionInput
16
+ */
17
+ export interface UpdateUserNewsletterSubscriptionInput {
18
+ /**
19
+ * Whether the user wants the seller newsletter: the newsletter switch.
20
+ * @type {boolean}
21
+ * @memberof UpdateUserNewsletterSubscriptionInput
22
+ */
23
+ subscribed: boolean;
24
+ }
25
+ /**
26
+ * Check if a given object implements the UpdateUserNewsletterSubscriptionInput interface.
27
+ */
28
+ export declare function instanceOfUpdateUserNewsletterSubscriptionInput(value: object): value is UpdateUserNewsletterSubscriptionInput;
29
+ export declare function UpdateUserNewsletterSubscriptionInputFromJSON(json: any): UpdateUserNewsletterSubscriptionInput;
30
+ export declare function UpdateUserNewsletterSubscriptionInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateUserNewsletterSubscriptionInput;
31
+ export declare function UpdateUserNewsletterSubscriptionInputToJSON(json: any): UpdateUserNewsletterSubscriptionInput;
32
+ export declare function UpdateUserNewsletterSubscriptionInputToJSONTyped(value?: UpdateUserNewsletterSubscriptionInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * 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.
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.instanceOfUpdateUserNewsletterSubscriptionInput = instanceOfUpdateUserNewsletterSubscriptionInput;
17
+ exports.UpdateUserNewsletterSubscriptionInputFromJSON = UpdateUserNewsletterSubscriptionInputFromJSON;
18
+ exports.UpdateUserNewsletterSubscriptionInputFromJSONTyped = UpdateUserNewsletterSubscriptionInputFromJSONTyped;
19
+ exports.UpdateUserNewsletterSubscriptionInputToJSON = UpdateUserNewsletterSubscriptionInputToJSON;
20
+ exports.UpdateUserNewsletterSubscriptionInputToJSONTyped = UpdateUserNewsletterSubscriptionInputToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the UpdateUserNewsletterSubscriptionInput interface.
23
+ */
24
+ function instanceOfUpdateUserNewsletterSubscriptionInput(value) {
25
+ if (!('subscribed' in value) || value['subscribed'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function UpdateUserNewsletterSubscriptionInputFromJSON(json) {
30
+ return UpdateUserNewsletterSubscriptionInputFromJSONTyped(json, false);
31
+ }
32
+ function UpdateUserNewsletterSubscriptionInputFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'subscribed': json['subscribed'],
38
+ };
39
+ }
40
+ function UpdateUserNewsletterSubscriptionInputToJSON(json) {
41
+ return UpdateUserNewsletterSubscriptionInputToJSONTyped(json, false);
42
+ }
43
+ function UpdateUserNewsletterSubscriptionInputToJSONTyped(value, ignoreDiscriminator) {
44
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'subscribed': value['subscribed'],
50
+ };
51
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Nameshift
3
+ * 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.
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
+ import type { NewsletterSubscriptionState } from './NewsletterSubscriptionState';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UserNewsletterSubscriptionDto
17
+ */
18
+ export interface UserNewsletterSubscriptionDto {
19
+ /**
20
+ * subscribed: getting the newsletter (the switch is on). switched_off: switched off by the user, by "Disable all notifications" or by an admin; switching on brings them back right away. unsubscribed_by_email: unsubscribed with the link in a newsletter; switching on may send a confirmation email. pending_confirmation: a confirmation email was sent; back once the user opens its link. bounced: mail to the email bounced; a new email address is needed.
21
+ * @type {NewsletterSubscriptionState}
22
+ * @memberof UserNewsletterSubscriptionDto
23
+ */
24
+ state: NewsletterSubscriptionState;
25
+ /**
26
+ * The email address the newsletter goes to.
27
+ * @type {string}
28
+ * @memberof UserNewsletterSubscriptionDto
29
+ */
30
+ email: string;
31
+ /**
32
+ * When the confirmation email was last sent; null unless pending_confirmation.
33
+ * @type {Date}
34
+ * @memberof UserNewsletterSubscriptionDto
35
+ */
36
+ confirmationRequestedAt: Date | null;
37
+ /**
38
+ * From when the confirmation email can be sent again; null unless pending_confirmation.
39
+ * @type {Date}
40
+ * @memberof UserNewsletterSubscriptionDto
41
+ */
42
+ confirmationCanBeResentAt: Date | null;
43
+ }
44
+ /**
45
+ * Check if a given object implements the UserNewsletterSubscriptionDto interface.
46
+ */
47
+ export declare function instanceOfUserNewsletterSubscriptionDto(value: object): value is UserNewsletterSubscriptionDto;
48
+ export declare function UserNewsletterSubscriptionDtoFromJSON(json: any): UserNewsletterSubscriptionDto;
49
+ export declare function UserNewsletterSubscriptionDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserNewsletterSubscriptionDto;
50
+ export declare function UserNewsletterSubscriptionDtoToJSON(json: any): UserNewsletterSubscriptionDto;
51
+ export declare function UserNewsletterSubscriptionDtoToJSONTyped(value?: UserNewsletterSubscriptionDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * 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.
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.instanceOfUserNewsletterSubscriptionDto = instanceOfUserNewsletterSubscriptionDto;
17
+ exports.UserNewsletterSubscriptionDtoFromJSON = UserNewsletterSubscriptionDtoFromJSON;
18
+ exports.UserNewsletterSubscriptionDtoFromJSONTyped = UserNewsletterSubscriptionDtoFromJSONTyped;
19
+ exports.UserNewsletterSubscriptionDtoToJSON = UserNewsletterSubscriptionDtoToJSON;
20
+ exports.UserNewsletterSubscriptionDtoToJSONTyped = UserNewsletterSubscriptionDtoToJSONTyped;
21
+ var NewsletterSubscriptionState_1 = require("./NewsletterSubscriptionState");
22
+ /**
23
+ * Check if a given object implements the UserNewsletterSubscriptionDto interface.
24
+ */
25
+ function instanceOfUserNewsletterSubscriptionDto(value) {
26
+ if (!('state' in value) || value['state'] === undefined)
27
+ return false;
28
+ if (!('email' in value) || value['email'] === undefined)
29
+ return false;
30
+ if (!('confirmationRequestedAt' in value) || value['confirmationRequestedAt'] === undefined)
31
+ return false;
32
+ if (!('confirmationCanBeResentAt' in value) || value['confirmationCanBeResentAt'] === undefined)
33
+ return false;
34
+ return true;
35
+ }
36
+ function UserNewsletterSubscriptionDtoFromJSON(json) {
37
+ return UserNewsletterSubscriptionDtoFromJSONTyped(json, false);
38
+ }
39
+ function UserNewsletterSubscriptionDtoFromJSONTyped(json, ignoreDiscriminator) {
40
+ if (json == null) {
41
+ return json;
42
+ }
43
+ return {
44
+ 'state': (0, NewsletterSubscriptionState_1.NewsletterSubscriptionStateFromJSON)(json['state']),
45
+ 'email': json['email'],
46
+ 'confirmationRequestedAt': (json['confirmationRequestedAt'] == null ? null : new Date(json['confirmationRequestedAt'])),
47
+ 'confirmationCanBeResentAt': (json['confirmationCanBeResentAt'] == null ? null : new Date(json['confirmationCanBeResentAt'])),
48
+ };
49
+ }
50
+ function UserNewsletterSubscriptionDtoToJSON(json) {
51
+ return UserNewsletterSubscriptionDtoToJSONTyped(json, false);
52
+ }
53
+ function UserNewsletterSubscriptionDtoToJSONTyped(value, ignoreDiscriminator) {
54
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'state': (0, NewsletterSubscriptionState_1.NewsletterSubscriptionStateToJSON)(value['state']),
60
+ 'email': value['email'],
61
+ 'confirmationRequestedAt': (value['confirmationRequestedAt'] == null ? null : value['confirmationRequestedAt'].toISOString()),
62
+ 'confirmationCanBeResentAt': (value['confirmationCanBeResentAt'] == null ? null : value['confirmationCanBeResentAt'].toISOString()),
63
+ };
64
+ }
@@ -438,6 +438,7 @@ export * from './NewsletterEventInput';
438
438
  export * from './NewsletterPreviewDto';
439
439
  export * from './NewsletterSecondaryStoryDto';
440
440
  export * from './NewsletterSecondaryStoryInput';
441
+ export * from './NewsletterSubscriptionState';
441
442
  export * from './NotificationsUnsubscribeResultDto';
442
443
  export * from './ObjectId';
443
444
  export * from './OrderCompanyInfoDto';
@@ -632,11 +633,13 @@ export * from './UpdateSubscriptionDomainRecordInput';
632
633
  export * from './UpdateSubscriptionInput';
633
634
  export * from './UpdateTaskMuteStatusForBuyerInput';
634
635
  export * from './UpdateTaskMuteStatusInput';
636
+ export * from './UpdateUserNewsletterSubscriptionInput';
635
637
  export * from './UpdateUserNotificationSettingsInput';
636
638
  export * from './UserLoginAttemptDto';
637
639
  export * from './UserLoginAttemptMethod';
638
640
  export * from './UserLoginAttemptResult';
639
641
  export * from './UserLoginLocationConfirmationDetailsDto';
642
+ export * from './UserNewsletterSubscriptionDto';
640
643
  export * from './UserNotificationAttachmentDto';
641
644
  export * from './UserNotificationDto';
642
645
  export * from './UserNotificationListItemDto';
@@ -456,6 +456,7 @@ __exportStar(require("./NewsletterEventInput"), exports);
456
456
  __exportStar(require("./NewsletterPreviewDto"), exports);
457
457
  __exportStar(require("./NewsletterSecondaryStoryDto"), exports);
458
458
  __exportStar(require("./NewsletterSecondaryStoryInput"), exports);
459
+ __exportStar(require("./NewsletterSubscriptionState"), exports);
459
460
  __exportStar(require("./NotificationsUnsubscribeResultDto"), exports);
460
461
  __exportStar(require("./ObjectId"), exports);
461
462
  __exportStar(require("./OrderCompanyInfoDto"), exports);
@@ -650,11 +651,13 @@ __exportStar(require("./UpdateSubscriptionDomainRecordInput"), exports);
650
651
  __exportStar(require("./UpdateSubscriptionInput"), exports);
651
652
  __exportStar(require("./UpdateTaskMuteStatusForBuyerInput"), exports);
652
653
  __exportStar(require("./UpdateTaskMuteStatusInput"), exports);
654
+ __exportStar(require("./UpdateUserNewsletterSubscriptionInput"), exports);
653
655
  __exportStar(require("./UpdateUserNotificationSettingsInput"), exports);
654
656
  __exportStar(require("./UserLoginAttemptDto"), exports);
655
657
  __exportStar(require("./UserLoginAttemptMethod"), exports);
656
658
  __exportStar(require("./UserLoginAttemptResult"), exports);
657
659
  __exportStar(require("./UserLoginLocationConfirmationDetailsDto"), exports);
660
+ __exportStar(require("./UserNewsletterSubscriptionDto"), exports);
658
661
  __exportStar(require("./UserNotificationAttachmentDto"), exports);
659
662
  __exportStar(require("./UserNotificationDto"), exports);
660
663
  __exportStar(require("./UserNotificationListItemDto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.531",
3
+ "version": "0.0.533",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -5659,7 +5659,7 @@ export class AdminApi extends runtime.BaseAPI {
5659
5659
  }
5660
5660
 
5661
5661
  /**
5662
- * Sets whether the user gets the seller newsletter, recorded as changed by the admin. The Mailchimp audience follows on the next sync.
5662
+ * Sets whether the user gets the seller newsletter, recorded as changed by the admin. The Mailchimp audience follows right away, or with the nightly sync if that fails.
5663
5663
  * Update the seller newsletter consent of a user
5664
5664
  */
5665
5665
  async updateUserNewsletterStatusRaw(requestParameters: AdminApiUpdateUserNewsletterStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
@@ -5703,7 +5703,7 @@ export class AdminApi extends runtime.BaseAPI {
5703
5703
  }
5704
5704
 
5705
5705
  /**
5706
- * Sets whether the user gets the seller newsletter, recorded as changed by the admin. The Mailchimp audience follows on the next sync.
5706
+ * Sets whether the user gets the seller newsletter, recorded as changed by the admin. The Mailchimp audience follows right away, or with the nightly sync if that fails.
5707
5707
  * Update the seller newsletter consent of a user
5708
5708
  */
5709
5709
  async updateUserNewsletterStatus(requestParameters: AdminApiUpdateUserNewsletterStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
@@ -34,7 +34,9 @@ import type {
34
34
  StoreUserLocaleInput,
35
35
  TotpCodeInput,
36
36
  TotpEnrolmentDto,
37
+ UpdateUserNewsletterSubscriptionInput,
37
38
  UpdateUserNotificationSettingsInput,
39
+ UserNewsletterSubscriptionDto,
38
40
  UserNotificationSettingsDto,
39
41
  UserSecurityDto,
40
42
  ValidationException,
@@ -78,8 +80,12 @@ import {
78
80
  TotpCodeInputToJSON,
79
81
  TotpEnrolmentDtoFromJSON,
80
82
  TotpEnrolmentDtoToJSON,
83
+ UpdateUserNewsletterSubscriptionInputFromJSON,
84
+ UpdateUserNewsletterSubscriptionInputToJSON,
81
85
  UpdateUserNotificationSettingsInputFromJSON,
82
86
  UpdateUserNotificationSettingsInputToJSON,
87
+ UserNewsletterSubscriptionDtoFromJSON,
88
+ UserNewsletterSubscriptionDtoToJSON,
83
89
  UserNotificationSettingsDtoFromJSON,
84
90
  UserNotificationSettingsDtoToJSON,
85
91
  UserSecurityDtoFromJSON,
@@ -198,6 +204,10 @@ export interface UsersApiStartUserTotpReplacementRequest {
198
204
  totpCodeInput: TotpCodeInput;
199
205
  }
200
206
 
207
+ export interface UsersApiUpdateUserNewsletterSubscriptionRequest {
208
+ updateUserNewsletterSubscriptionInput: UpdateUserNewsletterSubscriptionInput;
209
+ }
210
+
201
211
  export interface UsersApiUpdateUserNotificationSettingsRequest {
202
212
  updateUserNotificationSettingsInput: UpdateUserNotificationSettingsInput;
203
213
  }
@@ -668,6 +678,46 @@ export class UsersApi extends runtime.BaseAPI {
668
678
  return await response.value();
669
679
  }
670
680
 
681
+ /**
682
+ * Returns the seller newsletter as the user\'s newsletter switch shows it: on, switched off, unsubscribed by email, waiting for the user to confirm by email, or bounced. **API key scope required:** `USERS_READ`. Requests authenticated with a seller session do not need any scope.
683
+ * Get the newsletter switch
684
+ */
685
+ async getUserNewsletterSubscriptionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserNewsletterSubscriptionDto>> {
686
+ const queryParameters: any = {};
687
+
688
+ const headerParameters: runtime.HTTPHeaders = {};
689
+
690
+ if (this.configuration && this.configuration.apiKey) {
691
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
692
+ }
693
+
694
+ if (this.configuration && this.configuration.accessToken) {
695
+ const token = this.configuration.accessToken;
696
+ const tokenString = await token("bearer", []);
697
+
698
+ if (tokenString) {
699
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
700
+ }
701
+ }
702
+ const response = await this.request({
703
+ path: `/private/users/newsletter`,
704
+ method: 'GET',
705
+ headers: headerParameters,
706
+ query: queryParameters,
707
+ }, initOverrides);
708
+
709
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserNewsletterSubscriptionDtoFromJSON(jsonValue));
710
+ }
711
+
712
+ /**
713
+ * Returns the seller newsletter as the user\'s newsletter switch shows it: on, switched off, unsubscribed by email, waiting for the user to confirm by email, or bounced. **API key scope required:** `USERS_READ`. Requests authenticated with a seller session do not need any scope.
714
+ * Get the newsletter switch
715
+ */
716
+ async getUserNewsletterSubscription(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserNewsletterSubscriptionDto> {
717
+ const response = await this.getUserNewsletterSubscriptionRaw(initOverrides);
718
+ return await response.value();
719
+ }
720
+
671
721
  /**
672
722
  * Returns the notification preferences configured for the seller user. **API key scope required:** `USERS_READ`. Requests authenticated with a seller session do not need any scope.
673
723
  * Get user notification settings
@@ -1371,6 +1421,46 @@ export class UsersApi extends runtime.BaseAPI {
1371
1421
  await this.requestUserEmailChangeOtpRaw(requestParameters, initOverrides);
1372
1422
  }
1373
1423
 
1424
+ /**
1425
+ * Has Mailchimp email the newsletter confirmation link again, while the switch waits for the user to confirm. Refused with NEWSLETTER_CONFIRMATION_NOT_PENDING when nothing waits, and with NEWSLETTER_CONFIRMATION_RESENT_TOO_SOON within ten minutes of the last email. **API key scope required:** `USERS_WRITE`. Requests authenticated with a seller session do not need any scope.
1426
+ * Send the newsletter confirmation email again
1427
+ */
1428
+ async resendUserNewsletterConfirmationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserNewsletterSubscriptionDto>> {
1429
+ const queryParameters: any = {};
1430
+
1431
+ const headerParameters: runtime.HTTPHeaders = {};
1432
+
1433
+ if (this.configuration && this.configuration.apiKey) {
1434
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
1435
+ }
1436
+
1437
+ if (this.configuration && this.configuration.accessToken) {
1438
+ const token = this.configuration.accessToken;
1439
+ const tokenString = await token("bearer", []);
1440
+
1441
+ if (tokenString) {
1442
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1443
+ }
1444
+ }
1445
+ const response = await this.request({
1446
+ path: `/private/users/newsletter/resend-confirmation`,
1447
+ method: 'POST',
1448
+ headers: headerParameters,
1449
+ query: queryParameters,
1450
+ }, initOverrides);
1451
+
1452
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserNewsletterSubscriptionDtoFromJSON(jsonValue));
1453
+ }
1454
+
1455
+ /**
1456
+ * Has Mailchimp email the newsletter confirmation link again, while the switch waits for the user to confirm. Refused with NEWSLETTER_CONFIRMATION_NOT_PENDING when nothing waits, and with NEWSLETTER_CONFIRMATION_RESENT_TOO_SOON within ten minutes of the last email. **API key scope required:** `USERS_WRITE`. Requests authenticated with a seller session do not need any scope.
1457
+ * Send the newsletter confirmation email again
1458
+ */
1459
+ async resendUserNewsletterConfirmation(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserNewsletterSubscriptionDto> {
1460
+ const response = await this.resendUserNewsletterConfirmationRaw(initOverrides);
1461
+ return await response.value();
1462
+ }
1463
+
1374
1464
  /**
1375
1465
  * Persists the seller user locale used for notifications and UI content. **API key scope required:** `USERS_WRITE`. Requests authenticated with a seller session do not need any scope.
1376
1466
  * Store user locale preference
@@ -1513,6 +1603,56 @@ export class UsersApi extends runtime.BaseAPI {
1513
1603
  return await response.value();
1514
1604
  }
1515
1605
 
1606
+ /**
1607
+ * Switches the seller newsletter on or off for the user. Off takes the user out of the newsletter audience. On brings them back; a user who unsubscribed with the link in a newsletter may first have to confirm with a link Mailchimp emails them, and the result says so. Refused with NEWSLETTER_EMAIL_BOUNCED while mail to the user\'s email bounces. **API key scope required:** `USERS_WRITE`. Requests authenticated with a seller session do not need any scope.
1608
+ * Switch the newsletter on or off
1609
+ */
1610
+ async updateUserNewsletterSubscriptionRaw(requestParameters: UsersApiUpdateUserNewsletterSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserNewsletterSubscriptionDto>> {
1611
+ if (requestParameters['updateUserNewsletterSubscriptionInput'] == null) {
1612
+ throw new runtime.RequiredError(
1613
+ 'updateUserNewsletterSubscriptionInput',
1614
+ 'Required parameter "updateUserNewsletterSubscriptionInput" was null or undefined when calling updateUserNewsletterSubscription().'
1615
+ );
1616
+ }
1617
+
1618
+ const queryParameters: any = {};
1619
+
1620
+ const headerParameters: runtime.HTTPHeaders = {};
1621
+
1622
+ headerParameters['Content-Type'] = 'application/json';
1623
+
1624
+ if (this.configuration && this.configuration.apiKey) {
1625
+ headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
1626
+ }
1627
+
1628
+ if (this.configuration && this.configuration.accessToken) {
1629
+ const token = this.configuration.accessToken;
1630
+ const tokenString = await token("bearer", []);
1631
+
1632
+ if (tokenString) {
1633
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1634
+ }
1635
+ }
1636
+ const response = await this.request({
1637
+ path: `/private/users/newsletter`,
1638
+ method: 'PUT',
1639
+ headers: headerParameters,
1640
+ query: queryParameters,
1641
+ body: UpdateUserNewsletterSubscriptionInputToJSON(requestParameters['updateUserNewsletterSubscriptionInput']),
1642
+ }, initOverrides);
1643
+
1644
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserNewsletterSubscriptionDtoFromJSON(jsonValue));
1645
+ }
1646
+
1647
+ /**
1648
+ * Switches the seller newsletter on or off for the user. Off takes the user out of the newsletter audience. On brings them back; a user who unsubscribed with the link in a newsletter may first have to confirm with a link Mailchimp emails them, and the result says so. Refused with NEWSLETTER_EMAIL_BOUNCED while mail to the user\'s email bounces. **API key scope required:** `USERS_WRITE`. Requests authenticated with a seller session do not need any scope.
1649
+ * Switch the newsletter on or off
1650
+ */
1651
+ async updateUserNewsletterSubscription(requestParameters: UsersApiUpdateUserNewsletterSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserNewsletterSubscriptionDto> {
1652
+ const response = await this.updateUserNewsletterSubscriptionRaw(requestParameters, initOverrides);
1653
+ return await response.value();
1654
+ }
1655
+
1516
1656
  /**
1517
1657
  * Updates one or more notification preferences for the seller user. **API key scope required:** `USERS_WRITE`. Requests authenticated with a seller session do not need any scope.
1518
1658
  * Update user notification settings