frameio 4.2.1 → 4.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.
Files changed (112) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +30 -30
  3. package/dist/cjs/Client.js +38 -38
  4. package/dist/cjs/api/resources/collections/client/Client.d.ts +17 -17
  5. package/dist/cjs/api/resources/collections/client/Client.js +30 -30
  6. package/dist/cjs/api/resources/files/client/Client.d.ts +96 -96
  7. package/dist/cjs/api/resources/files/client/Client.js +175 -175
  8. package/dist/cjs/api/resources/folders/client/Client.d.ts +11 -11
  9. package/dist/cjs/api/resources/folders/client/Client.js +29 -29
  10. package/dist/cjs/api/resources/metadata/client/Client.d.ts +27 -27
  11. package/dist/cjs/api/resources/metadata/client/Client.js +50 -50
  12. package/dist/cjs/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.ts +4 -4
  13. package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +24 -24
  14. package/dist/cjs/api/resources/projectPermissions/client/Client.js +87 -87
  15. package/dist/cjs/api/resources/projects/client/Client.d.ts +56 -0
  16. package/dist/cjs/api/resources/projects/client/Client.js +166 -0
  17. package/dist/cjs/api/resources/projects/client/requests/AccountProjectsIndexRequest.d.ts +24 -0
  18. package/dist/cjs/api/resources/projects/client/requests/AccountProjectsIndexRequest.js +3 -0
  19. package/dist/cjs/api/resources/projects/client/requests/InvitedProjectsIndexRequest.d.ts +24 -0
  20. package/dist/cjs/api/resources/projects/client/requests/InvitedProjectsIndexRequest.js +3 -0
  21. package/dist/cjs/api/resources/projects/client/requests/index.d.ts +2 -0
  22. package/dist/cjs/api/resources/projects/types/AccountProjectsIndexRequestSort.d.ts +8 -0
  23. package/dist/cjs/api/resources/projects/types/AccountProjectsIndexRequestSort.js +11 -0
  24. package/dist/cjs/api/resources/projects/types/InvitedProjectsIndexRequestSort.d.ts +8 -0
  25. package/dist/cjs/api/resources/projects/types/InvitedProjectsIndexRequestSort.js +11 -0
  26. package/dist/cjs/api/resources/projects/types/index.d.ts +2 -0
  27. package/dist/cjs/api/resources/projects/types/index.js +2 -0
  28. package/dist/cjs/api/resources/shares/client/Client.d.ts +49 -49
  29. package/dist/cjs/api/resources/shares/client/Client.js +146 -146
  30. package/dist/cjs/api/resources/shares/client/requests/AddAssetParams.d.ts +1 -1
  31. package/dist/cjs/api/resources/shares/client/requests/CreateShareParams.d.ts +2 -2
  32. package/dist/cjs/api/resources/shares/client/requests/UpdateShareParams.d.ts +1 -1
  33. package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +64 -64
  34. package/dist/cjs/api/resources/versionStacks/client/Client.js +121 -121
  35. package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.ts +1 -1
  36. package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +24 -24
  37. package/dist/cjs/api/resources/workspacePermissions/client/Client.js +87 -87
  38. package/dist/cjs/api/resources/workspaces/client/Client.d.ts +34 -34
  39. package/dist/cjs/api/resources/workspaces/client/Client.js +141 -141
  40. package/dist/cjs/api/types/AuditLogwithIncludes.d.ts +6 -0
  41. package/dist/cjs/api/types/AuditLogwithIncludes.js +6 -0
  42. package/dist/cjs/api/types/Filters.d.ts +6 -0
  43. package/dist/cjs/api/types/Filters.js +6 -0
  44. package/dist/cjs/api/types/LongTextDefinition.d.ts +0 -16
  45. package/dist/cjs/api/types/LongTextDefinition.js +0 -17
  46. package/dist/cjs/api/types/NumberDefinition.d.ts +16 -0
  47. package/dist/cjs/api/types/NumberDefinition.js +13 -0
  48. package/dist/cjs/api/types/TextDefinition.d.ts +0 -16
  49. package/dist/cjs/api/types/TextDefinition.js +0 -17
  50. package/dist/cjs/api/types/ToggleDefinition.d.ts +16 -0
  51. package/dist/cjs/api/types/ToggleDefinition.js +17 -0
  52. package/dist/cjs/api/types/UserSingleDefinition.d.ts +0 -16
  53. package/dist/cjs/api/types/UserSingleDefinition.js +0 -13
  54. package/dist/cjs/version.d.ts +1 -1
  55. package/dist/cjs/version.js +1 -1
  56. package/dist/esm/BaseClient.mjs +2 -2
  57. package/dist/esm/Client.d.mts +30 -30
  58. package/dist/esm/Client.mjs +38 -38
  59. package/dist/esm/api/resources/collections/client/Client.d.mts +17 -17
  60. package/dist/esm/api/resources/collections/client/Client.mjs +30 -30
  61. package/dist/esm/api/resources/files/client/Client.d.mts +96 -96
  62. package/dist/esm/api/resources/files/client/Client.mjs +175 -175
  63. package/dist/esm/api/resources/folders/client/Client.d.mts +11 -11
  64. package/dist/esm/api/resources/folders/client/Client.mjs +29 -29
  65. package/dist/esm/api/resources/metadata/client/Client.d.mts +27 -27
  66. package/dist/esm/api/resources/metadata/client/Client.mjs +50 -50
  67. package/dist/esm/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.mts +4 -4
  68. package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +24 -24
  69. package/dist/esm/api/resources/projectPermissions/client/Client.mjs +87 -87
  70. package/dist/esm/api/resources/projects/client/Client.d.mts +56 -0
  71. package/dist/esm/api/resources/projects/client/Client.mjs +166 -0
  72. package/dist/esm/api/resources/projects/client/requests/AccountProjectsIndexRequest.d.mts +24 -0
  73. package/dist/esm/api/resources/projects/client/requests/AccountProjectsIndexRequest.mjs +2 -0
  74. package/dist/esm/api/resources/projects/client/requests/InvitedProjectsIndexRequest.d.mts +24 -0
  75. package/dist/esm/api/resources/projects/client/requests/InvitedProjectsIndexRequest.mjs +2 -0
  76. package/dist/esm/api/resources/projects/client/requests/index.d.mts +2 -0
  77. package/dist/esm/api/resources/projects/types/AccountProjectsIndexRequestSort.d.mts +8 -0
  78. package/dist/esm/api/resources/projects/types/AccountProjectsIndexRequestSort.mjs +8 -0
  79. package/dist/esm/api/resources/projects/types/InvitedProjectsIndexRequestSort.d.mts +8 -0
  80. package/dist/esm/api/resources/projects/types/InvitedProjectsIndexRequestSort.mjs +8 -0
  81. package/dist/esm/api/resources/projects/types/index.d.mts +2 -0
  82. package/dist/esm/api/resources/projects/types/index.mjs +2 -0
  83. package/dist/esm/api/resources/shares/client/Client.d.mts +49 -49
  84. package/dist/esm/api/resources/shares/client/Client.mjs +146 -146
  85. package/dist/esm/api/resources/shares/client/requests/AddAssetParams.d.mts +1 -1
  86. package/dist/esm/api/resources/shares/client/requests/CreateShareParams.d.mts +2 -2
  87. package/dist/esm/api/resources/shares/client/requests/UpdateShareParams.d.mts +1 -1
  88. package/dist/esm/api/resources/versionStacks/client/Client.d.mts +64 -64
  89. package/dist/esm/api/resources/versionStacks/client/Client.mjs +121 -121
  90. package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.mts +1 -1
  91. package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +24 -24
  92. package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +87 -87
  93. package/dist/esm/api/resources/workspaces/client/Client.d.mts +34 -34
  94. package/dist/esm/api/resources/workspaces/client/Client.mjs +141 -141
  95. package/dist/esm/api/types/AuditLogwithIncludes.d.mts +6 -0
  96. package/dist/esm/api/types/AuditLogwithIncludes.mjs +6 -0
  97. package/dist/esm/api/types/Filters.d.mts +6 -0
  98. package/dist/esm/api/types/Filters.mjs +6 -0
  99. package/dist/esm/api/types/LongTextDefinition.d.mts +0 -16
  100. package/dist/esm/api/types/LongTextDefinition.mjs +1 -16
  101. package/dist/esm/api/types/NumberDefinition.d.mts +16 -0
  102. package/dist/esm/api/types/NumberDefinition.mjs +13 -0
  103. package/dist/esm/api/types/TextDefinition.d.mts +0 -16
  104. package/dist/esm/api/types/TextDefinition.mjs +1 -16
  105. package/dist/esm/api/types/ToggleDefinition.d.mts +16 -0
  106. package/dist/esm/api/types/ToggleDefinition.mjs +16 -1
  107. package/dist/esm/api/types/UserSingleDefinition.d.mts +0 -16
  108. package/dist/esm/api/types/UserSingleDefinition.mjs +0 -13
  109. package/dist/esm/version.d.mts +1 -1
  110. package/dist/esm/version.mjs +1 -1
  111. package/package.json +112 -112
  112. package/reference.md +1392 -1234
