@forteplatforms/sdk 1.0.261 → 1.0.262

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.
@@ -478,6 +478,10 @@ export interface ListWebAppLogLinesRequest {
478
478
  export interface ListWebAppsRequest {
479
479
  projectId: string;
480
480
  }
481
+ export interface PauseServiceRequest {
482
+ projectId: string;
483
+ serviceId: string;
484
+ }
481
485
  export interface PreviewUserSubscriptionUpdateRequest {
482
486
  projectId: string;
483
487
  userId: string;
@@ -590,6 +594,10 @@ export interface RefundPaymentRequest {
590
594
  paymentId: string;
591
595
  keepSubscriptionActive?: boolean;
592
596
  }
597
+ export interface ResumeServiceRequest {
598
+ projectId: string;
599
+ serviceId: string;
600
+ }
593
601
  export interface RevokeAllUserSessionsRequest {
594
602
  projectId: string;
595
603
  userId: string;
@@ -1429,6 +1437,16 @@ export declare class ProjectsServerApi extends runtime.BaseAPI {
1429
1437
  /**
1430
1438
  */
1431
1439
  listWebApps(requestParameters: ListWebAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<WebAppObject>>;
1440
+ /**
1441
+ * Creates request options for pauseService without sending the request
1442
+ */
1443
+ pauseServiceRequestOpts(requestParameters: PauseServiceRequest): Promise<runtime.RequestOpts>;
1444
+ /**
1445
+ */
1446
+ pauseServiceRaw(requestParameters: PauseServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServiceObject>>;
1447
+ /**
1448
+ */
1449
+ pauseService(requestParameters: PauseServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServiceObject>;
1432
1450
  /**
1433
1451
  * Creates request options for previewUserSubscriptionUpdate without sending the request
1434
1452
  */
@@ -1639,6 +1657,16 @@ export declare class ProjectsServerApi extends runtime.BaseAPI {
1639
1657
  /**
1640
1658
  */
1641
1659
  refundPayment(requestParameters: RefundPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaymentObject>;
1660
+ /**
1661
+ * Creates request options for resumeService without sending the request
1662
+ */
1663
+ resumeServiceRequestOpts(requestParameters: ResumeServiceRequest): Promise<runtime.RequestOpts>;
1664
+ /**
1665
+ */
1666
+ resumeServiceRaw(requestParameters: ResumeServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServiceObject>>;
1667
+ /**
1668
+ */
1669
+ resumeService(requestParameters: ResumeServiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServiceObject>;
1642
1670
  /**
1643
1671
  * Creates request options for revokeAllUserSessions without sending the request
1644
1672
  */
@@ -4951,6 +4951,67 @@ var ProjectsServerApi = /** @class */ (function (_super) {
4951
4951
  });
4952
4952
  });
4953
4953
  };
4954
+ /**
4955
+ * Creates request options for pauseService without sending the request
4956
+ */
4957
+ ProjectsServerApi.prototype.pauseServiceRequestOpts = function (requestParameters) {
4958
+ return __awaiter(this, void 0, void 0, function () {
4959
+ var queryParameters, headerParameters, urlPath;
4960
+ return __generator(this, function (_a) {
4961
+ if (requestParameters['projectId'] == null) {
4962
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling pauseService().');
4963
+ }
4964
+ if (requestParameters['serviceId'] == null) {
4965
+ throw new runtime.RequiredError('serviceId', 'Required parameter "serviceId" was null or undefined when calling pauseService().');
4966
+ }
4967
+ queryParameters = {};
4968
+ headerParameters = {};
4969
+ urlPath = "/api/v1/projects/{projectId}/services/{serviceId}/pause";
4970
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
4971
+ urlPath = urlPath.replace('{serviceId}', encodeURIComponent(String(requestParameters['serviceId'])));
4972
+ return [2 /*return*/, {
4973
+ path: urlPath,
4974
+ method: 'POST',
4975
+ headers: headerParameters,
4976
+ query: queryParameters,
4977
+ }];
4978
+ });
4979
+ });
4980
+ };
4981
+ /**
4982
+ */
4983
+ ProjectsServerApi.prototype.pauseServiceRaw = function (requestParameters, initOverrides) {
4984
+ return __awaiter(this, void 0, void 0, function () {
4985
+ var requestOptions, response;
4986
+ return __generator(this, function (_a) {
4987
+ switch (_a.label) {
4988
+ case 0: return [4 /*yield*/, this.pauseServiceRequestOpts(requestParameters)];
4989
+ case 1:
4990
+ requestOptions = _a.sent();
4991
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
4992
+ case 2:
4993
+ response = _a.sent();
4994
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, ServiceObject_1.ServiceObjectFromJSON)(jsonValue); })];
4995
+ }
4996
+ });
4997
+ });
4998
+ };
4999
+ /**
5000
+ */
5001
+ ProjectsServerApi.prototype.pauseService = function (requestParameters, initOverrides) {
5002
+ return __awaiter(this, void 0, void 0, function () {
5003
+ var response;
5004
+ return __generator(this, function (_a) {
5005
+ switch (_a.label) {
5006
+ case 0: return [4 /*yield*/, this.pauseServiceRaw(requestParameters, initOverrides)];
5007
+ case 1:
5008
+ response = _a.sent();
5009
+ return [4 /*yield*/, response.value()];
5010
+ case 2: return [2 /*return*/, _a.sent()];
5011
+ }
5012
+ });
5013
+ });
5014
+ };
4954
5015
  /**
4955
5016
  * Creates request options for previewUserSubscriptionUpdate without sending the request
4956
5017
  */
@@ -6340,6 +6401,67 @@ var ProjectsServerApi = /** @class */ (function (_super) {
6340
6401
  });
6341
6402
  });
6342
6403
  };
6404
+ /**
6405
+ * Creates request options for resumeService without sending the request
6406
+ */
6407
+ ProjectsServerApi.prototype.resumeServiceRequestOpts = function (requestParameters) {
6408
+ return __awaiter(this, void 0, void 0, function () {
6409
+ var queryParameters, headerParameters, urlPath;
6410
+ return __generator(this, function (_a) {
6411
+ if (requestParameters['projectId'] == null) {
6412
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling resumeService().');
6413
+ }
6414
+ if (requestParameters['serviceId'] == null) {
6415
+ throw new runtime.RequiredError('serviceId', 'Required parameter "serviceId" was null or undefined when calling resumeService().');
6416
+ }
6417
+ queryParameters = {};
6418
+ headerParameters = {};
6419
+ urlPath = "/api/v1/projects/{projectId}/services/{serviceId}/resume";
6420
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
6421
+ urlPath = urlPath.replace('{serviceId}', encodeURIComponent(String(requestParameters['serviceId'])));
6422
+ return [2 /*return*/, {
6423
+ path: urlPath,
6424
+ method: 'POST',
6425
+ headers: headerParameters,
6426
+ query: queryParameters,
6427
+ }];
6428
+ });
6429
+ });
6430
+ };
6431
+ /**
6432
+ */
6433
+ ProjectsServerApi.prototype.resumeServiceRaw = function (requestParameters, initOverrides) {
6434
+ return __awaiter(this, void 0, void 0, function () {
6435
+ var requestOptions, response;
6436
+ return __generator(this, function (_a) {
6437
+ switch (_a.label) {
6438
+ case 0: return [4 /*yield*/, this.resumeServiceRequestOpts(requestParameters)];
6439
+ case 1:
6440
+ requestOptions = _a.sent();
6441
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
6442
+ case 2:
6443
+ response = _a.sent();
6444
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, ServiceObject_1.ServiceObjectFromJSON)(jsonValue); })];
6445
+ }
6446
+ });
6447
+ });
6448
+ };
6449
+ /**
6450
+ */
6451
+ ProjectsServerApi.prototype.resumeService = function (requestParameters, initOverrides) {
6452
+ return __awaiter(this, void 0, void 0, function () {
6453
+ var response;
6454
+ return __generator(this, function (_a) {
6455
+ switch (_a.label) {
6456
+ case 0: return [4 /*yield*/, this.resumeServiceRaw(requestParameters, initOverrides)];
6457
+ case 1:
6458
+ response = _a.sent();
6459
+ return [4 /*yield*/, response.value()];
6460
+ case 2: return [2 /*return*/, _a.sent()];
6461
+ }
6462
+ });
6463
+ });
6464
+ };
6343
6465
  /**
6344
6466
  * Creates request options for revokeAllUserSessions without sending the request
6345
6467
  */
