webflow-api 2.0.0-beta → 2.0.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.
Files changed (88) hide show
  1. package/README.md +30 -2
  2. package/api/resources/accessGroups/client/Client.d.ts +1 -1
  3. package/api/resources/accessGroups/client/Client.js +1 -1
  4. package/api/resources/assets/client/Client.d.ts +7 -7
  5. package/api/resources/assets/client/Client.js +7 -7
  6. package/api/resources/collections/client/Client.d.ts +11 -4
  7. package/api/resources/collections/client/Client.js +11 -4
  8. package/api/resources/collections/client/requests/CollectionsCreateRequest.d.ts +8 -0
  9. package/api/resources/collections/resources/fields/client/Client.d.ts +11 -0
  10. package/api/resources/collections/resources/fields/client/Client.js +11 -0
  11. package/api/resources/collections/resources/fields/client/requests/FieldUpdate.d.ts +4 -0
  12. package/api/resources/collections/resources/items/client/Client.d.ts +10 -8
  13. package/api/resources/collections/resources/items/client/Client.js +10 -8
  14. package/api/resources/ecommerce/client/Client.d.ts +1 -1
  15. package/api/resources/ecommerce/client/Client.js +1 -1
  16. package/api/resources/forms/client/Client.d.ts +5 -5
  17. package/api/resources/forms/client/Client.js +5 -5
  18. package/api/resources/inventory/client/Client.d.ts +2 -2
  19. package/api/resources/inventory/client/Client.js +2 -2
  20. package/api/resources/orders/client/Client.d.ts +6 -6
  21. package/api/resources/orders/client/Client.js +6 -6
  22. package/api/resources/pages/client/Client.d.ts +2 -2
  23. package/api/resources/pages/client/Client.js +2 -2
  24. package/api/resources/pages/resources/scripts/client/Client.d.ts +12 -3
  25. package/api/resources/pages/resources/scripts/client/Client.js +12 -3
  26. package/api/resources/products/client/Client.d.ts +6 -6
  27. package/api/resources/products/client/Client.js +6 -6
  28. package/api/resources/scripts/client/Client.d.ts +16 -1
  29. package/api/resources/scripts/client/Client.js +16 -1
  30. package/api/resources/scripts/client/requests/CustomCodeHostedRequest.d.ts +9 -0
  31. package/api/resources/scripts/client/requests/CustomCodeInlineRequest.d.ts +8 -0
  32. package/api/resources/sites/client/Client.d.ts +3 -3
  33. package/api/resources/sites/client/Client.js +3 -3
  34. package/api/resources/sites/resources/scripts/client/Client.d.ts +13 -4
  35. package/api/resources/sites/resources/scripts/client/Client.js +13 -4
  36. package/api/resources/users/client/Client.d.ts +9 -6
  37. package/api/resources/users/client/Client.js +9 -6
  38. package/api/resources/webhooks/client/Client.d.ts +4 -4
  39. package/api/resources/webhooks/client/Client.js +4 -4
  40. package/core/fetcher/Fetcher.js +19 -18
  41. package/dist/api/resources/accessGroups/client/Client.d.ts +1 -1
  42. package/dist/api/resources/accessGroups/client/Client.js +1 -1
  43. package/dist/api/resources/assets/client/Client.d.ts +7 -7
  44. package/dist/api/resources/assets/client/Client.js +7 -7
  45. package/dist/api/resources/collections/client/Client.d.ts +11 -4
  46. package/dist/api/resources/collections/client/Client.js +11 -4
  47. package/dist/api/resources/collections/client/requests/CollectionsCreateRequest.d.ts +8 -0
  48. package/dist/api/resources/collections/resources/fields/client/Client.d.ts +11 -0
  49. package/dist/api/resources/collections/resources/fields/client/Client.js +11 -0
  50. package/dist/api/resources/collections/resources/fields/client/requests/FieldUpdate.d.ts +4 -0
  51. package/dist/api/resources/collections/resources/items/client/Client.d.ts +10 -8
  52. package/dist/api/resources/collections/resources/items/client/Client.js +10 -8
  53. package/dist/api/resources/ecommerce/client/Client.d.ts +1 -1
  54. package/dist/api/resources/ecommerce/client/Client.js +1 -1
  55. package/dist/api/resources/forms/client/Client.d.ts +5 -5
  56. package/dist/api/resources/forms/client/Client.js +5 -5
  57. package/dist/api/resources/inventory/client/Client.d.ts +2 -2
  58. package/dist/api/resources/inventory/client/Client.js +2 -2
  59. package/dist/api/resources/orders/client/Client.d.ts +6 -6
  60. package/dist/api/resources/orders/client/Client.js +6 -6
  61. package/dist/api/resources/pages/client/Client.d.ts +2 -2
  62. package/dist/api/resources/pages/client/Client.js +2 -2
  63. package/dist/api/resources/pages/resources/scripts/client/Client.d.ts +12 -3
  64. package/dist/api/resources/pages/resources/scripts/client/Client.js +12 -3
  65. package/dist/api/resources/products/client/Client.d.ts +6 -6
  66. package/dist/api/resources/products/client/Client.js +6 -6
  67. package/dist/api/resources/scripts/client/Client.d.ts +16 -1
  68. package/dist/api/resources/scripts/client/Client.js +16 -1
  69. package/dist/api/resources/scripts/client/requests/CustomCodeHostedRequest.d.ts +9 -0
  70. package/dist/api/resources/scripts/client/requests/CustomCodeInlineRequest.d.ts +8 -0
  71. package/dist/api/resources/sites/client/Client.d.ts +3 -3
  72. package/dist/api/resources/sites/client/Client.js +3 -3
  73. package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +13 -4
  74. package/dist/api/resources/sites/resources/scripts/client/Client.js +13 -4
  75. package/dist/api/resources/users/client/Client.d.ts +9 -6
  76. package/dist/api/resources/users/client/Client.js +9 -6
  77. package/dist/api/resources/webhooks/client/Client.d.ts +4 -4
  78. package/dist/api/resources/webhooks/client/Client.js +4 -4
  79. package/dist/core/fetcher/Fetcher.js +19 -18
  80. package/dist/environments.d.ts +1 -1
  81. package/dist/environments.js +1 -1
  82. package/environments.d.ts +1 -1
  83. package/environments.js +1 -1
  84. package/package.json +2 -4
  85. package/dist/oauth.d.ts +0 -27
  86. package/dist/oauth.js +0 -113
  87. package/oauth.d.ts +0 -27
  88. package/oauth.js +0 -113
