@forteplatforms/sdk 1.0.152 → 1.0.154

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.
@@ -29,6 +29,7 @@ import { type CreateServiceRequestProxyRequest } from '../models/CreateServiceRe
29
29
  import { type CreateServiceRequestProxyResponse } from '../models/CreateServiceRequestProxyResponse';
30
30
  import { type CreateWebAppRequest } from '../models/CreateWebAppRequest';
31
31
  import { type GetContentDownloadLinkResponse } from '../models/GetContentDownloadLinkResponse';
32
+ import { type ImpersonationTokenResponse } from '../models/ImpersonationTokenResponse';
32
33
  import { type ListContentResponse } from '../models/ListContentResponse';
33
34
  import { type NotificationTemplatesResponse } from '../models/NotificationTemplatesResponse';
34
35
  import { type PaginatedResponseLogLineObject } from '../models/PaginatedResponseLogLineObject';
@@ -192,6 +193,10 @@ export interface GetWebAppDeploymentRequest {
192
193
  webAppId: string;
193
194
  buildId: string;
194
195
  }
196
+ export interface IssueImpersonationTokenRequest {
197
+ projectId: string;
198
+ userId: string;
199
+ }
195
200
  export interface ListLogLinesRequest {
196
201
  projectId: string;
197
202
  serviceId: string;
@@ -662,6 +667,16 @@ export declare class ProjectsServerApi extends runtime.BaseAPI {
662
667
  /**
663
668
  */
664
669
  getWebAppDeployment(requestParameters: GetWebAppDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebAppBuildRequestObject>;
670
+ /**
671
+ * Creates request options for issueImpersonationToken without sending the request
672
+ */
673
+ issueImpersonationTokenRequestOpts(requestParameters: IssueImpersonationTokenRequest): Promise<runtime.RequestOpts>;
674
+ /**
675
+ */
676
+ issueImpersonationTokenRaw(requestParameters: IssueImpersonationTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImpersonationTokenResponse>>;
677
+ /**
678
+ */
679
+ issueImpersonationToken(requestParameters: IssueImpersonationTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImpersonationTokenResponse>;
665
680
  /**
666
681
  * Creates request options for listLogLines without sending the request
667
682
  */
@@ -1027,6 +1042,7 @@ export declare const ListUserActionLogsActionTypeType: {
1027
1042
  readonly USER_INVITE_ACCEPTED: "USER_INVITE_ACCEPTED";
1028
1043
  readonly EMAIL_SENT: "EMAIL_SENT";
1029
1044
  readonly SMS_SENT: "SMS_SENT";
1045
+ readonly IMPERSONATION_TOKEN_ISSUED: "IMPERSONATION_TOKEN_ISSUED";
1030
1046
  };
1031
1047
  export type ListUserActionLogsActionTypeType = typeof ListUserActionLogsActionTypeType[keyof typeof ListUserActionLogsActionTypeType];
1032
1048
  /**
@@ -85,6 +85,7 @@ var CreateServiceRequestProxyRequest_1 = require("../models/CreateServiceRequest
85
85
  var CreateServiceRequestProxyResponse_1 = require("../models/CreateServiceRequestProxyResponse");
86
86
  var CreateWebAppRequest_1 = require("../models/CreateWebAppRequest");
87
87
  var GetContentDownloadLinkResponse_1 = require("../models/GetContentDownloadLinkResponse");
88
+ var ImpersonationTokenResponse_1 = require("../models/ImpersonationTokenResponse");
88
89
  var ListContentResponse_1 = require("../models/ListContentResponse");
89
90
  var NotificationTemplatesResponse_1 = require("../models/NotificationTemplatesResponse");
90
91
  var PaginatedResponseLogLineObject_1 = require("../models/PaginatedResponseLogLineObject");
@@ -1942,6 +1943,67 @@ var ProjectsServerApi = /** @class */ (function (_super) {
1942
1943
  });
1943
1944
  });
1944
1945
  };
1946
+ /**
1947
+ * Creates request options for issueImpersonationToken without sending the request
1948
+ */
1949
+ ProjectsServerApi.prototype.issueImpersonationTokenRequestOpts = function (requestParameters) {
1950
+ return __awaiter(this, void 0, void 0, function () {
1951
+ var queryParameters, headerParameters, urlPath;
1952
+ return __generator(this, function (_a) {
1953
+ if (requestParameters['projectId'] == null) {
1954
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling issueImpersonationToken().');
1955
+ }
1956
+ if (requestParameters['userId'] == null) {
1957
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling issueImpersonationToken().');
1958
+ }
1959
+ queryParameters = {};
1960
+ headerParameters = {};
1961
+ urlPath = "/api/v1/projects/{projectId}/users/{userId}/impersonation-token";
1962
+ urlPath = urlPath.replace('{projectId}', encodeURIComponent(String(requestParameters['projectId'])));
1963
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
1964
+ return [2 /*return*/, {
1965
+ path: urlPath,
1966
+ method: 'POST',
1967
+ headers: headerParameters,
1968
+ query: queryParameters,
1969
+ }];
1970
+ });
1971
+ });
1972
+ };
1973
+ /**
1974
+ */
1975
+ ProjectsServerApi.prototype.issueImpersonationTokenRaw = function (requestParameters, initOverrides) {
1976
+ return __awaiter(this, void 0, void 0, function () {
1977
+ var requestOptions, response;
1978
+ return __generator(this, function (_a) {
1979
+ switch (_a.label) {
1980
+ case 0: return [4 /*yield*/, this.issueImpersonationTokenRequestOpts(requestParameters)];
1981
+ case 1:
1982
+ requestOptions = _a.sent();
1983
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
1984
+ case 2:
1985
+ response = _a.sent();
1986
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, ImpersonationTokenResponse_1.ImpersonationTokenResponseFromJSON)(jsonValue); })];
1987
+ }
1988
+ });
1989
+ });
1990
+ };
1991
+ /**
1992
+ */
1993
+ ProjectsServerApi.prototype.issueImpersonationToken = function (requestParameters, initOverrides) {
1994
+ return __awaiter(this, void 0, void 0, function () {
1995
+ var response;
1996
+ return __generator(this, function (_a) {
1997
+ switch (_a.label) {
1998
+ case 0: return [4 /*yield*/, this.issueImpersonationTokenRaw(requestParameters, initOverrides)];
1999
+ case 1:
2000
+ response = _a.sent();
2001
+ return [4 /*yield*/, response.value()];
2002
+ case 2: return [2 /*return*/, _a.sent()];
2003
+ }
2004
+ });
2005
+ });
2006
+ };
1945
2007
  /**
1946
2008
  * Creates request options for listLogLines without sending the request
1947
2009
  */
