@amityco/ts-sdk 7.10.1-236ba91.0 → 7.10.1-508491e6.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.
Files changed (31) hide show
  1. package/dist/@types/domains/content.d.ts +11 -2
  2. package/dist/@types/domains/content.d.ts.map +1 -1
  3. package/dist/@types/domains/feed.d.ts +4 -1
  4. package/dist/@types/domains/feed.d.ts.map +1 -1
  5. package/dist/@types/domains/file.d.ts +3 -1
  6. package/dist/@types/domains/file.d.ts.map +1 -1
  7. package/dist/@types/domains/pinnedPost.d.ts +4 -1
  8. package/dist/@types/domains/pinnedPost.d.ts.map +1 -1
  9. package/dist/@types/domains/post.d.ts +16 -0
  10. package/dist/@types/domains/post.d.ts.map +1 -1
  11. package/dist/fileRepository/api/index.d.ts +1 -0
  12. package/dist/fileRepository/api/index.d.ts.map +1 -1
  13. package/dist/fileRepository/api/uploadAudio.d.ts +17 -0
  14. package/dist/fileRepository/api/uploadAudio.d.ts.map +1 -0
  15. package/dist/index.cjs.js +162 -5
  16. package/dist/index.esm.js +162 -6
  17. package/dist/index.umd.js +3 -3
  18. package/dist/messagePreview/utils/getSubChannelMessagePreviewWithUser.d.ts +1 -1
  19. package/dist/postRepository/api/createAudioPost.d.ts +30 -0
  20. package/dist/postRepository/api/createAudioPost.d.ts.map +1 -0
  21. package/dist/postRepository/api/createMixedMediaPost.d.ts +35 -0
  22. package/dist/postRepository/api/createMixedMediaPost.d.ts.map +1 -0
  23. package/dist/postRepository/api/index.d.ts +2 -0
  24. package/dist/postRepository/api/index.d.ts.map +1 -1
  25. package/dist/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostPaginationController.d.ts.map +1 -1
  26. package/dist/postRepository/observers/getPinnedPosts/PinnedPostPaginationController.d.ts.map +1 -1
  27. package/dist/utils/linkedObject/postLinkedObject.d.ts.map +1 -1
  28. package/dist/utils/postTypePredicate.d.ts +1 -0
  29. package/dist/utils/postTypePredicate.d.ts.map +1 -1
  30. package/dist/utils/tests/dummy/comment.d.ts +1 -1
  31. package/package.json +1 -1
