@wix/auto_sdk_instagram_media 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +5 -5
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +5 -5
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +5 -5
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +5 -5
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +5 -5
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +5 -5
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +5 -5
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +5 -5
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { ListInstagramAccountMediaOptions, ListInstagramAccountMediaResponse } from './index.typings.js';
|
|
3
|
-
export {
|
|
3
|
+
export { AccountInfo, ActionEvent, App, Children, CursorPaging, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomTag, DomainEvent, DomainEventBodyOneOf, ETagVerificationEvent, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, File, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ListInstagramAccountMediaRequest, Media, MediaType, MediaTypeWithLiterals, MessageEnvelope, Page, PagingMetadataV2, RestoreInfo, URI, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function listInstagramAccountMedia$1(httpClient: HttpClient): ListInstagramAccountMediaSignature;
|
|
6
6
|
interface ListInstagramAccountMediaSignature {
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/instagram-feed-v1-instagram-media-media.universal.ts","../../src/instagram-feed-v1-instagram-media-media.http.ts","../../src/instagram-feed-v1-instagram-media-media.public.ts","../../src/instagram-feed-v1-instagram-media-media.context.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-media-media.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixInstagramFeedV1InstagramMedia from './instagram-feed-v1-instagram-media-media.http.js';\n\nexport interface Media {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /**\n * 2200 is the max length of a caption in Instagram\n * @maxLength 2200\n */\n caption?: string;\n /** The type of the media can be one of [Unknown, Image, Video, CarouselAlbum] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n /** Timestamp of the media */\n timestamp?: Date | null;\n /**\n * Children for CarouselAlbum\n * @maxSize 10\n */\n children?: Children[];\n}\n\nexport enum MediaType {\n UNKNOWN = 'UNKNOWN',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n CAROUSEL_ALBUM = 'CAROUSEL_ALBUM',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals =\n | MediaType\n | 'UNKNOWN'\n | 'IMAGE'\n | 'VIDEO'\n | 'CAROUSEL_ALBUM';\n\nexport interface Children {\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /** The type of the child media can be one of [Unknown, Image, Video] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n}\n\nexport interface InvalidateCache extends InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n /**\n * tell us why you're invalidating the cache. You don't need to add your app name\n * @maxLength 256\n */\n reason?: string | null;\n /** Is local DS */\n localDc?: boolean;\n hardPurge?: boolean;\n}\n\n/** @oneof */\nexport interface InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n}\n\nexport interface App {\n /**\n * The AppDefId\n * @minLength 1\n */\n appDefId?: string;\n /**\n * The instance Id\n * @format GUID\n */\n instanceId?: string;\n}\n\nexport interface Page {\n /**\n * the msid the page is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Page ID\n * @minLength 1\n */\n pageId?: string;\n}\n\nexport interface URI {\n /**\n * the msid the URI is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes\n * @minLength 1\n */\n uriPath?: string;\n}\n\nexport interface File {\n /**\n * the msid the file is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by filename (for media files such as PDFs)\n * @minLength 1\n * @maxLength 256\n */\n fileName?: string;\n}\n\nexport interface CustomTag {\n /**\n * the msid the tag is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Tag to invalidate by\n * @minLength 1\n * @maxLength 256\n */\n tag?: string;\n}\n\nexport interface ETagVerificationEvent {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** cursor query */\n cursorQuery?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface ListInstagramAccountMediaRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /** paging */\n paging?: CursorQuery;\n}\n\nexport interface ListInstagramAccountMediaResponse {\n /** instagram media */\n media?: Media[];\n /** paging metadata */\n paging?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\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 Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n * @param connectionId - connection id\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_MEDIA\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia\n */\nexport async function listInstagramAccountMedia(\n connectionId: string,\n options?: ListInstagramAccountMediaOptions\n): Promise<\n NonNullablePaths<\n ListInstagramAccountMediaResponse,\n | `media`\n | `media.${number}._id`\n | `media.${number}.mediaId`\n | `media.${number}.caption`\n | `media.${number}.mediaType`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramMedia.listInstagramAccountMedia(\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 connectionId: '$[0]',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['connectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListInstagramAccountMediaOptions {\n /** paging */\n paging?: CursorQuery;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramMediaServiceUrl(\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_media';\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n */\nexport function listInstagramAccountMedia(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccountMedia({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_media',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramMediaServiceUrl({\n protoPath: '/v1/instagram-accounts/media/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'media.timestamp' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listInstagramAccountMedia;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListInstagramAccountMediaOptions,\n ListInstagramAccountMediaResponse,\n listInstagramAccountMedia as universalListInstagramAccountMedia,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/instagram' };\n\nexport function listInstagramAccountMedia(\n httpClient: HttpClient\n): ListInstagramAccountMediaSignature {\n return (connectionId: string, options?: ListInstagramAccountMediaOptions) =>\n universalListInstagramAccountMedia(\n connectionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListInstagramAccountMediaSignature {\n /**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n * @param - connection id\n */\n (connectionId: string, options?: ListInstagramAccountMediaOptions): Promise<\n NonNullablePaths<\n ListInstagramAccountMediaResponse,\n | `media`\n | `media.${number}._id`\n | `media.${number}.mediaId`\n | `media.${number}.caption`\n | `media.${number}.mediaType`,\n 4\n >\n >;\n}\n\nexport {\n AccountDetails,\n ActionEvent,\n App,\n Children,\n CursorPaging,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n CustomTag,\n DomainEvent,\n DomainEventBodyOneOf,\n ETagVerificationEvent,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n File,\n IdentificationData,\n IdentificationDataIdOneOf,\n InvalidateCache,\n InvalidateCacheGetByOneOf,\n ListInstagramAccountMediaOptions,\n ListInstagramAccountMediaRequest,\n ListInstagramAccountMediaResponse,\n Media,\n MediaType,\n MessageEnvelope,\n Page,\n PagingMetadataV2,\n RestoreInfo,\n URI,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n","import { listInstagramAccountMedia as publicListInstagramAccountMedia } from './instagram-feed-v1-instagram-media-media.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listInstagramAccountMedia: MaybeContext<\n BuildRESTFunction<typeof publicListInstagramAccountMedia> &\n typeof publicListInstagramAccountMedia\n> = /*#__PURE__*/ createRESTModule(publicListInstagramAccountMedia);\n\nexport {\n MediaType,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\nexport {\n Media,\n Children,\n InvalidateCache,\n InvalidateCacheGetByOneOf,\n App,\n Page,\n URI,\n File,\n CustomTag,\n ETagVerificationEvent,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorPaging,\n ListInstagramAccountMediaRequest,\n ListInstagramAccountMediaResponse,\n PagingMetadataV2,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountDetails,\n ListInstagramAccountMediaOptions,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\nexport {\n MediaTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,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;A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AAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;AA+CZ,eAAsBC,2BACpB,cACA,SAWA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UACuC;AAAA,IACzC;AAAA,EACF;AAEF,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,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,SAAS;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEpgBO,SAASC,2BACd,YACoC;AACpC,SAAO,CAAC,cAAsB,YAC5BA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AClBA,IAAAC,uBAAiC;AAG1B,IAAMC,6BAGK,2DAAiBA,0BAA+B;","names":["listInstagramAccountMedia","import_rest_modules","payload","MediaType","WebhookIdentityType","listInstagramAccountMedia","sdkTransformError","listInstagramAccountMedia","import_rest_modules","listInstagramAccountMedia"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/instagram-feed-v1-instagram-media-media.universal.ts","../../src/instagram-feed-v1-instagram-media-media.http.ts","../../src/instagram-feed-v1-instagram-media-media.public.ts","../../src/instagram-feed-v1-instagram-media-media.context.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-media-media.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixInstagramFeedV1InstagramMedia from './instagram-feed-v1-instagram-media-media.http.js';\n\nexport interface Media {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /**\n * 2200 is the max length of a caption in Instagram\n * @maxLength 2200\n */\n caption?: string;\n /** The type of the media can be one of [Unknown, Image, Video, CarouselAlbum] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n /** Timestamp of the media */\n timestamp?: Date | null;\n /**\n * Children for CarouselAlbum\n * @maxSize 10\n */\n children?: Children[];\n}\n\nexport enum MediaType {\n UNKNOWN = 'UNKNOWN',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n CAROUSEL_ALBUM = 'CAROUSEL_ALBUM',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals =\n | MediaType\n | 'UNKNOWN'\n | 'IMAGE'\n | 'VIDEO'\n | 'CAROUSEL_ALBUM';\n\nexport interface Children {\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /** The type of the child media can be one of [Unknown, Image, Video] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n}\n\nexport interface InvalidateCache extends InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n /**\n * tell us why you're invalidating the cache. You don't need to add your app name\n * @maxLength 256\n */\n reason?: string | null;\n /** Is local DS */\n localDc?: boolean;\n hardPurge?: boolean;\n}\n\n/** @oneof */\nexport interface InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n}\n\nexport interface App {\n /**\n * The AppDefId\n * @minLength 1\n */\n appDefId?: string;\n /**\n * The instance Id\n * @format GUID\n */\n instanceId?: string;\n}\n\nexport interface Page {\n /**\n * the msid the page is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Page ID\n * @minLength 1\n */\n pageId?: string;\n}\n\nexport interface URI {\n /**\n * the msid the URI is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes\n * @minLength 1\n */\n uriPath?: string;\n}\n\nexport interface File {\n /**\n * the msid the file is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by filename (for media files such as PDFs)\n * @minLength 1\n * @maxLength 256\n */\n fileName?: string;\n}\n\nexport interface CustomTag {\n /**\n * the msid the tag is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Tag to invalidate by\n * @minLength 1\n * @maxLength 256\n */\n tag?: string;\n}\n\nexport interface ETagVerificationEvent {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** cursor query */\n cursorQuery?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface ListInstagramAccountMediaRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /** paging */\n paging?: CursorQuery;\n}\n\nexport interface ListInstagramAccountMediaResponse {\n /** instagram media */\n media?: Media[];\n /** paging metadata */\n paging?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\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 Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface 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\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n * @param connectionId - connection id\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_MEDIA\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia\n */\nexport async function listInstagramAccountMedia(\n connectionId: string,\n options?: ListInstagramAccountMediaOptions\n): Promise<\n NonNullablePaths<\n ListInstagramAccountMediaResponse,\n | `media`\n | `media.${number}._id`\n | `media.${number}.mediaId`\n | `media.${number}.caption`\n | `media.${number}.mediaType`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramMedia.listInstagramAccountMedia(\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 connectionId: '$[0]',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['connectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListInstagramAccountMediaOptions {\n /** paging */\n paging?: CursorQuery;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramMediaServiceUrl(\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_media';\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n */\nexport function listInstagramAccountMedia(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccountMedia({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_media',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramMediaServiceUrl({\n protoPath: '/v1/instagram-accounts/media/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'media.timestamp' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listInstagramAccountMedia;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListInstagramAccountMediaOptions,\n ListInstagramAccountMediaResponse,\n listInstagramAccountMedia as universalListInstagramAccountMedia,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/instagram' };\n\nexport function listInstagramAccountMedia(\n httpClient: HttpClient\n): ListInstagramAccountMediaSignature {\n return (connectionId: string, options?: ListInstagramAccountMediaOptions) =>\n universalListInstagramAccountMedia(\n connectionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListInstagramAccountMediaSignature {\n /**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n * @param - connection id\n */\n (connectionId: string, options?: ListInstagramAccountMediaOptions): Promise<\n NonNullablePaths<\n ListInstagramAccountMediaResponse,\n | `media`\n | `media.${number}._id`\n | `media.${number}.mediaId`\n | `media.${number}.caption`\n | `media.${number}.mediaType`,\n 4\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n App,\n Children,\n CursorPaging,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n CustomTag,\n DomainEvent,\n DomainEventBodyOneOf,\n ETagVerificationEvent,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n File,\n IdentificationData,\n IdentificationDataIdOneOf,\n InvalidateCache,\n InvalidateCacheGetByOneOf,\n ListInstagramAccountMediaOptions,\n ListInstagramAccountMediaRequest,\n ListInstagramAccountMediaResponse,\n Media,\n MediaType,\n MessageEnvelope,\n Page,\n PagingMetadataV2,\n RestoreInfo,\n URI,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n","import { listInstagramAccountMedia as publicListInstagramAccountMedia } from './instagram-feed-v1-instagram-media-media.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listInstagramAccountMedia: MaybeContext<\n BuildRESTFunction<typeof publicListInstagramAccountMedia> &\n typeof publicListInstagramAccountMedia\n> = /*#__PURE__*/ createRESTModule(publicListInstagramAccountMedia);\n\nexport {\n MediaType,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\nexport {\n Media,\n Children,\n InvalidateCache,\n InvalidateCacheGetByOneOf,\n App,\n Page,\n URI,\n File,\n CustomTag,\n ETagVerificationEvent,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorPaging,\n ListInstagramAccountMediaRequest,\n ListInstagramAccountMediaResponse,\n PagingMetadataV2,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n ListInstagramAccountMediaOptions,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\nexport {\n MediaTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mB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AM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,SAAS;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEpgBO,SAASC,2BACd,YACoC;AACpC,SAAO,CAAC,cAAsB,YAC5BA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AClBA,IAAAC,uBAAiC;AAG1B,IAAMC,6BAGK,2DAAiBA,0BAA+B;","names":["listInstagramAccountMedia","import_rest_modules","payload","MediaType","WebhookIdentityType","listInstagramAccountMedia","sdkTransformError","listInstagramAccountMedia","import_rest_modules","listInstagramAccountMedia"]}
|
|
@@ -392,19 +392,19 @@ declare enum WebhookIdentityType {
|
|
|
392
392
|
}
|
|
393
393
|
/** @enumType */
|
|
394
394
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
395
|
-
interface
|
|
395
|
+
interface AccountInfo {
|
|
396
396
|
/**
|
|
397
|
-
* ID of the account.
|
|
397
|
+
* ID of the Wix account associated with the event.
|
|
398
398
|
* @format GUID
|
|
399
399
|
*/
|
|
400
400
|
accountId?: string | null;
|
|
401
401
|
/**
|
|
402
|
-
* ID of the parent account.
|
|
402
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
403
403
|
* @format GUID
|
|
404
404
|
*/
|
|
405
405
|
parentAccountId?: string | null;
|
|
406
406
|
/**
|
|
407
|
-
* ID of the site
|
|
407
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
408
408
|
* @format GUID
|
|
409
409
|
*/
|
|
410
410
|
siteId?: string | null;
|
|
@@ -427,4 +427,4 @@ interface ListInstagramAccountMediaOptions {
|
|
|
427
427
|
paging?: CursorQuery;
|
|
428
428
|
}
|
|
429
429
|
|
|
430
|
-
export { type
|
|
430
|
+
export { type AccountInfo, type ActionEvent, type App, type Children, type CursorPaging, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomTag, type DomainEvent, type DomainEventBodyOneOf, type ETagVerificationEvent, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type File, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ListInstagramAccountMediaOptions, type ListInstagramAccountMediaRequest, type ListInstagramAccountMediaResponse, type Media, MediaType, type MediaTypeWithLiterals, type MessageEnvelope, type Page, type PagingMetadataV2, type RestoreInfo, type URI, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, listInstagramAccountMedia };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/instagram-feed-v1-instagram-media-media.universal.ts","../../src/instagram-feed-v1-instagram-media-media.http.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-media-media.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 ambassadorWixInstagramFeedV1InstagramMedia from './instagram-feed-v1-instagram-media-media.http.js';\n\nexport interface Media {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /**\n * 2200 is the max length of a caption in Instagram\n * @maxLength 2200\n */\n caption?: string;\n /** The type of the media can be one of [Unknown, Image, Video, CarouselAlbum] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n /** Timestamp of the media */\n timestamp?: Date | null;\n /**\n * Children for CarouselAlbum\n * @maxSize 10\n */\n children?: Children[];\n}\n\nexport enum MediaType {\n UNKNOWN = 'UNKNOWN',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n CAROUSEL_ALBUM = 'CAROUSEL_ALBUM',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals =\n | MediaType\n | 'UNKNOWN'\n | 'IMAGE'\n | 'VIDEO'\n | 'CAROUSEL_ALBUM';\n\nexport interface Children {\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /** The type of the child media can be one of [Unknown, Image, Video] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n}\n\nexport interface InvalidateCache extends InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n /**\n * tell us why you're invalidating the cache. You don't need to add your app name\n * @maxLength 256\n */\n reason?: string | null;\n /** Is local DS */\n localDc?: boolean;\n hardPurge?: boolean;\n}\n\n/** @oneof */\nexport interface InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n}\n\nexport interface App {\n /**\n * The AppDefId\n * @minLength 1\n */\n appDefId?: string;\n /**\n * The instance Id\n * @format GUID\n */\n instanceId?: string;\n}\n\nexport interface Page {\n /**\n * the msid the page is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Page ID\n * @minLength 1\n */\n pageId?: string;\n}\n\nexport interface URI {\n /**\n * the msid the URI is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes\n * @minLength 1\n */\n uriPath?: string;\n}\n\nexport interface File {\n /**\n * the msid the file is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by filename (for media files such as PDFs)\n * @minLength 1\n * @maxLength 256\n */\n fileName?: string;\n}\n\nexport interface CustomTag {\n /**\n * the msid the tag is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Tag to invalidate by\n * @minLength 1\n * @maxLength 256\n */\n tag?: string;\n}\n\nexport interface ETagVerificationEvent {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** cursor query */\n cursorQuery?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface ListInstagramAccountMediaRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /** paging */\n paging?: CursorQuery;\n}\n\nexport interface ListInstagramAccountMediaResponse {\n /** instagram media */\n media?: Media[];\n /** paging metadata */\n paging?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\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 Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n * @param connectionId - connection id\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_MEDIA\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia\n */\nexport async function listInstagramAccountMedia(\n connectionId: string,\n options?: ListInstagramAccountMediaOptions\n): Promise<\n NonNullablePaths<\n ListInstagramAccountMediaResponse,\n | `media`\n | `media.${number}._id`\n | `media.${number}.mediaId`\n | `media.${number}.caption`\n | `media.${number}.mediaType`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramMedia.listInstagramAccountMedia(\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 connectionId: '$[0]',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['connectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListInstagramAccountMediaOptions {\n /** paging */\n paging?: CursorQuery;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramMediaServiceUrl(\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_media';\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n */\nexport function listInstagramAccountMedia(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccountMedia({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_media',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramMediaServiceUrl({\n protoPath: '/v1/instagram-accounts/media/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'media.timestamp' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listInstagramAccountMedia;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM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,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,SAAS;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["listInstagramAccountMedia","import_rest_modules","payload","MediaType","WebhookIdentityType","listInstagramAccountMedia","sdkTransformError"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/instagram-feed-v1-instagram-media-media.universal.ts","../../src/instagram-feed-v1-instagram-media-media.http.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-media-media.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 ambassadorWixInstagramFeedV1InstagramMedia from './instagram-feed-v1-instagram-media-media.http.js';\n\nexport interface Media {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /**\n * 2200 is the max length of a caption in Instagram\n * @maxLength 2200\n */\n caption?: string;\n /** The type of the media can be one of [Unknown, Image, Video, CarouselAlbum] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n /** Timestamp of the media */\n timestamp?: Date | null;\n /**\n * Children for CarouselAlbum\n * @maxSize 10\n */\n children?: Children[];\n}\n\nexport enum MediaType {\n UNKNOWN = 'UNKNOWN',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n CAROUSEL_ALBUM = 'CAROUSEL_ALBUM',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals =\n | MediaType\n | 'UNKNOWN'\n | 'IMAGE'\n | 'VIDEO'\n | 'CAROUSEL_ALBUM';\n\nexport interface Children {\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /** The type of the child media can be one of [Unknown, Image, Video] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n}\n\nexport interface InvalidateCache extends InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n /**\n * tell us why you're invalidating the cache. You don't need to add your app name\n * @maxLength 256\n */\n reason?: string | null;\n /** Is local DS */\n localDc?: boolean;\n hardPurge?: boolean;\n}\n\n/** @oneof */\nexport interface InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n}\n\nexport interface App {\n /**\n * The AppDefId\n * @minLength 1\n */\n appDefId?: string;\n /**\n * The instance Id\n * @format GUID\n */\n instanceId?: string;\n}\n\nexport interface Page {\n /**\n * the msid the page is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Page ID\n * @minLength 1\n */\n pageId?: string;\n}\n\nexport interface URI {\n /**\n * the msid the URI is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes\n * @minLength 1\n */\n uriPath?: string;\n}\n\nexport interface File {\n /**\n * the msid the file is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by filename (for media files such as PDFs)\n * @minLength 1\n * @maxLength 256\n */\n fileName?: string;\n}\n\nexport interface CustomTag {\n /**\n * the msid the tag is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Tag to invalidate by\n * @minLength 1\n * @maxLength 256\n */\n tag?: string;\n}\n\nexport interface ETagVerificationEvent {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** cursor query */\n cursorQuery?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface ListInstagramAccountMediaRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /** paging */\n paging?: CursorQuery;\n}\n\nexport interface ListInstagramAccountMediaResponse {\n /** instagram media */\n media?: Media[];\n /** paging metadata */\n paging?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\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 Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface 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\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n * @param connectionId - connection id\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_MEDIA\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia\n */\nexport async function listInstagramAccountMedia(\n connectionId: string,\n options?: ListInstagramAccountMediaOptions\n): Promise<\n NonNullablePaths<\n ListInstagramAccountMediaResponse,\n | `media`\n | `media.${number}._id`\n | `media.${number}.mediaId`\n | `media.${number}.caption`\n | `media.${number}.mediaType`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramMedia.listInstagramAccountMedia(\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 connectionId: '$[0]',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['connectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListInstagramAccountMediaOptions {\n /** paging */\n paging?: CursorQuery;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramMediaServiceUrl(\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_media';\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n */\nexport function listInstagramAccountMedia(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccountMedia({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_media',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramMediaServiceUrl({\n protoPath: '/v1/instagram-accounts/media/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'media.timestamp' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listInstagramAccountMedia;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,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,I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ACA,CAAC,gBAAgB,SAAS;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["listInstagramAccountMedia","import_rest_modules","payload","MediaType","WebhookIdentityType","listInstagramAccountMedia","sdkTransformError"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -395,19 +395,19 @@ declare enum WebhookIdentityType {
|
|
|
395
395
|
}
|
|
396
396
|
/** @enumType */
|
|
397
397
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
398
|
-
interface
|
|
398
|
+
interface AccountInfo {
|
|
399
399
|
/**
|
|
400
|
-
* ID of the account.
|
|
400
|
+
* ID of the Wix account associated with the event.
|
|
401
401
|
* @format GUID
|
|
402
402
|
*/
|
|
403
403
|
accountId?: string | null;
|
|
404
404
|
/**
|
|
405
|
-
* ID of the parent account.
|
|
405
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
406
406
|
* @format GUID
|
|
407
407
|
*/
|
|
408
408
|
parentAccountId?: string | null;
|
|
409
409
|
/**
|
|
410
|
-
* ID of the site
|
|
410
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
411
411
|
* @format GUID
|
|
412
412
|
*/
|
|
413
413
|
siteId?: string | null;
|
|
@@ -427,4 +427,4 @@ declare function listInstagramAccountMedia(): __PublicMethodMetaInfo<'GET', {
|
|
|
427
427
|
connectionId: string;
|
|
428
428
|
}, ListInstagramAccountMediaRequest$1, ListInstagramAccountMediaRequest, ListInstagramAccountMediaResponse$1, ListInstagramAccountMediaResponse>;
|
|
429
429
|
|
|
430
|
-
export { type
|
|
430
|
+
export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type App as AppOriginal, type Children as ChildrenOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type CustomTag as CustomTagOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type ETagVerificationEvent as ETagVerificationEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type File as FileOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type InvalidateCacheGetByOneOf as InvalidateCacheGetByOneOfOriginal, type InvalidateCache as InvalidateCacheOriginal, type ListInstagramAccountMediaRequest as ListInstagramAccountMediaRequestOriginal, type ListInstagramAccountMediaResponse as ListInstagramAccountMediaResponseOriginal, type Media as MediaOriginal, MediaType as MediaTypeOriginal, type MediaTypeWithLiterals as MediaTypeWithLiteralsOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Page as PageOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type RestoreInfo as RestoreInfoOriginal, type URI as URIOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, listInstagramAccountMedia };
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/instagram-feed-v1-instagram-media-media.http.ts","../../src/instagram-feed-v1-instagram-media-media.types.ts","../../src/instagram-feed-v1-instagram-media-media.meta.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-media-media.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramMediaServiceUrl(\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_media';\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n */\nexport function listInstagramAccountMedia(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccountMedia({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_media',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramMediaServiceUrl({\n protoPath: '/v1/instagram-accounts/media/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'media.timestamp' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listInstagramAccountMedia;\n}\n","export interface Media {\n /**\n * @format GUID\n * @readonly\n */\n id?: string;\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /**\n * 2200 is the max length of a caption in Instagram\n * @maxLength 2200\n */\n caption?: string;\n /** The type of the media can be one of [Unknown, Image, Video, CarouselAlbum] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n /** Timestamp of the media */\n timestamp?: Date | null;\n /**\n * Children for CarouselAlbum\n * @maxSize 10\n */\n children?: Children[];\n}\n\nexport enum MediaType {\n UNKNOWN = 'UNKNOWN',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n CAROUSEL_ALBUM = 'CAROUSEL_ALBUM',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals =\n | MediaType\n | 'UNKNOWN'\n | 'IMAGE'\n | 'VIDEO'\n | 'CAROUSEL_ALBUM';\n\nexport interface Children {\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /** The type of the child media can be one of [Unknown, Image, Video] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n}\n\nexport interface InvalidateCache extends InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n /**\n * tell us why you're invalidating the cache. You don't need to add your app name\n * @maxLength 256\n */\n reason?: string | null;\n /** Is local DS */\n localDc?: boolean;\n hardPurge?: boolean;\n}\n\n/** @oneof */\nexport interface InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n}\n\nexport interface App {\n /**\n * The AppDefId\n * @minLength 1\n */\n appDefId?: string;\n /**\n * The instance Id\n * @format GUID\n */\n instanceId?: string;\n}\n\nexport interface Page {\n /**\n * the msid the page is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Page ID\n * @minLength 1\n */\n pageId?: string;\n}\n\nexport interface URI {\n /**\n * the msid the URI is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes\n * @minLength 1\n */\n uriPath?: string;\n}\n\nexport interface File {\n /**\n * the msid the file is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by filename (for media files such as PDFs)\n * @minLength 1\n * @maxLength 256\n */\n fileName?: string;\n}\n\nexport interface CustomTag {\n /**\n * the msid the tag is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Tag to invalidate by\n * @minLength 1\n * @maxLength 256\n */\n tag?: string;\n}\n\nexport interface ETagVerificationEvent {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** cursor query */\n cursorQuery?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface ListInstagramAccountMediaRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /** paging */\n paging?: CursorQuery;\n}\n\nexport interface ListInstagramAccountMediaResponse {\n /** instagram media */\n media?: Media[];\n /** paging metadata */\n paging?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\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 Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n","import * as ambassadorWixInstagramFeedV1InstagramMedia from './instagram-feed-v1-instagram-media-media.http.js';\nimport * as ambassadorWixInstagramFeedV1InstagramMediaTypes from './instagram-feed-v1-instagram-media-media.types.js';\nimport * as ambassadorWixInstagramFeedV1InstagramMediaUniversalTypes from './instagram-feed-v1-instagram-media-media.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 listInstagramAccountMedia(): __PublicMethodMetaInfo<\n 'GET',\n { connectionId: string },\n ambassadorWixInstagramFeedV1InstagramMediaUniversalTypes.ListInstagramAccountMediaRequest,\n ambassadorWixInstagramFeedV1InstagramMediaTypes.ListInstagramAccountMediaRequest,\n ambassadorWixInstagramFeedV1InstagramMediaUniversalTypes.ListInstagramAccountMediaResponse,\n ambassadorWixInstagramFeedV1InstagramMediaTypes.ListInstagramAccountMediaResponse\n> {\n const payload = { connectionId: ':connectionId' } as any;\n\n const getRequestOptions =\n ambassadorWixInstagramFeedV1InstagramMedia.listInstagramAccountMedia(\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/media/{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 {\n Media as MediaOriginal,\n MediaType as MediaTypeOriginal,\n MediaTypeWithLiterals as MediaTypeWithLiteralsOriginal,\n Children as ChildrenOriginal,\n InvalidateCache as InvalidateCacheOriginal,\n InvalidateCacheGetByOneOf as InvalidateCacheGetByOneOfOriginal,\n App as AppOriginal,\n Page as PageOriginal,\n URI as URIOriginal,\n File as FileOriginal,\n CustomTag as CustomTagOriginal,\n ETagVerificationEvent as ETagVerificationEventOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n CursorPaging as CursorPagingOriginal,\n ListInstagramAccountMediaRequest as ListInstagramAccountMediaRequestOriginal,\n ListInstagramAccountMediaResponse as ListInstagramAccountMediaResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountDetails as AccountDetailsOriginal,\n} from './instagram-feed-v1-instagram-media-media.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA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R,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,8CAA8C;AAAA,QACjD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,YAAQ,uCAAkB,OAAO;AAAA,MACjC,mBAAmB,CAACC,iBAClB,uCAAeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAAA,QACrC;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACzFO,IAAK,YAAL,kBAAKC,eAAL;AACL,EAAAA,WAAA,aAAU;AACV,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,oBAAiB;AAJP,SAAAA;AAAA,GAAA;AAyXL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,uBAAoB;AACpB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;AC7YL,SAASC,6BAOd;AACA,QAAM,UAAU,EAAE,cAAc,gBAAgB;AAEhD,QAAM,oBACuC;AAAA,IACzC;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,cAAc,eAAe;AAAA,IAC3C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["listInstagramAccountMedia","import_rest_modules","payload","MediaType","WebhookIdentityType","listInstagramAccountMedia"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/instagram-feed-v1-instagram-media-media.http.ts","../../src/instagram-feed-v1-instagram-media-media.types.ts","../../src/instagram-feed-v1-instagram-media-media.meta.ts"],"sourcesContent":["export * from './src/instagram-feed-v1-instagram-media-media.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramMediaServiceUrl(\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_media';\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n */\nexport function listInstagramAccountMedia(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccountMedia({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_media',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramMediaServiceUrl({\n protoPath: '/v1/instagram-accounts/media/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'media.timestamp' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listInstagramAccountMedia;\n}\n","export interface Media {\n /**\n * @format GUID\n * @readonly\n */\n id?: string;\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /**\n * 2200 is the max length of a caption in Instagram\n * @maxLength 2200\n */\n caption?: string;\n /** The type of the media can be one of [Unknown, Image, Video, CarouselAlbum] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n /** Timestamp of the media */\n timestamp?: Date | null;\n /**\n * Children for CarouselAlbum\n * @maxSize 10\n */\n children?: Children[];\n}\n\nexport enum MediaType {\n UNKNOWN = 'UNKNOWN',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n CAROUSEL_ALBUM = 'CAROUSEL_ALBUM',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals =\n | MediaType\n | 'UNKNOWN'\n | 'IMAGE'\n | 'VIDEO'\n | 'CAROUSEL_ALBUM';\n\nexport interface Children {\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /** The type of the child media can be one of [Unknown, Image, Video] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n}\n\nexport interface InvalidateCache extends InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n /**\n * tell us why you're invalidating the cache. You don't need to add your app name\n * @maxLength 256\n */\n reason?: string | null;\n /** Is local DS */\n localDc?: boolean;\n hardPurge?: boolean;\n}\n\n/** @oneof */\nexport interface InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n}\n\nexport interface App {\n /**\n * The AppDefId\n * @minLength 1\n */\n appDefId?: string;\n /**\n * The instance Id\n * @format GUID\n */\n instanceId?: string;\n}\n\nexport interface Page {\n /**\n * the msid the page is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Page ID\n * @minLength 1\n */\n pageId?: string;\n}\n\nexport interface URI {\n /**\n * the msid the URI is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes\n * @minLength 1\n */\n uriPath?: string;\n}\n\nexport interface File {\n /**\n * the msid the file is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by filename (for media files such as PDFs)\n * @minLength 1\n * @maxLength 256\n */\n fileName?: string;\n}\n\nexport interface CustomTag {\n /**\n * the msid the tag is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Tag to invalidate by\n * @minLength 1\n * @maxLength 256\n */\n tag?: string;\n}\n\nexport interface ETagVerificationEvent {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** cursor query */\n cursorQuery?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface ListInstagramAccountMediaRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /** paging */\n paging?: CursorQuery;\n}\n\nexport interface ListInstagramAccountMediaResponse {\n /** instagram media */\n media?: Media[];\n /** paging metadata */\n paging?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\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 Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface 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","import * as ambassadorWixInstagramFeedV1InstagramMedia from './instagram-feed-v1-instagram-media-media.http.js';\nimport * as ambassadorWixInstagramFeedV1InstagramMediaTypes from './instagram-feed-v1-instagram-media-media.types.js';\nimport * as ambassadorWixInstagramFeedV1InstagramMediaUniversalTypes from './instagram-feed-v1-instagram-media-media.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 listInstagramAccountMedia(): __PublicMethodMetaInfo<\n 'GET',\n { connectionId: string },\n ambassadorWixInstagramFeedV1InstagramMediaUniversalTypes.ListInstagramAccountMediaRequest,\n ambassadorWixInstagramFeedV1InstagramMediaTypes.ListInstagramAccountMediaRequest,\n ambassadorWixInstagramFeedV1InstagramMediaUniversalTypes.ListInstagramAccountMediaResponse,\n ambassadorWixInstagramFeedV1InstagramMediaTypes.ListInstagramAccountMediaResponse\n> {\n const payload = { connectionId: ':connectionId' } as any;\n\n const getRequestOptions =\n ambassadorWixInstagramFeedV1InstagramMedia.listInstagramAccountMedia(\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/media/{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 {\n Media as MediaOriginal,\n MediaType as MediaTypeOriginal,\n MediaTypeWithLiterals as MediaTypeWithLiteralsOriginal,\n Children as ChildrenOriginal,\n InvalidateCache as InvalidateCacheOriginal,\n InvalidateCacheGetByOneOf as InvalidateCacheGetByOneOfOriginal,\n App as AppOriginal,\n Page as PageOriginal,\n URI as URIOriginal,\n File as FileOriginal,\n CustomTag as CustomTagOriginal,\n ETagVerificationEvent as ETagVerificationEventOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n CursorPaging as CursorPagingOriginal,\n ListInstagramAccountMediaRequest as ListInstagramAccountMediaRequestOriginal,\n ListInstagramAccountMediaResponse as ListInstagramAccountMediaResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n} from './instagram-feed-v1-instagram-media-media.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAAA;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,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;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;A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Ac,gBAAgB;AAEhD,QAAM,oBACuC;AAAA,IACzC;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,cAAc,eAAe;AAAA,IAC3C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["listInstagramAccountMedia","import_rest_modules","payload","MediaType","WebhookIdentityType","listInstagramAccountMedia"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { ListInstagramAccountMediaOptions, ListInstagramAccountMediaResponse } from './index.typings.mjs';
|
|
3
|
-
export {
|
|
3
|
+
export { AccountInfo, ActionEvent, App, Children, CursorPaging, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomTag, DomainEvent, DomainEventBodyOneOf, ETagVerificationEvent, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, File, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ListInstagramAccountMediaRequest, Media, MediaType, MediaTypeWithLiterals, MessageEnvelope, Page, PagingMetadataV2, RestoreInfo, URI, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function listInstagramAccountMedia$1(httpClient: HttpClient): ListInstagramAccountMediaSignature;
|
|
6
6
|
interface ListInstagramAccountMediaSignature {
|
package/build/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/instagram-feed-v1-instagram-media-media.universal.ts","../../src/instagram-feed-v1-instagram-media-media.http.ts","../../src/instagram-feed-v1-instagram-media-media.public.ts","../../src/instagram-feed-v1-instagram-media-media.context.ts"],"sourcesContent":["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 ambassadorWixInstagramFeedV1InstagramMedia from './instagram-feed-v1-instagram-media-media.http.js';\n\nexport interface Media {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /**\n * 2200 is the max length of a caption in Instagram\n * @maxLength 2200\n */\n caption?: string;\n /** The type of the media can be one of [Unknown, Image, Video, CarouselAlbum] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n /** Timestamp of the media */\n timestamp?: Date | null;\n /**\n * Children for CarouselAlbum\n * @maxSize 10\n */\n children?: Children[];\n}\n\nexport enum MediaType {\n UNKNOWN = 'UNKNOWN',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n CAROUSEL_ALBUM = 'CAROUSEL_ALBUM',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals =\n | MediaType\n | 'UNKNOWN'\n | 'IMAGE'\n | 'VIDEO'\n | 'CAROUSEL_ALBUM';\n\nexport interface Children {\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /** The type of the child media can be one of [Unknown, Image, Video] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n}\n\nexport interface InvalidateCache extends InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n /**\n * tell us why you're invalidating the cache. You don't need to add your app name\n * @maxLength 256\n */\n reason?: string | null;\n /** Is local DS */\n localDc?: boolean;\n hardPurge?: boolean;\n}\n\n/** @oneof */\nexport interface InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n}\n\nexport interface App {\n /**\n * The AppDefId\n * @minLength 1\n */\n appDefId?: string;\n /**\n * The instance Id\n * @format GUID\n */\n instanceId?: string;\n}\n\nexport interface Page {\n /**\n * the msid the page is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Page ID\n * @minLength 1\n */\n pageId?: string;\n}\n\nexport interface URI {\n /**\n * the msid the URI is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes\n * @minLength 1\n */\n uriPath?: string;\n}\n\nexport interface File {\n /**\n * the msid the file is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by filename (for media files such as PDFs)\n * @minLength 1\n * @maxLength 256\n */\n fileName?: string;\n}\n\nexport interface CustomTag {\n /**\n * the msid the tag is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Tag to invalidate by\n * @minLength 1\n * @maxLength 256\n */\n tag?: string;\n}\n\nexport interface ETagVerificationEvent {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** cursor query */\n cursorQuery?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface ListInstagramAccountMediaRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /** paging */\n paging?: CursorQuery;\n}\n\nexport interface ListInstagramAccountMediaResponse {\n /** instagram media */\n media?: Media[];\n /** paging metadata */\n paging?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\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 Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n * @param connectionId - connection id\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_MEDIA\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia\n */\nexport async function listInstagramAccountMedia(\n connectionId: string,\n options?: ListInstagramAccountMediaOptions\n): Promise<\n NonNullablePaths<\n ListInstagramAccountMediaResponse,\n | `media`\n | `media.${number}._id`\n | `media.${number}.mediaId`\n | `media.${number}.caption`\n | `media.${number}.mediaType`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramMedia.listInstagramAccountMedia(\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 connectionId: '$[0]',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['connectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListInstagramAccountMediaOptions {\n /** paging */\n paging?: CursorQuery;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramMediaServiceUrl(\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_media';\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n */\nexport function listInstagramAccountMedia(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccountMedia({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_media',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramMediaServiceUrl({\n protoPath: '/v1/instagram-accounts/media/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'media.timestamp' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listInstagramAccountMedia;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListInstagramAccountMediaOptions,\n ListInstagramAccountMediaResponse,\n listInstagramAccountMedia as universalListInstagramAccountMedia,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/instagram' };\n\nexport function listInstagramAccountMedia(\n httpClient: HttpClient\n): ListInstagramAccountMediaSignature {\n return (connectionId: string, options?: ListInstagramAccountMediaOptions) =>\n universalListInstagramAccountMedia(\n connectionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListInstagramAccountMediaSignature {\n /**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n * @param - connection id\n */\n (connectionId: string, options?: ListInstagramAccountMediaOptions): Promise<\n NonNullablePaths<\n ListInstagramAccountMediaResponse,\n | `media`\n | `media.${number}._id`\n | `media.${number}.mediaId`\n | `media.${number}.caption`\n | `media.${number}.mediaType`,\n 4\n >\n >;\n}\n\nexport {\n AccountDetails,\n ActionEvent,\n App,\n Children,\n CursorPaging,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n CustomTag,\n DomainEvent,\n DomainEventBodyOneOf,\n ETagVerificationEvent,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n File,\n IdentificationData,\n IdentificationDataIdOneOf,\n InvalidateCache,\n InvalidateCacheGetByOneOf,\n ListInstagramAccountMediaOptions,\n ListInstagramAccountMediaRequest,\n ListInstagramAccountMediaResponse,\n Media,\n MediaType,\n MessageEnvelope,\n Page,\n PagingMetadataV2,\n RestoreInfo,\n URI,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n","import { listInstagramAccountMedia as publicListInstagramAccountMedia } from './instagram-feed-v1-instagram-media-media.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listInstagramAccountMedia: MaybeContext<\n BuildRESTFunction<typeof publicListInstagramAccountMedia> &\n typeof publicListInstagramAccountMedia\n> = /*#__PURE__*/ createRESTModule(publicListInstagramAccountMedia);\n\nexport {\n MediaType,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\nexport {\n Media,\n Children,\n InvalidateCache,\n InvalidateCacheGetByOneOf,\n App,\n Page,\n URI,\n File,\n CustomTag,\n ETagVerificationEvent,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorPaging,\n ListInstagramAccountMediaRequest,\n ListInstagramAccountMediaResponse,\n PagingMetadataV2,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountDetails,\n ListInstagramAccountMediaOptions,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\nexport {\n MediaTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAA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AAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,SAAS;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEpgBO,SAASC,2BACd,YACoC;AACpC,SAAO,CAAC,cAAsB,YAC5BA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AClBA,SAAS,wBAAwB;AAG1B,IAAMC,6BAGK,iCAAiBA,0BAA+B;","names":["payload","MediaType","WebhookIdentityType","listInstagramAccountMedia","listInstagramAccountMedia","listInstagramAccountMedia"]}
|
|
1
|
+
{"version":3,"sources":["../../src/instagram-feed-v1-instagram-media-media.universal.ts","../../src/instagram-feed-v1-instagram-media-media.http.ts","../../src/instagram-feed-v1-instagram-media-media.public.ts","../../src/instagram-feed-v1-instagram-media-media.context.ts"],"sourcesContent":["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 ambassadorWixInstagramFeedV1InstagramMedia from './instagram-feed-v1-instagram-media-media.http.js';\n\nexport interface Media {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /**\n * 2200 is the max length of a caption in Instagram\n * @maxLength 2200\n */\n caption?: string;\n /** The type of the media can be one of [Unknown, Image, Video, CarouselAlbum] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n /** Timestamp of the media */\n timestamp?: Date | null;\n /**\n * Children for CarouselAlbum\n * @maxSize 10\n */\n children?: Children[];\n}\n\nexport enum MediaType {\n UNKNOWN = 'UNKNOWN',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n CAROUSEL_ALBUM = 'CAROUSEL_ALBUM',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals =\n | MediaType\n | 'UNKNOWN'\n | 'IMAGE'\n | 'VIDEO'\n | 'CAROUSEL_ALBUM';\n\nexport interface Children {\n /**\n * The id of the media\n * @maxLength 30\n */\n mediaId?: string;\n /** The type of the child media can be one of [Unknown, Image, Video] */\n mediaType?: MediaTypeWithLiterals;\n /**\n * Base media url\n * @maxLength 2000\n */\n mediaUrl?: string | null;\n /**\n * Permalink to post\n * @maxLength 2000\n */\n permalink?: string | null;\n /**\n * Thumbnail url\n * @maxLength 2000\n */\n thumbnailUrl?: string | null;\n}\n\nexport interface InvalidateCache extends InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n /**\n * tell us why you're invalidating the cache. You don't need to add your app name\n * @maxLength 256\n */\n reason?: string | null;\n /** Is local DS */\n localDc?: boolean;\n hardPurge?: boolean;\n}\n\n/** @oneof */\nexport interface InvalidateCacheGetByOneOf {\n /**\n * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n * @format GUID\n */\n siteId?: string;\n /** Invalidate by App */\n app?: App;\n /** Invalidate by page id */\n page?: Page;\n /** Invalidate by URI path */\n uri?: URI;\n /** Invalidate by file (for media files such as PDFs) */\n file?: File;\n /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n customTag?: CustomTag;\n}\n\nexport interface App {\n /**\n * The AppDefId\n * @minLength 1\n */\n appDefId?: string;\n /**\n * The instance Id\n * @format GUID\n */\n instanceId?: string;\n}\n\nexport interface Page {\n /**\n * the msid the page is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by Page ID\n * @minLength 1\n */\n pageId?: string;\n}\n\nexport interface URI {\n /**\n * the msid the URI is on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes\n * @minLength 1\n */\n uriPath?: string;\n}\n\nexport interface File {\n /**\n * the msid the file is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by filename (for media files such as PDFs)\n * @minLength 1\n * @maxLength 256\n */\n fileName?: string;\n}\n\nexport interface CustomTag {\n /**\n * the msid the tag is related to\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Tag to invalidate by\n * @minLength 1\n * @maxLength 256\n */\n tag?: string;\n}\n\nexport interface ETagVerificationEvent {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId?: string;\n /** cursor query */\n cursorQuery?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface ListInstagramAccountMediaRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /** paging */\n paging?: CursorQuery;\n}\n\nexport interface ListInstagramAccountMediaResponse {\n /** instagram media */\n media?: Media[];\n /** paging metadata */\n paging?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\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 Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface 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\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n * @param connectionId - connection id\n * @public\n * @documentationMaturity preview\n * @requiredField connectionId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_MEDIA\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia\n */\nexport async function listInstagramAccountMedia(\n connectionId: string,\n options?: ListInstagramAccountMediaOptions\n): Promise<\n NonNullablePaths<\n ListInstagramAccountMediaResponse,\n | `media`\n | `media.${number}._id`\n | `media.${number}.mediaId`\n | `media.${number}.caption`\n | `media.${number}.mediaType`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n connectionId: connectionId,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramMedia.listInstagramAccountMedia(\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 connectionId: '$[0]',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['connectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListInstagramAccountMediaOptions {\n /** paging */\n paging?: CursorQuery;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixInstagramV1InstagramMediaServiceUrl(\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_media';\n\n/**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n */\nexport function listInstagramAccountMedia(\n payload: object\n): RequestOptionsFactory<any> {\n function __listInstagramAccountMedia({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_media',\n method: 'GET' as any,\n methodFqn:\n 'wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramMediaServiceUrl({\n protoPath: '/v1/instagram-accounts/media/{connectionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'media.timestamp' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listInstagramAccountMedia;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListInstagramAccountMediaOptions,\n ListInstagramAccountMediaResponse,\n listInstagramAccountMedia as universalListInstagramAccountMedia,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/instagram' };\n\nexport function listInstagramAccountMedia(\n httpClient: HttpClient\n): ListInstagramAccountMediaSignature {\n return (connectionId: string, options?: ListInstagramAccountMediaOptions) =>\n universalListInstagramAccountMedia(\n connectionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListInstagramAccountMediaSignature {\n /**\n * Get media from instagram account.\n *\n * Returns list of instagram media including all albums content.\n * @param - connection id\n */\n (connectionId: string, options?: ListInstagramAccountMediaOptions): Promise<\n NonNullablePaths<\n ListInstagramAccountMediaResponse,\n | `media`\n | `media.${number}._id`\n | `media.${number}.mediaId`\n | `media.${number}.caption`\n | `media.${number}.mediaType`,\n 4\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n App,\n Children,\n CursorPaging,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n CustomTag,\n DomainEvent,\n DomainEventBodyOneOf,\n ETagVerificationEvent,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n File,\n IdentificationData,\n IdentificationDataIdOneOf,\n InvalidateCache,\n InvalidateCacheGetByOneOf,\n ListInstagramAccountMediaOptions,\n ListInstagramAccountMediaRequest,\n ListInstagramAccountMediaResponse,\n Media,\n MediaType,\n MessageEnvelope,\n Page,\n PagingMetadataV2,\n RestoreInfo,\n URI,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n","import { listInstagramAccountMedia as publicListInstagramAccountMedia } from './instagram-feed-v1-instagram-media-media.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listInstagramAccountMedia: MaybeContext<\n BuildRESTFunction<typeof publicListInstagramAccountMedia> &\n typeof publicListInstagramAccountMedia\n> = /*#__PURE__*/ createRESTModule(publicListInstagramAccountMedia);\n\nexport {\n MediaType,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\nexport {\n Media,\n Children,\n InvalidateCache,\n InvalidateCacheGetByOneOf,\n App,\n Page,\n URI,\n File,\n CustomTag,\n ETagVerificationEvent,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorPaging,\n ListInstagramAccountMediaRequest,\n ListInstagramAccountMediaResponse,\n PagingMetadataV2,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n ListInstagramAccountMediaOptions,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\nexport {\n MediaTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,8CACP,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;AAA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;AACV,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,WAAQ;AACR,EAAAA,WAAA,oBAAiB;AAJP,SAAAA;AAAA,GAAA;AAuXL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,uBAAoB;AACpB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;AA+CZ,eAAsBC,2BACpB,cACA,SAWA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,IACA,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UACuC;AAAA,IACzC;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,SAAS;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEpgBO,SAASC,2BACd,YACoC;AACpC,SAAO,CAAC,cAAsB,YAC5BA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AClBA,SAAS,wBAAwB;AAG1B,IAAMC,6BAGK,iCAAiBA,0BAA+B;","names":["payload","MediaType","WebhookIdentityType","listInstagramAccountMedia","listInstagramAccountMedia","listInstagramAccountMedia"]}
|
|
@@ -392,19 +392,19 @@ declare enum WebhookIdentityType {
|
|
|
392
392
|
}
|
|
393
393
|
/** @enumType */
|
|
394
394
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
395
|
-
interface
|
|
395
|
+
interface AccountInfo {
|
|
396
396
|
/**
|
|
397
|
-
* ID of the account.
|
|
397
|
+
* ID of the Wix account associated with the event.
|
|
398
398
|
* @format GUID
|
|
399
399
|
*/
|
|
400
400
|
accountId?: string | null;
|
|
401
401
|
/**
|
|
402
|
-
* ID of the parent account.
|
|
402
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
403
403
|
* @format GUID
|
|
404
404
|
*/
|
|
405
405
|
parentAccountId?: string | null;
|
|
406
406
|
/**
|
|
407
|
-
* ID of the site
|
|
407
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
408
408
|
* @format GUID
|
|
409
409
|
*/
|
|
410
410
|
siteId?: string | null;
|
|
@@ -427,4 +427,4 @@ interface ListInstagramAccountMediaOptions {
|
|
|
427
427
|
paging?: CursorQuery;
|
|
428
428
|
}
|
|
429
429
|
|
|
430
|
-
export { type
|
|
430
|
+
export { type AccountInfo, type ActionEvent, type App, type Children, type CursorPaging, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomTag, type DomainEvent, type DomainEventBodyOneOf, type ETagVerificationEvent, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type File, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ListInstagramAccountMediaOptions, type ListInstagramAccountMediaRequest, type ListInstagramAccountMediaResponse, type Media, MediaType, type MediaTypeWithLiterals, type MessageEnvelope, type Page, type PagingMetadataV2, type RestoreInfo, type URI, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, listInstagramAccountMedia };
|