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
package/dist/cjs/Client.js
CHANGED
|
@@ -57,8 +57,8 @@ class FrameioClient {
|
|
|
57
57
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
58
58
|
"X-Fern-Language": "JavaScript",
|
|
59
59
|
"X-Fern-SDK-Name": "frameio",
|
|
60
|
-
"X-Fern-SDK-Version": "1.2.
|
|
61
|
-
"User-Agent": "frameio/1.2.
|
|
60
|
+
"X-Fern-SDK-Version": "1.2.3",
|
|
61
|
+
"User-Agent": "frameio/1.2.3",
|
|
62
62
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
63
63
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
64
64
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -52,6 +52,7 @@ export declare class AccountPermissions {
|
|
|
52
52
|
* include_total_count: false
|
|
53
53
|
* })
|
|
54
54
|
*/
|
|
55
|
-
index(accountId: Frameio.Uuid, request?: Frameio.AccountPermissionsIndexRequest, requestOptions?: AccountPermissions.RequestOptions):
|
|
55
|
+
index(accountId: Frameio.Uuid, request?: Frameio.AccountPermissionsIndexRequest, requestOptions?: AccountPermissions.RequestOptions): core.HttpResponsePromise<Frameio.AccountUserRolesResponse>;
|
|
56
|
+
private __index;
|
|
56
57
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
57
58
|
}
|
|
@@ -79,91 +79,78 @@ class AccountPermissions {
|
|
|
79
79
|
* include_total_count: false
|
|
80
80
|
* })
|
|
81
81
|
*/
|
|
82
|
-
index(
|
|
82
|
+
index(accountId, request = {}, requestOptions) {
|
|
83
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, request, requestOptions));
|
|
84
|
+
}
|
|
85
|
+
__index(accountId_1) {
|
|
83
86
|
return __awaiter(this, arguments, void 0, function* (accountId, request = {}, requestOptions) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
130
|
-
case 429:
|
|
131
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
132
|
-
default:
|
|
133
|
-
throw new errors.FrameioError({
|
|
134
|
-
statusCode: _response.error.statusCode,
|
|
135
|
-
body: _response.error.body,
|
|
136
|
-
rawResponse: _response.rawResponse,
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
switch (_response.error.reason) {
|
|
141
|
-
case "non-json":
|
|
87
|
+
var _a, _b, _c;
|
|
88
|
+
const { include_deactivated: includeDeactivated, after, page_size: pageSize, include_total_count: includeTotalCount, } = request;
|
|
89
|
+
const _queryParams = {};
|
|
90
|
+
if (includeDeactivated != null) {
|
|
91
|
+
_queryParams["include_deactivated"] = includeDeactivated.toString();
|
|
92
|
+
}
|
|
93
|
+
if (after != null) {
|
|
94
|
+
_queryParams["after"] = after;
|
|
95
|
+
}
|
|
96
|
+
if (pageSize != null) {
|
|
97
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
98
|
+
}
|
|
99
|
+
if (includeTotalCount != null) {
|
|
100
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
101
|
+
}
|
|
102
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
103
|
+
const _response = yield core.fetcher({
|
|
104
|
+
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)}/users`),
|
|
105
|
+
method: "GET",
|
|
106
|
+
headers: _headers,
|
|
107
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
108
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
109
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
110
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
+
});
|
|
112
|
+
if (_response.ok) {
|
|
113
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
114
|
+
}
|
|
115
|
+
if (_response.error.reason === "status-code") {
|
|
116
|
+
switch (_response.error.statusCode) {
|
|
117
|
+
case 400:
|
|
118
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
119
|
+
case 401:
|
|
120
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
121
|
+
case 403:
|
|
122
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
123
|
+
case 404:
|
|
124
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
125
|
+
case 409:
|
|
126
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
127
|
+
case 422:
|
|
128
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
129
|
+
case 429:
|
|
130
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
131
|
+
default:
|
|
142
132
|
throw new errors.FrameioError({
|
|
143
133
|
statusCode: _response.error.statusCode,
|
|
144
|
-
body: _response.error.
|
|
145
|
-
rawResponse: _response.rawResponse,
|
|
146
|
-
});
|
|
147
|
-
case "timeout":
|
|
148
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/users.");
|
|
149
|
-
case "unknown":
|
|
150
|
-
throw new errors.FrameioError({
|
|
151
|
-
message: _response.error.errorMessage,
|
|
134
|
+
body: _response.error.body,
|
|
152
135
|
rawResponse: _response.rawResponse,
|
|
153
136
|
});
|
|
154
137
|
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
138
|
+
}
|
|
139
|
+
switch (_response.error.reason) {
|
|
140
|
+
case "non-json":
|
|
141
|
+
throw new errors.FrameioError({
|
|
142
|
+
statusCode: _response.error.statusCode,
|
|
143
|
+
body: _response.error.rawBody,
|
|
144
|
+
rawResponse: _response.rawResponse,
|
|
145
|
+
});
|
|
146
|
+
case "timeout":
|
|
147
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/users.");
|
|
148
|
+
case "unknown":
|
|
149
|
+
throw new errors.FrameioError({
|
|
150
|
+
message: _response.error.errorMessage,
|
|
151
|
+
rawResponse: _response.rawResponse,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
167
154
|
});
|
|
168
155
|
}
|
|
169
156
|
_getAuthorizationHeader() {
|
|
@@ -50,7 +50,8 @@ export declare class Accounts {
|
|
|
50
50
|
* include_total_count: false
|
|
51
51
|
* })
|
|
52
52
|
*/
|
|
53
|
-
index(request?: Frameio.AccountsIndexRequest, requestOptions?: Accounts.RequestOptions):
|
|
53
|
+
index(request?: Frameio.AccountsIndexRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Frameio.AccountsResponse>;
|
|
54
|
+
private __index;
|
|
54
55
|
/**
|
|
55
56
|
* List audit logs with filtering capabilities via query params. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
56
57
|
*
|
|
@@ -77,85 +77,75 @@ class Accounts {
|
|
|
77
77
|
* include_total_count: false
|
|
78
78
|
* })
|
|
79
79
|
*/
|
|
80
|
-
index() {
|
|
80
|
+
index(request = {}, requestOptions) {
|
|
81
|
+
return core.HttpResponsePromise.fromPromise(this.__index(request, requestOptions));
|
|
82
|
+
}
|
|
83
|
+
__index() {
|
|
81
84
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
default:
|
|
125
|
-
throw new errors.FrameioError({
|
|
126
|
-
statusCode: _response.error.statusCode,
|
|
127
|
-
body: _response.error.body,
|
|
128
|
-
rawResponse: _response.rawResponse,
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
switch (_response.error.reason) {
|
|
133
|
-
case "non-json":
|
|
85
|
+
var _a, _b, _c;
|
|
86
|
+
const { after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
87
|
+
const _queryParams = {};
|
|
88
|
+
if (after != null) {
|
|
89
|
+
_queryParams["after"] = after;
|
|
90
|
+
}
|
|
91
|
+
if (pageSize != null) {
|
|
92
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
93
|
+
}
|
|
94
|
+
if (includeTotalCount != null) {
|
|
95
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
96
|
+
}
|
|
97
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
98
|
+
const _response = yield core.fetcher({
|
|
99
|
+
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"),
|
|
100
|
+
method: "GET",
|
|
101
|
+
headers: _headers,
|
|
102
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
103
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
104
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
105
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
106
|
+
});
|
|
107
|
+
if (_response.ok) {
|
|
108
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
109
|
+
}
|
|
110
|
+
if (_response.error.reason === "status-code") {
|
|
111
|
+
switch (_response.error.statusCode) {
|
|
112
|
+
case 400:
|
|
113
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
114
|
+
case 401:
|
|
115
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
116
|
+
case 403:
|
|
117
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
118
|
+
case 404:
|
|
119
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
120
|
+
case 409:
|
|
121
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
122
|
+
case 422:
|
|
123
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
124
|
+
case 429:
|
|
125
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
126
|
+
default:
|
|
134
127
|
throw new errors.FrameioError({
|
|
135
128
|
statusCode: _response.error.statusCode,
|
|
136
|
-
body: _response.error.
|
|
137
|
-
rawResponse: _response.rawResponse,
|
|
138
|
-
});
|
|
139
|
-
case "timeout":
|
|
140
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts.");
|
|
141
|
-
case "unknown":
|
|
142
|
-
throw new errors.FrameioError({
|
|
143
|
-
message: _response.error.errorMessage,
|
|
129
|
+
body: _response.error.body,
|
|
144
130
|
rawResponse: _response.rawResponse,
|
|
145
131
|
});
|
|
146
132
|
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
133
|
+
}
|
|
134
|
+
switch (_response.error.reason) {
|
|
135
|
+
case "non-json":
|
|
136
|
+
throw new errors.FrameioError({
|
|
137
|
+
statusCode: _response.error.statusCode,
|
|
138
|
+
body: _response.error.rawBody,
|
|
139
|
+
rawResponse: _response.rawResponse,
|
|
140
|
+
});
|
|
141
|
+
case "timeout":
|
|
142
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts.");
|
|
143
|
+
case "unknown":
|
|
144
|
+
throw new errors.FrameioError({
|
|
145
|
+
message: _response.error.errorMessage,
|
|
146
|
+
rawResponse: _response.rawResponse,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
159
149
|
});
|
|
160
150
|
}
|
|
161
151
|
/**
|
|
@@ -127,7 +127,8 @@ export declare class Comments {
|
|
|
127
127
|
* include_total_count: false
|
|
128
128
|
* })
|
|
129
129
|
*/
|
|
130
|
-
index(accountId: Frameio.Uuid, fileId: Frameio.Uuid, request?: Frameio.CommentsIndexRequest, requestOptions?: Comments.RequestOptions):
|
|
130
|
+
index(accountId: Frameio.Uuid, fileId: Frameio.Uuid, request?: Frameio.CommentsIndexRequest, requestOptions?: Comments.RequestOptions): core.HttpResponsePromise<Frameio.CommentsWithIncludesResponse>;
|
|
131
|
+
private __index;
|
|
131
132
|
/**
|
|
132
133
|
* Create a comment on a file. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
133
134
|
*
|
|
@@ -355,94 +355,81 @@ class Comments {
|
|
|
355
355
|
* include_total_count: false
|
|
356
356
|
* })
|
|
357
357
|
*/
|
|
358
|
-
index(
|
|
358
|
+
index(accountId, fileId, request = {}, requestOptions) {
|
|
359
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, fileId, request, requestOptions));
|
|
360
|
+
}
|
|
361
|
+
__index(accountId_1, fileId_1) {
|
|
359
362
|
return __awaiter(this, arguments, void 0, function* (accountId, fileId, request = {}, requestOptions) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
409
|
-
case 429:
|
|
410
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
411
|
-
default:
|
|
412
|
-
throw new errors.FrameioError({
|
|
413
|
-
statusCode: _response.error.statusCode,
|
|
414
|
-
body: _response.error.body,
|
|
415
|
-
rawResponse: _response.rawResponse,
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
switch (_response.error.reason) {
|
|
420
|
-
case "non-json":
|
|
363
|
+
var _a, _b, _c;
|
|
364
|
+
const { timestamp_as_timecode: timestampAsTimecode, include, after, page_size: pageSize, include_total_count: includeTotalCount, } = request;
|
|
365
|
+
const _queryParams = {};
|
|
366
|
+
if (timestampAsTimecode != null) {
|
|
367
|
+
_queryParams["timestamp_as_timecode"] = timestampAsTimecode.toString();
|
|
368
|
+
}
|
|
369
|
+
if (include != null) {
|
|
370
|
+
_queryParams["include"] = include;
|
|
371
|
+
}
|
|
372
|
+
if (after != null) {
|
|
373
|
+
_queryParams["after"] = after;
|
|
374
|
+
}
|
|
375
|
+
if (pageSize != null) {
|
|
376
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
377
|
+
}
|
|
378
|
+
if (includeTotalCount != null) {
|
|
379
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
380
|
+
}
|
|
381
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
382
|
+
const _response = yield core.fetcher({
|
|
383
|
+
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)}/files/${encodeURIComponent(fileId)}/comments`),
|
|
384
|
+
method: "GET",
|
|
385
|
+
headers: _headers,
|
|
386
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
387
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
388
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
389
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
390
|
+
});
|
|
391
|
+
if (_response.ok) {
|
|
392
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
393
|
+
}
|
|
394
|
+
if (_response.error.reason === "status-code") {
|
|
395
|
+
switch (_response.error.statusCode) {
|
|
396
|
+
case 400:
|
|
397
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
398
|
+
case 401:
|
|
399
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
400
|
+
case 403:
|
|
401
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
402
|
+
case 404:
|
|
403
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
404
|
+
case 409:
|
|
405
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
406
|
+
case 422:
|
|
407
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
408
|
+
case 429:
|
|
409
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
410
|
+
default:
|
|
421
411
|
throw new errors.FrameioError({
|
|
422
412
|
statusCode: _response.error.statusCode,
|
|
423
|
-
body: _response.error.
|
|
424
|
-
rawResponse: _response.rawResponse,
|
|
425
|
-
});
|
|
426
|
-
case "timeout":
|
|
427
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/files/{file_id}/comments.");
|
|
428
|
-
case "unknown":
|
|
429
|
-
throw new errors.FrameioError({
|
|
430
|
-
message: _response.error.errorMessage,
|
|
413
|
+
body: _response.error.body,
|
|
431
414
|
rawResponse: _response.rawResponse,
|
|
432
415
|
});
|
|
433
416
|
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
417
|
+
}
|
|
418
|
+
switch (_response.error.reason) {
|
|
419
|
+
case "non-json":
|
|
420
|
+
throw new errors.FrameioError({
|
|
421
|
+
statusCode: _response.error.statusCode,
|
|
422
|
+
body: _response.error.rawBody,
|
|
423
|
+
rawResponse: _response.rawResponse,
|
|
424
|
+
});
|
|
425
|
+
case "timeout":
|
|
426
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/files/{file_id}/comments.");
|
|
427
|
+
case "unknown":
|
|
428
|
+
throw new errors.FrameioError({
|
|
429
|
+
message: _response.error.errorMessage,
|
|
430
|
+
rawResponse: _response.rawResponse,
|
|
431
|
+
});
|
|
432
|
+
}
|
|
446
433
|
});
|
|
447
434
|
}
|
|
448
435
|
/**
|
|
@@ -53,7 +53,8 @@ export declare class ProjectPermissions {
|
|
|
53
53
|
* include_total_count: false
|
|
54
54
|
* })
|
|
55
55
|
*/
|
|
56
|
-
index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.ProjectPermissionsIndexRequest, requestOptions?: ProjectPermissions.RequestOptions):
|
|
56
|
+
index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.ProjectPermissionsIndexRequest, requestOptions?: ProjectPermissions.RequestOptions): core.HttpResponsePromise<Frameio.ProjectUserRolesResponse>;
|
|
57
|
+
private __index;
|
|
57
58
|
/**
|
|
58
59
|
* Remove a user from a given project. <br>Rate Limits: 60 calls per 1.00 minute(s) per account_user
|
|
59
60
|
*
|