@wix/auto_sdk_apps-installer_apps-installer 1.0.2 → 1.0.4
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 +1 -1
- package/build/cjs/index.js +27 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +24 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +24 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +27 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +24 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +24 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.js +27 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +24 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js +24 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.mjs +27 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +24 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs +24 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/apps-v1-app-instance-apps-installer.universal.ts","../../src/apps-v1-app-instance-apps-installer.http.ts"],"sourcesContent":["export * from './src/apps-v1-app-instance-apps-installer.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAppsV1AppInstance from './apps-v1-app-instance-apps-installer.http.js';\n\nexport interface AppInstance {\n /**\n * App instance ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of the app to install.\n * @format GUID\n */\n appDefId?: string;\n /**\n * Version of the app to install.\n *\n * If you don't specify a version, the latest version of the app will be installed. Don't specify a version unless you want to install an older version of the app.\n */\n version?: string | null;\n /** Whether the app instance is enabled. */\n enabled?: boolean;\n /**\n * A signed access token of the Wix user and the app instance.\n * @readonly\n */\n appToken?: string | null;\n /**\n * Date and time the app instance was installed.\n * @readonly\n */\n installedDate?: Date | null;\n /**\n * Date and time the app instance was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport enum Status {\n /** Installation status is unknown. */\n UNKNOWN = 'UNKNOWN',\n /** Waiting for OAUTH authentication to complete installation. */\n WAITING_FOR_OAUTH = 'WAITING_FOR_OAUTH',\n /** App instance authenticated successfully. */\n AUTHENTICATED = 'AUTHENTICATED',\n /** Payment hasn't been completed and is required for access to the app. */\n DIDNT_COMPLETE_PAYMENT = 'DIDNT_COMPLETE_PAYMENT',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'WAITING_FOR_OAUTH'\n | 'AUTHENTICATED'\n | 'DIDNT_COMPLETE_PAYMENT';\n\nexport interface LegacyParams {\n /** Legacy int id */\n intId?: number | null;\n /**\n * Legacy source template id\n * @format GUID\n */\n sourceTemplateId?: string | null;\n}\n\nexport interface DevVersionInstallation {\n /**\n * ID of the override to assign to the development version.\n * @maxLength 50\n */\n overrideId?: string;\n}\n\nexport interface ListAppInstancesRequest {\n /** Tenant to fetch app instances for */\n tenant?: Tenant;\n}\n\nexport interface Tenant {\n /** Tenant ID. For a site, this is the [site ID](https://dev.wix.com/docs/rest/account-level/sites/sites/introduction). For an account this is the [account ID](https://dev.wix.com/docs/rest/account-level/user-management/accounts/accounts/about-accounts). */\n _id?: string;\n /** Tenant type. This can be a Wix site or account. */\n tenantType?: TenantTypeWithLiterals;\n}\n\nexport enum TenantType {\n SITE = 'SITE',\n ACCOUNT = 'ACCOUNT',\n}\n\n/** @enumType */\nexport type TenantTypeWithLiterals = TenantType | 'SITE' | 'ACCOUNT';\n\nexport interface ListAppInstancesResponse {\n /** List of installed app instances list for the specified tenant */\n appInstances?: AppInstance[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface InstallDefaultAppsEvent {\n tenant?: Tenant;\n}\n\nexport interface Empty {}\n\nexport interface InstallAppRequest {\n /** Tenant details. */\n tenant: Tenant;\n /** Details of the app instance to create when the app is installed. */\n appInstance: AppInstance;\n}\n\nexport interface InstallAppResponse {\n /** The app instance created when the app was installed. */\n appInstance?: AppInstance;\n}\n\nexport interface AppInstalledOnTenant {\n /** Tenant details. */\n tenant?: Tenant;\n /** App instance details. */\n appInstance?: AppInstance;\n}\n\nexport interface BulkInstallAppRequest {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * Details of the app instances to create when the apps are installed.\n * @maxSize 20\n */\n appInstances?: AppInstance[];\n}\n\n/** A list of possible additional fields to be included in the response. */\nexport enum RequestedFields {\n /** The requested field is unknown. */\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n /** The client spec map. */\n CLIENT_SPEC_MAP = 'CLIENT_SPEC_MAP',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'CLIENT_SPEC_MAP';\n\nexport interface BulkInstallAppResponse {\n /** Information and metadata about the app installations. */\n results?: BulkInstallAppResult[];\n /** Metadata about the bulk installation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkInstallAppResult {\n /** Metadata about the app installation. */\n itemMetadata?: ItemMetadata;\n /** Details of the created app instance. */\n appInstance?: AppInstance;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface ClientSpecMap {\n /** The Client Spec Map data. */\n data?: Record<number, ClientSpec>;\n}\n\n/**\n * ClientSpec is a merge of meta site and dev center data about application.\n *\n * This API is very old, but used a lot in editor and viewer.\n *\n * It represents a flatten hierarchy of subclasses of [com.wixpress.apps.dto.ClientSpec](https://github.com/wix-private/meta-site/blob/master/wix-meta-site-server/app-store-service/client-spec-map-api/src/main/scala/com/wixpress/apps/dto/ClientSpec.java).\n */\nexport interface ClientSpec {\n /** Possible values: editor, public, wixapps, appbuilder, sitemembers, siteextension, mobileapp, onboarding, metasite or ignored. */\n type?: string;\n /**\n * Deprecated. Represents so-called intId -- a \"position\" of the application in Site Pages (previously editor saved intId\n * instead of appDefId in pages to correlate with applications).\n */\n applicationId?: number;\n appDefinitionId?: string | null;\n instanceId?: string | null;\n state?: string | null;\n expirationDate?: string | null;\n /** This field will be deprecated in the future. It currently contains either the access token or the data token. */\n instance?: string | null;\n /** A OAuth access token for the application - provides API access. */\n accessToken?: string | null;\n /** A data token for the application - provides data about the application user. */\n dataToken?: string | null;\n /** MetaSiteClientSpec */\n metaSiteId?: string | null;\n /** deprecated */\n appDefId?: string | null;\n /** BaseTPAClientSpec */\n versionFailure?: string | null;\n appWorkerUrl?: string | null;\n appDefinitionName?: string | null;\n sectionDefaultPage?: string | null;\n sectionUrl?: string | null;\n widgets?: Record<string, Widget>;\n gluedWidgets?: Record<string, GluedWidget>;\n pixelUrl?: string | null;\n embeddedScriptUrl?: string | null;\n appRequirements?: TPAAppRequirements;\n sectionRefreshOnWidthChange?: boolean | null;\n sectionMobileUrl?: string | null;\n sectionPublished?: boolean | null;\n sectionMobilePublished?: boolean | null;\n sectionSeoEnabled?: boolean | null;\n /** TODO check serialization */\n isWixTPA?: boolean | null;\n installedAtDashboard?: boolean | null;\n permissions?: TPAPermissions;\n appFields?: any;\n version?: string | null;\n requiresEditorComponent?: boolean | null;\n editorPartDismissed?: boolean | null;\n openPremiumPage?: boolean | null;\n /** TPAEditorClientSpec */\n settingsUrl?: string | null;\n onboardingSettingsUrl?: string | null;\n dashboardUrl?: string | null;\n dashboardDefaultHeight?: number | null;\n settingsDialogBanner?: string | null;\n settingsCompanyName?: string | null;\n settingsWidth?: number | null;\n settingsHeight?: number | null;\n demoMode?: boolean | null;\n sectionSettings?: TPASettingsClientSpec;\n vendorProductId?: string | null;\n vendorProducts?: string[];\n preInstalled?: boolean | null;\n appType?: string | null;\n provisionOnSaveSite?: boolean | null;\n components?: any;\n /** WLAClientSpec */\n datastoreId?: string | null;\n originDatastoreId?: string | null;\n packageName?: string | null;\n /** SiteMembersClientSpec */\n smcollectionId?: string | null;\n collectionType?: string | null;\n collectionFormFace?: string | null;\n collectionExposure?: string | null;\n smtoken?: string | null;\n /** MobileAppClientSpec */\n name?: string | null;\n iconUrl?: string | null;\n /** OnboardingClientSpec */\n storyId?: string | null;\n inUse?: boolean | null;\n}\n\nexport interface Widget {\n /** BaseTPAClientWidget */\n widgetId?: string | null;\n widgetUrl?: string | null;\n tpaWidgetId?: string | null;\n refreshOnWidthChange?: boolean | null;\n mobileUrl?: string | null;\n appPage?: TPAAppPage;\n published?: boolean | null;\n mobilePublished?: boolean | null;\n seoEnabled?: boolean | null;\n preFetch?: boolean | null;\n shouldBeStretchedByDefault?: boolean | null;\n shouldBeStretchedByDefaultMobile?: boolean | null;\n gluedOptions?: GluedOptions;\n componentFields?: any;\n default?: boolean | null;\n /** TPAEditorClientWidget */\n defaultWidth?: number | null;\n defaultHeight?: number | null;\n defaultShowOnAllPages?: boolean | null;\n settings?: TPASettingsClientSpec;\n autoAddToSite?: boolean | null;\n defaultPosition?: TPAWidgetPosition;\n canBeStretched?: boolean | null;\n santaEditorPublished?: boolean | null;\n addOnlyOnce?: boolean | null;\n}\n\nexport interface TPAAppPage {\n _id?: string;\n name?: string;\n defaultPage?: string;\n hidden?: boolean;\n multiInstanceEnabled?: boolean | null;\n order?: number | null;\n indexable?: boolean | null;\n fullPage?: boolean | null;\n landingPageInMobile?: boolean | null;\n hideFromMenu?: boolean | null;\n}\n\nexport interface GluedOptions {\n placement?: string | null;\n verticalMargin?: number | null;\n horizontalMargin?: number | null;\n}\n\nexport interface TPASettingsClientSpec {\n height?: number;\n width?: number;\n url?: string | null;\n urlV2?: string | null;\n onboardingUrl?: string | null;\n abTest?: boolean | null;\n version?: number | null;\n}\n\nexport interface TPAWidgetPosition {\n region?: string;\n placement?: string;\n}\n\nexport interface GluedWidget {\n widgetId?: string | null;\n widgetUrl?: string | null;\n}\n\nexport interface TPAAppRequirements {\n requireSiteMembers?: boolean;\n}\n\nexport interface TPAPermissions {\n revoked?: boolean;\n}\n\nexport interface UninstallAppRequest {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * The ID of the app to install.\n * @format GUID\n */\n appDefId: string;\n}\n\nexport interface UninstallAppResponse {}\n\nexport interface BulkUninstallAppRequest {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * List of apps to be uninstalled.\n * @format GUID\n * @maxSize 20\n */\n appDefIds: string[];\n}\n\nexport interface BulkUninstallAppResponse {\n /** Information and metadata about the uninstalled apps. */\n results?: BulkUninstallAppResult[];\n /** Metadata about the bulk uninstallation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUninstallAppResult {\n /** Metadata about the uninstalled app instance. */\n itemMetadata?: ItemMetadata;\n /**\n * @format GUID\n * @deprecated\n * @replacedBy app_instance\n * @targetRemovalDate 2025-09-01\n */\n appDefId?: string;\n /** Details of the uninstalled app instance. */\n appInstance?: AppInstance;\n}\n\nexport interface InstallAppFromShareUrlRequest {\n /** Tenant details. */\n tenant: Tenant;\n /**\n * ID of the share URL to install the app from.\n *\n * To get the share URL of an app:\n *\n * 1. [Generate an install link](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard-setup/share-your-app-with-an-install-link).\n *\n * 2. Click the link, which will redirect you to a page where you can install the app. The URL of this page is the share URL, and the string after `install/` in the URL is the share URL ID. For example, in the share URL `https://www.wix.com/app-market/install/8d5179a2-6d46-45b0-bcfa-64f479c6a2al`, the share URL ID is `8d5179a2-6d46-45b0-bcfa-64f479c6a2al`.\n * @format GUID\n */\n shareUrlId: string;\n /** Information about the development version of the app to install. Only relevant if the share URL refers to a development version of an app created in the Wix CLI. */\n devVersion?: DevVersionInstallation;\n}\n\nexport interface InstallAppFromShareUrlResponse {\n /** App instance created when the app was installed. */\n appInstance?: AppInstance;\n}\n\nexport interface IsPermittedToInstallAppsRequest\n extends IsPermittedToInstallAppsRequestOptionsOneOf {\n /** Install the app using app instance details. */\n appsInstallOptions?: AppsInstallOptions;\n /** Install an app using a share URL. */\n shareUrlInstallOptions?: ShareUrlInstallOptions;\n /** Installation type. */\n installType: InstallTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IsPermittedToInstallAppsRequestOptionsOneOf {\n /** Install the app using app instance details. */\n appsInstallOptions?: AppsInstallOptions;\n /** Install an app using a share URL. */\n shareUrlInstallOptions?: ShareUrlInstallOptions;\n}\n\nexport enum InstallType {\n /** Installation type is unknown. */\n UNKNOWN_INSTALL_TYPE = 'UNKNOWN_INSTALL_TYPE',\n /** Installation based on app instance data provided in the request. */\n APPS_INSTALL = 'APPS_INSTALL',\n /** Installation based on a shareable app URL. */\n SHARE_URL_INSTALL = 'SHARE_URL_INSTALL',\n}\n\n/** @enumType */\nexport type InstallTypeWithLiterals =\n | InstallType\n | 'UNKNOWN_INSTALL_TYPE'\n | 'APPS_INSTALL'\n | 'SHARE_URL_INSTALL';\n\nexport interface AppsInstallOptions {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * Details of the app instances to create when the apps are installed.\n * @minSize 1\n * @maxSize 30\n */\n appInstances?: AppInstance[];\n}\n\nexport interface ShareUrlInstallOptions {\n /**\n * ID of the share URL to install the app from.\n * @format GUID\n */\n shareUrlId?: string;\n}\n\nexport interface IsPermittedToInstallAppsResponse {\n /** Whether the installation is permitted. */\n permitted?: boolean;\n}\n\nexport interface GetInstalledAppsRequest {}\n\nexport interface GetInstalledAppsResponse {\n /** The installed app instances */\n appInstances?: AppInstance[];\n}\n\n/** @docsIgnore */\nexport type InstallAppApplicationErrors =\n | {\n code?: 'DOMAIN_ENTITY_MISSING';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_TENANT_TYPE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_DEV_VERSION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ACCOUNT_INVALID_DEV_VERSION';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type InstallAppFromShareUrlApplicationErrors =\n | {\n code?: 'UNSUPPORTED_TENANT_TYPE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SHARE_URL_IS_REVOKED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SHARE_URL_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type IsPermittedToInstallAppsApplicationErrors = {\n code?: 'UNSUPPORTED_TENANT_TYPE';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface AppInstanceAppInstalledOnTenantEnvelope {\n data: AppInstalledOnTenant;\n metadata: EventMetadata;\n}\n\n/** @permissionId APPS_INSTALLER.INSTALL_SITE_LEVEL\n * @webhook\n * @eventType wix.apps.v1.app_instance_app_installed_on_tenant\n * @serviceIdentifier wix.devcenter.apps.installer.v1.AppsInstallerService\n * @slug app_installed_on_tenant\n * @documentationMaturity preview\n */\nexport declare function onAppInstanceAppInstalledOnTenant(\n handler: (\n event: AppInstanceAppInstalledOnTenantEnvelope\n ) => void | Promise<void>\n): void;\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and can't guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - You agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, you confirm your acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a tenant, specifying the details of the app instance to create.\n *\n * The ID of this app instance is automatically generated and included in the `appInstance` object in the response.\n * @param tenant - Tenant details.\n * @public\n * @documentationMaturity preview\n * @requiredField options\n * @requiredField options.appInstance\n * @requiredField options.appInstance.appDefId\n * @requiredField tenant\n * @requiredField tenant._id\n * @permissionId APPS_INSTALLER.INSTALL_SITE_LEVEL\n * @permissionId APPS_INSTALLER.INSTALL_ACCOUNT_LEVEL\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.InstallApp\n */\nexport async function installApp(\n tenant: NonNullablePaths<Tenant, `_id`, 2>,\n options: NonNullablePaths<\n InstallAppOptions,\n `appInstance` | `appInstance.appDefId`,\n 3\n >\n): Promise<\n NonNullablePaths<\n InstallAppResponse,\n `appInstance._id` | `appInstance.appDefId` | `appInstance.enabled`,\n 3\n > & {\n __applicationErrorsType?: InstallAppApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n tenant: tenant,\n appInstance: options?.appInstance,\n });\n\n const reqOpts = ambassadorWixAppsV1AppInstance.installApp(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n tenant: '$[0]',\n appInstance: '$[1].appInstance',\n },\n singleArgumentUnchanged: false,\n },\n ['tenant', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface InstallAppOptions {\n /** Details of the app instance to create when the app is installed. */\n appInstance: AppInstance;\n}\n\n/**\n * Uninstalls an app from a tenant.\n *\n * This removes the instance of a specified app from the tenant.\n * @public\n * @documentationMaturity preview\n * @requiredField options.appDefId\n * @permissionId APPS_INSTALLER.UNINSTALL_SITE_LEVEL\n * @permissionId APPS_INSTALLER.UNINSTALL_ACCOUNT_LEVEL\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.UninstallApp\n */\nexport async function uninstallApp(\n options?: NonNullablePaths<UninstallAppOptions, `appDefId`, 2>\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n tenant: options?.tenant,\n appDefId: options?.appDefId,\n });\n\n const reqOpts = ambassadorWixAppsV1AppInstance.uninstallApp(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n tenant: '$[0].tenant',\n appDefId: '$[0].appDefId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UninstallAppOptions {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * The ID of the app to install.\n * @format GUID\n */\n appDefId: string;\n}\n\n/**\n * Uninstalls apps from a tenant.\n *\n * This removes the instances of the specified apps from the tenant.\n * @public\n * @documentationMaturity preview\n * @requiredField options.appDefIds\n * @permissionId APPS_INSTALLER.UNINSTALL_SITE_LEVEL\n * @permissionId APPS_INSTALLER.UNINSTALL_ACCOUNT_LEVEL\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.BulkUninstallApp\n */\nexport async function bulkUninstallApp(\n options?: NonNullablePaths<BulkUninstallAppOptions, `appDefIds`, 2>\n): Promise<\n NonNullablePaths<\n BulkUninstallAppResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.appDefId`\n | `results.${number}.appInstance._id`\n | `results.${number}.appInstance.appDefId`\n | `results.${number}.appInstance.enabled`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n tenant: options?.tenant,\n appDefIds: options?.appDefIds,\n });\n\n const reqOpts = ambassadorWixAppsV1AppInstance.bulkUninstallApp(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n tenant: '$[0].tenant',\n appDefIds: '$[0].appDefIds',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUninstallAppOptions {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * List of apps to be uninstalled.\n * @format GUID\n * @maxSize 20\n */\n appDefIds: string[];\n}\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and cannot guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Please review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - By utilizing this API, you agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, I confirm my acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a site using a share URL.\n * @param tenant - Tenant details.\n * @public\n * @documentationMaturity preview\n * @requiredField options.shareUrlId\n * @requiredField tenant\n * @requiredField tenant._id\n * @permissionId APPS_INSTALLER.INSTALL_SITE_LEVEL\n * @permissionId APPS_INSTALLER.INSTALL_ACCOUNT_LEVEL\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.InstallAppFromShareUrl\n */\nexport async function installAppFromShareUrl(\n tenant: NonNullablePaths<Tenant, `_id`, 2>,\n options?: NonNullablePaths<InstallAppFromShareUrlOptions, `shareUrlId`, 2>\n): Promise<\n NonNullablePaths<\n InstallAppFromShareUrlResponse,\n `appInstance._id` | `appInstance.appDefId` | `appInstance.enabled`,\n 3\n > & {\n __applicationErrorsType?: InstallAppFromShareUrlApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n tenant: tenant,\n shareUrlId: options?.shareUrlId,\n devVersion: options?.devVersion,\n });\n\n const reqOpts =\n ambassadorWixAppsV1AppInstance.installAppFromShareUrl(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n tenant: '$[0]',\n shareUrlId: '$[1].shareUrlId',\n devVersion: '$[1].devVersion',\n },\n singleArgumentUnchanged: false,\n },\n ['tenant', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface InstallAppFromShareUrlOptions {\n /**\n * ID of the share URL to install the app from.\n *\n * To get the share URL of an app:\n *\n * 1. [Generate an install link](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard-setup/share-your-app-with-an-install-link).\n *\n * 2. Click the link, which will redirect you to a page where you can install the app. The URL of this page is the share URL, and the string after `install/` in the URL is the share URL ID. For example, in the share URL `https://www.wix.com/app-market/install/8d5179a2-6d46-45b0-bcfa-64f479c6a2al`, the share URL ID is `8d5179a2-6d46-45b0-bcfa-64f479c6a2al`.\n * @format GUID\n */\n shareUrlId: string;\n /** Information about the development version of the app to install. Only relevant if the share URL refers to a development version of an app created in the Wix CLI. */\n devVersion?: DevVersionInstallation;\n}\n\n/**\n * Returns whether it's possible to install an app on a tenant, either by providing app instance details or using a share URL.\n * @param installType - Installation type.\n * @public\n * @documentationMaturity preview\n * @requiredField installType\n * @requiredField options\n * @requiredField options.options\n * @requiredField options.options.appsInstallOptions.tenant\n * @requiredField options.options.appsInstallOptions.tenant._id\n * @requiredField options.options.shareUrlInstallOptions.shareUrlId\n * @permissionId DEV_CENTER.WRITE_APP\n * @permissionId APPS_INSTALLER.INSTALL_SITE_LEVEL\n * @permissionId APPS_INSTALLER.INSTALL_ACCOUNT_LEVEL\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.IsPermittedToInstallApps\n */\nexport async function isPermittedToInstallApps(\n installType: InstallTypeWithLiterals,\n options: IsPermittedToInstallAppsOptions\n): Promise<\n NonNullablePaths<IsPermittedToInstallAppsResponse, `permitted`, 2> & {\n __applicationErrorsType?: IsPermittedToInstallAppsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n installType: installType,\n appsInstallOptions: options?.appsInstallOptions,\n shareUrlInstallOptions: options?.shareUrlInstallOptions,\n });\n\n const reqOpts =\n ambassadorWixAppsV1AppInstance.isPermittedToInstallApps(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n installType: '$[0]',\n appsInstallOptions: '$[1].appsInstallOptions',\n shareUrlInstallOptions: '$[1].shareUrlInstallOptions',\n },\n singleArgumentUnchanged: false,\n },\n ['installType', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface IsPermittedToInstallAppsOptions\n extends IsPermittedToInstallAppsOptionsOptionsOneOf {\n /** Install the app using app instance details. */\n appsInstallOptions?: AppsInstallOptions;\n /** Install an app using a share URL. */\n shareUrlInstallOptions?: ShareUrlInstallOptions;\n}\n\n/** @oneof */\nexport interface IsPermittedToInstallAppsOptionsOptionsOneOf {\n /** Install the app using app instance details. */\n appsInstallOptions?: AppsInstallOptions;\n /** Install an app using a share URL. */\n shareUrlInstallOptions?: ShareUrlInstallOptions;\n}\n\n/**\n * Returns the apps that are installed on the site in context\n * @public\n * @documentationMaturity preview\n * @permissionId APP-MARKET.VIEW-INSTALLED-APP\n * @applicableIdentity APP\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.GetInstalledApps\n */\nexport async function getInstalledApps(): Promise<\n NonNullablePaths<\n GetInstalledAppsResponse,\n | `appInstances`\n | `appInstances.${number}._id`\n | `appInstances.${number}.appDefId`\n | `appInstances.${number}.enabled`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixAppsV1AppInstance.getInstalledApps(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/apps/v1/app-instances',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/apps/v1/app-instances',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_apps-installer_apps-installer';\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and can't guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - You agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, you confirm your acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a tenant, specifying the details of the app instance to create.\n *\n * The ID of this app instance is automatically generated and included in the `appInstance` object in the response.\n */\nexport function installApp(payload: object): RequestOptionsFactory<any> {\n function __installApp({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.InstallApp',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/install',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n { path: 'dependenciesInstallation.installedDate' },\n { path: 'dependenciesInstallation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __installApp;\n}\n\n/**\n * Uninstalls an app from a tenant.\n *\n * This removes the instance of a specified app from the tenant.\n */\nexport function uninstallApp(payload: object): RequestOptionsFactory<any> {\n function __uninstallApp({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.UninstallApp',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/uninstall',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __uninstallApp;\n}\n\n/**\n * Uninstalls apps from a tenant.\n *\n * This removes the instances of the specified apps from the tenant.\n */\nexport function bulkUninstallApp(payload: object): RequestOptionsFactory<any> {\n function __bulkUninstallApp({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.BulkUninstallApp',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/bulk/app-instance/uninstall',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.appInstance.installedDate' },\n { path: 'results.appInstance.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'clientSpecMap.data.widgets.*.gluedOptions.verticalMargin',\n },\n {\n path: 'clientSpecMap.data.widgets.*.gluedOptions.horizontalMargin',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUninstallApp;\n}\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and cannot guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Please review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - By utilizing this API, you agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, I confirm my acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a site using a share URL.\n */\nexport function installAppFromShareUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __installAppFromShareUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.InstallAppFromShareUrl',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-share-url/install',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n { path: 'dependenciesInstallation.installedDate' },\n { path: 'dependenciesInstallation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __installAppFromShareUrl;\n}\n\n/** Returns whether it's possible to install an app on a tenant, either by providing app instance details or using a share URL. */\nexport function isPermittedToInstallApps(\n payload: object\n): RequestOptionsFactory<any> {\n function __isPermittedToInstallApps({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appsInstallOptions.appInstances.installedDate' },\n { path: 'appsInstallOptions.appInstances.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.IsPermittedToInstallApps',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/is-permitted-to-install',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __isPermittedToInstallApps;\n}\n\n/** Returns the apps that are installed on the site in context */\nexport function getInstalledApps(payload: object): RequestOptionsFactory<any> {\n function __getInstalledApps({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'GET' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.GetInstalledApps',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instances',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstances.installedDate' },\n { path: 'appInstances.updatedDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instances',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __getInstalledApps;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,wBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,oBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,Q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alledApps","installApp","installAppFromShareUrl","isPermittedToInstallApps","uninstallApp","import_timestamp","import_rest_modules","payload","Status","TenantType","WebhookIdentityType","RequestedFields","InstallType","installApp","sdkTransformError","uninstallApp","bulkUninstallApp","installAppFromShareUrl","isPermittedToInstallApps","getInstalledApps"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/apps-v1-app-instance-apps-installer.universal.ts","../../src/apps-v1-app-instance-apps-installer.http.ts"],"sourcesContent":["export * from './src/apps-v1-app-instance-apps-installer.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAppsV1AppInstance from './apps-v1-app-instance-apps-installer.http.js';\n\nexport interface AppInstance {\n /**\n * App instance ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * ID of the app to install.\n * @format GUID\n */\n appDefId?: string;\n /**\n * Version of the app to install.\n *\n * If you don't specify a version, the latest version of the app will be installed. Don't specify a version unless you want to install an older version of the app.\n */\n version?: string | null;\n /** Whether the app instance is enabled. */\n enabled?: boolean;\n /**\n * A signed access token of the Wix user and the app instance.\n * @readonly\n */\n appToken?: string | null;\n /**\n * Date and time the app instance was installed.\n * @readonly\n */\n installedDate?: Date | null;\n /**\n * Date and time the app instance was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport enum Status {\n /** Installation status is unknown. */\n UNKNOWN = 'UNKNOWN',\n /** Waiting for OAUTH authentication to complete installation. */\n WAITING_FOR_OAUTH = 'WAITING_FOR_OAUTH',\n /** App instance authenticated successfully. */\n AUTHENTICATED = 'AUTHENTICATED',\n /** Payment hasn't been completed and is required for access to the app. */\n DIDNT_COMPLETE_PAYMENT = 'DIDNT_COMPLETE_PAYMENT',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'WAITING_FOR_OAUTH'\n | 'AUTHENTICATED'\n | 'DIDNT_COMPLETE_PAYMENT';\n\nexport interface LegacyParams {\n /** Legacy int id */\n intId?: number | null;\n /**\n * Legacy source template id\n * @format GUID\n */\n sourceTemplateId?: string | null;\n}\n\nexport interface DevVersionInstallation {\n /**\n * ID of the override to assign to the development version.\n * @maxLength 50\n */\n overrideId?: string;\n}\n\nexport interface ListAppInstancesRequest {\n /** Tenant to fetch app instances for */\n tenant?: Tenant;\n}\n\nexport interface Tenant {\n /** Tenant ID. For a site, this is the [site ID](https://dev.wix.com/docs/rest/account-level/sites/sites/introduction). For an account this is the [account ID](https://dev.wix.com/docs/rest/account-level/user-management/accounts/accounts/about-accounts). */\n _id?: string;\n /** Tenant type. This can be a Wix site or account. */\n tenantType?: TenantTypeWithLiterals;\n}\n\nexport enum TenantType {\n SITE = 'SITE',\n ACCOUNT = 'ACCOUNT',\n}\n\n/** @enumType */\nexport type TenantTypeWithLiterals = TenantType | 'SITE' | 'ACCOUNT';\n\nexport interface ListAppInstancesResponse {\n /** List of installed app instances list for the specified tenant */\n appInstances?: AppInstance[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface InstallDefaultAppsEvent {\n tenant?: Tenant;\n}\n\nexport interface Empty {}\n\nexport interface InstallAppRequest {\n /** Tenant details. */\n tenant: Tenant;\n /** Details of the app instance to create when the app is installed. */\n appInstance: AppInstance;\n}\n\nexport interface InstallAppResponse {\n /** The app instance created when the app was installed. */\n appInstance?: AppInstance;\n}\n\nexport interface AppInstalledOnTenant {\n /** Tenant details. */\n tenant?: Tenant;\n /** App instance details. */\n appInstance?: AppInstance;\n}\n\nexport interface BulkInstallAppRequest {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * Details of the app instances to create when the apps are installed.\n * @maxSize 20\n */\n appInstances?: AppInstance[];\n}\n\n/** A list of possible additional fields to be included in the response. */\nexport enum RequestedFields {\n /** The requested field is unknown. */\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n /** The client spec map. */\n CLIENT_SPEC_MAP = 'CLIENT_SPEC_MAP',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'CLIENT_SPEC_MAP';\n\nexport interface BulkInstallAppResponse {\n /** Information and metadata about the app installations. */\n results?: BulkInstallAppResult[];\n /** Metadata about the bulk installation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkInstallAppResult {\n /** Metadata about the app installation. */\n itemMetadata?: ItemMetadata;\n /** Details of the created app instance. */\n appInstance?: AppInstance;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface ClientSpecMap {\n /** The Client Spec Map data. */\n data?: Record<number, ClientSpec>;\n}\n\n/**\n * ClientSpec is a merge of meta site and dev center data about application.\n *\n * This API is very old, but used a lot in editor and viewer.\n *\n * It represents a flatten hierarchy of subclasses of [com.wixpress.apps.dto.ClientSpec](https://github.com/wix-private/meta-site/blob/master/wix-meta-site-server/app-store-service/client-spec-map-api/src/main/scala/com/wixpress/apps/dto/ClientSpec.java).\n */\nexport interface ClientSpec {\n /** Possible values: editor, public, wixapps, appbuilder, sitemembers, siteextension, mobileapp, onboarding, metasite or ignored. */\n type?: string;\n /**\n * Deprecated. Represents so-called intId -- a \"position\" of the application in Site Pages (previously editor saved intId\n * instead of appDefId in pages to correlate with applications).\n */\n applicationId?: number;\n appDefinitionId?: string | null;\n instanceId?: string | null;\n state?: string | null;\n expirationDate?: string | null;\n /** This field will be deprecated in the future. It currently contains either the access token or the data token. */\n instance?: string | null;\n /** A OAuth access token for the application - provides API access. */\n accessToken?: string | null;\n /** A data token for the application - provides data about the application user. */\n dataToken?: string | null;\n /** MetaSiteClientSpec */\n metaSiteId?: string | null;\n /** deprecated */\n appDefId?: string | null;\n /** BaseTPAClientSpec */\n versionFailure?: string | null;\n appWorkerUrl?: string | null;\n appDefinitionName?: string | null;\n sectionDefaultPage?: string | null;\n sectionUrl?: string | null;\n widgets?: Record<string, Widget>;\n gluedWidgets?: Record<string, GluedWidget>;\n pixelUrl?: string | null;\n embeddedScriptUrl?: string | null;\n appRequirements?: TPAAppRequirements;\n sectionRefreshOnWidthChange?: boolean | null;\n sectionMobileUrl?: string | null;\n sectionPublished?: boolean | null;\n sectionMobilePublished?: boolean | null;\n sectionSeoEnabled?: boolean | null;\n /** TODO check serialization */\n isWixTPA?: boolean | null;\n installedAtDashboard?: boolean | null;\n permissions?: TPAPermissions;\n appFields?: any;\n version?: string | null;\n requiresEditorComponent?: boolean | null;\n editorPartDismissed?: boolean | null;\n openPremiumPage?: boolean | null;\n /** TPAEditorClientSpec */\n settingsUrl?: string | null;\n onboardingSettingsUrl?: string | null;\n dashboardUrl?: string | null;\n dashboardDefaultHeight?: number | null;\n settingsDialogBanner?: string | null;\n settingsCompanyName?: string | null;\n settingsWidth?: number | null;\n settingsHeight?: number | null;\n demoMode?: boolean | null;\n sectionSettings?: TPASettingsClientSpec;\n vendorProductId?: string | null;\n vendorProducts?: string[];\n preInstalled?: boolean | null;\n appType?: string | null;\n provisionOnSaveSite?: boolean | null;\n components?: any;\n /** WLAClientSpec */\n datastoreId?: string | null;\n originDatastoreId?: string | null;\n packageName?: string | null;\n /** SiteMembersClientSpec */\n smcollectionId?: string | null;\n collectionType?: string | null;\n collectionFormFace?: string | null;\n collectionExposure?: string | null;\n smtoken?: string | null;\n /** MobileAppClientSpec */\n name?: string | null;\n iconUrl?: string | null;\n /** OnboardingClientSpec */\n storyId?: string | null;\n inUse?: boolean | null;\n}\n\nexport interface Widget {\n /** BaseTPAClientWidget */\n widgetId?: string | null;\n widgetUrl?: string | null;\n tpaWidgetId?: string | null;\n refreshOnWidthChange?: boolean | null;\n mobileUrl?: string | null;\n appPage?: TPAAppPage;\n published?: boolean | null;\n mobilePublished?: boolean | null;\n seoEnabled?: boolean | null;\n preFetch?: boolean | null;\n shouldBeStretchedByDefault?: boolean | null;\n shouldBeStretchedByDefaultMobile?: boolean | null;\n gluedOptions?: GluedOptions;\n componentFields?: any;\n default?: boolean | null;\n /** TPAEditorClientWidget */\n defaultWidth?: number | null;\n defaultHeight?: number | null;\n defaultShowOnAllPages?: boolean | null;\n settings?: TPASettingsClientSpec;\n autoAddToSite?: boolean | null;\n defaultPosition?: TPAWidgetPosition;\n canBeStretched?: boolean | null;\n santaEditorPublished?: boolean | null;\n addOnlyOnce?: boolean | null;\n}\n\nexport interface TPAAppPage {\n _id?: string;\n name?: string;\n defaultPage?: string;\n hidden?: boolean;\n multiInstanceEnabled?: boolean | null;\n order?: number | null;\n indexable?: boolean | null;\n fullPage?: boolean | null;\n landingPageInMobile?: boolean | null;\n hideFromMenu?: boolean | null;\n}\n\nexport interface GluedOptions {\n placement?: string | null;\n verticalMargin?: number | null;\n horizontalMargin?: number | null;\n}\n\nexport interface TPASettingsClientSpec {\n height?: number;\n width?: number;\n url?: string | null;\n urlV2?: string | null;\n onboardingUrl?: string | null;\n abTest?: boolean | null;\n version?: number | null;\n}\n\nexport interface TPAWidgetPosition {\n region?: string;\n placement?: string;\n}\n\nexport interface GluedWidget {\n widgetId?: string | null;\n widgetUrl?: string | null;\n}\n\nexport interface TPAAppRequirements {\n requireSiteMembers?: boolean;\n}\n\nexport interface TPAPermissions {\n revoked?: boolean;\n}\n\nexport interface UninstallAppRequest {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * The ID of the app to install.\n * @format GUID\n */\n appDefId: string;\n}\n\nexport interface UninstallAppResponse {}\n\nexport interface BulkUninstallAppRequest {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * List of apps to be uninstalled.\n * @format GUID\n * @maxSize 20\n */\n appDefIds: string[];\n}\n\nexport interface BulkUninstallAppResponse {\n /** Information and metadata about the uninstalled apps. */\n results?: BulkUninstallAppResult[];\n /** Metadata about the bulk uninstallation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUninstallAppResult {\n /** Metadata about the uninstalled app instance. */\n itemMetadata?: ItemMetadata;\n /**\n * @format GUID\n * @deprecated\n * @replacedBy app_instance\n * @targetRemovalDate 2025-09-01\n */\n appDefId?: string;\n /** Details of the uninstalled app instance. */\n appInstance?: AppInstance;\n}\n\nexport interface InstallAppFromShareUrlRequest {\n /** Tenant details. */\n tenant: Tenant;\n /**\n * ID of the share URL to install the app from.\n *\n * To get the share URL of an app:\n *\n * 1. [Generate an install link](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard-setup/share-your-app-with-an-install-link).\n *\n * 2. Click the link, which will redirect you to a page where you can install the app. The URL of this page is the share URL, and the string after `install/` in the URL is the share URL ID. For example, in the share URL `https://www.wix.com/app-market/install/8d5179a2-6d46-45b0-bcfa-64f479c6a2al`, the share URL ID is `8d5179a2-6d46-45b0-bcfa-64f479c6a2al`.\n * @format GUID\n */\n shareUrlId: string;\n /** Information about the development version of the app to install. Only relevant if the share URL refers to a development version of an app created in the Wix CLI. */\n devVersion?: DevVersionInstallation;\n}\n\nexport interface InstallAppFromShareUrlResponse {\n /** App instance created when the app was installed. */\n appInstance?: AppInstance;\n}\n\nexport interface IsPermittedToInstallAppsRequest\n extends IsPermittedToInstallAppsRequestOptionsOneOf {\n /** Install the app using app instance details. */\n appsInstallOptions?: AppsInstallOptions;\n /** Install an app using a share URL. */\n shareUrlInstallOptions?: ShareUrlInstallOptions;\n /** Installation type. */\n installType: InstallTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IsPermittedToInstallAppsRequestOptionsOneOf {\n /** Install the app using app instance details. */\n appsInstallOptions?: AppsInstallOptions;\n /** Install an app using a share URL. */\n shareUrlInstallOptions?: ShareUrlInstallOptions;\n}\n\nexport enum InstallType {\n /** Installation type is unknown. */\n UNKNOWN_INSTALL_TYPE = 'UNKNOWN_INSTALL_TYPE',\n /** Installation based on app instance data provided in the request. */\n APPS_INSTALL = 'APPS_INSTALL',\n /** Installation based on a shareable app URL. */\n SHARE_URL_INSTALL = 'SHARE_URL_INSTALL',\n}\n\n/** @enumType */\nexport type InstallTypeWithLiterals =\n | InstallType\n | 'UNKNOWN_INSTALL_TYPE'\n | 'APPS_INSTALL'\n | 'SHARE_URL_INSTALL';\n\nexport interface AppsInstallOptions {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * Details of the app instances to create when the apps are installed.\n * @minSize 1\n * @maxSize 30\n */\n appInstances?: AppInstance[];\n}\n\nexport interface ShareUrlInstallOptions {\n /**\n * ID of the share URL to install the app from.\n * @format GUID\n */\n shareUrlId?: string;\n}\n\nexport interface IsPermittedToInstallAppsResponse {\n /** Whether the installation is permitted. */\n permitted?: boolean;\n}\n\nexport interface GetInstalledAppsRequest {}\n\nexport interface GetInstalledAppsResponse {\n /** The installed app instances */\n appInstances?: AppInstance[];\n}\n\n/** @docsIgnore */\nexport type InstallAppApplicationErrors =\n | {\n code?: 'DOMAIN_ENTITY_MISSING';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_TENANT_TYPE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_DEV_VERSION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ACCOUNT_INVALID_DEV_VERSION';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type InstallAppFromShareUrlApplicationErrors =\n | {\n code?: 'UNSUPPORTED_TENANT_TYPE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SHARE_URL_IS_REVOKED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SHARE_URL_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type IsPermittedToInstallAppsApplicationErrors = {\n code?: 'UNSUPPORTED_TENANT_TYPE';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface AppInstanceAppInstalledOnTenantEnvelope {\n data: AppInstalledOnTenant;\n metadata: EventMetadata;\n}\n\n/** @permissionId APPS_INSTALLER.INSTALL_SITE_LEVEL\n * @webhook\n * @eventType wix.apps.v1.app_instance_app_installed_on_tenant\n * @serviceIdentifier wix.devcenter.apps.installer.v1.AppsInstallerService\n * @slug app_installed_on_tenant\n * @documentationMaturity preview\n */\nexport declare function onAppInstanceAppInstalledOnTenant(\n handler: (\n event: AppInstanceAppInstalledOnTenantEnvelope\n ) => void | Promise<void>\n): void;\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and can't guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - You agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, you confirm your acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a tenant, specifying the details of the app instance to create.\n *\n * The ID of this app instance is automatically generated and included in the `appInstance` object in the response.\n * @param tenant - Tenant details.\n * @public\n * @documentationMaturity preview\n * @requiredField options\n * @requiredField options.appInstance\n * @requiredField options.appInstance.appDefId\n * @requiredField tenant\n * @requiredField tenant._id\n * @permissionId APPS_INSTALLER.INSTALL_SITE_LEVEL\n * @permissionId APPS_INSTALLER.INSTALL_ACCOUNT_LEVEL\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.InstallApp\n */\nexport async function installApp(\n tenant: NonNullablePaths<Tenant, `_id`, 2>,\n options: NonNullablePaths<\n InstallAppOptions,\n `appInstance` | `appInstance.appDefId`,\n 3\n >\n): Promise<\n NonNullablePaths<\n InstallAppResponse,\n `appInstance._id` | `appInstance.appDefId` | `appInstance.enabled`,\n 3\n > & {\n __applicationErrorsType?: InstallAppApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n tenant: tenant,\n appInstance: options?.appInstance,\n });\n\n const reqOpts = ambassadorWixAppsV1AppInstance.installApp(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n tenant: '$[0]',\n appInstance: '$[1].appInstance',\n },\n singleArgumentUnchanged: false,\n },\n ['tenant', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface InstallAppOptions {\n /** Details of the app instance to create when the app is installed. */\n appInstance: AppInstance;\n}\n\n/**\n * Uninstalls an app from a tenant.\n *\n * This removes the instance of a specified app from the tenant.\n * @public\n * @documentationMaturity preview\n * @requiredField options.appDefId\n * @permissionId APPS_INSTALLER.UNINSTALL_SITE_LEVEL\n * @permissionId APPS_INSTALLER.UNINSTALL_ACCOUNT_LEVEL\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.UninstallApp\n */\nexport async function uninstallApp(\n options?: NonNullablePaths<UninstallAppOptions, `appDefId`, 2>\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n tenant: options?.tenant,\n appDefId: options?.appDefId,\n });\n\n const reqOpts = ambassadorWixAppsV1AppInstance.uninstallApp(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n tenant: '$[0].tenant',\n appDefId: '$[0].appDefId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UninstallAppOptions {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * The ID of the app to install.\n * @format GUID\n */\n appDefId: string;\n}\n\n/**\n * Uninstalls apps from a tenant.\n *\n * This removes the instances of the specified apps from the tenant.\n * @public\n * @documentationMaturity preview\n * @requiredField options.appDefIds\n * @permissionId APPS_INSTALLER.UNINSTALL_SITE_LEVEL\n * @permissionId APPS_INSTALLER.UNINSTALL_ACCOUNT_LEVEL\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.BulkUninstallApp\n */\nexport async function bulkUninstallApp(\n options?: NonNullablePaths<BulkUninstallAppOptions, `appDefIds`, 2>\n): Promise<\n NonNullablePaths<\n BulkUninstallAppResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.appDefId`\n | `results.${number}.appInstance._id`\n | `results.${number}.appInstance.appDefId`\n | `results.${number}.appInstance.enabled`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n tenant: options?.tenant,\n appDefIds: options?.appDefIds,\n });\n\n const reqOpts = ambassadorWixAppsV1AppInstance.bulkUninstallApp(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n tenant: '$[0].tenant',\n appDefIds: '$[0].appDefIds',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUninstallAppOptions {\n /** Tenant details. */\n tenant?: Tenant;\n /**\n * List of apps to be uninstalled.\n * @format GUID\n * @maxSize 20\n */\n appDefIds: string[];\n}\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and cannot guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Please review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - By utilizing this API, you agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, I confirm my acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a site using a share URL.\n * @param tenant - Tenant details.\n * @public\n * @documentationMaturity preview\n * @requiredField options.shareUrlId\n * @requiredField tenant\n * @requiredField tenant._id\n * @permissionId APPS_INSTALLER.INSTALL_SITE_LEVEL\n * @permissionId APPS_INSTALLER.INSTALL_ACCOUNT_LEVEL\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.InstallAppFromShareUrl\n */\nexport async function installAppFromShareUrl(\n tenant: NonNullablePaths<Tenant, `_id`, 2>,\n options?: NonNullablePaths<InstallAppFromShareUrlOptions, `shareUrlId`, 2>\n): Promise<\n NonNullablePaths<\n InstallAppFromShareUrlResponse,\n `appInstance._id` | `appInstance.appDefId` | `appInstance.enabled`,\n 3\n > & {\n __applicationErrorsType?: InstallAppFromShareUrlApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n tenant: tenant,\n shareUrlId: options?.shareUrlId,\n devVersion: options?.devVersion,\n });\n\n const reqOpts =\n ambassadorWixAppsV1AppInstance.installAppFromShareUrl(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n tenant: '$[0]',\n shareUrlId: '$[1].shareUrlId',\n devVersion: '$[1].devVersion',\n },\n singleArgumentUnchanged: false,\n },\n ['tenant', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface InstallAppFromShareUrlOptions {\n /**\n * ID of the share URL to install the app from.\n *\n * To get the share URL of an app:\n *\n * 1. [Generate an install link](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard-setup/share-your-app-with-an-install-link).\n *\n * 2. Click the link, which will redirect you to a page where you can install the app. The URL of this page is the share URL, and the string after `install/` in the URL is the share URL ID. For example, in the share URL `https://www.wix.com/app-market/install/8d5179a2-6d46-45b0-bcfa-64f479c6a2al`, the share URL ID is `8d5179a2-6d46-45b0-bcfa-64f479c6a2al`.\n * @format GUID\n */\n shareUrlId: string;\n /** Information about the development version of the app to install. Only relevant if the share URL refers to a development version of an app created in the Wix CLI. */\n devVersion?: DevVersionInstallation;\n}\n\n/**\n * Returns whether it's possible to install an app on a tenant, either by providing app instance details or using a share URL.\n * @param installType - Installation type.\n * @public\n * @documentationMaturity preview\n * @requiredField installType\n * @requiredField options\n * @requiredField options.options\n * @requiredField options.options.appsInstallOptions.tenant\n * @requiredField options.options.appsInstallOptions.tenant._id\n * @requiredField options.options.shareUrlInstallOptions.shareUrlId\n * @permissionId DEV_CENTER.WRITE_APP\n * @permissionId APPS_INSTALLER.INSTALL_SITE_LEVEL\n * @permissionId APPS_INSTALLER.INSTALL_ACCOUNT_LEVEL\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.IsPermittedToInstallApps\n */\nexport async function isPermittedToInstallApps(\n installType: InstallTypeWithLiterals,\n options: IsPermittedToInstallAppsOptions\n): Promise<\n NonNullablePaths<IsPermittedToInstallAppsResponse, `permitted`, 2> & {\n __applicationErrorsType?: IsPermittedToInstallAppsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n installType: installType,\n appsInstallOptions: options?.appsInstallOptions,\n shareUrlInstallOptions: options?.shareUrlInstallOptions,\n });\n\n const reqOpts =\n ambassadorWixAppsV1AppInstance.isPermittedToInstallApps(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n installType: '$[0]',\n appsInstallOptions: '$[1].appsInstallOptions',\n shareUrlInstallOptions: '$[1].shareUrlInstallOptions',\n },\n singleArgumentUnchanged: false,\n },\n ['installType', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface IsPermittedToInstallAppsOptions\n extends IsPermittedToInstallAppsOptionsOptionsOneOf {\n /** Install the app using app instance details. */\n appsInstallOptions?: AppsInstallOptions;\n /** Install an app using a share URL. */\n shareUrlInstallOptions?: ShareUrlInstallOptions;\n}\n\n/** @oneof */\nexport interface IsPermittedToInstallAppsOptionsOptionsOneOf {\n /** Install the app using app instance details. */\n appsInstallOptions?: AppsInstallOptions;\n /** Install an app using a share URL. */\n shareUrlInstallOptions?: ShareUrlInstallOptions;\n}\n\n/**\n * Returns the apps that are installed on the site in context\n * @public\n * @documentationMaturity preview\n * @permissionId APP-MARKET.VIEW-INSTALLED-APP\n * @applicableIdentity APP\n * @fqn wix.devcenter.apps.installer.v1.AppsInstallerService.GetInstalledApps\n */\nexport async function getInstalledApps(): Promise<\n NonNullablePaths<\n GetInstalledAppsResponse,\n | `appInstances`\n | `appInstances.${number}._id`\n | `appInstances.${number}.appDefId`\n | `appInstances.${number}.enabled`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixAppsV1AppInstance.getInstalledApps(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/apps/v1/app-instances',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/apps/v1/app-instances',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_apps-installer_apps-installer';\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and can't guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - You agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, you confirm your acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a tenant, specifying the details of the app instance to create.\n *\n * The ID of this app instance is automatically generated and included in the `appInstance` object in the response.\n */\nexport function installApp(payload: object): RequestOptionsFactory<any> {\n function __installApp({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.InstallApp',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/install',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n { path: 'dependenciesInstallation.installedDate' },\n { path: 'dependenciesInstallation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __installApp;\n}\n\n/**\n * Uninstalls an app from a tenant.\n *\n * This removes the instance of a specified app from the tenant.\n */\nexport function uninstallApp(payload: object): RequestOptionsFactory<any> {\n function __uninstallApp({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.UninstallApp',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/uninstall',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __uninstallApp;\n}\n\n/**\n * Uninstalls apps from a tenant.\n *\n * This removes the instances of the specified apps from the tenant.\n */\nexport function bulkUninstallApp(payload: object): RequestOptionsFactory<any> {\n function __bulkUninstallApp({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.BulkUninstallApp',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/bulk/app-instance/uninstall',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.appInstance.installedDate' },\n { path: 'results.appInstance.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'clientSpecMap.data.widgets.*.gluedOptions.verticalMargin',\n },\n {\n path: 'clientSpecMap.data.widgets.*.gluedOptions.horizontalMargin',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUninstallApp;\n}\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and cannot guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Please review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - By utilizing this API, you agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, I confirm my acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a site using a share URL.\n */\nexport function installAppFromShareUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __installAppFromShareUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.InstallAppFromShareUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-share-url/install',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n { path: 'dependenciesInstallation.installedDate' },\n { path: 'dependenciesInstallation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __installAppFromShareUrl;\n}\n\n/** Returns whether it's possible to install an app on a tenant, either by providing app instance details or using a share URL. */\nexport function isPermittedToInstallApps(\n payload: object\n): RequestOptionsFactory<any> {\n function __isPermittedToInstallApps({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appsInstallOptions.appInstances.installedDate' },\n { path: 'appsInstallOptions.appInstances.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.IsPermittedToInstallApps',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/is-permitted-to-install',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __isPermittedToInstallApps;\n}\n\n/** Returns the apps that are installed on the site in context */\nexport function getInstalledApps(payload: object): RequestOptionsFactory<any> {\n function __getInstalledApps({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'GET' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.GetInstalledApps',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instances',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstances.installedDate' },\n { path: 'appInstances.updatedDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instances',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __getInstalledApps;\n}\n"],"m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YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,oBAAoB,SAAS;AAAA,IAC7B,wBAAwB,SAAS;AAAA,EACnC,CAAC;AAED,QAAM,UAC2B,yBAAyB,OAAO;AAEjE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAJ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,aAAa;AAAA,UACb,oBAAoB;AAAA,UACpB,wBAAwB;AAAA,QAC1B;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,eAAe,SAAS;AAAA,IAC3B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AA0BA,eAAsBK,oBASpB;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,CAAC,CAAC;AAExD,QAAM,UAAyC,iBAAiB,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAL;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["bulkUninstallApp","getInstalledApps","installApp","installAppFromShareUrl","isPermittedToInstallApps","uninstallApp","import_timestamp","import_rest_modules","payload","Status","TenantType","WebhookIdentityType","RequestedFields","InstallType","installApp","sdkTransformError","uninstallApp","bulkUninstallApp","installAppFromShareUrl","isPermittedToInstallApps","getInstalledApps"]}
|
package/build/cjs/meta.js
CHANGED
|
@@ -103,6 +103,12 @@ function resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl(opts) {
|
|
|
103
103
|
srcPath: "/_api/apps-installer-service",
|
|
104
104
|
destPath: ""
|
|
105
105
|
}
|
|
106
|
+
],
|
|
107
|
+
"vibe._base_domain_": [
|
|
108
|
+
{
|
|
109
|
+
srcPath: "/_api/apps-installer-service",
|
|
110
|
+
destPath: ""
|
|
111
|
+
}
|
|
106
112
|
]
|
|
107
113
|
};
|
|
108
114
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
@@ -124,6 +130,9 @@ function installApp(payload) {
|
|
|
124
130
|
method: "POST",
|
|
125
131
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.InstallApp",
|
|
126
132
|
packageName: PACKAGE_NAME,
|
|
133
|
+
migrationOptions: {
|
|
134
|
+
optInTransformResponse: true
|
|
135
|
+
},
|
|
127
136
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
128
137
|
protoPath: "/v1/app-instance/install",
|
|
129
138
|
data: serializedData,
|
|
@@ -153,6 +162,9 @@ function uninstallApp(payload) {
|
|
|
153
162
|
method: "POST",
|
|
154
163
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.UninstallApp",
|
|
155
164
|
packageName: PACKAGE_NAME,
|
|
165
|
+
migrationOptions: {
|
|
166
|
+
optInTransformResponse: true
|
|
167
|
+
},
|
|
156
168
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
157
169
|
protoPath: "/v1/app-instance/uninstall",
|
|
158
170
|
data: payload,
|
|
@@ -171,6 +183,9 @@ function bulkUninstallApp(payload) {
|
|
|
171
183
|
method: "POST",
|
|
172
184
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.BulkUninstallApp",
|
|
173
185
|
packageName: PACKAGE_NAME,
|
|
186
|
+
migrationOptions: {
|
|
187
|
+
optInTransformResponse: true
|
|
188
|
+
},
|
|
174
189
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
175
190
|
protoPath: "/v1/bulk/app-instance/uninstall",
|
|
176
191
|
data: payload,
|
|
@@ -209,6 +224,9 @@ function installAppFromShareUrl(payload) {
|
|
|
209
224
|
method: "POST",
|
|
210
225
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.InstallAppFromShareUrl",
|
|
211
226
|
packageName: PACKAGE_NAME,
|
|
227
|
+
migrationOptions: {
|
|
228
|
+
optInTransformResponse: true
|
|
229
|
+
},
|
|
212
230
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
213
231
|
protoPath: "/v1/app-share-url/install",
|
|
214
232
|
data: payload,
|
|
@@ -247,6 +265,9 @@ function isPermittedToInstallApps(payload) {
|
|
|
247
265
|
method: "POST",
|
|
248
266
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.IsPermittedToInstallApps",
|
|
249
267
|
packageName: PACKAGE_NAME,
|
|
268
|
+
migrationOptions: {
|
|
269
|
+
optInTransformResponse: true
|
|
270
|
+
},
|
|
250
271
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
251
272
|
protoPath: "/v1/app-instance/is-permitted-to-install",
|
|
252
273
|
data: serializedData,
|
|
@@ -265,6 +286,9 @@ function getInstalledApps(payload) {
|
|
|
265
286
|
method: "GET",
|
|
266
287
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.GetInstalledApps",
|
|
267
288
|
packageName: PACKAGE_NAME,
|
|
289
|
+
migrationOptions: {
|
|
290
|
+
optInTransformResponse: true
|
|
291
|
+
},
|
|
268
292
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
269
293
|
protoPath: "/v1/app-instances",
|
|
270
294
|
data: payload,
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/apps-v1-app-instance-apps-installer.http.ts","../../src/apps-v1-app-instance-apps-installer.meta.ts"],"sourcesContent":["export * from './src/apps-v1-app-instance-apps-installer.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/apps/v1/app-instances',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/apps/v1/app-instances',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_apps-installer_apps-installer';\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and can't guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - You agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, you confirm your acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a tenant, specifying the details of the app instance to create.\n *\n * The ID of this app instance is automatically generated and included in the `appInstance` object in the response.\n */\nexport function installApp(payload: object): RequestOptionsFactory<any> {\n function __installApp({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.InstallApp',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/install',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n { path: 'dependenciesInstallation.installedDate' },\n { path: 'dependenciesInstallation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __installApp;\n}\n\n/**\n * Uninstalls an app from a tenant.\n *\n * This removes the instance of a specified app from the tenant.\n */\nexport function uninstallApp(payload: object): RequestOptionsFactory<any> {\n function __uninstallApp({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.UninstallApp',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/uninstall',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __uninstallApp;\n}\n\n/**\n * Uninstalls apps from a tenant.\n *\n * This removes the instances of the specified apps from the tenant.\n */\nexport function bulkUninstallApp(payload: object): RequestOptionsFactory<any> {\n function __bulkUninstallApp({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.BulkUninstallApp',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/bulk/app-instance/uninstall',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.appInstance.installedDate' },\n { path: 'results.appInstance.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'clientSpecMap.data.widgets.*.gluedOptions.verticalMargin',\n },\n {\n path: 'clientSpecMap.data.widgets.*.gluedOptions.horizontalMargin',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUninstallApp;\n}\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and cannot guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Please review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - By utilizing this API, you agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, I confirm my acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a site using a share URL.\n */\nexport function installAppFromShareUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __installAppFromShareUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.InstallAppFromShareUrl',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-share-url/install',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n { path: 'dependenciesInstallation.installedDate' },\n { path: 'dependenciesInstallation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __installAppFromShareUrl;\n}\n\n/** Returns whether it's possible to install an app on a tenant, either by providing app instance details or using a share URL. */\nexport function isPermittedToInstallApps(\n payload: object\n): RequestOptionsFactory<any> {\n function __isPermittedToInstallApps({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appsInstallOptions.appInstances.installedDate' },\n { path: 'appsInstallOptions.appInstances.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.IsPermittedToInstallApps',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/is-permitted-to-install',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __isPermittedToInstallApps;\n}\n\n/** Returns the apps that are installed on the site in context */\nexport function getInstalledApps(payload: object): RequestOptionsFactory<any> {\n function __getInstalledApps({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'GET' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.GetInstalledApps',\n packageName: PACKAGE_NAME,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instances',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstances.installedDate' },\n { path: 'appInstances.updatedDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instances',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __getInstalledApps;\n}\n","import * as ambassadorWixAppsV1AppInstance from './apps-v1-app-instance-apps-installer.http.js';\nimport * as ambassadorWixAppsV1AppInstanceTypes from './apps-v1-app-instance-apps-installer.types.js';\nimport * as ambassadorWixAppsV1AppInstanceUniversalTypes from './apps-v1-app-instance-apps-installer.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function installApp(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.InstallAppRequest,\n ambassadorWixAppsV1AppInstanceTypes.InstallAppRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.InstallAppResponse,\n ambassadorWixAppsV1AppInstanceTypes.InstallAppResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixAppsV1AppInstance.installApp(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/app-instance/install',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function uninstallApp(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.UninstallAppRequest,\n ambassadorWixAppsV1AppInstanceTypes.UninstallAppRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.UninstallAppResponse,\n ambassadorWixAppsV1AppInstanceTypes.UninstallAppResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAppsV1AppInstance.uninstallApp(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/app-instance/uninstall',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkUninstallApp(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.BulkUninstallAppRequest,\n ambassadorWixAppsV1AppInstanceTypes.BulkUninstallAppRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.BulkUninstallAppResponse,\n ambassadorWixAppsV1AppInstanceTypes.BulkUninstallAppResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAppsV1AppInstance.bulkUninstallApp(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/app-instance/uninstall',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function installAppFromShareUrl(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.InstallAppFromShareUrlRequest,\n ambassadorWixAppsV1AppInstanceTypes.InstallAppFromShareUrlRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.InstallAppFromShareUrlResponse,\n ambassadorWixAppsV1AppInstanceTypes.InstallAppFromShareUrlResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAppsV1AppInstance.installAppFromShareUrl(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/app-share-url/install',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function isPermittedToInstallApps(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.IsPermittedToInstallAppsRequest,\n ambassadorWixAppsV1AppInstanceTypes.IsPermittedToInstallAppsRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.IsPermittedToInstallAppsResponse,\n ambassadorWixAppsV1AppInstanceTypes.IsPermittedToInstallAppsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAppsV1AppInstance.isPermittedToInstallApps(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/app-instance/is-permitted-to-install',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getInstalledApps(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.GetInstalledAppsRequest,\n ambassadorWixAppsV1AppInstanceTypes.GetInstalledAppsRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.GetInstalledAppsResponse,\n ambassadorWixAppsV1AppInstanceTypes.GetInstalledAppsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAppsV1AppInstance.getInstalledApps(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/app-instances',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,wBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,oBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,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;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["bulkUninstallApp","getInstalledApps","installApp","installAppFromShareUrl","isPermittedToInstallApps","uninstallApp","import_timestamp","import_rest_modules","payload","installApp","uninstallApp","bulkUninstallApp","installAppFromShareUrl","isPermittedToInstallApps","getInstalledApps"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/apps-v1-app-instance-apps-installer.http.ts","../../src/apps-v1-app-instance-apps-installer.meta.ts"],"sourcesContent":["export * from './src/apps-v1-app-instance-apps-installer.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps-installer-service',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/apps/v1/app-instances',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/apps/v1/app-instances',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/_api/apps-installer-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_apps-installer_apps-installer';\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and can't guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - You agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, you confirm your acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a tenant, specifying the details of the app instance to create.\n *\n * The ID of this app instance is automatically generated and included in the `appInstance` object in the response.\n */\nexport function installApp(payload: object): RequestOptionsFactory<any> {\n function __installApp({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.InstallApp',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/install',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n { path: 'dependenciesInstallation.installedDate' },\n { path: 'dependenciesInstallation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __installApp;\n}\n\n/**\n * Uninstalls an app from a tenant.\n *\n * This removes the instance of a specified app from the tenant.\n */\nexport function uninstallApp(payload: object): RequestOptionsFactory<any> {\n function __uninstallApp({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.UninstallApp',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/uninstall',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __uninstallApp;\n}\n\n/**\n * Uninstalls apps from a tenant.\n *\n * This removes the instances of the specified apps from the tenant.\n */\nexport function bulkUninstallApp(payload: object): RequestOptionsFactory<any> {\n function __bulkUninstallApp({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.BulkUninstallApp',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/bulk/app-instance/uninstall',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.appInstance.installedDate' },\n { path: 'results.appInstance.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'clientSpecMap.data.widgets.*.gluedOptions.verticalMargin',\n },\n {\n path: 'clientSpecMap.data.widgets.*.gluedOptions.horizontalMargin',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUninstallApp;\n}\n\n/**\n * <blockquote class=\"warning\">\n *\n * __Warning:__\n * By using this API to install 3rd-party apps, you acknowledge and agree that:\n *\n * - Some 3rd-party apps installed with this API may access, use, copy, change, or delete all your website's data, including your and your website visitors' and members' financial and personal information.\n * - Wix may not have reviewed the app, and cannot guarantee their operation or that it will continue to function as described by the app developers.\n * - You may be sharing sensitive information with the app. Please review the terms of use and privacy policies of any app you choose to install to understand how your data will be handled.\n * - By utilizing this API, you agree to the Wix App Market [terms of use](https://www.wix.com/about/app-market-terms).\n *\n * By installing any 3rd-party app through this API, I confirm my acceptance of all the above conditions.\n *\n * </blockquote>\n *\n * Installs an app on a site using a share URL.\n */\nexport function installAppFromShareUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __installAppFromShareUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.InstallAppFromShareUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-share-url/install',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstance.installedDate' },\n { path: 'appInstance.updatedDate' },\n { path: 'dependenciesInstallation.installedDate' },\n { path: 'dependenciesInstallation.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __installAppFromShareUrl;\n}\n\n/** Returns whether it's possible to install an app on a tenant, either by providing app instance details or using a share URL. */\nexport function isPermittedToInstallApps(\n payload: object\n): RequestOptionsFactory<any> {\n function __isPermittedToInstallApps({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appsInstallOptions.appInstances.installedDate' },\n { path: 'appsInstallOptions.appInstances.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.IsPermittedToInstallApps',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instance/is-permitted-to-install',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __isPermittedToInstallApps;\n}\n\n/** Returns the apps that are installed on the site in context */\nexport function getInstalledApps(payload: object): RequestOptionsFactory<any> {\n function __getInstalledApps({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.apps.v1.app_instance',\n method: 'GET' as any,\n methodFqn:\n 'wix.devcenter.apps.installer.v1.AppsInstallerService.GetInstalledApps',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instances',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appInstances.installedDate' },\n { path: 'appInstances.updatedDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'GET' as any,\n url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({\n protoPath: '/v1/app-instances',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n },\n ],\n };\n\n return metadata;\n }\n\n return __getInstalledApps;\n}\n","import * as ambassadorWixAppsV1AppInstance from './apps-v1-app-instance-apps-installer.http.js';\nimport * as ambassadorWixAppsV1AppInstanceTypes from './apps-v1-app-instance-apps-installer.types.js';\nimport * as ambassadorWixAppsV1AppInstanceUniversalTypes from './apps-v1-app-instance-apps-installer.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function installApp(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.InstallAppRequest,\n ambassadorWixAppsV1AppInstanceTypes.InstallAppRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.InstallAppResponse,\n ambassadorWixAppsV1AppInstanceTypes.InstallAppResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixAppsV1AppInstance.installApp(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/app-instance/install',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function uninstallApp(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.UninstallAppRequest,\n ambassadorWixAppsV1AppInstanceTypes.UninstallAppRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.UninstallAppResponse,\n ambassadorWixAppsV1AppInstanceTypes.UninstallAppResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAppsV1AppInstance.uninstallApp(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/app-instance/uninstall',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkUninstallApp(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.BulkUninstallAppRequest,\n ambassadorWixAppsV1AppInstanceTypes.BulkUninstallAppRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.BulkUninstallAppResponse,\n ambassadorWixAppsV1AppInstanceTypes.BulkUninstallAppResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAppsV1AppInstance.bulkUninstallApp(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/app-instance/uninstall',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function installAppFromShareUrl(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.InstallAppFromShareUrlRequest,\n ambassadorWixAppsV1AppInstanceTypes.InstallAppFromShareUrlRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.InstallAppFromShareUrlResponse,\n ambassadorWixAppsV1AppInstanceTypes.InstallAppFromShareUrlResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAppsV1AppInstance.installAppFromShareUrl(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/app-share-url/install',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function isPermittedToInstallApps(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.IsPermittedToInstallAppsRequest,\n ambassadorWixAppsV1AppInstanceTypes.IsPermittedToInstallAppsRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.IsPermittedToInstallAppsResponse,\n ambassadorWixAppsV1AppInstanceTypes.IsPermittedToInstallAppsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAppsV1AppInstance.isPermittedToInstallApps(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/app-instance/is-permitted-to-install',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getInstalledApps(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixAppsV1AppInstanceUniversalTypes.GetInstalledAppsRequest,\n ambassadorWixAppsV1AppInstanceTypes.GetInstalledAppsRequest,\n ambassadorWixAppsV1AppInstanceUniversalTypes.GetInstalledAppsResponse,\n ambassadorWixAppsV1AppInstanceTypes.GetInstalledAppsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixAppsV1AppInstance.getInstalledApps(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/app-instances',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,wBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,oBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,0DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB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AAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,4BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC2B,yBAAyB,OAAO;AAEjE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,oBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC2B,iBAAiB,OAAO;AAEzD,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["bulkUninstallApp","getInstalledApps","installApp","installAppFromShareUrl","isPermittedToInstallApps","uninstallApp","import_timestamp","import_rest_modules","payload","installApp","uninstallApp","bulkUninstallApp","installAppFromShareUrl","isPermittedToInstallApps","getInstalledApps"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -96,6 +96,6 @@ declare const installAppFromShareUrl: MaybeContext<BuildRESTFunction<typeof inst
|
|
|
96
96
|
declare const isPermittedToInstallApps: MaybeContext<BuildRESTFunction<typeof isPermittedToInstallApps$1> & typeof isPermittedToInstallApps$1>;
|
|
97
97
|
declare const getInstalledApps: MaybeContext<BuildRESTFunction<typeof getInstalledApps$1> & typeof getInstalledApps$1>;
|
|
98
98
|
/** */
|
|
99
|
-
declare const onAppInstanceAppInstalledOnTenant: BuildEventDefinition<typeof onAppInstanceAppInstalledOnTenant$1
|
|
99
|
+
declare const onAppInstanceAppInstalledOnTenant: BuildEventDefinition<typeof onAppInstanceAppInstalledOnTenant$1> & typeof onAppInstanceAppInstalledOnTenant$1;
|
|
100
100
|
|
|
101
101
|
export { AppInstanceAppInstalledOnTenantEnvelope, BulkUninstallAppOptions, BulkUninstallAppResponse, GetInstalledAppsResponse, InstallAppApplicationErrors, InstallAppFromShareUrlApplicationErrors, InstallAppFromShareUrlOptions, InstallAppFromShareUrlResponse, InstallAppOptions, InstallAppResponse, InstallTypeWithLiterals, IsPermittedToInstallAppsApplicationErrors, IsPermittedToInstallAppsOptions, IsPermittedToInstallAppsResponse, Tenant, UninstallAppOptions, bulkUninstallApp, getInstalledApps, installApp, installAppFromShareUrl, isPermittedToInstallApps, onAppInstanceAppInstalledOnTenant, uninstallApp };
|
package/build/es/index.mjs
CHANGED
|
@@ -85,6 +85,12 @@ function resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl(opts) {
|
|
|
85
85
|
srcPath: "/_api/apps-installer-service",
|
|
86
86
|
destPath: ""
|
|
87
87
|
}
|
|
88
|
+
],
|
|
89
|
+
"vibe._base_domain_": [
|
|
90
|
+
{
|
|
91
|
+
srcPath: "/_api/apps-installer-service",
|
|
92
|
+
destPath: ""
|
|
93
|
+
}
|
|
88
94
|
]
|
|
89
95
|
};
|
|
90
96
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
@@ -106,6 +112,9 @@ function installApp(payload) {
|
|
|
106
112
|
method: "POST",
|
|
107
113
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.InstallApp",
|
|
108
114
|
packageName: PACKAGE_NAME,
|
|
115
|
+
migrationOptions: {
|
|
116
|
+
optInTransformResponse: true
|
|
117
|
+
},
|
|
109
118
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
110
119
|
protoPath: "/v1/app-instance/install",
|
|
111
120
|
data: serializedData,
|
|
@@ -135,6 +144,9 @@ function uninstallApp(payload) {
|
|
|
135
144
|
method: "POST",
|
|
136
145
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.UninstallApp",
|
|
137
146
|
packageName: PACKAGE_NAME,
|
|
147
|
+
migrationOptions: {
|
|
148
|
+
optInTransformResponse: true
|
|
149
|
+
},
|
|
138
150
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
139
151
|
protoPath: "/v1/app-instance/uninstall",
|
|
140
152
|
data: payload,
|
|
@@ -153,6 +165,9 @@ function bulkUninstallApp(payload) {
|
|
|
153
165
|
method: "POST",
|
|
154
166
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.BulkUninstallApp",
|
|
155
167
|
packageName: PACKAGE_NAME,
|
|
168
|
+
migrationOptions: {
|
|
169
|
+
optInTransformResponse: true
|
|
170
|
+
},
|
|
156
171
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
157
172
|
protoPath: "/v1/bulk/app-instance/uninstall",
|
|
158
173
|
data: payload,
|
|
@@ -191,6 +206,9 @@ function installAppFromShareUrl(payload) {
|
|
|
191
206
|
method: "POST",
|
|
192
207
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.InstallAppFromShareUrl",
|
|
193
208
|
packageName: PACKAGE_NAME,
|
|
209
|
+
migrationOptions: {
|
|
210
|
+
optInTransformResponse: true
|
|
211
|
+
},
|
|
194
212
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
195
213
|
protoPath: "/v1/app-share-url/install",
|
|
196
214
|
data: payload,
|
|
@@ -229,6 +247,9 @@ function isPermittedToInstallApps(payload) {
|
|
|
229
247
|
method: "POST",
|
|
230
248
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.IsPermittedToInstallApps",
|
|
231
249
|
packageName: PACKAGE_NAME,
|
|
250
|
+
migrationOptions: {
|
|
251
|
+
optInTransformResponse: true
|
|
252
|
+
},
|
|
232
253
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
233
254
|
protoPath: "/v1/app-instance/is-permitted-to-install",
|
|
234
255
|
data: serializedData,
|
|
@@ -247,6 +268,9 @@ function getInstalledApps(payload) {
|
|
|
247
268
|
method: "GET",
|
|
248
269
|
methodFqn: "wix.devcenter.apps.installer.v1.AppsInstallerService.GetInstalledApps",
|
|
249
270
|
packageName: PACKAGE_NAME,
|
|
271
|
+
migrationOptions: {
|
|
272
|
+
optInTransformResponse: true
|
|
273
|
+
},
|
|
250
274
|
url: resolveWixDevcenterAppsInstallerV1AppsInstallerServiceUrl({
|
|
251
275
|
protoPath: "/v1/app-instances",
|
|
252
276
|
data: payload,
|
|
@@ -554,7 +578,9 @@ var bulkUninstallApp4 = /* @__PURE__ */ createRESTModule(bulkUninstallApp3);
|
|
|
554
578
|
var installAppFromShareUrl4 = /* @__PURE__ */ createRESTModule(installAppFromShareUrl3);
|
|
555
579
|
var isPermittedToInstallApps4 = /* @__PURE__ */ createRESTModule(isPermittedToInstallApps3);
|
|
556
580
|
var getInstalledApps4 = /* @__PURE__ */ createRESTModule(getInstalledApps3);
|
|
557
|
-
var onAppInstanceAppInstalledOnTenant2 = createEventModule(
|
|
581
|
+
var onAppInstanceAppInstalledOnTenant2 = createEventModule(
|
|
582
|
+
onAppInstanceAppInstalledOnTenant
|
|
583
|
+
);
|
|
558
584
|
export {
|
|
559
585
|
InstallType,
|
|
560
586
|
RequestedFields,
|