@wix/auto_sdk_standalone-forms_standalone-forms 1.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.
@@ -0,0 +1,114 @@
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { GetOrCreateFormStandaloneMetaSiteResponse, 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, 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
+
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
+ declare function createStandaloneForm$1(httpClient: HttpClient): CreateStandaloneFormSignature;
17
+ interface CreateStandaloneFormSignature {
18
+ /**
19
+ * Marks an existing form as standalone by creating a standalone form record that binds the form
20
+ * to the meta site that owns it.
21
+ *
22
+ * The form referenced by `formId` must already exist. The owning meta site is taken from the
23
+ * calling context. A given form can be marked standalone by only one record per meta site.
24
+ * @param - Standalone form
25
+ * @returns Standalone form
26
+ */
27
+ (standaloneForm: NonNullablePaths<StandaloneForm, `formId`, 0>): Promise<StandaloneForm & {
28
+ __applicationErrorsType?: CreateStandaloneFormApplicationErrors;
29
+ }>;
30
+ }
31
+ declare function getStandaloneForm$1(httpClient: HttpClient): GetStandaloneFormSignature;
32
+ interface GetStandaloneFormSignature {
33
+ /**
34
+ * Retrieves a standalone form by ID.
35
+ * @param - Standalone form id
36
+ * @returns Standalone form
37
+ */
38
+ (standaloneFormId: string): Promise<StandaloneForm>;
39
+ }
40
+ declare function deleteStandaloneForm$1(httpClient: HttpClient): DeleteStandaloneFormSignature;
41
+ interface DeleteStandaloneFormSignature {
42
+ /**
43
+ * Deletes a standalone form record
44
+ *
45
+ * By default the record is moved to the trash bin. Set `permanent` to `true` to delete it permanently.
46
+ * @param - Standalone form id
47
+ */
48
+ (standaloneFormId: string, options?: DeleteStandaloneFormOptions): Promise<void>;
49
+ }
50
+ declare function removeStandaloneFormFromTrashBin$1(httpClient: HttpClient): RemoveStandaloneFormFromTrashBinSignature;
51
+ interface RemoveStandaloneFormFromTrashBinSignature {
52
+ /**
53
+ * Permanently deletes a standalone form record that is in the trash bin.
54
+ * @param - Standalone form id
55
+ */
56
+ (standaloneFormId: string): Promise<void>;
57
+ }
58
+ declare function restoreStandaloneFormFromTrashBin$1(httpClient: HttpClient): RestoreStandaloneFormFromTrashBinSignature;
59
+ interface RestoreStandaloneFormFromTrashBinSignature {
60
+ /**
61
+ * Restores a standalone form record from the trash bin.
62
+ * @param - Standalone form id
63
+ */
64
+ (standaloneFormId: string): Promise<RestoreStandaloneFormFromTrashBinResponse>;
65
+ }
66
+ declare function getDeletedStandaloneForm$1(httpClient: HttpClient): GetDeletedStandaloneFormSignature;
67
+ interface GetDeletedStandaloneFormSignature {
68
+ /**
69
+ * Retrieves a standalone form record from the trash bin by ID.
70
+ * @param - Standalone form id
71
+ */
72
+ (standaloneFormId: string): Promise<GetDeletedStandaloneFormResponse>;
73
+ }
74
+ declare function listDeletedStandaloneForms$1(httpClient: HttpClient): ListDeletedStandaloneFormsSignature;
75
+ interface ListDeletedStandaloneFormsSignature {
76
+ /**
77
+ * Retrieves a list of standalone form records that are in the trash bin.
78
+ */
79
+ (options?: ListDeletedStandaloneFormsOptions): Promise<NonNullablePaths<ListDeletedStandaloneFormsResponse, `standaloneForms`, 0>>;
80
+ }
81
+ declare function queryStandaloneForms$1(httpClient: HttpClient): QueryStandaloneFormsSignature;
82
+ interface QueryStandaloneFormsSignature {
83
+ /**
84
+ * Retrieves a list of standalone forms, given the provided filtering, sorting, and paging.
85
+ *
86
+ * Supported filterable and sortable fields: `id`, `formId`, `metaSiteId`, `createdDate`, `updatedDate`.
87
+ * @param - WQL expression.
88
+ */
89
+ (query: CursorQuery): Promise<NonNullablePaths<QueryStandaloneFormsResponse, `standaloneForms`, 0>>;
90
+ }
91
+ declare function getSiteProperties$1(httpClient: HttpClient): GetSitePropertiesSignature;
92
+ interface GetSitePropertiesSignature {
93
+ /**
94
+ * Gets site properties (currency and locale) for the caller's standalone meta site.
95
+ *
96
+ * Results may be cached and are not guaranteed to reflect real-time changes.
97
+ */
98
+ (): Promise<NonNullablePaths<GetSitePropertiesResponse, `siteProperties.localeLanguageCode` | `siteProperties.localeCountry`, 1> & {
99
+ __applicationErrorsType?: GetSitePropertiesApplicationErrors;
100
+ }>;
101
+ }
102
+
103
+ declare const getOrCreateFormStandaloneMetaSite: MaybeContext<BuildRESTFunction<typeof getOrCreateFormStandaloneMetaSite$1> & typeof getOrCreateFormStandaloneMetaSite$1>;
104
+ declare const createStandaloneForm: MaybeContext<BuildRESTFunction<typeof createStandaloneForm$1> & typeof createStandaloneForm$1>;
105
+ declare const getStandaloneForm: MaybeContext<BuildRESTFunction<typeof getStandaloneForm$1> & typeof getStandaloneForm$1>;
106
+ declare const deleteStandaloneForm: MaybeContext<BuildRESTFunction<typeof deleteStandaloneForm$1> & typeof deleteStandaloneForm$1>;
107
+ declare const removeStandaloneFormFromTrashBin: MaybeContext<BuildRESTFunction<typeof removeStandaloneFormFromTrashBin$1> & typeof removeStandaloneFormFromTrashBin$1>;
108
+ declare const restoreStandaloneFormFromTrashBin: MaybeContext<BuildRESTFunction<typeof restoreStandaloneFormFromTrashBin$1> & typeof restoreStandaloneFormFromTrashBin$1>;
109
+ declare const getDeletedStandaloneForm: MaybeContext<BuildRESTFunction<typeof getDeletedStandaloneForm$1> & typeof getDeletedStandaloneForm$1>;
110
+ declare const listDeletedStandaloneForms: MaybeContext<BuildRESTFunction<typeof listDeletedStandaloneForms$1> & typeof listDeletedStandaloneForms$1>;
111
+ declare const queryStandaloneForms: MaybeContext<BuildRESTFunction<typeof queryStandaloneForms$1> & typeof queryStandaloneForms$1>;
112
+ declare const getSiteProperties: MaybeContext<BuildRESTFunction<typeof getSiteProperties$1> & typeof getSiteProperties$1>;
113
+
114
+ export { CreateStandaloneFormApplicationErrors, CursorQuery, DeleteStandaloneFormOptions, GetDeletedStandaloneFormResponse, GetOrCreateFormStandaloneMetaSiteResponse, GetSitePropertiesApplicationErrors, GetSitePropertiesResponse, ListDeletedStandaloneFormsOptions, ListDeletedStandaloneFormsResponse, QueryStandaloneFormsResponse, RestoreStandaloneFormFromTrashBinResponse, StandaloneForm, createStandaloneForm, deleteStandaloneForm, getDeletedStandaloneForm, getOrCreateFormStandaloneMetaSite, getSiteProperties, getStandaloneForm, listDeletedStandaloneForms, queryStandaloneForms, removeStandaloneFormFromTrashBin, restoreStandaloneFormFromTrashBin };