@amityco/ts-sdk 6.3.1 → 6.3.2-de32ca2.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/domains/user.d.ts +1 -0
- package/dist/@types/domains/user.d.ts.map +1 -1
- package/dist/index.cjs.js +28 -2
- package/dist/index.esm.js +28 -2
- package/dist/index.umd.js +1 -1
- package/dist/userRepository/observers/index.d.ts +1 -0
- package/dist/userRepository/observers/index.d.ts.map +1 -1
- package/dist/userRepository/observers/searchUserByDisplayName.d.ts +19 -0
- package/dist/userRepository/observers/searchUserByDisplayName.d.ts.map +1 -0
- package/dist/userRepository/observers/tests/searchUserByDisplayName.test.d.ts +2 -0
- package/dist/userRepository/observers/tests/searchUserByDisplayName.test.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/@types/domains/user.ts +2 -0
- package/src/userRepository/observers/getUsers.ts +1 -1
- package/src/userRepository/observers/index.ts +1 -0
- package/src/userRepository/observers/searchUserByDisplayName.ts +30 -0
- package/src/userRepository/observers/tests/searchUserByDisplayName.test.ts +113 -0
|
@@ -17,6 +17,7 @@ declare global {
|
|
|
17
17
|
page?: Amity.Page;
|
|
18
18
|
};
|
|
19
19
|
type UserLiveCollection = Amity.LiveCollectionParams<Omit<QueryUsers, 'page'>>;
|
|
20
|
+
type UserSearchLiveCollection = Amity.LiveCollectionParams<Omit<QueryUsers, 'sortBy'>>;
|
|
20
21
|
type UserLiveCollectionCache = Amity.LiveCollectionCache<Amity.User['userId'], Pick<QueryUsers, 'page'>>;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,cAAc,GACf,SAAS,GACT,UAAU,GACV,UAAU,GACV,WA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
|
|
24482
|
-
id: user.query
|
|
24482
|
+
id: user.query
|
|
24483
24483
|
*/
|
|
24484
24484
|
/**
|
|
24485
24485
|
* ```js
|
|
@@ -24617,6 +24617,31 @@ const observeUser = (userId, callback) => {
|
|
|
24617
24617
|
};
|
|
24618
24618
|
};
|
|
24619
24619
|
|
|
24620
|
+
/* begin_public_function
|
|
24621
|
+
id: user.search
|
|
24622
|
+
*/
|
|
24623
|
+
/**
|
|
24624
|
+
* ```js
|
|
24625
|
+
* import { UserRepository } from '@amityco/ts-sdk'
|
|
24626
|
+
*
|
|
24627
|
+
* let users = []
|
|
24628
|
+
* const unsub = UserRepository.searchUserByDisplayName({}, response => merge(users, response.data))
|
|
24629
|
+
* ```
|
|
24630
|
+
*
|
|
24631
|
+
* Observe all mutations on a list of {@link Amity.User}s
|
|
24632
|
+
*
|
|
24633
|
+
* @param params for searching users
|
|
24634
|
+
* @param callback the function to call when new data are available
|
|
24635
|
+
* @param config the configuration for the live collection
|
|
24636
|
+
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the users
|
|
24637
|
+
*
|
|
24638
|
+
* @category Category Live Collection
|
|
24639
|
+
*/
|
|
24640
|
+
const searchUserByDisplayName = (params, callback, config) => {
|
|
24641
|
+
return getUsers(Object.assign(Object.assign({}, params), { filter: 'all' }), callback, config);
|
|
24642
|
+
};
|
|
24643
|
+
/* end_public_function */
|
|
24644
|
+
|
|
24620
24645
|
var index$g = /*#__PURE__*/Object.freeze({
|
|
24621
24646
|
__proto__: null,
|
|
24622
24647
|
Relationship: index$h,
|
|
@@ -24633,7 +24658,8 @@ var index$g = /*#__PURE__*/Object.freeze({
|
|
|
24633
24658
|
getUser: getUser,
|
|
24634
24659
|
getUsers: getUsers,
|
|
24635
24660
|
observeUser: observeUser,
|
|
24636
|
-
getBlockedUsers: getBlockedUsers$1
|
|
24661
|
+
getBlockedUsers: getBlockedUsers$1,
|
|
24662
|
+
searchUserByDisplayName: searchUserByDisplayName
|
|
24637
24663
|
});
|
|
24638
24664
|
|
|
24639
24665
|
/* begin_public_function
|
package/dist/index.esm.js
CHANGED
|
@@ -24465,7 +24465,7 @@ queryUsers.locally = (query = {}) => {
|
|
|
24465
24465
|
};
|
|
24466
24466
|
|
|
24467
24467
|
/* begin_public_function
|
|
24468
|
-
id: user.query
|
|
24468
|
+
id: user.query
|
|
24469
24469
|
*/
|
|
24470
24470
|
/**
|
|
24471
24471
|
* ```js
|
|
@@ -24603,6 +24603,31 @@ const observeUser = (userId, callback) => {
|
|
|
24603
24603
|
};
|
|
24604
24604
|
};
|
|
24605
24605
|
|
|
24606
|
+
/* begin_public_function
|
|
24607
|
+
id: user.search
|
|
24608
|
+
*/
|
|
24609
|
+
/**
|
|
24610
|
+
* ```js
|
|
24611
|
+
* import { UserRepository } from '@amityco/ts-sdk'
|
|
24612
|
+
*
|
|
24613
|
+
* let users = []
|
|
24614
|
+
* const unsub = UserRepository.searchUserByDisplayName({}, response => merge(users, response.data))
|
|
24615
|
+
* ```
|
|
24616
|
+
*
|
|
24617
|
+
* Observe all mutations on a list of {@link Amity.User}s
|
|
24618
|
+
*
|
|
24619
|
+
* @param params for searching users
|
|
24620
|
+
* @param callback the function to call when new data are available
|
|
24621
|
+
* @param config the configuration for the live collection
|
|
24622
|
+
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the users
|
|
24623
|
+
*
|
|
24624
|
+
* @category Category Live Collection
|
|
24625
|
+
*/
|
|
24626
|
+
const searchUserByDisplayName = (params, callback, config) => {
|
|
24627
|
+
return getUsers(Object.assign(Object.assign({}, params), { filter: 'all' }), callback, config);
|
|
24628
|
+
};
|
|
24629
|
+
/* end_public_function */
|
|
24630
|
+
|
|
24606
24631
|
var index$g = /*#__PURE__*/Object.freeze({
|
|
24607
24632
|
__proto__: null,
|
|
24608
24633
|
Relationship: index$h,
|
|
@@ -24619,7 +24644,8 @@ var index$g = /*#__PURE__*/Object.freeze({
|
|
|
24619
24644
|
getUser: getUser,
|
|
24620
24645
|
getUsers: getUsers,
|
|
24621
24646
|
observeUser: observeUser,
|
|
24622
|
-
getBlockedUsers: getBlockedUsers$1
|
|
24647
|
+
getBlockedUsers: getBlockedUsers$1,
|
|
24648
|
+
searchUserByDisplayName: searchUserByDisplayName
|
|
24623
24649
|
});
|
|
24624
24650
|
|
|
24625
24651
|
/* begin_public_function
|