@forteplatforms/sdk 1.0.538 → 1.0.540
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/dist/generated/apis/ProjectsServerApi.d.ts +14 -0
- package/dist/generated/apis/ProjectsServerApi.js +62 -0
- package/dist/generated/models/CreateCheckoutPreviewResponse.d.ts +12 -0
- package/dist/generated/models/CreateCheckoutPreviewResponse.js +4 -0
- package/dist/generated/models/ForteApiException.d.ts +1 -0
- package/dist/generated/models/ForteApiException.js +1 -0
- package/dist/generated/models/UserObject.d.ts +4 -4
- package/dist/generated/models/UserObject.js +2 -2
- package/package.json +1 -1
|
@@ -246,6 +246,10 @@ export interface CreateCustomEmailTemplateOperationRequest {
|
|
|
246
246
|
projectId: string;
|
|
247
247
|
createCustomEmailTemplateRequest: CreateCustomEmailTemplateRequest;
|
|
248
248
|
}
|
|
249
|
+
export interface CreateGuestCheckoutPreviewRequest {
|
|
250
|
+
projectId: string;
|
|
251
|
+
createCheckoutPreviewRequest: CreateCheckoutPreviewRequest;
|
|
252
|
+
}
|
|
249
253
|
export interface CreateManagedDatabaseOperationRequest {
|
|
250
254
|
projectId: string;
|
|
251
255
|
createManagedDatabaseRequest: CreateManagedDatabaseRequest;
|
|
@@ -1301,6 +1305,16 @@ export declare class ProjectsServerApi extends runtime.BaseAPI {
|
|
|
1301
1305
|
/**
|
|
1302
1306
|
*/
|
|
1303
1307
|
createCustomEmailTemplate(requestParameters: CreateCustomEmailTemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomEmailTemplateObject>;
|
|
1308
|
+
/**
|
|
1309
|
+
* Creates request options for createGuestCheckoutPreview without sending the request
|
|
1310
|
+
*/
|
|
1311
|
+
createGuestCheckoutPreviewRequestOpts(requestParameters: CreateGuestCheckoutPreviewRequest): Promise<runtime.RequestOpts>;
|
|
1312
|
+
/**
|
|
1313
|
+
*/
|
|
1314
|
+
createGuestCheckoutPreviewRaw(requestParameters: CreateGuestCheckoutPreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateCheckoutPreviewResponse>>;
|
|
1315
|
+
/**
|
|
1316
|
+
*/
|
|
1317
|
+
createGuestCheckoutPreview(requestParameters: CreateGuestCheckoutPreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateCheckoutPreviewResponse>;
|
|
1304
1318
|
/**
|
|
1305
1319
|
* Creates request options for createManagedDatabase without sending the request
|
|
1306
1320
|
*/
|
|
@@ -1478,6 +1478,68 @@ var ProjectsServerApi = /** @class */ (function (_super) {
|
|
|
1478
1478
|
});
|
|
1479
1479
|
});
|
|
1480
1480
|
};
|
|
1481
|
+
/**
|
|
1482
|
+
* Creates request options for createGuestCheckoutPreview without sending the request
|
|
1483
|
+
*/
|
|
1484
|
+
ProjectsServerApi.prototype.createGuestCheckoutPreviewRequestOpts = function (requestParameters) {
|
|
1485
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1486
|
+
var queryParameters, headerParameters, urlPath;
|
|
1487
|
+
return __generator(this, function (_a) {
|
|
1488
|
+
if (requestParameters['projectId'] == null) {
|
|
1489
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling createGuestCheckoutPreview().');
|
|
1490
|
+
}
|
|
1491
|
+
if (requestParameters['createCheckoutPreviewRequest'] == null) {
|
|
1492
|
+
throw new runtime.RequiredError('createCheckoutPreviewRequest', 'Required parameter "createCheckoutPreviewRequest" was null or undefined when calling createGuestCheckoutPreview().');
|
|
1493
|
+
}
|
|
1494
|
+
queryParameters = {};
|
|
1495
|
+
headerParameters = {};
|
|
1496
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1497
|
+
urlPath = "/api/v1/projects/{projectId}/users/guest/checkouts/preview";
|
|
1498
|
+
urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
|
|
1499
|
+
return [2 /*return*/, {
|
|
1500
|
+
path: urlPath,
|
|
1501
|
+
method: 'POST',
|
|
1502
|
+
headers: headerParameters,
|
|
1503
|
+
query: queryParameters,
|
|
1504
|
+
body: (0, CreateCheckoutPreviewRequest_1.CreateCheckoutPreviewRequestToJSON)(requestParameters['createCheckoutPreviewRequest']),
|
|
1505
|
+
}];
|
|
1506
|
+
});
|
|
1507
|
+
});
|
|
1508
|
+
};
|
|
1509
|
+
/**
|
|
1510
|
+
*/
|
|
1511
|
+
ProjectsServerApi.prototype.createGuestCheckoutPreviewRaw = function (requestParameters, initOverrides) {
|
|
1512
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1513
|
+
var requestOptions, response;
|
|
1514
|
+
return __generator(this, function (_a) {
|
|
1515
|
+
switch (_a.label) {
|
|
1516
|
+
case 0: return [4 /*yield*/, this.createGuestCheckoutPreviewRequestOpts(requestParameters)];
|
|
1517
|
+
case 1:
|
|
1518
|
+
requestOptions = _a.sent();
|
|
1519
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
1520
|
+
case 2:
|
|
1521
|
+
response = _a.sent();
|
|
1522
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, CreateCheckoutPreviewResponse_1.CreateCheckoutPreviewResponseFromJSON)(jsonValue); })];
|
|
1523
|
+
}
|
|
1524
|
+
});
|
|
1525
|
+
});
|
|
1526
|
+
};
|
|
1527
|
+
/**
|
|
1528
|
+
*/
|
|
1529
|
+
ProjectsServerApi.prototype.createGuestCheckoutPreview = function (requestParameters, initOverrides) {
|
|
1530
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1531
|
+
var response;
|
|
1532
|
+
return __generator(this, function (_a) {
|
|
1533
|
+
switch (_a.label) {
|
|
1534
|
+
case 0: return [4 /*yield*/, this.createGuestCheckoutPreviewRaw(requestParameters, initOverrides)];
|
|
1535
|
+
case 1:
|
|
1536
|
+
response = _a.sent();
|
|
1537
|
+
return [4 /*yield*/, response.value()];
|
|
1538
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1539
|
+
}
|
|
1540
|
+
});
|
|
1541
|
+
});
|
|
1542
|
+
};
|
|
1481
1543
|
/**
|
|
1482
1544
|
* Creates request options for createManagedDatabase without sending the request
|
|
1483
1545
|
*/
|
|
@@ -60,6 +60,18 @@ export interface CreateCheckoutPreviewResponse {
|
|
|
60
60
|
* @memberof CreateCheckoutPreviewResponse
|
|
61
61
|
*/
|
|
62
62
|
subscriptions: Array<CheckoutSubscriptionPreview>;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof CreateCheckoutPreviewResponse
|
|
67
|
+
*/
|
|
68
|
+
stripePublishableKey?: string | null;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {string}
|
|
72
|
+
* @memberof CreateCheckoutPreviewResponse
|
|
73
|
+
*/
|
|
74
|
+
stripeConnectedAccountId?: string | null;
|
|
63
75
|
}
|
|
64
76
|
/**
|
|
65
77
|
* Check if a given object implements the CreateCheckoutPreviewResponse interface.
|
|
@@ -52,6 +52,8 @@ function CreateCheckoutPreviewResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
52
|
'lineItems': (json['lineItems'].map(PaymentLineItem_1.PaymentLineItemFromJSON)),
|
|
53
53
|
'customerAddress': json['customerAddress'] == null ? undefined : (0, PaymentAddress_1.PaymentAddressFromJSON)(json['customerAddress']),
|
|
54
54
|
'subscriptions': (json['subscriptions'].map(CheckoutSubscriptionPreview_1.CheckoutSubscriptionPreviewFromJSON)),
|
|
55
|
+
'stripePublishableKey': json['stripePublishableKey'] == null ? undefined : json['stripePublishableKey'],
|
|
56
|
+
'stripeConnectedAccountId': json['stripeConnectedAccountId'] == null ? undefined : json['stripeConnectedAccountId'],
|
|
55
57
|
};
|
|
56
58
|
}
|
|
57
59
|
function CreateCheckoutPreviewResponseToJSON(json) {
|
|
@@ -70,5 +72,7 @@ function CreateCheckoutPreviewResponseToJSONTyped(value, ignoreDiscriminator) {
|
|
|
70
72
|
'lineItems': (value['lineItems'].map(PaymentLineItem_1.PaymentLineItemToJSON)),
|
|
71
73
|
'customerAddress': (0, PaymentAddress_1.PaymentAddressToJSON)(value['customerAddress']),
|
|
72
74
|
'subscriptions': (value['subscriptions'].map(CheckoutSubscriptionPreview_1.CheckoutSubscriptionPreviewToJSON)),
|
|
75
|
+
'stripePublishableKey': value['stripePublishableKey'],
|
|
76
|
+
'stripeConnectedAccountId': value['stripeConnectedAccountId'],
|
|
73
77
|
};
|
|
74
78
|
}
|
|
@@ -269,6 +269,7 @@ export declare const ForteApiExceptionErrorCodeType: {
|
|
|
269
269
|
readonly CHECKOUT_REQUIRES_CARD: "CHECKOUT_REQUIRES_CARD";
|
|
270
270
|
readonly CHECKOUT_START_TIME_INVALID: "CHECKOUT_START_TIME_INVALID";
|
|
271
271
|
readonly CHECKOUT_END_TIME_INVALID: "CHECKOUT_END_TIME_INVALID";
|
|
272
|
+
readonly CHECKOUT_PREVIEW_RATE_LIMITED: "CHECKOUT_PREVIEW_RATE_LIMITED";
|
|
272
273
|
readonly SUBSCRIPTION_NOT_FOUND: "SUBSCRIPTION_NOT_FOUND";
|
|
273
274
|
readonly SUBSCRIPTION_NOT_ACTIVE: "SUBSCRIPTION_NOT_ACTIVE";
|
|
274
275
|
readonly SUBSCRIPTION_CHARGE_IN_PROGRESS: "SUBSCRIPTION_CHARGE_IN_PROGRESS";
|
|
@@ -254,6 +254,7 @@ exports.ForteApiExceptionErrorCodeType = {
|
|
|
254
254
|
CHECKOUT_REQUIRES_CARD: 'CHECKOUT_REQUIRES_CARD',
|
|
255
255
|
CHECKOUT_START_TIME_INVALID: 'CHECKOUT_START_TIME_INVALID',
|
|
256
256
|
CHECKOUT_END_TIME_INVALID: 'CHECKOUT_END_TIME_INVALID',
|
|
257
|
+
CHECKOUT_PREVIEW_RATE_LIMITED: 'CHECKOUT_PREVIEW_RATE_LIMITED',
|
|
257
258
|
SUBSCRIPTION_NOT_FOUND: 'SUBSCRIPTION_NOT_FOUND',
|
|
258
259
|
SUBSCRIPTION_NOT_ACTIVE: 'SUBSCRIPTION_NOT_ACTIVE',
|
|
259
260
|
SUBSCRIPTION_CHARGE_IN_PROGRESS: 'SUBSCRIPTION_CHARGE_IN_PROGRESS',
|
|
@@ -123,16 +123,16 @@ export interface UserObject {
|
|
|
123
123
|
backupCodesGeneratedAt?: Date | null;
|
|
124
124
|
/**
|
|
125
125
|
*
|
|
126
|
-
* @type {
|
|
126
|
+
* @type {number}
|
|
127
127
|
* @memberof UserObject
|
|
128
128
|
*/
|
|
129
|
-
|
|
129
|
+
remainingBackupCodeCount?: number;
|
|
130
130
|
/**
|
|
131
131
|
*
|
|
132
|
-
* @type {
|
|
132
|
+
* @type {boolean}
|
|
133
133
|
* @memberof UserObject
|
|
134
134
|
*/
|
|
135
|
-
|
|
135
|
+
hasPassword?: boolean;
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
138
|
* @export
|
|
@@ -72,8 +72,8 @@ function UserObjectFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
72
72
|
'passwordResetLastRequestedAt': json['passwordResetLastRequestedAt'] == null ? undefined : (new Date(json['passwordResetLastRequestedAt'])),
|
|
73
73
|
'mfaMethods': json['mfaMethods'] == null ? undefined : (json['mfaMethods'].map(MfaMethod_1.MfaMethodFromJSON)),
|
|
74
74
|
'backupCodesGeneratedAt': json['backupCodesGeneratedAt'] == null ? undefined : (new Date(json['backupCodesGeneratedAt'])),
|
|
75
|
-
'hasPassword': json['hasPassword'] == null ? undefined : json['hasPassword'],
|
|
76
75
|
'remainingBackupCodeCount': json['remainingBackupCodeCount'] == null ? undefined : json['remainingBackupCodeCount'],
|
|
76
|
+
'hasPassword': json['hasPassword'] == null ? undefined : json['hasPassword'],
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
function UserObjectToJSON(json) {
|
|
@@ -102,7 +102,7 @@ function UserObjectToJSONTyped(value, ignoreDiscriminator) {
|
|
|
102
102
|
'passwordResetLastRequestedAt': value['passwordResetLastRequestedAt'] == null ? value['passwordResetLastRequestedAt'] : value['passwordResetLastRequestedAt'].toISOString(),
|
|
103
103
|
'mfaMethods': value['mfaMethods'] == null ? undefined : (value['mfaMethods'].map(MfaMethod_1.MfaMethodToJSON)),
|
|
104
104
|
'backupCodesGeneratedAt': value['backupCodesGeneratedAt'] == null ? value['backupCodesGeneratedAt'] : value['backupCodesGeneratedAt'].toISOString(),
|
|
105
|
-
'hasPassword': value['hasPassword'],
|
|
106
105
|
'remainingBackupCodeCount': value['remainingBackupCodeCount'],
|
|
106
|
+
'hasPassword': value['hasPassword'],
|
|
107
107
|
};
|
|
108
108
|
}
|