@amityco/ts-sdk-react-native 7.15.2-9c10dc7b.0 → 7.16.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/dist/@types/core/events.d.ts +2 -1
- package/dist/@types/core/events.d.ts.map +1 -1
- package/dist/@types/core/model.d.ts +2 -0
- package/dist/@types/core/model.d.ts.map +1 -1
- package/dist/@types/core/payload.d.ts +5 -0
- package/dist/@types/core/payload.d.ts.map +1 -1
- package/dist/@types/domains/analytics.d.ts +2 -1
- package/dist/@types/domains/analytics.d.ts.map +1 -1
- package/dist/@types/domains/client.d.ts +6 -0
- package/dist/@types/domains/client.d.ts.map +1 -1
- package/dist/@types/domains/feed.d.ts +2 -0
- package/dist/@types/domains/feed.d.ts.map +1 -1
- package/dist/@types/domains/notification.d.ts +4 -2
- package/dist/@types/domains/notification.d.ts.map +1 -1
- package/dist/@types/domains/post.d.ts +5 -1
- package/dist/@types/domains/post.d.ts.map +1 -1
- package/dist/@types/domains/product.d.ts +93 -0
- package/dist/@types/domains/product.d.ts.map +1 -0
- package/dist/@types/domains/room.d.ts +2 -1
- package/dist/@types/domains/room.d.ts.map +1 -1
- package/dist/@types/domains/stream.d.ts +2 -1
- package/dist/@types/domains/stream.d.ts.map +1 -1
- package/dist/@types/index.d.ts +1 -0
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/analytic/service/analytic/AnalyticsEngine.d.ts +2 -0
- package/dist/analytic/service/analytic/AnalyticsEngine.d.ts.map +1 -1
- package/dist/analytic/service/analytic/AnalyticsEventCapturer.d.ts +2 -0
- package/dist/analytic/service/analytic/AnalyticsEventCapturer.d.ts.map +1 -1
- package/dist/analytic/service/analytic/AnalyticsService.d.ts +12 -0
- package/dist/analytic/service/analytic/AnalyticsService.d.ts.map +1 -1
- package/dist/channelRepository/api/createChannel.d.ts.map +1 -1
- package/dist/channelRepository/events/index.d.ts +0 -1
- package/dist/channelRepository/events/index.d.ts.map +1 -1
- package/dist/channelRepository/observers/getChannels/ChannelLiveCollectionController.d.ts.map +1 -1
- package/dist/client/api/createClient.d.ts.map +1 -1
- package/dist/client/api/getProductCatalogueSetting.d.ts +15 -0
- package/dist/client/api/getProductCatalogueSetting.d.ts.map +1 -0
- package/dist/client/api/index.d.ts +1 -0
- package/dist/client/api/index.d.ts.map +1 -1
- package/dist/communityRepository/utils/communityWithMembership.d.ts.map +1 -1
- package/dist/core/events.d.ts +3 -3
- package/dist/core/events.d.ts.map +1 -1
- package/dist/core/model/idResolvers.d.ts.map +1 -1
- package/dist/core/model/index.d.ts.map +1 -1
- package/dist/core/query/sorting.d.ts +23 -0
- package/dist/core/query/sorting.d.ts.map +1 -1
- package/dist/core/subscription.d.ts +2 -2
- package/dist/core/subscription.d.ts.map +1 -1
- package/dist/feedRepository/observers/getCommunityFeed/LiveCollectionController.d.ts +1 -0
- package/dist/feedRepository/observers/getCommunityFeed/LiveCollectionController.d.ts.map +1 -1
- package/dist/feedRepository/observers/getCommunityFeed/PaginationController.d.ts.map +1 -1
- package/dist/feedRepository/observers/getCommunityFeed/QueryStreamController.d.ts +3 -0
- package/dist/feedRepository/observers/getCommunityFeed/QueryStreamController.d.ts.map +1 -1
- package/dist/feedRepository/observers/getUserFeed/LiveCollectionController.d.ts +1 -0
- package/dist/feedRepository/observers/getUserFeed/LiveCollectionController.d.ts.map +1 -1
- package/dist/feedRepository/observers/getUserFeed/PaginationController.d.ts.map +1 -1
- package/dist/feedRepository/observers/getUserFeed/QueryStreamController.d.ts +3 -0
- package/dist/feedRepository/observers/getUserFeed/QueryStreamController.d.ts.map +1 -1
- package/dist/fileRepository/api/uploadAudio.d.ts.map +1 -1
- package/dist/index.cjs.js +975 -110
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +948 -88
- package/dist/index.umd.js +3 -3
- package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.d.ts.map +1 -1
- package/dist/postRepository/api/createAudioPost.d.ts +2 -0
- package/dist/postRepository/api/createAudioPost.d.ts.map +1 -1
- package/dist/postRepository/api/createClipPost.d.ts +2 -0
- package/dist/postRepository/api/createClipPost.d.ts.map +1 -1
- package/dist/postRepository/api/createMixedMediaPost.d.ts +2 -0
- package/dist/postRepository/api/createMixedMediaPost.d.ts.map +1 -1
- package/dist/postRepository/api/createPost.d.ts +3 -0
- package/dist/postRepository/api/createPost.d.ts.map +1 -1
- package/dist/postRepository/api/createRoomPost.d.ts +29 -0
- package/dist/postRepository/api/createRoomPost.d.ts.map +1 -0
- package/dist/postRepository/api/editPost.d.ts +3 -0
- package/dist/postRepository/api/editPost.d.ts.map +1 -1
- package/dist/postRepository/api/getPost.d.ts +1 -1
- package/dist/postRepository/api/index.d.ts +4 -0
- package/dist/postRepository/api/index.d.ts.map +1 -1
- package/dist/postRepository/api/pinProduct.d.ts +15 -0
- package/dist/postRepository/api/pinProduct.d.ts.map +1 -0
- package/dist/postRepository/api/tests/integration/createPost.integration.test.d.ts +2 -0
- package/dist/postRepository/api/tests/integration/createPost.integration.test.d.ts.map +1 -0
- package/dist/postRepository/api/tests/integration/getPost.integration.test.d.ts +2 -0
- package/dist/postRepository/api/tests/integration/getPost.integration.test.d.ts.map +1 -0
- package/dist/postRepository/api/tests/integration/getPosts.integration.test.d.ts +2 -0
- package/dist/postRepository/api/tests/integration/getPosts.integration.test.d.ts.map +1 -0
- package/dist/postRepository/api/tests/integration/setup.d.ts +64 -0
- package/dist/postRepository/api/tests/integration/setup.d.ts.map +1 -0
- package/dist/postRepository/api/unpinProduct.d.ts +14 -0
- package/dist/postRepository/api/unpinProduct.d.ts.map +1 -0
- package/dist/postRepository/api/updateProductTags.d.ts +15 -0
- package/dist/postRepository/api/updateProductTags.d.ts.map +1 -0
- package/dist/postRepository/observers/enums.d.ts +4 -1
- package/dist/postRepository/observers/enums.d.ts.map +1 -1
- package/dist/postRepository/observers/getPosts/PostLiveCollectionController.d.ts.map +1 -1
- package/dist/postRepository/observers/getPosts/PostPaginationController.d.ts.map +1 -1
- package/dist/postRepository/observers/getPosts/PostQueryStreamController.d.ts +3 -0
- package/dist/postRepository/observers/getPosts/PostQueryStreamController.d.ts.map +1 -1
- package/dist/postRepository/utils/payload.d.ts.map +1 -1
- package/dist/productRepository/helpers/AttachmentProductTags.d.ts +41 -0
- package/dist/productRepository/helpers/AttachmentProductTags.d.ts.map +1 -0
- package/dist/productRepository/helpers/index.d.ts +2 -0
- package/dist/productRepository/helpers/index.d.ts.map +1 -0
- package/dist/productRepository/index.d.ts +2 -0
- package/dist/productRepository/index.d.ts.map +1 -0
- package/dist/productRepository/internalApi/getProduct.d.ts +5 -0
- package/dist/productRepository/internalApi/getProduct.d.ts.map +1 -0
- package/dist/productRepository/internalApi/index.d.ts +2 -0
- package/dist/productRepository/internalApi/index.d.ts.map +1 -0
- package/dist/productRepository/observers/getProduct.d.ts +21 -0
- package/dist/productRepository/observers/getProduct.d.ts.map +1 -0
- package/dist/productRepository/observers/index.d.ts +3 -0
- package/dist/productRepository/observers/index.d.ts.map +1 -0
- package/dist/productRepository/observers/searchProducts/LiveCollectionController.d.ts +15 -0
- package/dist/productRepository/observers/searchProducts/LiveCollectionController.d.ts.map +1 -0
- package/dist/productRepository/observers/searchProducts/PaginationController.d.ts +5 -0
- package/dist/productRepository/observers/searchProducts/PaginationController.d.ts.map +1 -0
- package/dist/productRepository/observers/searchProducts/QueryStreamController.d.ts +8 -0
- package/dist/productRepository/observers/searchProducts/QueryStreamController.d.ts.map +1 -0
- package/dist/productRepository/observers/searchProducts.d.ts +25 -0
- package/dist/productRepository/observers/searchProducts.d.ts.map +1 -0
- package/dist/productRepository/tests/integration/getProduct.integration.test.d.ts +2 -0
- package/dist/productRepository/tests/integration/getProduct.integration.test.d.ts.map +1 -0
- package/dist/productRepository/tests/integration/searchProducts.integration.test.d.ts +2 -0
- package/dist/productRepository/tests/integration/searchProducts.integration.test.d.ts.map +1 -0
- package/dist/productRepository/tests/integration/setup.d.ts +11 -0
- package/dist/productRepository/tests/integration/setup.d.ts.map +1 -0
- package/dist/roomRepository/api/index.d.ts +1 -0
- package/dist/roomRepository/api/index.d.ts.map +1 -1
- package/dist/roomRepository/api/updateCohostPermission.d.ts +18 -0
- package/dist/roomRepository/api/updateCohostPermission.d.ts.map +1 -0
- package/dist/roomRepository/events/index.d.ts +2 -0
- package/dist/roomRepository/events/index.d.ts.map +1 -1
- package/dist/roomRepository/events/onLocalRoomDidUpdate.d.ts +17 -0
- package/dist/roomRepository/events/onLocalRoomDidUpdate.d.ts.map +1 -0
- package/dist/roomRepository/events/onRoomDidUpdate.d.ts +17 -0
- package/dist/roomRepository/events/onRoomDidUpdate.d.ts.map +1 -0
- package/dist/roomRepository/observers/enums.d.ts +2 -1
- package/dist/roomRepository/observers/enums.d.ts.map +1 -1
- package/dist/roomRepository/observers/getRoom.d.ts.map +1 -1
- package/dist/roomRepository/observers/utils.d.ts.map +1 -1
- package/dist/utils/linkedObject/index.d.ts +1 -0
- package/dist/utils/linkedObject/index.d.ts.map +1 -1
- package/dist/utils/linkedObject/postLinkedObject.d.ts.map +1 -1
- package/dist/utils/linkedObject/productLinkedObject.d.ts +2 -0
- package/dist/utils/linkedObject/productLinkedObject.d.ts.map +1 -0
- package/dist/utils/linkedObject/productTagLinkedObject.d.ts +2 -0
- package/dist/utils/linkedObject/productTagLinkedObject.d.ts.map +1 -0
- package/dist/utils/tests/dummy/channel.d.ts.map +1 -1
- package/dist/utils/tests/dummy/comment.d.ts.map +1 -1
- package/dist/utils/tests/dummy/file.d.ts.map +1 -1
- package/dist/utils/tests/dummy/member.d.ts.map +1 -1
- package/dist/utils/tests/dummy/post.d.ts +4 -0
- package/dist/utils/tests/dummy/post.d.ts.map +1 -1
- package/dist/utils/tests/dummy/user.d.ts.map +1 -1
- package/package.json +4 -2
- package/dist/channelRepository/events/onChannelCreatedLocal.d.ts +0 -2
- package/dist/channelRepository/events/onChannelCreatedLocal.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MyInvitationsPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"MyInvitationsPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAIlF,qBAAa,iCAAkC,SAAQ,oBAAoB,CACzE,cAAc,EACd,KAAK,CAAC,2BAA2B,CAClC;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,2BAA2B,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;CAuB3F"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AmityAttachmentProductTags } from '~/productRepository/helpers';
|
|
1
2
|
/**
|
|
2
3
|
* ```js
|
|
3
4
|
* import { PostRepository } from '@amityco/ts-sdk-react-native'
|
|
@@ -26,5 +27,6 @@ export declare const createAudioPost: (bundle: Pick<Amity.Post, 'targetType' | '
|
|
|
26
27
|
type: Extract<Amity.MixedMediaPostContentType, 'audio'>;
|
|
27
28
|
fileId: Amity.File['fileId'];
|
|
28
29
|
}[];
|
|
30
|
+
attachmentProductTags?: AmityAttachmentProductTags;
|
|
29
31
|
}) => Promise<Amity.Cached<Amity.Post>>;
|
|
30
32
|
//# sourceMappingURL=createAudioPost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAudioPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createAudioPost.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createAudioPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createAudioPost.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAKzE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,WAClB,KAAK,MAAM,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC,GACjD,QAAQ,KAAK,MAAM,IAAI,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC,CAAC,GAAG;IAC3E,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,MAAM,yBAAyB,EAAE,OAAO,CAAC,CAAC;QACxD,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;KAC9B,EAAE,CAAC;IACJ,qBAAqB,CAAC,EAAE,0BAA0B,CAAC;CACpD,KACF,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAqClC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AmityAttachmentProductTags } from '~/productRepository/helpers';
|
|
1
2
|
/**
|
|
2
3
|
* ```js
|
|
3
4
|
* import { PostRepository } from '@amityco/ts-sdk-react-native'
|
|
@@ -28,5 +29,6 @@ export declare const createClipPost: <T extends string>(bundle: Pick<Amity.Post<
|
|
|
28
29
|
displayMode?: Amity.ClipDisplayMode | undefined;
|
|
29
30
|
isMuted?: boolean | undefined;
|
|
30
31
|
}[];
|
|
32
|
+
attachmentProductTags?: AmityAttachmentProductTags | undefined;
|
|
31
33
|
}) => Promise<Amity.Cached<Amity.Post>>;
|
|
32
34
|
//# sourceMappingURL=createClipPost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createClipPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createClipPost.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createClipPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createClipPost.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAKzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc;;;;;;gBAMX,UAAU,CAAC,QAAQ,CAAC;;;;;MAMjC,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAsClC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AmityAttachmentProductTags } from '~/productRepository/helpers';
|
|
1
2
|
/**
|
|
2
3
|
* ```js
|
|
3
4
|
* import { PostRepository } from '@amityco/ts-sdk-react-native'
|
|
@@ -31,5 +32,6 @@ export declare const createMixedMediaPost: (bundle: Pick<Amity.Post, 'targetType
|
|
|
31
32
|
type: Amity.MixedMediaPostContentType;
|
|
32
33
|
fileId: Amity.File['fileId'];
|
|
33
34
|
}[];
|
|
35
|
+
attachmentProductTags: AmityAttachmentProductTags;
|
|
34
36
|
}) => Promise<Amity.Cached<Amity.Post>>;
|
|
35
37
|
//# sourceMappingURL=createMixedMediaPost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMixedMediaPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createMixedMediaPost.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createMixedMediaPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createMixedMediaPost.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAKzE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,oBAAoB,WACvB,KAAK,MAAM,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC,GACjD,QAAQ,KAAK,MAAM,IAAI,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC,CAAC,GAAG;IAC3E,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;QAAC,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;KAAE,EAAE,CAAC;IACvF,qBAAqB,EAAE,0BAA0B,CAAC;CACnD,KACF,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAqClC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AmityAttachmentProductTags } from '~/productRepository/helpers';
|
|
1
2
|
/**
|
|
2
3
|
* ```js
|
|
3
4
|
* import { PostRepository } from '@amityco/ts-sdk-react-native'
|
|
@@ -26,5 +27,7 @@ export declare const createPost: <T extends string>(bundle: Pick<Amity.Post<T>,
|
|
|
26
27
|
fileId: Amity.File['fileId'];
|
|
27
28
|
}[] | undefined;
|
|
28
29
|
links?: Amity.Link[] | undefined;
|
|
30
|
+
productTags?: Amity.TextProductTag[] | undefined;
|
|
31
|
+
attachmentProductTags?: AmityAttachmentProductTags | undefined;
|
|
29
32
|
}) => Promise<Amity.Cached<Amity.Post>>;
|
|
30
33
|
//# sourceMappingURL=createPost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createPost.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createPost.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAKzE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU;;;;;;;gBAKgB,UAAU,CAAC,QAAQ,CAAC;;;;;MAKxD,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CA4ClC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { PostRepository } from '@amityco/ts-sdk'
|
|
4
|
+
* const created = await PostRepository.createRoomPost({
|
|
5
|
+
* targetType: 'user',
|
|
6
|
+
* targetId: 'foobar',
|
|
7
|
+
* data: { text: 'hello world', title: 'Room Title', roomId: 'roomId123' }
|
|
8
|
+
* }))
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* Creates an {@link Amity.Post}
|
|
12
|
+
*
|
|
13
|
+
* @param bundle The data necessary to create a new {@link Amity.Post}
|
|
14
|
+
* @returns The newly created {@link Amity.Post}
|
|
15
|
+
*
|
|
16
|
+
* @category Post API
|
|
17
|
+
* @async
|
|
18
|
+
*/
|
|
19
|
+
export declare const createRoomPost: <T extends string>(bundle: Pick<Amity.Post<T>, "targetId" | "targetType"> & Partial<Pick<Amity.Post<T>, "tags" | "metadata" | "mentionees" | "hashtags">> & {
|
|
20
|
+
data: {
|
|
21
|
+
roomId: string;
|
|
22
|
+
} & {
|
|
23
|
+
[k: string]: any;
|
|
24
|
+
};
|
|
25
|
+
links?: Amity.Link[] | undefined;
|
|
26
|
+
productTags?: Amity.ProductTag[] | null | undefined;
|
|
27
|
+
pinnedProductId?: string | undefined;
|
|
28
|
+
}) => Promise<Amity.Cached<Amity.Post>>;
|
|
29
|
+
//# sourceMappingURL=createRoomPost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRoomPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createRoomPost.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,cAAc;;gBAGL,MAAM;;;;;;;MAKzB,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAuBlC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AmityAttachmentProductTags } from '~/productRepository/helpers';
|
|
1
2
|
/**
|
|
2
3
|
* ```js
|
|
3
4
|
* import { PostRepository } from '@amityco/ts-sdk-react-native'
|
|
@@ -21,5 +22,7 @@ export declare const editPost: <T extends string>(postId: Amity.Post['postId'],
|
|
|
21
22
|
fileId: Amity.File['fileId'];
|
|
22
23
|
}[] | undefined;
|
|
23
24
|
links?: Amity.Link[] | undefined;
|
|
25
|
+
productTags?: Amity.TextProductTag[] | undefined;
|
|
26
|
+
attachmentProductTags?: AmityAttachmentProductTags | undefined;
|
|
24
27
|
}) => Promise<Amity.Cached<Amity.Post>>;
|
|
25
28
|
//# sourceMappingURL=editPost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/editPost.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/editPost.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAKzE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,QAAQ,6BACX,MAAM,IAAI,CAAC,QAAQ,CAAC;;;gBAEO,UAAU,CAAC,QAAQ,CAAC;;;;;MAKtD,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAyClC,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* const { data: post } = await getPost('foobar')
|
|
5
5
|
* ```
|
|
6
6
|
*
|
|
7
|
-
* Fetches a {@link Amity.
|
|
7
|
+
* Fetches a {@link Amity.InternalPost} object
|
|
8
8
|
*
|
|
9
9
|
* @param postId the ID of the {@link Amity.Post} to fetch
|
|
10
10
|
* @returns the associated {@link Amity.Post} object
|
|
@@ -12,4 +12,8 @@ export * from './isPostFlaggedByMe';
|
|
|
12
12
|
export * from './createClipPost';
|
|
13
13
|
export * from './createAudioPost';
|
|
14
14
|
export * from './createMixedMediaPost';
|
|
15
|
+
export * from './createRoomPost';
|
|
16
|
+
export * from './pinProduct';
|
|
17
|
+
export * from './unpinProduct';
|
|
18
|
+
export * from './updateProductTags';
|
|
15
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAE/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AAEpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAE/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AAEpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { PostRepository } from '@amityco/ts-sdk'
|
|
4
|
+
* const pinProduct = await PostRepository.pinProduct(postId, pinnedProductId)
|
|
5
|
+
* ```
|
|
6
|
+
*
|
|
7
|
+
* @param postId The ID of the post to unpin the product from
|
|
8
|
+
* @param productId the ID of the product to pin
|
|
9
|
+
* @returns Amity.Post
|
|
10
|
+
*
|
|
11
|
+
* @category Post API
|
|
12
|
+
* @async
|
|
13
|
+
* */
|
|
14
|
+
export declare const pinProduct: (postId: Amity.Post['postId'], pinnedProductId: Amity.Post['pinnedProductId']) => Promise<Amity.Cached<Amity.Post>>;
|
|
15
|
+
//# sourceMappingURL=pinProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pinProduct.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/pinProduct.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;KAYK;AACL,eAAO,MAAM,UAAU,WACb,MAAM,IAAI,CAAC,QAAQ,CAAC,mBACX,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAC7C,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAqBlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPost.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/postRepository/api/tests/integration/createPost.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPost.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/postRepository/api/tests/integration/getPost.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPosts.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/postRepository/api/tests/integration/getPosts.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { product1 as productFixture1, product2 as productFixture2 } from '~/productRepository/tests/integration/setup';
|
|
2
|
+
export { productFixture1, productFixture2 };
|
|
3
|
+
export declare const BASE_URL = "https://apix.sg.amity.co";
|
|
4
|
+
export declare const imagePost: Amity.InternalPost<any>;
|
|
5
|
+
export declare const videoPost: Amity.InternalPost<any>;
|
|
6
|
+
export declare const pollPost: Amity.InternalPost<any>;
|
|
7
|
+
export declare const livestreamPost: Amity.InternalPost<any>;
|
|
8
|
+
export declare const clipPost: Amity.InternalPost<any>;
|
|
9
|
+
export declare const roomPost: Amity.InternalPost<any>;
|
|
10
|
+
export declare const textPostWithProductTags: Amity.InternalPost<any>;
|
|
11
|
+
export declare const imagePostWithAttachmentProductTags: Amity.InternalPost<any>;
|
|
12
|
+
export declare const postWithMultipleProductTags: Amity.InternalPost<any>;
|
|
13
|
+
export declare const createPostPayload: {
|
|
14
|
+
posts: Amity.Post<any>[];
|
|
15
|
+
users: Amity.User[];
|
|
16
|
+
postChildren: never[];
|
|
17
|
+
communities: never[];
|
|
18
|
+
communityUsers: never[];
|
|
19
|
+
categories: never[];
|
|
20
|
+
comments: never[];
|
|
21
|
+
feeds: never[];
|
|
22
|
+
files: never[];
|
|
23
|
+
videoStreamings: never[];
|
|
24
|
+
videoStreamingChildren: never[];
|
|
25
|
+
rooms: never[];
|
|
26
|
+
products: never[];
|
|
27
|
+
};
|
|
28
|
+
export declare const getPostPayload: {
|
|
29
|
+
posts: Amity.Post<any>[];
|
|
30
|
+
users: Amity.User[];
|
|
31
|
+
postChildren: never[];
|
|
32
|
+
communities: never[];
|
|
33
|
+
communityUsers: never[];
|
|
34
|
+
categories: never[];
|
|
35
|
+
comments: never[];
|
|
36
|
+
feeds: never[];
|
|
37
|
+
files: never[];
|
|
38
|
+
videoStreamings: never[];
|
|
39
|
+
videoStreamingChildren: never[];
|
|
40
|
+
rooms: never[];
|
|
41
|
+
products: never[];
|
|
42
|
+
};
|
|
43
|
+
export declare const queryPostsPayload: {
|
|
44
|
+
posts: Amity.Post<any>[];
|
|
45
|
+
users: Amity.User[];
|
|
46
|
+
paging: {
|
|
47
|
+
next: undefined;
|
|
48
|
+
};
|
|
49
|
+
postChildren: never[];
|
|
50
|
+
communities: never[];
|
|
51
|
+
communityUsers: never[];
|
|
52
|
+
categories: never[];
|
|
53
|
+
comments: never[];
|
|
54
|
+
feeds: never[];
|
|
55
|
+
files: never[];
|
|
56
|
+
videoStreamings: never[];
|
|
57
|
+
videoStreamingChildren: never[];
|
|
58
|
+
rooms: never[];
|
|
59
|
+
products: never[];
|
|
60
|
+
};
|
|
61
|
+
export declare function buildPostPayload(post: Amity.InternalPost, extras?: Partial<Amity.PostPayload>): Amity.PostPayload;
|
|
62
|
+
export declare const handlers: import("msw/lib/core/handlers/HttpHandler").HttpHandler[];
|
|
63
|
+
export declare const server: import("msw/node").SetupServerApi;
|
|
64
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../../../src/postRepository/api/tests/integration/setup.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,QAAQ,IAAI,eAAe,EAC3B,QAAQ,IAAI,eAAe,EAC5B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;AAE5C,eAAO,MAAM,QAAQ,6BAA6B,CAAC;AAMnD,eAAO,MAAM,SAAS,yBAIpB,CAAC;AAEH,eAAO,MAAM,SAAS,yBAOpB,CAAC;AAEH,eAAO,MAAM,QAAQ,yBAInB,CAAC;AAEH,eAAO,MAAM,cAAc,yBAIzB,CAAC;AAEH,eAAO,MAAM,QAAQ,yBAInB,CAAC;AAEH,eAAO,MAAM,QAAQ,yBAInB,CAAC;AAEH,eAAO,MAAM,uBAAuB,yBAMlC,CAAC;AAEH,eAAO,MAAM,kCAAkC,yBAI7C,CAAC;AAEH,eAAO,MAAM,2BAA2B,yBAOtC,CAAC;AA4BH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;CAI7B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAMF,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,KAAK,CAAC,YAAY,EACxB,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,GAClC,KAAK,CAAC,WAAW,CAOnB;AAMD,eAAO,MAAM,QAAQ,2DA6CpB,CAAC;AAEF,eAAO,MAAM,MAAM,mCAA2B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { PostRepository } from '@amityco/ts-sdk'
|
|
4
|
+
* const unpinProduct = await PostRepository.unpinProduct(postId)
|
|
5
|
+
* ```
|
|
6
|
+
*
|
|
7
|
+
* @param postId The ID of the post to unpin the product from
|
|
8
|
+
* @returns Amity.Post
|
|
9
|
+
*
|
|
10
|
+
* @category Post API
|
|
11
|
+
* @async
|
|
12
|
+
* */
|
|
13
|
+
export declare const unpinProduct: (postId: Amity.Post['postId']) => Promise<Amity.Cached<Amity.Post>>;
|
|
14
|
+
//# sourceMappingURL=unpinProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unpinProduct.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/unpinProduct.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;KAWK;AACL,eAAO,MAAM,YAAY,WACf,MAAM,IAAI,CAAC,QAAQ,CAAC,KAC3B,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAmBlC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { PostRepository } from '@amityco/ts-sdk'
|
|
4
|
+
* const updateProductTags = await PostRepository.updateProductTags(postId, productTags)
|
|
5
|
+
* ```
|
|
6
|
+
*
|
|
7
|
+
* @param postId of child room
|
|
8
|
+
* @param productTags the array of product tags to set on the post
|
|
9
|
+
* @returns Amity.Post
|
|
10
|
+
*
|
|
11
|
+
* @category Post API
|
|
12
|
+
* @async
|
|
13
|
+
* */
|
|
14
|
+
export declare const updateProductTags: (postId: Amity.Post['postId'], productTags: Amity.MediaProductTag[]) => Promise<Amity.Cached<Amity.Post>>;
|
|
15
|
+
//# sourceMappingURL=updateProductTags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateProductTags.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/updateProductTags.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;KAYK;AACL,eAAO,MAAM,iBAAiB,WACpB,MAAM,IAAI,CAAC,QAAQ,CAAC,eACf,MAAM,eAAe,EAAE,KACnC,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAqBlC,CAAC"}
|
|
@@ -7,6 +7,9 @@ export declare enum EnumPostActions {
|
|
|
7
7
|
OnPostReactionAdded = "onPostReactionAdded",
|
|
8
8
|
OnPostReactionRemoved = "onPostReactionRemoved",
|
|
9
9
|
OnPostApproved = "onPostApproved",
|
|
10
|
-
OnPostDeclined = "onPostDeclined"
|
|
10
|
+
OnPostDeclined = "onPostDeclined",
|
|
11
|
+
OnPostPinProduct = "onPostPinProduct",
|
|
12
|
+
OnPostUnpinProduct = "onPostUnpinProduct",
|
|
13
|
+
OnPostUpdateProductTags = "onPostUpdateProductTags"
|
|
11
14
|
}
|
|
12
15
|
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/postRepository/observers/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,qBAAqB,0BAA0B;IAC/C,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/postRepository/observers/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,qBAAqB,0BAA0B;IAC/C,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,kBAAkB,uBAAuB;IACzC,uBAAuB,4BAA4B;CACpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostLiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPosts/PostLiveCollectionController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;
|
|
1
|
+
{"version":3,"file":"PostLiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPosts/PostLiveCollectionController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAe1F,qBAAa,4BAA6B,SAAQ,wBAAwB,CACxE,MAAM,EACN,KAAK,CAAC,kBAAkB,EACxB,KAAK,CAAC,IAAI,EACV,wBAAwB,CACzB;IACC,OAAO,CAAC,qBAAqB,CAA4B;IAEzD,OAAO,CAAC,KAAK,CAA2B;gBAE5B,KAAK,EAAE,KAAK,CAAC,kBAAkB,EAAE,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC;IAmB/F,SAAS,CAAC,KAAK;cAUC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU;IAI/E,SAAS,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,KAAK,CAAC,sCAAsC,CAAC,MAAM,CAAC;IAIvD,iBAAiB;IAIjB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,0BAA0B;IA2BzE,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE;CAwCvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPosts/PostPaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAIlF,qBAAa,wBAAyB,SAAQ,oBAAoB,CAChE,MAAM,EACN,KAAK,CAAC,kBAAkB,CACzB;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,kBAAkB,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;
|
|
1
|
+
{"version":3,"file":"PostPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPosts/PostPaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAIlF,qBAAa,wBAAyB,SAAQ,oBAAoB,CAChE,MAAM,EACN,KAAK,CAAC,kBAAkB,CACzB;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,kBAAkB,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;CAqClF"}
|
|
@@ -3,6 +3,8 @@ import { EnumPostActions } from '../enums';
|
|
|
3
3
|
export declare class PostQueryStreamController extends QueryStreamController<Amity.PostPayload, Amity.PostLiveCollection> {
|
|
4
4
|
private notifyChange;
|
|
5
5
|
private preparePayload;
|
|
6
|
+
private validatedUntilAt;
|
|
7
|
+
private boundaryReached;
|
|
6
8
|
constructor(query: Amity.PostLiveCollection, cacheKey: string[], notifyChange: (params: Amity.LiveCollectionNotifyParams) => void, preparePayload: (response: Amity.PostPayload) => Amity.ProcessedPostPayload);
|
|
7
9
|
saveToMainDB(response: Amity.PostPayload): Promise<void>;
|
|
8
10
|
appendToQueryStream(response: Amity.PostPayload & Partial<Amity.Pagination>, direction: Amity.LiveCollectionPageDirection, refresh?: boolean): void;
|
|
@@ -11,5 +13,6 @@ export declare class PostQueryStreamController extends QueryStreamController<Ami
|
|
|
11
13
|
fn: (reactor: (post: Amity.InternalPost) => void) => Amity.Unsubscriber;
|
|
12
14
|
action: EnumPostActions;
|
|
13
15
|
}[]): Amity.Unsubscriber[];
|
|
16
|
+
hasBoundaryReached(): boolean;
|
|
14
17
|
}
|
|
15
18
|
//# sourceMappingURL=PostQueryStreamController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPosts/PostQueryStreamController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAKpF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"PostQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPosts/PostQueryStreamController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAKpF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C,qBAAa,yBAA0B,SAAQ,qBAAqB,CAClE,KAAK,CAAC,WAAW,EACjB,KAAK,CAAC,kBAAkB,CACzB;IACC,OAAO,CAAC,YAAY,CAAqD;IAEzE,OAAO,CAAC,cAAc,CAA8D;IAEpF,OAAO,CAAC,gBAAgB,CAAqB;IAE7C,OAAO,CAAC,eAAe,CAAS;gBAG9B,KAAK,EAAE,KAAK,CAAC,kBAAkB,EAC/B,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,0BAA0B,KAAK,IAAI,EAChE,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,KAAK,KAAK,CAAC,oBAAoB;IASvE,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW;IAW9C,mBAAmB,CACjB,QAAQ,EAAE,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EACvD,SAAS,EAAE,KAAK,CAAC,2BAA2B,EAC5C,OAAO,UAAQ;IAwCjB,OAAO,CAAC,MAAM,EAAE,eAAe,UACf,MAAM,YAAY;IA8ClC,YAAY,CACV,gBAAgB,EAAE;QAChB,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,KAAK,IAAI,KAAK,KAAK,CAAC,YAAY,CAAC;QACxE,MAAM,EAAE,eAAe,CAAC;KACzB,EAAE;IAKL,kBAAkB,IAAI,OAAO;CAG9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/postRepository/utils/payload.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,kBAAkB,YAAa,MAAM,WAAW,KAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/postRepository/utils/payload.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,kBAAkB,YAAa,MAAM,WAAW,KAAG,MAAM,oBA2ErE,CAAC;AAEF,eAAO,MAAM,gCAAgC,4CAI1C,MAAM,yBAAyB,KAAG,MAAM,kCAO1C,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper class for managing product tags per media attachment.
|
|
3
|
+
*
|
|
4
|
+
* This class provides a convenient way to organize product tags by file ID,
|
|
5
|
+
* allowing you to associate multiple products with individual media attachments
|
|
6
|
+
* (images, videos) in a post.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const attachmentTags = new AmityAttachmentProductTags();
|
|
11
|
+
*
|
|
12
|
+
* // Set tags to specific images
|
|
13
|
+
*
|
|
14
|
+
* attachmentTags.set('image-file-2', [
|
|
15
|
+
* { productId: 'product-3' },
|
|
16
|
+
* { productId: 'product-4' },
|
|
17
|
+
* ]);
|
|
18
|
+
*
|
|
19
|
+
* // Get tags for a specific file
|
|
20
|
+
* const tagsOnImage1 = attachmentTags.get('image-file-1');
|
|
21
|
+
* // Returns: [{ productId: 'product-1' }, { productId: 'product-2' }]
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class AmityAttachmentProductTags {
|
|
25
|
+
private map;
|
|
26
|
+
/**
|
|
27
|
+
* Get all product tags associated with a specific file.
|
|
28
|
+
*
|
|
29
|
+
* @param fileId - The ID of the file (image/video)
|
|
30
|
+
* @returns Array of product tags for the file, empty array if none exist
|
|
31
|
+
*/
|
|
32
|
+
get(fileId: string): Amity.MediaProductTag[];
|
|
33
|
+
/**
|
|
34
|
+
* Set product tags for a specific file, replacing any existing tags.
|
|
35
|
+
*
|
|
36
|
+
* @param fileId - The ID of the file (image/video)
|
|
37
|
+
* @param tags - Array of product tags to set for the file
|
|
38
|
+
*/
|
|
39
|
+
set(fileId: string, tags: Amity.MediaProductTag[]): void;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=AttachmentProductTags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentProductTags.d.ts","sourceRoot":"","sources":["../../../src/productRepository/helpers/AttachmentProductTags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,GAAG,CAAmD;IAE9D;;;;;OAKG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,eAAe,EAAE;IAI5C;;;;;OAKG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,eAAe,EAAE,GAAG,IAAI;CAGzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/productRepository/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/productRepository/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const getProduct: {
|
|
2
|
+
(productId: Amity.InternalProduct['productId']): Promise<Amity.Cached<Amity.InternalProduct>>;
|
|
3
|
+
locally(productId: Amity.InternalProduct['productId']): Amity.Cached<Amity.InternalProduct> | undefined;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=getProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProduct.d.ts","sourceRoot":"","sources":["../../../src/productRepository/internalApi/getProduct.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,UAAU;gBACV,MAAM,eAAe,CAAC,WAAW,CAAC,GAC5C,QAAQ,MAAM,MAAM,CAAC,MAAM,eAAe,CAAC,CAAC;uBAmClC,MAAM,eAAe,CAAC,WAAW,CAAC,GAC5C,MAAM,MAAM,CAAC,MAAM,eAAe,CAAC,GAAG,SAAS;CAJjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/productRepository/internalApi/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { ProductRepository } from '@amityco/ts-sdk';
|
|
4
|
+
*
|
|
5
|
+
* let product;
|
|
6
|
+
*
|
|
7
|
+
* const unsub = ProductRepository.getProduct(productId, response => {
|
|
8
|
+
* product = response.data;
|
|
9
|
+
* });
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Observe all mutation on a given {@link Amity.Product}
|
|
13
|
+
*
|
|
14
|
+
* @param productId the ID of the product to observe
|
|
15
|
+
* @param callback the function to call when new data are available
|
|
16
|
+
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the product
|
|
17
|
+
*
|
|
18
|
+
* @category Product Live Object
|
|
19
|
+
*/
|
|
20
|
+
export declare const getProduct: (productId: Amity.Product['productId'], callback: Amity.LiveObjectCallback<Amity.Product>) => Amity.Unsubscriber;
|
|
21
|
+
//# sourceMappingURL=getProduct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProduct.d.ts","sourceRoot":"","sources":["../../../src/productRepository/observers/getProduct.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,cACV,MAAM,OAAO,CAAC,WAAW,CAAC,YAC3B,MAAM,kBAAkB,CAAC,MAAM,OAAO,CAAC,KAChD,MAAM,YASR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/productRepository/observers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SearchProductPaginationController } from './PaginationController';
|
|
2
|
+
import { LiveCollectionController } from '~/core/liveCollection/LiveCollectionController';
|
|
3
|
+
export declare class SearchProductLiveCollectionController extends LiveCollectionController<'product', Amity.ProductLiveCollection, Amity.Product, SearchProductPaginationController> {
|
|
4
|
+
private queryStreamController;
|
|
5
|
+
private query;
|
|
6
|
+
constructor(query: Amity.ProductLiveCollection, callback: Amity.LiveCollectionCallback<Amity.Product>);
|
|
7
|
+
protected setup(): void;
|
|
8
|
+
protected persistModel(queryPayload: {
|
|
9
|
+
products: Amity.RawProduct[];
|
|
10
|
+
} & Amity.Pagination): Promise<void>;
|
|
11
|
+
protected persistQueryStream({ response, direction, refresh, }: Amity.LiveCollectionPersistQueryStreamParams<'product'>): void;
|
|
12
|
+
startSubscription(): Amity.Unsubscriber[];
|
|
13
|
+
notifyChange({ origin, loading, error }: Amity.LiveCollectionNotifyParams): void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=LiveCollectionController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/productRepository/observers/searchProducts/LiveCollectionController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAE3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAI1F,qBAAa,qCAAsC,SAAQ,wBAAwB,CACjF,SAAS,EACT,KAAK,CAAC,qBAAqB,EAC3B,KAAK,CAAC,OAAO,EACb,iCAAiC,CAClC;IACC,OAAO,CAAC,qBAAqB,CAAqC;IAElE,OAAO,CAAC,KAAK,CAA8B;gBAGzC,KAAK,EAAE,KAAK,CAAC,qBAAqB,EAClC,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,OAAO,CAAC;IAmBvD,SAAS,CAAC,KAAK;cAUC,YAAY,CAAC,YAAY,EAAE;QAAE,QAAQ,EAAE,KAAK,CAAC,UAAU,EAAE,CAAA;KAAE,GAAG,KAAK,CAAC,UAAU;IAI9F,SAAS,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,KAAK,CAAC,sCAAsC,CAAC,SAAS,CAAC;IAK1D,iBAAiB;IAIjB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,0BAA0B;CAqB1E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PaginationController } from '~/core/liveCollection/PaginationController';
|
|
2
|
+
export declare class SearchProductPaginationController extends PaginationController<'product', Amity.ProductLiveCollection> {
|
|
3
|
+
getRequest(queryParams: Amity.ProductLiveCollection, token: string | undefined): Promise<Amity.ProductPayload & Amity.Pagination>;
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=PaginationController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationController.d.ts","sourceRoot":"","sources":["../../../../src/productRepository/observers/searchProducts/PaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAGlF,qBAAa,iCAAkC,SAAQ,oBAAoB,CACzE,SAAS,EACT,KAAK,CAAC,qBAAqB,CAC5B;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,qBAAqB,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;CAerF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QueryStreamController } from '~/core/liveCollection/QueryStreamController';
|
|
2
|
+
export declare class SearchProductQueryStreamController extends QueryStreamController<Amity.ProductPayload, Amity.ProductLiveCollection> {
|
|
3
|
+
private notifyChange;
|
|
4
|
+
constructor(query: Amity.ProductLiveCollection, cacheKey: string[], notifyChange: (params: Amity.LiveCollectionNotifyParams) => void);
|
|
5
|
+
saveToMainDB(response: Amity.ProductPayload): void;
|
|
6
|
+
appendToQueryStream(response: Amity.ProductPayload & Partial<Amity.Pagination>, direction: Amity.LiveCollectionPageDirection, refresh?: boolean): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=QueryStreamController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/productRepository/observers/searchProducts/QueryStreamController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAMpF,qBAAa,kCAAmC,SAAQ,qBAAqB,CAC3E,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,qBAAqB,CAC5B;IACC,OAAO,CAAC,YAAY,CAAqD;gBAGvE,KAAK,EAAE,KAAK,CAAC,qBAAqB,EAClC,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,0BAA0B,KAAK,IAAI;IAOlE,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,cAAc;IAS3C,mBAAmB,CACjB,QAAQ,EAAE,KAAK,CAAC,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAC1D,SAAS,EAAE,KAAK,CAAC,2BAA2B,EAC5C,OAAO,UAAQ;CAiBlB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { ProductRepository } from '@amityco/ts-sdk'
|
|
4
|
+
*
|
|
5
|
+
* let products = []
|
|
6
|
+
* const unsub = ProductRepository.searchProducts({
|
|
7
|
+
* keyword: string,
|
|
8
|
+
* }, response => merge(products, response.data))
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* Observe all mutations on a list of {@link Amity.Product}
|
|
12
|
+
*
|
|
13
|
+
* @param params.keyword the search keyword
|
|
14
|
+
* @param params.isActive filter by active status
|
|
15
|
+
* @param params.isDeleted filter by deleted status
|
|
16
|
+
* @param params.sortBy sort option
|
|
17
|
+
* @param params.sortOrder order option
|
|
18
|
+
* @param callback the function to call when new data are available
|
|
19
|
+
* @param config
|
|
20
|
+
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the products
|
|
21
|
+
*
|
|
22
|
+
* @category Products Live Collection
|
|
23
|
+
*/
|
|
24
|
+
export declare const searchProducts: (params: Amity.ProductLiveCollection, callback: Amity.LiveCollectionCallback<Amity.Product>, config?: Amity.LiveCollectionConfig) => Amity.Unsubscriber;
|
|
25
|
+
//# sourceMappingURL=searchProducts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchProducts.d.ts","sourceRoot":"","sources":["../../../src/productRepository/observers/searchProducts.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,cAAc,WACjB,MAAM,qBAAqB,YACzB,MAAM,sBAAsB,CAAC,MAAM,OAAO,CAAC,WAC5C,MAAM,oBAAoB,KAClC,MAAM,YAqBR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProduct.integration.test.d.ts","sourceRoot":"","sources":["../../../../src/productRepository/tests/integration/getProduct.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchProducts.integration.test.d.ts","sourceRoot":"","sources":["../../../../src/productRepository/tests/integration/searchProducts.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const BASE_URL = "https://apix.sg.amity.co";
|
|
2
|
+
export declare const product1: Amity.RawProduct;
|
|
3
|
+
export declare const product2: Amity.RawProduct;
|
|
4
|
+
export declare const product3: Amity.RawProduct;
|
|
5
|
+
export declare const deletedProduct: Amity.RawProduct;
|
|
6
|
+
export declare const getProductPayload: Amity.ProductPayload;
|
|
7
|
+
export declare const searchProductsPayload: Amity.ProductPayload & Amity.Pagination;
|
|
8
|
+
export declare function buildProductPayload(product: Amity.RawProduct, extras?: Partial<Amity.ProductPayload>): Amity.ProductPayload;
|
|
9
|
+
export declare const handlers: import("msw/lib/core/handlers/HttpHandler").HttpHandler[];
|
|
10
|
+
export declare const server: import("msw/node").SetupServerApi;
|
|
11
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../../src/productRepository/tests/integration/setup.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,6BAA6B,CAAC;AAMnD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,UAgB5B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,UAe5B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,UAa5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,UAalC,CAAC;AASF,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,cAErC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,UAGhE,CAAC;AAMF,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,KAAK,CAAC,UAAU,EACzB,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,GACrC,KAAK,CAAC,cAAc,CAKtB;AAMD,eAAO,MAAM,QAAQ,2DAsBpB,CAAC;AAEF,eAAO,MAAM,MAAM,mCAA2B,CAAC"}
|