@wix/auto_sdk_app-management_app-permissions 1.0.31 → 1.0.32

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.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
2
  import { AppPermission, ListAppPermissionsOptions, ListAppPermissionsResponse } from './index.typings.js';
3
- export { Action, ActionEvent, ActionWithLiterals, CreateAppPermissionRequest, CreateAppPermissionResponse, CursorPaging, CursorPagingMetadata, Cursors, DeleteAppPermissionRequest, DeleteAppPermissionResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetAppPermissionRequest, GetAppPermissionResponse, IdentificationData, IdentificationDataIdOneOf, ListAppPermissionsRequest, MessageEnvelope, OldPermissionChangedEvent, Permission, RestoreInfo, V1Permission, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
3
+ export { Action, ActionEvent, ActionWithLiterals, CloneAppPermissionsRequest, CloneAppPermissionsResponse, CreateAppPermissionRequest, CreateAppPermissionResponse, CursorPaging, CursorPagingMetadata, Cursors, DeleteAppPermissionRequest, DeleteAppPermissionResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetAppPermissionRequest, GetAppPermissionResponse, IdentificationData, IdentificationDataIdOneOf, ListAppPermissionsRequest, MessageEnvelope, OldPermissionChangedEvent, Permission, RestoreInfo, V1Permission, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function createAppPermission$1(httpClient: HttpClient): CreateAppPermissionSignature;
6
6
  interface CreateAppPermissionSignature {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.universal.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.http.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.public.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.context.ts"],"sourcesContent":["export * from './src/devcenter-apps-v1-app-permission-app-permissions.context.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 ambassadorWixDevcenterAppsV1AppPermission from './devcenter-apps-v1-app-permission-app-permissions.http.js';\n\nexport interface AppPermission {\n /**\n * App ID.\n *\n * You can find the app ID in the app's dashboard's [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home).\n * @format GUID\n */\n appId?: string;\n /**\n * Permission the app requests when installed on a site.\n *\n * Learn more [about permissions for Wix apps](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n permission?: V1Permission;\n /**\n * When the permission was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * When the permission was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport interface V1Permission {\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface CreateAppPermissionRequest {\n /** Permission to add to the specified app. */\n appPermission: AppPermission;\n}\n\nexport interface CreateAppPermissionResponse {\n /** Details of permission that was added to the app. */\n appPermission?: AppPermission;\n}\n\nexport interface GetAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface GetAppPermissionResponse {\n /** Details of the retrieved app permission. */\n appPermission?: AppPermission;\n}\n\nexport interface ListAppPermissionsRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Whether to retrieve the most recent permissions information. This decreases performance but ensures that the retrieved information is up-to-date, even immediately after an update.\n *\n * Default: `false`.\n */\n consistent?: boolean;\n /** Paging configuration. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListAppPermissionsResponse {\n /** List of permissions for the specified app. */\n appPermissions?: AppPermission[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DeleteAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId: string;\n}\n\nexport interface DeleteAppPermissionResponse {}\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 Empty {}\n\nexport interface OldPermissionChangedEvent {\n /** @format GUID */\n appId?: string;\n permission?: Permission;\n action?: ActionWithLiterals;\n}\n\nexport interface Permission {\n permissionId?: string;\n}\n\nexport enum Action {\n CREATED = 'CREATED',\n UPDATED = 'UPDATED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals = Action | 'CREATED' | 'UPDATED' | 'DELETED';\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\n/**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param appPermission - Permission to add to the specified app.\n * @public\n * @requiredField appPermission\n * @requiredField appPermission.appId\n * @requiredField appPermission.permission\n * @requiredField appPermission.permission.permissionId\n * @permissionId DEV_CENTER.CREATE_APP_PERMISSION\n * @applicableIdentity APP\n * @returns Details of permission that was added to the app.\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission\n */\nexport async function createAppPermission(\n appPermission: NonNullablePaths<\n AppPermission,\n `appId` | `permission` | `permission.permissionId`,\n 3\n >\n): Promise<\n NonNullablePaths<AppPermission, `appId` | `permission.permissionId`, 3>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n appPermission: appPermission,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.createAppPermission(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.appPermission!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { appPermission: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['appPermission']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n * @param appId - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @public\n * @requiredField appId\n * @permissionId DEV_CENTER.READ_APP_PERMISSIONS\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.ListAppPermissions\n */\nexport async function listAppPermissions(\n appId: string,\n options?: ListAppPermissionsOptions\n): Promise<\n NonNullablePaths<\n ListAppPermissionsResponse,\n | `appPermissions`\n | `appPermissions.${number}.appId`\n | `appPermissions.${number}.permission.permissionId`,\n 5\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 appId: appId,\n consistent: options?.consistent,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.listAppPermissions(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 appId: '$[0]',\n consistent: '$[1].consistent',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['appId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAppPermissionsOptions {\n /**\n * Whether to retrieve the most recent permissions information. This decreases performance but ensures that the retrieved information is up-to-date, even immediately after an update.\n *\n * Default: `false`.\n */\n consistent?: boolean;\n /** Paging configuration. */\n paging?: CursorPaging;\n}\n\n/**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param appId - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @param permissionId - Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @public\n * @requiredField appId\n * @requiredField permissionId\n * @permissionId DEV_CENTER.DELETE_APP_PERMISSION\n * @applicableIdentity APP\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.DeleteAppPermission\n */\nexport async function deleteAppPermission(\n appId: string,\n permissionId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n appId: appId,\n permissionId: permissionId,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.deleteAppPermission(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: { appId: '$[0]', permissionId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['appId', 'permissionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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 resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'dev._base_domain_': [\n {\n srcPath: '/app-permissions-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps/v1/app-permissions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-permissions';\n\n/**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function createAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __createAppPermission({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createAppPermission;\n}\n\n/**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n */\nexport function listAppPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'GET' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.ListAppPermissions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\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: 'appPermissions.createdDate' },\n { path: 'appPermissions.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPermissions;\n}\n\n/**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function deleteAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteAppPermission({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.DeleteAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteAppPermission;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AppPermission,\n ListAppPermissionsOptions,\n ListAppPermissionsResponse,\n createAppPermission as universalCreateAppPermission,\n deleteAppPermission as universalDeleteAppPermission,\n listAppPermissions as universalListAppPermissions,\n} from './devcenter-apps-v1-app-permission-app-permissions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/app-management' };\n\nexport function createAppPermission(\n httpClient: HttpClient\n): CreateAppPermissionSignature {\n return (\n appPermission: NonNullablePaths<\n AppPermission,\n `appId` | `permission` | `permission.permissionId`,\n 3\n >\n ) =>\n universalCreateAppPermission(\n appPermission,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateAppPermissionSignature {\n /**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param - Permission to add to the specified app.\n * @returns Details of permission that was added to the app.\n */\n (\n appPermission: NonNullablePaths<\n AppPermission,\n `appId` | `permission` | `permission.permissionId`,\n 3\n >\n ): Promise<\n NonNullablePaths<AppPermission, `appId` | `permission.permissionId`, 3>\n >;\n}\n\nexport function listAppPermissions(\n httpClient: HttpClient\n): ListAppPermissionsSignature {\n return (appId: string, options?: ListAppPermissionsOptions) =>\n universalListAppPermissions(\n appId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAppPermissionsSignature {\n /**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n * @param - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n */\n (appId: string, options?: ListAppPermissionsOptions): Promise<\n NonNullablePaths<\n ListAppPermissionsResponse,\n | `appPermissions`\n | `appPermissions.${number}.appId`\n | `appPermissions.${number}.permission.permissionId`,\n 5\n >\n >;\n}\n\nexport function deleteAppPermission(\n httpClient: HttpClient\n): DeleteAppPermissionSignature {\n return (appId: string, permissionId: string) =>\n universalDeleteAppPermission(\n appId,\n permissionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteAppPermissionSignature {\n /**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @param - Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n */\n (appId: string, permissionId: string): Promise<void>;\n}\n\nexport {\n Action,\n ActionEvent,\n AppPermission,\n CreateAppPermissionRequest,\n CreateAppPermissionResponse,\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n DeleteAppPermissionRequest,\n DeleteAppPermissionResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n GetAppPermissionRequest,\n GetAppPermissionResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListAppPermissionsOptions,\n ListAppPermissionsRequest,\n ListAppPermissionsResponse,\n MessageEnvelope,\n OldPermissionChangedEvent,\n Permission,\n RestoreInfo,\n V1Permission,\n WebhookIdentityType,\n} from './devcenter-apps-v1-app-permission-app-permissions.universal.js';\n","import {\n createAppPermission as publicCreateAppPermission,\n listAppPermissions as publicListAppPermissions,\n deleteAppPermission as publicDeleteAppPermission,\n} from './devcenter-apps-v1-app-permission-app-permissions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createAppPermission: MaybeContext<\n BuildRESTFunction<typeof publicCreateAppPermission> &\n typeof publicCreateAppPermission\n> = /*#__PURE__*/ createRESTModule(publicCreateAppPermission);\nexport const listAppPermissions: MaybeContext<\n BuildRESTFunction<typeof publicListAppPermissions> &\n typeof publicListAppPermissions\n> = /*#__PURE__*/ createRESTModule(publicListAppPermissions);\nexport const deleteAppPermission: MaybeContext<\n BuildRESTFunction<typeof publicDeleteAppPermission> &\n typeof publicDeleteAppPermission\n> = /*#__PURE__*/ createRESTModule(publicDeleteAppPermission);\n\nexport {\n Action,\n WebhookIdentityType,\n} from './devcenter-apps-v1-app-permission-app-permissions.universal.js';\nexport {\n AppPermission,\n V1Permission,\n CreateAppPermissionRequest,\n CreateAppPermissionResponse,\n GetAppPermissionRequest,\n GetAppPermissionResponse,\n ListAppPermissionsRequest,\n CursorPaging,\n ListAppPermissionsResponse,\n CursorPagingMetadata,\n Cursors,\n DeleteAppPermissionRequest,\n DeleteAppPermissionResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n OldPermissionChangedEvent,\n Permission,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListAppPermissionsOptions,\n} from './devcenter-apps-v1-app-permission-app-permissions.universal.js';\nexport {\n ActionWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './devcenter-apps-v1-app-permission-app-permissions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,0BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MAC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;AAAA,EACR;AACF;AAgCA,eAAsBE,qBACpB,OACA,cACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,UACsC,oBAAoB,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,QAAQ,cAAc,OAAO;AAAA,QAChE,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,cAAc;AAAA,IAC1B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AExgBO,SAASG,qBACd,YAC8B;AAC9B,SAAO,CACL,kBAMAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,oBACd,YAC6B;AAC7B,SAAO,CAAC,OAAe,YACrBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAsBO,SAASC,qBACd,YAC8B;AAC9B,SAAO,CAAC,OAAe,iBACrBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACvFA,IAAAC,uBAAiC;AAG1B,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,uBAGK,2DAAiBA,oBAAyB;","names":["createAppPermission","deleteAppPermission","listAppPermissions","import_timestamp","import_rest_modules","payload","Action","WebhookIdentityType","createAppPermission","sdkTransformError","listAppPermissions","deleteAppPermission","createAppPermission","listAppPermissions","deleteAppPermission","import_rest_modules","createAppPermission","listAppPermissions","deleteAppPermission"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.universal.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.http.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.public.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.context.ts"],"sourcesContent":["export * from './src/devcenter-apps-v1-app-permission-app-permissions.context.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 ambassadorWixDevcenterAppsV1AppPermission from './devcenter-apps-v1-app-permission-app-permissions.http.js';\n\nexport interface AppPermission {\n /**\n * App ID.\n *\n * You can find the app ID in the app's dashboard's [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home).\n * @format GUID\n */\n appId?: string;\n /**\n * Permission the app requests when installed on a site.\n *\n * Learn more [about permissions for Wix apps](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n permission?: V1Permission;\n /**\n * When the permission was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * When the permission was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport interface V1Permission {\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface CreateAppPermissionRequest {\n /** Permission to add to the specified app. */\n appPermission: AppPermission;\n}\n\nexport interface CreateAppPermissionResponse {\n /** Details of permission that was added to the app. */\n appPermission?: AppPermission;\n}\n\nexport interface GetAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface GetAppPermissionResponse {\n /** Details of the retrieved app permission. */\n appPermission?: AppPermission;\n}\n\nexport interface ListAppPermissionsRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Whether to retrieve the most recent permissions information. This decreases performance but ensures that the retrieved information is up-to-date, even immediately after an update.\n *\n * Default: `false`.\n */\n consistent?: boolean;\n /** Paging configuration. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListAppPermissionsResponse {\n /** List of permissions for the specified app. */\n appPermissions?: AppPermission[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DeleteAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId: string;\n}\n\nexport interface DeleteAppPermissionResponse {}\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 Empty {}\n\nexport interface OldPermissionChangedEvent {\n /** @format GUID */\n appId?: string;\n permission?: Permission;\n action?: ActionWithLiterals;\n}\n\nexport interface Permission {\n permissionId?: string;\n}\n\nexport enum Action {\n CREATED = 'CREATED',\n UPDATED = 'UPDATED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals = Action | 'CREATED' | 'UPDATED' | 'DELETED';\n\nexport interface CloneAppPermissionsRequest {\n /**\n * Source app ID to clone permissions from.\n * @format GUID\n */\n sourceAppId?: string;\n /**\n * Target app ID to clone permissions to.\n * @format GUID\n */\n targetAppId?: string;\n}\n\nexport interface CloneAppPermissionsResponse {}\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\n/**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param appPermission - Permission to add to the specified app.\n * @public\n * @requiredField appPermission\n * @requiredField appPermission.appId\n * @requiredField appPermission.permission\n * @requiredField appPermission.permission.permissionId\n * @permissionId DEV_CENTER.CREATE_APP_PERMISSION\n * @applicableIdentity APP\n * @returns Details of permission that was added to the app.\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission\n */\nexport async function createAppPermission(\n appPermission: NonNullablePaths<\n AppPermission,\n `appId` | `permission` | `permission.permissionId`,\n 3\n >\n): Promise<\n NonNullablePaths<AppPermission, `appId` | `permission.permissionId`, 3>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n appPermission: appPermission,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.createAppPermission(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.appPermission!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { appPermission: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['appPermission']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n * @param appId - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @public\n * @requiredField appId\n * @permissionId DEV_CENTER.READ_APP_PERMISSIONS\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.ListAppPermissions\n */\nexport async function listAppPermissions(\n appId: string,\n options?: ListAppPermissionsOptions\n): Promise<\n NonNullablePaths<\n ListAppPermissionsResponse,\n | `appPermissions`\n | `appPermissions.${number}.appId`\n | `appPermissions.${number}.permission.permissionId`,\n 5\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 appId: appId,\n consistent: options?.consistent,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.listAppPermissions(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 appId: '$[0]',\n consistent: '$[1].consistent',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['appId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAppPermissionsOptions {\n /**\n * Whether to retrieve the most recent permissions information. This decreases performance but ensures that the retrieved information is up-to-date, even immediately after an update.\n *\n * Default: `false`.\n */\n consistent?: boolean;\n /** Paging configuration. */\n paging?: CursorPaging;\n}\n\n/**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param appId - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @param permissionId - Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @public\n * @requiredField appId\n * @requiredField permissionId\n * @permissionId DEV_CENTER.DELETE_APP_PERMISSION\n * @applicableIdentity APP\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.DeleteAppPermission\n */\nexport async function deleteAppPermission(\n appId: string,\n permissionId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n appId: appId,\n permissionId: permissionId,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.deleteAppPermission(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: { appId: '$[0]', permissionId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['appId', 'permissionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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 resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'dev._base_domain_': [\n {\n srcPath: '/app-permissions-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps/v1/app-permissions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-permissions';\n\n/**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function createAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __createAppPermission({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createAppPermission;\n}\n\n/**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n */\nexport function listAppPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'GET' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.ListAppPermissions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\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: 'appPermissions.createdDate' },\n { path: 'appPermissions.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPermissions;\n}\n\n/**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function deleteAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteAppPermission({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.DeleteAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteAppPermission;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AppPermission,\n ListAppPermissionsOptions,\n ListAppPermissionsResponse,\n createAppPermission as universalCreateAppPermission,\n deleteAppPermission as universalDeleteAppPermission,\n listAppPermissions as universalListAppPermissions,\n} from './devcenter-apps-v1-app-permission-app-permissions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/app-management' };\n\nexport function createAppPermission(\n httpClient: HttpClient\n): CreateAppPermissionSignature {\n return (\n appPermission: NonNullablePaths<\n AppPermission,\n `appId` | `permission` | `permission.permissionId`,\n 3\n >\n ) =>\n universalCreateAppPermission(\n appPermission,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateAppPermissionSignature {\n /**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param - Permission to add to the specified app.\n * @returns Details of permission that was added to the app.\n */\n (\n appPermission: NonNullablePaths<\n AppPermission,\n `appId` | `permission` | `permission.permissionId`,\n 3\n >\n ): Promise<\n NonNullablePaths<AppPermission, `appId` | `permission.permissionId`, 3>\n >;\n}\n\nexport function listAppPermissions(\n httpClient: HttpClient\n): ListAppPermissionsSignature {\n return (appId: string, options?: ListAppPermissionsOptions) =>\n universalListAppPermissions(\n appId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAppPermissionsSignature {\n /**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n * @param - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n */\n (appId: string, options?: ListAppPermissionsOptions): Promise<\n NonNullablePaths<\n ListAppPermissionsResponse,\n | `appPermissions`\n | `appPermissions.${number}.appId`\n | `appPermissions.${number}.permission.permissionId`,\n 5\n >\n >;\n}\n\nexport function deleteAppPermission(\n httpClient: HttpClient\n): DeleteAppPermissionSignature {\n return (appId: string, permissionId: string) =>\n universalDeleteAppPermission(\n appId,\n permissionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteAppPermissionSignature {\n /**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @param - Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n */\n (appId: string, permissionId: string): Promise<void>;\n}\n\nexport {\n Action,\n ActionEvent,\n AppPermission,\n CloneAppPermissionsRequest,\n CloneAppPermissionsResponse,\n CreateAppPermissionRequest,\n CreateAppPermissionResponse,\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n DeleteAppPermissionRequest,\n DeleteAppPermissionResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n GetAppPermissionRequest,\n GetAppPermissionResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListAppPermissionsOptions,\n ListAppPermissionsRequest,\n ListAppPermissionsResponse,\n MessageEnvelope,\n OldPermissionChangedEvent,\n Permission,\n RestoreInfo,\n V1Permission,\n WebhookIdentityType,\n} from './devcenter-apps-v1-app-permission-app-permissions.universal.js';\n","import {\n createAppPermission as publicCreateAppPermission,\n listAppPermissions as publicListAppPermissions,\n deleteAppPermission as publicDeleteAppPermission,\n} from './devcenter-apps-v1-app-permission-app-permissions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createAppPermission: MaybeContext<\n BuildRESTFunction<typeof publicCreateAppPermission> &\n typeof publicCreateAppPermission\n> = /*#__PURE__*/ createRESTModule(publicCreateAppPermission);\nexport const listAppPermissions: MaybeContext<\n BuildRESTFunction<typeof publicListAppPermissions> &\n typeof publicListAppPermissions\n> = /*#__PURE__*/ createRESTModule(publicListAppPermissions);\nexport const deleteAppPermission: MaybeContext<\n BuildRESTFunction<typeof publicDeleteAppPermission> &\n typeof publicDeleteAppPermission\n> = /*#__PURE__*/ createRESTModule(publicDeleteAppPermission);\n\nexport {\n Action,\n WebhookIdentityType,\n} from './devcenter-apps-v1-app-permission-app-permissions.universal.js';\nexport {\n AppPermission,\n V1Permission,\n CreateAppPermissionRequest,\n CreateAppPermissionResponse,\n GetAppPermissionRequest,\n GetAppPermissionResponse,\n ListAppPermissionsRequest,\n CursorPaging,\n ListAppPermissionsResponse,\n CursorPagingMetadata,\n Cursors,\n DeleteAppPermissionRequest,\n DeleteAppPermissionResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n OldPermissionChangedEvent,\n Permission,\n CloneAppPermissionsRequest,\n CloneAppPermissionsResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListAppPermissionsOptions,\n} from './devcenter-apps-v1-app-permission-app-permissions.universal.js';\nexport {\n ActionWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './devcenter-apps-v1-app-permission-app-permissions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;A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qBACd,YAC8B;AAC9B,SAAO,CAAC,OAAe,iBACrBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACvFA,IAAAC,uBAAiC;AAG1B,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,uBAGK,2DAAiBA,oBAAyB;","names":["createAppPermission","deleteAppPermission","listAppPermissions","import_timestamp","import_rest_modules","payload","Action","WebhookIdentityType","createAppPermission","sdkTransformError","listAppPermissions","deleteAppPermission","createAppPermission","listAppPermissions","deleteAppPermission","import_rest_modules","createAppPermission","listAppPermissions","deleteAppPermission"]}
@@ -226,6 +226,20 @@ declare enum Action {
226
226
  }
227
227
  /** @enumType */
228
228
  type ActionWithLiterals = Action | 'CREATED' | 'UPDATED' | 'DELETED';
229
+ interface CloneAppPermissionsRequest {
230
+ /**
231
+ * Source app ID to clone permissions from.
232
+ * @format GUID
233
+ */
234
+ sourceAppId?: string;
235
+ /**
236
+ * Target app ID to clone permissions to.
237
+ * @format GUID
238
+ */
239
+ targetAppId?: string;
240
+ }
241
+ interface CloneAppPermissionsResponse {
242
+ }
229
243
  interface MessageEnvelope {
230
244
  /**
231
245
  * App instance ID.
@@ -360,4 +374,4 @@ interface ListAppPermissionsOptions {
360
374
  */
361
375
  declare function deleteAppPermission(appId: string, permissionId: string): Promise<void>;
362
376
 
363
- export { Action, type ActionEvent, type ActionWithLiterals, type AppPermission, type CreateAppPermissionRequest, type CreateAppPermissionResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteAppPermissionRequest, type DeleteAppPermissionResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type GetAppPermissionRequest, type GetAppPermissionResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListAppPermissionsOptions, type ListAppPermissionsRequest, type ListAppPermissionsResponse, type MessageEnvelope, type OldPermissionChangedEvent, type Permission, type RestoreInfo, type V1Permission, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createAppPermission, deleteAppPermission, listAppPermissions };
377
+ export { Action, type ActionEvent, type ActionWithLiterals, type AppPermission, type CloneAppPermissionsRequest, type CloneAppPermissionsResponse, type CreateAppPermissionRequest, type CreateAppPermissionResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteAppPermissionRequest, type DeleteAppPermissionResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type GetAppPermissionRequest, type GetAppPermissionResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListAppPermissionsOptions, type ListAppPermissionsRequest, type ListAppPermissionsResponse, type MessageEnvelope, type OldPermissionChangedEvent, type Permission, type RestoreInfo, type V1Permission, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createAppPermission, deleteAppPermission, listAppPermissions };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.universal.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.http.ts"],"sourcesContent":["export * from './src/devcenter-apps-v1-app-permission-app-permissions.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 ambassadorWixDevcenterAppsV1AppPermission from './devcenter-apps-v1-app-permission-app-permissions.http.js';\n\nexport interface AppPermission {\n /**\n * App ID.\n *\n * You can find the app ID in the app's dashboard's [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home).\n * @format GUID\n */\n appId?: string;\n /**\n * Permission the app requests when installed on a site.\n *\n * Learn more [about permissions for Wix apps](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n permission?: V1Permission;\n /**\n * When the permission was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * When the permission was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport interface V1Permission {\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface CreateAppPermissionRequest {\n /** Permission to add to the specified app. */\n appPermission: AppPermission;\n}\n\nexport interface CreateAppPermissionResponse {\n /** Details of permission that was added to the app. */\n appPermission?: AppPermission;\n}\n\nexport interface GetAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface GetAppPermissionResponse {\n /** Details of the retrieved app permission. */\n appPermission?: AppPermission;\n}\n\nexport interface ListAppPermissionsRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Whether to retrieve the most recent permissions information. This decreases performance but ensures that the retrieved information is up-to-date, even immediately after an update.\n *\n * Default: `false`.\n */\n consistent?: boolean;\n /** Paging configuration. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListAppPermissionsResponse {\n /** List of permissions for the specified app. */\n appPermissions?: AppPermission[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DeleteAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId: string;\n}\n\nexport interface DeleteAppPermissionResponse {}\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 Empty {}\n\nexport interface OldPermissionChangedEvent {\n /** @format GUID */\n appId?: string;\n permission?: Permission;\n action?: ActionWithLiterals;\n}\n\nexport interface Permission {\n permissionId?: string;\n}\n\nexport enum Action {\n CREATED = 'CREATED',\n UPDATED = 'UPDATED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals = Action | 'CREATED' | 'UPDATED' | 'DELETED';\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\n/**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param appPermission - Permission to add to the specified app.\n * @public\n * @requiredField appPermission\n * @requiredField appPermission.appId\n * @requiredField appPermission.permission\n * @requiredField appPermission.permission.permissionId\n * @permissionId DEV_CENTER.CREATE_APP_PERMISSION\n * @applicableIdentity APP\n * @returns Details of permission that was added to the app.\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission\n */\nexport async function createAppPermission(\n appPermission: NonNullablePaths<\n AppPermission,\n `appId` | `permission` | `permission.permissionId`,\n 3\n >\n): Promise<\n NonNullablePaths<AppPermission, `appId` | `permission.permissionId`, 3>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n appPermission: appPermission,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.createAppPermission(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.appPermission!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { appPermission: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['appPermission']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n * @param appId - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @public\n * @requiredField appId\n * @permissionId DEV_CENTER.READ_APP_PERMISSIONS\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.ListAppPermissions\n */\nexport async function listAppPermissions(\n appId: string,\n options?: ListAppPermissionsOptions\n): Promise<\n NonNullablePaths<\n ListAppPermissionsResponse,\n | `appPermissions`\n | `appPermissions.${number}.appId`\n | `appPermissions.${number}.permission.permissionId`,\n 5\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 appId: appId,\n consistent: options?.consistent,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.listAppPermissions(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 appId: '$[0]',\n consistent: '$[1].consistent',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['appId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAppPermissionsOptions {\n /**\n * Whether to retrieve the most recent permissions information. This decreases performance but ensures that the retrieved information is up-to-date, even immediately after an update.\n *\n * Default: `false`.\n */\n consistent?: boolean;\n /** Paging configuration. */\n paging?: CursorPaging;\n}\n\n/**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param appId - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @param permissionId - Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @public\n * @requiredField appId\n * @requiredField permissionId\n * @permissionId DEV_CENTER.DELETE_APP_PERMISSION\n * @applicableIdentity APP\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.DeleteAppPermission\n */\nexport async function deleteAppPermission(\n appId: string,\n permissionId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n appId: appId,\n permissionId: permissionId,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.deleteAppPermission(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: { appId: '$[0]', permissionId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['appId', 'permissionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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 resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'dev._base_domain_': [\n {\n srcPath: '/app-permissions-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps/v1/app-permissions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-permissions';\n\n/**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function createAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __createAppPermission({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createAppPermission;\n}\n\n/**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n */\nexport function listAppPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'GET' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.ListAppPermissions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\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: 'appPermissions.createdDate' },\n { path: 'appPermissions.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPermissions;\n}\n\n/**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function deleteAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteAppPermission({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.DeleteAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteAppPermission;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,0BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;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,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AASd,SAAS,oBACd,SAC4B;AAC5B,WAAS,sBAAs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,cAAc;AAAA,IAC1B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createAppPermission","deleteAppPermission","listAppPermissions","import_timestamp","import_rest_modules","payload","Action","WebhookIdentityType","createAppPermission","sdkTransformError","listAppPermissions","deleteAppPermission"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.universal.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.http.ts"],"sourcesContent":["export * from './src/devcenter-apps-v1-app-permission-app-permissions.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 ambassadorWixDevcenterAppsV1AppPermission from './devcenter-apps-v1-app-permission-app-permissions.http.js';\n\nexport interface AppPermission {\n /**\n * App ID.\n *\n * You can find the app ID in the app's dashboard's [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home).\n * @format GUID\n */\n appId?: string;\n /**\n * Permission the app requests when installed on a site.\n *\n * Learn more [about permissions for Wix apps](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n permission?: V1Permission;\n /**\n * When the permission was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * When the permission was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport interface V1Permission {\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface CreateAppPermissionRequest {\n /** Permission to add to the specified app. */\n appPermission: AppPermission;\n}\n\nexport interface CreateAppPermissionResponse {\n /** Details of permission that was added to the app. */\n appPermission?: AppPermission;\n}\n\nexport interface GetAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface GetAppPermissionResponse {\n /** Details of the retrieved app permission. */\n appPermission?: AppPermission;\n}\n\nexport interface ListAppPermissionsRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Whether to retrieve the most recent permissions information. This decreases performance but ensures that the retrieved information is up-to-date, even immediately after an update.\n *\n * Default: `false`.\n */\n consistent?: boolean;\n /** Paging configuration. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListAppPermissionsResponse {\n /** List of permissions for the specified app. */\n appPermissions?: AppPermission[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DeleteAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId: string;\n}\n\nexport interface DeleteAppPermissionResponse {}\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 Empty {}\n\nexport interface OldPermissionChangedEvent {\n /** @format GUID */\n appId?: string;\n permission?: Permission;\n action?: ActionWithLiterals;\n}\n\nexport interface Permission {\n permissionId?: string;\n}\n\nexport enum Action {\n CREATED = 'CREATED',\n UPDATED = 'UPDATED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals = Action | 'CREATED' | 'UPDATED' | 'DELETED';\n\nexport interface CloneAppPermissionsRequest {\n /**\n * Source app ID to clone permissions from.\n * @format GUID\n */\n sourceAppId?: string;\n /**\n * Target app ID to clone permissions to.\n * @format GUID\n */\n targetAppId?: string;\n}\n\nexport interface CloneAppPermissionsResponse {}\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\n/**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param appPermission - Permission to add to the specified app.\n * @public\n * @requiredField appPermission\n * @requiredField appPermission.appId\n * @requiredField appPermission.permission\n * @requiredField appPermission.permission.permissionId\n * @permissionId DEV_CENTER.CREATE_APP_PERMISSION\n * @applicableIdentity APP\n * @returns Details of permission that was added to the app.\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission\n */\nexport async function createAppPermission(\n appPermission: NonNullablePaths<\n AppPermission,\n `appId` | `permission` | `permission.permissionId`,\n 3\n >\n): Promise<\n NonNullablePaths<AppPermission, `appId` | `permission.permissionId`, 3>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n appPermission: appPermission,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.createAppPermission(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.appPermission!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { appPermission: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['appPermission']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n * @param appId - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @public\n * @requiredField appId\n * @permissionId DEV_CENTER.READ_APP_PERMISSIONS\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.ListAppPermissions\n */\nexport async function listAppPermissions(\n appId: string,\n options?: ListAppPermissionsOptions\n): Promise<\n NonNullablePaths<\n ListAppPermissionsResponse,\n | `appPermissions`\n | `appPermissions.${number}.appId`\n | `appPermissions.${number}.permission.permissionId`,\n 5\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 appId: appId,\n consistent: options?.consistent,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.listAppPermissions(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 appId: '$[0]',\n consistent: '$[1].consistent',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['appId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListAppPermissionsOptions {\n /**\n * Whether to retrieve the most recent permissions information. This decreases performance but ensures that the retrieved information is up-to-date, even immediately after an update.\n *\n * Default: `false`.\n */\n consistent?: boolean;\n /** Paging configuration. */\n paging?: CursorPaging;\n}\n\n/**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n * @param appId - App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @param permissionId - Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @public\n * @requiredField appId\n * @requiredField permissionId\n * @permissionId DEV_CENTER.DELETE_APP_PERMISSION\n * @applicableIdentity APP\n * @fqn wix.devcenter.apps.permissions.v1.AppPermissionsService.DeleteAppPermission\n */\nexport async function deleteAppPermission(\n appId: string,\n permissionId: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n appId: appId,\n permissionId: permissionId,\n });\n\n const reqOpts =\n ambassadorWixDevcenterAppsV1AppPermission.deleteAppPermission(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: { appId: '$[0]', permissionId: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['appId', 'permissionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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 resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'dev._base_domain_': [\n {\n srcPath: '/app-permissions-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps/v1/app-permissions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-permissions';\n\n/**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function createAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __createAppPermission({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createAppPermission;\n}\n\n/**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n */\nexport function listAppPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'GET' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.ListAppPermissions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\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: 'appPermissions.createdDate' },\n { path: 'appPermissions.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPermissions;\n}\n\n/**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function deleteAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteAppPermission({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.DeleteAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return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AAC;AAED,QAAM,UACsC,mBAAmB,OAAO;AAEtE,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,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,YAAY;AAAA,UACZ,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAgCA,eAAsBE,qBACpB,OACA,cACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,UACsC,oBAAoB,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,QAAQ,cAAc,OAAO;AAAA,QAChE,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,cAAc;AAAA,IAC1B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createAppPermission","deleteAppPermission","listAppPermissions","import_timestamp","import_rest_modules","payload","Action","WebhookIdentityType","createAppPermission","sdkTransformError","listAppPermissions","deleteAppPermission"]}
@@ -229,6 +229,20 @@ declare enum Action {
229
229
  }
230
230
  /** @enumType */
231
231
  type ActionWithLiterals = Action | 'CREATED' | 'UPDATED' | 'DELETED';
232
+ interface CloneAppPermissionsRequest {
233
+ /**
234
+ * Source app ID to clone permissions from.
235
+ * @format GUID
236
+ */
237
+ sourceAppId?: string;
238
+ /**
239
+ * Target app ID to clone permissions to.
240
+ * @format GUID
241
+ */
242
+ targetAppId?: string;
243
+ }
244
+ interface CloneAppPermissionsResponse {
245
+ }
232
246
  interface MessageEnvelope {
233
247
  /**
234
248
  * App instance ID.
@@ -316,4 +330,4 @@ declare function createAppPermission(): __PublicMethodMetaInfo<'POST', {}, Creat
316
330
  declare function listAppPermissions(): __PublicMethodMetaInfo<'GET', {}, ListAppPermissionsRequest$1, ListAppPermissionsRequest, ListAppPermissionsResponse$1, ListAppPermissionsResponse>;
317
331
  declare function deleteAppPermission(): __PublicMethodMetaInfo<'DELETE', {}, DeleteAppPermissionRequest$1, DeleteAppPermissionRequest, DeleteAppPermissionResponse$1, DeleteAppPermissionResponse>;
318
332
 
319
- export { type ActionEvent as ActionEventOriginal, Action as ActionOriginal, type ActionWithLiterals as ActionWithLiteralsOriginal, type AppPermission as AppPermissionOriginal, type CreateAppPermissionRequest as CreateAppPermissionRequestOriginal, type CreateAppPermissionResponse as CreateAppPermissionResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type DeleteAppPermissionRequest as DeleteAppPermissionRequestOriginal, type DeleteAppPermissionResponse as DeleteAppPermissionResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetAppPermissionRequest as GetAppPermissionRequestOriginal, type GetAppPermissionResponse as GetAppPermissionResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListAppPermissionsRequest as ListAppPermissionsRequestOriginal, type ListAppPermissionsResponse as ListAppPermissionsResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type OldPermissionChangedEvent as OldPermissionChangedEventOriginal, type Permission as PermissionOriginal, type RestoreInfo as RestoreInfoOriginal, type V1Permission as V1PermissionOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createAppPermission, deleteAppPermission, listAppPermissions };
333
+ export { type ActionEvent as ActionEventOriginal, Action as ActionOriginal, type ActionWithLiterals as ActionWithLiteralsOriginal, type AppPermission as AppPermissionOriginal, type CloneAppPermissionsRequest as CloneAppPermissionsRequestOriginal, type CloneAppPermissionsResponse as CloneAppPermissionsResponseOriginal, type CreateAppPermissionRequest as CreateAppPermissionRequestOriginal, type CreateAppPermissionResponse as CreateAppPermissionResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type DeleteAppPermissionRequest as DeleteAppPermissionRequestOriginal, type DeleteAppPermissionResponse as DeleteAppPermissionResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetAppPermissionRequest as GetAppPermissionRequestOriginal, type GetAppPermissionResponse as GetAppPermissionResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListAppPermissionsRequest as ListAppPermissionsRequestOriginal, type ListAppPermissionsResponse as ListAppPermissionsResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type OldPermissionChangedEvent as OldPermissionChangedEventOriginal, type Permission as PermissionOriginal, type RestoreInfo as RestoreInfoOriginal, type V1Permission as V1PermissionOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createAppPermission, deleteAppPermission, listAppPermissions };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.http.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.types.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.meta.ts"],"sourcesContent":["export * from './src/devcenter-apps-v1-app-permission-app-permissions.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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 resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'dev._base_domain_': [\n {\n srcPath: '/app-permissions-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps/v1/app-permissions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-permissions';\n\n/**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function createAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __createAppPermission({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createAppPermission;\n}\n\n/**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n */\nexport function listAppPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'GET' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.ListAppPermissions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\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: 'appPermissions.createdDate' },\n { path: 'appPermissions.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPermissions;\n}\n\n/**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function deleteAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteAppPermission({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.DeleteAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteAppPermission;\n}\n","export interface AppPermission {\n /**\n * App ID.\n *\n * You can find the app ID in the app's dashboard's [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home).\n * @format GUID\n */\n appId?: string;\n /**\n * Permission the app requests when installed on a site.\n *\n * Learn more [about permissions for Wix apps](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n permission?: V1Permission;\n /**\n * When the permission was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * When the permission was last updated.\n * @readonly\n */\n updatedDate?: Date | null;\n}\n\nexport interface V1Permission {\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface CreateAppPermissionRequest {\n /** Permission to add to the specified app. */\n appPermission: AppPermission;\n}\n\nexport interface CreateAppPermissionResponse {\n /** Details of permission that was added to the app. */\n appPermission?: AppPermission;\n}\n\nexport interface GetAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface GetAppPermissionResponse {\n /** Details of the retrieved app permission. */\n appPermission?: AppPermission;\n}\n\nexport interface ListAppPermissionsRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Whether to retrieve the most recent permissions information. This decreases performance but ensures that the retrieved information is up-to-date, even immediately after an update.\n *\n * Default: `false`.\n */\n consistent?: boolean;\n /** Paging configuration. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListAppPermissionsResponse {\n /** List of permissions for the specified app. */\n appPermissions?: AppPermission[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DeleteAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId: string;\n}\n\nexport interface DeleteAppPermissionResponse {}\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 entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface Empty {}\n\nexport interface OldPermissionChangedEvent {\n /** @format GUID */\n appId?: string;\n permission?: Permission;\n action?: ActionWithLiterals;\n}\n\nexport interface Permission {\n permissionId?: string;\n}\n\nexport enum Action {\n CREATED = 'CREATED',\n UPDATED = 'UPDATED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals = Action | 'CREATED' | 'UPDATED' | 'DELETED';\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","import * as ambassadorWixDevcenterAppsV1AppPermission from './devcenter-apps-v1-app-permission-app-permissions.http.js';\nimport * as ambassadorWixDevcenterAppsV1AppPermissionTypes from './devcenter-apps-v1-app-permission-app-permissions.types.js';\nimport * as ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes from './devcenter-apps-v1-app-permission-app-permissions.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 createAppPermission(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.CreateAppPermissionRequest,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.CreateAppPermissionRequest,\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.CreateAppPermissionResponse,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.CreateAppPermissionResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterAppsV1AppPermission.createAppPermission(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-permissions',\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 listAppPermissions(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.ListAppPermissionsRequest,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.ListAppPermissionsRequest,\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.ListAppPermissionsResponse,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.ListAppPermissionsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterAppsV1AppPermission.listAppPermissions(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-permissions',\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 deleteAppPermission(): __PublicMethodMetaInfo<\n 'DELETE',\n {},\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.DeleteAppPermissionRequest,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.DeleteAppPermissionRequest,\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.DeleteAppPermissionResponse,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.DeleteAppPermissionResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterAppsV1AppPermission.deleteAppPermission(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/app-permissions',\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 {\n AppPermission as AppPermissionOriginal,\n V1Permission as V1PermissionOriginal,\n CreateAppPermissionRequest as CreateAppPermissionRequestOriginal,\n CreateAppPermissionResponse as CreateAppPermissionResponseOriginal,\n GetAppPermissionRequest as GetAppPermissionRequestOriginal,\n GetAppPermissionResponse as GetAppPermissionResponseOriginal,\n ListAppPermissionsRequest as ListAppPermissionsRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n ListAppPermissionsResponse as ListAppPermissionsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n DeleteAppPermissionRequest as DeleteAppPermissionRequestOriginal,\n DeleteAppPermissionResponse as DeleteAppPermissionResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n OldPermissionChangedEvent as OldPermissionChangedEventOriginal,\n Permission as PermissionOriginal,\n Action as ActionOriginal,\n ActionWithLiterals as ActionWithLiteralsOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './devcenter-apps-v1-app-permission-app-permissions.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,0BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;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,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;A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A,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,sBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACsC,mBAAmB,OAAO;AAEtE,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,uBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACsC,oBAAoB,OAAO;AAEvE,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":["createAppPermission","deleteAppPermission","listAppPermissions","import_timestamp","import_rest_modules","payload","Action","WebhookIdentityType","createAppPermission","listAppPermissions","deleteAppPermission"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.http.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.types.ts","../../src/devcenter-apps-v1-app-permission-app-permissions.meta.ts"],"sourcesContent":["export * from './src/devcenter-apps-v1-app-permission-app-permissions.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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 resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'dev._base_domain_': [\n {\n srcPath: '/app-permissions-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/apps/v1/app-permissions',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/app-permissions-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_app-management_app-permissions';\n\n/**\n * Adds a permission to the specified app.\n *\n * When users install your app on a site, it requests this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function createAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __createAppPermission({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'POST' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.CreateAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'appPermission.createdDate' },\n { path: 'appPermission.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createAppPermission;\n}\n\n/**\n * Lists all permissions for the specified app.\n *\n * These are the permissions your app requests when users install it on a site.\n */\nexport function listAppPermissions(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAppPermissions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'GET' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.ListAppPermissions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\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: 'appPermissions.createdDate' },\n { path: 'appPermissions.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listAppPermissions;\n}\n\n/**\n * Deletes a permission from the specified app.\n *\n * After deleting a permission, your app no longer requests it when users install it on a site. As a result, the app can no longer make calls to APIs that require this permission.\n *\n * > **Important**: Disregard the **Authentication** note below. You can only call this method by authenticating with an account-level [API key](https://dev.wix.com/docs/rest/articles/get-started/api-keys).\n */\nexport function deleteAppPermission(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteAppPermission({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.devcenter.apps.v1.app_permission',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.devcenter.apps.permissions.v1.AppPermissionsService.DeleteAppPermission',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDevcenterAppsPermissionsV1AppPermissionsServiceUrl({\n protoPath: '/v1/app-permissions',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteAppPermission;\n}\n","export interface AppPermission {\n /**\n * App ID.\n *\n * You can find the app ID in the app's dashboard's [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home).\n * @format GUID\n */\n appId?: string;\n /**\n * Permission the app requests when installed on a site.\n *\n * Learn more [about permissions for Wix apps](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).\n */\n permission?: V1Permission;\n /**\n * When the permission was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * When the permission was last updated.\n * @readonly\n */\n updatedDate?: Date | null;\n}\n\nexport interface V1Permission {\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface CreateAppPermissionRequest {\n /** Permission to add to the specified app. */\n appPermission: AppPermission;\n}\n\nexport interface CreateAppPermissionResponse {\n /** Details of permission that was added to the app. */\n appPermission?: AppPermission;\n}\n\nexport interface GetAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId?: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId?: string;\n}\n\nexport interface GetAppPermissionResponse {\n /** Details of the retrieved app permission. */\n appPermission?: AppPermission;\n}\n\nexport interface ListAppPermissionsRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Whether to retrieve the most recent permissions information. This decreases performance but ensures that the retrieved information is up-to-date, even immediately after an update.\n *\n * Default: `false`.\n */\n consistent?: boolean;\n /** Paging configuration. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListAppPermissionsResponse {\n /** List of permissions for the specified app. */\n appPermissions?: AppPermission[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DeleteAppPermissionRequest {\n /**\n * App ID.\n *\n * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.\n * @format GUID\n */\n appId: string;\n /**\n * Permission ID.\n *\n * To find the permission ID, navigate to the [Permissions page](https://dev.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions/add) in the app's dashboard and search for the [permission you want to configure](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app#step-1--identify-required-permissions).\n * @minLength 1\n * @maxLength 164\n */\n permissionId: string;\n}\n\nexport interface DeleteAppPermissionResponse {}\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 entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface Empty {}\n\nexport interface OldPermissionChangedEvent {\n /** @format GUID */\n appId?: string;\n permission?: Permission;\n action?: ActionWithLiterals;\n}\n\nexport interface Permission {\n permissionId?: string;\n}\n\nexport enum Action {\n CREATED = 'CREATED',\n UPDATED = 'UPDATED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type ActionWithLiterals = Action | 'CREATED' | 'UPDATED' | 'DELETED';\n\nexport interface CloneAppPermissionsRequest {\n /**\n * Source app ID to clone permissions from.\n * @format GUID\n */\n sourceAppId?: string;\n /**\n * Target app ID to clone permissions to.\n * @format GUID\n */\n targetAppId?: string;\n}\n\nexport interface CloneAppPermissionsResponse {}\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","import * as ambassadorWixDevcenterAppsV1AppPermission from './devcenter-apps-v1-app-permission-app-permissions.http.js';\nimport * as ambassadorWixDevcenterAppsV1AppPermissionTypes from './devcenter-apps-v1-app-permission-app-permissions.types.js';\nimport * as ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes from './devcenter-apps-v1-app-permission-app-permissions.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 createAppPermission(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.CreateAppPermissionRequest,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.CreateAppPermissionRequest,\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.CreateAppPermissionResponse,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.CreateAppPermissionResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterAppsV1AppPermission.createAppPermission(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-permissions',\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 listAppPermissions(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.ListAppPermissionsRequest,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.ListAppPermissionsRequest,\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.ListAppPermissionsResponse,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.ListAppPermissionsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterAppsV1AppPermission.listAppPermissions(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-permissions',\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 deleteAppPermission(): __PublicMethodMetaInfo<\n 'DELETE',\n {},\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.DeleteAppPermissionRequest,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.DeleteAppPermissionRequest,\n ambassadorWixDevcenterAppsV1AppPermissionUniversalTypes.DeleteAppPermissionResponse,\n ambassadorWixDevcenterAppsV1AppPermissionTypes.DeleteAppPermissionResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixDevcenterAppsV1AppPermission.deleteAppPermission(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/app-permissions',\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 {\n AppPermission as AppPermissionOriginal,\n V1Permission as V1PermissionOriginal,\n CreateAppPermissionRequest as CreateAppPermissionRequestOriginal,\n CreateAppPermissionResponse as CreateAppPermissionResponseOriginal,\n GetAppPermissionRequest as GetAppPermissionRequestOriginal,\n GetAppPermissionResponse as GetAppPermissionResponseOriginal,\n ListAppPermissionsRequest as ListAppPermissionsRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n ListAppPermissionsResponse as ListAppPermissionsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n DeleteAppPermissionRequest as DeleteAppPermissionRequestOriginal,\n DeleteAppPermissionResponse as DeleteAppPermissionResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n OldPermissionChangedEvent as OldPermissionChangedEventOriginal,\n Permission as PermissionOriginal,\n Action as ActionOriginal,\n ActionWithLiterals as ActionWithLiteralsOriginal,\n CloneAppPermissionsRequest as CloneAppPermissionsRequestOriginal,\n CloneAppPermissionsResponse as CloneAppPermissionsResponseOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './devcenter-apps-v1-app-permission-app-permissions.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,0BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,6DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;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,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AASd,SAAS,oBACd,SAC4B;AAC5B,WAAS,sBAAsB,EAAE,KAAK,GAAQ;AAC5C,UAAM,qBAA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T;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,uBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACsC,oBAAoB,OAAO;AAEvE,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":["createAppPermission","deleteAppPermission","listAppPermissions","import_timestamp","import_rest_modules","payload","Action","WebhookIdentityType","createAppPermission","listAppPermissions","deleteAppPermission"]}
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
2
  import { AppPermission, ListAppPermissionsOptions, ListAppPermissionsResponse } from './index.typings.mjs';
3
- export { Action, ActionEvent, ActionWithLiterals, CreateAppPermissionRequest, CreateAppPermissionResponse, CursorPaging, CursorPagingMetadata, Cursors, DeleteAppPermissionRequest, DeleteAppPermissionResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetAppPermissionRequest, GetAppPermissionResponse, IdentificationData, IdentificationDataIdOneOf, ListAppPermissionsRequest, MessageEnvelope, OldPermissionChangedEvent, Permission, RestoreInfo, V1Permission, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
3
+ export { Action, ActionEvent, ActionWithLiterals, CloneAppPermissionsRequest, CloneAppPermissionsResponse, CreateAppPermissionRequest, CreateAppPermissionResponse, CursorPaging, CursorPagingMetadata, Cursors, DeleteAppPermissionRequest, DeleteAppPermissionResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetAppPermissionRequest, GetAppPermissionResponse, IdentificationData, IdentificationDataIdOneOf, ListAppPermissionsRequest, MessageEnvelope, OldPermissionChangedEvent, Permission, RestoreInfo, V1Permission, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
4
4
 
5
5
  declare function createAppPermission$1(httpClient: HttpClient): CreateAppPermissionSignature;
6
6
  interface CreateAppPermissionSignature {