@@ -58,93 +58,6 @@ class ProjectPermissionsClient {
58
58
  constructor(options) {
59
59
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
60
60
  }
61
- /**
62
- * List user roles for a given project. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
63
- *
64
- * @param {Frameio.FrameOrAdobeId} account_id
65
- * @param {Frameio.FrameOrAdobeId} project_id
66
- * @param {Frameio.ProjectPermissionsIndexRequest} request
67
- * @param {ProjectPermissionsClient.RequestOptions} requestOptions - Request-specific configuration.
68
- *
69
- * @throws {@link Frameio.BadRequestError}
70
- * @throws {@link Frameio.UnauthorizedError}
71
- * @throws {@link Frameio.ForbiddenError}
72
- * @throws {@link Frameio.NotFoundError}
73
- * @throws {@link Frameio.ConflictError}
74
- * @throws {@link Frameio.UnprocessableEntityError}
75
- * @throws {@link Frameio.TooManyRequestsError}
76
- *
77
- * @example
78
- * await client.projectPermissions.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
79
- * include_deactivated: true,
80
- * sort: "role_asc",
81
- * after: "<opaque_cursor>",
82
- * page_size: 10,
83
- * include_total_count: false
84
- * })
85
- */
86
- index(account_id_1, project_id_1) {
87
- return __awaiter(this, arguments, void 0, function* (account_id, project_id, _request = {}, requestOptions) {
88
- var _a, _b;
89
- const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
90
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
91
- const _authRequest = yield this._options.authProvider.getAuthRequest();
92
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
93
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
94
- url: _requestUrl,
95
- method: "GET",
96
- headers: _headers,
97
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
98
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
99
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
100
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
101
- logging: this._options.logging,
102
- });
103
- if (_response.ok) {
104
- return {
105
- data: _response.body,
106
- rawResponse: _response.rawResponse,
107
- };
108
- }
109
- if (_response.error.reason === "status-code") {
110
- switch (_response.error.statusCode) {
111
- case 400:
112
- throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
113
- case 401:
114
- throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
115
- case 403:
116
- throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
117
- case 404:
118
- throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
119
- case 409:
120
- throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
121
- case 422:
122
- throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
123
- case 429:
124
- throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
125
- default:
126
- throw new errors.FrameioError({
127
- statusCode: _response.error.statusCode,
128
- body: _response.error.body,
129
- rawResponse: _response.rawResponse,
130
- });
131
- }
132
- }
133
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/projects/{project_id}/users");
134
- }));
135
- const _baseUrl = (_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.FrameioEnvironment.Default;
136
- const dataWithRawResponse = yield list(core.url.join(_baseUrl, `v4/accounts/${core.url.encodePathParam(account_id)}/projects/${core.url.encodePathParam(project_id)}/users`)).withRawResponse();
137
- return new core.Page({
138
- response: dataWithRawResponse.data,
139
- rawResponse: dataWithRawResponse.rawResponse,
140
- hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null && (response === null || response === void 0 ? void 0 : response.links.next) !== "",
141
- getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
142
- loadPage: (response) => {
143
- return list(core.url.join(_baseUrl, response === null || response === void 0 ? void 0 : response.links.next));
144
- },
145
- });
146
- });
147
- }
148
61
  /**
149
62
  * Remove a user from a given project. <br/>Rate Limits: 60 calls per 1.00 minute(s) per account_user
150
63
  *
@@ -290,5 +203,92 @@ class ProjectPermissionsClient {
290
203
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v4/accounts/{account_id}/projects/{project_id}/users/{user_id}");
291
204
  });
292
205
  }
206
+ /**
207
+ * List user roles for a given project. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
208
+ *
209
+ * @param {Frameio.FrameOrAdobeId} account_id
210
+ * @param {Frameio.FrameOrAdobeId} project_id
211
+ * @param {Frameio.ProjectPermissionsIndexRequest} request
212
+ * @param {ProjectPermissionsClient.RequestOptions} requestOptions - Request-specific configuration.
213
+ *
214
+ * @throws {@link Frameio.BadRequestError}
215
+ * @throws {@link Frameio.UnauthorizedError}
216
+ * @throws {@link Frameio.ForbiddenError}
217
+ * @throws {@link Frameio.NotFoundError}
218
+ * @throws {@link Frameio.ConflictError}
219
+ * @throws {@link Frameio.UnprocessableEntityError}
220
+ * @throws {@link Frameio.TooManyRequestsError}
221
+ *
222
+ * @example
223
+ * await client.projectPermissions.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
224
+ * include_deactivated: true,
225
+ * sort: "role_asc",
226
+ * after: "<opaque_cursor>",
227
+ * page_size: 10,
228
+ * include_total_count: false
229
+ * })
230
+ */
231
+ index(account_id_1, project_id_1) {
232
+ return __awaiter(this, arguments, void 0, function* (account_id, project_id, _request = {}, requestOptions) {
233
+ var _a, _b;
234
+ const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
235
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
236
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
237
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
238
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
239
+ url: _requestUrl,
240
+ method: "GET",
241
+ headers: _headers,
242
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
243
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
244
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
245
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
246
+ logging: this._options.logging,
247
+ });
248
+ if (_response.ok) {
249
+ return {
250
+ data: _response.body,
251
+ rawResponse: _response.rawResponse,
252
+ };
253
+ }
254
+ if (_response.error.reason === "status-code") {
255
+ switch (_response.error.statusCode) {
256
+ case 400:
257
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
258
+ case 401:
259
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
260
+ case 403:
261
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
262
+ case 404:
263
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
264
+ case 409:
265
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
266
+ case 422:
267
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
268
+ case 429:
269
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
270
+ default:
271
+ throw new errors.FrameioError({
272
+ statusCode: _response.error.statusCode,
273
+ body: _response.error.body,
274
+ rawResponse: _response.rawResponse,
275
+ });
276
+ }
277
+ }
278
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/projects/{project_id}/users");
279
+ }));
280
+ const _baseUrl = (_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.FrameioEnvironment.Default;
281
+ const dataWithRawResponse = yield list(core.url.join(_baseUrl, `v4/accounts/${core.url.encodePathParam(account_id)}/projects/${core.url.encodePathParam(project_id)}/users`)).withRawResponse();
282
+ return new core.Page({
283
+ response: dataWithRawResponse.data,
284
+ rawResponse: dataWithRawResponse.rawResponse,
285
+ hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null && (response === null || response === void 0 ? void 0 : response.links.next) !== "",
286
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
287
+ loadPage: (response) => {
288
+ return list(core.url.join(_baseUrl, response === null || response === void 0 ? void 0 : response.links.next));
289
+ },
290
+ });
291
+ });
292
+ }
293
293
  }