@@ -45,6 +45,8 @@ export declare const ForteApiExceptionErrorCodeType: {
45
45
  readonly CSRF_TOKEN_MISMATCH: "CSRF_TOKEN_MISMATCH";
46
46
  readonly RECAPTCHA_VALIDATION_FAILED: "RECAPTCHA_VALIDATION_FAILED";
47
47
  readonly SERVICE_NAME_TAKEN_IN_PROJECT: "SERVICE_NAME_TAKEN_IN_PROJECT";
48
+ readonly SERVICE_PAUSED: "SERVICE_PAUSED";
49
+ readonly SERVICE_NOT_PAUSED: "SERVICE_NOT_PAUSED";
48
50
  readonly WEB_APP_NAME_TAKEN_IN_PROJECT: "WEB_APP_NAME_TAKEN_IN_PROJECT";
49
51
  readonly WEB_APP_QUOTA_EXCEEDED: "WEB_APP_QUOTA_EXCEEDED";
50
52
  readonly WEB_APP_NOT_FOUND: "WEB_APP_NOT_FOUND";
@@ -30,6 +30,8 @@ exports.ForteApiExceptionErrorCodeType = {
30
30
  CSRF_TOKEN_MISMATCH: 'CSRF_TOKEN_MISMATCH',
31
31
  RECAPTCHA_VALIDATION_FAILED: 'RECAPTCHA_VALIDATION_FAILED',
32
32
  SERVICE_NAME_TAKEN_IN_PROJECT: 'SERVICE_NAME_TAKEN_IN_PROJECT',
33
+ SERVICE_PAUSED: 'SERVICE_PAUSED',
34
+ SERVICE_NOT_PAUSED: 'SERVICE_NOT_PAUSED',
33
35
  WEB_APP_NAME_TAKEN_IN_PROJECT: 'WEB_APP_NAME_TAKEN_IN_PROJECT',
34
36
  WEB_APP_QUOTA_EXCEEDED: 'WEB_APP_QUOTA_EXCEEDED',
35
37
  WEB_APP_NOT_FOUND: 'WEB_APP_NOT_FOUND',
@@ -37,6 +37,12 @@ export interface ServiceObject {
37
37
  * @memberof ServiceObject
38
38
  */
39
39
  publicDnsEndpoint?: string;
40
+ /**
41
+ *
42
+ * @type {Date}
43
+ * @memberof ServiceObject
44
+ */
45
+ pausedAt?: Date;
40
46
  /**
41
47
  *
42
48
  * @type {boolean}
@@ -57,6 +57,7 @@ function ServiceObjectFromJSONTyped(json, ignoreDiscriminator) {
57
57
  'serviceId': json['serviceId'] == null ? undefined : json['serviceId'],
58
58
  'serviceName': json['serviceName'],
59
59
  'publicDnsEndpoint': json['publicDnsEndpoint'] == null ? undefined : json['publicDnsEndpoint'],
60
+ 'pausedAt': json['pausedAt'] == null ? undefined : (new Date(json['pausedAt'])),
60
61
  'requestResponseBodyLoggingEnabled': json['requestResponseBodyLoggingEnabled'] == null ? undefined : json['requestResponseBodyLoggingEnabled'],
61
62
  'dockerfilePath': json['dockerfilePath'] == null ? undefined : json['dockerfilePath'],
62
63
  'healthCheckConfiguration': json['healthCheckConfiguration'] == null ? undefined : (0, HealthCheckDetectionOutput_1.HealthCheckDetectionOutputFromJSON)(json['healthCheckConfiguration']),
@@ -90,6 +91,7 @@ function ServiceObjectToJSONTyped(value, ignoreDiscriminator) {
90
91
  'serviceId': value['serviceId'],
91
92
  'serviceName': value['serviceName'],
92
93
  'publicDnsEndpoint': value['publicDnsEndpoint'],
94
+ 'pausedAt': value['pausedAt'] == null ? value['pausedAt'] : value['pausedAt'].toISOString(),
93
95
  'requestResponseBodyLoggingEnabled': value['requestResponseBodyLoggingEnabled'],
94
96
  'dockerfilePath': value['dockerfilePath'],
95
97
  'healthCheckConfiguration': (0, HealthCheckDetectionOutput_1.HealthCheckDetectionOutputToJSON)(value['healthCheckConfiguration']),
@@ -123,16 +123,16 @@ export interface UserObject {
123
123
  backupCodesGeneratedAt?: Date;
124
124
  /**
125
125
  *
126
- * @type {boolean}
126
+ * @type {number}
127
127
  * @memberof UserObject
128
128
  */
129
- hasPassword?: boolean;
129
+ remainingBackupCodeCount?: number;
130
130
  /**
131
131
  *
132
- * @type {number}
132
+ * @type {boolean}
133
133
  * @memberof UserObject
134
134
  */
135
- remainingBackupCodeCount?: number;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forteplatforms/sdk",
3
- "version": "1.0.261",
3
+ "version": "1.0.262",
4
4
  "description": "Official TypeScript SDK for Forte Platforms",
5
5
  "author": "Forte Platforms <support@forteplatforms.com>",
6
6
  "repository": {