@@ -4119,7 +4181,8 @@ exports.ListUserActionLogsActionTypeType = {
4119
4181
  USER_INVITE_REVOKED: 'USER_INVITE_REVOKED',
4120
4182
  USER_INVITE_ACCEPTED: 'USER_INVITE_ACCEPTED',
4121
4183
  EMAIL_SENT: 'EMAIL_SENT',
4122
- SMS_SENT: 'SMS_SENT'
4184
+ SMS_SENT: 'SMS_SENT',
4185
+ IMPERSONATION_TOKEN_ISSUED: 'IMPERSONATION_TOKEN_ISSUED'
4123
4186
  };
4124
4187
  /**
4125
4188
  * @export
@@ -143,6 +143,8 @@ export declare const ForteApiExceptionErrorCodeType: {
143
143
  readonly CONTENT_SHARE_USER_NOT_IN_PROJECT: "CONTENT_SHARE_USER_NOT_IN_PROJECT";
144
144
  readonly CONTENT_NOT_SHAREABLE_WHILE_PENDING: "CONTENT_NOT_SHAREABLE_WHILE_PENDING";
145
145
  readonly CONTENT_TYPE_IMMUTABLE_ON_REUPLOAD: "CONTENT_TYPE_IMMUTABLE_ON_REUPLOAD";
146
+ readonly IMPERSONATION_TOKEN_NOT_RENEWABLE: "IMPERSONATION_TOKEN_NOT_RENEWABLE";
147
+ readonly USER_NOT_ACTIVE: "USER_NOT_ACTIVE";
146
148
  };
147
149
  export type ForteApiExceptionErrorCodeType = typeof ForteApiExceptionErrorCodeType[keyof typeof ForteApiExceptionErrorCodeType];
148
150
  /**
@@ -127,7 +127,9 @@ exports.ForteApiExceptionErrorCodeType = {
127
127
  CONTENT_SIZE_EXCEEDS_LIMIT: 'CONTENT_SIZE_EXCEEDS_LIMIT',
128
128
  CONTENT_SHARE_USER_NOT_IN_PROJECT: 'CONTENT_SHARE_USER_NOT_IN_PROJECT',
129
129
  CONTENT_NOT_SHAREABLE_WHILE_PENDING: 'CONTENT_NOT_SHAREABLE_WHILE_PENDING',
130
- CONTENT_TYPE_IMMUTABLE_ON_REUPLOAD: 'CONTENT_TYPE_IMMUTABLE_ON_REUPLOAD'
130
+ CONTENT_TYPE_IMMUTABLE_ON_REUPLOAD: 'CONTENT_TYPE_IMMUTABLE_ON_REUPLOAD',
131
+ IMPERSONATION_TOKEN_NOT_RENEWABLE: 'IMPERSONATION_TOKEN_NOT_RENEWABLE',
132
+ USER_NOT_ACTIVE: 'USER_NOT_ACTIVE'
131
133
  };
132
134
  /**
133
135
  * Check if a given object implements the ForteApiException interface.
@@ -0,0 +1,38 @@
1
+ /**
2
+ * OpenAPI definition
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: v0
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 ImpersonationTokenResponse
16
+ */
17
+ export interface ImpersonationTokenResponse {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ImpersonationTokenResponse
22
+ */
23
+ sessionToken?: string;
24
+ /**
25
+ *
26
+ * @type {Date}
27
+ * @memberof ImpersonationTokenResponse
28
+ */
29
+ expirationTime?: Date;
30
+ }
31
+ /**
32
+ * Check if a given object implements the ImpersonationTokenResponse interface.
33
+ */
34
+ export declare function instanceOfImpersonationTokenResponse(value: object): value is ImpersonationTokenResponse;
35
+ export declare function ImpersonationTokenResponseFromJSON(json: any): ImpersonationTokenResponse;
36
+ export declare function ImpersonationTokenResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImpersonationTokenResponse;
37
+ export declare function ImpersonationTokenResponseToJSON(json: any): ImpersonationTokenResponse;
38
+ export declare function ImpersonationTokenResponseToJSONTyped(value?: ImpersonationTokenResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * OpenAPI definition
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: v0
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.instanceOfImpersonationTokenResponse = instanceOfImpersonationTokenResponse;
17
+ exports.ImpersonationTokenResponseFromJSON = ImpersonationTokenResponseFromJSON;
18
+ exports.ImpersonationTokenResponseFromJSONTyped = ImpersonationTokenResponseFromJSONTyped;
19
+ exports.ImpersonationTokenResponseToJSON = ImpersonationTokenResponseToJSON;
20
+ exports.ImpersonationTokenResponseToJSONTyped = ImpersonationTokenResponseToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ImpersonationTokenResponse interface.
23
+ */
24
+ function instanceOfImpersonationTokenResponse(value) {
25
+ return true;
26
+ }
27
+ function ImpersonationTokenResponseFromJSON(json) {
28
+ return ImpersonationTokenResponseFromJSONTyped(json, false);
29
+ }
30
+ function ImpersonationTokenResponseFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'sessionToken': json['sessionToken'] == null ? undefined : json['sessionToken'],
36
+ 'expirationTime': json['expirationTime'] == null ? undefined : (new Date(json['expirationTime'])),
37
+ };
38
+ }
39
+ function ImpersonationTokenResponseToJSON(json) {
40
+ return ImpersonationTokenResponseToJSONTyped(json, false);
41
+ }
42
+ function ImpersonationTokenResponseToJSONTyped(value, ignoreDiscriminator) {
43
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'sessionToken': value['sessionToken'],
49
+ 'expirationTime': value['expirationTime'] == null ? value['expirationTime'] : value['expirationTime'].toISOString(),
50
+ };
51
+ }
@@ -78,6 +78,7 @@ export declare const UserActionLogObjectActionTypeType: {
78
78
  readonly USER_INVITE_ACCEPTED: "USER_INVITE_ACCEPTED";
79
79
  readonly EMAIL_SENT: "EMAIL_SENT";
80
80
  readonly SMS_SENT: "SMS_SENT";
81
+ readonly IMPERSONATION_TOKEN_ISSUED: "IMPERSONATION_TOKEN_ISSUED";
81
82
  };