@@ -59,7 +59,7 @@ class Users {
59
59
  * @throws {@link Webflow.InternalServerError}
60
60
  *
61
61
  * @example
62
- * await webflow.users.list("site-id", {
62
+ * await webflow.users.list("string", {
63
63
  * sort: Webflow.UsersListRequestSort.CreatedOnAscending
64
64
  * })
65
65
  */
@@ -146,7 +146,7 @@ class Users {
146
146
  * @throws {@link Webflow.InternalServerError}
147
147
  *
148
148
  * @example
149
- * await webflow.users.get("site-id", "user-id")
149
+ * await webflow.users.get("string", "string")
150
150
  */
151
151
  get(siteId, userId, requestOptions) {
152
152
  var _a;
@@ -219,7 +219,7 @@ class Users {
219
219
  * @throws {@link Webflow.InternalServerError}
220
220
  *
221
221
  * @example
222
- * await webflow.users.delete("site-id", "user-id")
222
+ * await webflow.users.delete("string", "string")
223
223
  */
224
224
  delete(siteId, userId, requestOptions) {
225
225
  var _a;
@@ -288,7 +288,7 @@ class Users {
288
288
  * @throws {@link Webflow.InternalServerError}
289
289
  *
290
290
  * @example
291
- * await webflow.users.update("site-id", "user-id", {
291
+ * await webflow.users.update("string", "string", {
292
292
  * id: "6287ec36a841b25637c663df",
293
293
  * lastUpdated: new Date("2016-10-24T19:41:29.156Z"),
294
294
  * invitedOn: new Date("2016-10-24T19:41:29.156Z"),
@@ -297,7 +297,10 @@ class Users {
297
297
  * status: Webflow.UserStatus.Invited,
298
298
  * accessGroups: [{
299
299
  * type: Webflow.UserAccessGroupsItemType.Admin
300
- * }]
300
+ * }],
301
+ * data: {
302
+ * data: {}
303
+ * }
301
304
  * })
302
305
  */
303
306
  update(siteId, userId, request, requestOptions) {
@@ -373,7 +376,7 @@ class Users {
373
376
  * @throws {@link Webflow.InternalServerError}
374
377
  *
375
378
  * @example
376
- * await webflow.users.invite("site-id", {
379
+ * await webflow.users.invite("string", {
377
380
  * email: "some.one@home.com"
378
381
  * })
379
382
  */
@@ -26,7 +26,7 @@ export declare class Webhooks {
26
26
  * @throws {@link Webflow.InternalServerError}
27
27
  *
28
28
  * @example
29
- * await webflow.webhooks.list("site-id")
29
+ * await webflow.webhooks.list("string")
30
30
  */
31
31
  list(siteId: string, requestOptions?: Webhooks.RequestOptions): Promise<Webflow.Webhook[]>;
32
32
  /**
@@ -38,7 +38,7 @@ export declare class Webhooks {
38
38
  * @throws {@link Webflow.InternalServerError}
39
39
  *
40
40
  * @example
41
- * await webflow.webhooks.create("site-id", {
41
+ * await webflow.webhooks.create("string", {
42
42
  * triggerType: Webflow.TriggerType.FormSubmission,
43
43
  * url: "https://api.mydomain.com/webhook"
44
44
  * })
@@ -53,7 +53,7 @@ export declare class Webhooks {
53
53
  * @throws {@link Webflow.InternalServerError}
54
54
  *
55
55
  * @example
56
- * await webflow.webhooks.get("webhook-id")
56
+ * await webflow.webhooks.get("string")
57
57
  */
58
58
  get(webhookId: string, requestOptions?: Webhooks.RequestOptions): Promise<Webflow.Webhook>;
59
59
  /**
@@ -65,7 +65,7 @@ export declare class Webhooks {
65
65
  * @throws {@link Webflow.InternalServerError}
66
66
  *
67
67
  * @example
68
- * await webflow.webhooks.delete("webhook-id")
68
+ * await webflow.webhooks.delete("string")
69
69
  */
70
70
  delete(webhookId: string, requestOptions?: Webhooks.RequestOptions): Promise<void>;
71
71
  protected _getAuthorizationHeader(): Promise<string>;
@@ -58,7 +58,7 @@ class Webhooks {
58
58
  * @throws {@link Webflow.InternalServerError}
59
59
  *
60
60
  * @example
61
- * await webflow.webhooks.list("site-id")
61
+ * await webflow.webhooks.list("string")
62
62
  */
63
63
  list(siteId, requestOptions) {
64
64
  var _a;
@@ -128,7 +128,7 @@ class Webhooks {
128
128
  * @throws {@link Webflow.InternalServerError}
129
129
  *
130
130
  * @example
131
- * await webflow.webhooks.create("site-id", {
131
+ * await webflow.webhooks.create("string", {
132
132
  * triggerType: Webflow.TriggerType.FormSubmission,
133
133
  * url: "https://api.mydomain.com/webhook"
134
134
  * })
@@ -202,7 +202,7 @@ class Webhooks {
202
202
  * @throws {@link Webflow.InternalServerError}
203
203
  *
204
204
  * @example
205
- * await webflow.webhooks.get("webhook-id")
205
+ * await webflow.webhooks.get("string")
206
206
  */
207
207
  get(webhookId, requestOptions) {
208
208
  var _a;
@@ -272,7 +272,7 @@ class Webhooks {
272
272
  * @throws {@link Webflow.InternalServerError}
273
273
  *
274
274
  * @example
275
- * await webflow.webhooks.delete("webhook-id")
275
+ * await webflow.webhooks.delete("string")
276
276
  */
277
277
  delete(webhookId, requestOptions) {
278
278
  var _a;
@@ -15,9 +15,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.fetcher = void 0;
16
16
  const form_data_1 = __importDefault(require("form-data"));
17
17
  const qs_1 = __importDefault(require("qs"));
18
- if (typeof window === "undefined") {
19
- global.fetch = require("node-fetch");
20
- }
21
18
  const INITIAL_RETRY_DELAY = 1;
22
19
  const MAX_RETRY_DELAY = 60;
23
20
  const DEFAULT_MAX_RETRIES = 2;
@@ -46,18 +43,19 @@ function fetcherImpl(args) {
46
43
  else {
47
44
  body = JSON.stringify(args.body);
48
45
  }
46
+ const fetchFn = typeof fetch == "function" ? fetch : require("node-fetch");
49
47
  const makeRequest = () => __awaiter(this, void 0, void 0, function* () {
50
48
  const controller = new AbortController();
51
49
  let abortId = undefined;
52
50
  if (args.timeoutMs != null) {
53
51
  abortId = setTimeout(() => controller.abort(), args.timeoutMs);
54
52
  }
55
- const response = yield fetch(url, {
53
+ const response = yield fetchFn(url, {
56
54
  method: args.method,
57
55
  headers,
58
56
  body,
59
57
  signal: controller.signal,
60
- credentials: args.withCredentials ? "same-origin" : undefined,
58
+ credentials: args.withCredentials ? "include" : undefined,
61
59
  });
62
60
  if (abortId != null) {
63
61
  clearTimeout(abortId);
@@ -86,19 +84,22 @@ function fetcherImpl(args) {
86
84
  else if (response.body != null && args.responseType === "streaming") {
87
85
  body = response.body;
88
86
  }
89
- else if (response.body != null) {
90
- try {
91
- body = yield response.json();
92
- }
93
- catch (err) {
94
- return {
95
- ok: false,
96
- error: {
97
- reason: "non-json",
98
- statusCode: response.status,
99
- rawBody: yield response.text(),
100
- },
101
- };
87
+ else {
88
+ const text = yield response.text();
89
+ if (text.length > 0) {
90
+ try {
91
+ body = JSON.parse(text);
92
+ }
93
+ catch (err) {
94
+ return {
95
+ ok: false,
96
+ error: {
97
+ reason: "non-json",
98
+ statusCode: response.status,
99
+ rawBody: text,
100
+ },
101
+ };
102
+ }
102
103
  }
103
104
  }
104
105
  if (response.status >= 200 && response.status < 400) {
@@ -27,7 +27,7 @@ export declare class AccessGroups {
27
27
  * @throws {@link Webflow.InternalServerError}
28
28
  *
29
29
  * @example
30
- * await webflow.accessGroups.list("site-id", {
30
+ * await webflow.accessGroups.list("string", {
31
31
  * sort: Webflow.AccessGroupsListRequestSort.CreatedOnAscending
32
32
  * })
33
33
  */
@@ -59,7 +59,7 @@ class AccessGroups {
59
59
  * @throws {@link Webflow.InternalServerError}
60
60
  *
61
61
  * @example
62
- * await webflow.accessGroups.list("site-id", {
62
+ * await webflow.accessGroups.list("string", {
63
63
  * sort: Webflow.AccessGroupsListRequestSort.CreatedOnAscending
64
64
  * })
65
65
  */
@@ -26,7 +26,7 @@ export declare class Assets {
26
26
  * @throws {@link Webflow.InternalServerError}
27
27
  *
28
28
  * @example
29
- * await webflow.assets.list("site-id")
29
+ * await webflow.assets.list("string")
30
30
  */
31
31
  list(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Asset[]>;
32
32
  /**
@@ -38,7 +38,7 @@ export declare class Assets {
38
38
  * @throws {@link Webflow.InternalServerError}
39
39
  *
40
40
  * @example
41
- * await webflow.assets.create("site-id", {
41
+ * await webflow.assets.create("string", {
42
42
  * fileName: "file.png",
43
43
  * fileHash: "3c7d87c9575702bc3b1e991f4d3c638e",
44
44
  * parentFolder: "6436b1ce5281cace05b65aea"
@@ -54,7 +54,7 @@ export declare class Assets {
54
54
  * @throws {@link Webflow.InternalServerError}
55
55
  *
56
56
  * @example
57
- * await webflow.assets.get("asset-id")
57
+ * await webflow.assets.get("string")
58
58
  */
59
59
  get(assetId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.Asset>;
60
60
  /**
@@ -66,7 +66,7 @@ export declare class Assets {
66
66
  * @throws {@link Webflow.InternalServerError}
67
67
  *
68
68
  * @example
69
- * await webflow.assets.delete("asset-id")
69
+ * await webflow.assets.delete("string")
70
70
  */
71
71
  delete(assetId: string, requestOptions?: Assets.RequestOptions): Promise<void>;
72
72
  /**
@@ -78,7 +78,7 @@ export declare class Assets {
78
78
  * @throws {@link Webflow.InternalServerError}
79
79
  *
80
80
  * @example
81
- * await webflow.assets.listFolders("site-id")
81
+ * await webflow.assets.listFolders("string")
82
82
  */
83
83
  listFolders(siteId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.AssetFolderList>;
84
84
  /**
@@ -90,7 +90,7 @@ export declare class Assets {
90
90
  * @throws {@link Webflow.InternalServerError}
91
91
  *
92
92
  * @example
93
- * await webflow.assets.createFolder("site-id", {
93
+ * await webflow.assets.createFolder("string", {
94
94
  * displayName: "my asset folder",
95
95
  * parentFolder: "6390c49774a71f99f21a08eb"
96
96
  * })
@@ -105,7 +105,7 @@ export declare class Assets {
105
105
  * @throws {@link Webflow.InternalServerError}
106
106
  *
107
107
  * @example
108
- * await webflow.assets.getFolder("asset-folder-id")
108
+ * await webflow.assets.getFolder("string")
109
109
  */
110
110
  getFolder(assetFolderId: string, requestOptions?: Assets.RequestOptions): Promise<Webflow.AssetFolder>;
111
111
  protected _getAuthorizationHeader(): Promise<string>;
@@ -58,7 +58,7 @@ class Assets {
58
58
  * @throws {@link Webflow.InternalServerError}
59
59
  *
60
60
  * @example
61
- * await webflow.assets.list("site-id")
61
+ * await webflow.assets.list("string")
62
62
  */
63
63
  list(siteId, requestOptions) {
64
64
  var _a;
@@ -128,7 +128,7 @@ class Assets {
128
128
  * @throws {@link Webflow.InternalServerError}
129
129
  *
130
130
  * @example
131
- * await webflow.assets.create("site-id", {
131
+ * await webflow.assets.create("string", {
132
132
  * fileName: "file.png",
133
133
  * fileHash: "3c7d87c9575702bc3b1e991f4d3c638e",
134
134
  * parentFolder: "6436b1ce5281cace05b65aea"
@@ -203,7 +203,7 @@ class Assets {
203
203
  * @throws {@link Webflow.InternalServerError}
204
204
  *
205
205
  * @example
206
- * await webflow.assets.get("asset-id")
206
+ * await webflow.assets.get("string")
207
207
  */
208
208
  get(assetId, requestOptions) {
209
209
  var _a;
@@ -273,7 +273,7 @@ class Assets {
273
273
  * @throws {@link Webflow.InternalServerError}
274
274
  *
275
275
  * @example
276
- * await webflow.assets.delete("asset-id")
276
+ * await webflow.assets.delete("string")
277
277
  */
278
278
  delete(assetId, requestOptions) {
279
279
  var _a;
@@ -337,7 +337,7 @@ class Assets {
337
337
  * @throws {@link Webflow.InternalServerError}
338
338
  *
339
339
  * @example
340
- * await webflow.assets.listFolders("site-id")
340
+ * await webflow.assets.listFolders("string")
341
341
  */
342
342
  listFolders(siteId, requestOptions) {
343
343
  var _a;
@@ -407,7 +407,7 @@ class Assets {
407
407
  * @throws {@link Webflow.InternalServerError}
408
408
  *
409
409
  * @example
410
- * await webflow.assets.createFolder("site-id", {
410
+ * await webflow.assets.createFolder("string", {
411
411
  * displayName: "my asset folder",
412
412
  * parentFolder: "6390c49774a71f99f21a08eb"
413
413
  * })
@@ -481,7 +481,7 @@ class Assets {
481
481
  * @throws {@link Webflow.InternalServerError}
482
482
  *
483
483
  * @example
484
- * await webflow.assets.getFolder("asset-folder-id")
484
+ * await webflow.assets.getFolder("string")
485
485
  */
486
486
  getFolder(assetFolderId, requestOptions) {
487
487
  var _a;
@@ -28,7 +28,7 @@ export declare class Collections {
28
28
  * @throws {@link Webflow.InternalServerError}
29
29
  *
30
30
  * @example
31
- * await webflow.collections.list("site-id")
31
+ * await webflow.collections.list("string")
32
32
  */
33
33
  list(siteId: string, requestOptions?: Collections.RequestOptions): Promise<Webflow.CollectionList>;
34
34
  /**
@@ -38,6 +38,13 @@ export declare class Collections {
38
38
  * @throws {@link Webflow.NotFoundError}
39
39
  * @throws {@link Webflow.TooManyRequestsError}
40
40
  * @throws {@link Webflow.InternalServerError}
41
+ *
42
+ * @example
43
+ * await webflow.collections.create("string", {
44
+ * displayName: "Blog Posts",
45
+ * singularName: "Blog Post",
46
+ * slug: "posts"
47
+ * })
41
48
  */
42
49
  create(siteId: string, request: Webflow.CollectionsCreateRequest, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
43
50
  /**
@@ -49,7 +56,7 @@ export declare class Collections {
49
56
  * @throws {@link Webflow.InternalServerError}
50
57
  *
51
58
  * @example
52
- * await webflow.collections.get("collection-id")
59
+ * await webflow.collections.get("string")
53
60
  */
54
61
  get(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<Webflow.Collection>;
55
62
  /**
@@ -61,7 +68,7 @@ export declare class Collections {
61
68
  * @throws {@link Webflow.InternalServerError}
62
69
  *
63
70
  * @example
64
- * await webflow.collections.deleteCollection("collection-id")
71
+ * await webflow.collections.deleteCollection("string")
65
72
  */
66
73
  deleteCollection(collectionId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
67
74
  /**
@@ -73,7 +80,7 @@ export declare class Collections {
73
80
  * @throws {@link Webflow.InternalServerError}
74
81
  *
75
82
  * @example
76
- * await webflow.collections.delete("collection-id", "field-id")
83
+ * await webflow.collections.delete("string", "string")
77
84
  */
78
85
  delete(collectionId: string, fieldId: string, requestOptions?: Collections.RequestOptions): Promise<void>;
79
86
  protected _fields: Fields | undefined;
@@ -60,7 +60,7 @@ class Collections {
60
60
  * @throws {@link Webflow.InternalServerError}
61
61
  *
62
62
  * @example
63
- * await webflow.collections.list("site-id")
63
+ * await webflow.collections.list("string")
64
64
  */
65
65
  list(siteId, requestOptions) {
66
66
  var _a;
@@ -128,6 +128,13 @@ class Collections {
128
128
  * @throws {@link Webflow.NotFoundError}
129
129
  * @throws {@link Webflow.TooManyRequestsError}
130
130
  * @throws {@link Webflow.InternalServerError}
131
+ *
132
+ * @example
133
+ * await webflow.collections.create("string", {
134
+ * displayName: "Blog Posts",
135
+ * singularName: "Blog Post",
136
+ * slug: "posts"
137
+ * })
131
138
  */
132
139
  create(siteId, request, requestOptions) {
133
140
  var _a;
@@ -198,7 +205,7 @@ class Collections {
198
205
  * @throws {@link Webflow.InternalServerError}
199
206
  *
200
207
  * @example
201
- * await webflow.collections.get("collection-id")
208
+ * await webflow.collections.get("string")
202
209
  */
203
210
  get(collectionId, requestOptions) {
204
211
  var _a;
@@ -268,7 +275,7 @@ class Collections {
268
275
  * @throws {@link Webflow.InternalServerError}
269
276
  *
270
277
  * @example
271
- * await webflow.collections.deleteCollection("collection-id")
278
+ * await webflow.collections.deleteCollection("string")
272
279
  */
273
280
  deleteCollection(collectionId, requestOptions) {
274
281
  var _a;
@@ -332,7 +339,7 @@ class Collections {
332
339
  * @throws {@link Webflow.InternalServerError}
333
340
  *
334
341
  * @example
335
- * await webflow.collections.delete("collection-id", "field-id")
342
+ * await webflow.collections.delete("string", "string")
336
343
  */
337
344
  delete(collectionId, fieldId, requestOptions) {
338
345
  var _a;
@@ -1,6 +1,14 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /**
5
+ * @example
6
+ * {
7
+ * displayName: "Blog Posts",
8
+ * singularName: "Blog Post",
9
+ * slug: "posts"
10
+ * }
11
+ */
4
12
  export interface CollectionsCreateRequest {
5
13
  /** Name of the collection. Each collection name must be distinct. */
6
14
  displayName: string;
@@ -24,6 +24,14 @@ export declare class Fields {
24
24
  * @throws {@link Webflow.NotFoundError}
25
25
  * @throws {@link Webflow.TooManyRequestsError}
26
26
  * @throws {@link Webflow.InternalServerError}
27
+ *
28
+ * @example
29
+ * await webflow.collections.fields.create("string", {
30
+ * id: "string",
31
+ * isRequired: true,
32
+ * type: Webflow.FieldType.PlainText,
33
+ * displayName: "string"
34
+ * })
27
35
  */
28
36
  create(collectionId: string, request: Webflow.Field, requestOptions?: Fields.RequestOptions): Promise<Webflow.Field>;
29
37
  /**
@@ -33,6 +41,9 @@ export declare class Fields {
33
41
  * @throws {@link Webflow.NotFoundError}
34
42
  * @throws {@link Webflow.TooManyRequestsError}
35
43
  * @throws {@link Webflow.InternalServerError}
44
+ *
45
+ * @example
46
+ * await webflow.collections.fields.update("string", "string", {})
36
47
  */
37
48
  update(collectionId: string, fieldId: string, request?: Webflow.collections.FieldUpdate, requestOptions?: Fields.RequestOptions): Promise<Webflow.Field>;
38
49
  protected _getAuthorizationHeader(): Promise<string>;
@@ -56,6 +56,14 @@ class Fields {
56
56
  * @throws {@link Webflow.NotFoundError}
57
57
  * @throws {@link Webflow.TooManyRequestsError}
58
58
  * @throws {@link Webflow.InternalServerError}
59
+ *
60
+ * @example
61
+ * await webflow.collections.fields.create("string", {
62
+ * id: "string",
63
+ * isRequired: true,
64
+ * type: Webflow.FieldType.PlainText,
65
+ * displayName: "string"
66
+ * })
59
67
  */
60
68
  create(collectionId, request, requestOptions) {
61
69
  var _a;
@@ -124,6 +132,9 @@ class Fields {
124
132
  * @throws {@link Webflow.NotFoundError}
125
133
  * @throws {@link Webflow.TooManyRequestsError}
126
134
  * @throws {@link Webflow.InternalServerError}
135
+ *
136
+ * @example
137
+ * await webflow.collections.fields.update("string", "string", {})
127
138
  */
128
139
  update(collectionId, fieldId, request = {}, requestOptions) {
129
140
  var _a;
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
4
8
  export interface FieldUpdate {
5
9
  /** Define whether a field is required in a collection */
6
10
  isRequired?: boolean;
@@ -26,7 +26,7 @@ export declare class Items {
26
26
  * @throws {@link Webflow.InternalServerError}
27
27
  *
28
28
  * @example
29
- * await webflow.collections.items.listItems("collection-id", {})
29
+ * await webflow.collections.items.listItems("string", {})
30
30
  */
31
31
  listItems(collectionId: string, request?: Webflow.collections.ItemsListItemsRequest, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItemList>;
32
32
  /**
@@ -38,11 +38,12 @@ export declare class Items {
38
38
  * @throws {@link Webflow.InternalServerError}
39
39
  *
40
40
  * @example
41
- * await webflow.collections.items.createItem("collection-id", {
41
+ * await webflow.collections.items.createItem("string", {
42
42
  * id: "580e64008c9a982ac9b8b754",
43
43
  * lastPublished: "2023-03-17T18:47:35.560Z",
44
44
  * lastUpdated: "2023-03-17T18:47:35.560Z",
45
- * createdOn: "2023-03-17T18:47:35.560Z"
45
+ * createdOn: "2023-03-17T18:47:35.560Z",
46
+ * fieldData: {}
46
47
  * })
47
48
  */
48
49
  createItem(collectionId: string, request: Webflow.CollectionItem, requestOptions?: Items.RequestOptions): Promise<void>;
@@ -55,7 +56,7 @@ export declare class Items {
55
56
  * @throws {@link Webflow.InternalServerError}
56
57
  *
57
58
  * @example
58
- * await webflow.collections.items.getItem("collection-id", "item-id")
59
+ * await webflow.collections.items.getItem("string", "string")
59
60
  */
60
61
  getItem(collectionId: string, itemId: string, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
61
62
  /**
@@ -67,7 +68,7 @@ export declare class Items {
67
68
  * @throws {@link Webflow.InternalServerError}
68
69
  *
69
70
  * @example
70
- * await webflow.collections.items.deleteItem("collection-id", "item-id")
71
+ * await webflow.collections.items.deleteItem("string", "string")
71
72
  */
72
73
  deleteItem(collectionId: string, itemId: string, requestOptions?: Items.RequestOptions): Promise<void>;
73
74
  /**
@@ -79,11 +80,12 @@ export declare class Items {
79
80
  * @throws {@link Webflow.InternalServerError}
80
81
  *
81
82
  * @example
82
- * await webflow.collections.items.updateItem("collection-id", "item-id", {
83
+ * await webflow.collections.items.updateItem("string", "string", {
83
84
  * id: "580e64008c9a982ac9b8b754",
84
85
  * lastPublished: "2023-03-17T18:47:35.560Z",
85
86
  * lastUpdated: "2023-03-17T18:47:35.560Z",
86
- * createdOn: "2023-03-17T18:47:35.560Z"
87
+ * createdOn: "2023-03-17T18:47:35.560Z",
88
+ * fieldData: {}
87
89
  * })
88
90
  */
89
91
  updateItem(collectionId: string, itemId: string, request: Webflow.CollectionItem, requestOptions?: Items.RequestOptions): Promise<Webflow.CollectionItem>;
@@ -96,7 +98,7 @@ export declare class Items {
96
98
  * @throws {@link Webflow.InternalServerError}
97
99
  *
98
100
  * @example
99
- * await webflow.collections.items.publishItem("collection-id", {
101
+ * await webflow.collections.items.publishItem("string", {
100
102
  * itemIds: []
101
103
  * })
102
104
  */
@@ -58,7 +58,7 @@ class Items {
58
58
  * @throws {@link Webflow.InternalServerError}
59
59
  *
60
60
  * @example
61
- * await webflow.collections.items.listItems("collection-id", {})
61
+ * await webflow.collections.items.listItems("string", {})
62
62
  */
63
63
  listItems(collectionId, request = {}, requestOptions) {
64
64
  var _a;
@@ -137,11 +137,12 @@ class Items {
137
137
  * @throws {@link Webflow.InternalServerError}
138
138
  *
139
139
  * @example
140
- * await webflow.collections.items.createItem("collection-id", {
140
+ * await webflow.collections.items.createItem("string", {
141
141
  * id: "580e64008c9a982ac9b8b754",
142
142
  * lastPublished: "2023-03-17T18:47:35.560Z",
143
143
  * lastUpdated: "2023-03-17T18:47:35.560Z",
144
- * createdOn: "2023-03-17T18:47:35.560Z"
144
+ * createdOn: "2023-03-17T18:47:35.560Z",
145
+ * fieldData: {}
145
146
  * })
146
147
  */
147
148
  createItem(collectionId, request, requestOptions) {
@@ -207,7 +208,7 @@ class Items {
207
208
  * @throws {@link Webflow.InternalServerError}
208
209
  *
209
210
  * @example
210
- * await webflow.collections.items.getItem("collection-id", "item-id")
211
+ * await webflow.collections.items.getItem("string", "string")
211
212
  */
212
213
  getItem(collectionId, itemId, requestOptions) {
213
214
  var _a;
@@ -277,7 +278,7 @@ class Items {
277
278
  * @throws {@link Webflow.InternalServerError}
278
279
  *
279
280
  * @example
280
- * await webflow.collections.items.deleteItem("collection-id", "item-id")
281
+ * await webflow.collections.items.deleteItem("string", "string")
281
282
  */
282
283
  deleteItem(collectionId, itemId, requestOptions) {
283
284
  var _a;
@@ -341,11 +342,12 @@ class Items {
341
342
  * @throws {@link Webflow.InternalServerError}
342
343
  *
343
344
  * @example
344
- * await webflow.collections.items.updateItem("collection-id", "item-id", {
345
+ * await webflow.collections.items.updateItem("string", "string", {
345
346
  * id: "580e64008c9a982ac9b8b754",
346
347
  * lastPublished: "2023-03-17T18:47:35.560Z",
347
348
  * lastUpdated: "2023-03-17T18:47:35.560Z",
348
- * createdOn: "2023-03-17T18:47:35.560Z"
349
+ * createdOn: "2023-03-17T18:47:35.560Z",
350
+ * fieldData: {}
349
351
  * })
350
352
  */
351
353
  updateItem(collectionId, itemId, request, requestOptions) {
@@ -417,7 +419,7 @@ class Items {
417
419
  * @throws {@link Webflow.InternalServerError}
418
420
  *
419
421
  * @example
420
- * await webflow.collections.items.publishItem("collection-id", {
422
+ * await webflow.collections.items.publishItem("string", {
421
423
  * itemIds: []
422
424
  * })
423
425
  */
@@ -30,7 +30,7 @@ export declare class Ecommerce {
30
30
  * @throws {@link Webflow.InternalServerError}
31
31
  *
32
32
  * @example
33
- * await webflow.ecommerce.getSettings("site-id")
33
+ * await webflow.ecommerce.getSettings("string")
34
34
  */
35
35
  getSettings(siteId: string, requestOptions?: Ecommerce.RequestOptions): Promise<Webflow.EcommerceSettings>;
36
36
  protected _getAuthorizationHeader(): Promise<string>;
@@ -62,7 +62,7 @@ class Ecommerce {
62
62
  * @throws {@link Webflow.InternalServerError}
63
63
  *
64
64
  * @example
65
- * await webflow.ecommerce.getSettings("site-id")
65
+ * await webflow.ecommerce.getSettings("string")
66
66
  */
67
67
  getSettings(siteId, requestOptions) {
68
68
  var _a;