@wix/auto_sdk_instagram_accounts 1.0.8 → 1.0.9

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.
Files changed (38) hide show
  1. package/build/cjs/index.d.ts +2 -2
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +41 -2
  4. package/build/cjs/index.typings.js.map +1 -1
  5. package/build/cjs/meta.d.ts +39 -0
  6. package/build/cjs/meta.js.map +1 -1
  7. package/build/cjs/schemas.d.ts +50 -0
  8. package/build/cjs/schemas.js +121 -0
  9. package/build/cjs/schemas.js.map +1 -0
  10. package/build/es/index.d.mts +2 -2
  11. package/build/es/index.mjs.map +1 -1
  12. package/build/es/index.typings.d.mts +41 -2
  13. package/build/es/index.typings.mjs.map +1 -1
  14. package/build/es/meta.d.mts +39 -0
  15. package/build/es/meta.mjs.map +1 -1
  16. package/build/es/schemas.d.mts +50 -0
  17. package/build/es/schemas.mjs +77 -0
  18. package/build/es/schemas.mjs.map +1 -0
  19. package/build/internal/cjs/index.d.ts +2 -2
  20. package/build/internal/cjs/index.js.map +1 -1
  21. package/build/internal/cjs/index.typings.d.ts +41 -2
  22. package/build/internal/cjs/index.typings.js.map +1 -1
  23. package/build/internal/cjs/meta.d.ts +39 -0
  24. package/build/internal/cjs/meta.js.map +1 -1
  25. package/build/internal/cjs/schemas.d.ts +50 -0
  26. package/build/internal/cjs/schemas.js +121 -0
  27. package/build/internal/cjs/schemas.js.map +1 -0
  28. package/build/internal/es/index.d.mts +2 -2
  29. package/build/internal/es/index.mjs.map +1 -1
  30. package/build/internal/es/index.typings.d.mts +41 -2
  31. package/build/internal/es/index.typings.mjs.map +1 -1
  32. package/build/internal/es/meta.d.mts +39 -0
  33. package/build/internal/es/meta.mjs.map +1 -1
  34. package/build/internal/es/schemas.d.mts +50 -0
  35. package/build/internal/es/schemas.mjs +77 -0
  36. package/build/internal/es/schemas.mjs.map +1 -0
  37. package/package.json +12 -5
  38. package/schemas/package.json +3 -0
@@ -28,7 +28,7 @@ interface GetInstagramAccountSignature {
28
28
  * @param - connection id
29
29
  * @returns instagram account information
30
30
  */
31
- (connectionId: string): Promise<NonNullablePaths<InstagramAccount, `_id` | `instagramInfo.instagramId` | `instagramInfo.instagramUsername`, 3>>;
31
+ (connectionId: string): Promise<NonNullablePaths<InstagramAccount, `_id` | `instagramInfo.instagramId` | `instagramInfo.instagramUsername` | `instagramInfo.profilePictureUrl`, 3>>;
32
32
  }
33
33
  declare function listInstagramAccounts$1(httpClient: HttpClient): ListInstagramAccountsSignature;
