frameio 1.2.2 → 1.2.3
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/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/accountPermissions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/accountPermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/accounts/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/accounts/client/Client.js +63 -73
- package/dist/cjs/api/resources/comments/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/comments/client/Client.js +69 -82
- package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/projectPermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/projects/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/projects/client/Client.js +66 -79
- package/dist/cjs/api/resources/shares/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shares/client/Client.js +126 -149
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +66 -79
- package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/workspacePermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/workspaces/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/workspaces/client/Client.js +69 -79
- package/dist/cjs/core/index.d.ts +0 -2
- package/dist/cjs/core/index.js +0 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/accountPermissions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/accountPermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/accounts/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/accounts/client/Client.mjs +63 -73
- package/dist/esm/api/resources/comments/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/comments/client/Client.mjs +69 -82
- package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/projectPermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/projects/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/projects/client/Client.mjs +66 -79
- package/dist/esm/api/resources/shares/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shares/client/Client.mjs +126 -149
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +66 -79
- package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/workspaces/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/workspaces/client/Client.mjs +69 -79
- package/dist/esm/core/index.d.mts +0 -2
- package/dist/esm/core/index.mjs +0 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +29 -203
- package/dist/cjs/core/pagination/Page.d.ts +0 -32
- package/dist/cjs/core/pagination/Page.js +0 -100
- package/dist/cjs/core/pagination/Pageable.d.ts +0 -14
- package/dist/cjs/core/pagination/Pageable.js +0 -10
- package/dist/cjs/core/pagination/index.d.ts +0 -2
- package/dist/cjs/core/pagination/index.js +0 -7
- package/dist/cjs/core/utils/index.d.ts +0 -1
- package/dist/cjs/core/utils/index.js +0 -5
- package/dist/cjs/core/utils/setObjectProperty.d.ts +0 -11
- package/dist/cjs/core/utils/setObjectProperty.js +0 -42
- package/dist/esm/core/pagination/Page.d.mts +0 -32
- package/dist/esm/core/pagination/Page.mjs +0 -96
- package/dist/esm/core/pagination/Pageable.d.mts +0 -14
- package/dist/esm/core/pagination/Pageable.mjs +0 -6
- package/dist/esm/core/pagination/index.d.mts +0 -2
- package/dist/esm/core/pagination/index.mjs +0 -2
- package/dist/esm/core/utils/index.d.mts +0 -1
- package/dist/esm/core/utils/index.mjs +0 -1
- package/dist/esm/core/utils/setObjectProperty.d.mts +0 -11
- package/dist/esm/core/utils/setObjectProperty.mjs +0 -39
|
@@ -44,91 +44,78 @@ export class Webhooks {
|
|
|
44
44
|
* include_total_count: false
|
|
45
45
|
* })
|
|
46
46
|
*/
|
|
47
|
-
index(
|
|
47
|
+
index(accountId, workspaceId, request = {}, requestOptions) {
|
|
48
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, workspaceId, request, requestOptions));
|
|
49
|
+
}
|
|
50
|
+
__index(accountId_1, workspaceId_1) {
|
|
48
51
|
return __awaiter(this, arguments, void 0, function* (accountId, workspaceId, request = {}, requestOptions) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
95
|
-
case 429:
|
|
96
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
97
|
-
default:
|
|
98
|
-
throw new errors.FrameioError({
|
|
99
|
-
statusCode: _response.error.statusCode,
|
|
100
|
-
body: _response.error.body,
|
|
101
|
-
rawResponse: _response.rawResponse,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
switch (_response.error.reason) {
|
|
106
|
-
case "non-json":
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
54
|
+
const _queryParams = {};
|
|
55
|
+
if (include != null) {
|
|
56
|
+
_queryParams["include"] = include;
|
|
57
|
+
}
|
|
58
|
+
if (after != null) {
|
|
59
|
+
_queryParams["after"] = after;
|
|
60
|
+
}
|
|
61
|
+
if (pageSize != null) {
|
|
62
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
63
|
+
}
|
|
64
|
+
if (includeTotalCount != null) {
|
|
65
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
66
|
+
}
|
|
67
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
68
|
+
const _response = yield core.fetcher({
|
|
69
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/workspaces/${encodeURIComponent(workspaceId)}/webhooks`),
|
|
70
|
+
method: "GET",
|
|
71
|
+
headers: _headers,
|
|
72
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
73
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
74
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
75
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
76
|
+
});
|
|
77
|
+
if (_response.ok) {
|
|
78
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
79
|
+
}
|
|
80
|
+
if (_response.error.reason === "status-code") {
|
|
81
|
+
switch (_response.error.statusCode) {
|
|
82
|
+
case 400:
|
|
83
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
84
|
+
case 401:
|
|
85
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
86
|
+
case 403:
|
|
87
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
88
|
+
case 404:
|
|
89
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
90
|
+
case 409:
|
|
91
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
92
|
+
case 422:
|
|
93
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
94
|
+
case 429:
|
|
95
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
96
|
+
default:
|
|
107
97
|
throw new errors.FrameioError({
|
|
108
98
|
statusCode: _response.error.statusCode,
|
|
109
|
-
body: _response.error.
|
|
110
|
-
rawResponse: _response.rawResponse,
|
|
111
|
-
});
|
|
112
|
-
case "timeout":
|
|
113
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/webhooks.");
|
|
114
|
-
case "unknown":
|
|
115
|
-
throw new errors.FrameioError({
|
|
116
|
-
message: _response.error.errorMessage,
|
|
99
|
+
body: _response.error.body,
|
|
117
100
|
rawResponse: _response.rawResponse,
|
|
118
101
|
});
|
|
119
102
|
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
103
|
+
}
|
|
104
|
+
switch (_response.error.reason) {
|
|
105
|
+
case "non-json":
|
|
106
|
+
throw new errors.FrameioError({
|
|
107
|
+
statusCode: _response.error.statusCode,
|
|
108
|
+
body: _response.error.rawBody,
|
|
109
|
+
rawResponse: _response.rawResponse,
|
|
110
|
+
});
|
|
111
|
+
case "timeout":
|
|
112
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/webhooks.");
|
|
113
|
+
case "unknown":
|
|
114
|
+
throw new errors.FrameioError({
|
|
115
|
+
message: _response.error.errorMessage,
|
|
116
|
+
rawResponse: _response.rawResponse,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
132
119
|
});
|
|
133
120
|
}
|
|
134
121
|
/**
|
|
@@ -53,7 +53,8 @@ export declare class WorkspacePermissions {
|
|
|
53
53
|
* include_total_count: false
|
|
54
54
|
* })
|
|
55
55
|
*/
|
|
56
|
-
index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.WorkspacePermissionsIndexRequest, requestOptions?: WorkspacePermissions.RequestOptions):
|
|
56
|
+
index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.WorkspacePermissionsIndexRequest, requestOptions?: WorkspacePermissions.RequestOptions): core.HttpResponsePromise<Frameio.WorkspaceUserRolesResponse>;
|
|
57
|
+
private __index;
|
|
57
58
|
/**
|
|
58
59
|
* Remove a user from a given workspace. <br>Rate Limits: 60 calls per 1.00 minute(s) per account_user
|
|
59
60
|
*
|
|
@@ -44,91 +44,78 @@ export class WorkspacePermissions {
|
|
|
44
44
|
* include_total_count: false
|
|
45
45
|
* })
|
|
46
46
|
*/
|
|
47
|
-
index(
|
|
47
|
+
index(accountId, workspaceId, request = {}, requestOptions) {
|
|
48
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, workspaceId, request, requestOptions));
|
|
49
|
+
}
|
|
50
|
+
__index(accountId_1, workspaceId_1) {
|
|
48
51
|
return __awaiter(this, arguments, void 0, function* (accountId, workspaceId, request = {}, requestOptions) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
95
|
-
case 429:
|
|
96
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
97
|
-
default:
|
|
98
|
-
throw new errors.FrameioError({
|
|
99
|
-
statusCode: _response.error.statusCode,
|
|
100
|
-
body: _response.error.body,
|
|
101
|
-
rawResponse: _response.rawResponse,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
switch (_response.error.reason) {
|
|
106
|
-
case "non-json":
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
const { include_deactivated: includeDeactivated, after, page_size: pageSize, include_total_count: includeTotalCount, } = request;
|
|
54
|
+
const _queryParams = {};
|
|
55
|
+
if (includeDeactivated != null) {
|
|
56
|
+
_queryParams["include_deactivated"] = includeDeactivated.toString();
|
|
57
|
+
}
|
|
58
|
+
if (after != null) {
|
|
59
|
+
_queryParams["after"] = after;
|
|
60
|
+
}
|
|
61
|
+
if (pageSize != null) {
|
|
62
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
63
|
+
}
|
|
64
|
+
if (includeTotalCount != null) {
|
|
65
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
66
|
+
}
|
|
67
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
68
|
+
const _response = yield core.fetcher({
|
|
69
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/workspaces/${encodeURIComponent(workspaceId)}/users`),
|
|
70
|
+
method: "GET",
|
|
71
|
+
headers: _headers,
|
|
72
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
73
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
74
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
75
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
76
|
+
});
|
|
77
|
+
if (_response.ok) {
|
|
78
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
79
|
+
}
|
|
80
|
+
if (_response.error.reason === "status-code") {
|
|
81
|
+
switch (_response.error.statusCode) {
|
|
82
|
+
case 400:
|
|
83
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
84
|
+
case 401:
|
|
85
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
86
|
+
case 403:
|
|
87
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
88
|
+
case 404:
|
|
89
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
90
|
+
case 409:
|
|
91
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
92
|
+
case 422:
|
|
93
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
94
|
+
case 429:
|
|
95
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
96
|
+
default:
|
|
107
97
|
throw new errors.FrameioError({
|
|
108
98
|
statusCode: _response.error.statusCode,
|
|
109
|
-
body: _response.error.
|
|
110
|
-
rawResponse: _response.rawResponse,
|
|
111
|
-
});
|
|
112
|
-
case "timeout":
|
|
113
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/users.");
|
|
114
|
-
case "unknown":
|
|
115
|
-
throw new errors.FrameioError({
|
|
116
|
-
message: _response.error.errorMessage,
|
|
99
|
+
body: _response.error.body,
|
|
117
100
|
rawResponse: _response.rawResponse,
|
|
118
101
|
});
|
|
119
102
|
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
103
|
+
}
|
|
104
|
+
switch (_response.error.reason) {
|
|
105
|
+
case "non-json":
|
|
106
|
+
throw new errors.FrameioError({
|
|
107
|
+
statusCode: _response.error.statusCode,
|
|
108
|
+
body: _response.error.rawBody,
|
|
109
|
+
rawResponse: _response.rawResponse,
|
|
110
|
+
});
|
|
111
|
+
case "timeout":
|
|
112
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/users.");
|
|
113
|
+
case "unknown":
|
|
114
|
+
throw new errors.FrameioError({
|
|
115
|
+
message: _response.error.errorMessage,
|
|
116
|
+
rawResponse: _response.rawResponse,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
132
119
|
});
|
|
133
120
|
}
|
|
134
121
|
/**
|
|
@@ -120,7 +120,8 @@ export declare class Workspaces {
|
|
|
120
120
|
* include_total_count: false
|
|
121
121
|
* })
|
|
122
122
|
*/
|
|
123
|
-
index(accountId: Frameio.Uuid, request?: Frameio.WorkspacesIndexRequest, requestOptions?: Workspaces.RequestOptions):
|
|
123
|
+
index(accountId: Frameio.Uuid, request?: Frameio.WorkspacesIndexRequest, requestOptions?: Workspaces.RequestOptions): core.HttpResponsePromise<Frameio.WorkspacesWithIncludesResponse>;
|
|
124
|
+
private __index;
|
|
124
125
|
/**
|
|
125
126
|
* Create workspace from an account. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
126
127
|
*
|
|
@@ -296,91 +296,81 @@ export class Workspaces {
|
|
|
296
296
|
* include_total_count: false
|
|
297
297
|
* })
|
|
298
298
|
*/
|
|
299
|
-
index(
|
|
299
|
+
index(accountId, request = {}, requestOptions) {
|
|
300
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, request, requestOptions));
|
|
301
|
+
}
|
|
302
|
+
__index(accountId_1) {
|
|
300
303
|
return __awaiter(this, arguments, void 0, function* (accountId, request = {}, requestOptions) {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
default:
|
|
350
|
-
throw new errors.FrameioError({
|
|
351
|
-
statusCode: _response.error.statusCode,
|
|
352
|
-
body: _response.error.body,
|
|
353
|
-
rawResponse: _response.rawResponse,
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
switch (_response.error.reason) {
|
|
358
|
-
case "non-json":
|
|
304
|
+
var _a, _b, _c;
|
|
305
|
+
const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
306
|
+
const _queryParams = {};
|
|
307
|
+
if (include != null) {
|
|
308
|
+
_queryParams["include"] = include;
|
|
309
|
+
}
|
|
310
|
+
if (after != null) {
|
|
311
|
+
_queryParams["after"] = after;
|
|
312
|
+
}
|
|
313
|
+
if (pageSize != null) {
|
|
314
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
315
|
+
}
|
|
316
|
+
if (includeTotalCount != null) {
|
|
317
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
318
|
+
}
|
|
319
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
320
|
+
const _response = yield core.fetcher({
|
|
321
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/workspaces`),
|
|
322
|
+
method: "GET",
|
|
323
|
+
headers: _headers,
|
|
324
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
325
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
326
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
327
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
328
|
+
});
|
|
329
|
+
if (_response.ok) {
|
|
330
|
+
return {
|
|
331
|
+
data: _response.body,
|
|
332
|
+
rawResponse: _response.rawResponse,
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
if (_response.error.reason === "status-code") {
|
|
336
|
+
switch (_response.error.statusCode) {
|
|
337
|
+
case 400:
|
|
338
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
339
|
+
case 401:
|
|
340
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
341
|
+
case 403:
|
|
342
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
343
|
+
case 404:
|
|
344
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
345
|
+
case 409:
|
|
346
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
347
|
+
case 422:
|
|
348
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
349
|
+
case 429:
|
|
350
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
351
|
+
default:
|
|
359
352
|
throw new errors.FrameioError({
|
|
360
353
|
statusCode: _response.error.statusCode,
|
|
361
|
-
body: _response.error.
|
|
362
|
-
rawResponse: _response.rawResponse,
|
|
363
|
-
});
|
|
364
|
-
case "timeout":
|
|
365
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces.");
|
|
366
|
-
case "unknown":
|
|
367
|
-
throw new errors.FrameioError({
|
|
368
|
-
message: _response.error.errorMessage,
|
|
354
|
+
body: _response.error.body,
|
|
369
355
|
rawResponse: _response.rawResponse,
|
|
370
356
|
});
|
|
371
357
|
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
358
|
+
}
|
|
359
|
+
switch (_response.error.reason) {
|
|
360
|
+
case "non-json":
|
|
361
|
+
throw new errors.FrameioError({
|
|
362
|
+
statusCode: _response.error.statusCode,
|
|
363
|
+
body: _response.error.rawBody,
|
|
364
|
+
rawResponse: _response.rawResponse,
|
|
365
|
+
});
|
|
366
|
+
case "timeout":
|
|
367
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces.");
|
|
368
|
+
case "unknown":
|
|
369
|
+
throw new errors.FrameioError({
|
|
370
|
+
message: _response.error.errorMessage,
|
|
371
|
+
rawResponse: _response.rawResponse,
|
|
372
|
+
});
|
|
373
|
+
}
|
|
384
374
|
});
|
|
385
375
|
}
|
|
386
376
|
/**
|
package/dist/esm/core/index.mjs
CHANGED
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.2.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.3";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.2.
|
|
1
|
+
export const SDK_VERSION = "1.2.3";
|