frameio 1.2.2 → 1.3.0
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.d.ts +1 -0
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/accountPermissions/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/accountPermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/accounts/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/accounts/client/Client.js +66 -76
- package/dist/cjs/api/resources/comments/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/comments/client/Client.js +81 -94
- package/dist/cjs/api/resources/files/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/files/client/Client.js +30 -30
- package/dist/cjs/api/resources/folders/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/folders/client/Client.js +24 -24
- package/dist/cjs/api/resources/metadata/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/metadata/client/Client.js +6 -6
- package/dist/cjs/api/resources/metadataFields/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/metadataFields/client/Client.js +12 -12
- package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/projectPermissions/client/Client.js +72 -85
- package/dist/cjs/api/resources/projects/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/projects/client/Client.js +78 -91
- package/dist/cjs/api/resources/shares/client/Client.d.ts +5 -2
- package/dist/cjs/api/resources/shares/client/Client.js +150 -173
- package/dist/cjs/api/resources/users/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/users/client/Client.js +3 -3
- package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/versionStacks/client/Client.js +18 -18
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +78 -91
- package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/workspacePermissions/client/Client.js +72 -85
- package/dist/cjs/api/resources/workspaces/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/workspaces/client/Client.js +81 -91
- 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.d.mts +1 -0
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/accountPermissions/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/accountPermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/accounts/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/accounts/client/Client.mjs +66 -76
- package/dist/esm/api/resources/comments/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/comments/client/Client.mjs +81 -94
- package/dist/esm/api/resources/files/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/files/client/Client.mjs +30 -30
- package/dist/esm/api/resources/folders/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/folders/client/Client.mjs +24 -24
- package/dist/esm/api/resources/metadata/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/metadata/client/Client.mjs +6 -6
- package/dist/esm/api/resources/metadataFields/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/metadataFields/client/Client.mjs +12 -12
- package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/projectPermissions/client/Client.mjs +72 -85
- package/dist/esm/api/resources/projects/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/projects/client/Client.mjs +78 -91
- package/dist/esm/api/resources/shares/client/Client.d.mts +5 -2
- package/dist/esm/api/resources/shares/client/Client.mjs +150 -173
- package/dist/esm/api/resources/users/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/users/client/Client.mjs +3 -3
- package/dist/esm/api/resources/versionStacks/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/versionStacks/client/Client.mjs +18 -18
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +78 -91
- package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +72 -85
- package/dist/esm/api/resources/workspaces/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/workspaces/client/Client.mjs +81 -91
- 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.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare namespace FrameioClient {
|
|
|
23
23
|
token: core.Supplier<core.BearerToken>;
|
|
24
24
|
/** Additional headers to include in requests. */
|
|
25
25
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
26
|
+
fetcher?: core.FetchFunction;
|
|
26
27
|
}
|
|
27
28
|
interface RequestOptions {
|
|
28
29
|
/** The maximum time to wait for a response in seconds. */
|
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.
|
|
61
|
-
"User-Agent": "frameio/1.
|
|
60
|
+
"X-Fern-SDK-Version": "1.3.0",
|
|
61
|
+
"User-Agent": "frameio/1.3.0",
|
|
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) });
|
|
@@ -9,6 +9,7 @@ export declare namespace AccountPermissions {
|
|
|
9
9
|
token: core.Supplier<core.BearerToken>;
|
|
10
10
|
/** Additional headers to include in requests. */
|
|
11
11
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
12
|
+
fetcher?: core.FetchFunction;
|
|
12
13
|
}
|
|
13
14
|
interface RequestOptions {
|
|
14
15
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -52,6 +53,7 @@ export declare class AccountPermissions {
|
|
|
52
53
|
* include_total_count: false
|
|
53
54
|
* })
|
|
54
55
|
*/
|
|
55
|
-
index(accountId: Frameio.Uuid, request?: Frameio.AccountPermissionsIndexRequest, requestOptions?: AccountPermissions.RequestOptions):
|
|
56
|
+
index(accountId: Frameio.Uuid, request?: Frameio.AccountPermissionsIndexRequest, requestOptions?: AccountPermissions.RequestOptions): core.HttpResponsePromise<Frameio.AccountUserRolesResponse>;
|
|
57
|
+
private __index;
|
|
56
58
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
57
59
|
}
|
|
@@ -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, _d;
|
|
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 ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
104
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : 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() {
|
|
@@ -9,6 +9,7 @@ export declare namespace Accounts {
|
|
|
9
9
|
token: core.Supplier<core.BearerToken>;
|
|
10
10
|
/** Additional headers to include in requests. */
|
|
11
11
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
12
|
+
fetcher?: core.FetchFunction;
|
|
12
13
|
}
|
|
13
14
|
interface RequestOptions {
|
|
14
15
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -50,7 +51,8 @@ export declare class Accounts {
|
|
|
50
51
|
* include_total_count: false
|
|
51
52
|
* })
|
|
52
53
|
*/
|
|
53
|
-
index(request?: Frameio.AccountsIndexRequest, requestOptions?: Accounts.RequestOptions):
|
|
54
|
+
index(request?: Frameio.AccountsIndexRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Frameio.AccountsResponse>;
|
|
55
|
+
private __index;
|
|
54
56
|
/**
|
|
55
57
|
* List audit logs with filtering capabilities via query params. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
56
58
|
*
|
|
@@ -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, _d;
|
|
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 ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
99
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : 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
|
/**
|
|
@@ -186,7 +176,7 @@ class Accounts {
|
|
|
186
176
|
}
|
|
187
177
|
__auditlogIndex(accountId_1) {
|
|
188
178
|
return __awaiter(this, arguments, void 0, function* (accountId, request = {}, requestOptions) {
|
|
189
|
-
var _a, _b, _c;
|
|
179
|
+
var _a, _b, _c, _d;
|
|
190
180
|
const { include, filters, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
191
181
|
const _queryParams = {};
|
|
192
182
|
if (include != null) {
|
|
@@ -205,8 +195,8 @@ class Accounts {
|
|
|
205
195
|
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
206
196
|
}
|
|
207
197
|
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(), "api-version": "4.0" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
208
|
-
const _response = yield core.fetcher({
|
|
209
|
-
url: core.url.join((
|
|
198
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
199
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/audit_logs`),
|
|
210
200
|
method: "GET",
|
|
211
201
|
headers: _headers,
|
|
212
202
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -9,6 +9,7 @@ export declare namespace Comments {
|
|
|
9
9
|
token: core.Supplier<core.BearerToken>;
|
|
10
10
|
/** Additional headers to include in requests. */
|
|
11
11
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
12
|
+
fetcher?: core.FetchFunction;
|
|
12
13
|
}
|
|
13
14
|
interface RequestOptions {
|
|
14
15
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -127,7 +128,8 @@ export declare class Comments {
|
|
|
127
128
|
* include_total_count: false
|
|
128
129
|
* })
|
|
129
130
|
*/
|
|
130
|
-
index(accountId: Frameio.Uuid, fileId: Frameio.Uuid, request?: Frameio.CommentsIndexRequest, requestOptions?: Comments.RequestOptions):
|
|
131
|
+
index(accountId: Frameio.Uuid, fileId: Frameio.Uuid, request?: Frameio.CommentsIndexRequest, requestOptions?: Comments.RequestOptions): core.HttpResponsePromise<Frameio.CommentsWithIncludesResponse>;
|
|
132
|
+
private __index;
|
|
131
133
|
/**
|
|
132
134
|
* Create a comment on a file. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
133
135
|
*
|