294
294
  exports.ProjectPermissionsClient = ProjectPermissionsClient;
@@ -83,6 +83,32 @@ export declare class ProjectsClient {
83
83
  */
84
84
  update(account_id: Frameio.FrameOrAdobeId, project_id: Frameio.FrameOrAdobeId, request: Frameio.ProjectUpdateParams, requestOptions?: ProjectsClient.RequestOptions): core.HttpResponsePromise<Frameio.ProjectResponse>;
85
85
  private __update;
86
+ /**
87
+ * List all projects the authenticated user has access to within the specified account. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
88
+ *
89
+ * @param {Frameio.FrameOrAdobeId} account_id
90
+ * @param {Frameio.AccountProjectsIndexRequest} request
91
+ * @param {ProjectsClient.RequestOptions} requestOptions - Request-specific configuration.
92
+ *
93
+ * @throws {@link Frameio.BadRequestError}
94
+ * @throws {@link Frameio.UnauthorizedError}
95
+ * @throws {@link Frameio.ForbiddenError}
96
+ * @throws {@link Frameio.NotFoundError}
97
+ * @throws {@link Frameio.ConflictError}
98
+ * @throws {@link Frameio.UnprocessableEntityError}
99
+ * @throws {@link Frameio.TooManyRequestsError}
100
+ *
101
+ * @example
102
+ * await client.projects.accountProjectsIndex("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
103
+ * include: "owner",
104
+ * sort: "name_asc",
105
+ * after: "<opaque_cursor>",
106
+ * page_size: 10,
107
+ * include_total_count: false
108
+ * })
109
+ */
110
+ accountProjectsIndex(account_id: Frameio.FrameOrAdobeId, request?: Frameio.AccountProjectsIndexRequest, requestOptions?: ProjectsClient.RequestOptions): core.HttpResponsePromise<Frameio.ProjectsWithIncludesResponse>;
111
+ private __accountProjectsIndex;
86
112
  /**
87
113
  * List projects in a given workspace. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
88
114
  *
@@ -135,4 +161,34 @@ export declare class ProjectsClient {
135
161
  */
136
162
  create(account_id: Frameio.FrameOrAdobeId, workspace_id: Frameio.Uuid, request: Frameio.ProjectParams, requestOptions?: ProjectsClient.RequestOptions): core.HttpResponsePromise<Frameio.ProjectResponse>;
137
163
  private __create;
164
+ /**
165
+ * List projects that the current user has been invited to within the specified account,
166
+ * but does not have workspace-level access to. These are projects where the user has
167
+ * project-specific collaborator access without broader team/workspace permissions.
168
+ *
169
+ * Rate Limits: 100 calls per 1.00 minute(s) per account_user
170
+ *
171
+ * @param {Frameio.FrameOrAdobeId} account_id
172
+ * @param {Frameio.InvitedProjectsIndexRequest} request
173
+ * @param {ProjectsClient.RequestOptions} requestOptions - Request-specific configuration.
174
+ *
175
+ * @throws {@link Frameio.BadRequestError}
176
+ * @throws {@link Frameio.UnauthorizedError}
177
+ * @throws {@link Frameio.ForbiddenError}
178
+ * @throws {@link Frameio.NotFoundError}
179
+ * @throws {@link Frameio.ConflictError}
180
+ * @throws {@link Frameio.UnprocessableEntityError}
181
+ * @throws {@link Frameio.TooManyRequestsError}
182
+ *
183
+ * @example
184
+ * await client.projects.invitedProjectsIndex("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
185
+ * include: "owner",
186
+ * sort: "name_asc",
187
+ * after: "<opaque_cursor>",
188
+ * page_size: 10,
189
+ * include_total_count: false
190
+ * })
191
+ */
192
+ invitedProjectsIndex(account_id: Frameio.FrameOrAdobeId, request?: Frameio.InvitedProjectsIndexRequest, requestOptions?: ProjectsClient.RequestOptions): core.HttpResponsePromise<Frameio.ProjectsWithIncludesResponse>;
193
+ private __invitedProjectsIndex;
138
194
  }