34
34
  interface ListInstagramAccountsSignature {
@@ -37,7 +37,7 @@ interface ListInstagramAccountsSignature {
37
37
  *
38
38
  * Returns list of instagram user ids connected to app instance.
39
39
  */
40
- (): Promise<NonNullablePaths<ListInstagramAccountsResponse, `instagramAccounts` | `instagramAccounts.${number}._id` | `instagramAccounts.${number}.instagramInfo.instagramId` | `instagramAccounts.${number}.instagramInfo.instagramUsername`, 5>>;
40
+ (): Promise<NonNullablePaths<ListInstagramAccountsResponse, `instagramAccounts` | `instagramAccounts.${number}._id` | `instagramAccounts.${number}.instagramInfo.instagramId` | `instagramAccounts.${number}.instagramInfo.instagramUsername` | `instagramAccounts.${number}.instagramInfo.profilePictureUrl`, 5>>;
41
41
  }
42
42
  declare const onInstagramAccountDeleted$1: EventDefinition<InstagramAccountDeletedEnvelope, "wix.instagram_feed.v1.instagram_account_deleted">;
43
43
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/instagram-feed-v1-instagram-account-accounts.public.ts","../../src/instagram-feed-v1-instagram-account-accounts.universal.ts","../../src/instagram-feed-v1-instagram-account-accounts.http.ts","../../src/instagram-feed-v1-instagram-account-accounts.context.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-account-accounts.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n InitiateAccountConnectionResponse,\n InstagramAccount,\n InstagramAccountDeletedEnvelope,\n ListInstagramAccountsResponse,\n disconnectAccount as universalDisconnectAccount,\n getInstagramAccount as universalGetInstagramAccount,\n initiateAccountConnection as universalInitiateAccountConnection,\n listInstagramAccounts as universalListInstagramAccounts,\n} from './instagram-feed-v1-instagram-account-accounts.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/instagram' };\n\nexport function initiateAccountConnection(\n httpClient: HttpClient\n): InitiateAccountConnectionSignature {\n return () =>\n universalInitiateAccountConnection(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface InitiateAccountConnectionSignature {\n /**\n * Retrieve hash needed for connection of instagram account to a site.\n */\n (): Promise<\n NonNullablePaths<InitiateAccountConnectionResponse, `connectionParams`, 2>\n >;\n}\n\nexport function disconnectAccount(\n httpClient: HttpClient\n): DisconnectAccountSignature {\n return (connectionId: string) =>\n universalDisconnectAccount(\n connectionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DisconnectAccountSignature {\n /**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n * @param - connection id to be disconnected\n */\n (connectionId: string): Promise<void>;\n}\n\nexport function getInstagramAccount(\n httpClient: HttpClient\n): GetInstagramAccountSignature {\n return (connectionId: string) =>\n universalGetInstagramAccount(\n connectionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetInstagramAccountSignature {\n /**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n * @param - connection id\n * @returns instagram account information\n */\n (connectionId: string): Promise<\n NonNullablePaths<\n InstagramAccount,\n `_id` | `instagramInfo.instagramId` | `instagramInfo.instagramUsername`,\n 3\n >\n >;\n}\n\nexport function listInstagramAccounts(\n httpClient: HttpClient\n): ListInstagramAccountsSignature {\n return () =>\n universalListInstagramAccounts(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListInstagramAccountsSignature {\n /**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n */\n (): Promise<\n NonNullablePaths<\n ListInstagramAccountsResponse,\n | `instagramAccounts`\n | `instagramAccounts.${number}._id`\n | `instagramAccounts.${number}.instagramInfo.instagramId`\n | `instagramAccounts.${number}.instagramInfo.instagramUsername`,\n 5\n >\n >;\n}\n\nexport const onInstagramAccountDeleted = EventDefinition(\n 'wix.instagram_feed.v1.instagram_account_deleted',\n true,\n (event: InstagramAccountDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<InstagramAccountDeletedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n BaseEventMetadata,\n ChangeTokenExpirationDateRequest,\n ChangeTokenExpirationDateResponse,\n ConnectAccountByTokenRequest,\n ConnectAccountByTokenResponse,\n CreateAccountRequest,\n CreateAccountResponse,\n DisconnectAccountRequest,\n DisconnectAccountResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetInstagramAccountRequest,\n GetInstagramAccountResponse,\n GetLongLivedTokenRequest,\n GetLongLivedTokenResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n InitiateAccountConnectionRequest,\n InitiateAccountConnectionResponse,\n InstagramAccount,\n InstagramAccountDeletedEnvelope,\n InstagramInfo,\n ListInstagramAccountsRequest,\n ListInstagramAccountsResponse,\n MessageEnvelope,\n RestoreInfo,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-account-accounts.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 ambassadorWixInstagramFeedV1InstagramAccount from './instagram-feed-v1-instagram-account-accounts.http.js';\n\nexport interface InstagramAccount {\n /**\n * The id of the connection\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * The revision of the connection\n * @readonly\n */\n revision?: string | null;\n /** The instagram info connected to */\n instagramInfo?: InstagramInfo;\n /** True - account is synchronized with the Meta API. False - in last successful state */\n synchronized?: boolean | null;\n}\n\nexport interface InstagramInfo {\n /**\n * The id of the instagram user\n * @immutable\n * @maxLength 30\n */\n instagramId?: string;\n /**\n * The username of the instagram user\n * @readonly\n * @maxLength 500\n */\n instagramUsername?: string;\n}\n\nexport interface InitiateAccountConnectionRequest {}\n\nexport interface InitiateAccountConnectionResponse {\n /**\n * State parameter for authorization callback\n * @maxLength 256\n */\n connectionParams?: string[];\n}\n\nexport interface CreateAccountRequest {\n /**\n * connection id\n * @readonly\n * @maxLength 256\n */\n authorizationCode?: string;\n /**\n * redirect url\n * @maxLength 256\n */\n redirectUrl?: string;\n}\n\nexport interface CreateAccountResponse {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface DisconnectAccountRequest {\n /**\n * connection id to be disconnected\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface DisconnectAccountResponse {}\n\nexport interface GetInstagramAccountRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface GetInstagramAccountResponse {\n /** instagram account information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ListInstagramAccountsRequest {}\n\nexport interface ListInstagramAccountsResponse {\n /** instagram account profile information */\n instagramAccounts?: InstagramAccount[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface ConnectAccountByTokenRequest {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n accessToken?: string;\n}\n\nexport interface ConnectAccountByTokenResponse {\n /** instagram account profile information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ChangeTokenExpirationDateRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** new expiration date */\n expirationDate?: Date | null;\n}\n\nexport interface ChangeTokenExpirationDateResponse {}\n\nexport interface GetLongLivedTokenRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface GetLongLivedTokenResponse {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n token?: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface InstagramAccountDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/** @permissionScope Instagram external scope\n * @permissionScopeId SCOPE.GROUPS.INSTAGRAM_ACCOUNTS\n * @permissionId INSTAGRAM_ACCOUNTS.GET_PROFILE\n * @webhook\n * @eventType wix.instagram_feed.v1.instagram_account_deleted\n * @serviceIdentifier wix.instagram.v1.InstagramAccountService\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onInstagramAccountDeleted(\n handler: (event: InstagramAccountDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieve hash needed for connection of instagram account to a site.\n * @public\n * @documentationMaturity preview\n * @permissionId INSTAGRAM_ACCOUNTS.INITIATE_CONNECTION\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.InitiateAccountConnection\n */\nexport async function initiateAccountConnection(): Promise<\n NonNullablePaths<InitiateAccountConnectionResponse, `connectionParams`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.initiateAccountConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n * @param connectionId - connection id to be disconnected\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.DISCONNECT\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.DisconnectAccount\n */\nexport async function disconnectAccount(connectionId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.disconnectAccount(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: { connectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n * @param connectionId - connection id\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_PROFILE\n * @applicableIdentity APP\n * @returns instagram account information\n * @fqn wix.instagram.v1.InstagramAccountService.GetInstagramAccount\n */\nexport async function getInstagramAccount(\n connectionId: string\n): Promise<\n NonNullablePaths<\n InstagramAccount,\n `_id` | `instagramInfo.instagramId` | `instagramInfo.instagramUsername`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.getInstagramAccount(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 ?.instagramAccount!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { connectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n * @public\n * @documentationMaturity preview\n * @permissionId INSTAGRAM_ACCOUNTS.LIST_PROFILES\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.ListInstagramAccounts\n */\nexport async function listInstagramAccounts(): Promise<\n NonNullablePaths<\n ListInstagramAccountsResponse,\n | `instagramAccounts`\n | `instagramAccounts.${number}._id`\n | `instagramAccounts.${number}.instagramInfo.instagramId`\n | `instagramAccounts.${number}.instagramInfo.instagramUsername`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.listInstagramAccounts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'instagram_integration.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n {\n srcPath: '/_api/instagram-accounts',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_instagram_accounts';\n\n/** Retrieve hash needed for connection of instagram account to a site. */\nexport function initiateAccountConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __initiateAccountConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.InitiateAccountConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/initiate-connection',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __initiateAccountConnection;\n}\n\n/**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n */\nexport function disconnectAccount(payload: object): RequestOptionsFactory<any> {\n function __disconnectAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'DELETE' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.DisconnectAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __disconnectAccount;\n}\n\n/**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n */\nexport function getInstagramAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __getInstagramAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.GetInstagramAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getInstagramAccount;\n}\n\n/**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n */\nexport function listInstagramAccounts(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccounts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.ListInstagramAccounts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listInstagramAccounts;\n}\n","import {\n initiateAccountConnection as publicInitiateAccountConnection,\n disconnectAccount as publicDisconnectAccount,\n getInstagramAccount as publicGetInstagramAccount,\n listInstagramAccounts as publicListInstagramAccounts,\n} from './instagram-feed-v1-instagram-account-accounts.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onInstagramAccountDeleted as publicOnInstagramAccountDeleted } from './instagram-feed-v1-instagram-account-accounts.public.js';\n\nexport const initiateAccountConnection: MaybeContext<\n BuildRESTFunction<typeof publicInitiateAccountConnection> &\n typeof publicInitiateAccountConnection\n> = /*#__PURE__*/ createRESTModule(publicInitiateAccountConnection);\nexport const disconnectAccount: MaybeContext<\n BuildRESTFunction<typeof publicDisconnectAccount> &\n typeof publicDisconnectAccount\n> = /*#__PURE__*/ createRESTModule(publicDisconnectAccount);\nexport const getInstagramAccount: MaybeContext<\n BuildRESTFunction<typeof publicGetInstagramAccount> &\n typeof publicGetInstagramAccount\n> = /*#__PURE__*/ createRESTModule(publicGetInstagramAccount);\nexport const listInstagramAccounts: MaybeContext<\n BuildRESTFunction<typeof publicListInstagramAccounts> &\n typeof publicListInstagramAccounts\n> = /*#__PURE__*/ createRESTModule(publicListInstagramAccounts);\n/** */\nexport const onInstagramAccountDeleted: BuildEventDefinition<\n typeof publicOnInstagramAccountDeleted\n> &\n typeof publicOnInstagramAccountDeleted = createEventModule(\n publicOnInstagramAccountDeleted\n);\n\nexport { WebhookIdentityType } from './instagram-feed-v1-instagram-account-accounts.universal.js';\nexport {\n InstagramAccount,\n InstagramInfo,\n InitiateAccountConnectionRequest,\n InitiateAccountConnectionResponse,\n CreateAccountRequest,\n CreateAccountResponse,\n DisconnectAccountRequest,\n DisconnectAccountResponse,\n GetInstagramAccountRequest,\n GetInstagramAccountResponse,\n ListInstagramAccountsRequest,\n ListInstagramAccountsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n ConnectAccountByTokenRequest,\n ConnectAccountByTokenResponse,\n ChangeTokenExpirationDateRequest,\n ChangeTokenExpirationDateResponse,\n GetLongLivedTokenRequest,\n GetLongLivedTokenResponse,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n InstagramAccountDeletedEnvelope,\n} from './instagram-feed-v1-instagram-account-accounts.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './instagram-feed-v1-instagram-account-accounts.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,iCAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAAqD;AACrD,6BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,gDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;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;AACJ;AAWO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CAAC,iBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,SAASC,qBACd,YAC8B;AAC9B,SAAO,CAAC,iBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,SAASC,uBACd,YACgC;AAChC,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAoBO,IAAM,gCAA4B;AAAA,EACvC;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,uCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAmC;;;AGvHnC,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,yBAGK,2DAAiBA,sBAA2B;AAEvD,IAAMC,iCAG8B;AAAA,EACzC;AACF;","names":["disconnectAccount","getInstagramAccount","initiateAccountConnection","listInstagramAccounts","onInstagramAccountDeleted","import_rename_all_nested_keys","import_rest_modules","WebhookIdentityType","initiateAccountConnection","sdkTransformError","disconnectAccount","getInstagramAccount","listInstagramAccounts","initiateAccountConnection","disconnectAccount","getInstagramAccount","listInstagramAccounts","import_rest_modules","initiateAccountConnection","disconnectAccount","getInstagramAccount","listInstagramAccounts","onInstagramAccountDeleted"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/instagram-feed-v1-instagram-account-accounts.public.ts","../../src/instagram-feed-v1-instagram-account-accounts.universal.ts","../../src/instagram-feed-v1-instagram-account-accounts.http.ts","../../src/instagram-feed-v1-instagram-account-accounts.context.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-account-accounts.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n InitiateAccountConnectionResponse,\n InstagramAccount,\n InstagramAccountDeletedEnvelope,\n ListInstagramAccountsResponse,\n disconnectAccount as universalDisconnectAccount,\n getInstagramAccount as universalGetInstagramAccount,\n initiateAccountConnection as universalInitiateAccountConnection,\n listInstagramAccounts as universalListInstagramAccounts,\n} from './instagram-feed-v1-instagram-account-accounts.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/instagram' };\n\nexport function initiateAccountConnection(\n httpClient: HttpClient\n): InitiateAccountConnectionSignature {\n return () =>\n universalInitiateAccountConnection(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface InitiateAccountConnectionSignature {\n /**\n * Retrieve hash needed for connection of instagram account to a site.\n */\n (): Promise<\n NonNullablePaths<InitiateAccountConnectionResponse, `connectionParams`, 2>\n >;\n}\n\nexport function disconnectAccount(\n httpClient: HttpClient\n): DisconnectAccountSignature {\n return (connectionId: string) =>\n universalDisconnectAccount(\n connectionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DisconnectAccountSignature {\n /**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n * @param - connection id to be disconnected\n */\n (connectionId: string): Promise<void>;\n}\n\nexport function getInstagramAccount(\n httpClient: HttpClient\n): GetInstagramAccountSignature {\n return (connectionId: string) =>\n universalGetInstagramAccount(\n connectionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetInstagramAccountSignature {\n /**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n * @param - connection id\n * @returns instagram account information\n */\n (connectionId: string): Promise<\n NonNullablePaths<\n InstagramAccount,\n | `_id`\n | `instagramInfo.instagramId`\n | `instagramInfo.instagramUsername`\n | `instagramInfo.profilePictureUrl`,\n 3\n >\n >;\n}\n\nexport function listInstagramAccounts(\n httpClient: HttpClient\n): ListInstagramAccountsSignature {\n return () =>\n universalListInstagramAccounts(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListInstagramAccountsSignature {\n /**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n */\n (): Promise<\n NonNullablePaths<\n ListInstagramAccountsResponse,\n | `instagramAccounts`\n | `instagramAccounts.${number}._id`\n | `instagramAccounts.${number}.instagramInfo.instagramId`\n | `instagramAccounts.${number}.instagramInfo.instagramUsername`\n | `instagramAccounts.${number}.instagramInfo.profilePictureUrl`,\n 5\n >\n >;\n}\n\nexport const onInstagramAccountDeleted = EventDefinition(\n 'wix.instagram_feed.v1.instagram_account_deleted',\n true,\n (event: InstagramAccountDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<InstagramAccountDeletedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n BaseEventMetadata,\n ChangeTokenExpirationDateRequest,\n ChangeTokenExpirationDateResponse,\n ConnectAccountByTokenRequest,\n ConnectAccountByTokenResponse,\n CreateAccountRequest,\n CreateAccountResponse,\n DisconnectAccountRequest,\n DisconnectAccountResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetInstagramAccountRequest,\n GetInstagramAccountResponse,\n GetLongLivedTokenRequest,\n GetLongLivedTokenResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n InitiateAccountConnectionRequest,\n InitiateAccountConnectionResponse,\n InstagramAccount,\n InstagramAccountDeletedEnvelope,\n InstagramInfo,\n ListInstagramAccountsRequest,\n ListInstagramAccountsResponse,\n MessageEnvelope,\n RestoreInfo,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-account-accounts.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 ambassadorWixInstagramFeedV1InstagramAccount from './instagram-feed-v1-instagram-account-accounts.http.js';\n\nexport interface InstagramAccount {\n /**\n * The id of the connection\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * The revision of the connection\n * @readonly\n */\n revision?: string | null;\n /** The instagram info connected to */\n instagramInfo?: InstagramInfo;\n /** True - account is synchronized with the Meta API. False - in last successful state */\n synchronized?: boolean | null;\n}\n\nexport interface InstagramInfo {\n /**\n * The id of the instagram user\n * @immutable\n * @maxLength 30\n */\n instagramId?: string;\n /**\n * The username of the instagram user\n * @readonly\n * @maxLength 500\n */\n instagramUsername?: string;\n /**\n * Profile picture URL from Instagram\n * @readonly\n * @maxLength 2000\n */\n profilePictureUrl?: string;\n /**\n * Follower count from Instagram\n * @readonly\n */\n followersCount?: string | null;\n /**\n * Media count from Instagram\n * @readonly\n */\n mediaCount?: string | null;\n /**\n * Profile biography from Instagram\n * @readonly\n * @maxLength 500\n */\n biography?: string | null;\n /**\n * Number of accounts this user follows\n * @readonly\n */\n followsCount?: string | null;\n /**\n * Profile name from Instagram\n * @readonly\n * @maxLength 500\n */\n name?: string | null;\n /**\n * Profile website URL from Instagram\n * @readonly\n * @maxLength 2000\n */\n website?: string | null;\n}\n\nexport interface InitiateAccountConnectionRequest {}\n\nexport interface InitiateAccountConnectionResponse {\n /**\n * State parameter for authorization callback\n * @maxLength 256\n */\n connectionParams?: string[];\n}\n\nexport interface CreateAccountRequest {\n /**\n * connection id\n * @readonly\n * @maxLength 256\n */\n authorizationCode?: string;\n /**\n * redirect url\n * @maxLength 256\n */\n redirectUrl?: string;\n}\n\nexport interface CreateAccountResponse {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface DisconnectAccountRequest {\n /**\n * connection id to be disconnected\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface DisconnectAccountResponse {}\n\nexport interface GetInstagramAccountRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface GetInstagramAccountResponse {\n /** instagram account information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ListInstagramAccountsRequest {}\n\nexport interface ListInstagramAccountsResponse {\n /** instagram account profile information */\n instagramAccounts?: InstagramAccount[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface ConnectAccountByTokenRequest {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n accessToken?: string;\n}\n\nexport interface ConnectAccountByTokenResponse {\n /** instagram account profile information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ChangeTokenExpirationDateRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** new expiration date */\n expirationDate?: Date | null;\n}\n\nexport interface ChangeTokenExpirationDateResponse {}\n\nexport interface GetLongLivedTokenRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface GetLongLivedTokenResponse {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n token?: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface InstagramAccountDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/** @permissionScope Instagram external scope\n * @permissionScopeId SCOPE.GROUPS.INSTAGRAM_ACCOUNTS\n * @permissionId INSTAGRAM_ACCOUNTS.GET_PROFILE\n * @webhook\n * @eventType wix.instagram_feed.v1.instagram_account_deleted\n * @serviceIdentifier wix.instagram.v1.InstagramAccountService\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onInstagramAccountDeleted(\n handler: (event: InstagramAccountDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieve hash needed for connection of instagram account to a site.\n * @public\n * @documentationMaturity preview\n * @permissionId INSTAGRAM_ACCOUNTS.INITIATE_CONNECTION\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.InitiateAccountConnection\n */\nexport async function initiateAccountConnection(): Promise<\n NonNullablePaths<InitiateAccountConnectionResponse, `connectionParams`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.initiateAccountConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n * @param connectionId - connection id to be disconnected\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.DISCONNECT\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.DisconnectAccount\n */\nexport async function disconnectAccount(connectionId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.disconnectAccount(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: { connectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n * @param connectionId - connection id\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_PROFILE\n * @applicableIdentity APP\n * @returns instagram account information\n * @fqn wix.instagram.v1.InstagramAccountService.GetInstagramAccount\n */\nexport async function getInstagramAccount(\n connectionId: string\n): Promise<\n NonNullablePaths<\n InstagramAccount,\n | `_id`\n | `instagramInfo.instagramId`\n | `instagramInfo.instagramUsername`\n | `instagramInfo.profilePictureUrl`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.getInstagramAccount(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 ?.instagramAccount!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { connectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n * @public\n * @documentationMaturity preview\n * @permissionId INSTAGRAM_ACCOUNTS.LIST_PROFILES\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.ListInstagramAccounts\n */\nexport async function listInstagramAccounts(): Promise<\n NonNullablePaths<\n ListInstagramAccountsResponse,\n | `instagramAccounts`\n | `instagramAccounts.${number}._id`\n | `instagramAccounts.${number}.instagramInfo.instagramId`\n | `instagramAccounts.${number}.instagramInfo.instagramUsername`\n | `instagramAccounts.${number}.instagramInfo.profilePictureUrl`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.listInstagramAccounts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'instagram_integration.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n {\n srcPath: '/_api/instagram-accounts',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_instagram_accounts';\n\n/** Retrieve hash needed for connection of instagram account to a site. */\nexport function initiateAccountConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __initiateAccountConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.InitiateAccountConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/initiate-connection',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __initiateAccountConnection;\n}\n\n/**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n */\nexport function disconnectAccount(payload: object): RequestOptionsFactory<any> {\n function __disconnectAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'DELETE' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.DisconnectAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __disconnectAccount;\n}\n\n/**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n */\nexport function getInstagramAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __getInstagramAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.GetInstagramAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getInstagramAccount;\n}\n\n/**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n */\nexport function listInstagramAccounts(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccounts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.ListInstagramAccounts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listInstagramAccounts;\n}\n","import {\n initiateAccountConnection as publicInitiateAccountConnection,\n disconnectAccount as publicDisconnectAccount,\n getInstagramAccount as publicGetInstagramAccount,\n listInstagramAccounts as publicListInstagramAccounts,\n} from './instagram-feed-v1-instagram-account-accounts.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onInstagramAccountDeleted as publicOnInstagramAccountDeleted } from './instagram-feed-v1-instagram-account-accounts.public.js';\n\nexport const initiateAccountConnection: MaybeContext<\n BuildRESTFunction<typeof publicInitiateAccountConnection> &\n typeof publicInitiateAccountConnection\n> = /*#__PURE__*/ createRESTModule(publicInitiateAccountConnection);\nexport const disconnectAccount: MaybeContext<\n BuildRESTFunction<typeof publicDisconnectAccount> &\n typeof publicDisconnectAccount\n> = /*#__PURE__*/ createRESTModule(publicDisconnectAccount);\nexport const getInstagramAccount: MaybeContext<\n BuildRESTFunction<typeof publicGetInstagramAccount> &\n typeof publicGetInstagramAccount\n> = /*#__PURE__*/ createRESTModule(publicGetInstagramAccount);\nexport const listInstagramAccounts: MaybeContext<\n BuildRESTFunction<typeof publicListInstagramAccounts> &\n typeof publicListInstagramAccounts\n> = /*#__PURE__*/ createRESTModule(publicListInstagramAccounts);\n/** */\nexport const onInstagramAccountDeleted: BuildEventDefinition<\n typeof publicOnInstagramAccountDeleted\n> &\n typeof publicOnInstagramAccountDeleted = createEventModule(\n publicOnInstagramAccountDeleted\n);\n\nexport { WebhookIdentityType } from './instagram-feed-v1-instagram-account-accounts.universal.js';\nexport {\n InstagramAccount,\n InstagramInfo,\n InitiateAccountConnectionRequest,\n InitiateAccountConnectionResponse,\n CreateAccountRequest,\n CreateAccountResponse,\n DisconnectAccountRequest,\n DisconnectAccountResponse,\n GetInstagramAccountRequest,\n GetInstagramAccountResponse,\n ListInstagramAccountsRequest,\n ListInstagramAccountsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n ConnectAccountByTokenRequest,\n ConnectAccountByTokenResponse,\n ChangeTokenExpirationDateRequest,\n ChangeTokenExpirationDateResponse,\n GetLongLivedTokenRequest,\n GetLongLivedTokenResponse,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n InstagramAccountDeletedEnvelope,\n} from './instagram-feed-v1-instagram-account-accounts.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './instagram-feed-v1-instagram-account-accounts.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,iCAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAAqD;AACrD,6BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,gDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qCAAqC;AAAA,MACnC;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,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;A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3B,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,yBAGK,2DAAiBA,sBAA2B;AAEvD,IAAMC,iCAG8B;AAAA,EACzC;AACF;","names":["disconnectAccount","getInstagramAccount","initiateAccountConnection","listInstagramAccounts","onInstagramAccountDeleted","import_rename_all_nested_keys","import_rest_modules","WebhookIdentityType","initiateAccountConnection","sdkTransformError","disconnectAccount","getInstagramAccount","listInstagramAccounts","initiateAccountConnection","disconnectAccount","getInstagramAccount","listInstagramAccounts","import_rest_modules","initiateAccountConnection","disconnectAccount","getInstagramAccount","listInstagramAccounts","onInstagramAccountDeleted"]}
@@ -30,6 +30,45 @@ interface InstagramInfo {
30
30
  * @maxLength 500
31
31
  */
32
32
  instagramUsername?: string;
33
+ /**
34
+ * Profile picture URL from Instagram
35
+ * @readonly
36
+ * @maxLength 2000
37
+ */
38
+ profilePictureUrl?: string;
39
+ /**
40
+ * Follower count from Instagram
41
+ * @readonly
42
+ */
43
+ followersCount?: string | null;
44
+ /**
45
+ * Media count from Instagram
46
+ * @readonly
47
+ */
48
+ mediaCount?: string | null;
49
+ /**
50
+ * Profile biography from Instagram
51
+ * @readonly
52
+ * @maxLength 500
53
+ */
54
+ biography?: string | null;
55
+ /**
56
+ * Number of accounts this user follows
57
+ * @readonly
58
+ */
59
+ followsCount?: string | null;
60
+ /**
61
+ * Profile name from Instagram
62
+ * @readonly
63
+ * @maxLength 500
64
+ */
65
+ name?: string | null;
66
+ /**
67
+ * Profile website URL from Instagram
68
+ * @readonly
69
+ * @maxLength 2000
70
+ */
71
+ website?: string | null;
33
72
  }
34
73
  interface InitiateAccountConnectionRequest {
35
74
  }
@@ -383,7 +422,7 @@ declare function disconnectAccount(connectionId: string): Promise<void>;
383
422
  * @returns instagram account information
384
423
  * @fqn wix.instagram.v1.InstagramAccountService.GetInstagramAccount
385
424
  */
386
- declare function getInstagramAccount(connectionId: string): Promise<NonNullablePaths<InstagramAccount, `_id` | `instagramInfo.instagramId` | `instagramInfo.instagramUsername`, 3>>;
425
+ declare function getInstagramAccount(connectionId: string): Promise<NonNullablePaths<InstagramAccount, `_id` | `instagramInfo.instagramId` | `instagramInfo.instagramUsername` | `instagramInfo.profilePictureUrl`, 3>>;
387
426
  /**
388
427
  * List instagram accounts connected to the site.
389
428
  *
@@ -394,6 +433,6 @@ declare function getInstagramAccount(connectionId: string): Promise<NonNullableP
394
433
  * @applicableIdentity APP
395
434
  * @fqn wix.instagram.v1.InstagramAccountService.ListInstagramAccounts
396
435
  */
397
- declare function listInstagramAccounts(): Promise<NonNullablePaths<ListInstagramAccountsResponse, `instagramAccounts` | `instagramAccounts.${number}._id` | `instagramAccounts.${number}.instagramInfo.instagramId` | `instagramAccounts.${number}.instagramInfo.instagramUsername`, 5>>;
436
+ declare function listInstagramAccounts(): Promise<NonNullablePaths<ListInstagramAccountsResponse, `instagramAccounts` | `instagramAccounts.${number}._id` | `instagramAccounts.${number}.instagramInfo.instagramId` | `instagramAccounts.${number}.instagramInfo.instagramUsername` | `instagramAccounts.${number}.instagramInfo.profilePictureUrl`, 5>>;
398
437
 
399
438
  export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type BaseEventMetadata, type ChangeTokenExpirationDateRequest, type ChangeTokenExpirationDateResponse, type ConnectAccountByTokenRequest, type ConnectAccountByTokenResponse, type CreateAccountRequest, type CreateAccountResponse, type DisconnectAccountRequest, type DisconnectAccountResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetInstagramAccountRequest, type GetInstagramAccountResponse, type GetLongLivedTokenRequest, type GetLongLivedTokenResponse, type IdentificationData, type IdentificationDataIdOneOf, type InitiateAccountConnectionRequest, type InitiateAccountConnectionResponse, type InstagramAccount, type InstagramAccountDeletedEnvelope, type InstagramInfo, type ListInstagramAccountsRequest, type ListInstagramAccountsResponse, type MessageEnvelope, type RestoreInfo, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, disconnectAccount, getInstagramAccount, initiateAccountConnection, listInstagramAccounts, onInstagramAccountDeleted };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/instagram-feed-v1-instagram-account-accounts.universal.ts","../../src/instagram-feed-v1-instagram-account-accounts.http.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-account-accounts.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 ambassadorWixInstagramFeedV1InstagramAccount from './instagram-feed-v1-instagram-account-accounts.http.js';\n\nexport interface InstagramAccount {\n /**\n * The id of the connection\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * The revision of the connection\n * @readonly\n */\n revision?: string | null;\n /** The instagram info connected to */\n instagramInfo?: InstagramInfo;\n /** True - account is synchronized with the Meta API. False - in last successful state */\n synchronized?: boolean | null;\n}\n\nexport interface InstagramInfo {\n /**\n * The id of the instagram user\n * @immutable\n * @maxLength 30\n */\n instagramId?: string;\n /**\n * The username of the instagram user\n * @readonly\n * @maxLength 500\n */\n instagramUsername?: string;\n}\n\nexport interface InitiateAccountConnectionRequest {}\n\nexport interface InitiateAccountConnectionResponse {\n /**\n * State parameter for authorization callback\n * @maxLength 256\n */\n connectionParams?: string[];\n}\n\nexport interface CreateAccountRequest {\n /**\n * connection id\n * @readonly\n * @maxLength 256\n */\n authorizationCode?: string;\n /**\n * redirect url\n * @maxLength 256\n */\n redirectUrl?: string;\n}\n\nexport interface CreateAccountResponse {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface DisconnectAccountRequest {\n /**\n * connection id to be disconnected\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface DisconnectAccountResponse {}\n\nexport interface GetInstagramAccountRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface GetInstagramAccountResponse {\n /** instagram account information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ListInstagramAccountsRequest {}\n\nexport interface ListInstagramAccountsResponse {\n /** instagram account profile information */\n instagramAccounts?: InstagramAccount[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface ConnectAccountByTokenRequest {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n accessToken?: string;\n}\n\nexport interface ConnectAccountByTokenResponse {\n /** instagram account profile information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ChangeTokenExpirationDateRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** new expiration date */\n expirationDate?: Date | null;\n}\n\nexport interface ChangeTokenExpirationDateResponse {}\n\nexport interface GetLongLivedTokenRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface GetLongLivedTokenResponse {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n token?: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface InstagramAccountDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/** @permissionScope Instagram external scope\n * @permissionScopeId SCOPE.GROUPS.INSTAGRAM_ACCOUNTS\n * @permissionId INSTAGRAM_ACCOUNTS.GET_PROFILE\n * @webhook\n * @eventType wix.instagram_feed.v1.instagram_account_deleted\n * @serviceIdentifier wix.instagram.v1.InstagramAccountService\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onInstagramAccountDeleted(\n handler: (event: InstagramAccountDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieve hash needed for connection of instagram account to a site.\n * @public\n * @documentationMaturity preview\n * @permissionId INSTAGRAM_ACCOUNTS.INITIATE_CONNECTION\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.InitiateAccountConnection\n */\nexport async function initiateAccountConnection(): Promise<\n NonNullablePaths<InitiateAccountConnectionResponse, `connectionParams`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.initiateAccountConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n * @param connectionId - connection id to be disconnected\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.DISCONNECT\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.DisconnectAccount\n */\nexport async function disconnectAccount(connectionId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.disconnectAccount(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: { connectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n * @param connectionId - connection id\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_PROFILE\n * @applicableIdentity APP\n * @returns instagram account information\n * @fqn wix.instagram.v1.InstagramAccountService.GetInstagramAccount\n */\nexport async function getInstagramAccount(\n connectionId: string\n): Promise<\n NonNullablePaths<\n InstagramAccount,\n `_id` | `instagramInfo.instagramId` | `instagramInfo.instagramUsername`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.getInstagramAccount(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 ?.instagramAccount!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { connectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n * @public\n * @documentationMaturity preview\n * @permissionId INSTAGRAM_ACCOUNTS.LIST_PROFILES\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.ListInstagramAccounts\n */\nexport async function listInstagramAccounts(): Promise<\n NonNullablePaths<\n ListInstagramAccountsResponse,\n | `instagramAccounts`\n | `instagramAccounts.${number}._id`\n | `instagramAccounts.${number}.instagramInfo.instagramId`\n | `instagramAccounts.${number}.instagramInfo.instagramUsername`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.listInstagramAccounts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'instagram_integration.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n {\n srcPath: '/_api/instagram-accounts',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_instagram_accounts';\n\n/** Retrieve hash needed for connection of instagram account to a site. */\nexport function initiateAccountConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __initiateAccountConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.InitiateAccountConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/initiate-connection',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __initiateAccountConnection;\n}\n\n/**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n */\nexport function disconnectAccount(payload: object): RequestOptionsFactory<any> {\n function __disconnectAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'DELETE' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.DisconnectAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __disconnectAccount;\n}\n\n/**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n */\nexport function getInstagramAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __getInstagramAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.GetInstagramAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getInstagramAccount;\n}\n\n/**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n */\nexport function listInstagramAccounts(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccounts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.ListInstagramAccounts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listInstagramAccounts;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,gDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qCAAqC;AAAA,MACnC;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MAC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qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UACyC,oBAAoB,OAAO;AAE1E,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GACtD;AAAA,EACN,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAYA,eAAsBG,yBASpB;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,CAAC,CAAC;AAExD,QAAM,UACyC,sBAAsB,OAAO;AAE5E,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,uBAAAH;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["disconnectAccount","getInstagramAccount","initiateAccountConnection","listInstagramAccounts","import_rest_modules","WebhookIdentityType","initiateAccountConnection","sdkTransformError","disconnectAccount","getInstagramAccount","listInstagramAccounts"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/instagram-feed-v1-instagram-account-accounts.universal.ts","../../src/instagram-feed-v1-instagram-account-accounts.http.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-account-accounts.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 ambassadorWixInstagramFeedV1InstagramAccount from './instagram-feed-v1-instagram-account-accounts.http.js';\n\nexport interface InstagramAccount {\n /**\n * The id of the connection\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * The revision of the connection\n * @readonly\n */\n revision?: string | null;\n /** The instagram info connected to */\n instagramInfo?: InstagramInfo;\n /** True - account is synchronized with the Meta API. False - in last successful state */\n synchronized?: boolean | null;\n}\n\nexport interface InstagramInfo {\n /**\n * The id of the instagram user\n * @immutable\n * @maxLength 30\n */\n instagramId?: string;\n /**\n * The username of the instagram user\n * @readonly\n * @maxLength 500\n */\n instagramUsername?: string;\n /**\n * Profile picture URL from Instagram\n * @readonly\n * @maxLength 2000\n */\n profilePictureUrl?: string;\n /**\n * Follower count from Instagram\n * @readonly\n */\n followersCount?: string | null;\n /**\n * Media count from Instagram\n * @readonly\n */\n mediaCount?: string | null;\n /**\n * Profile biography from Instagram\n * @readonly\n * @maxLength 500\n */\n biography?: string | null;\n /**\n * Number of accounts this user follows\n * @readonly\n */\n followsCount?: string | null;\n /**\n * Profile name from Instagram\n * @readonly\n * @maxLength 500\n */\n name?: string | null;\n /**\n * Profile website URL from Instagram\n * @readonly\n * @maxLength 2000\n */\n website?: string | null;\n}\n\nexport interface InitiateAccountConnectionRequest {}\n\nexport interface InitiateAccountConnectionResponse {\n /**\n * State parameter for authorization callback\n * @maxLength 256\n */\n connectionParams?: string[];\n}\n\nexport interface CreateAccountRequest {\n /**\n * connection id\n * @readonly\n * @maxLength 256\n */\n authorizationCode?: string;\n /**\n * redirect url\n * @maxLength 256\n */\n redirectUrl?: string;\n}\n\nexport interface CreateAccountResponse {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface DisconnectAccountRequest {\n /**\n * connection id to be disconnected\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface DisconnectAccountResponse {}\n\nexport interface GetInstagramAccountRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface GetInstagramAccountResponse {\n /** instagram account information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ListInstagramAccountsRequest {}\n\nexport interface ListInstagramAccountsResponse {\n /** instagram account profile information */\n instagramAccounts?: InstagramAccount[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface ConnectAccountByTokenRequest {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n accessToken?: string;\n}\n\nexport interface ConnectAccountByTokenResponse {\n /** instagram account profile information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ChangeTokenExpirationDateRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** new expiration date */\n expirationDate?: Date | null;\n}\n\nexport interface ChangeTokenExpirationDateResponse {}\n\nexport interface GetLongLivedTokenRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface GetLongLivedTokenResponse {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n token?: string;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface InstagramAccountDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/** @permissionScope Instagram external scope\n * @permissionScopeId SCOPE.GROUPS.INSTAGRAM_ACCOUNTS\n * @permissionId INSTAGRAM_ACCOUNTS.GET_PROFILE\n * @webhook\n * @eventType wix.instagram_feed.v1.instagram_account_deleted\n * @serviceIdentifier wix.instagram.v1.InstagramAccountService\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onInstagramAccountDeleted(\n handler: (event: InstagramAccountDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieve hash needed for connection of instagram account to a site.\n * @public\n * @documentationMaturity preview\n * @permissionId INSTAGRAM_ACCOUNTS.INITIATE_CONNECTION\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.InitiateAccountConnection\n */\nexport async function initiateAccountConnection(): Promise<\n NonNullablePaths<InitiateAccountConnectionResponse, `connectionParams`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.initiateAccountConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n * @param connectionId - connection id to be disconnected\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.DISCONNECT\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.DisconnectAccount\n */\nexport async function disconnectAccount(connectionId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.disconnectAccount(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: { connectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n * @param connectionId - connection id\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_PROFILE\n * @applicableIdentity APP\n * @returns instagram account information\n * @fqn wix.instagram.v1.InstagramAccountService.GetInstagramAccount\n */\nexport async function getInstagramAccount(\n connectionId: string\n): Promise<\n NonNullablePaths<\n InstagramAccount,\n | `_id`\n | `instagramInfo.instagramId`\n | `instagramInfo.instagramUsername`\n | `instagramInfo.profilePictureUrl`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.getInstagramAccount(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 ?.instagramAccount!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { connectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['connectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n * @public\n * @documentationMaturity preview\n * @permissionId INSTAGRAM_ACCOUNTS.LIST_PROFILES\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramAccountService.ListInstagramAccounts\n */\nexport async function listInstagramAccounts(): Promise<\n NonNullablePaths<\n ListInstagramAccountsResponse,\n | `instagramAccounts`\n | `instagramAccounts.${number}._id`\n | `instagramAccounts.${number}.instagramInfo.instagramId`\n | `instagramAccounts.${number}.instagramInfo.instagramUsername`\n | `instagramAccounts.${number}.instagramInfo.profilePictureUrl`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramAccount.listInstagramAccounts(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'instagram_integration.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n {\n srcPath: '/_api/instagram-accounts',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_instagram_accounts';\n\n/** Retrieve hash needed for connection of instagram account to a site. */\nexport function initiateAccountConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __initiateAccountConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.InitiateAccountConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/initiate-connection',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __initiateAccountConnection;\n}\n\n/**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n */\nexport function disconnectAccount(payload: object): RequestOptionsFactory<any> {\n function __disconnectAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'DELETE' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.DisconnectAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __disconnectAccount;\n}\n\n/**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n */\nexport function getInstagramAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __getInstagramAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.GetInstagramAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getInstagramAccount;\n}\n\n/**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n */\nexport function listInstagramAccounts(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccounts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.ListInstagramAccounts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listInstagramAccounts;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,gDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAA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3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAeA,eAAsBE,qBACpB,cAUA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UACyC,oBAAoB,OAAO;AAE1E,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI,GACtD;AAAA,EACN,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,OAAO;AAAA,QACjD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc;AAAA,IACjB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAYA,eAAsBG,yBAUpB;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,CAAC,CAAC;AAExD,QAAM,UACyC,sBAAsB,OAAO;AAE5E,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,uBAAAH;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["disconnectAccount","getInstagramAccount","initiateAccountConnection","listInstagramAccounts","import_rest_modules","WebhookIdentityType","initiateAccountConnection","sdkTransformError","disconnectAccount","getInstagramAccount","listInstagramAccounts"]}
@@ -31,6 +31,45 @@ interface InstagramInfo {
31
31
  * @maxLength 500
32
32
  */
33
33
  instagramUsername?: string;
34
+ /**
35
+ * Profile picture URL from Instagram
36
+ * @readonly
37
+ * @maxLength 2000
38
+ */
39
+ profilePictureUrl?: string;
40
+ /**
41
+ * Follower count from Instagram
42
+ * @readonly
43
+ */
44
+ followersCount?: string | null;
45
+ /**
46
+ * Media count from Instagram
47
+ * @readonly
48
+ */
49
+ mediaCount?: string | null;
50
+ /**
51
+ * Profile biography from Instagram
52
+ * @readonly
53
+ * @maxLength 500
54
+ */
55
+ biography?: string | null;
56
+ /**
57
+ * Number of accounts this user follows
58
+ * @readonly
59
+ */
60
+ followsCount?: string | null;
61
+ /**
62
+ * Profile name from Instagram
63
+ * @readonly
64
+ * @maxLength 500
65
+ */
66
+ name?: string | null;
67
+ /**
68
+ * Profile website URL from Instagram
69
+ * @readonly
70
+ * @maxLength 2000
71
+ */
72
+ website?: string | null;
34
73
  }
35
74
  interface InitiateAccountConnectionRequest {
36
75
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/instagram-feed-v1-instagram-account-accounts.http.ts","../../src/instagram-feed-v1-instagram-account-accounts.types.ts","../../src/instagram-feed-v1-instagram-account-accounts.meta.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-account-accounts.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'instagram_integration.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n {\n srcPath: '/_api/instagram-accounts',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_instagram_accounts';\n\n/** Retrieve hash needed for connection of instagram account to a site. */\nexport function initiateAccountConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __initiateAccountConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.InitiateAccountConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/initiate-connection',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __initiateAccountConnection;\n}\n\n/**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n */\nexport function disconnectAccount(payload: object): RequestOptionsFactory<any> {\n function __disconnectAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'DELETE' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.DisconnectAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __disconnectAccount;\n}\n\n/**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n */\nexport function getInstagramAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __getInstagramAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.GetInstagramAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getInstagramAccount;\n}\n\n/**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n */\nexport function listInstagramAccounts(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccounts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.ListInstagramAccounts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listInstagramAccounts;\n}\n","export interface InstagramAccount {\n /**\n * The id of the connection\n * @format GUID\n * @readonly\n */\n id?: string;\n /**\n * The revision of the connection\n * @readonly\n */\n revision?: string | null;\n /** The instagram info connected to */\n instagramInfo?: InstagramInfo;\n /** True - account is synchronized with the Meta API. False - in last successful state */\n synchronized?: boolean | null;\n}\n\nexport interface InstagramInfo {\n /**\n * The id of the instagram user\n * @immutable\n * @maxLength 30\n */\n instagramId?: string;\n /**\n * The username of the instagram user\n * @readonly\n * @maxLength 500\n */\n instagramUsername?: string;\n}\n\nexport interface InitiateAccountConnectionRequest {}\n\nexport interface InitiateAccountConnectionResponse {\n /**\n * State parameter for authorization callback\n * @maxLength 256\n */\n connectionParams?: string[];\n}\n\nexport interface CreateAccountRequest {\n /**\n * connection id\n * @readonly\n * @maxLength 256\n */\n authorizationCode?: string;\n /**\n * redirect url\n * @maxLength 256\n */\n redirectUrl?: string;\n}\n\nexport interface CreateAccountResponse {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface DisconnectAccountRequest {\n /**\n * connection id to be disconnected\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface DisconnectAccountResponse {}\n\nexport interface GetInstagramAccountRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface GetInstagramAccountResponse {\n /** instagram account information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ListInstagramAccountsRequest {}\n\nexport interface ListInstagramAccountsResponse {\n /** instagram account profile information */\n instagramAccounts?: InstagramAccount[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n 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 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 /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface ConnectAccountByTokenRequest {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n accessToken?: string;\n}\n\nexport interface ConnectAccountByTokenResponse {\n /** instagram account profile information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ChangeTokenExpirationDateRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** new expiration date */\n expirationDate?: Date | null;\n}\n\nexport interface ChangeTokenExpirationDateResponse {}\n\nexport interface GetLongLivedTokenRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface GetLongLivedTokenResponse {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n token?: string;\n}\n","import * as ambassadorWixInstagramFeedV1InstagramAccount from './instagram-feed-v1-instagram-account-accounts.http.js';\nimport * as ambassadorWixInstagramFeedV1InstagramAccountTypes from './instagram-feed-v1-instagram-account-accounts.types.js';\nimport * as ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes from './instagram-feed-v1-instagram-account-accounts.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 initiateAccountConnection(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.InitiateAccountConnectionRequest,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.InitiateAccountConnectionRequest,\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.InitiateAccountConnectionResponse,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.InitiateAccountConnectionResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixInstagramFeedV1InstagramAccount.initiateAccountConnection(\n payload\n );\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/instagram-accounts/initiate-connection',\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 disconnectAccount(): __PublicMethodMetaInfo<\n 'DELETE',\n { connectionId: string },\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.DisconnectAccountRequest,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.DisconnectAccountRequest,\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.DisconnectAccountResponse,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.DisconnectAccountResponse\n> {\n const payload = { connectionId: ':connectionId' } as any;\n\n const getRequestOptions =\n ambassadorWixInstagramFeedV1InstagramAccount.disconnectAccount(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/instagram-accounts/{connectionId}',\n pathParams: { connectionId: 'connectionId' },\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 getInstagramAccount(): __PublicMethodMetaInfo<\n 'GET',\n { connectionId: string },\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.GetInstagramAccountRequest,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.GetInstagramAccountRequest,\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.GetInstagramAccountResponse,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.GetInstagramAccountResponse\n> {\n const payload = { connectionId: ':connectionId' } as any;\n\n const getRequestOptions =\n ambassadorWixInstagramFeedV1InstagramAccount.getInstagramAccount(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/instagram-accounts/{connectionId}',\n pathParams: { connectionId: 'connectionId' },\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 listInstagramAccounts(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.ListInstagramAccountsRequest,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.ListInstagramAccountsRequest,\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.ListInstagramAccountsResponse,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.ListInstagramAccountsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixInstagramFeedV1InstagramAccount.listInstagramAccounts(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/instagram-accounts',\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 InstagramAccount as InstagramAccountOriginal,\n InstagramInfo as InstagramInfoOriginal,\n InitiateAccountConnectionRequest as InitiateAccountConnectionRequestOriginal,\n InitiateAccountConnectionResponse as InitiateAccountConnectionResponseOriginal,\n CreateAccountRequest as CreateAccountRequestOriginal,\n CreateAccountResponse as CreateAccountResponseOriginal,\n DisconnectAccountRequest as DisconnectAccountRequestOriginal,\n DisconnectAccountResponse as DisconnectAccountResponseOriginal,\n GetInstagramAccountRequest as GetInstagramAccountRequestOriginal,\n GetInstagramAccountResponse as GetInstagramAccountResponseOriginal,\n ListInstagramAccountsRequest as ListInstagramAccountsRequestOriginal,\n ListInstagramAccountsResponse as ListInstagramAccountsResponseOriginal,\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 MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n ConnectAccountByTokenRequest as ConnectAccountByTokenRequestOriginal,\n ConnectAccountByTokenResponse as ConnectAccountByTokenResponseOriginal,\n ChangeTokenExpirationDateRequest as ChangeTokenExpirationDateRequestOriginal,\n ChangeTokenExpirationDateResponse as ChangeTokenExpirationDateResponseOriginal,\n GetLongLivedTokenRequest as GetLongLivedTokenRequestOriginal,\n GetLongLivedTokenResponse as GetLongLivedTokenResponseOriginal,\n} from './instagram-feed-v1-instagram-account-accounts.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,gDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qCAAqC;AAAA,MACnC;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,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT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AAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["disconnectAccount","getInstagramAccount","initiateAccountConnection","listInstagramAccounts","import_rest_modules","WebhookIdentityType","initiateAccountConnection","disconnectAccount","getInstagramAccount","listInstagramAccounts"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/instagram-feed-v1-instagram-account-accounts.http.ts","../../src/instagram-feed-v1-instagram-account-accounts.types.ts","../../src/instagram-feed-v1-instagram-account-accounts.meta.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-account-accounts.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramAccountServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'instagram_integration.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/instagram-accounts/v1',\n destPath: '/v1',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/instagram-accounts',\n destPath: '',\n },\n {\n srcPath: '/_api/instagram-accounts',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_instagram_accounts';\n\n/** Retrieve hash needed for connection of instagram account to a site. */\nexport function initiateAccountConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __initiateAccountConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.InitiateAccountConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/initiate-connection',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __initiateAccountConnection;\n}\n\n/**\n * Disconnect instagram account from a site.\n *\n * Removes stored Long-life token corresponding to the instagram user id.\n */\nexport function disconnectAccount(payload: object): RequestOptionsFactory<any> {\n function __disconnectAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'DELETE' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.DisconnectAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __disconnectAccount;\n}\n\n/**\n * Get instagram account profile.\n *\n * Returns instagram account profile corresponding to account id.\n */\nexport function getInstagramAccount(\n payload: object\n): RequestOptionsFactory<any> {\n function __getInstagramAccount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn: 'wix.instagram.v1.InstagramAccountService.GetInstagramAccount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getInstagramAccount;\n}\n\n/**\n * List instagram accounts connected to the site.\n *\n * Returns list of instagram user ids connected to app instance.\n */\nexport function listInstagramAccounts(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccounts({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_account',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramAccountService.ListInstagramAccounts',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramAccountServiceUrl({\n protoPath: '/v1/instagram-accounts',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listInstagramAccounts;\n}\n","export interface InstagramAccount {\n /**\n * The id of the connection\n * @format GUID\n * @readonly\n */\n id?: string;\n /**\n * The revision of the connection\n * @readonly\n */\n revision?: string | null;\n /** The instagram info connected to */\n instagramInfo?: InstagramInfo;\n /** True - account is synchronized with the Meta API. False - in last successful state */\n synchronized?: boolean | null;\n}\n\nexport interface InstagramInfo {\n /**\n * The id of the instagram user\n * @immutable\n * @maxLength 30\n */\n instagramId?: string;\n /**\n * The username of the instagram user\n * @readonly\n * @maxLength 500\n */\n instagramUsername?: string;\n /**\n * Profile picture URL from Instagram\n * @readonly\n * @maxLength 2000\n */\n profilePictureUrl?: string;\n /**\n * Follower count from Instagram\n * @readonly\n */\n followersCount?: string | null;\n /**\n * Media count from Instagram\n * @readonly\n */\n mediaCount?: string | null;\n /**\n * Profile biography from Instagram\n * @readonly\n * @maxLength 500\n */\n biography?: string | null;\n /**\n * Number of accounts this user follows\n * @readonly\n */\n followsCount?: string | null;\n /**\n * Profile name from Instagram\n * @readonly\n * @maxLength 500\n */\n name?: string | null;\n /**\n * Profile website URL from Instagram\n * @readonly\n * @maxLength 2000\n */\n website?: string | null;\n}\n\nexport interface InitiateAccountConnectionRequest {}\n\nexport interface InitiateAccountConnectionResponse {\n /**\n * State parameter for authorization callback\n * @maxLength 256\n */\n connectionParams?: string[];\n}\n\nexport interface CreateAccountRequest {\n /**\n * connection id\n * @readonly\n * @maxLength 256\n */\n authorizationCode?: string;\n /**\n * redirect url\n * @maxLength 256\n */\n redirectUrl?: string;\n}\n\nexport interface CreateAccountResponse {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface DisconnectAccountRequest {\n /**\n * connection id to be disconnected\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface DisconnectAccountResponse {}\n\nexport interface GetInstagramAccountRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n}\n\nexport interface GetInstagramAccountResponse {\n /** instagram account information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ListInstagramAccountsRequest {}\n\nexport interface ListInstagramAccountsResponse {\n /** instagram account profile information */\n instagramAccounts?: InstagramAccount[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n 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 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 /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface ConnectAccountByTokenRequest {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n accessToken?: string;\n}\n\nexport interface ConnectAccountByTokenResponse {\n /** instagram account profile information */\n instagramAccount?: InstagramAccount;\n}\n\nexport interface ChangeTokenExpirationDateRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** new expiration date */\n expirationDate?: Date | null;\n}\n\nexport interface ChangeTokenExpirationDateResponse {}\n\nexport interface GetLongLivedTokenRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n}\n\nexport interface GetLongLivedTokenResponse {\n /**\n * access token received from instagram api\n * @maxLength 255\n */\n token?: string;\n}\n","import * as ambassadorWixInstagramFeedV1InstagramAccount from './instagram-feed-v1-instagram-account-accounts.http.js';\nimport * as ambassadorWixInstagramFeedV1InstagramAccountTypes from './instagram-feed-v1-instagram-account-accounts.types.js';\nimport * as ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes from './instagram-feed-v1-instagram-account-accounts.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 initiateAccountConnection(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.InitiateAccountConnectionRequest,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.InitiateAccountConnectionRequest,\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.InitiateAccountConnectionResponse,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.InitiateAccountConnectionResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixInstagramFeedV1InstagramAccount.initiateAccountConnection(\n payload\n );\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/instagram-accounts/initiate-connection',\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 disconnectAccount(): __PublicMethodMetaInfo<\n 'DELETE',\n { connectionId: string },\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.DisconnectAccountRequest,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.DisconnectAccountRequest,\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.DisconnectAccountResponse,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.DisconnectAccountResponse\n> {\n const payload = { connectionId: ':connectionId' } as any;\n\n const getRequestOptions =\n ambassadorWixInstagramFeedV1InstagramAccount.disconnectAccount(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/instagram-accounts/{connectionId}',\n pathParams: { connectionId: 'connectionId' },\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 getInstagramAccount(): __PublicMethodMetaInfo<\n 'GET',\n { connectionId: string },\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.GetInstagramAccountRequest,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.GetInstagramAccountRequest,\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.GetInstagramAccountResponse,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.GetInstagramAccountResponse\n> {\n const payload = { connectionId: ':connectionId' } as any;\n\n const getRequestOptions =\n ambassadorWixInstagramFeedV1InstagramAccount.getInstagramAccount(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/instagram-accounts/{connectionId}',\n pathParams: { connectionId: 'connectionId' },\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 listInstagramAccounts(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.ListInstagramAccountsRequest,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.ListInstagramAccountsRequest,\n ambassadorWixInstagramFeedV1InstagramAccountUniversalTypes.ListInstagramAccountsResponse,\n ambassadorWixInstagramFeedV1InstagramAccountTypes.ListInstagramAccountsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixInstagramFeedV1InstagramAccount.listInstagramAccounts(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/instagram-accounts',\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 InstagramAccount as InstagramAccountOriginal,\n InstagramInfo as InstagramInfoOriginal,\n InitiateAccountConnectionRequest as InitiateAccountConnectionRequestOriginal,\n InitiateAccountConnectionResponse as InitiateAccountConnectionResponseOriginal,\n CreateAccountRequest as CreateAccountRequestOriginal,\n CreateAccountResponse as CreateAccountResponseOriginal,\n DisconnectAccountRequest as DisconnectAccountRequestOriginal,\n DisconnectAccountResponse as DisconnectAccountResponseOriginal,\n GetInstagramAccountRequest as GetInstagramAccountRequestOriginal,\n GetInstagramAccountResponse as GetInstagramAccountResponseOriginal,\n ListInstagramAccountsRequest as ListInstagramAccountsRequestOriginal,\n ListInstagramAccountsResponse as ListInstagramAccountsResponseOriginal,\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 MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n ConnectAccountByTokenRequest as ConnectAccountByTokenRequestOriginal,\n ConnectAccountByTokenResponse as ConnectAccountByTokenResponseOriginal,\n ChangeTokenExpirationDateRequest as ChangeTokenExpirationDateRequestOriginal,\n ChangeTokenExpirationDateResponse as ChangeTokenExpirationDateResponseOriginal,\n GetLongLivedTokenRequest as GetLongLivedTokenRequestOriginal,\n GetLongLivedTokenResponse as GetLongLivedTokenResponseOriginal,\n} from './instagram-feed-v1-instagram-account-accounts.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,gDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qCAAqC;AAAA,MACnC;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,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,I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F;","names":["disconnectAccount","getInstagramAccount","initiateAccountConnection","listInstagramAccounts","import_rest_modules","WebhookIdentityType","initiateAccountConnection","disconnectAccount","getInstagramAccount","listInstagramAccounts"]}