@amityco/ts-sdk-react-native 7.26.1-fbe5a6dd.0 → 7.27.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 (59) hide show
  1. package/dist/@types/core/transport.d.ts +3 -3
  2. package/dist/@types/core/transport.d.ts.map +1 -1
  3. package/dist/@types/domains/client.d.ts +9 -0
  4. package/dist/@types/domains/client.d.ts.map +1 -1
  5. package/dist/@types/domains/content.d.ts +6 -1
  6. package/dist/@types/domains/content.d.ts.map +1 -1
  7. package/dist/@types/domains/file.d.ts +11 -2
  8. package/dist/@types/domains/file.d.ts.map +1 -1
  9. package/dist/@types/domains/liveViewerCount.d.ts +22 -0
  10. package/dist/@types/domains/liveViewerCount.d.ts.map +1 -0
  11. package/dist/@types/index.d.ts +1 -0
  12. package/dist/@types/index.d.ts.map +1 -1
  13. package/dist/client/api/createClient.d.ts.map +1 -1
  14. package/dist/client/api/getLiveViewerCountConfig.d.ts +24 -0
  15. package/dist/client/api/getLiveViewerCountConfig.d.ts.map +1 -0
  16. package/dist/client/api/index.d.ts +1 -0
  17. package/dist/client/api/index.d.ts.map +1 -1
  18. package/dist/client/api/loginWithAccessToken.d.ts.map +1 -1
  19. package/dist/client/api/logout.d.ts.map +1 -1
  20. package/dist/client/api/renewTokenWithHandler.d.ts.map +1 -1
  21. package/dist/client/api/renewWithAccessToken.d.ts.map +1 -1
  22. package/dist/client/api/resumeSession.d.ts.map +1 -1
  23. package/dist/client/api/tests/renewTokenWithHandler.test.d.ts +2 -0
  24. package/dist/client/api/tests/renewTokenWithHandler.test.d.ts.map +1 -0
  25. package/dist/client/api/tests/renewWithAccessToken.test.d.ts +2 -0
  26. package/dist/client/api/tests/renewWithAccessToken.test.d.ts.map +1 -0
  27. package/dist/client/api/tests/validateAccessToken.test.d.ts +2 -0
  28. package/dist/client/api/tests/validateAccessToken.test.d.ts.map +1 -0
  29. package/dist/client/api/validateAccessToken.d.ts +1 -1
  30. package/dist/client/api/validateAccessToken.d.ts.map +1 -1
  31. package/dist/core/transports/mqtt.d.ts.map +1 -1
  32. package/dist/fileRepository/api/getFile.d.ts.map +1 -1
  33. package/dist/fileRepository/api/uploadImage.d.ts.map +1 -1
  34. package/dist/fileRepository/api/uploadVideo.d.ts.map +1 -1
  35. package/dist/index.cjs.js +221 -117
  36. package/dist/index.esm.js +222 -118
  37. package/dist/index.umd.js +1 -1
  38. package/dist/postRepository/events/utils.d.ts.map +1 -1
  39. package/dist/userRepository/observers/index.d.ts +1 -0
  40. package/dist/userRepository/observers/index.d.ts.map +1 -1
  41. package/dist/userRepository/observers/searchUserByDisplayName.d.ts +2 -0
  42. package/dist/userRepository/observers/searchUserByDisplayName.d.ts.map +1 -1
  43. package/dist/userRepository/observers/searchUsers.d.ts +26 -0
  44. package/dist/userRepository/observers/searchUsers.d.ts.map +1 -0
  45. package/dist/userRepository/observers/tests/integrations/searchUsers.integration.test.d.ts +2 -0
  46. package/dist/userRepository/observers/tests/integrations/searchUsers.integration.test.d.ts.map +1 -0
  47. package/dist/userRepository/observers/tests/searchUsers.test.d.ts +2 -0
  48. package/dist/userRepository/observers/tests/searchUsers.test.d.ts.map +1 -0
  49. package/dist/utils/linkedObject/fileLinkedObject.d.ts +2 -0
  50. package/dist/utils/linkedObject/fileLinkedObject.d.ts.map +1 -0
  51. package/dist/utils/linkedObject/index.d.ts +1 -0
  52. package/dist/utils/linkedObject/index.d.ts.map +1 -1
  53. package/dist/utils/linkedObject/postLinkedObject.d.ts.map +1 -1
  54. package/dist/utils/tests/dummy/file.d.ts.map +1 -1
  55. package/package.json +1 -1
  56. package/dist/postRepository/events/parentPost.d.ts +0 -32
  57. package/dist/postRepository/events/parentPost.d.ts.map +0 -1
  58. package/dist/postRepository/events/tests/parentPost.test.d.ts +0 -2
  59. package/dist/postRepository/events/tests/parentPost.test.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/postRepository/events/utils.ts"],"names":[],"mappings":"AA2DA,eAAO,MAAM,yBAAyB,UAC7B,MAAM,MAAM,cAAc,YACvB,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBAwE7C,CAAC;AAEF,eAAO,MAAM,8BAA8B,UAClC,MAAM,KAAK,MAAM,eAAe,EAAE,wBAAwB,GAAG,2BAA2B,CAAC,YACtF,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBA8B7C,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/postRepository/events/utils.ts"],"names":[],"mappings":"AAkDA,eAAO,MAAM,yBAAyB,UAC7B,MAAM,MAAM,cAAc,YACvB,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBAwE7C,CAAC;AAEF,eAAO,MAAM,8BAA8B,UAClC,MAAM,KAAK,MAAM,eAAe,EAAE,wBAAwB,GAAG,2BAA2B,CAAC,YACtF,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBA8B7C,CAAC"}