@@ -276,6 +276,87 @@ class ProjectsClient {
276
276
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v4/accounts/{account_id}/projects/{project_id}");
277
277
  });
278
278
  }
279
+ /**
280
+ * List all projects the authenticated user has access to within the specified account. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
281
+ *
282
+ * @param {Frameio.FrameOrAdobeId} account_id
283
+ * @param {Frameio.AccountProjectsIndexRequest} request
284
+ * @param {ProjectsClient.RequestOptions} requestOptions - Request-specific configuration.
285
+ *
286
+ * @throws {@link Frameio.BadRequestError}
287
+ * @throws {@link Frameio.UnauthorizedError}
288
+ * @throws {@link Frameio.ForbiddenError}
289
+ * @throws {@link Frameio.NotFoundError}
290
+ * @throws {@link Frameio.ConflictError}
291
+ * @throws {@link Frameio.UnprocessableEntityError}
292
+ * @throws {@link Frameio.TooManyRequestsError}
293
+ *
294
+ * @example
295
+ * await client.projects.accountProjectsIndex("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
296
+ * include: "owner",
297
+ * sort: "name_asc",
298
+ * after: "<opaque_cursor>",
299
+ * page_size: 10,
300
+ * include_total_count: false
301
+ * })
302
+ */
303
+ accountProjectsIndex(account_id, request = {}, requestOptions) {
304
+ return core.HttpResponsePromise.fromPromise(this.__accountProjectsIndex(account_id, request, requestOptions));
305
+ }
306
+ __accountProjectsIndex(account_id_1) {
307
+ return __awaiter(this, arguments, void 0, function* (account_id, request = {}, requestOptions) {
308
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
309
+ const { include, sort, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
310
+ const _queryParams = {
311
+ include: include != null ? include : undefined,
312
+ sort: sort != null ? sort : undefined,
313
+ after,
314
+ page_size: pageSize,
315
+ include_total_count: includeTotalCount,
316
+ };
317
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
318
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
319
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
320
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/projects`),
321
+ method: "GET",
322
+ headers: _headers,
323
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
324
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
325
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
326
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
327
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
328
+ logging: this._options.logging,
329
+ });
330
+ if (_response.ok) {
331
+ return { data: _response.body, rawResponse: _response.rawResponse };
332
+ }
333
+ if (_response.error.reason === "status-code") {
334
+ switch (_response.error.statusCode) {
335
+ case 400:
336
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
337
+ case 401:
338
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
339
+ case 403:
340
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
341
+ case 404:
342
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
343
+ case 409:
344
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
345
+ case 422:
346
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
347
+ case 429:
348
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
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
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/projects");
358
+ });
359
+ }
279
360
  /**
280
361
  * List projects in a given workspace. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
281
362
  *
@@ -439,5 +520,90 @@ class ProjectsClient {
439
520
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/workspaces/{workspace_id}/projects");
440
521
  });
441
522
  }
523
+ /**
524
+ * List projects that the current user has been invited to within the specified account,
525
+ * but does not have workspace-level access to. These are projects where the user has
526
+ * project-specific collaborator access without broader team/workspace permissions.
527
+ *
528
+ * Rate Limits: 100 calls per 1.00 minute(s) per account_user
529
+ *
530
+ * @param {Frameio.FrameOrAdobeId} account_id
531
+ * @param {Frameio.InvitedProjectsIndexRequest} request
532
+ * @param {ProjectsClient.RequestOptions} requestOptions - Request-specific configuration.
533
+ *
534
+ * @throws {@link Frameio.BadRequestError}
535
+ * @throws {@link Frameio.UnauthorizedError}
536
+ * @throws {@link Frameio.ForbiddenError}
537
+ * @throws {@link Frameio.NotFoundError}
538
+ * @throws {@link Frameio.ConflictError}
539
+ * @throws {@link Frameio.UnprocessableEntityError}
540
+ * @throws {@link Frameio.TooManyRequestsError}
541
+ *
542
+ * @example
543
+ * await client.projects.invitedProjectsIndex("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
544
+ * include: "owner",
545
+ * sort: "name_asc",
546
+ * after: "<opaque_cursor>",
547
+ * page_size: 10,
548
+ * include_total_count: false
549
+ * })
550
+ */
551
+ invitedProjectsIndex(account_id, request = {}, requestOptions) {
552
+ return core.HttpResponsePromise.fromPromise(this.__invitedProjectsIndex(account_id, request, requestOptions));
553
+ }
554
+ __invitedProjectsIndex(account_id_1) {
555
+ return __awaiter(this, arguments, void 0, function* (account_id, request = {}, requestOptions) {
556
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
557
+ const { include, sort, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
558
+ const _queryParams = {
559
+ include: include != null ? include : undefined,
560
+ sort: sort != null ? sort : undefined,
561
+ after,
562
+ page_size: pageSize,
563
+ include_total_count: includeTotalCount,
564
+ };
565
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
566
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
567
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
568
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/invited_projects`),
569
+ method: "GET",
570
+ headers: _headers,
571
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
572
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
573
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
574
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
575
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
576
+ logging: this._options.logging,
577
+ });
578
+ if (_response.ok) {
579
+ return { data: _response.body, rawResponse: _response.rawResponse };
580
+ }
581
+ if (_response.error.reason === "status-code") {
582
+ switch (_response.error.statusCode) {
583
+ case 400:
584
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
585
+ case 401:
586
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
587
+ case 403:
588
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
589
+ case 404:
590
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
591
+ case 409:
592
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
593
+ case 422:
594
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
595
+ case 429:
596
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
597
+ default:
598
+ throw new errors.FrameioError({
599
+ statusCode: _response.error.statusCode,
600
+ body: _response.error.body,
601
+ rawResponse: _response.rawResponse,
602
+ });
603
+ }
604
+ }
605
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/invited_projects");
606
+ });
607
+ }
442
608
  }