@@ -3,7 +3,7 @@ export declare const getSubChannelMessagePreviewWithUser: (subChannel: Amity.Sub
3
3
  user: Amity.InternalUser | undefined;
4
4
  messagePreviewId: string;
5
5
  subChannelName: string;
6
- data?: string | Record<string, unknown> | Amity.ContentDataText | Amity.ContentDataFile | Amity.ContentDataImage | Amity.ContentDataVideo | Amity.ContentDataPoll | Amity.ContentDataStream | Amity.ContentDataClip | undefined;
6
+ data?: string | Record<string, unknown> | Amity.ContentDataText | Amity.ContentDataFile | Amity.ContentDataImage | Amity.ContentDataVideo | Amity.ContentDataAudio | Amity.ContentDataPoll | Amity.ContentDataStream | Amity.ContentDataClip | undefined;
7
7
  dataType?: any;
8
8
  channelId: string;
9
9
  subChannelId: string;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * ```js
3
+ * import { PostRepository } from '@amityco/ts-sdk'
4
+ * const created = await PostRepository.createAudioPost({
5
+ * targetType: 'user',
6
+ * targetId: 'foobar',
7
+ * data: { text: 'Audio Post', title: 'Audio Post Title' },
8
+ * attachments: [{ type: 'audio', fileId: 'fileId123'}]
9
+ * }))
10
+ * ```
11
+ *
12
+ * Creates an {@link Amity.Post}
13
+ *
14
+ * @param bundle The data necessary to create a new {@link Amity.Post}
15
+ * @returns The newly created {@link Amity.Post}
16
+ *
17
+ * @category Post API
18
+ * @async
19
+ */
20
+ export declare const createAudioPost: (bundle: Pick<Amity.Post, 'targetType' | 'targetId'> & Partial<Pick<Amity.Post, 'metadata' | 'mentionees' | 'tags' | 'hashtags'>> & {
21
+ data?: {
22
+ text?: string;
23
+ title?: string;
24
+ };
25
+ attachments: {
26
+ type: Extract<Amity.MixedMediaPostContentType, 'audio'>;
27
+ fileId: Amity.File['fileId'];
28
+ }[];
29
+ }) => Promise<Amity.Cached<Amity.Post>>;
30
+ //# sourceMappingURL=createAudioPost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAudioPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createAudioPost.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;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;CACL,KACF,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAkBlC,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * ```js
3
+ * import { PostRepository } from '@amityco/ts-sdk'
4
+ * const { data } = await PostRepository.createMixedMediaPost({
5
+ * targetType: 'community',
6
+ * targetId: 'community123',
7
+ * data: { text: 'Check out my mixed media post!', title: 'Mixed Media Post' },
8
+ * attachments: [
9
+ * { fileId: "file1", type: "image" },
10
+ * { fileId: "file2", type: "video" },
11
+ * { fileId: "file3", type: "audio" },
12
+ * { fileId: "file4", type: "file" }
13
+ * ],
14
+ * })
15
+ * ```
16
+ *
17
+ * Creates an {@link Amity.Post}
18
+ *
19
+ * @param bundle The data necessary to create a new {@link Amity.Post}
20
+ * @returns The newly created {@link Amity.Post}
21
+ *
22
+ * @category Post API
23
+ * @async
24
+ */
25
+ export declare const createMixedMediaPost: (bundle: Pick<Amity.Post, 'targetType' | 'targetId'> & Partial<Pick<Amity.Post, 'metadata' | 'mentionees' | 'tags' | 'hashtags'>> & {
26
+ data?: {
27
+ text?: string;
28
+ title?: string;
29
+ };
30
+ attachments: {
31
+ type: Amity.MixedMediaPostContentType;
32
+ fileId: Amity.File['fileId'];
33
+ }[];
34
+ }) => Promise<Amity.Cached<Amity.Post>>;
35
+ //# sourceMappingURL=createMixedMediaPost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createMixedMediaPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createMixedMediaPost.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;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;CACxF,KACF,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAkBlC,CAAC"}
@@ -10,4 +10,6 @@ export * from './flagPost';
10
10
  export * from './unflagPost';
11
11
  export * from './isPostFlaggedByMe';
12
12
  export * from './createClipPost';
13
+ export * from './createAudioPost';
14
+ export * from './createMixedMediaPost';
13
15
  //# 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"}
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 +1 @@
1
- {"version":3,"file":"GlobalPinnedPostPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostPaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAGlF,qBAAa,oCAAqC,SAAQ,oBAAoB,CAC5E,YAAY,EACZ,KAAK,CAAC,8BAA8B,CACrC;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,8BAA8B,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;;;;;;;;;CAW9F"}
1
+ {"version":3,"file":"GlobalPinnedPostPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostPaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAGlF,qBAAa,oCAAqC,SAAQ,oBAAoB,CAC5E,YAAY,EACZ,KAAK,CAAC,8BAA8B,CACrC;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,8BAA8B,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;;;;;;;;;CAc9F"}
@@ -1 +1 @@
1
- {"version":3,"file":"PinnedPostPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPinnedPosts/PinnedPostPaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAGlF,qBAAa,8BAA+B,SAAQ,oBAAoB,CACtE,YAAY,EACZ,KAAK,CAAC,wBAAwB,CAC/B;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,wBAAwB,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;;;;;;;;;CAexF"}
1
+ {"version":3,"file":"PinnedPostPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPinnedPosts/PinnedPostPaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAGlF,qBAAa,8BAA+B,SAAQ,oBAAoB,CACtE,YAAY,EACZ,KAAK,CAAC,wBAAwB,CAC/B;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,wBAAwB,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;;;;;;;;;CAkBxF"}
@@ -1 +1 @@
1
- {"version":3,"file":"postLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/postLinkedObject.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,gBAAgB,SAAU,MAAM,YAAY,KAAG,MAAM,IAwFjE,CAAC"}
1
+ {"version":3,"file":"postLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/postLinkedObject.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,gBAAgB,SAAU,MAAM,YAAY,KAAG,MAAM,IA8FjE,CAAC"}
@@ -4,4 +4,5 @@ export declare function isAmityVideoPost(post: Amity.InternalPost): post is Amit
4
4
  export declare function isAmityLivestreamPost(post: Amity.InternalPost): post is Amity.Post<'liveStream'>;
5
5
  export declare function isAmityPollPost(post: Amity.InternalPost): post is Amity.Post<'poll'>;
6
6
  export declare function isAmityClipPost(post: Amity.InternalPost): post is Amity.Post<'clip'>;
7
+ export declare function isAmityAudioPost(post: Amity.InternalPost): post is Amity.Post<'audio'>;
7
8
  //# sourceMappingURL=postTypePredicate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postTypePredicate.d.ts","sourceRoot":"","sources":["../../src/utils/postTypePredicate.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAOtF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAOpF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAQtF;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAOhG;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAOpF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAOpF"}
1
+ {"version":3,"file":"postTypePredicate.d.ts","sourceRoot":"","sources":["../../src/utils/postTypePredicate.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAOtF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAOpF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAQtF;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAOhG;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAOpF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAOpF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAOtF"}
@@ -23,7 +23,7 @@ export declare const generateComment: (params?: Partial<Amity.InternalComment>)
23
23
  referenceType: Amity.CommentReferenceType;
24
24
  dataType?: any;
25
25
  dataTypes?: any[] | undefined;
26
- data?: string | Record<string, unknown> | Amity.ContentDataText | Amity.ContentDataFile | Amity.ContentDataImage | Amity.ContentDataVideo | Amity.ContentDataPoll | Amity.ContentDataStream | Amity.ContentDataClip | undefined;
26
+ data?: string | Record<string, unknown> | Amity.ContentDataText | Amity.ContentDataFile | Amity.ContentDataImage | Amity.ContentDataVideo | Amity.ContentDataAudio | Amity.ContentDataPoll | Amity.ContentDataStream | Amity.ContentDataClip | undefined;
27
27
  metadata?: Record<string, any> | undefined;
28
28
  flagCount: number;
29
29
  hashFlag: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk",
3
- "version": "7.10.1-236ba91.0",
3
+ "version": "7.10.1-508491e6.0",
4
4
  "license": "CC-BY-ND-4.0",
5
5
  "author": "amity.co <developers@amity.co> (https://amity.co)",
6
6
  "description": "Amity Social Cloud Typescript SDK",