82
83
  export type UserActionLogObjectActionTypeType = typeof UserActionLogObjectActionTypeType[keyof typeof UserActionLogObjectActionTypeType];
83
84
  /**
@@ -42,7 +42,8 @@ exports.UserActionLogObjectActionTypeType = {
42
42
  USER_INVITE_REVOKED: 'USER_INVITE_REVOKED',
43
43
  USER_INVITE_ACCEPTED: 'USER_INVITE_ACCEPTED',
44
44
  EMAIL_SENT: 'EMAIL_SENT',
45
- SMS_SENT: 'SMS_SENT'
45
+ SMS_SENT: 'SMS_SENT',
46
+ IMPERSONATION_TOKEN_ISSUED: 'IMPERSONATION_TOKEN_ISSUED'
46
47
  };
47
48
  /**
48
49
  * Check if a given object implements the UserActionLogObject interface.
@@ -32,6 +32,7 @@ export * from './HealthCheckConfig';
32
32
  export * from './HealthCheckDetectionError';
33
33
  export * from './HealthCheckDetectionOutput';
34
34
  export * from './HealthCheckDetectionResponse';
35
+ export * from './ImpersonationTokenResponse';
35
36
  export * from './LatencyMetrics';
36
37
  export * from './LatencyStats';
37
38
  export * from './ListContentResponse';
@@ -50,6 +50,7 @@ __exportStar(require("./HealthCheckConfig"), exports);
50
50
  __exportStar(require("./HealthCheckDetectionError"), exports);
51
51
  __exportStar(require("./HealthCheckDetectionOutput"), exports);
52
52
  __exportStar(require("./HealthCheckDetectionResponse"), exports);
53
+ __exportStar(require("./ImpersonationTokenResponse"), exports);
53
54
  __exportStar(require("./LatencyMetrics"), exports);
54
55
  __exportStar(require("./LatencyStats"), exports);
55
56
  __exportStar(require("./ListContentResponse"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forteplatforms/sdk",
3
- "version": "1.0.152",
3
+ "version": "1.0.154",
4
4
  "description": "Official TypeScript SDK for Forte Platforms",
5
5
  "author": "Forte Platforms <support@forteplatforms.com>",
6
6
  "repository": {