@wix/auto_sdk_instagram_media 1.0.10 → 1.0.11
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 +19 -3
- package/build/cjs/index.js +142 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +164 -1
- package/build/cjs/index.typings.js +124 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +107 -2
- package/build/cjs/meta.js +104 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +117 -0
- package/build/cjs/schemas.js +246 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.d.mts +19 -3
- package/build/es/index.mjs +139 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +164 -1
- package/build/es/index.typings.mjs +121 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +107 -2
- package/build/es/meta.mjs +101 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +117 -0
- package/build/es/schemas.mjs +204 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +19 -3
- package/build/internal/cjs/index.js +142 -2
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +164 -1
- package/build/internal/cjs/index.typings.js +124 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +107 -2
- package/build/internal/cjs/meta.js +104 -2
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +117 -0
- package/build/internal/cjs/schemas.js +246 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.d.mts +19 -3
- package/build/internal/es/index.mjs +139 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +164 -1
- package/build/internal/es/index.typings.mjs +121 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +107 -2
- package/build/internal/es/meta.mjs +101 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +117 -0
- package/build/internal/es/schemas.mjs +204 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +12 -5
- package/schemas/package.json +3 -0
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { ListInstagramAccountMediaOptions, ListInstagramAccountMediaResponse } from './index.typings.js';
|
|
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, Pages, PagingMetadataV2, RestoreInfo, URI, URIs, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
2
|
+
import { ListInstagramAccountMediaOptions, ListInstagramAccountMediaResponse, ListMediaCommentsIdentifiers, ListMediaCommentsOptions, ListMediaCommentsResponse, ListCommentRepliesIdentifiers, ListCommentRepliesOptions, ListCommentRepliesResponse } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, ActionEvent, App, Children, Comment, CursorPaging, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomTag, DomainEvent, DomainEventBodyOneOf, ETagVerificationEvent, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, File, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ListCommentRepliesRequest, ListInstagramAccountMediaRequest, ListMediaCommentsRequest, Media, MediaType, MediaTypeWithLiterals, MessageEnvelope, Page, Pages, PagingMetadataV2, RestoreInfo, URI, URIs, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function listInstagramAccountMedia$1(httpClient: HttpClient): ListInstagramAccountMediaSignature;
|
|
6
6
|
interface ListInstagramAccountMediaSignature {
|
|
@@ -12,7 +12,23 @@ interface ListInstagramAccountMediaSignature {
|
|
|
12
12
|
*/
|
|
13
13
|
(connectionId: string, options?: ListInstagramAccountMediaOptions): Promise<NonNullablePaths<ListInstagramAccountMediaResponse, `media` | `media.${number}._id` | `media.${number}.mediaId` | `media.${number}.caption` | `media.${number}.mediaType`, 4>>;
|
|
14
14
|
}
|
|
15
|
+
declare function listMediaComments$1(httpClient: HttpClient): ListMediaCommentsSignature;
|
|
16
|
+
interface ListMediaCommentsSignature {
|
|
17
|
+
/**
|
|
18
|
+
* List top-level comments for a media item.
|
|
19
|
+
*/
|
|
20
|
+
(identifiers: NonNullablePaths<ListMediaCommentsIdentifiers, `connectionId` | `mediaId`, 2>, options?: ListMediaCommentsOptions): Promise<NonNullablePaths<ListMediaCommentsResponse, `comments` | `comments.${number}._id` | `comments.${number}.username` | `comments.${number}.text`, 4>>;
|
|
21
|
+
}
|
|
22
|
+
declare function listCommentReplies$1(httpClient: HttpClient): ListCommentRepliesSignature;
|
|
23
|
+
interface ListCommentRepliesSignature {
|
|
24
|
+
/**
|
|
25
|
+
* List replies to a comment.
|
|
26
|
+
*/
|
|
27
|
+
(identifiers: NonNullablePaths<ListCommentRepliesIdentifiers, `commentId` | `connectionId` | `mediaId`, 2>, options?: ListCommentRepliesOptions): Promise<NonNullablePaths<ListCommentRepliesResponse, `comments` | `comments.${number}._id` | `comments.${number}.username` | `comments.${number}.text`, 4>>;
|
|
28
|
+
}
|
|
15
29
|
|
|
16
30
|
declare const listInstagramAccountMedia: MaybeContext<BuildRESTFunction<typeof listInstagramAccountMedia$1> & typeof listInstagramAccountMedia$1>;
|
|
31
|
+
declare const listMediaComments: MaybeContext<BuildRESTFunction<typeof listMediaComments$1> & typeof listMediaComments$1>;
|
|
32
|
+
declare const listCommentReplies: MaybeContext<BuildRESTFunction<typeof listCommentReplies$1> & typeof listCommentReplies$1>;
|
|
17
33
|
|
|
18
|
-
export { ListInstagramAccountMediaOptions, ListInstagramAccountMediaResponse, listInstagramAccountMedia };
|
|
34
|
+
export { ListCommentRepliesIdentifiers, ListCommentRepliesOptions, ListCommentRepliesResponse, ListInstagramAccountMediaOptions, ListInstagramAccountMediaResponse, ListMediaCommentsIdentifiers, ListMediaCommentsOptions, ListMediaCommentsResponse, listCommentReplies, listInstagramAccountMedia, listMediaComments };
|
package/build/cjs/index.js
CHANGED
|
@@ -22,7 +22,9 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
MediaType: () => MediaType,
|
|
24
24
|
WebhookIdentityType: () => WebhookIdentityType,
|
|
25
|
-
|
|
25
|
+
listCommentReplies: () => listCommentReplies4,
|
|
26
|
+
listInstagramAccountMedia: () => listInstagramAccountMedia4,
|
|
27
|
+
listMediaComments: () => listMediaComments4
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(index_exports);
|
|
28
30
|
|
|
@@ -144,6 +146,60 @@ function listInstagramAccountMedia(payload) {
|
|
|
144
146
|
}
|
|
145
147
|
return __listInstagramAccountMedia;
|
|
146
148
|
}
|
|
149
|
+
function listMediaComments(payload) {
|
|
150
|
+
function __listMediaComments({ host }) {
|
|
151
|
+
const metadata = {
|
|
152
|
+
entityFqdn: "wix.instagram_feed.v1.instagram_media",
|
|
153
|
+
method: "GET",
|
|
154
|
+
methodFqn: "wix.instagram.v1.InstagramMediaService.ListMediaComments",
|
|
155
|
+
packageName: PACKAGE_NAME,
|
|
156
|
+
migrationOptions: {
|
|
157
|
+
optInTransformResponse: true
|
|
158
|
+
},
|
|
159
|
+
url: resolveWixInstagramV1InstagramMediaServiceUrl({
|
|
160
|
+
protoPath: "/v1/instagram-accounts/media/{connectionId}/comments/{mediaId}",
|
|
161
|
+
data: payload,
|
|
162
|
+
host
|
|
163
|
+
}),
|
|
164
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
165
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
166
|
+
{
|
|
167
|
+
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
168
|
+
paths: [{ path: "comments.timestamp" }]
|
|
169
|
+
}
|
|
170
|
+
])
|
|
171
|
+
};
|
|
172
|
+
return metadata;
|
|
173
|
+
}
|
|
174
|
+
return __listMediaComments;
|
|
175
|
+
}
|
|
176
|
+
function listCommentReplies(payload) {
|
|
177
|
+
function __listCommentReplies({ host }) {
|
|
178
|
+
const metadata = {
|
|
179
|
+
entityFqdn: "wix.instagram_feed.v1.instagram_media",
|
|
180
|
+
method: "GET",
|
|
181
|
+
methodFqn: "wix.instagram.v1.InstagramMediaService.ListCommentReplies",
|
|
182
|
+
packageName: PACKAGE_NAME,
|
|
183
|
+
migrationOptions: {
|
|
184
|
+
optInTransformResponse: true
|
|
185
|
+
},
|
|
186
|
+
url: resolveWixInstagramV1InstagramMediaServiceUrl({
|
|
187
|
+
protoPath: "/v1/instagram-accounts/media/{connectionId}/comments/{mediaId}/replies/{commentId}",
|
|
188
|
+
data: payload,
|
|
189
|
+
host
|
|
190
|
+
}),
|
|
191
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
192
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
193
|
+
{
|
|
194
|
+
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
195
|
+
paths: [{ path: "comments.timestamp" }]
|
|
196
|
+
}
|
|
197
|
+
])
|
|
198
|
+
};
|
|
199
|
+
return metadata;
|
|
200
|
+
}
|
|
201
|
+
return __listCommentReplies;
|
|
202
|
+
}
|
|
147
203
|
|
|
148
204
|
// src/instagram-feed-v1-instagram-media-media.universal.ts
|
|
149
205
|
var MediaType = /* @__PURE__ */ ((MediaType2) => {
|
|
@@ -192,6 +248,70 @@ async function listInstagramAccountMedia2(connectionId, options) {
|
|
|
192
248
|
throw transformedError;
|
|
193
249
|
}
|
|
194
250
|
}
|
|
251
|
+
async function listMediaComments2(identifiers, options) {
|
|
252
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
253
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
254
|
+
connectionId: identifiers?.connectionId,
|
|
255
|
+
mediaId: identifiers?.mediaId,
|
|
256
|
+
paging: options?.paging
|
|
257
|
+
});
|
|
258
|
+
const reqOpts = listMediaComments(payload);
|
|
259
|
+
sideEffects?.onSiteCall?.();
|
|
260
|
+
try {
|
|
261
|
+
const result = await httpClient.request(reqOpts);
|
|
262
|
+
sideEffects?.onSuccess?.(result);
|
|
263
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
264
|
+
} catch (err) {
|
|
265
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
266
|
+
err,
|
|
267
|
+
{
|
|
268
|
+
spreadPathsToArguments: {},
|
|
269
|
+
explicitPathsToArguments: {
|
|
270
|
+
connectionId: "$[0].connectionId",
|
|
271
|
+
mediaId: "$[0].mediaId",
|
|
272
|
+
paging: "$[1].paging"
|
|
273
|
+
},
|
|
274
|
+
singleArgumentUnchanged: false
|
|
275
|
+
},
|
|
276
|
+
["identifiers", "options"]
|
|
277
|
+
);
|
|
278
|
+
sideEffects?.onError?.(err);
|
|
279
|
+
throw transformedError;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
async function listCommentReplies2(identifiers, options) {
|
|
283
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
284
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
285
|
+
connectionId: identifiers?.connectionId,
|
|
286
|
+
mediaId: identifiers?.mediaId,
|
|
287
|
+
commentId: identifiers?.commentId,
|
|
288
|
+
paging: options?.paging
|
|
289
|
+
});
|
|
290
|
+
const reqOpts = listCommentReplies(payload);
|
|
291
|
+
sideEffects?.onSiteCall?.();
|
|
292
|
+
try {
|
|
293
|
+
const result = await httpClient.request(reqOpts);
|
|
294
|
+
sideEffects?.onSuccess?.(result);
|
|
295
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
296
|
+
} catch (err) {
|
|
297
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
298
|
+
err,
|
|
299
|
+
{
|
|
300
|
+
spreadPathsToArguments: {},
|
|
301
|
+
explicitPathsToArguments: {
|
|
302
|
+
connectionId: "$[0].connectionId",
|
|
303
|
+
mediaId: "$[0].mediaId",
|
|
304
|
+
commentId: "$[0].commentId",
|
|
305
|
+
paging: "$[1].paging"
|
|
306
|
+
},
|
|
307
|
+
singleArgumentUnchanged: false
|
|
308
|
+
},
|
|
309
|
+
["identifiers", "options"]
|
|
310
|
+
);
|
|
311
|
+
sideEffects?.onError?.(err);
|
|
312
|
+
throw transformedError;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
195
315
|
|
|
196
316
|
// src/instagram-feed-v1-instagram-media-media.public.ts
|
|
197
317
|
function listInstagramAccountMedia3(httpClient) {
|
|
@@ -202,14 +322,34 @@ function listInstagramAccountMedia3(httpClient) {
|
|
|
202
322
|
{ httpClient }
|
|
203
323
|
);
|
|
204
324
|
}
|
|
325
|
+
function listMediaComments3(httpClient) {
|
|
326
|
+
return (identifiers, options) => listMediaComments2(
|
|
327
|
+
identifiers,
|
|
328
|
+
options,
|
|
329
|
+
// @ts-ignore
|
|
330
|
+
{ httpClient }
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
function listCommentReplies3(httpClient) {
|
|
334
|
+
return (identifiers, options) => listCommentReplies2(
|
|
335
|
+
identifiers,
|
|
336
|
+
options,
|
|
337
|
+
// @ts-ignore
|
|
338
|
+
{ httpClient }
|
|
339
|
+
);
|
|
340
|
+
}
|
|
205
341
|
|
|
206
342
|
// src/instagram-feed-v1-instagram-media-media.context.ts
|
|
207
343
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
208
344
|
var listInstagramAccountMedia4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listInstagramAccountMedia3);
|
|
345
|
+
var listMediaComments4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listMediaComments3);
|
|
346
|
+
var listCommentReplies4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listCommentReplies3);
|
|
209
347
|
// Annotate the CommonJS export names for ESM import in node:
|
|
210
348
|
0 && (module.exports = {
|
|
211
349
|
MediaType,
|
|
212
350
|
WebhookIdentityType,
|
|
213
|
-
|
|
351
|
+
listCommentReplies,
|
|
352
|
+
listInstagramAccountMedia,
|
|
353
|
+
listMediaComments
|
|
214
354
|
});
|
|
215
355
|
//# sourceMappingURL=index.js.map
|
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 /** Invalidate by multiple page ids */\n pages?: Pages;\n /** Invalidate by multiple URI paths */\n uris?: URIs;\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 * Optional caller-provided ID for tracking this invalidation through the system.\n * When set, the corresponding CDN purge completion event will include this ID,\n * allowing you to confirm when the invalidation has fully propagated.\n * Example: generate a UUID, pass it here, and later match it in the CDN purge completion event.\n * @maxLength 256\n */\n correlationId?: string | null;\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 /** Invalidate by multiple page ids */\n pages?: Pages;\n /** Invalidate by multiple URI paths */\n uris?: URIs;\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 Pages {\n /**\n * the msid the pages are on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by multiple Page IDs in a single message\n * @maxSize 100\n * @minLength 1\n */\n pageIds?: string[];\n}\n\nexport interface URIs {\n /**\n * the msid the URIs are on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * URI paths to invalidate (e.g. page/my/path) - without leading/trailing slashes\n * @maxSize 100\n * @minLength 1\n */\n uriPaths?: 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 /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\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 Pages,\n PagingMetadataV2,\n RestoreInfo,\n URI,\n URIs,\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 Pages,\n URIs,\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,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;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;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EAAsC;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;;;AEljBO,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 * Like count from Instagram\n * @readonly\n */\n likeCount?: string | null;\n /**\n * Comments count from Instagram\n * @readonly\n */\n commentsCount?: string | null;\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 /** Invalidate by multiple page ids */\n pages?: Pages;\n /** Invalidate by multiple URI paths */\n uris?: URIs;\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 * Optional caller-provided ID for tracking this invalidation through the system.\n * When set, the corresponding CDN purge completion event will include this ID,\n * allowing you to confirm when the invalidation has fully propagated.\n * Example: generate a UUID, pass it here, and later match it in the CDN purge completion event.\n * @maxLength 256\n */\n correlationId?: string | null;\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 /** Invalidate by multiple page ids */\n pages?: Pages;\n /** Invalidate by multiple URI paths */\n uris?: URIs;\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 Pages {\n /**\n * the msid the pages are on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * Invalidate by multiple Page IDs in a single message\n * @maxSize 100\n * @minLength 1\n */\n pageIds?: string[];\n}\n\nexport interface URIs {\n /**\n * the msid the URIs are on\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * URI paths to invalidate (e.g. page/my/path) - without leading/trailing slashes\n * @maxSize 100\n * @minLength 1\n */\n uriPaths?: 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 ListMediaCommentsRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /**\n * Instagram media id\n * @readonly\n * @maxLength 30\n */\n mediaId: string;\n /** paging */\n paging?: CursorQuery;\n}\n\nexport interface ListMediaCommentsResponse {\n /** list of comments */\n comments?: Comment[];\n /** paging metadata */\n paging?: PagingMetadataV2;\n}\n\nexport interface Comment {\n /**\n * Instagram comment id\n * @readonly\n * @maxLength 30\n */\n _id?: string;\n /**\n * Commenter username\n * @readonly\n * @maxLength 500\n */\n username?: string;\n /**\n * Comment text\n * @maxLength 2200\n */\n text?: string;\n /**\n * Like count on the comment\n * @readonly\n */\n likeCount?: string | null;\n /** When the comment was posted */\n timestamp?: Date | null;\n /**\n * Number of replies (if available)\n * @readonly\n */\n replyCount?: string | null;\n /**\n * Replies to this comment\n * @readonly\n */\n replies?: Comment[];\n}\n\nexport interface ListCommentRepliesRequest {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /**\n * Instagram media id\n * @readonly\n * @maxLength 30\n */\n mediaId: string;\n /**\n * Instagram comment id\n * @readonly\n * @maxLength 30\n */\n commentId: string;\n /** paging */\n paging?: CursorQuery;\n}\n\nexport interface ListCommentRepliesResponse {\n /** list of reply comments */\n comments?: Comment[];\n /** paging metadata */\n paging?: PagingMetadataV2;\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 /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\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\n/**\n * List top-level comments for a media item.\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.connectionId\n * @requiredField identifiers.mediaId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_MEDIA\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramMediaService.ListMediaComments\n */\nexport async function listMediaComments(\n identifiers: NonNullablePaths<\n ListMediaCommentsIdentifiers,\n `connectionId` | `mediaId`,\n 2\n >,\n options?: ListMediaCommentsOptions\n): Promise<\n NonNullablePaths<\n ListMediaCommentsResponse,\n | `comments`\n | `comments.${number}._id`\n | `comments.${number}.username`\n | `comments.${number}.text`,\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: identifiers?.connectionId,\n mediaId: identifiers?.mediaId,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramMedia.listMediaComments(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n connectionId: '$[0].connectionId',\n mediaId: '$[0].mediaId',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListMediaCommentsIdentifiers {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /**\n * Instagram media id\n * @readonly\n * @maxLength 30\n */\n mediaId: string;\n}\n\nexport interface ListMediaCommentsOptions {\n /** paging */\n paging?: CursorQuery;\n}\n\n/**\n * List replies to a comment.\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.commentId\n * @requiredField identifiers.connectionId\n * @requiredField identifiers.mediaId\n * @permissionId INSTAGRAM_ACCOUNTS.GET_MEDIA\n * @applicableIdentity APP\n * @fqn wix.instagram.v1.InstagramMediaService.ListCommentReplies\n */\nexport async function listCommentReplies(\n identifiers: NonNullablePaths<\n ListCommentRepliesIdentifiers,\n `commentId` | `connectionId` | `mediaId`,\n 2\n >,\n options?: ListCommentRepliesOptions\n): Promise<\n NonNullablePaths<\n ListCommentRepliesResponse,\n | `comments`\n | `comments.${number}._id`\n | `comments.${number}.username`\n | `comments.${number}.text`,\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: identifiers?.connectionId,\n mediaId: identifiers?.mediaId,\n commentId: identifiers?.commentId,\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixInstagramFeedV1InstagramMedia.listCommentReplies(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n connectionId: '$[0].connectionId',\n mediaId: '$[0].mediaId',\n commentId: '$[0].commentId',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListCommentRepliesIdentifiers {\n /**\n * connection id\n * @readonly\n * @format GUID\n */\n connectionId: string;\n /**\n * Instagram media id\n * @readonly\n * @maxLength 30\n */\n mediaId: string;\n /**\n * Instagram comment id\n * @readonly\n * @maxLength 30\n */\n commentId: string;\n}\n\nexport interface ListCommentRepliesOptions {\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\n/** List top-level comments for a media item. */\nexport function listMediaComments(payload: object): RequestOptionsFactory<any> {\n function __listMediaComments({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_media',\n method: 'GET' as any,\n methodFqn: 'wix.instagram.v1.InstagramMediaService.ListMediaComments',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramMediaServiceUrl({\n protoPath:\n '/v1/instagram-accounts/media/{connectionId}/comments/{mediaId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'comments.timestamp' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listMediaComments;\n}\n\n/** List replies to a comment. */\nexport function listCommentReplies(\n payload: object\n): RequestOptionsFactory<any> {\n function __listCommentReplies({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.instagram_feed.v1.instagram_media',\n method: 'GET' as any,\n methodFqn: 'wix.instagram.v1.InstagramMediaService.ListCommentReplies',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInstagramV1InstagramMediaServiceUrl({\n protoPath:\n '/v1/instagram-accounts/media/{connectionId}/comments/{mediaId}/replies/{commentId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'comments.timestamp' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listCommentReplies;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListCommentRepliesIdentifiers,\n ListCommentRepliesOptions,\n ListCommentRepliesResponse,\n ListInstagramAccountMediaOptions,\n ListInstagramAccountMediaResponse,\n ListMediaCommentsIdentifiers,\n ListMediaCommentsOptions,\n ListMediaCommentsResponse,\n listCommentReplies as universalListCommentReplies,\n listInstagramAccountMedia as universalListInstagramAccountMedia,\n listMediaComments as universalListMediaComments,\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 function listMediaComments(\n httpClient: HttpClient\n): ListMediaCommentsSignature {\n return (\n identifiers: NonNullablePaths<\n ListMediaCommentsIdentifiers,\n `connectionId` | `mediaId`,\n 2\n >,\n options?: ListMediaCommentsOptions\n ) =>\n universalListMediaComments(\n identifiers,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListMediaCommentsSignature {\n /**\n * List top-level comments for a media item.\n */\n (\n identifiers: NonNullablePaths<\n ListMediaCommentsIdentifiers,\n `connectionId` | `mediaId`,\n 2\n >,\n options?: ListMediaCommentsOptions\n ): Promise<\n NonNullablePaths<\n ListMediaCommentsResponse,\n | `comments`\n | `comments.${number}._id`\n | `comments.${number}.username`\n | `comments.${number}.text`,\n 4\n >\n >;\n}\n\nexport function listCommentReplies(\n httpClient: HttpClient\n): ListCommentRepliesSignature {\n return (\n identifiers: NonNullablePaths<\n ListCommentRepliesIdentifiers,\n `commentId` | `connectionId` | `mediaId`,\n 2\n >,\n options?: ListCommentRepliesOptions\n ) =>\n universalListCommentReplies(\n identifiers,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListCommentRepliesSignature {\n /**\n * List replies to a comment.\n */\n (\n identifiers: NonNullablePaths<\n ListCommentRepliesIdentifiers,\n `commentId` | `connectionId` | `mediaId`,\n 2\n >,\n options?: ListCommentRepliesOptions\n ): Promise<\n NonNullablePaths<\n ListCommentRepliesResponse,\n | `comments`\n | `comments.${number}._id`\n | `comments.${number}.username`\n | `comments.${number}.text`,\n 4\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n App,\n Children,\n Comment,\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 ListCommentRepliesIdentifiers,\n ListCommentRepliesOptions,\n ListCommentRepliesRequest,\n ListCommentRepliesResponse,\n ListInstagramAccountMediaOptions,\n ListInstagramAccountMediaRequest,\n ListInstagramAccountMediaResponse,\n ListMediaCommentsIdentifiers,\n ListMediaCommentsOptions,\n ListMediaCommentsRequest,\n ListMediaCommentsResponse,\n Media,\n MediaType,\n MessageEnvelope,\n Page,\n Pages,\n PagingMetadataV2,\n RestoreInfo,\n URI,\n URIs,\n WebhookIdentityType,\n} from './instagram-feed-v1-instagram-media-media.universal.js';\n","import {\n listInstagramAccountMedia as publicListInstagramAccountMedia,\n listMediaComments as publicListMediaComments,\n listCommentReplies as publicListCommentReplies,\n} 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);\nexport const listMediaComments: MaybeContext<\n BuildRESTFunction<typeof publicListMediaComments> &\n typeof publicListMediaComments\n> = /*#__PURE__*/ createRESTModule(publicListMediaComments);\nexport const listCommentReplies: MaybeContext<\n BuildRESTFunction<typeof publicListCommentReplies> &\n typeof publicListCommentReplies\n> = /*#__PURE__*/ createRESTModule(publicListCommentReplies);\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 Pages,\n URIs,\n ETagVerificationEvent,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorPaging,\n ListInstagramAccountMediaRequest,\n ListInstagramAccountMediaResponse,\n PagingMetadataV2,\n Cursors,\n ListMediaCommentsRequest,\n ListMediaCommentsResponse,\n Comment,\n ListCommentRepliesRequest,\n ListCommentRepliesResponse,\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 ListMediaCommentsIdentifiers,\n ListMediaCommentsOptions,\n ListCommentRepliesIdentifiers,\n ListCommentRepliesOptions,\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,4BAAAA;AAAA,EAAA,iCAAAC;AAAA,EAAA,yBAAAC;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;AAAA,IACA,GAAG;AAAA,MACD;AAAA,Q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ountMedia","listMediaComments","import_rest_modules","payload","MediaType","WebhookIdentityType","listInstagramAccountMedia","sdkTransformError","listMediaComments","listCommentReplies","listInstagramAccountMedia","listMediaComments","listCommentReplies","import_rest_modules","listInstagramAccountMedia","listMediaComments","listCommentReplies"]}
|
|
@@ -40,6 +40,16 @@ interface Media {
|
|
|
40
40
|
* @maxSize 10
|
|
41
41
|
*/
|
|
42
42
|
children?: Children[];
|
|
43
|
+
/**
|
|
44
|
+
* Like count from Instagram
|
|
45
|
+
* @readonly
|
|
46
|
+
*/
|
|
47
|
+
likeCount?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Comments count from Instagram
|
|
50
|
+
* @readonly
|
|
51
|
+
*/
|
|
52
|
+
commentsCount?: string | null;
|
|
43
53
|
}
|
|
44
54
|
declare enum MediaType {
|
|
45
55
|
UNKNOWN = "UNKNOWN",
|
|
@@ -298,6 +308,92 @@ interface Cursors {
|
|
|
298
308
|
/** Cursor pointing to previous page in the list of results. */
|
|
299
309
|
prev?: string | null;
|
|
300
310
|
}
|
|
311
|
+
interface ListMediaCommentsRequest {
|
|
312
|
+
/**
|
|
313
|
+
* connection id
|
|
314
|
+
* @readonly
|
|
315
|
+
* @format GUID
|
|
316
|
+
*/
|
|
317
|
+
connectionId: string;
|
|
318
|
+
/**
|
|
319
|
+
* Instagram media id
|
|
320
|
+
* @readonly
|
|
321
|
+
* @maxLength 30
|
|
322
|
+
*/
|
|
323
|
+
mediaId: string;
|
|
324
|
+
/** paging */
|
|
325
|
+
paging?: CursorQuery;
|
|
326
|
+
}
|
|
327
|
+
interface ListMediaCommentsResponse {
|
|
328
|
+
/** list of comments */
|
|
329
|
+
comments?: Comment[];
|
|
330
|
+
/** paging metadata */
|
|
331
|
+
paging?: PagingMetadataV2;
|
|
332
|
+
}
|
|
333
|
+
interface Comment {
|
|
334
|
+
/**
|
|
335
|
+
* Instagram comment id
|
|
336
|
+
* @readonly
|
|
337
|
+
* @maxLength 30
|
|
338
|
+
*/
|
|
339
|
+
_id?: string;
|
|
340
|
+
/**
|
|
341
|
+
* Commenter username
|
|
342
|
+
* @readonly
|
|
343
|
+
* @maxLength 500
|
|
344
|
+
*/
|
|
345
|
+
username?: string;
|
|
346
|
+
/**
|
|
347
|
+
* Comment text
|
|
348
|
+
* @maxLength 2200
|
|
349
|
+
*/
|
|
350
|
+
text?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Like count on the comment
|
|
353
|
+
* @readonly
|
|
354
|
+
*/
|
|
355
|
+
likeCount?: string | null;
|
|
356
|
+
/** When the comment was posted */
|
|
357
|
+
timestamp?: Date | null;
|
|
358
|
+
/**
|
|
359
|
+
* Number of replies (if available)
|
|
360
|
+
* @readonly
|
|
361
|
+
*/
|
|
362
|
+
replyCount?: string | null;
|
|
363
|
+
/**
|
|
364
|
+
* Replies to this comment
|
|
365
|
+
* @readonly
|
|
366
|
+
*/
|
|
367
|
+
replies?: Comment[];
|
|
368
|
+
}
|
|
369
|
+
interface ListCommentRepliesRequest {
|
|
370
|
+
/**
|
|
371
|
+
* connection id
|
|
372
|
+
* @readonly
|
|
373
|
+
* @format GUID
|
|
374
|
+
*/
|
|
375
|
+
connectionId: string;
|
|
376
|
+
/**
|
|
377
|
+
* Instagram media id
|
|
378
|
+
* @readonly
|
|
379
|
+
* @maxLength 30
|
|
380
|
+
*/
|
|
381
|
+
mediaId: string;
|
|
382
|
+
/**
|
|
383
|
+
* Instagram comment id
|
|
384
|
+
* @readonly
|
|
385
|
+
* @maxLength 30
|
|
386
|
+
*/
|
|
387
|
+
commentId: string;
|
|
388
|
+
/** paging */
|
|
389
|
+
paging?: CursorQuery;
|
|
390
|
+
}
|
|
391
|
+
interface ListCommentRepliesResponse {
|
|
392
|
+
/** list of reply comments */
|
|
393
|
+
comments?: Comment[];
|
|
394
|
+
/** paging metadata */
|
|
395
|
+
paging?: PagingMetadataV2;
|
|
396
|
+
}
|
|
301
397
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
302
398
|
createdEvent?: EntityCreatedEvent;
|
|
303
399
|
updatedEvent?: EntityUpdatedEvent;
|
|
@@ -470,5 +566,72 @@ interface ListInstagramAccountMediaOptions {
|
|
|
470
566
|
/** paging */
|
|
471
567
|
paging?: CursorQuery;
|
|
472
568
|
}
|
|
569
|
+
/**
|
|
570
|
+
* List top-level comments for a media item.
|
|
571
|
+
* @public
|
|
572
|
+
* @documentationMaturity preview
|
|
573
|
+
* @requiredField identifiers
|
|
574
|
+
* @requiredField identifiers.connectionId
|
|
575
|
+
* @requiredField identifiers.mediaId
|
|
576
|
+
* @permissionId INSTAGRAM_ACCOUNTS.GET_MEDIA
|
|
577
|
+
* @applicableIdentity APP
|
|
578
|
+
* @fqn wix.instagram.v1.InstagramMediaService.ListMediaComments
|
|
579
|
+
*/
|
|
580
|
+
declare function listMediaComments(identifiers: NonNullablePaths<ListMediaCommentsIdentifiers, `connectionId` | `mediaId`, 2>, options?: ListMediaCommentsOptions): Promise<NonNullablePaths<ListMediaCommentsResponse, `comments` | `comments.${number}._id` | `comments.${number}.username` | `comments.${number}.text`, 4>>;
|
|
581
|
+
interface ListMediaCommentsIdentifiers {
|
|
582
|
+
/**
|
|
583
|
+
* connection id
|
|
584
|
+
* @readonly
|
|
585
|
+
* @format GUID
|
|
586
|
+
*/
|
|
587
|
+
connectionId: string;
|
|
588
|
+
/**
|
|
589
|
+
* Instagram media id
|
|
590
|
+
* @readonly
|
|
591
|
+
* @maxLength 30
|
|
592
|
+
*/
|
|
593
|
+
mediaId: string;
|
|
594
|
+
}
|
|
595
|
+
interface ListMediaCommentsOptions {
|
|
596
|
+
/** paging */
|
|
597
|
+
paging?: CursorQuery;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* List replies to a comment.
|
|
601
|
+
* @public
|
|
602
|
+
* @documentationMaturity preview
|
|
603
|
+
* @requiredField identifiers
|
|
604
|
+
* @requiredField identifiers.commentId
|
|
605
|
+
* @requiredField identifiers.connectionId
|
|
606
|
+
* @requiredField identifiers.mediaId
|
|
607
|
+
* @permissionId INSTAGRAM_ACCOUNTS.GET_MEDIA
|
|
608
|
+
* @applicableIdentity APP
|
|
609
|
+
* @fqn wix.instagram.v1.InstagramMediaService.ListCommentReplies
|
|
610
|
+
*/
|
|
611
|
+
declare function listCommentReplies(identifiers: NonNullablePaths<ListCommentRepliesIdentifiers, `commentId` | `connectionId` | `mediaId`, 2>, options?: ListCommentRepliesOptions): Promise<NonNullablePaths<ListCommentRepliesResponse, `comments` | `comments.${number}._id` | `comments.${number}.username` | `comments.${number}.text`, 4>>;
|
|
612
|
+
interface ListCommentRepliesIdentifiers {
|
|
613
|
+
/**
|
|
614
|
+
* connection id
|
|
615
|
+
* @readonly
|
|
616
|
+
* @format GUID
|
|
617
|
+
*/
|
|
618
|
+
connectionId: string;
|
|
619
|
+
/**
|
|
620
|
+
* Instagram media id
|
|
621
|
+
* @readonly
|
|
622
|
+
* @maxLength 30
|
|
623
|
+
*/
|
|
624
|
+
mediaId: string;
|
|
625
|
+
/**
|
|
626
|
+
* Instagram comment id
|
|
627
|
+
* @readonly
|
|
628
|
+
* @maxLength 30
|
|
629
|
+
*/
|
|
630
|
+
commentId: string;
|
|
631
|
+
}
|
|
632
|
+
interface ListCommentRepliesOptions {
|
|
633
|
+
/** paging */
|
|
634
|
+
paging?: CursorQuery;
|
|
635
|
+
}
|
|
473
636
|
|
|
474
|
-
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 Pages, type PagingMetadataV2, type RestoreInfo, type URI, type URIs, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, listInstagramAccountMedia };
|
|
637
|
+
export { type AccountInfo, type ActionEvent, type App, type Children, type Comment, 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 ListCommentRepliesIdentifiers, type ListCommentRepliesOptions, type ListCommentRepliesRequest, type ListCommentRepliesResponse, type ListInstagramAccountMediaOptions, type ListInstagramAccountMediaRequest, type ListInstagramAccountMediaResponse, type ListMediaCommentsIdentifiers, type ListMediaCommentsOptions, type ListMediaCommentsRequest, type ListMediaCommentsResponse, type Media, MediaType, type MediaTypeWithLiterals, type MessageEnvelope, type Page, type Pages, type PagingMetadataV2, type RestoreInfo, type URI, type URIs, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, listCommentReplies, listInstagramAccountMedia, listMediaComments };
|