@@ -2,6 +2,7 @@ export { getUser } from './getUser';
2
2
  export { getUsers } from './getUsers';
3
3
  export { getBlockedUsers } from './getBlockedUsers';
4
4
  export { getBlockingUsers } from './getBlockingUsers';
5
+ export { searchUsers } from './searchUsers';
5
6
  export { searchUserByDisplayName } from './searchUserByDisplayName';
6
7
  export { getReachedUsers } from './getReachedUsers';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/userRepository/observers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/userRepository/observers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  /**
2
+ * @deprecated Use {@link searchUsers} instead. `searchUserByDisplayName` will be removed in a future major version.
3
+ *
2
4
  * ```js
3
5
  * import { UserRepository } from '@amityco/ts-sdk-react-native'
4
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"searchUserByDisplayName.d.ts","sourceRoot":"","sources":["../../../src/userRepository/observers/searchUserByDisplayName.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,uBAAuB,WAC1B,MAAM,wBAAwB,YAC5B,MAAM,sBAAsB,CAAC,MAAM,YAAY,CAAC,WACjD,MAAM,oBAAoB,eAuBpC,CAAC"}
1
+ {"version":3,"file":"searchUserByDisplayName.d.ts","sourceRoot":"","sources":["../../../src/userRepository/observers/searchUserByDisplayName.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,uBAAuB,WAC1B,MAAM,wBAAwB,YAC5B,MAAM,sBAAsB,CAAC,MAAM,YAAY,CAAC,WACjD,MAAM,oBAAoB,eAuBpC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * ```js
3
+ * import { UserRepository } from '@amityco/ts-sdk'
4
+ *
5
+ * let users = []
6
+ * const unsub = UserRepository.searchUsers(
7
+ * { displayName: 'jack', searchBy: [SearchUsersByEnum.DISPLAY_NAME] },
8
+ * response => merge(users, response.data),
9
+ * )
10
+ * ```
11
+ *
12
+ * Observe all mutations on a list of {@link Amity.InternalUser}s.
13
+ *
14
+ * Pass `searchBy` in `params` to restrict which user fields are matched
15
+ * (e.g. `[SearchUsersByEnum.DISPLAY_NAME]`). When omitted, the backend
16
+ * default (both `displayName` and `userId`) applies.
17
+ *
18
+ * @param params for searching users
19
+ * @param callback the function to call when new data are available
20
+ * @param config the configuration for the live collection
21
+ * @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the users
22
+ *
23
+ * @category Category Live Collection
24
+ */
25
+ export declare const searchUsers: (params: Amity.UserSearchLiveCollection, callback: Amity.LiveCollectionCallback<Amity.InternalUser>, config?: Amity.LiveCollectionConfig) => () => void;
26
+ //# sourceMappingURL=searchUsers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchUsers.d.ts","sourceRoot":"","sources":["../../../src/userRepository/observers/searchUsers.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,WAAW,WACd,MAAM,wBAAwB,YAC5B,MAAM,sBAAsB,CAAC,MAAM,YAAY,CAAC,WACjD,MAAM,oBAAoB,eAuBpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=searchUsers.integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchUsers.integration.test.d.ts","sourceRoot":"","sources":["../../../../../src/userRepository/observers/tests/integrations/searchUsers.integration.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=searchUsers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchUsers.test.d.ts","sourceRoot":"","sources":["../../../../src/userRepository/observers/tests/searchUsers.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const fileLinkedObject: <T extends Amity.FileType = any>(file?: Amity.FilePayload<T> | undefined) => Amity.File<T> | undefined;
2
+ //# sourceMappingURL=fileLinkedObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/fileLinkedObject.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,wGA6B5B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export declare const LinkedObject: {
2
+ file: <T extends Amity.FileType = any>(file?: Amity.FilePayload<T> | undefined) => Amity.File<T> | undefined;
2
3
  ad: (ad: Amity.InternalAd) => Amity.Ad;
