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.
Files changed (68) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/accountPermissions/client/Client.d.ts +2 -1
  3. package/dist/cjs/api/resources/accountPermissions/client/Client.js +66 -79
  4. package/dist/cjs/api/resources/accounts/client/Client.d.ts +2 -1
  5. package/dist/cjs/api/resources/accounts/client/Client.js +63 -73
  6. package/dist/cjs/api/resources/comments/client/Client.d.ts +2 -1
  7. package/dist/cjs/api/resources/comments/client/Client.js +69 -82
  8. package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +2 -1
  9. package/dist/cjs/api/resources/projectPermissions/client/Client.js +66 -79
  10. package/dist/cjs/api/resources/projects/client/Client.d.ts +2 -1
  11. package/dist/cjs/api/resources/projects/client/Client.js +66 -79
  12. package/dist/cjs/api/resources/shares/client/Client.d.ts +4 -2
  13. package/dist/cjs/api/resources/shares/client/Client.js +126 -149
  14. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +2 -1
  15. package/dist/cjs/api/resources/webhooks/client/Client.js +66 -79
  16. package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +2 -1
  17. package/dist/cjs/api/resources/workspacePermissions/client/Client.js +66 -79
  18. package/dist/cjs/api/resources/workspaces/client/Client.d.ts +2 -1
  19. package/dist/cjs/api/resources/workspaces/client/Client.js +69 -79
  20. package/dist/cjs/core/index.d.ts +0 -2
  21. package/dist/cjs/core/index.js +0 -2
  22. package/dist/cjs/version.d.ts +1 -1
  23. package/dist/cjs/version.js +1 -1
  24. package/dist/esm/Client.mjs +2 -2
  25. package/dist/esm/api/resources/accountPermissions/client/Client.d.mts +2 -1
  26. package/dist/esm/api/resources/accountPermissions/client/Client.mjs +66 -79
  27. package/dist/esm/api/resources/accounts/client/Client.d.mts +2 -1
  28. package/dist/esm/api/resources/accounts/client/Client.mjs +63 -73
  29. package/dist/esm/api/resources/comments/client/Client.d.mts +2 -1
  30. package/dist/esm/api/resources/comments/client/Client.mjs +69 -82
  31. package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +2 -1
  32. package/dist/esm/api/resources/projectPermissions/client/Client.mjs +66 -79
  33. package/dist/esm/api/resources/projects/client/Client.d.mts +2 -1
  34. package/dist/esm/api/resources/projects/client/Client.mjs +66 -79
  35. package/dist/esm/api/resources/shares/client/Client.d.mts +4 -2
  36. package/dist/esm/api/resources/shares/client/Client.mjs +126 -149
  37. package/dist/esm/api/resources/webhooks/client/Client.d.mts +2 -1
  38. package/dist/esm/api/resources/webhooks/client/Client.mjs +66 -79
  39. package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +2 -1
  40. package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +66 -79
  41. package/dist/esm/api/resources/workspaces/client/Client.d.mts +2 -1
  42. package/dist/esm/api/resources/workspaces/client/Client.mjs +69 -79
  43. package/dist/esm/core/index.d.mts +0 -2
  44. package/dist/esm/core/index.mjs +0 -2
  45. package/dist/esm/version.d.mts +1 -1
  46. package/dist/esm/version.mjs +1 -1
  47. package/package.json +1 -1
  48. package/reference.md +29 -203
  49. package/dist/cjs/core/pagination/Page.d.ts +0 -32
  50. package/dist/cjs/core/pagination/Page.js +0 -100
  51. package/dist/cjs/core/pagination/Pageable.d.ts +0 -14
  52. package/dist/cjs/core/pagination/Pageable.js +0 -10
  53. package/dist/cjs/core/pagination/index.d.ts +0 -2
  54. package/dist/cjs/core/pagination/index.js +0 -7
  55. package/dist/cjs/core/utils/index.d.ts +0 -1
  56. package/dist/cjs/core/utils/index.js +0 -5
  57. package/dist/cjs/core/utils/setObjectProperty.d.ts +0 -11
  58. package/dist/cjs/core/utils/setObjectProperty.js +0 -42
  59. package/dist/esm/core/pagination/Page.d.mts +0 -32
  60. package/dist/esm/core/pagination/Page.mjs +0 -96
  61. package/dist/esm/core/pagination/Pageable.d.mts +0 -14
  62. package/dist/esm/core/pagination/Pageable.mjs +0 -6
  63. package/dist/esm/core/pagination/index.d.mts +0 -2
  64. package/dist/esm/core/pagination/index.mjs +0 -2
  65. package/dist/esm/core/utils/index.d.mts +0 -1
  66. package/dist/esm/core/utils/index.mjs +0 -1
  67. package/dist/esm/core/utils/setObjectProperty.d.mts +0 -11
  68. package/dist/esm/core/utils/setObjectProperty.mjs +0 -39
