webflow-api 3.2.1 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mock/definition/__package__.yml +20 -20
- package/.mock/definition/accessGroups.yml +12 -5
- package/.mock/definition/assets.yml +7 -4
- package/.mock/definition/collections/items.yml +14 -16
- package/.mock/definition/collections.yml +3 -0
- package/.mock/definition/comments.yml +1 -0
- package/.mock/definition/components.yml +16 -12
- package/.mock/definition/forms.yml +15 -88
- package/.mock/definition/items.yml +1 -0
- package/.mock/definition/orders.yml +82 -4
- package/.mock/definition/pages.yml +17 -8
- package/.mock/definition/products.yml +4 -4
- package/.mock/definition/scripts.yml +5 -1
- package/.mock/definition/sites/activityLogs.yml +8 -4
- package/.mock/definition/sites/comments.yml +14 -12
- package/.mock/definition/sites/forms.yml +316 -0
- package/.mock/definition/sites/scripts.yml +5 -4
- package/.mock/definition/sites.yml +24 -0
- package/.mock/definition/users.yml +66 -14
- package/.mock/definition/webhooks.yml +4 -0
- package/.mock/definition/workspaces/auditLogs.yml +4 -4
- package/.mock/fern.config.json +1 -1
- package/Client.js +2 -2
- package/LICENSE +21 -0
- package/api/resources/accessGroups/client/Client.d.ts +4 -2
- package/api/resources/accessGroups/client/Client.js +4 -2
- package/api/resources/accessGroups/client/requests/AccessGroupsListRequest.d.ts +2 -2
- package/api/resources/assets/client/Client.d.ts +2 -2
- package/api/resources/assets/client/Client.js +2 -2
- package/api/resources/assets/client/requests/AssetsListRequest.d.ts +2 -2
- package/api/resources/collections/resources/items/client/Client.d.ts +10 -12
- package/api/resources/collections/resources/items/client/Client.js +10 -12
- package/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.d.ts +2 -2
- package/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +2 -2
- package/api/resources/components/client/Client.d.ts +6 -6
- package/api/resources/components/client/Client.js +6 -6
- package/api/resources/components/client/requests/ComponentsGetContentRequest.d.ts +2 -2
- package/api/resources/components/client/requests/ComponentsGetPropertiesRequest.d.ts +2 -2
- package/api/resources/components/client/requests/ComponentsListRequest.d.ts +2 -2
- package/api/resources/forms/client/Client.d.ts +4 -31
- package/api/resources/forms/client/Client.js +4 -131
- package/api/resources/forms/client/requests/FormsListRequest.d.ts +2 -2
- package/api/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +2 -2
- package/api/resources/forms/client/requests/index.d.ts +0 -1
- package/api/resources/orders/client/Client.d.ts +2 -2
- package/api/resources/orders/client/Client.js +2 -2
- package/api/resources/orders/client/requests/OrdersListRequest.d.ts +2 -2
- package/api/resources/pages/client/Client.d.ts +4 -4
- package/api/resources/pages/client/Client.js +4 -4
- package/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +2 -2
- package/api/resources/pages/client/requests/PagesListRequest.d.ts +2 -2
- package/api/resources/products/client/Client.d.ts +2 -2
- package/api/resources/products/client/Client.js +2 -2
- package/api/resources/products/client/requests/ProductsListRequest.d.ts +2 -2
- package/api/resources/sites/client/Client.d.ts +3 -0
- package/api/resources/sites/client/Client.js +5 -0
- package/api/resources/sites/resources/activityLogs/client/Client.d.ts +2 -2
- package/api/resources/sites/resources/activityLogs/client/Client.js +2 -2
- package/api/resources/sites/resources/activityLogs/client/requests/ActivityLogsListRequest.d.ts +2 -2
- package/api/resources/sites/resources/comments/client/Client.d.ts +6 -6
- package/api/resources/sites/resources/comments/client/Client.js +6 -6
- package/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.d.ts +2 -2
- package/api/resources/sites/resources/comments/client/requests/CommentsListCommentRepliesRequest.d.ts +2 -2
- package/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.d.ts +2 -2
- package/api/resources/sites/resources/forms/client/Client.d.ts +157 -0
- package/api/resources/sites/resources/forms/client/Client.js +662 -0
- package/api/resources/sites/resources/forms/client/index.d.ts +2 -0
- package/api/resources/sites/resources/forms/client/index.js +17 -0
- package/api/resources/{forms → sites/resources/forms}/client/requests/FormsListSubmissionsBySiteRequest.d.ts +2 -2
- package/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +20 -0
- package/api/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.d.ts +11 -0
- package/api/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.js +5 -0
- package/api/resources/sites/resources/forms/client/requests/index.d.ts +3 -0
- package/api/resources/sites/resources/forms/client/requests/index.js +2 -0
- package/api/resources/sites/resources/forms/index.d.ts +1 -0
- package/api/resources/sites/resources/forms/index.js +17 -0
- package/api/resources/sites/resources/index.d.ts +2 -0
- package/api/resources/sites/resources/index.js +3 -1
- package/api/resources/sites/resources/scripts/client/Client.d.ts +2 -2
- package/api/resources/sites/resources/scripts/client/Client.js +2 -2
- package/api/resources/sites/resources/scripts/client/requests/ScriptsListCustomCodeBlocksRequest.d.ts +2 -2
- package/api/resources/users/client/Client.d.ts +12 -2
- package/api/resources/users/client/Client.js +12 -2
- package/api/resources/users/client/requests/UsersListRequest.d.ts +2 -2
- package/api/resources/workspaces/resources/auditLogs/client/Client.d.ts +2 -2
- package/api/resources/workspaces/resources/auditLogs/client/Client.js +2 -2
- package/api/resources/workspaces/resources/auditLogs/client/requests/AuditLogsGetWorkspaceAuditLogsRequest.d.ts +2 -2
- package/dist/Client.js +2 -2
- package/dist/api/resources/accessGroups/client/Client.d.ts +4 -2
- package/dist/api/resources/accessGroups/client/Client.js +4 -2
- package/dist/api/resources/accessGroups/client/requests/AccessGroupsListRequest.d.ts +2 -2
- package/dist/api/resources/assets/client/Client.d.ts +2 -2
- package/dist/api/resources/assets/client/Client.js +2 -2
- package/dist/api/resources/assets/client/requests/AssetsListRequest.d.ts +2 -2
- package/dist/api/resources/collections/resources/items/client/Client.d.ts +10 -12
- package/dist/api/resources/collections/resources/items/client/Client.js +10 -12
- package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsLiveRequest.d.ts +2 -2
- package/dist/api/resources/collections/resources/items/client/requests/ItemsListItemsRequest.d.ts +2 -2
- package/dist/api/resources/components/client/Client.d.ts +6 -6
- package/dist/api/resources/components/client/Client.js +6 -6
- package/dist/api/resources/components/client/requests/ComponentsGetContentRequest.d.ts +2 -2
- package/dist/api/resources/components/client/requests/ComponentsGetPropertiesRequest.d.ts +2 -2
- package/dist/api/resources/components/client/requests/ComponentsListRequest.d.ts +2 -2
- package/dist/api/resources/forms/client/Client.d.ts +4 -31
- package/dist/api/resources/forms/client/Client.js +4 -131
- package/dist/api/resources/forms/client/requests/FormsListRequest.d.ts +2 -2
- package/dist/api/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +2 -2
- package/dist/api/resources/forms/client/requests/index.d.ts +0 -1
- package/dist/api/resources/orders/client/Client.d.ts +2 -2
- package/dist/api/resources/orders/client/Client.js +2 -2
- package/dist/api/resources/orders/client/requests/OrdersListRequest.d.ts +2 -2
- package/dist/api/resources/pages/client/Client.d.ts +4 -4
- package/dist/api/resources/pages/client/Client.js +4 -4
- package/dist/api/resources/pages/client/requests/PagesGetContentRequest.d.ts +2 -2
- package/dist/api/resources/pages/client/requests/PagesListRequest.d.ts +2 -2
- package/dist/api/resources/products/client/Client.d.ts +2 -2
- package/dist/api/resources/products/client/Client.js +2 -2
- package/dist/api/resources/products/client/requests/ProductsListRequest.d.ts +2 -2
- package/dist/api/resources/sites/client/Client.d.ts +3 -0
- package/dist/api/resources/sites/client/Client.js +5 -0
- package/dist/api/resources/sites/resources/activityLogs/client/Client.d.ts +2 -2
- package/dist/api/resources/sites/resources/activityLogs/client/Client.js +2 -2
- package/dist/api/resources/sites/resources/activityLogs/client/requests/ActivityLogsListRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/comments/client/Client.d.ts +6 -6
- package/dist/api/resources/sites/resources/comments/client/Client.js +6 -6
- package/dist/api/resources/sites/resources/comments/client/requests/CommentsGetCommentThreadRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/comments/client/requests/CommentsListCommentRepliesRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/comments/client/requests/CommentsListCommentThreadsRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/forms/client/Client.d.ts +157 -0
- package/dist/api/resources/sites/resources/forms/client/Client.js +662 -0
- package/dist/api/resources/sites/resources/forms/client/index.d.ts +2 -0
- package/dist/api/resources/sites/resources/forms/client/index.js +17 -0
- package/dist/api/resources/{forms → sites/resources/forms}/client/requests/FormsListSubmissionsBySiteRequest.d.ts +2 -2
- package/dist/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.js +5 -0
- package/dist/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsRequest.d.ts +20 -0
- package/dist/api/resources/sites/resources/forms/client/requests/FormsListSubmissionsRequest.js +5 -0
- package/dist/api/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.d.ts +11 -0
- package/dist/api/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.js +5 -0
- package/dist/api/resources/sites/resources/forms/client/requests/index.d.ts +3 -0
- package/dist/api/resources/sites/resources/forms/client/requests/index.js +2 -0
- package/dist/api/resources/sites/resources/forms/index.d.ts +1 -0
- package/dist/api/resources/sites/resources/forms/index.js +17 -0
- package/dist/api/resources/sites/resources/index.d.ts +2 -0
- package/dist/api/resources/sites/resources/index.js +3 -1
- package/dist/api/resources/sites/resources/scripts/client/Client.d.ts +2 -2
- package/dist/api/resources/sites/resources/scripts/client/Client.js +2 -2
- package/dist/api/resources/sites/resources/scripts/client/requests/ScriptsListCustomCodeBlocksRequest.d.ts +2 -2
- package/dist/api/resources/users/client/Client.d.ts +12 -2
- package/dist/api/resources/users/client/Client.js +12 -2
- package/dist/api/resources/users/client/requests/UsersListRequest.d.ts +2 -2
- package/dist/api/resources/workspaces/resources/auditLogs/client/Client.d.ts +2 -2
- package/dist/api/resources/workspaces/resources/auditLogs/client/Client.js +2 -2
- package/dist/api/resources/workspaces/resources/auditLogs/client/requests/AuditLogsGetWorkspaceAuditLogsRequest.d.ts +2 -2
- package/dist/serialization/resources/sites/resources/forms/client/index.d.ts +1 -0
- package/dist/serialization/resources/sites/resources/forms/client/index.js +17 -0
- package/dist/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.d.ts +12 -0
- package/dist/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.js +43 -0
- package/dist/serialization/resources/sites/resources/forms/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/sites/resources/forms/client/requests/index.js +5 -0
- package/dist/serialization/resources/sites/resources/forms/index.d.ts +1 -0
- package/dist/serialization/resources/sites/resources/forms/index.js +17 -0
- package/dist/serialization/resources/sites/resources/index.d.ts +2 -0
- package/dist/serialization/resources/sites/resources/index.js +3 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/FormsClient.d.ts +37 -0
- package/dist/wrapper/FormsClient.js +193 -0
- package/dist/wrapper/ItemsClient.js +18 -14
- package/dist/wrapper/PagesClient.js +6 -5
- package/dist/wrapper/WebflowClient.d.ts +3 -0
- package/dist/wrapper/WebflowClient.js +6 -5
- package/jest.config.mjs +26 -5
- package/package.json +3 -2
- package/reference.md +458 -125
- package/serialization/resources/sites/resources/forms/client/index.d.ts +1 -0
- package/serialization/resources/sites/resources/forms/client/index.js +17 -0
- package/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.d.ts +12 -0
- package/serialization/resources/sites/resources/forms/client/requests/FormsUpdateSubmissionRequest.js +43 -0
- package/serialization/resources/sites/resources/forms/client/requests/index.d.ts +1 -0
- package/serialization/resources/sites/resources/forms/client/requests/index.js +5 -0
- package/serialization/resources/sites/resources/forms/index.d.ts +1 -0
- package/serialization/resources/sites/resources/forms/index.js +17 -0
- package/serialization/resources/sites/resources/index.d.ts +2 -0
- package/serialization/resources/sites/resources/index.js +3 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/FormsClient.d.ts +37 -0
- package/wrapper/FormsClient.js +193 -0
- package/wrapper/ItemsClient.js +18 -14
- package/wrapper/PagesClient.js +6 -5
- package/wrapper/WebflowClient.d.ts +3 -0
- package/wrapper/WebflowClient.js +6 -5
- /package/api/resources/{forms → sites/resources/forms}/client/requests/FormsListSubmissionsBySiteRequest.js +0 -0
- /package/{dist/api/resources/forms/client/requests/FormsListSubmissionsBySiteRequest.js → api/resources/sites/resources/forms/client/requests/FormsListSubmissionsRequest.js} +0 -0
|
@@ -49,8 +49,8 @@ export declare class Forms {
|
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
51
|
* await client.forms.list("580e63e98c9a982ac9b8b741", {
|
|
52
|
-
* limit: 1
|
|
53
|
-
* offset: 1
|
|
52
|
+
* limit: 1,
|
|
53
|
+
* offset: 1
|
|
54
54
|
* })
|
|
55
55
|
*/
|
|
56
56
|
list(siteId: string, request?: Webflow.FormsListRequest, requestOptions?: Forms.RequestOptions): core.HttpResponsePromise<Webflow.FormList>;
|
|
@@ -99,8 +99,8 @@ export declare class Forms {
|
|
|
99
99
|
*
|
|
100
100
|
* @example
|
|
101
101
|
* await client.forms.listSubmissions("580e63e98c9a982ac9b8b741", {
|
|
102
|
-
* offset: 1
|
|
103
|
-
* limit: 1
|
|
102
|
+
* offset: 1,
|
|
103
|
+
* limit: 1
|
|
104
104
|
* })
|
|
105
105
|
*/
|
|
106
106
|
listSubmissions(formId: string, request?: Webflow.FormsListSubmissionsRequest, requestOptions?: Forms.RequestOptions): core.HttpResponsePromise<Webflow.FormSubmissionList>;
|
|
@@ -169,32 +169,5 @@ export declare class Forms {
|
|
|
169
169
|
*/
|
|
170
170
|
updateSubmission(formSubmissionId: string, request?: Webflow.FormsUpdateSubmissionRequest, requestOptions?: Forms.RequestOptions): core.HttpResponsePromise<Webflow.FormSubmission>;
|
|
171
171
|
private __updateSubmission;
|
|
172
|
-
/**
|
|
173
|
-
* List form submissions for a given site. This endpoint differs from the existing [List Form Submissions endpoint](/data/reference/forms/form-submissions/list-submissions) by accepting `siteId` as a path parameter and `elementId` as a query parameter. You can get the `elementId` from the [List forms endpoint](/data/reference/forms/forms/list).
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* Required scope | `forms:read`
|
|
178
|
-
*
|
|
179
|
-
* @param {string} siteId - Unique identifier for a Site
|
|
180
|
-
* @param {Webflow.FormsListSubmissionsBySiteRequest} request
|
|
181
|
-
* @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
|
|
182
|
-
*
|
|
183
|
-
* @throws {@link Webflow.BadRequestError}
|
|
184
|
-
* @throws {@link Webflow.UnauthorizedError}
|
|
185
|
-
* @throws {@link Webflow.ForbiddenError}
|
|
186
|
-
* @throws {@link Webflow.NotFoundError}
|
|
187
|
-
* @throws {@link Webflow.TooManyRequestsError}
|
|
188
|
-
* @throws {@link Webflow.InternalServerError}
|
|
189
|
-
*
|
|
190
|
-
* @example
|
|
191
|
-
* await client.forms.listSubmissionsBySite("580e63e98c9a982ac9b8b741", {
|
|
192
|
-
* elementId: "18259716-3e5a-646a-5f41-5dc4b9405aa0",
|
|
193
|
-
* offset: 1.1,
|
|
194
|
-
* limit: 1.1
|
|
195
|
-
* })
|
|
196
|
-
*/
|
|
197
|
-
listSubmissionsBySite(siteId: string, request?: Webflow.FormsListSubmissionsBySiteRequest, requestOptions?: Forms.RequestOptions): core.HttpResponsePromise<Webflow.FormSubmissionList>;
|
|
198
|
-
private __listSubmissionsBySite;
|
|
199
172
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
200
173
|
}
|
|
@@ -82,8 +82,8 @@ class Forms {
|
|
|
82
82
|
*
|
|
83
83
|
* @example
|
|
84
84
|
* await client.forms.list("580e63e98c9a982ac9b8b741", {
|
|
85
|
-
* limit: 1
|
|
86
|
-
* offset: 1
|
|
85
|
+
* limit: 1,
|
|
86
|
+
* offset: 1
|
|
87
87
|
* })
|
|
88
88
|
*/
|
|
89
89
|
list(siteId, request = {}, requestOptions) {
|
|
@@ -319,8 +319,8 @@ class Forms {
|
|
|
319
319
|
*
|
|
320
320
|
* @example
|
|
321
321
|
* await client.forms.listSubmissions("580e63e98c9a982ac9b8b741", {
|
|
322
|
-
* offset: 1
|
|
323
|
-
* limit: 1
|
|
322
|
+
* offset: 1,
|
|
323
|
+
* limit: 1
|
|
324
324
|
* })
|
|
325
325
|
*/
|
|
326
326
|
listSubmissions(formId, request = {}, requestOptions) {
|
|
@@ -752,133 +752,6 @@ class Forms {
|
|
|
752
752
|
}
|
|
753
753
|
});
|
|
754
754
|
}
|
|
755
|
-
/**
|
|
756
|
-
* List form submissions for a given site. This endpoint differs from the existing [List Form Submissions endpoint](/data/reference/forms/form-submissions/list-submissions) by accepting `siteId` as a path parameter and `elementId` as a query parameter. You can get the `elementId` from the [List forms endpoint](/data/reference/forms/forms/list).
|
|
757
|
-
*
|
|
758
|
-
*
|
|
759
|
-
*
|
|
760
|
-
* Required scope | `forms:read`
|
|
761
|
-
*
|
|
762
|
-
* @param {string} siteId - Unique identifier for a Site
|
|
763
|
-
* @param {Webflow.FormsListSubmissionsBySiteRequest} request
|
|
764
|
-
* @param {Forms.RequestOptions} requestOptions - Request-specific configuration.
|
|
765
|
-
*
|
|
766
|
-
* @throws {@link Webflow.BadRequestError}
|
|
767
|
-
* @throws {@link Webflow.UnauthorizedError}
|
|
768
|
-
* @throws {@link Webflow.ForbiddenError}
|
|
769
|
-
* @throws {@link Webflow.NotFoundError}
|
|
770
|
-
* @throws {@link Webflow.TooManyRequestsError}
|
|
771
|
-
* @throws {@link Webflow.InternalServerError}
|
|
772
|
-
*
|
|
773
|
-
* @example
|
|
774
|
-
* await client.forms.listSubmissionsBySite("580e63e98c9a982ac9b8b741", {
|
|
775
|
-
* elementId: "18259716-3e5a-646a-5f41-5dc4b9405aa0",
|
|
776
|
-
* offset: 1.1,
|
|
777
|
-
* limit: 1.1
|
|
778
|
-
* })
|
|
779
|
-
*/
|
|
780
|
-
listSubmissionsBySite(siteId, request = {}, requestOptions) {
|
|
781
|
-
return core.HttpResponsePromise.fromPromise(this.__listSubmissionsBySite(siteId, request, requestOptions));
|
|
782
|
-
}
|
|
783
|
-
__listSubmissionsBySite(siteId_1) {
|
|
784
|
-
return __awaiter(this, arguments, void 0, function* (siteId, request = {}, requestOptions) {
|
|
785
|
-
var _a, _b, _c;
|
|
786
|
-
const { elementId, offset, limit } = request;
|
|
787
|
-
const _queryParams = {};
|
|
788
|
-
if (elementId != null) {
|
|
789
|
-
_queryParams["elementId"] = elementId;
|
|
790
|
-
}
|
|
791
|
-
if (offset != null) {
|
|
792
|
-
_queryParams["offset"] = offset.toString();
|
|
793
|
-
}
|
|
794
|
-
if (limit != null) {
|
|
795
|
-
_queryParams["limit"] = limit.toString();
|
|
796
|
-
}
|
|
797
|
-
const _response = yield core.fetcher({
|
|
798
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.WebflowEnvironment.DataApi)
|
|
799
|
-
.base, `sites/${encodeURIComponent(siteId)}/form_submissions`),
|
|
800
|
-
method: "GET",
|
|
801
|
-
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
802
|
-
queryParameters: _queryParams,
|
|
803
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
804
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
805
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
806
|
-
});
|
|
807
|
-
if (_response.ok) {
|
|
808
|
-
return {
|
|
809
|
-
data: serializers.FormSubmissionList.parseOrThrow(_response.body, {
|
|
810
|
-
unrecognizedObjectKeys: "passthrough",
|
|
811
|
-
allowUnrecognizedUnionMembers: true,
|
|
812
|
-
allowUnrecognizedEnumValues: true,
|
|
813
|
-
skipValidation: true,
|
|
814
|
-
breadcrumbsPrefix: ["response"],
|
|
815
|
-
}),
|
|
816
|
-
rawResponse: _response.rawResponse,
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
|
-
if (_response.error.reason === "status-code") {
|
|
820
|
-
switch (_response.error.statusCode) {
|
|
821
|
-
case 400:
|
|
822
|
-
throw new Webflow.BadRequestError(_response.error.body, _response.rawResponse);
|
|
823
|
-
case 401:
|
|
824
|
-
throw new Webflow.UnauthorizedError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
825
|
-
unrecognizedObjectKeys: "passthrough",
|
|
826
|
-
allowUnrecognizedUnionMembers: true,
|
|
827
|
-
allowUnrecognizedEnumValues: true,
|
|
828
|
-
skipValidation: true,
|
|
829
|
-
breadcrumbsPrefix: ["response"],
|
|
830
|
-
}), _response.rawResponse);
|
|
831
|
-
case 403:
|
|
832
|
-
throw new Webflow.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
833
|
-
case 404:
|
|
834
|
-
throw new Webflow.NotFoundError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
835
|
-
unrecognizedObjectKeys: "passthrough",
|
|
836
|
-
allowUnrecognizedUnionMembers: true,
|
|
837
|
-
allowUnrecognizedEnumValues: true,
|
|
838
|
-
skipValidation: true,
|
|
839
|
-
breadcrumbsPrefix: ["response"],
|
|
840
|
-
}), _response.rawResponse);
|
|
841
|
-
case 429:
|
|
842
|
-
throw new Webflow.TooManyRequestsError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
843
|
-
unrecognizedObjectKeys: "passthrough",
|
|
844
|
-
allowUnrecognizedUnionMembers: true,
|
|
845
|
-
allowUnrecognizedEnumValues: true,
|
|
846
|
-
skipValidation: true,
|
|
847
|
-
breadcrumbsPrefix: ["response"],
|
|
848
|
-
}), _response.rawResponse);
|
|
849
|
-
case 500:
|
|
850
|
-
throw new Webflow.InternalServerError(serializers.Error_.parseOrThrow(_response.error.body, {
|
|
851
|
-
unrecognizedObjectKeys: "passthrough",
|
|
852
|
-
allowUnrecognizedUnionMembers: true,
|
|
853
|
-
allowUnrecognizedEnumValues: true,
|
|
854
|
-
skipValidation: true,
|
|
855
|
-
breadcrumbsPrefix: ["response"],
|
|
856
|
-
}), _response.rawResponse);
|
|
857
|
-
default:
|
|
858
|
-
throw new errors.WebflowError({
|
|
859
|
-
statusCode: _response.error.statusCode,
|
|
860
|
-
body: _response.error.body,
|
|
861
|
-
rawResponse: _response.rawResponse,
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
switch (_response.error.reason) {
|
|
866
|
-
case "non-json":
|
|
867
|
-
throw new errors.WebflowError({
|
|
868
|
-
statusCode: _response.error.statusCode,
|
|
869
|
-
body: _response.error.rawBody,
|
|
870
|
-
rawResponse: _response.rawResponse,
|
|
871
|
-
});
|
|
872
|
-
case "timeout":
|
|
873
|
-
throw new errors.WebflowTimeoutError("Timeout exceeded when calling GET /sites/{site_id}/form_submissions.");
|
|
874
|
-
case "unknown":
|
|
875
|
-
throw new errors.WebflowError({
|
|
876
|
-
message: _response.error.errorMessage,
|
|
877
|
-
rawResponse: _response.rawResponse,
|
|
878
|
-
});
|
|
879
|
-
}
|
|
880
|
-
});
|
|
881
|
-
}
|
|
882
755
|
_getAuthorizationHeader() {
|
|
883
756
|
return __awaiter(this, void 0, void 0, function* () {
|
|
884
757
|
const bearer = yield core.Supplier.get(this._options.accessToken);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { type FormsListRequest } from "./FormsListRequest";
|
|
2
2
|
export { type FormsListSubmissionsRequest } from "./FormsListSubmissionsRequest";
|
|
3
3
|
export { type FormsUpdateSubmissionRequest } from "./FormsUpdateSubmissionRequest";
|
|
4
|
-
export { type FormsListSubmissionsBySiteRequest } from "./FormsListSubmissionsBySiteRequest";
|
|
@@ -50,8 +50,8 @@ export declare class Orders {
|
|
|
50
50
|
* @example
|
|
51
51
|
* await client.orders.list("580e63e98c9a982ac9b8b741", {
|
|
52
52
|
* status: "pending",
|
|
53
|
-
* offset: 1
|
|
54
|
-
* limit: 1
|
|
53
|
+
* offset: 1,
|
|
54
|
+
* limit: 1
|
|
55
55
|
* })
|
|
56
56
|
*/
|
|
57
57
|
list(siteId: string, request?: Webflow.OrdersListRequest, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Webflow.OrderList>;
|
|
@@ -51,8 +51,8 @@ export declare class Pages {
|
|
|
51
51
|
* @example
|
|
52
52
|
* await client.pages.list("580e63e98c9a982ac9b8b741", {
|
|
53
53
|
* localeId: "65427cf400e02b306eaa04a0",
|
|
54
|
-
* limit: 1
|
|
55
|
-
* offset: 1
|
|
54
|
+
* limit: 1,
|
|
55
|
+
* offset: 1
|
|
56
56
|
* })
|
|
57
57
|
*/
|
|
58
58
|
list(siteId: string, request?: Webflow.PagesListRequest, requestOptions?: Pages.RequestOptions): core.HttpResponsePromise<Webflow.PageList>;
|
|
@@ -134,8 +134,8 @@ export declare class Pages {
|
|
|
134
134
|
* @example
|
|
135
135
|
* await client.pages.getContent("63c720f9347c2139b248e552", {
|
|
136
136
|
* localeId: "65427cf400e02b306eaa04a0",
|
|
137
|
-
* limit: 1
|
|
138
|
-
* offset: 1
|
|
137
|
+
* limit: 1,
|
|
138
|
+
* offset: 1
|
|
139
139
|
* })
|
|
140
140
|
*/
|
|
141
141
|
getContent(pageId: string, request?: Webflow.PagesGetContentRequest, requestOptions?: Pages.RequestOptions): core.HttpResponsePromise<Webflow.Dom>;
|
|
@@ -97,8 +97,8 @@ class Pages {
|
|
|
97
97
|
* @example
|
|
98
98
|
* await client.pages.list("580e63e98c9a982ac9b8b741", {
|
|
99
99
|
* localeId: "65427cf400e02b306eaa04a0",
|
|
100
|
-
* limit: 1
|
|
101
|
-
* offset: 1
|
|
100
|
+
* limit: 1,
|
|
101
|
+
* offset: 1
|
|
102
102
|
* })
|
|
103
103
|
*/
|
|
104
104
|
list(siteId, request = {}, requestOptions) {
|
|
@@ -469,8 +469,8 @@ class Pages {
|
|
|
469
469
|
* @example
|
|
470
470
|
* await client.pages.getContent("63c720f9347c2139b248e552", {
|
|
471
471
|
* localeId: "65427cf400e02b306eaa04a0",
|
|
472
|
-
* limit: 1
|
|
473
|
-
* offset: 1
|
|
472
|
+
* limit: 1,
|
|
473
|
+
* offset: 1
|
|
474
474
|
* })
|
|
475
475
|
*/
|
|
476
476
|
getContent(pageId, request = {}, requestOptions) {
|
|
@@ -49,8 +49,8 @@ export declare class Products {
|
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
51
|
* await client.products.list("580e63e98c9a982ac9b8b741", {
|
|
52
|
-
* offset: 1
|
|
53
|
-
* limit: 1
|
|
52
|
+
* offset: 1,
|
|
53
|
+
* limit: 1
|
|
54
54
|
* })
|
|
55
55
|
*/
|
|
56
56
|
list(siteId: string, request?: Webflow.ProductsListRequest, requestOptions?: Products.RequestOptions): core.HttpResponsePromise<Webflow.ProductAndSkUsList>;
|
|
@@ -11,6 +11,7 @@ import { WellKnown } from "../resources/wellKnown/client/Client";
|
|
|
11
11
|
import { ActivityLogs } from "../resources/activityLogs/client/Client";
|
|
12
12
|
import { Comments } from "../resources/comments/client/Client";
|
|
13
13
|
import { Scripts } from "../resources/scripts/client/Client";
|
|
14
|
+
import { Forms } from "../resources/forms/client/Client";
|
|
14
15
|
export declare namespace Sites {
|
|
15
16
|
interface Options {
|
|
16
17
|
environment?: core.Supplier<environments.WebflowEnvironment | environments.WebflowEnvironmentUrls>;
|
|
@@ -43,6 +44,7 @@ export declare class Sites {
|
|
|
43
44
|
protected _activityLogs: ActivityLogs | undefined;
|
|
44
45
|
protected _comments: Comments | undefined;
|
|
45
46
|
protected _scripts: Scripts | undefined;
|
|
47
|
+
protected _forms: Forms | undefined;
|
|
46
48
|
constructor(_options?: Sites.Options);
|
|
47
49
|
get redirects(): Redirects;
|
|
48
50
|
get plans(): Plans;
|
|
@@ -51,6 +53,7 @@ export declare class Sites {
|
|
|
51
53
|
get activityLogs(): ActivityLogs;
|
|
52
54
|
get comments(): Comments;
|
|
53
55
|
get scripts(): Scripts;
|
|
56
|
+
get forms(): Forms;
|
|
54
57
|
/**
|
|
55
58
|
* Create a site.
|
|
56
59
|
*
|
|
@@ -63,6 +63,7 @@ const Client_4 = require("../resources/wellKnown/client/Client");
|
|
|
63
63
|
const Client_5 = require("../resources/activityLogs/client/Client");
|
|
64
64
|
const Client_6 = require("../resources/comments/client/Client");
|
|
65
65
|
const Client_7 = require("../resources/scripts/client/Client");
|
|
66
|
+
const Client_8 = require("../resources/forms/client/Client");
|
|
66
67
|
/**
|
|
67
68
|
* Sites are the sites in your Webflow workspace.
|
|
68
69
|
*/
|
|
@@ -98,6 +99,10 @@ class Sites {
|
|
|
98
99
|
var _a;
|
|
99
100
|
return ((_a = this._scripts) !== null && _a !== void 0 ? _a : (this._scripts = new Client_7.Scripts(this._options)));
|
|
100
101
|
}
|
|
102
|
+
get forms() {
|
|
103
|
+
var _a;
|
|
104
|
+
return ((_a = this._forms) !== null && _a !== void 0 ? _a : (this._forms = new Client_8.Forms(this._options)));
|
|
105
|
+
}
|
|
101
106
|
/**
|
|
102
107
|
* Create a site.
|
|
103
108
|
*
|
|
@@ -45,8 +45,8 @@ export declare class ActivityLogs {
|
|
|
45
45
|
*
|
|
46
46
|
* @example
|
|
47
47
|
* await client.sites.activityLogs.list("580e63e98c9a982ac9b8b741", {
|
|
48
|
-
* limit: 1
|
|
49
|
-
* offset: 1
|
|
48
|
+
* limit: 1,
|
|
49
|
+
* offset: 1
|
|
50
50
|
* })
|
|
51
51
|
*/
|
|
52
52
|
list(siteId: string, request?: Webflow.sites.ActivityLogsListRequest, requestOptions?: ActivityLogs.RequestOptions): core.HttpResponsePromise<Webflow.SiteActivityLogResponse>;
|
|
@@ -49,8 +49,8 @@ export declare class Comments {
|
|
|
49
49
|
* @example
|
|
50
50
|
* await client.sites.comments.listCommentThreads("580e63e98c9a982ac9b8b741", {
|
|
51
51
|
* localeId: "65427cf400e02b306eaa04a0",
|
|
52
|
-
* offset: 1
|
|
53
|
-
* limit: 1
|
|
52
|
+
* offset: 1,
|
|
53
|
+
* limit: 1,
|
|
54
54
|
* sortBy: "createdOn",
|
|
55
55
|
* sortOrder: "asc"
|
|
56
56
|
* })
|
|
@@ -80,8 +80,8 @@ export declare class Comments {
|
|
|
80
80
|
* @example
|
|
81
81
|
* await client.sites.comments.getCommentThread("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", {
|
|
82
82
|
* localeId: "65427cf400e02b306eaa04a0",
|
|
83
|
-
* offset: 1
|
|
84
|
-
* limit: 1
|
|
83
|
+
* offset: 1,
|
|
84
|
+
* limit: 1,
|
|
85
85
|
* sortBy: "createdOn",
|
|
86
86
|
* sortOrder: "asc"
|
|
87
87
|
* })
|
|
@@ -111,8 +111,8 @@ export declare class Comments {
|
|
|
111
111
|
* @example
|
|
112
112
|
* await client.sites.comments.listCommentReplies("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", {
|
|
113
113
|
* localeId: "65427cf400e02b306eaa04a0",
|
|
114
|
-
* offset: 1
|
|
115
|
-
* limit: 1
|
|
114
|
+
* offset: 1,
|
|
115
|
+
* limit: 1,
|
|
116
116
|
* sortBy: "createdOn",
|
|
117
117
|
* sortOrder: "asc"
|
|
118
118
|
* })
|
|
@@ -82,8 +82,8 @@ class Comments {
|
|
|
82
82
|
* @example
|
|
83
83
|
* await client.sites.comments.listCommentThreads("580e63e98c9a982ac9b8b741", {
|
|
84
84
|
* localeId: "65427cf400e02b306eaa04a0",
|
|
85
|
-
* offset: 1
|
|
86
|
-
* limit: 1
|
|
85
|
+
* offset: 1,
|
|
86
|
+
* limit: 1,
|
|
87
87
|
* sortBy: "createdOn",
|
|
88
88
|
* sortOrder: "asc"
|
|
89
89
|
* })
|
|
@@ -225,8 +225,8 @@ class Comments {
|
|
|
225
225
|
* @example
|
|
226
226
|
* await client.sites.comments.getCommentThread("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", {
|
|
227
227
|
* localeId: "65427cf400e02b306eaa04a0",
|
|
228
|
-
* offset: 1
|
|
229
|
-
* limit: 1
|
|
228
|
+
* offset: 1,
|
|
229
|
+
* limit: 1,
|
|
230
230
|
* sortBy: "createdOn",
|
|
231
231
|
* sortOrder: "asc"
|
|
232
232
|
* })
|
|
@@ -368,8 +368,8 @@ class Comments {
|
|
|
368
368
|
* @example
|
|
369
369
|
* await client.sites.comments.listCommentReplies("580e63e98c9a982ac9b8b741", "580e63e98c9a982ac9b8b741", {
|
|
370
370
|
* localeId: "65427cf400e02b306eaa04a0",
|
|
371
|
-
* offset: 1
|
|
372
|
-
* limit: 1
|
|
371
|
+
* offset: 1,
|
|
372
|
+
* limit: 1,
|
|
373
373
|
* sortBy: "createdOn",
|
|
374
374
|
* sortOrder: "asc"
|
|
375
375
|
* })
|