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
@@ -30,7 +30,7 @@ export declare class Orders {
30
30
  * @throws {@link Webflow.InternalServerError}
31
31
  *
32
32
  * @example
33
- * await webflow.orders.list("site-id", {
33
+ * await webflow.orders.list("string", {
34
34
  * status: Webflow.OrdersListRequestStatus.Pending
35
35
  * })
36
36
  */
@@ -48,7 +48,7 @@ export declare class Orders {
48
48
  * @throws {@link Webflow.InternalServerError}
49
49
  *
50
50
  * @example
51
- * await webflow.orders.get("site-id", "order-id")
51
+ * await webflow.orders.get("string", "string")
52
52
  */
53
53
  get(siteId: string, orderId: string, requestOptions?: Orders.RequestOptions): Promise<Webflow.Order>;
54
54
  /**
@@ -64,7 +64,7 @@ export declare class Orders {
64
64
  * @throws {@link Webflow.InternalServerError}
65
65
  *
66
66
  * @example
67
- * await webflow.orders.update("site-id", "order-id", {
67
+ * await webflow.orders.update("string", "string", {
68
68
  * comment: "Example comment to myself",
69
69
  * shippingProvider: "Shipping Company, Co.",
70
70
  * shippingTracking: "tr00000000001",
@@ -85,7 +85,7 @@ export declare class Orders {
85
85
  * @throws {@link Webflow.InternalServerError}
86
86
  *
87
87
  * @example
88
- * await webflow.orders.updateFulfill("site-id", "order-id", {})
88
+ * await webflow.orders.updateFulfill("string", "string", {})
89
89
  */
90
90
  updateFulfill(siteId: string, orderId: string, request?: Webflow.OrdersUpdateFulfillRequest, requestOptions?: Orders.RequestOptions): Promise<Webflow.Order>;
91
91
  /**
@@ -101,7 +101,7 @@ export declare class Orders {
101
101
  * @throws {@link Webflow.InternalServerError}
102
102
  *
103
103
  * @example
104
- * await webflow.orders.updateUnfulfill("site-id", "order-id")
104
+ * await webflow.orders.updateUnfulfill("string", "string")
105
105
  */
106
106
  updateUnfulfill(siteId: string, orderId: string, requestOptions?: Orders.RequestOptions): Promise<Webflow.Order>;
107
107
  /**
@@ -118,7 +118,7 @@ export declare class Orders {
118
118
  * @throws {@link Webflow.InternalServerError}
119
119
  *
120
120
  * @example
121
- * await webflow.orders.refund("site-id", "order-id", {
121
+ * await webflow.orders.refund("string", "string", {
122
122
  * reason: Webflow.OrdersRefundRequestReason.Duplicate
123
123
  * })
124
124
  */
@@ -62,7 +62,7 @@ class Orders {
62
62
  * @throws {@link Webflow.InternalServerError}
63
63
  *
64
64
  * @example
65
- * await webflow.orders.list("site-id", {
65
+ * await webflow.orders.list("string", {
66
66
  * status: Webflow.OrdersListRequestStatus.Pending
67
67
  * })
68
68
  */
@@ -154,7 +154,7 @@ class Orders {
154
154
  * @throws {@link Webflow.InternalServerError}
155
155
  *
156
156
  * @example
157
- * await webflow.orders.get("site-id", "order-id")
157
+ * await webflow.orders.get("string", "string")
158
158
  */
159
159
  get(siteId, orderId, requestOptions) {
160
160
  var _a;
@@ -232,7 +232,7 @@ class Orders {
232
232
  * @throws {@link Webflow.InternalServerError}
233
233
  *
234
234
  * @example
235
- * await webflow.orders.update("site-id", "order-id", {
235
+ * await webflow.orders.update("string", "string", {
236
236
  * comment: "Example comment to myself",
237
237
  * shippingProvider: "Shipping Company, Co.",
238
238
  * shippingTracking: "tr00000000001",
@@ -316,7 +316,7 @@ class Orders {
316
316
  * @throws {@link Webflow.InternalServerError}
317
317
  *
318
318
  * @example
319
- * await webflow.orders.updateFulfill("site-id", "order-id", {})
319
+ * await webflow.orders.updateFulfill("string", "string", {})
320
320
  */
321
321
  updateFulfill(siteId, orderId, request = {}, requestOptions) {
322
322
  var _a;
@@ -397,7 +397,7 @@ class Orders {
397
397
  * @throws {@link Webflow.InternalServerError}
398
398
  *
399
399
  * @example
400
- * await webflow.orders.updateUnfulfill("site-id", "order-id")
400
+ * await webflow.orders.updateUnfulfill("string", "string")
401
401
  */
402
402
  updateUnfulfill(siteId, orderId, requestOptions) {
403
403
  var _a;
@@ -476,7 +476,7 @@ class Orders {
476
476
  * @throws {@link Webflow.InternalServerError}
477
477
  *
478
478
  * @example
479
- * await webflow.orders.refund("site-id", "order-id", {
479
+ * await webflow.orders.refund("string", "string", {
480
480
  * reason: Webflow.OrdersRefundRequestReason.Duplicate
481
481
  * })
482
482
  */
@@ -27,7 +27,7 @@ export declare class Pages {
27
27
  * @throws {@link Webflow.InternalServerError}
28
28
  *
29
29
  * @example
30
- * await webflow.pages.list("site-id")
30
+ * await webflow.pages.list("string")
31
31
  */
32
32
  list(siteId: string, requestOptions?: Pages.RequestOptions): Promise<Webflow.PageList>;
33
33
  /**
@@ -39,7 +39,7 @@ export declare class Pages {
39
39
  * @throws {@link Webflow.InternalServerError}
40
40
  *
41
41
  * @example
42
- * await webflow.pages.getMetadata("page-id")
42
+ * await webflow.pages.getMetadata("string")
43
43
  */
44
44
  getMetadata(pageId: string, requestOptions?: Pages.RequestOptions): Promise<Webflow.Page>;
45
45
  protected _scripts: Scripts | undefined;
@@ -59,7 +59,7 @@ class Pages {
59
59
  * @throws {@link Webflow.InternalServerError}
60
60
  *
61
61
  * @example
62
- * await webflow.pages.list("site-id")
62
+ * await webflow.pages.list("string")
63
63
  */
64
64
  list(siteId, requestOptions) {
65
65
  var _a;
@@ -129,7 +129,7 @@ class Pages {
129
129
  * @throws {@link Webflow.InternalServerError}
130
130
  *
131
131
  * @example
132
- * await webflow.pages.getMetadata("page-id")
132
+ * await webflow.pages.getMetadata("string")
133
133
  */
134
134
  getMetadata(pageId, requestOptions) {
135
135
  var _a;
@@ -26,7 +26,7 @@ export declare class Scripts {
26
26
  * @throws {@link Webflow.InternalServerError}
27
27
  *
28
28
  * @example
29
- * await webflow.pages.scripts.getCustomCode("page-id")
29
+ * await webflow.pages.scripts.getCustomCode("string")
30
30
  */
31
31
  getCustomCode(pageId: string, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ScriptApplyList>;
32
32
  /**
@@ -38,7 +38,16 @@ export declare class Scripts {
38
38
  * @throws {@link Webflow.InternalServerError}
39
39
  *
40
40
  * @example
41
- * await webflow.pages.scripts.upsertCustomCode("page-id", {})
41
+ * await webflow.pages.scripts.upsertCustomCode("string", {
42
+ * scripts: [{
43
+ * id: "cms_slider",
44
+ * location: Webflow.ScriptApplyLocation.Header,
45
+ * version: "1.0.0",
46
+ * attributes: {
47
+ * "my-attribute": "some-value"
48
+ * }
49
+ * }]
50
+ * })
42
51
  */
43
52
  upsertCustomCode(pageId: string, request: Webflow.ScriptApplyList, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ScriptApplyList>;
44
53
  /**
@@ -50,7 +59,7 @@ export declare class Scripts {
50
59
  * @throws {@link Webflow.InternalServerError}
51
60
  *
52
61
  * @example
53
- * await webflow.pages.scripts.deleteCustomCode("page-id")
62
+ * await webflow.pages.scripts.deleteCustomCode("string")
54
63
  */
55
64
  deleteCustomCode(pageId: string, requestOptions?: Scripts.RequestOptions): Promise<void>;
56
65
  protected _getAuthorizationHeader(): Promise<string>;
@@ -58,7 +58,7 @@ class Scripts {
58
58
  * @throws {@link Webflow.InternalServerError}
59
59
  *
60
60
  * @example
61
- * await webflow.pages.scripts.getCustomCode("page-id")
61
+ * await webflow.pages.scripts.getCustomCode("string")
62
62
  */
63
63
  getCustomCode(pageId, requestOptions) {
64
64
  var _a;
@@ -128,7 +128,16 @@ class Scripts {
128
128
  * @throws {@link Webflow.InternalServerError}
129
129
  *
130
130
  * @example
131
- * await webflow.pages.scripts.upsertCustomCode("page-id", {})
131
+ * await webflow.pages.scripts.upsertCustomCode("string", {
132
+ * scripts: [{
133
+ * id: "cms_slider",
134
+ * location: Webflow.ScriptApplyLocation.Header,
135
+ * version: "1.0.0",
136
+ * attributes: {
137
+ * "my-attribute": "some-value"
138
+ * }
139
+ * }]
140
+ * })
132
141
  */
133
142
  upsertCustomCode(pageId, request, requestOptions) {
134
143
  var _a;
@@ -199,7 +208,7 @@ class Scripts {
199
208
  * @throws {@link Webflow.InternalServerError}
200
209
  *
201
210
  * @example
202
- * await webflow.pages.scripts.deleteCustomCode("page-id")
211
+ * await webflow.pages.scripts.deleteCustomCode("string")
203
212
  */
204
213
  deleteCustomCode(pageId, requestOptions) {
205
214
  var _a;
@@ -30,7 +30,7 @@ export declare class Products {
30
30
  * @throws {@link Webflow.InternalServerError}
31
31
  *
32
32
  * @example
33
- * await webflow.products.list("site-id", {})
33
+ * await webflow.products.list("string", {})
34
34
  */
35
35
  list(siteId: string, request?: Webflow.ProductsListRequest, requestOptions?: Products.RequestOptions): Promise<Webflow.ProductAndSkUsList>;
36
36
  /**
@@ -56,7 +56,7 @@ export declare class Products {
56
56
  * @throws {@link Webflow.InternalServerError}
57
57
  *
58
58
  * @example
59
- * await webflow.products.create("site-id", {
59
+ * await webflow.products.create("string", {
60
60
  * publishStatus: Webflow.PublishStatus.Staging,
61
61
  * product: {
62
62
  * id: "580e63fc8c9a982ac9b8b745",
@@ -109,7 +109,7 @@ export declare class Products {
109
109
  * @throws {@link Webflow.InternalServerError}
110
110
  *
111
111
  * @example
112
- * await webflow.products.get("site-id", "product-id")
112
+ * await webflow.products.get("string", "string")
113
113
  */
114
114
  get(siteId: string, productId: string, requestOptions?: Products.RequestOptions): Promise<Webflow.ProductAndSkUs>;
115
115
  /**
@@ -125,7 +125,7 @@ export declare class Products {
125
125
  * @throws {@link Webflow.InternalServerError}
126
126
  *
127
127
  * @example
128
- * await webflow.products.update("site-id", "product-id", {
128
+ * await webflow.products.update("string", "string", {
129
129
  * publishStatus: Webflow.PublishStatus.Staging,
130
130
  * product: {
131
131
  * id: "580e63fc8c9a982ac9b8b745",
@@ -166,7 +166,7 @@ export declare class Products {
166
166
  * @throws {@link Webflow.InternalServerError}
167
167
  *
168
168
  * @example
169
- * await webflow.products.createSku("site-id", "product-id", {
169
+ * await webflow.products.createSku("string", "string", {
170
170
  * publishStatus: Webflow.PublishStatus.Staging,
171
171
  * skus: [{
172
172
  * id: "580e63fc8c9a982ac9b8b745",
@@ -198,7 +198,7 @@ export declare class Products {
198
198
  * @throws {@link Webflow.InternalServerError}
199
199
  *
200
200
  * @example
201
- * await webflow.products.updateSku("site-id", "product-id", "sku-id", {
201
+ * await webflow.products.updateSku("string", "string", "string", {
202
202
  * publishStatus: Webflow.PublishStatus.Staging,
203
203
  * sku: {
204
204
  * id: "580e63fc8c9a982ac9b8b745",
@@ -62,7 +62,7 @@ class Products {
62
62
  * @throws {@link Webflow.InternalServerError}
63
63
  *
64
64
  * @example
65
- * await webflow.products.list("site-id", {})
65
+ * await webflow.products.list("string", {})
66
66
  */
67
67
  list(siteId, request = {}, requestOptions) {
68
68
  var _a;
@@ -159,7 +159,7 @@ class Products {
159
159
  * @throws {@link Webflow.InternalServerError}
160
160
  *
161
161
  * @example
162
- * await webflow.products.create("site-id", {
162
+ * await webflow.products.create("string", {
163
163
  * publishStatus: Webflow.PublishStatus.Staging,
164
164
  * product: {
165
165
  * id: "580e63fc8c9a982ac9b8b745",
@@ -275,7 +275,7 @@ class Products {
275
275
  * @throws {@link Webflow.InternalServerError}
276
276
  *
277
277
  * @example
278
- * await webflow.products.get("site-id", "product-id")
278
+ * await webflow.products.get("string", "string")
279
279
  */
280
280
  get(siteId, productId, requestOptions) {
281
281
  var _a;
@@ -353,7 +353,7 @@ class Products {
353
353
  * @throws {@link Webflow.InternalServerError}
354
354
  *
355
355
  * @example
356
- * await webflow.products.update("site-id", "product-id", {
356
+ * await webflow.products.update("string", "string", {
357
357
  * publishStatus: Webflow.PublishStatus.Staging,
358
358
  * product: {
359
359
  * id: "580e63fc8c9a982ac9b8b745",
@@ -457,7 +457,7 @@ class Products {
457
457
  * @throws {@link Webflow.InternalServerError}
458
458
  *
459
459
  * @example
460
- * await webflow.products.createSku("site-id", "product-id", {
460
+ * await webflow.products.createSku("string", "string", {
461
461
  * publishStatus: Webflow.PublishStatus.Staging,
462
462
  * skus: [{
463
463
  * id: "580e63fc8c9a982ac9b8b745",
@@ -552,7 +552,7 @@ class Products {
552
552
  * @throws {@link Webflow.InternalServerError}
553
553
  *
554
554
  * @example
555
- * await webflow.products.updateSku("site-id", "product-id", "sku-id", {
555
+ * await webflow.products.updateSku("string", "string", "string", {
556
556
  * publishStatus: Webflow.PublishStatus.Staging,
557
557
  * sku: {
558
558
  * id: "580e63fc8c9a982ac9b8b745",
@@ -26,7 +26,7 @@ export declare class Scripts {
26
26
  * @throws {@link Webflow.InternalServerError}
27
27
  *
28
28
  * @example
29
- * await webflow.scripts.list("site-id")
29
+ * await webflow.scripts.list("string")
30
30
  */
31
31
  list(siteId: string, requestOptions?: Scripts.RequestOptions): Promise<Webflow.RegisteredScriptList>;
32
32
  /**
@@ -36,6 +36,14 @@ export declare class Scripts {
36
36
  * @throws {@link Webflow.NotFoundError}
37
37
  * @throws {@link Webflow.TooManyRequestsError}
38
38
  * @throws {@link Webflow.InternalServerError}
39
+ *
40
+ * @example
41
+ * await webflow.scripts.registerHosted("string", {
42
+ * hostedLocation: "string",
43
+ * integrityHash: "string",
44
+ * version: "string",
45
+ * displayName: "string"
46
+ * })
39
47
  */
40
48
  registerHosted(siteId: string, request: Webflow.CustomCodeHostedRequest, requestOptions?: Scripts.RequestOptions): Promise<Webflow.CustomCodeResponse>;
41
49
  /**
@@ -45,6 +53,13 @@ export declare class Scripts {
45
53
  * @throws {@link Webflow.NotFoundError}
46
54
  * @throws {@link Webflow.TooManyRequestsError}
47
55
  * @throws {@link Webflow.InternalServerError}
56
+ *
57
+ * @example
58
+ * await webflow.scripts.registerInline("string", {
59
+ * sourceCode: "alert('hello world');",
60
+ * version: "string",
61
+ * displayName: "string"
62
+ * })
48
63
  */
49
64
  registerInline(siteId: string, request: Webflow.CustomCodeInlineRequest, requestOptions?: Scripts.RequestOptions): Promise<Webflow.CustomCodeResponse>;
50
65
  protected _getAuthorizationHeader(): Promise<string>;
@@ -58,7 +58,7 @@ class Scripts {
58
58
  * @throws {@link Webflow.InternalServerError}
59
59
  *
60
60
  * @example
61
- * await webflow.scripts.list("site-id")
61
+ * await webflow.scripts.list("string")
62
62
  */
63
63
  list(siteId, requestOptions) {
64
64
  var _a;
@@ -126,6 +126,14 @@ class Scripts {
126
126
  * @throws {@link Webflow.NotFoundError}
127
127
  * @throws {@link Webflow.TooManyRequestsError}
128
128
  * @throws {@link Webflow.InternalServerError}
129
+ *
130
+ * @example
131
+ * await webflow.scripts.registerHosted("string", {
132
+ * hostedLocation: "string",
133
+ * integrityHash: "string",
134
+ * version: "string",
135
+ * displayName: "string"
136
+ * })
129
137
  */
130
138
  registerHosted(siteId, request, requestOptions) {
131
139
  var _a;
@@ -194,6 +202,13 @@ class Scripts {
194
202
  * @throws {@link Webflow.NotFoundError}
195
203
  * @throws {@link Webflow.TooManyRequestsError}
196
204
  * @throws {@link Webflow.InternalServerError}
205
+ *
206
+ * @example
207
+ * await webflow.scripts.registerInline("string", {
208
+ * sourceCode: "alert('hello world');",
209
+ * version: "string",
210
+ * displayName: "string"
211
+ * })
197
212
  */
198
213
  registerInline(siteId, request, requestOptions) {
199
214
  var _a;
@@ -1,6 +1,15 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ /**
5
+ * @example
6
+ * {
7
+ * hostedLocation: "string",
8
+ * integrityHash: "string",
9
+ * version: "string",
10
+ * displayName: "string"
11
+ * }
12
+ */
4
13
  export interface CustomCodeHostedRequest {
5
14
  /** URI for an externally hosted script location */
6
15
  hostedLocation: string;
@@ -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
+ * sourceCode: "alert('hello world');",
8
+ * version: "string",
9
+ * displayName: "string"
10
+ * }
11
+ */
4
12
  export interface CustomCodeInlineRequest {
5
13
  /** The code to be added to the site (to be hosted by Webflow). */
6
14
  sourceCode: string;
@@ -39,7 +39,7 @@ export declare class Sites {
39
39
  * @throws {@link Webflow.InternalServerError}
40
40
  *
41
41
  * @example
42
- * await webflow.sites.get("site-id")
42
+ * await webflow.sites.get("string")
43
43
  */
44
44
  get(siteId: string, requestOptions?: Sites.RequestOptions): Promise<Webflow.Site>;
45
45
  /**
@@ -51,7 +51,7 @@ export declare class Sites {
51
51
  * @throws {@link Webflow.InternalServerError}
52
52
  *
53
53
  * @example
54
- * await webflow.sites.getCustomDomain("site-id")
54
+ * await webflow.sites.getCustomDomain("string")
55
55
  */
56
56
  getCustomDomain(siteId: string, requestOptions?: Sites.RequestOptions): Promise<Webflow.Domain>;
57
57
  /**
@@ -63,7 +63,7 @@ export declare class Sites {
63
63
  * @throws {@link Webflow.TooManyRequestsError}
64
64
  *
65
65
  * @example
66
- * await webflow.sites.publish("site-id", {
66
+ * await webflow.sites.publish("string", {
67
67
  * publishToWebflowSubdomain: false
68
68
  * })
69
69
  */
@@ -129,7 +129,7 @@ class Sites {
129
129
  * @throws {@link Webflow.InternalServerError}
130
130
  *
131
131
  * @example
132
- * await webflow.sites.get("site-id")
132
+ * await webflow.sites.get("string")
133
133
  */
134
134
  get(siteId, requestOptions) {
135
135
  var _a;
@@ -199,7 +199,7 @@ class Sites {
199
199
  * @throws {@link Webflow.InternalServerError}
200
200
  *
201
201
  * @example
202
- * await webflow.sites.getCustomDomain("site-id")
202
+ * await webflow.sites.getCustomDomain("string")
203
203
  */
204
204
  getCustomDomain(siteId, requestOptions) {
205
205
  var _a;
@@ -269,7 +269,7 @@ class Sites {
269
269
  * @throws {@link Webflow.TooManyRequestsError}
270
270
  *
271
271
  * @example
272
- * await webflow.sites.publish("site-id", {
272
+ * await webflow.sites.publish("string", {
273
273
  * publishToWebflowSubdomain: false
274
274
  * })
275
275
  */
@@ -26,7 +26,7 @@ export declare class Scripts {
26
26
  * @throws {@link Webflow.InternalServerError}
27
27
  *
28
28
  * @example
29
- * await webflow.sites.scripts.getCustomCode("site-id")
29
+ * await webflow.sites.scripts.getCustomCode("string")
30
30
  */
31
31
  getCustomCode(siteId: string, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ScriptApplyList>;
32
32
  /**
@@ -38,7 +38,16 @@ export declare class Scripts {
38
38
  * @throws {@link Webflow.InternalServerError}
39
39
  *
40
40
  * @example
41
- * await webflow.sites.scripts.upsertCustomCode("site-id", {})
41
+ * await webflow.sites.scripts.upsertCustomCode("string", {
42
+ * scripts: [{
43
+ * id: "cms_slider",
44
+ * location: Webflow.ScriptApplyLocation.Header,
45
+ * version: "1.0.0",
46
+ * attributes: {
47
+ * "my-attribute": "some-value"
48
+ * }
49
+ * }]
50
+ * })
42
51
  */
43
52
  upsertCustomCode(siteId: string, request: Webflow.ScriptApplyList, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ScriptApplyList>;
44
53
  /**
@@ -50,7 +59,7 @@ export declare class Scripts {
50
59
  * @throws {@link Webflow.InternalServerError}
51
60
  *
52
61
  * @example
53
- * await webflow.sites.scripts.deleteCustomCode("site-id")
62
+ * await webflow.sites.scripts.deleteCustomCode("string")
54
63
  */
55
64
  deleteCustomCode(siteId: string, requestOptions?: Scripts.RequestOptions): Promise<void>;
56
65
  /**
@@ -62,7 +71,7 @@ export declare class Scripts {
62
71
  * @throws {@link Webflow.InternalServerError}
63
72
  *
64
73
  * @example
65
- * await webflow.sites.scripts.listCustomCodeBlocks("site-id", {})
74
+ * await webflow.sites.scripts.listCustomCodeBlocks("string", {})
66
75
  */
67
76
  listCustomCodeBlocks(siteId: string, request?: Webflow.sites.ScriptsListCustomCodeBlocksRequest, requestOptions?: Scripts.RequestOptions): Promise<Webflow.ListCustomCodeBlocks>;
68
77
  protected _getAuthorizationHeader(): Promise<string>;
@@ -58,7 +58,7 @@ class Scripts {
58
58
  * @throws {@link Webflow.InternalServerError}
59
59
  *
60
60
  * @example
61
- * await webflow.sites.scripts.getCustomCode("site-id")
61
+ * await webflow.sites.scripts.getCustomCode("string")
62
62
  */
63
63
  getCustomCode(siteId, requestOptions) {
64
64
  var _a;
@@ -128,7 +128,16 @@ class Scripts {
128
128
  * @throws {@link Webflow.InternalServerError}
129
129
  *
130
130
  * @example
131
- * await webflow.sites.scripts.upsertCustomCode("site-id", {})
131
+ * await webflow.sites.scripts.upsertCustomCode("string", {
132
+ * scripts: [{
133
+ * id: "cms_slider",
134
+ * location: Webflow.ScriptApplyLocation.Header,
135
+ * version: "1.0.0",
136
+ * attributes: {
137
+ * "my-attribute": "some-value"
138
+ * }
139
+ * }]
140
+ * })
132
141
  */
133
142
  upsertCustomCode(siteId, request, requestOptions) {
134
143
  var _a;
@@ -199,7 +208,7 @@ class Scripts {
199
208
  * @throws {@link Webflow.InternalServerError}
200
209
  *
201
210
  * @example
202
- * await webflow.sites.scripts.deleteCustomCode("site-id")
211
+ * await webflow.sites.scripts.deleteCustomCode("string")
203
212
  */
204
213
  deleteCustomCode(siteId, requestOptions) {
205
214
  var _a;
@@ -263,7 +272,7 @@ class Scripts {
263
272
  * @throws {@link Webflow.InternalServerError}
264
273
  *
265
274
  * @example
266
- * await webflow.sites.scripts.listCustomCodeBlocks("site-id", {})
275
+ * await webflow.sites.scripts.listCustomCodeBlocks("string", {})
267
276
  */
268
277
  listCustomCodeBlocks(siteId, request = {}, requestOptions) {
269
278
  var _a;
@@ -27,7 +27,7 @@ export declare class Users {
27
27
  * @throws {@link Webflow.InternalServerError}
28
28
  *
29
29
  * @example
30
- * await webflow.users.list("site-id", {
30
+ * await webflow.users.list("string", {
31
31
  * sort: Webflow.UsersListRequestSort.CreatedOnAscending
32
32
  * })
33
33
  */
@@ -42,7 +42,7 @@ export declare class Users {
42
42
  * @throws {@link Webflow.InternalServerError}
43
43
  *
44
44
  * @example
45
- * await webflow.users.get("site-id", "user-id")
45
+ * await webflow.users.get("string", "string")
46
46
  */
47
47
  get(siteId: string, userId: string, requestOptions?: Users.RequestOptions): Promise<Webflow.User>;
48
48
  /**
@@ -55,7 +55,7 @@ export declare class Users {
55
55
  * @throws {@link Webflow.InternalServerError}
56
56
  *
57
57
  * @example
58
- * await webflow.users.delete("site-id", "user-id")
58
+ * await webflow.users.delete("string", "string")
59
59
  */
60
60
  delete(siteId: string, userId: string, requestOptions?: Users.RequestOptions): Promise<void>;
61
61
  /**
@@ -70,7 +70,7 @@ export declare class Users {
70
70
  * @throws {@link Webflow.InternalServerError}
71
71
  *
72
72
  * @example
73
- * await webflow.users.update("site-id", "user-id", {
73
+ * await webflow.users.update("string", "string", {
74
74
  * id: "6287ec36a841b25637c663df",
75
75
  * lastUpdated: new Date("2016-10-24T19:41:29.156Z"),
76
76
  * invitedOn: new Date("2016-10-24T19:41:29.156Z"),
@@ -79,7 +79,10 @@ export declare class Users {
79
79
  * status: Webflow.UserStatus.Invited,
80
80
  * accessGroups: [{
81
81
  * type: Webflow.UserAccessGroupsItemType.Admin
82
- * }]
82
+ * }],
83
+ * data: {
84
+ * data: {}
85
+ * }
83
86
  * })
84
87
  */
85
88
  update(siteId: string, userId: string, request: Webflow.User, requestOptions?: Users.RequestOptions): Promise<Webflow.User>;
@@ -94,7 +97,7 @@ export declare class Users {
94
97
  * @throws {@link Webflow.InternalServerError}
95
98
  *
96
99
  * @example
97
- * await webflow.users.invite("site-id", {
100
+ * await webflow.users.invite("string", {
98
101
  * email: "some.one@home.com"
99
102
  * })
100
103
  */