3
4
  comment: (comment: Amity.InternalComment<any>) => Amity.Comment<any>;
4
5
  post: (post: Amity.InternalPost<any>) => Amity.Post<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/index.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;CAuBxB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/index.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;CAwBxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"postLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/postLinkedObject.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,gBAAgB,SAAU,MAAM,YAAY,KAAG,MAAM,IAgLjE,CAAC"}
1
+ {"version":3,"file":"postLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/postLinkedObject.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,gBAAgB,SAAU,MAAM,YAAY,KAAG,MAAM,IAwMjE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/file.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAoBtC,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAgBtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,gBAK9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,gBAI/B,CAAC"}
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/file.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAsBtC,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAmBtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,gBAK9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,gBAI/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk-react-native",
3
- "version": "7.26.1-fbe5a6dd.0",
3
+ "version": "7.27.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",
@@ -1,32 +0,0 @@
1
- /**
2
- * The subset of a post payload needed to locate its parent.
3
- *
4
- * Both ids are declared non-nullable on {@link Amity.RawPost}, but events
5
- * arrive with either one missing — and with null rather than undefined — so
6
- * they are widened here to the shape the wire actually produces.
7
- */
8
- declare type ChildPostIds = {
9
- postId: Amity.RawPost['postId'];
10
- parentId?: Amity.RawPost['parentId'] | null;
11
- parentPostId?: Amity.RawPost['parentPostId'] | null;
12
- };
13
- /**
14
- * Resolves the id of the parent post that a child-post payload belongs to.
15
- *
16
- * `parentId` and `parentPostId` name the same post, but a payload does not
17
- * always carry both — and the delete/create child handlers decide *whether* a
18
- * post is a child from `parentId` while reading the cache with `parentPostId`.
19
- * When only the former is set that read builds `['post', 'get', undefined]`,
20
- * which cannot match anything and, when the value is null, breaks key encoding
21
- * outright. Reading whichever id is present keeps the decision and the lookup
22
- * on the same post.
23
- *
24
- * @param post the child post payload
25
- * @returns the parent post id, or undefined when the payload carries neither
26
- *
27
- * @category Post Events
28
- * @hidden
29
- */
30
- export declare const resolveParentPostId: (post: ChildPostIds) => string | undefined;
31
- export {};
32
- //# sourceMappingURL=parentPost.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parentPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/events/parentPost.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,aAAK,YAAY,GAAG;IAClB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;IAC5C,YAAY,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;CACrD,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,SAAU,YAAY,KAAG,MAAM,GAAG,SAmBjE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=parentPost.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parentPost.test.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/events/tests/parentPost.test.ts"],"names":[],"mappings":""}