@wix/auto_sdk_instagram_media 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +18 -0
- package/build/cjs/index.js +215 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +413 -0
- package/build/cjs/index.typings.js +201 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +413 -0
- package/build/cjs/meta.js +188 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +18 -0
- package/build/es/index.mjs +189 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +413 -0
- package/build/es/index.typings.mjs +175 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +413 -0
- package/build/es/meta.mjs +159 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +18 -0
- package/build/internal/cjs/index.js +215 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +413 -0
- package/build/internal/cjs/index.typings.js +201 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +413 -0
- package/build/internal/cjs/meta.js +188 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/es/index.d.mts +18 -0
- package/build/internal/es/index.mjs +189 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +413 -0
- package/build/internal/es/index.typings.mjs +175 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +413 -0
- package/build/internal/es/meta.mjs +159 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { ListInstagramAccountMediaOptions, ListInstagramAccountMediaResponse } from './index.typings.js';
|
|
3
|
+
export { 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
|
+
|
|
5
|
+
declare function listInstagramAccountMedia$1(httpClient: HttpClient): ListInstagramAccountMediaSignature;
|
|
6
|
+
interface ListInstagramAccountMediaSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Get media from instagram account.
|
|
9
|
+
*
|
|
10
|
+
* Returns list of instagram media including all albums content.
|
|
11
|
+
* @param - connection id
|
|
12
|
+
*/
|
|
13
|
+
(connectionId: string, options?: ListInstagramAccountMediaOptions): Promise<NonNullablePaths<ListInstagramAccountMediaResponse, `media` | `media.${number}._id` | `media.${number}.mediaId` | `media.${number}.caption` | `media.${number}.mediaType`, 4>>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const listInstagramAccountMedia: MaybeContext<BuildRESTFunction<typeof listInstagramAccountMedia$1> & typeof listInstagramAccountMedia$1>;
|
|
17
|
+
|
|
18
|
+
export { ListInstagramAccountMediaOptions, ListInstagramAccountMediaResponse, listInstagramAccountMedia };
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
MediaType: () => MediaType,
|
|
24
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
25
|
+
listInstagramAccountMedia: () => listInstagramAccountMedia4
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
|
+
|
|
29
|
+
// src/instagram-feed-v1-instagram-media-media.universal.ts
|
|
30
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
31
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
32
|
+
|
|
33
|
+
// src/instagram-feed-v1-instagram-media-media.http.ts
|
|
34
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
35
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
36
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
37
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
38
|
+
function resolveWixInstagramV1InstagramMediaServiceUrl(opts) {
|
|
39
|
+
const domainToMappings = {
|
|
40
|
+
"bo._base_domain_": [
|
|
41
|
+
{
|
|
42
|
+
srcPath: "/instagram-accounts",
|
|
43
|
+
destPath: ""
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"wixbo.ai": [
|
|
47
|
+
{
|
|
48
|
+
srcPath: "/instagram-accounts",
|
|
49
|
+
destPath: ""
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"wix-bo.com": [
|
|
53
|
+
{
|
|
54
|
+
srcPath: "/instagram-accounts",
|
|
55
|
+
destPath: ""
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"instagram_integration.wixapps.net": [
|
|
59
|
+
{
|
|
60
|
+
srcPath: "/instagram-accounts",
|
|
61
|
+
destPath: ""
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"manage._base_domain_": [
|
|
65
|
+
{
|
|
66
|
+
srcPath: "/instagram-accounts",
|
|
67
|
+
destPath: ""
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"editor.wixapps.net": [
|
|
71
|
+
{
|
|
72
|
+
srcPath: "/instagram-accounts",
|
|
73
|
+
destPath: ""
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"editor._base_domain_": [
|
|
77
|
+
{
|
|
78
|
+
srcPath: "/instagram-accounts",
|
|
79
|
+
destPath: ""
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"blocks._base_domain_": [
|
|
83
|
+
{
|
|
84
|
+
srcPath: "/instagram-accounts",
|
|
85
|
+
destPath: ""
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"create.editorx": [
|
|
89
|
+
{
|
|
90
|
+
srcPath: "/instagram-accounts",
|
|
91
|
+
destPath: ""
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
_: [
|
|
95
|
+
{
|
|
96
|
+
srcPath: "/_api/instagram-accounts/v1",
|
|
97
|
+
destPath: "/v1"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"*.dev.wix-code.com": [
|
|
101
|
+
{
|
|
102
|
+
srcPath: "/_api/instagram-accounts/v1",
|
|
103
|
+
destPath: "/v1"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"api._api_base_domain_": [
|
|
107
|
+
{
|
|
108
|
+
srcPath: "/instagram-accounts",
|
|
109
|
+
destPath: ""
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
srcPath: "/_api/instagram-accounts",
|
|
113
|
+
destPath: ""
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
};
|
|
117
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
118
|
+
}
|
|
119
|
+
var PACKAGE_NAME = "@wix/auto_sdk_instagram_media";
|
|
120
|
+
function listInstagramAccountMedia(payload) {
|
|
121
|
+
function __listInstagramAccountMedia({ host }) {
|
|
122
|
+
const metadata = {
|
|
123
|
+
entityFqdn: "wix.instagram_feed.v1.instagram_media",
|
|
124
|
+
method: "GET",
|
|
125
|
+
methodFqn: "wix.instagram.v1.InstagramMediaService.ListInstagramAccountMedia",
|
|
126
|
+
packageName: PACKAGE_NAME,
|
|
127
|
+
migrationOptions: {
|
|
128
|
+
optInTransformResponse: true
|
|
129
|
+
},
|
|
130
|
+
url: resolveWixInstagramV1InstagramMediaServiceUrl({
|
|
131
|
+
protoPath: "/v1/instagram-accounts/media/{connectionId}",
|
|
132
|
+
data: payload,
|
|
133
|
+
host
|
|
134
|
+
}),
|
|
135
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
136
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
137
|
+
{
|
|
138
|
+
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
139
|
+
paths: [{ path: "media.timestamp" }]
|
|
140
|
+
}
|
|
141
|
+
])
|
|
142
|
+
};
|
|
143
|
+
return metadata;
|
|
144
|
+
}
|
|
145
|
+
return __listInstagramAccountMedia;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// src/instagram-feed-v1-instagram-media-media.universal.ts
|
|
149
|
+
var MediaType = /* @__PURE__ */ ((MediaType2) => {
|
|
150
|
+
MediaType2["UNKNOWN"] = "UNKNOWN";
|
|
151
|
+
MediaType2["IMAGE"] = "IMAGE";
|
|
152
|
+
MediaType2["VIDEO"] = "VIDEO";
|
|
153
|
+
MediaType2["CAROUSEL_ALBUM"] = "CAROUSEL_ALBUM";
|
|
154
|
+
return MediaType2;
|
|
155
|
+
})(MediaType || {});
|
|
156
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
157
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
158
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
159
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
160
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
161
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
162
|
+
return WebhookIdentityType2;
|
|
163
|
+
})(WebhookIdentityType || {});
|
|
164
|
+
async function listInstagramAccountMedia2(connectionId, options) {
|
|
165
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
166
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
167
|
+
connectionId,
|
|
168
|
+
paging: options?.paging
|
|
169
|
+
});
|
|
170
|
+
const reqOpts = listInstagramAccountMedia(
|
|
171
|
+
payload
|
|
172
|
+
);
|
|
173
|
+
sideEffects?.onSiteCall?.();
|
|
174
|
+
try {
|
|
175
|
+
const result = await httpClient.request(reqOpts);
|
|
176
|
+
sideEffects?.onSuccess?.(result);
|
|
177
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
178
|
+
} catch (err) {
|
|
179
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
180
|
+
err,
|
|
181
|
+
{
|
|
182
|
+
spreadPathsToArguments: {},
|
|
183
|
+
explicitPathsToArguments: {
|
|
184
|
+
connectionId: "$[0]",
|
|
185
|
+
paging: "$[1].paging"
|
|
186
|
+
},
|
|
187
|
+
singleArgumentUnchanged: false
|
|
188
|
+
},
|
|
189
|
+
["connectionId", "options"]
|
|
190
|
+
);
|
|
191
|
+
sideEffects?.onError?.(err);
|
|
192
|
+
throw transformedError;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// src/instagram-feed-v1-instagram-media-media.public.ts
|
|
197
|
+
function listInstagramAccountMedia3(httpClient) {
|
|
198
|
+
return (connectionId, options) => listInstagramAccountMedia2(
|
|
199
|
+
connectionId,
|
|
200
|
+
options,
|
|
201
|
+
// @ts-ignore
|
|
202
|
+
{ httpClient }
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// src/instagram-feed-v1-instagram-media-media.context.ts
|
|
207
|
+
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
208
|
+
var listInstagramAccountMedia4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listInstagramAccountMedia3);
|
|
209
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
210
|
+
0 && (module.exports = {
|
|
211
|
+
MediaType,
|
|
212
|
+
WebhookIdentityType,
|
|
213
|
+
listInstagramAccountMedia
|
|
214
|
+
});
|
|
215
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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\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 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 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;AA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AG1B,IAAMC,6BAGK,2DAAiBA,0BAA+B;","names":["listInstagramAccountMedia","import_rest_modules","payload","MediaType","WebhookIdentityType","listInstagramAccountMedia","sdkTransformError","listInstagramAccountMedia","import_rest_modules","listInstagramAccountMedia"]}
|