@randock/nameshift-api-client 0.0.532 → 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.
- package/.openapi-generator/FILES +3 -0
- package/README.md +3 -3
- package/dist/apis/AdminApi.d.ts +2 -2
- package/dist/apis/AdminApi.js +2 -2
- package/dist/apis/UsersApi.d.ts +34 -1
- package/dist/apis/UsersApi.js +185 -0
- package/dist/models/AdminUserNewsletterInput.d.ts +3 -1
- package/dist/models/AdminUserNewsletterInput.js +3 -1
- package/dist/models/NewsletterSubscriptionState.d.ts +28 -0
- package/dist/models/NewsletterSubscriptionState.js +54 -0
- package/dist/models/UpdateUserNewsletterSubscriptionInput.d.ts +32 -0
- package/dist/models/UpdateUserNewsletterSubscriptionInput.js +51 -0
- package/dist/models/UserNewsletterSubscriptionDto.d.ts +51 -0
- package/dist/models/UserNewsletterSubscriptionDto.js +64 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/AdminApi.ts +2 -2
- package/src/apis/UsersApi.ts +140 -0
- package/src/models/AdminUserNewsletterInput.ts +4 -2
- package/src/models/NewsletterSubscriptionState.ts +56 -0
- package/src/models/UpdateUserNewsletterSubscriptionInput.ts +66 -0
- package/src/models/UserNewsletterSubscriptionDto.ts +103 -0
- package/src/models/index.ts +3 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -482,6 +482,7 @@ src/models/NewsletterEventInput.ts
|
|
|
482
482
|
src/models/NewsletterPreviewDto.ts
|
|
483
483
|
src/models/NewsletterSecondaryStoryDto.ts
|
|
484
484
|
src/models/NewsletterSecondaryStoryInput.ts
|
|
485
|
+
src/models/NewsletterSubscriptionState.ts
|
|
485
486
|
src/models/NotificationsUnsubscribeResultDto.ts
|
|
486
487
|
src/models/ObjectId.ts
|
|
487
488
|
src/models/OrderCompanyInfoDto.ts
|
|
@@ -676,11 +677,13 @@ src/models/UpdateSubscriptionDomainRecordInput.ts
|
|
|
676
677
|
src/models/UpdateSubscriptionInput.ts
|
|
677
678
|
src/models/UpdateTaskMuteStatusForBuyerInput.ts
|
|
678
679
|
src/models/UpdateTaskMuteStatusInput.ts
|
|
680
|
+
src/models/UpdateUserNewsletterSubscriptionInput.ts
|
|
679
681
|
src/models/UpdateUserNotificationSettingsInput.ts
|
|
680
682
|
src/models/UserLoginAttemptDto.ts
|
|
681
683
|
src/models/UserLoginAttemptMethod.ts
|
|
682
684
|
src/models/UserLoginAttemptResult.ts
|
|
683
685
|
src/models/UserLoginLocationConfirmationDetailsDto.ts
|
|
686
|
+
src/models/UserNewsletterSubscriptionDto.ts
|
|
684
687
|
src/models/UserNotificationAttachmentDto.ts
|
|
685
688
|
src/models/UserNotificationDto.ts
|
|
686
689
|
src/models/UserNotificationListItemDto.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.533
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @randock/nameshift-api-client@0.0.
|
|
39
|
+
npm install @randock/nameshift-api-client@0.0.533 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
|
|
|
44
44
|
```
|
|
45
45
|
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
46
|
```
|
|
47
|
-
|
|
47
|
+
87e2468b13db492f18d393622150bb57a4658eb3d611938ae1542906889f41a32b917ba5144da75aaf21180053dc42f0
|
package/dist/apis/AdminApi.d.ts
CHANGED
|
@@ -1484,12 +1484,12 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
1484
1484
|
*/
|
|
1485
1485
|
updateSubscriptionBuyerInformation(requestParameters: AdminApiUpdateSubscriptionBuyerInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
1486
1486
|
/**
|
|
1487
|
-
* Sets whether the user gets the seller newsletter, recorded as changed by the admin. The Mailchimp audience follows
|
|
1487
|
+
* 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.
|
|
1488
1488
|
* Update the seller newsletter consent of a user
|
|
1489
1489
|
*/
|
|
1490
1490
|
updateUserNewsletterStatusRaw(requestParameters: AdminApiUpdateUserNewsletterStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
1491
1491
|
/**
|
|
1492
|
-
* Sets whether the user gets the seller newsletter, recorded as changed by the admin. The Mailchimp audience follows
|
|
1492
|
+
* 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.
|
|
1493
1493
|
* Update the seller newsletter consent of a user
|
|
1494
1494
|
*/
|
|
1495
1495
|
updateUserNewsletterStatus(requestParameters: AdminApiUpdateUserNewsletterStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
package/dist/apis/AdminApi.js
CHANGED
|
@@ -6025,7 +6025,7 @@ var AdminApi = /** @class */ (function (_super) {
|
|
|
6025
6025
|
});
|
|
6026
6026
|
};
|
|
6027
6027
|
/**
|
|
6028
|
-
* Sets whether the user gets the seller newsletter, recorded as changed by the admin. The Mailchimp audience follows
|
|
6028
|
+
* 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.
|
|
6029
6029
|
* Update the seller newsletter consent of a user
|
|
6030
6030
|
*/
|
|
6031
6031
|
AdminApi.prototype.updateUserNewsletterStatusRaw = function (requestParameters, initOverrides) {
|
|
@@ -6067,7 +6067,7 @@ var AdminApi = /** @class */ (function (_super) {
|
|
|
6067
6067
|
});
|
|
6068
6068
|
};
|
|
6069
6069
|
/**
|
|
6070
|
-
* Sets whether the user gets the seller newsletter, recorded as changed by the admin. The Mailchimp audience follows
|
|
6070
|
+
* 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.
|
|
6071
6071
|
* Update the seller newsletter consent of a user
|
|
6072
6072
|
*/
|
|
6073
6073
|
AdminApi.prototype.updateUserNewsletterStatus = function (requestParameters, initOverrides) {
|
package/dist/apis/UsersApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ActivateUserTotpInput, ChangeUserEmailWithOtpInput, ChangeUserLoginLocationVerificationInput, ChangeUserPasswordInput, ChangeUserSignInStepsInput, CurrentPasswordInput, ListUserLoginAttempts200Response, PasskeyOptionsDto, ReauthenticateWithPasskeyInput, ReauthenticationDto, RecoveryCodesDto, RegisterUserPasskeyInput, RegisterUserPushTokenInput, RemoveUserPasskeyInput, RenameUserPasskeyInput, RequestUserEmailChangeOtpInput, StoreUserLocaleInput, TotpCodeInput, TotpEnrolmentDto, UpdateUserNotificationSettingsInput, UserNotificationSettingsDto, UserSecurityDto } from '../models/index';
|
|
13
|
+
import type { ActivateUserTotpInput, ChangeUserEmailWithOtpInput, ChangeUserLoginLocationVerificationInput, ChangeUserPasswordInput, ChangeUserSignInStepsInput, CurrentPasswordInput, ListUserLoginAttempts200Response, PasskeyOptionsDto, ReauthenticateWithPasskeyInput, ReauthenticationDto, RecoveryCodesDto, RegisterUserPasskeyInput, RegisterUserPushTokenInput, RemoveUserPasskeyInput, RenameUserPasskeyInput, RequestUserEmailChangeOtpInput, StoreUserLocaleInput, TotpCodeInput, TotpEnrolmentDto, UpdateUserNewsletterSubscriptionInput, UpdateUserNotificationSettingsInput, UserNewsletterSubscriptionDto, UserNotificationSettingsDto, UserSecurityDto } from '../models/index';
|
|
14
14
|
export interface UsersApiActivateUserTotpRequest {
|
|
15
15
|
activateUserTotpInput: ActivateUserTotpInput;
|
|
16
16
|
}
|
|
@@ -98,6 +98,9 @@ export interface UsersApiStartUserTotpEnrolmentRequest {
|
|
|
98
98
|
export interface UsersApiStartUserTotpReplacementRequest {
|
|
99
99
|
totpCodeInput: TotpCodeInput;
|
|
100
100
|
}
|
|
101
|
+
export interface UsersApiUpdateUserNewsletterSubscriptionRequest {
|
|
102
|
+
updateUserNewsletterSubscriptionInput: UpdateUserNewsletterSubscriptionInput;
|
|
103
|
+
}
|
|
101
104
|
export interface UsersApiUpdateUserNotificationSettingsRequest {
|
|
102
105
|
updateUserNotificationSettingsInput: UpdateUserNotificationSettingsInput;
|
|
103
106
|
}
|
|
@@ -201,6 +204,16 @@ export declare class UsersApi extends runtime.BaseAPI {
|
|
|
201
204
|
* Start confirming it is you with a passkey
|
|
202
205
|
*/
|
|
203
206
|
getReauthenticationPasskeyOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasskeyOptionsDto>;
|
|
207
|
+
/**
|
|
208
|
+
* 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.
|
|
209
|
+
* Get the newsletter switch
|
|
210
|
+
*/
|
|
211
|
+
getUserNewsletterSubscriptionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserNewsletterSubscriptionDto>>;
|
|
212
|
+
/**
|
|
213
|
+
* 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.
|
|
214
|
+
* Get the newsletter switch
|
|
215
|
+
*/
|
|
216
|
+
getUserNewsletterSubscription(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserNewsletterSubscriptionDto>;
|
|
204
217
|
/**
|
|
205
218
|
* 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.
|
|
206
219
|
* Get user notification settings
|
|
@@ -347,6 +360,16 @@ export declare class UsersApi extends runtime.BaseAPI {
|
|
|
347
360
|
* Request email change OTP
|
|
348
361
|
*/
|
|
349
362
|
requestUserEmailChangeOtp(requestParameters: UsersApiRequestUserEmailChangeOtpRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
363
|
+
/**
|
|
364
|
+
* 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.
|
|
365
|
+
* Send the newsletter confirmation email again
|
|
366
|
+
*/
|
|
367
|
+
resendUserNewsletterConfirmationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserNewsletterSubscriptionDto>>;
|
|
368
|
+
/**
|
|
369
|
+
* 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.
|
|
370
|
+
* Send the newsletter confirmation email again
|
|
371
|
+
*/
|
|
372
|
+
resendUserNewsletterConfirmation(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserNewsletterSubscriptionDto>;
|
|
350
373
|
/**
|
|
351
374
|
* 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.
|
|
352
375
|
* Store user locale preference
|
|
@@ -377,6 +400,16 @@ export declare class UsersApi extends runtime.BaseAPI {
|
|
|
377
400
|
* Start moving to another authenticator app
|
|
378
401
|
*/
|
|
379
402
|
startUserTotpReplacement(requestParameters: UsersApiStartUserTotpReplacementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TotpEnrolmentDto>;
|
|
403
|
+
/**
|
|
404
|
+
* 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.
|
|
405
|
+
* Switch the newsletter on or off
|
|
406
|
+
*/
|
|
407
|
+
updateUserNewsletterSubscriptionRaw(requestParameters: UsersApiUpdateUserNewsletterSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserNewsletterSubscriptionDto>>;
|
|
408
|
+
/**
|
|
409
|
+
* 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.
|
|
410
|
+
* Switch the newsletter on or off
|
|
411
|
+
*/
|
|
412
|
+
updateUserNewsletterSubscription(requestParameters: UsersApiUpdateUserNewsletterSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserNewsletterSubscriptionDto>;
|
|
380
413
|
/**
|
|
381
414
|
* 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.
|
|
382
415
|
* Update user notification settings
|
package/dist/apis/UsersApi.js
CHANGED
|
@@ -643,6 +643,66 @@ var UsersApi = /** @class */ (function (_super) {
|
|
|
643
643
|
});
|
|
644
644
|
});
|
|
645
645
|
};
|
|
646
|
+
/**
|
|
647
|
+
* 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.
|
|
648
|
+
* Get the newsletter switch
|
|
649
|
+
*/
|
|
650
|
+
UsersApi.prototype.getUserNewsletterSubscriptionRaw = function (initOverrides) {
|
|
651
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
652
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
653
|
+
return __generator(this, function (_c) {
|
|
654
|
+
switch (_c.label) {
|
|
655
|
+
case 0:
|
|
656
|
+
queryParameters = {};
|
|
657
|
+
headerParameters = {};
|
|
658
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
659
|
+
_a = headerParameters;
|
|
660
|
+
_b = "apikey";
|
|
661
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
662
|
+
case 1:
|
|
663
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
664
|
+
_c.label = 2;
|
|
665
|
+
case 2:
|
|
666
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
667
|
+
token = this.configuration.accessToken;
|
|
668
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
669
|
+
case 3:
|
|
670
|
+
tokenString = _c.sent();
|
|
671
|
+
if (tokenString) {
|
|
672
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
673
|
+
}
|
|
674
|
+
_c.label = 4;
|
|
675
|
+
case 4: return [4 /*yield*/, this.request({
|
|
676
|
+
path: "/private/users/newsletter",
|
|
677
|
+
method: 'GET',
|
|
678
|
+
headers: headerParameters,
|
|
679
|
+
query: queryParameters,
|
|
680
|
+
}, initOverrides)];
|
|
681
|
+
case 5:
|
|
682
|
+
response = _c.sent();
|
|
683
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.UserNewsletterSubscriptionDtoFromJSON)(jsonValue); })];
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
});
|
|
687
|
+
};
|
|
688
|
+
/**
|
|
689
|
+
* 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.
|
|
690
|
+
* Get the newsletter switch
|
|
691
|
+
*/
|
|
692
|
+
UsersApi.prototype.getUserNewsletterSubscription = function (initOverrides) {
|
|
693
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
694
|
+
var response;
|
|
695
|
+
return __generator(this, function (_a) {
|
|
696
|
+
switch (_a.label) {
|
|
697
|
+
case 0: return [4 /*yield*/, this.getUserNewsletterSubscriptionRaw(initOverrides)];
|
|
698
|
+
case 1:
|
|
699
|
+
response = _a.sent();
|
|
700
|
+
return [4 /*yield*/, response.value()];
|
|
701
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
});
|
|
705
|
+
};
|
|
646
706
|
/**
|
|
647
707
|
* 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.
|
|
648
708
|
* Get user notification settings
|
|
@@ -1512,6 +1572,66 @@ var UsersApi = /** @class */ (function (_super) {
|
|
|
1512
1572
|
});
|
|
1513
1573
|
});
|
|
1514
1574
|
};
|
|
1575
|
+
/**
|
|
1576
|
+
* 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.
|
|
1577
|
+
* Send the newsletter confirmation email again
|
|
1578
|
+
*/
|
|
1579
|
+
UsersApi.prototype.resendUserNewsletterConfirmationRaw = function (initOverrides) {
|
|
1580
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1581
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
1582
|
+
return __generator(this, function (_c) {
|
|
1583
|
+
switch (_c.label) {
|
|
1584
|
+
case 0:
|
|
1585
|
+
queryParameters = {};
|
|
1586
|
+
headerParameters = {};
|
|
1587
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1588
|
+
_a = headerParameters;
|
|
1589
|
+
_b = "apikey";
|
|
1590
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1591
|
+
case 1:
|
|
1592
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1593
|
+
_c.label = 2;
|
|
1594
|
+
case 2:
|
|
1595
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
1596
|
+
token = this.configuration.accessToken;
|
|
1597
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
1598
|
+
case 3:
|
|
1599
|
+
tokenString = _c.sent();
|
|
1600
|
+
if (tokenString) {
|
|
1601
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1602
|
+
}
|
|
1603
|
+
_c.label = 4;
|
|
1604
|
+
case 4: return [4 /*yield*/, this.request({
|
|
1605
|
+
path: "/private/users/newsletter/resend-confirmation",
|
|
1606
|
+
method: 'POST',
|
|
1607
|
+
headers: headerParameters,
|
|
1608
|
+
query: queryParameters,
|
|
1609
|
+
}, initOverrides)];
|
|
1610
|
+
case 5:
|
|
1611
|
+
response = _c.sent();
|
|
1612
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.UserNewsletterSubscriptionDtoFromJSON)(jsonValue); })];
|
|
1613
|
+
}
|
|
1614
|
+
});
|
|
1615
|
+
});
|
|
1616
|
+
};
|
|
1617
|
+
/**
|
|
1618
|
+
* 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.
|
|
1619
|
+
* Send the newsletter confirmation email again
|
|
1620
|
+
*/
|
|
1621
|
+
UsersApi.prototype.resendUserNewsletterConfirmation = function (initOverrides) {
|
|
1622
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1623
|
+
var response;
|
|
1624
|
+
return __generator(this, function (_a) {
|
|
1625
|
+
switch (_a.label) {
|
|
1626
|
+
case 0: return [4 /*yield*/, this.resendUserNewsletterConfirmationRaw(initOverrides)];
|
|
1627
|
+
case 1:
|
|
1628
|
+
response = _a.sent();
|
|
1629
|
+
return [4 /*yield*/, response.value()];
|
|
1630
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1631
|
+
}
|
|
1632
|
+
});
|
|
1633
|
+
});
|
|
1634
|
+
};
|
|
1515
1635
|
/**
|
|
1516
1636
|
* 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.
|
|
1517
1637
|
* Store user locale preference
|
|
@@ -1690,6 +1810,71 @@ var UsersApi = /** @class */ (function (_super) {
|
|
|
1690
1810
|
});
|
|
1691
1811
|
});
|
|
1692
1812
|
};
|
|
1813
|
+
/**
|
|
1814
|
+
* 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.
|
|
1815
|
+
* Switch the newsletter on or off
|
|
1816
|
+
*/
|
|
1817
|
+
UsersApi.prototype.updateUserNewsletterSubscriptionRaw = function (requestParameters, initOverrides) {
|
|
1818
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1819
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
1820
|
+
return __generator(this, function (_c) {
|
|
1821
|
+
switch (_c.label) {
|
|
1822
|
+
case 0:
|
|
1823
|
+
if (requestParameters['updateUserNewsletterSubscriptionInput'] == null) {
|
|
1824
|
+
throw new runtime.RequiredError('updateUserNewsletterSubscriptionInput', 'Required parameter "updateUserNewsletterSubscriptionInput" was null or undefined when calling updateUserNewsletterSubscription().');
|
|
1825
|
+
}
|
|
1826
|
+
queryParameters = {};
|
|
1827
|
+
headerParameters = {};
|
|
1828
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1829
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1830
|
+
_a = headerParameters;
|
|
1831
|
+
_b = "apikey";
|
|
1832
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1833
|
+
case 1:
|
|
1834
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1835
|
+
_c.label = 2;
|
|
1836
|
+
case 2:
|
|
1837
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
1838
|
+
token = this.configuration.accessToken;
|
|
1839
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
1840
|
+
case 3:
|
|
1841
|
+
tokenString = _c.sent();
|
|
1842
|
+
if (tokenString) {
|
|
1843
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1844
|
+
}
|
|
1845
|
+
_c.label = 4;
|
|
1846
|
+
case 4: return [4 /*yield*/, this.request({
|
|
1847
|
+
path: "/private/users/newsletter",
|
|
1848
|
+
method: 'PUT',
|
|
1849
|
+
headers: headerParameters,
|
|
1850
|
+
query: queryParameters,
|
|
1851
|
+
body: (0, index_1.UpdateUserNewsletterSubscriptionInputToJSON)(requestParameters['updateUserNewsletterSubscriptionInput']),
|
|
1852
|
+
}, initOverrides)];
|
|
1853
|
+
case 5:
|
|
1854
|
+
response = _c.sent();
|
|
1855
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.UserNewsletterSubscriptionDtoFromJSON)(jsonValue); })];
|
|
1856
|
+
}
|
|
1857
|
+
});
|
|
1858
|
+
});
|
|
1859
|
+
};
|
|
1860
|
+
/**
|
|
1861
|
+
* 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.
|
|
1862
|
+
* Switch the newsletter on or off
|
|
1863
|
+
*/
|
|
1864
|
+
UsersApi.prototype.updateUserNewsletterSubscription = function (requestParameters, initOverrides) {
|
|
1865
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1866
|
+
var response;
|
|
1867
|
+
return __generator(this, function (_a) {
|
|
1868
|
+
switch (_a.label) {
|
|
1869
|
+
case 0: return [4 /*yield*/, this.updateUserNewsletterSubscriptionRaw(requestParameters, initOverrides)];
|
|
1870
|
+
case 1:
|
|
1871
|
+
response = _a.sent();
|
|
1872
|
+
return [4 /*yield*/, response.value()];
|
|
1873
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1874
|
+
}
|
|
1875
|
+
});
|
|
1876
|
+
});
|
|
1877
|
+
};
|
|
1693
1878
|
/**
|
|
1694
1879
|
* 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.
|
|
1695
1880
|
* Update user notification settings
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface AdminUserNewsletterInput {
|
|
18
18
|
/**
|
|
19
|
-
* Seller newsletter consent of the user. An admin change is recorded as such; it never overrides an unsubscribe the user made in Mailchimp, which the audience sync keeps.
|
|
19
|
+
* Seller newsletter consent of the user: subscribed, unsubscribed or never_asked; pending and bounced follow from Mailchimp and are refused. An admin change is recorded as such; it never overrides an unsubscribe the user made in Mailchimp, which the audience sync keeps.
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof AdminUserNewsletterInput
|
|
22
22
|
*/
|
|
@@ -29,6 +29,8 @@ export declare const AdminUserNewsletterInputNewsletterStatusEnum: {
|
|
|
29
29
|
readonly SUBSCRIBED: "subscribed";
|
|
30
30
|
readonly UNSUBSCRIBED: "unsubscribed";
|
|
31
31
|
readonly NEVER_ASKED: "never_asked";
|
|
32
|
+
readonly PENDING: "pending";
|
|
33
|
+
readonly BOUNCED: "bounced";
|
|
32
34
|
};
|
|
33
35
|
export type AdminUserNewsletterInputNewsletterStatusEnum = typeof AdminUserNewsletterInputNewsletterStatusEnum[keyof typeof AdminUserNewsletterInputNewsletterStatusEnum];
|
|
34
36
|
/**
|
|
@@ -25,7 +25,9 @@ exports.AdminUserNewsletterInputToJSONTyped = AdminUserNewsletterInputToJSONType
|
|
|
25
25
|
exports.AdminUserNewsletterInputNewsletterStatusEnum = {
|
|
26
26
|
SUBSCRIBED: 'subscribed',
|
|
27
27
|
UNSUBSCRIBED: 'unsubscribed',
|
|
28
|
-
NEVER_ASKED: 'never_asked'
|
|
28
|
+
NEVER_ASKED: 'never_asked',
|
|
29
|
+
PENDING: 'pending',
|
|
30
|
+
BOUNCED: 'bounced'
|
|
29
31
|
};
|
|
30
32
|
/**
|
|
31
33
|
* Check if a given object implements the AdminUserNewsletterInput interface.
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/models/index.js
CHANGED
|
@@ -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
package/src/apis/AdminApi.ts
CHANGED
|
@@ -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
|
|
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
|
|
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> {
|
package/src/apis/UsersApi.ts
CHANGED
|
@@ -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
|
|
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface AdminUserNewsletterInput {
|
|
22
22
|
/**
|
|
23
|
-
* Seller newsletter consent of the user. An admin change is recorded as such; it never overrides an unsubscribe the user made in Mailchimp, which the audience sync keeps.
|
|
23
|
+
* Seller newsletter consent of the user: subscribed, unsubscribed or never_asked; pending and bounced follow from Mailchimp and are refused. An admin change is recorded as such; it never overrides an unsubscribe the user made in Mailchimp, which the audience sync keeps.
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof AdminUserNewsletterInput
|
|
26
26
|
*/
|
|
@@ -34,7 +34,9 @@ export interface AdminUserNewsletterInput {
|
|
|
34
34
|
export const AdminUserNewsletterInputNewsletterStatusEnum = {
|
|
35
35
|
SUBSCRIBED: 'subscribed',
|
|
36
36
|
UNSUBSCRIBED: 'unsubscribed',
|
|
37
|
-
NEVER_ASKED: 'never_asked'
|
|
37
|
+
NEVER_ASKED: 'never_asked',
|
|
38
|
+
PENDING: 'pending',
|
|
39
|
+
BOUNCED: 'bounced'
|
|
38
40
|
} as const;
|
|
39
41
|
export type AdminUserNewsletterInputNewsletterStatusEnum = typeof AdminUserNewsletterInputNewsletterStatusEnum[keyof typeof AdminUserNewsletterInputNewsletterStatusEnum];
|
|
40
42
|
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 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.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const NewsletterSubscriptionState = {
|
|
21
|
+
SUBSCRIBED: 'subscribed',
|
|
22
|
+
SWITCHED_OFF: 'switched_off',
|
|
23
|
+
UNSUBSCRIBED_BY_EMAIL: 'unsubscribed_by_email',
|
|
24
|
+
PENDING_CONFIRMATION: 'pending_confirmation',
|
|
25
|
+
BOUNCED: 'bounced'
|
|
26
|
+
} as const;
|
|
27
|
+
export type NewsletterSubscriptionState = typeof NewsletterSubscriptionState[keyof typeof NewsletterSubscriptionState];
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export function instanceOfNewsletterSubscriptionState(value: any): boolean {
|
|
31
|
+
for (const key in NewsletterSubscriptionState) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(NewsletterSubscriptionState, key)) {
|
|
33
|
+
if (NewsletterSubscriptionState[key as keyof typeof NewsletterSubscriptionState] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function NewsletterSubscriptionStateFromJSON(json: any): NewsletterSubscriptionState {
|
|
42
|
+
return NewsletterSubscriptionStateFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function NewsletterSubscriptionStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewsletterSubscriptionState {
|
|
46
|
+
return json as NewsletterSubscriptionState;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function NewsletterSubscriptionStateToJSON(value?: NewsletterSubscriptionState | null): any {
|
|
50
|
+
return value as any;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function NewsletterSubscriptionStateToJSONTyped(value: any, ignoreDiscriminator: boolean): NewsletterSubscriptionState {
|
|
54
|
+
return value as NewsletterSubscriptionState;
|
|
55
|
+
}
|
|
56
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
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 UpdateUserNewsletterSubscriptionInput
|
|
20
|
+
*/
|
|
21
|
+
export interface UpdateUserNewsletterSubscriptionInput {
|
|
22
|
+
/**
|
|
23
|
+
* Whether the user wants the seller newsletter: the newsletter switch.
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof UpdateUserNewsletterSubscriptionInput
|
|
26
|
+
*/
|
|
27
|
+
subscribed: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the UpdateUserNewsletterSubscriptionInput interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfUpdateUserNewsletterSubscriptionInput(value: object): value is UpdateUserNewsletterSubscriptionInput {
|
|
34
|
+
if (!('subscribed' in value) || value['subscribed'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function UpdateUserNewsletterSubscriptionInputFromJSON(json: any): UpdateUserNewsletterSubscriptionInput {
|
|
39
|
+
return UpdateUserNewsletterSubscriptionInputFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function UpdateUserNewsletterSubscriptionInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateUserNewsletterSubscriptionInput {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'subscribed': json['subscribed'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function UpdateUserNewsletterSubscriptionInputToJSON(json: any): UpdateUserNewsletterSubscriptionInput {
|
|
53
|
+
return UpdateUserNewsletterSubscriptionInputToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function UpdateUserNewsletterSubscriptionInputToJSONTyped(value?: UpdateUserNewsletterSubscriptionInput | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'subscribed': value['subscribed'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
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 { NewsletterSubscriptionState } from './NewsletterSubscriptionState';
|
|
17
|
+
import {
|
|
18
|
+
NewsletterSubscriptionStateFromJSON,
|
|
19
|
+
NewsletterSubscriptionStateFromJSONTyped,
|
|
20
|
+
NewsletterSubscriptionStateToJSON,
|
|
21
|
+
NewsletterSubscriptionStateToJSONTyped,
|
|
22
|
+
} from './NewsletterSubscriptionState';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UserNewsletterSubscriptionDto
|
|
28
|
+
*/
|
|
29
|
+
export interface UserNewsletterSubscriptionDto {
|
|
30
|
+
/**
|
|
31
|
+
* 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.
|
|
32
|
+
* @type {NewsletterSubscriptionState}
|
|
33
|
+
* @memberof UserNewsletterSubscriptionDto
|
|
34
|
+
*/
|
|
35
|
+
state: NewsletterSubscriptionState;
|
|
36
|
+
/**
|
|
37
|
+
* The email address the newsletter goes to.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UserNewsletterSubscriptionDto
|
|
40
|
+
*/
|
|
41
|
+
email: string;
|
|
42
|
+
/**
|
|
43
|
+
* When the confirmation email was last sent; null unless pending_confirmation.
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof UserNewsletterSubscriptionDto
|
|
46
|
+
*/
|
|
47
|
+
confirmationRequestedAt: Date | null;
|
|
48
|
+
/**
|
|
49
|
+
* From when the confirmation email can be sent again; null unless pending_confirmation.
|
|
50
|
+
* @type {Date}
|
|
51
|
+
* @memberof UserNewsletterSubscriptionDto
|
|
52
|
+
*/
|
|
53
|
+
confirmationCanBeResentAt: Date | null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the UserNewsletterSubscriptionDto interface.
|
|
60
|
+
*/
|
|
61
|
+
export function instanceOfUserNewsletterSubscriptionDto(value: object): value is UserNewsletterSubscriptionDto {
|
|
62
|
+
if (!('state' in value) || value['state'] === undefined) return false;
|
|
63
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
64
|
+
if (!('confirmationRequestedAt' in value) || value['confirmationRequestedAt'] === undefined) return false;
|
|
65
|
+
if (!('confirmationCanBeResentAt' in value) || value['confirmationCanBeResentAt'] === undefined) return false;
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function UserNewsletterSubscriptionDtoFromJSON(json: any): UserNewsletterSubscriptionDto {
|
|
70
|
+
return UserNewsletterSubscriptionDtoFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function UserNewsletterSubscriptionDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserNewsletterSubscriptionDto {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'state': NewsletterSubscriptionStateFromJSON(json['state']),
|
|
80
|
+
'email': json['email'],
|
|
81
|
+
'confirmationRequestedAt': (json['confirmationRequestedAt'] == null ? null : new Date(json['confirmationRequestedAt'])),
|
|
82
|
+
'confirmationCanBeResentAt': (json['confirmationCanBeResentAt'] == null ? null : new Date(json['confirmationCanBeResentAt'])),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function UserNewsletterSubscriptionDtoToJSON(json: any): UserNewsletterSubscriptionDto {
|
|
87
|
+
return UserNewsletterSubscriptionDtoToJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function UserNewsletterSubscriptionDtoToJSONTyped(value?: UserNewsletterSubscriptionDto | null, ignoreDiscriminator: boolean = false): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'state': NewsletterSubscriptionStateToJSON(value['state']),
|
|
98
|
+
'email': value['email'],
|
|
99
|
+
'confirmationRequestedAt': (value['confirmationRequestedAt'] == null ? null : (value['confirmationRequestedAt'] as any).toISOString()),
|
|
100
|
+
'confirmationCanBeResentAt': (value['confirmationCanBeResentAt'] == null ? null : (value['confirmationCanBeResentAt'] as any).toISOString()),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -440,6 +440,7 @@ export * from './NewsletterEventInput';
|
|
|
440
440
|
export * from './NewsletterPreviewDto';
|
|
441
441
|
export * from './NewsletterSecondaryStoryDto';
|
|
442
442
|
export * from './NewsletterSecondaryStoryInput';
|
|
443
|
+
export * from './NewsletterSubscriptionState';
|
|
443
444
|
export * from './NotificationsUnsubscribeResultDto';
|
|
444
445
|
export * from './ObjectId';
|
|
445
446
|
export * from './OrderCompanyInfoDto';
|
|
@@ -634,11 +635,13 @@ export * from './UpdateSubscriptionDomainRecordInput';
|
|
|
634
635
|
export * from './UpdateSubscriptionInput';
|
|
635
636
|
export * from './UpdateTaskMuteStatusForBuyerInput';
|
|
636
637
|
export * from './UpdateTaskMuteStatusInput';
|
|
638
|
+
export * from './UpdateUserNewsletterSubscriptionInput';
|
|
637
639
|
export * from './UpdateUserNotificationSettingsInput';
|
|
638
640
|
export * from './UserLoginAttemptDto';
|
|
639
641
|
export * from './UserLoginAttemptMethod';
|
|
640
642
|
export * from './UserLoginAttemptResult';
|
|
641
643
|
export * from './UserLoginLocationConfirmationDetailsDto';
|
|
644
|
+
export * from './UserNewsletterSubscriptionDto';
|
|
642
645
|
export * from './UserNotificationAttachmentDto';
|
|
643
646
|
export * from './UserNotificationDto';
|
|
644
647
|
export * from './UserNotificationListItemDto';
|