@amityco/ts-sdk 7.9.2-0d94d4d3.0 → 7.9.2-132846e8.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.
@@ -17,13 +17,13 @@
17
17
  * @category Post API
18
18
  * @async
19
19
  */
20
- export declare const createAudioPost: (bundle: Pick<Amity.Post, 'targetType' | 'targetId'> & Partial<Pick<Amity.Post, 'metadata' | 'mentionees' | 'tags' | 'hashtags'>> & {
20
+ export declare const createAudioPost: <T extends string = "audio">(bundle: Pick<Amity.Post<T>, "targetId" | "targetType"> & Partial<Pick<Amity.Post<T>, "tags" | "metadata" | "mentionees" | "hashtags">> & {
21
21
  data?: {
22
- text?: string;
23
- title?: string;
24
- };
22
+ text?: string | undefined;
23
+ title?: string | undefined;
24
+ } | undefined;
25
25
  attachments: {
26
- type: Extract<Amity.MixedMediaPostContentType, 'audio'>;
26
+ type: T;
27
27
  fileId: Amity.File['fileId'];
28
28
  }[];
29
29
  }) => Promise<Amity.Cached<Amity.Post>>;
@@ -1 +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"}
1
+ {"version":3,"file":"createAudioPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createAudioPost.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe;;;;;;;gBASZ,UAAU,CAAC,QAAQ,CAAC;;MAGjC,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAkBlC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk",
3
- "version": "7.9.2-0d94d4d3.0",
3
+ "version": "7.9.2-132846e8.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",
@@ -26,15 +26,15 @@ import { preparePostPayload } from '../utils/payload';
26
26
  * @category Post API
27
27
  * @async
28
28
  */
29
- export const createAudioPost = async (
30
- bundle: Pick<Amity.Post, 'targetType' | 'targetId'> &
31
- Partial<Pick<Amity.Post, 'metadata' | 'mentionees' | 'tags' | 'hashtags'>> & {
29
+ export const createAudioPost = async <T extends Amity.PostContentType = 'audio'>(
30
+ bundle: Pick<Amity.Post<T>, 'targetType' | 'targetId'> &
31
+ Partial<Pick<Amity.Post<T>, 'metadata' | 'mentionees' | 'tags' | 'hashtags'>> & {
32
32
  data?: {
33
33
  text?: string;
34
34
  title?: string;
35
35
  };
36
36
  attachments: {
37
- type: Extract<Amity.MixedMediaPostContentType, 'audio'>;
37
+ type: T;
38
38
  fileId: Amity.File['fileId'];
39
39
  }[];
40
40
  },