@wix/auto_sdk_standalone-forms_standalone-forms 1.0.0 → 1.0.1
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/build/cjs/index.d.ts +3 -15
- package/build/cjs/index.js +15 -83
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -13
- package/build/cjs/index.typings.js +15 -76
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -3
- package/build/cjs/meta.js +15 -71
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +3 -15
- package/build/es/index.mjs +15 -82
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -13
- package/build/es/index.typings.mjs +15 -75
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -3
- package/build/es/meta.mjs +15 -70
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -15
- package/build/internal/cjs/index.typings.d.ts +1 -13
- package/build/internal/cjs/meta.d.ts +2 -3
- package/build/internal/es/index.d.mts +3 -15
- package/build/internal/es/index.typings.d.mts +1 -13
- package/build/internal/es/meta.d.mts +2 -3
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export { AccountInfo, ActionEvent, Address, AddressHint, Asset, BusinessSchedule, Categories, ChangeContext, ChangeContextPayloadOneOf, ConsentPolicy, CreateStandaloneFormRequest, CreateStandaloneFormResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DayOfWeek, DayOfWeekWithLiterals, DeleteContext, DeleteStandaloneFormRequest, DeleteStandaloneFormResponse, DeleteStatus, DeleteStatusWithLiterals, DomainEvent, DomainEventBodyOneOf, EditorlessAssigned, EditorlessUnassigned, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GeoCoordinates, GetDeletedStandaloneFormRequest, GetOrCreateFormStandaloneMetaSiteRequest, GetSitePropertiesRequest, GetStandaloneFormRequest, GetStandaloneFormResponse, IdentificationData, IdentificationDataIdOneOf, ListDeletedStandaloneFormsRequest, Locale, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, Multilingual, Namespace, NamespaceChanged, NamespaceWithLiterals, OdeditorAssigned, OdeditorUnassigned, PicassoAssigned, PicassoUnassigned, PlacementType, PlacementTypeWithLiterals, Properties, PropertiesChange, QueryStandaloneFormsRequest, RemoveStandaloneFormFromTrashBinRequest, RemoveStandaloneFormFromTrashBinResponse, ResolutionMethod, ResolutionMethodWithLiterals, RestoreInfo, RestoreStandaloneFormFromTrashBinRequest, ServiceProvisioned, ServiceRemoved, SiteCloned, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePropertiesEvent, SitePropertiesNotification, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, SortOrderWithLiterals, Sorting, SpecialHourPeriod, StandaloneMetaSiteProperties, State, StateWithLiterals, StudioAssigned, StudioTwoAssigned, StudioTwoUnassigned, StudioUnassigned, SupportedLanguage, TimePeriod, Translation, UserDomainMediaDisabled, UserDomainMediaEnabled, V4SiteCreated, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.js';
|
|
2
|
+
import { StandaloneForm, CreateStandaloneFormApplicationErrors, DeleteStandaloneFormOptions, RestoreStandaloneFormFromTrashBinResponse, GetDeletedStandaloneFormResponse, ListDeletedStandaloneFormsOptions, ListDeletedStandaloneFormsResponse, CursorQuery, QueryStandaloneFormsResponse, GetSitePropertiesResponse, GetSitePropertiesApplicationErrors } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, ActionEvent, Address, AddressHint, Asset, BusinessSchedule, Categories, ChangeContext, ChangeContextPayloadOneOf, ConsentPolicy, CreateStandaloneFormRequest, CreateStandaloneFormResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DayOfWeek, DayOfWeekWithLiterals, DeleteContext, DeleteStandaloneFormRequest, DeleteStandaloneFormResponse, DeleteStatus, DeleteStatusWithLiterals, DomainEvent, DomainEventBodyOneOf, EditorlessAssigned, EditorlessUnassigned, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GeoCoordinates, GetDeletedStandaloneFormRequest, GetOrCreateFormStandaloneMetaSiteRequest, GetOrCreateFormStandaloneMetaSiteResponse, GetSitePropertiesRequest, GetStandaloneFormRequest, GetStandaloneFormResponse, IdentificationData, IdentificationDataIdOneOf, ListDeletedStandaloneFormsRequest, Locale, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, Multilingual, Namespace, NamespaceChanged, NamespaceWithLiterals, OdeditorAssigned, OdeditorUnassigned, PicassoAssigned, PicassoUnassigned, PlacementType, PlacementTypeWithLiterals, Properties, PropertiesChange, QueryStandaloneFormsRequest, RemoveStandaloneFormFromTrashBinRequest, RemoveStandaloneFormFromTrashBinResponse, ResolutionMethod, ResolutionMethodWithLiterals, RestoreInfo, RestoreStandaloneFormFromTrashBinRequest, ServiceProvisioned, ServiceRemoved, SiteCloned, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePropertiesEvent, SitePropertiesNotification, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, SortOrderWithLiterals, Sorting, SpecialHourPeriod, StandaloneMetaSiteProperties, State, StateWithLiterals, StudioAssigned, StudioTwoAssigned, StudioTwoUnassigned, StudioUnassigned, SupportedLanguage, TimePeriod, Translation, UserDomainMediaDisabled, UserDomainMediaEnabled, V4SiteCreated, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.js';
|
|
4
4
|
|
|
5
|
-
declare function getOrCreateFormStandaloneMetaSite$1(httpClient: HttpClient): GetOrCreateFormStandaloneMetaSiteSignature;
|
|
6
|
-
interface GetOrCreateFormStandaloneMetaSiteSignature {
|
|
7
|
-
/**
|
|
8
|
-
* Returns the standalone meta site owned by the caller's account, provisioning a new siteless
|
|
9
|
-
* meta site if one doesn't exist yet.
|
|
10
|
-
*
|
|
11
|
-
* Use this when the caller doesn't already have a meta site, for example when a form is built
|
|
12
|
-
* before the user becomes a Wix user. The returned meta site can then own standalone forms.
|
|
13
|
-
*/
|
|
14
|
-
(): Promise<NonNullablePaths<GetOrCreateFormStandaloneMetaSiteResponse, `metaSiteId`, 0>>;
|
|
15
|
-
}
|
|
16
5
|
declare function createStandaloneForm$1(httpClient: HttpClient): CreateStandaloneFormSignature;
|
|
17
6
|
interface CreateStandaloneFormSignature {
|
|
18
7
|
/**
|
|
@@ -100,7 +89,6 @@ interface GetSitePropertiesSignature {
|
|
|
100
89
|
}>;
|
|
101
90
|
}
|
|
102
91
|
|
|
103
|
-
declare const getOrCreateFormStandaloneMetaSite: MaybeContext<BuildRESTFunction<typeof getOrCreateFormStandaloneMetaSite$1> & typeof getOrCreateFormStandaloneMetaSite$1>;
|
|
104
92
|
declare const createStandaloneForm: MaybeContext<BuildRESTFunction<typeof createStandaloneForm$1> & typeof createStandaloneForm$1>;
|
|
105
93
|
declare const getStandaloneForm: MaybeContext<BuildRESTFunction<typeof getStandaloneForm$1> & typeof getStandaloneForm$1>;
|
|
106
94
|
declare const deleteStandaloneForm: MaybeContext<BuildRESTFunction<typeof deleteStandaloneForm$1> & typeof deleteStandaloneForm$1>;
|
|
@@ -111,4 +99,4 @@ declare const listDeletedStandaloneForms: MaybeContext<BuildRESTFunction<typeof
|
|
|
111
99
|
declare const queryStandaloneForms: MaybeContext<BuildRESTFunction<typeof queryStandaloneForms$1> & typeof queryStandaloneForms$1>;
|
|
112
100
|
declare const getSiteProperties: MaybeContext<BuildRESTFunction<typeof getSiteProperties$1> & typeof getSiteProperties$1>;
|
|
113
101
|
|
|
114
|
-
export { CreateStandaloneFormApplicationErrors, CursorQuery, DeleteStandaloneFormOptions, GetDeletedStandaloneFormResponse,
|
|
102
|
+
export { CreateStandaloneFormApplicationErrors, CursorQuery, DeleteStandaloneFormOptions, GetDeletedStandaloneFormResponse, GetSitePropertiesApplicationErrors, GetSitePropertiesResponse, ListDeletedStandaloneFormsOptions, ListDeletedStandaloneFormsResponse, QueryStandaloneFormsResponse, RestoreStandaloneFormFromTrashBinResponse, StandaloneForm, createStandaloneForm, deleteStandaloneForm, getDeletedStandaloneForm, getSiteProperties, getStandaloneForm, listDeletedStandaloneForms, queryStandaloneForms, removeStandaloneFormFromTrashBin, restoreStandaloneFormFromTrashBin };
|
package/build/cjs/index.js
CHANGED
|
@@ -32,7 +32,6 @@ __export(index_exports, {
|
|
|
32
32
|
createStandaloneForm: () => createStandaloneForm4,
|
|
33
33
|
deleteStandaloneForm: () => deleteStandaloneForm4,
|
|
34
34
|
getDeletedStandaloneForm: () => getDeletedStandaloneForm4,
|
|
35
|
-
getOrCreateFormStandaloneMetaSite: () => getOrCreateFormStandaloneMetaSite4,
|
|
36
35
|
getSiteProperties: () => getSiteProperties4,
|
|
37
36
|
getStandaloneForm: () => getStandaloneForm4,
|
|
38
37
|
listDeletedStandaloneForms: () => listDeletedStandaloneForms4,
|
|
@@ -52,6 +51,14 @@ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
52
51
|
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
53
52
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
54
53
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
54
|
+
var TRANSFORM_PATHS_0 = [
|
|
55
|
+
{ path: "standaloneForm.createdDate" },
|
|
56
|
+
{ path: "standaloneForm.updatedDate" }
|
|
57
|
+
];
|
|
58
|
+
var TRANSFORM_PATHS_1 = [
|
|
59
|
+
{ path: "standaloneForms.createdDate" },
|
|
60
|
+
{ path: "standaloneForms.updatedDate" }
|
|
61
|
+
];
|
|
55
62
|
function resolveWixFormsV1FormStandaloneServiceUrl(opts) {
|
|
56
63
|
const domainToMappings = {
|
|
57
64
|
"manage._base_domain_": [
|
|
@@ -122,36 +129,12 @@ function resolveWixFormsV1FormStandaloneServiceUrl(opts) {
|
|
|
122
129
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
123
130
|
}
|
|
124
131
|
var PACKAGE_NAME = "@wix/auto_sdk_standalone-forms_standalone-forms";
|
|
125
|
-
function getOrCreateFormStandaloneMetaSite(payload) {
|
|
126
|
-
function __getOrCreateFormStandaloneMetaSite({ host }) {
|
|
127
|
-
const metadata = {
|
|
128
|
-
entityFqdn: "wix.forms.v1.standalone_form",
|
|
129
|
-
method: "GET",
|
|
130
|
-
methodFqn: "wix.forms.v1.FormStandaloneService.GetOrCreateFormStandaloneMetaSite",
|
|
131
|
-
packageName: PACKAGE_NAME,
|
|
132
|
-
migrationOptions: {
|
|
133
|
-
optInTransformResponse: true
|
|
134
|
-
},
|
|
135
|
-
url: resolveWixFormsV1FormStandaloneServiceUrl({
|
|
136
|
-
protoPath: "/v4/standalone-forms/metasite",
|
|
137
|
-
data: payload,
|
|
138
|
-
host
|
|
139
|
-
}),
|
|
140
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
141
|
-
};
|
|
142
|
-
return metadata;
|
|
143
|
-
}
|
|
144
|
-
return __getOrCreateFormStandaloneMetaSite;
|
|
145
|
-
}
|
|
146
132
|
function createStandaloneForm(payload) {
|
|
147
133
|
function __createStandaloneForm({ host }) {
|
|
148
134
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
149
135
|
{
|
|
150
136
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
151
|
-
paths:
|
|
152
|
-
{ path: "standaloneForm.createdDate" },
|
|
153
|
-
{ path: "standaloneForm.updatedDate" }
|
|
154
|
-
]
|
|
137
|
+
paths: TRANSFORM_PATHS_0
|
|
155
138
|
}
|
|
156
139
|
]);
|
|
157
140
|
const metadata = {
|
|
@@ -171,10 +154,7 @@ function createStandaloneForm(payload) {
|
|
|
171
154
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
172
155
|
{
|
|
173
156
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
174
|
-
paths:
|
|
175
|
-
{ path: "standaloneForm.createdDate" },
|
|
176
|
-
{ path: "standaloneForm.updatedDate" }
|
|
177
|
-
]
|
|
157
|
+
paths: TRANSFORM_PATHS_0
|
|
178
158
|
}
|
|
179
159
|
])
|
|
180
160
|
};
|
|
@@ -201,10 +181,7 @@ function getStandaloneForm(payload) {
|
|
|
201
181
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
202
182
|
{
|
|
203
183
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
204
|
-
paths:
|
|
205
|
-
{ path: "standaloneForm.createdDate" },
|
|
206
|
-
{ path: "standaloneForm.updatedDate" }
|
|
207
|
-
]
|
|
184
|
+
paths: TRANSFORM_PATHS_0
|
|
208
185
|
}
|
|
209
186
|
])
|
|
210
187
|
};
|
|
@@ -273,10 +250,7 @@ function restoreStandaloneFormFromTrashBin(payload) {
|
|
|
273
250
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
274
251
|
{
|
|
275
252
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
276
|
-
paths:
|
|
277
|
-
{ path: "standaloneForm.createdDate" },
|
|
278
|
-
{ path: "standaloneForm.updatedDate" }
|
|
279
|
-
]
|
|
253
|
+
paths: TRANSFORM_PATHS_0
|
|
280
254
|
}
|
|
281
255
|
])
|
|
282
256
|
};
|
|
@@ -303,10 +277,7 @@ function getDeletedStandaloneForm(payload) {
|
|
|
303
277
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
304
278
|
{
|
|
305
279
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
306
|
-
paths:
|
|
307
|
-
{ path: "standaloneForm.createdDate" },
|
|
308
|
-
{ path: "standaloneForm.updatedDate" }
|
|
309
|
-
]
|
|
280
|
+
paths: TRANSFORM_PATHS_0
|
|
310
281
|
}
|
|
311
282
|
])
|
|
312
283
|
};
|
|
@@ -333,10 +304,7 @@ function listDeletedStandaloneForms(payload) {
|
|
|
333
304
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
334
305
|
{
|
|
335
306
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
336
|
-
paths:
|
|
337
|
-
{ path: "standaloneForms.createdDate" },
|
|
338
|
-
{ path: "standaloneForms.updatedDate" }
|
|
339
|
-
]
|
|
307
|
+
paths: TRANSFORM_PATHS_1
|
|
340
308
|
}
|
|
341
309
|
])
|
|
342
310
|
};
|
|
@@ -363,10 +331,7 @@ function queryStandaloneForms(payload) {
|
|
|
363
331
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
364
332
|
{
|
|
365
333
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
366
|
-
paths:
|
|
367
|
-
{ path: "standaloneForms.createdDate" },
|
|
368
|
-
{ path: "standaloneForms.updatedDate" }
|
|
369
|
-
]
|
|
334
|
+
paths: TRANSFORM_PATHS_1
|
|
370
335
|
}
|
|
371
336
|
])
|
|
372
337
|
};
|
|
@@ -500,31 +465,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
500
465
|
WebhookIdentityType2["APP"] = "APP";
|
|
501
466
|
return WebhookIdentityType2;
|
|
502
467
|
})(WebhookIdentityType || {});
|
|
503
|
-
async function getOrCreateFormStandaloneMetaSite2() {
|
|
504
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
505
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
506
|
-
const reqOpts = getOrCreateFormStandaloneMetaSite(
|
|
507
|
-
payload
|
|
508
|
-
);
|
|
509
|
-
sideEffects?.onSiteCall?.();
|
|
510
|
-
try {
|
|
511
|
-
const result = await httpClient.request(reqOpts);
|
|
512
|
-
sideEffects?.onSuccess?.(result);
|
|
513
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
514
|
-
} catch (err) {
|
|
515
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
516
|
-
err,
|
|
517
|
-
{
|
|
518
|
-
spreadPathsToArguments: {},
|
|
519
|
-
explicitPathsToArguments: {},
|
|
520
|
-
singleArgumentUnchanged: false
|
|
521
|
-
},
|
|
522
|
-
[]
|
|
523
|
-
);
|
|
524
|
-
sideEffects?.onError?.(err);
|
|
525
|
-
throw transformedError;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
468
|
async function createStandaloneForm2(standaloneForm) {
|
|
529
469
|
const { httpClient, sideEffects } = arguments[1];
|
|
530
470
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -758,12 +698,6 @@ async function getSiteProperties2() {
|
|
|
758
698
|
}
|
|
759
699
|
|
|
760
700
|
// src/forms-v1-standalone-form-standalone-forms.public.ts
|
|
761
|
-
function getOrCreateFormStandaloneMetaSite3(httpClient) {
|
|
762
|
-
return () => getOrCreateFormStandaloneMetaSite2(
|
|
763
|
-
// @ts-ignore
|
|
764
|
-
{ httpClient }
|
|
765
|
-
);
|
|
766
|
-
}
|
|
767
701
|
function createStandaloneForm3(httpClient) {
|
|
768
702
|
return (standaloneForm) => createStandaloneForm2(
|
|
769
703
|
standaloneForm,
|
|
@@ -830,7 +764,6 @@ function getSiteProperties3(httpClient) {
|
|
|
830
764
|
|
|
831
765
|
// src/forms-v1-standalone-form-standalone-forms.context.ts
|
|
832
766
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
833
|
-
var getOrCreateFormStandaloneMetaSite4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getOrCreateFormStandaloneMetaSite3);
|
|
834
767
|
var createStandaloneForm4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createStandaloneForm3);
|
|
835
768
|
var getStandaloneForm4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getStandaloneForm3);
|
|
836
769
|
var deleteStandaloneForm4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteStandaloneForm3);
|
|
@@ -854,7 +787,6 @@ var getSiteProperties4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModu
|
|
|
854
787
|
createStandaloneForm,
|
|
855
788
|
deleteStandaloneForm,
|
|
856
789
|
getDeletedStandaloneForm,
|
|
857
|
-
getOrCreateFormStandaloneMetaSite,
|
|
858
790
|
getSiteProperties,
|
|
859
791
|
getStandaloneForm,
|
|
860
792
|
listDeletedStandaloneForms,
|