package/reference.md CHANGED
@@ -340,7 +340,7 @@ await client.metadataFields.metadataFieldDefinitionsCreate("b2702c44-c6da-4bb6-8
340
340
 
341
341
  ## Project Permissions
342
342
 
343
- <details><summary><code>client.projectPermissions.<a href="/src/api/resources/projectPermissions/client/Client.ts">index</a>(accountId, projectId, { ...params }) -> core.Page&lt;Frameio.UserRole&gt;</code></summary>
343
+ <details><summary><code>client.projectPermissions.<a href="/src/api/resources/projectPermissions/client/Client.ts">index</a>(accountId, projectId, { ...params }) -> Frameio.ProjectUserRolesResponse</code></summary>
344
344
  <dl>
345
345
  <dd>
346
346
 
@@ -368,34 +368,12 @@ List user roles for a given project. <br>Rate Limits: 100 calls per 1.00 minute(
368
368
  <dd>
369
369
 
370
370
  ```typescript
371
- const response = await client.projectPermissions.index(
372
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
373
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
374
- {
375
- include_deactivated: true,
376
- after: "<opaque_cursor>",
377
- page_size: 10,
378
- include_total_count: false,
379
- },
380
- );
381
- for await (const item of response) {
382
- console.log(item);
383
- }
384
-
385
- // Or you can manually iterate page-by-page
386
- let page = await client.projectPermissions.index(
387
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
388
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
389
- {
390
- include_deactivated: true,
391
- after: "<opaque_cursor>",
392
- page_size: 10,
393
- include_total_count: false,
394
- },
395
- );
396
- while (page.hasNextPage()) {
397
- page = page.getNextPage();
398
- }
371
+ await client.projectPermissions.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
372
+ include_deactivated: true,
373
+ after: "<opaque_cursor>",
374
+ page_size: 10,
375
+ include_total_count: false,
376
+ });
399
377
  ```
400
378
 
401
379
  </dd>
@@ -1809,7 +1787,7 @@ await client.versionStacks.move("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c4
1809
1787
 
1810
1788
  ## Account Permissions
1811
1789
 
1812
- <details><summary><code>client.accountPermissions.<a href="/src/api/resources/accountPermissions/client/Client.ts">index</a>(accountId, { ...params }) -> core.Page&lt;Frameio.AccountUserRole&gt;</code></summary>
1790
+ <details><summary><code>client.accountPermissions.<a href="/src/api/resources/accountPermissions/client/Client.ts">index</a>(accountId, { ...params }) -> Frameio.AccountUserRolesResponse</code></summary>
1813
1791
  <dl>
1814
1792
  <dd>
1815
1793
 
@@ -1837,26 +1815,12 @@ List user roles for a given account. <br>Rate Limits: 100 calls per 1.00 minute(
1837
1815
  <dd>
1838
1816
 
1839
1817
  ```typescript
1840
- const response = await client.accountPermissions.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
1841
- include_deactivated: true,
1842
- after: "<opaque_cursor>",
1843
- page_size: 10,
1844
- include_total_count: false,
1845
- });
1846
- for await (const item of response) {
1847
- console.log(item);
1848
- }
1849
-
1850
- // Or you can manually iterate page-by-page
1851
- let page = await client.accountPermissions.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
1818
+ await client.accountPermissions.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
1852
1819
  include_deactivated: true,
1853
1820
  after: "<opaque_cursor>",
1854
1821
  page_size: 10,
1855
1822
  include_total_count: false,
1856
1823
  });
1857
- while (page.hasNextPage()) {
1858
- page = page.getNextPage();
1859
- }
1860
1824
  ```
1861
1825
 
1862
1826
  </dd>
@@ -1901,7 +1865,7 @@ while (page.hasNextPage()) {
1901
1865
 
1902
1866
  ## Accounts
1903
1867
 
1904
- <details><summary><code>client.accounts.<a href="/src/api/resources/accounts/client/Client.ts">index</a>({ ...params }) -> core.Page&lt;Frameio.Account&gt;</code></summary>
1868
+ <details><summary><code>client.accounts.<a href="/src/api/resources/accounts/client/Client.ts">index</a>({ ...params }) -> Frameio.AccountsResponse</code></summary>
1905
1869
  <dl>
1906
1870
  <dd>
1907
1871
 
@@ -1929,24 +1893,11 @@ List accounts for the current user. <br>Rate Limits: 100 calls per 1.00 minute(s
1929
1893
  <dd>
1930
1894
 
1931
1895
  ```typescript
1932
- const response = await client.accounts.index({
1933
- after: "<opaque_cursor>",
1934
- page_size: 10,
1935
- include_total_count: false,
1936
- });
1937
- for await (const item of response) {
1938
- console.log(item);
1939
- }
1940
-
1941
- // Or you can manually iterate page-by-page
1942
- let page = await client.accounts.index({
1896
+ await client.accounts.index({
1943
1897
  after: "<opaque_cursor>",
1944
1898
  page_size: 10,
1945
1899
  include_total_count: false,
1946
1900
  });
1947
- while (page.hasNextPage()) {
1948
- page = page.getNextPage();
1949
- }
1950
1901
  ```
1951
1902
 
1952
1903
  </dd>
@@ -2300,7 +2251,7 @@ await client.comments.update("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c
2300
2251
  </dl>
2301
2252
  </details>
2302
2253
 
2303
- <details><summary><code>client.comments.<a href="/src/api/resources/comments/client/Client.ts">index</a>(accountId, fileId, { ...params }) -> core.Page&lt;Frameio.CommentWithIncludes&gt;</code></summary>
2254
+ <details><summary><code>client.comments.<a href="/src/api/resources/comments/client/Client.ts">index</a>(accountId, fileId, { ...params }) -> Frameio.CommentsWithIncludesResponse</code></summary>
2304
2255
  <dl>
2305
2256
  <dd>
2306
2257
 
@@ -2328,32 +2279,13 @@ List comments on a given asset. <br>Rate Limits: 100 calls per 1.00 minute(s) pe
2328
2279
  <dd>
2329
2280
 
2330
2281
  ```typescript
2331
- const response = await client.comments.index(
2332
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
2333
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
2334
- {
2335
- timestamp_as_timecode: true,
2336
- include: "owner",
2337
- after: "<opaque_cursor>",
2338
- page_size: 10,
2339
- include_total_count: false,
2340
- },
2341
- );
2342
- for await (const item of response) {
2343
- console.log(item);
2344
- }
2345
-
2346
- // Or you can manually iterate page-by-page
2347
- let page = await client.comments.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
2282
+ await client.comments.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
2348
2283
  timestamp_as_timecode: true,
2349
2284
  include: "owner",
2350
2285
  after: "<opaque_cursor>",
2351
2286
  page_size: 10,
2352
2287
  include_total_count: false,
2353
2288
  });
2354
- while (page.hasNextPage()) {
2355
- page = page.getNextPage();
2356
- }
2357
2289
  ```
2358
2290
 
2359
2291
  </dd>
@@ -2495,7 +2427,7 @@ await client.comments.create("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c
2495
2427
 
2496
2428
  ## Webhooks
2497
2429
 
2498
- <details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">index</a>(accountId, workspaceId, { ...params }) -> core.Page&lt;Frameio.WebhookWithIncludes&gt;</code></summary>
2430
+ <details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">index</a>(accountId, workspaceId, { ...params }) -> Frameio.WebhooksWithIncludesResponse</code></summary>
2499
2431
  <dl>
2500
2432
  <dd>
2501
2433
 
@@ -2523,30 +2455,12 @@ List webhooks for the given workspace. <br>Rate Limits: 100 calls per 1.00 minut
2523
2455
  <dd>
2524
2456
 
2525
2457
  ```typescript
2526
- const response = await client.webhooks.index(
2527
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
2528
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
2529
- {
2530
- include: "creator",
2531
- after: "<opaque_cursor>",
2532
- page_size: 10,
2533
- include_total_count: false,
2534
- },
2535
- );
2536
- for await (const item of response) {
2537
- console.log(item);
2538
- }
2539
-
2540
- // Or you can manually iterate page-by-page
2541
- let page = await client.webhooks.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
2458
+ await client.webhooks.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
2542
2459
  include: "creator",
2543
2460
  after: "<opaque_cursor>",
2544
2461
  page_size: 10,
2545
2462
  include_total_count: false,
2546
2463
  });
2547
- while (page.hasNextPage()) {
2548
- page = page.getNextPage();
2549
- }
2550
2464
  ```
2551
2465
 
2552
2466
  </dd>
@@ -2987,7 +2901,7 @@ await client.webhooks.update("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c
2987
2901
 
2988
2902
  ## Workspace Permissions
2989
2903
 
2990
- <details><summary><code>client.workspacePermissions.<a href="/src/api/resources/workspacePermissions/client/Client.ts">index</a>(accountId, workspaceId, { ...params }) -> core.Page&lt;Frameio.UserRole&gt;</code></summary>
2904
+ <details><summary><code>client.workspacePermissions.<a href="/src/api/resources/workspacePermissions/client/Client.ts">index</a>(accountId, workspaceId, { ...params }) -> Frameio.WorkspaceUserRolesResponse</code></summary>
2991
2905
  <dl>
2992
2906
  <dd>
2993
2907
 
@@ -3015,22 +2929,7 @@ List user roles for a given workspace. <br>Rate Limits: 100 calls per 1.00 minut
3015
2929
  <dd>
3016
2930
 
3017
2931
  ```typescript
3018
- const response = await client.workspacePermissions.index(
3019
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
3020
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
3021
- {
3022
- include_deactivated: true,
3023
- after: "<opaque_cursor>",
3024
- page_size: 10,
3025
- include_total_count: false,
3026
- },
3027
- );
3028
- for await (const item of response) {
3029
- console.log(item);
3030
- }
3031
-
3032
- // Or you can manually iterate page-by-page
3033
- let page = await client.workspacePermissions.index(
2932
+ await client.workspacePermissions.index(
3034
2933
  "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
3035
2934
  "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
3036
2935
  {
@@ -3040,9 +2939,6 @@ let page = await client.workspacePermissions.index(
3040
2939
  include_total_count: false,
3041
2940
  },
3042
2941
  );
3043
- while (page.hasNextPage()) {
3044
- page = page.getNextPage();
3045
- }
3046
2942
  ```
3047
2943
 
3048
2944
  </dd>
@@ -3505,7 +3401,7 @@ await client.shares.update("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6d
3505
3401
  </dl>
3506
3402
  </details>
3507
3403
 
3508
- <details><summary><code>client.shares.<a href="/src/api/resources/shares/client/Client.ts">listReviewers</a>(accountId, shareId, { ...params }) -> core.Page&lt;Frameio.User&gt;</code></summary>
3404
+ <details><summary><code>client.shares.<a href="/src/api/resources/shares/client/Client.ts">listReviewers</a>(accountId, shareId, { ...params }) -> Frameio.ShareReviewersResponse</code></summary>
3509
3405
  <dl>
3510
3406
  <dd>
3511
3407
 
@@ -3533,32 +3429,11 @@ List share reviewers. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_u
3533
3429
  <dd>
3534
3430
 
3535
3431
  ```typescript
3536
- const response = await client.shares.listReviewers(
3537
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
3538
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
3539
- {
3540
- after: "<opaque_cursor>",
3541
- page_size: 10,
3542
- include_total_count: false,
3543
- },
3544
- );
3545
- for await (const item of response) {
3546
- console.log(item);
3547
- }
3548
-
3549
- // Or you can manually iterate page-by-page
3550
- let page = await client.shares.listReviewers(
3551
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
3552
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
3553
- {
3554
- after: "<opaque_cursor>",
3555
- page_size: 10,
3556
- include_total_count: false,
3557
- },
3558
- );
3559
- while (page.hasNextPage()) {
3560
- page = page.getNextPage();
3561
- }
3432
+ await client.shares.listReviewers("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
3433
+ after: "<opaque_cursor>",
3434
+ page_size: 10,
3435
+ include_total_count: false,
3436
+ });
3562
3437
  ```
3563
3438
 
3564
3439
  </dd>
@@ -3954,7 +3829,7 @@ await client.shares.addAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c
3954
3829
  </dl>
3955
3830
  </details>
3956
3831
 
3957
- <details><summary><code>client.shares.<a href="/src/api/resources/shares/client/Client.ts">index</a>(accountId, projectId, { ...params }) -> core.Page&lt;Frameio.Share&gt;</code></summary>
3832
+ <details><summary><code>client.shares.<a href="/src/api/resources/shares/client/Client.ts">index</a>(accountId, projectId, { ...params }) -> Frameio.SharesResponse</code></summary>
3958
3833
  <dl>
3959
3834
  <dd>
3960
3835
 
@@ -3982,28 +3857,11 @@ List shares on a project. <br>Rate Limits: 100 calls per 1.00 minute(s) per acco
3982
3857
  <dd>
3983
3858
 
3984
3859
  ```typescript
3985
- const response = await client.shares.index(
3986
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
3987
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
3988
- {
3989
- after: "<opaque_cursor>",
3990
- page_size: 10,
3991
- include_total_count: false,
3992
- },
3993
- );
3994
- for await (const item of response) {
3995
- console.log(item);
3996
- }
3997
-
3998
- // Or you can manually iterate page-by-page
3999
- let page = await client.shares.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
3860
+ await client.shares.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
4000
3861
  after: "<opaque_cursor>",
4001
3862
  page_size: 10,
4002
3863
  include_total_count: false,
4003
3864
  });
4004
- while (page.hasNextPage()) {
4005
- page = page.getNextPage();
4006
- }
4007
3865
  ```
4008
3866
 
4009
3867
  </dd>
@@ -5446,7 +5304,7 @@ await client.projects.update("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c
5446
5304
  </dl>
5447
5305
  </details>
5448
5306
 
5449
- <details><summary><code>client.projects.<a href="/src/api/resources/projects/client/Client.ts">index</a>(accountId, workspaceId, { ...params }) -> core.Page&lt;Frameio.ProjectWithIncludes&gt;</code></summary>
5307
+ <details><summary><code>client.projects.<a href="/src/api/resources/projects/client/Client.ts">index</a>(accountId, workspaceId, { ...params }) -> Frameio.ProjectsWithIncludesResponse</code></summary>
5450
5308
  <dl>
5451
5309
  <dd>
5452
5310
 
@@ -5474,30 +5332,12 @@ List projects in a given workspace. <br>Rate Limits: 100 calls per 1.00 minute(s
5474
5332
  <dd>
5475
5333
 
5476
5334
  ```typescript
5477
- const response = await client.projects.index(
5478
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
5479
- "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
5480
- {
5481
- include: "owner",
5482
- after: "<opaque_cursor>",
5483
- page_size: 10,
5484
- include_total_count: false,
5485
- },
5486
- );
5487
- for await (const item of response) {
5488
- console.log(item);
5489
- }
5490
-
5491
- // Or you can manually iterate page-by-page
5492
- let page = await client.projects.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
5335
+ await client.projects.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
5493
5336
  include: "owner",
5494
5337
  after: "<opaque_cursor>",
5495
5338
  page_size: 10,
5496
5339
  include_total_count: false,
5497
5340
  });
5498
- while (page.hasNextPage()) {
5499
- page = page.getNextPage();
5500
- }
5501
5341
  ```
5502
5342
 
5503
5343
  </dd>
@@ -5869,7 +5709,7 @@ await client.workspaces.update("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44
5869
5709
  </dl>
5870
5710
  </details>
5871
5711
 
5872
- <details><summary><code>client.workspaces.<a href="/src/api/resources/workspaces/client/Client.ts">index</a>(accountId, { ...params }) -> core.Page&lt;Frameio.WorkspaceWithIncludes&gt;</code></summary>
5712
+ <details><summary><code>client.workspaces.<a href="/src/api/resources/workspaces/client/Client.ts">index</a>(accountId, { ...params }) -> Frameio.WorkspacesWithIncludesResponse</code></summary>
5873
5713
  <dl>
5874
5714
  <dd>
5875
5715
 
@@ -5897,26 +5737,12 @@ List workspaces for a given account. <br>Rate Limits: 100 calls per 1.00 minute(
5897
5737
  <dd>
5898
5738
 
5899
5739
  ```typescript
5900
- const response = await client.workspaces.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
5901
- include: "creator",
5902
- after: "<opaque_cursor>",
5903
- page_size: 10,
5904
- include_total_count: false,
5905
- });
5906
- for await (const item of response) {
5907
- console.log(item);
5908
- }
5909
-
5910
- // Or you can manually iterate page-by-page
5911
- let page = await client.workspaces.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
5740
+ await client.workspaces.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
5912
5741
  include: "creator",
5913
5742
  after: "<opaque_cursor>",
5914
5743
  page_size: 10,
5915
5744
  include_total_count: false,
5916
5745
  });
5917
- while (page.hasNextPage()) {
5918
- page = page.getNextPage();
5919
- }
5920
5746
  ```
5921
5747
 
5922
5748
  </dd>
@@ -1,32 +0,0 @@
1
- import { HttpResponsePromise, RawResponse } from "../fetcher/index.js";
2
- /**
3
- * A page of results from a paginated API.
4
- *
5
- * @template T The type of the items in the page.
6
- */
7
- export declare class Page<T> implements AsyncIterable<T> {
8
- data: T[];
9
- rawResponse: RawResponse;
10
- private response;
11
- private _hasNextPage;
12
- private getItems;
13
- private loadNextPage;
14
- constructor({ response, rawResponse, hasNextPage, getItems, loadPage, }: {
15
- response: unknown;
16
- rawResponse: RawResponse;
17
- hasNextPage: (response: unknown) => boolean;
18
- getItems: (response: unknown) => T[];
19
- loadPage: (response: unknown) => HttpResponsePromise<any>;
20
- });
21
- /**
22
- * Retrieves the next page
23
- * @returns this
24
- */
25
- getNextPage(): Promise<this>;
26
- /**
27
- * @returns whether there is a next page to load
28
- */
29
- hasNextPage(): boolean;
30
- private iterMessages;
31
- [Symbol.asyncIterator](): AsyncIterator<T, void, any>;
32
- }
@@ -1,100 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
12
- var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
13
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
14
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
15
- return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
16
- function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
17
- function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
18
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
19
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
20
- function fulfill(value) { resume("next", value); }
21
- function reject(value) { resume("throw", value); }
22
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
23
- };
24
- var __asyncValues = (this && this.__asyncValues) || function (o) {
25
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
26
- var m = o[Symbol.asyncIterator], i;
27
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
28
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
29
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.Page = void 0;
33
- /**
34
- * A page of results from a paginated API.
35
- *
36
- * @template T The type of the items in the page.
37
- */
38
- class Page {
39
- constructor({ response, rawResponse, hasNextPage, getItems, loadPage, }) {
40
- this.response = response;
41
- this.rawResponse = rawResponse;
42
- this.data = getItems(response);
43
- this._hasNextPage = hasNextPage;
44
- this.getItems = getItems;
45
- this.loadNextPage = loadPage;
46
- }
47
- /**
48
- * Retrieves the next page
49
- * @returns this
50
- */
51
- getNextPage() {
52
- return __awaiter(this, void 0, void 0, function* () {
53
- const { data, rawResponse } = yield this.loadNextPage(this.response).withRawResponse();
54
- this.response = data;
55
- this.rawResponse = rawResponse;
56
- this.data = this.getItems(this.response);
57
- return this;
58
- });
59
- }
60
- /**
61
- * @returns whether there is a next page to load
62
- */
63
- hasNextPage() {
64
- return this._hasNextPage(this.response);
65
- }
66
- iterMessages() {
67
- return __asyncGenerator(this, arguments, function* iterMessages_1() {
68
- for (const item of this.data) {
69
- yield yield __await(item);
70
- }
71
- while (this.hasNextPage()) {
72
- yield __await(this.getNextPage());
73
- for (const item of this.data) {
74
- yield yield __await(item);
75
- }
76
- }
77
- });
78
- }
79
- [Symbol.asyncIterator]() {
80
- return __asyncGenerator(this, arguments, function* _a() {
81
- var _b, e_1, _c, _d;
82
- try {
83
- for (var _e = true, _f = __asyncValues(this.iterMessages()), _g; _g = yield __await(_f.next()), _b = _g.done, !_b; _e = true) {
84
- _d = _g.value;
85
- _e = false;
86
- const message = _d;
87
- yield yield __await(message);
88
- }
89
- }
90
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
91
- finally {
92
- try {
93
- if (!_e && !_b && (_c = _f.return)) yield __await(_c.call(_f));
94
- }
95
- finally { if (e_1) throw e_1.error; }
96
- }
97
- });
98
- }
99
- }
100
- exports.Page = Page;
@@ -1,14 +0,0 @@
1
- import { RawResponse } from "../fetcher/index.js";
2
- import { Page } from "./Page.js";
3
- export declare namespace Pageable {
4
- interface Args<Response, Item> {
5
- response: Response;
6
- rawResponse: RawResponse;
7
- hasNextPage: (response: Response) => boolean;
8
- getItems: (response: Response) => Item[];
9
- loadPage: (response: Response) => Promise<Response>;
10
- }
11
- }
12
- export declare class Pageable<R, T> extends Page<T> {
13
- constructor(args: Pageable.Args<R, T>);
14
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Pageable = void 0;
4
- const Page_js_1 = require("./Page.js");
5
- class Pageable extends Page_js_1.Page {
6
- constructor(args) {
7
- super(args);
8
- }
9
- }
10
- exports.Pageable = Pageable;
@@ -1,2 +0,0 @@
1
- export { Page } from "./Page.js";
2
- export { Pageable } from "./Pageable.js";
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Pageable = exports.Page = void 0;
4
- var Page_js_1 = require("./Page.js");
5
- Object.defineProperty(exports, "Page", { enumerable: true, get: function () { return Page_js_1.Page; } });
6
- var Pageable_js_1 = require("./Pageable.js");
7
- Object.defineProperty(exports, "Pageable", { enumerable: true, get: function () { return Pageable_js_1.Pageable; } });
@@ -1 +0,0 @@
1
- export { setObjectProperty } from "./setObjectProperty.js";
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setObjectProperty = void 0;
4
- var setObjectProperty_js_1 = require("./setObjectProperty.js");
5
- Object.defineProperty(exports, "setObjectProperty", { enumerable: true, get: function () { return setObjectProperty_js_1.setObjectProperty; } });
@@ -1,11 +0,0 @@
1
- /**
2
- * Sets the value at path of object. If a portion of path doesn’t exist it’s created. This is
3
- * inspired by Lodash's set function, but is simplified to accommodate our use case.
4
- * For more details, see https://lodash.com/docs/4.17.15#set.
5
- *
6
- * @param object The object to modify.
7
- * @param path The path of the property to set.
8
- * @param value The value to set.
9
- * @return Returns object.
10
- */
11
- export declare function setObjectProperty<T extends object>(object: T, path: string, value: any): T;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setObjectProperty = setObjectProperty;
4
- /**
5
- * Sets the value at path of object. If a portion of path doesn’t exist it’s created. This is
6
- * inspired by Lodash's set function, but is simplified to accommodate our use case.
7
- * For more details, see https://lodash.com/docs/4.17.15#set.
8
- *
9
- * @param object The object to modify.
10
- * @param path The path of the property to set.
11
- * @param value The value to set.
12
- * @return Returns object.
13
- */
14
- function setObjectProperty(object, path, value) {
15
- if (object == null) {
16
- return object;
17
- }
18
- const keys = path.split(".");
19
- if (keys.length === 0) {
20
- // Invalid path; do nothing.
21
- return object;
22
- }
23
- let current = object;
24
- for (let i = 0; i < keys.length - 1; i++) {
25
- const key = keys[i];
26
- if (key == null) {
27
- // Unreachable.
28
- continue;
29
- }
30
- if (!current[key] || typeof current[key] !== "object") {
31
- current[key] = {};
32
- }
33
- current = current[key];
34
- }
35
- const lastKey = keys[keys.length - 1];
36
- if (lastKey == null) {
37
- // Unreachable.
38
- return object;
39
- }
40
- current[lastKey] = value;
41
- return object;
42
- }
@@ -1,32 +0,0 @@
1
- import { HttpResponsePromise, RawResponse } from "../fetcher/index.mjs";
2
- /**
3
- * A page of results from a paginated API.
4
- *
5
- * @template T The type of the items in the page.
6
- */
7
- export declare class Page<T> implements AsyncIterable<T> {
8
- data: T[];
9
- rawResponse: RawResponse;
10
- private response;
11
- private _hasNextPage;
12
- private getItems;
13
- private loadNextPage;
14
- constructor({ response, rawResponse, hasNextPage, getItems, loadPage, }: {
15
- response: unknown;
16
- rawResponse: RawResponse;
17
- hasNextPage: (response: unknown) => boolean;
18
- getItems: (response: unknown) => T[];
19
- loadPage: (response: unknown) => HttpResponsePromise<any>;
20
- });
21
- /**
22
- * Retrieves the next page
23
- * @returns this
24
- */
25
- getNextPage(): Promise<this>;
26
- /**
27
- * @returns whether there is a next page to load
28
- */
29
- hasNextPage(): boolean;
30
- private iterMessages;
31
- [Symbol.asyncIterator](): AsyncIterator<T, void, any>;
32
- }