443
609
  exports.ProjectsClient = ProjectsClient;
@@ -0,0 +1,24 @@
1
+ import type * as Frameio from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * include: "owner",
6
+ * sort: "name_asc",
7
+ * after: "<opaque_cursor>",
8
+ * page_size: 10,
9
+ * include_total_count: false
10
+ * }
11
+ */
12
+ export interface AccountProjectsIndexRequest {
13
+ include?: "owner";
14
+ /** Sort projects by query params */
15
+ sort?: Frameio.AccountProjectsIndexRequestSort;
16
+ /**
17
+ * Opaque Cursor query param for requests returning paginated results.
18
+ * <br/>
19
+ * NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
20
+ */
21
+ after?: Frameio.RequestAfterOpaqueCursor | undefined;
22
+ page_size?: Frameio.RequestPageSize;
23
+ include_total_count?: Frameio.IncludeTotalCount;
24
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ import type * as Frameio from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * include: "owner",
6
+ * sort: "name_asc",
7
+ * after: "<opaque_cursor>",
8
+ * page_size: 10,
9
+ * include_total_count: false
10
+ * }
11
+ */
12
+ export interface InvitedProjectsIndexRequest {
13
+ include?: "owner";
14
+ /** Sort projects by query params */
15
+ sort?: Frameio.InvitedProjectsIndexRequestSort;
16
+ /**
17
+ * Opaque Cursor query param for requests returning paginated results.
18
+ * <br/>
19
+ * NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
20
+ */
21
+ after?: Frameio.RequestAfterOpaqueCursor | undefined;
22
+ page_size?: Frameio.RequestPageSize;
23
+ include_total_count?: Frameio.IncludeTotalCount;
24
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,5 @@
1
+ export type { AccountProjectsIndexRequest } from "./AccountProjectsIndexRequest.js";
2
+ export type { InvitedProjectsIndexRequest } from "./InvitedProjectsIndexRequest.js";
1
3
  export type { ProjectParams } from "./ProjectParams.js";
2
4
  export type { ProjectsIndexRequest } from "./ProjectsIndexRequest.js";
3
5
  export type { ProjectsShowRequest } from "./ProjectsShowRequest.js";
@@ -0,0 +1,8 @@
1
+ /** Sort query parameter for projects */
2
+ export declare const AccountProjectsIndexRequestSort: {
3
+ readonly NameAsc: "name_asc";
4
+ readonly CreatedAtAsc: "created_at_asc";
5
+ readonly NameDesc: "name_desc";
6
+ readonly CreatedAtDesc: "created_at_desc";
7
+ };
8
+ export type AccountProjectsIndexRequestSort = (typeof AccountProjectsIndexRequestSort)[keyof typeof AccountProjectsIndexRequestSort];
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AccountProjectsIndexRequestSort = void 0;
5
+ /** Sort query parameter for projects */
6
+ exports.AccountProjectsIndexRequestSort = {
7
+ NameAsc: "name_asc",
8
+ CreatedAtAsc: "created_at_asc",
9
+ NameDesc: "name_desc",
10
+ CreatedAtDesc: "created_at_desc",
11
+ };
@@ -0,0 +1,8 @@
1
+ /** Sort query parameter for projects */
2
+ export declare const InvitedProjectsIndexRequestSort: {
3
+ readonly NameAsc: "name_asc";
4
+ readonly CreatedAtAsc: "created_at_asc";
5
+ readonly NameDesc: "name_desc";
6
+ readonly CreatedAtDesc: "created_at_desc";
7
+ };
8
+ export type InvitedProjectsIndexRequestSort = (typeof InvitedProjectsIndexRequestSort)[keyof typeof InvitedProjectsIndexRequestSort];
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.InvitedProjectsIndexRequestSort = void 0;
5
+ /** Sort query parameter for projects */
6
+ exports.InvitedProjectsIndexRequestSort = {
7
+ NameAsc: "name_asc",
8
+ CreatedAtAsc: "created_at_asc",
9
+ NameDesc: "name_desc",
10
+ CreatedAtDesc: "created_at_desc",
11
+ };
@@ -1 +1,3 @@
1
+ export * from "./AccountProjectsIndexRequestSort.js";
2
+ export * from "./InvitedProjectsIndexRequestSort.js";
1
3
  export * from "./ProjectsIndexRequestSort.js";
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AccountProjectsIndexRequestSort.js"), exports);
18
+ __exportStar(require("./InvitedProjectsIndexRequestSort.js"), exports);
17
19
  __exportStar(require("./ProjectsIndexRequestSort.js"), exports);