@amityco/ts-sdk 7.26.0 → 7.26.1-0035cd08.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 (62) hide show
  1. package/dist/@types/core/errors.d.ts +2 -1
  2. package/dist/@types/core/errors.d.ts.map +1 -1
  3. package/dist/@types/core/permissions.d.ts +7 -3
  4. package/dist/@types/core/permissions.d.ts.map +1 -1
  5. package/dist/@types/core/transport.d.ts +4 -1
  6. package/dist/@types/core/transport.d.ts.map +1 -1
  7. package/dist/@types/domains/client.d.ts +87 -0
  8. package/dist/@types/domains/client.d.ts.map +1 -1
  9. package/dist/@types/domains/file.d.ts +11 -2
  10. package/dist/@types/domains/file.d.ts.map +1 -1
  11. package/dist/@types/domains/liveViewerCount.d.ts +22 -0
  12. package/dist/@types/domains/liveViewerCount.d.ts.map +1 -0
  13. package/dist/@types/index.d.ts +1 -0
  14. package/dist/@types/index.d.ts.map +1 -1
  15. package/dist/client/api/createClient.d.ts.map +1 -1
  16. package/dist/client/api/getLiveViewerCountConfig.d.ts +24 -0
  17. package/dist/client/api/getLiveViewerCountConfig.d.ts.map +1 -0
  18. package/dist/client/api/getModuleSettings.d.ts +25 -0
  19. package/dist/client/api/getModuleSettings.d.ts.map +1 -0
  20. package/dist/client/api/index.d.ts +2 -0
  21. package/dist/client/api/index.d.ts.map +1 -1
  22. package/dist/client/api/tests/integration/moduleSettings.integration.test.d.ts +2 -0
  23. package/dist/client/api/tests/integration/moduleSettings.integration.test.d.ts.map +1 -0
  24. package/dist/client/index.d.ts +1 -0
  25. package/dist/client/index.d.ts.map +1 -1
  26. package/dist/client/utils/parseModuleSettings.d.ts +9 -0
  27. package/dist/client/utils/parseModuleSettings.d.ts.map +1 -0
  28. package/dist/client/utils/resolveModuleAvailability.d.ts +39 -0
  29. package/dist/client/utils/resolveModuleAvailability.d.ts.map +1 -0
  30. package/dist/client/utils/tests/resolveModuleAvailability.test.d.ts +2 -0
  31. package/dist/client/utils/tests/resolveModuleAvailability.test.d.ts.map +1 -0
  32. package/dist/core/errors.d.ts +20 -0
  33. package/dist/core/errors.d.ts.map +1 -1
  34. package/dist/core/transports/mqtt.d.ts.map +1 -1
  35. package/dist/core/transports/tests/moduleNotEntitled.test.d.ts +2 -0
  36. package/dist/core/transports/tests/moduleNotEntitled.test.d.ts.map +1 -0
  37. package/dist/core/transports/utils.d.ts.map +1 -1
  38. package/dist/fileRepository/api/getFile.d.ts.map +1 -1
  39. package/dist/fileRepository/api/uploadImage.d.ts.map +1 -1
  40. package/dist/fileRepository/api/uploadVideo.d.ts.map +1 -1
  41. package/dist/index.cjs.js +370 -15
  42. package/dist/index.d.ts +2 -0
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.esm.js +369 -16
  45. package/dist/index.umd.js +2 -2
  46. package/dist/userRepository/observers/index.d.ts +1 -0
  47. package/dist/userRepository/observers/index.d.ts.map +1 -1
  48. package/dist/userRepository/observers/searchUserByDisplayName.d.ts +2 -0
  49. package/dist/userRepository/observers/searchUserByDisplayName.d.ts.map +1 -1
  50. package/dist/userRepository/observers/searchUsers.d.ts +26 -0
  51. package/dist/userRepository/observers/searchUsers.d.ts.map +1 -0
  52. package/dist/userRepository/observers/tests/integrations/searchUsers.integration.test.d.ts +2 -0
  53. package/dist/userRepository/observers/tests/integrations/searchUsers.integration.test.d.ts.map +1 -0
  54. package/dist/userRepository/observers/tests/searchUsers.test.d.ts +2 -0
  55. package/dist/userRepository/observers/tests/searchUsers.test.d.ts.map +1 -0
  56. package/dist/utils/linkedObject/fileLinkedObject.d.ts +2 -0
  57. package/dist/utils/linkedObject/fileLinkedObject.d.ts.map +1 -0
  58. package/dist/utils/linkedObject/index.d.ts +1 -0
  59. package/dist/utils/linkedObject/index.d.ts.map +1 -1
  60. package/dist/utils/linkedObject/postLinkedObject.d.ts.map +1 -1
  61. package/dist/utils/tests/dummy/file.d.ts.map +1 -1
  62. package/package.json +1 -1
package/dist/index.esm.js CHANGED
@@ -306,6 +306,13 @@ var NotificationRolesFilterTypeEnum;
306
306
  NotificationRolesFilterTypeEnum["ONLY"] = "only";
307
307
  })(NotificationRolesFilterTypeEnum || (NotificationRolesFilterTypeEnum = {}));
308
308
 
309
+ var AmityLiveViewerCountMode;
310
+ (function (AmityLiveViewerCountMode) {
311
+ AmityLiveViewerCountMode["ALWAYS_SHOW"] = "always";
312
+ AmityLiveViewerCountMode["HIDE_ENTIRELY"] = "hidden";
313
+ AmityLiveViewerCountMode["SHOW_ABOVE_MINIMUM"] = "above-minimum";
314
+ })(AmityLiveViewerCountMode || (AmityLiveViewerCountMode = {}));
315
+
309
316
  function getVersion() {
310
317
  try {
311
318
  // the string ''v7.26.0-esm'' should be replaced by actual value by @rollup/plugin-replace
@@ -777,6 +784,28 @@ class ASCConnectionError extends ASCError {
777
784
  this.event = event;
778
785
  }
779
786
  }
787
+ /**
788
+ * Thrown when the network does not own a module the call needs. Raised from
789
+ * any module endpoint under `enforce` enforcement, mapped from app code
790
+ * `400325` — never from HTTP 403 alone, which already covers a role problem
791
+ * (`400300` / `400301`), a visitor (`403999`) and a bot (`403998`).
792
+ *
793
+ * `modules` carries **every** key the refusal named, as raw strings, so a
794
+ * caller can say which entitlement is absent without a second request.
795
+ *
796
+ * @category Errors
797
+ */
798
+ class AmityModuleNotEntitledError extends ASCApiError {
799
+ /**
800
+ * @param message The server's message, e.g. `Module not entitled: chat, live`
801
+ * @param modules Every module key from the rejection's `data.modules`
802
+ */
803
+ constructor(message, modules = []) {
804
+ super(message, 400325 /* Amity.ServerError.MODULE_NOT_ENTITLED */, "error" /* Amity.ErrorLevel.ERROR */);
805
+ this.modules = modules;
806
+ this.type = 'AmityModuleNotEntitledError';
807
+ }
808
+ }
780
809
 
781
810
  let activeClient = null;
782
811
  /**
@@ -1924,6 +1953,22 @@ function computeUrl(type, region) {
1924
1953
  return URLS[type].replace('{region}', region);
1925
1954
  }
1926
1955
 
1956
+ /**
1957
+ * Reads the module keys a `MODULE_NOT_ENTITLED` rejection named.
1958
+ *
1959
+ * Every entry is kept, as a raw string: one call can need more than one
1960
+ * module, and a key this build predates is still the only part of the
1961
+ * payload a customer can act on.
1962
+ *
1963
+ * @category Transport
1964
+ * @hidden
1965
+ */
1966
+ const extractNotEntitledModules = (data) => {
1967
+ const { modules } = data !== null && data !== void 0 ? data : {};
1968
+ if (!Array.isArray(modules))
1969
+ return [];
1970
+ return modules.filter((module) => typeof module === 'string');
1971
+ };
1927
1972
  /**
1928
1973
  * Unwraps v3 server payload (for error handling and type extraction)
1929
1974
  *
@@ -1943,6 +1988,15 @@ const unwrapPayload = (response) => {
1943
1988
  throw new ASCUnknownError(response.code);
1944
1989
  }
1945
1990
  else if (response.status === 'error') {
1991
+ /*
1992
+ * An entitlement refusal must not arrive as a generic failure: a customer
1993
+ * cannot then tell a module they have not bought from an outage. Keyed on
1994
+ * the app code, never on the HTTP status, so a role or membership problem
1995
+ * still maps to the generic error.
1996
+ */
1997
+ if (response.code === 400325 /* Amity.ServerError.MODULE_NOT_ENTITLED */) {
1998
+ throw new AmityModuleNotEntitledError(response.message, extractNotEntitledModules(response.data));
1999
+ }
1946
2000
  throw new ASCApiError(response.message, response.code, "error" /* Amity.ErrorLevel.ERROR */);
1947
2001
  }
1948
2002
  // unjust, but helps force uncast "T | undefined" to allow deconstruction without warnings
@@ -2433,10 +2487,11 @@ var MqttError;
2433
2487
  MqttError[MqttError["BAD_USERNAME_OR_PASSWORD"] = 134] = "BAD_USERNAME_OR_PASSWORD";
2434
2488
  MqttError[MqttError["NOT_AUTHORIZED"] = 135] = "NOT_AUTHORIZED";
2435
2489
  })(MqttError || (MqttError = {}));
2436
- // MQTT 5 session expiry, in seconds. 0xFFFFFFFF keeps the session alive
2437
- // indefinitely, matching the previous 3.1.1 `clean: false` behaviour where the
2438
- // broker retained the session (and its subscriptions) across disconnects.
2439
- const SESSION_EXPIRY_INTERVAL = 0xffffffff;
2490
+ // MQTT 5 session expiry, in seconds. Under MQTT 3.1.1 the broker capped
2491
+ // retained sessions at ~30 min; under MQTT 5 the client's value wins, so an
2492
+ // unbounded value ("never") left disconnected sessions piling up on the broker.
2493
+ // 1800s matches the previous 3.1.1 cap.
2494
+ const SESSION_EXPIRY_INTERVAL = 1800;
2440
2495
  function getMqttOptions(params) {
2441
2496
  return Object.assign({ clean: false, clientId: `mqttjs_ + ${Math.random().toString(16).substring(2, 10)}`, protocolId: 'MQTT', protocolVersion: 5, reconnectPeriod: RETRY_BASE_TIMEOUT, resubscribe: true,
2442
2497
  // The broker/LB drops idle sockets at ~60s. mqtt.js v5 sends its first
@@ -2538,8 +2593,16 @@ const createMqttTransport = (endpoint) => {
2538
2593
  }
2539
2594
  return {
2540
2595
  connect,
2541
- async disconnect() {
2596
+ async disconnect(options) {
2542
2597
  if (this.connected) {
2598
+ // On logout we want the broker to release the session immediately
2599
+ // instead of keeping it around for SESSION_EXPIRY_INTERVAL. mqtt.js
2600
+ // only sends a DISCONNECT packet when `force` is false; force=true
2601
+ // just tears the socket down and the broker keeps the session until
2602
+ // it expires on its own.
2603
+ if (options === null || options === void 0 ? void 0 : options.endSession) {
2604
+ return new Promise(resolve => mqttClient === null || mqttClient === void 0 ? void 0 : mqttClient.end(false, { reasonCode: 0, properties: { sessionExpiryInterval: 0 } }, () => resolve()));
2605
+ }
2543
2606
  return new Promise(resolve => mqttClient === null || mqttClient === void 0 ? void 0 : mqttClient.end(true, undefined, () => resolve()));
2544
2607
  }
2545
2608
  },
@@ -5021,6 +5084,51 @@ const getCoreUserSettings = async () => {
5021
5084
  return data;
5022
5085
  };
5023
5086
 
5087
+ const DEFAULT_CONFIG = {
5088
+ mode: AmityLiveViewerCountMode.ALWAYS_SHOW,
5089
+ threshold: 50,
5090
+ };
5091
+ const isValidMode = (value) => value === AmityLiveViewerCountMode.ALWAYS_SHOW ||
5092
+ value === AmityLiveViewerCountMode.HIDE_ENTIRELY ||
5093
+ value === AmityLiveViewerCountMode.SHOW_ABOVE_MINIMUM;
5094
+ const isValidThreshold = (value) => typeof value === 'number' && Number.isInteger(value) && value >= 1 && value <= 1000;
5095
+ /**
5096
+ * ```js
5097
+ * import { getLiveViewerCountConfig } from '@amityco/ts-sdk'
5098
+ * const config = await getLiveViewerCountConfig()
5099
+ * ```
5100
+ *
5101
+ * Fetches the network-level {@link Amity.LiveViewerCountConfig} governing
5102
+ * how the live viewer count is displayed to viewers on a livestream.
5103
+ *
5104
+ * Cold-read — no observable, no cache. Call once per livestream mount /
5105
+ * rejoin. Admin-driven config changes take effect on the next join, not
5106
+ * mid-stream.
5107
+ *
5108
+ * On a malformed payload (unknown mode, out-of-range or missing threshold)
5109
+ * the SDK falls open to `{ mode: ALWAYS_SHOW, threshold: 50 }` and logs a
5110
+ * warning. Network errors reject.
5111
+ *
5112
+ * @returns A Promise of {@link Amity.LiveViewerCountConfig}
5113
+ *
5114
+ * @category Client API
5115
+ * @async
5116
+ */
5117
+ /* begin_public_function id: client.getLiveViewerCountConfig */
5118
+ const getLiveViewerCountConfig = async () => {
5119
+ var _a, _b;
5120
+ const client = getActiveClient();
5121
+ const { data } = await client.http.get('/api/v3/network-settings/video-streaming');
5122
+ const mode = (_a = data === null || data === void 0 ? void 0 : data.videoStreaming) === null || _a === void 0 ? void 0 : _a.viewerCountDisplayMode;
5123
+ const threshold = (_b = data === null || data === void 0 ? void 0 : data.videoStreaming) === null || _b === void 0 ? void 0 : _b.viewerCountDisplayMinimum;
5124
+ if (!isValidMode(mode) || !isValidThreshold(threshold)) {
5125
+ client.log('client/getLiveViewerCountConfig', 'malformed videoStreaming settings, falling back to default', { mode, threshold });
5126
+ return DEFAULT_CONFIG;
5127
+ }
5128
+ return { mode, threshold };
5129
+ };
5130
+ /* end_public_function */
5131
+
5024
5132
  /* begin_public_function
5025
5133
  id: client.getProductCatalogueSetting
5026
5134
  */
@@ -5071,6 +5179,95 @@ const getForYouFeedSetting = async () => {
5071
5179
  };
5072
5180
  /* end_public_function */
5073
5181
 
5182
+ const ENFORCEMENT_MODES = ['off', 'shadow', 'enforce'];
5183
+ /**
5184
+ * An unrecognised mode decodes to `off`, and so does an absent one. A mode
5185
+ * this build does not know must not withhold anything — defaulting to
5186
+ * `enforce` would let a server-side rename black out a customer's app.
5187
+ *
5188
+ * @category private
5189
+ */
5190
+ const parseEnforcement = (mode) => {
5191
+ const match = ENFORCEMENT_MODES.find(value => value === mode);
5192
+ return match !== null && match !== void 0 ? match : 'off';
5193
+ };
5194
+ const parseGrants = (modules) => {
5195
+ const grants = {};
5196
+ Object.entries(modules !== null && modules !== void 0 ? modules : {}).forEach(([key, granted]) => {
5197
+ grants[key] = granted === true;
5198
+ });
5199
+ return grants;
5200
+ };
5201
+ /**
5202
+ * Every catalog entry survives, including one whose key this build has never
5203
+ * heard of, so a module added server-side is still listable.
5204
+ *
5205
+ * @category private
5206
+ */
5207
+ const parseCatalog = (catalog) => {
5208
+ const parsed = {};
5209
+ Object.entries(catalog !== null && catalog !== void 0 ? catalog : {}).forEach(([key, definition]) => {
5210
+ const rawRequires = definition === null || definition === void 0 ? void 0 : definition.requires;
5211
+ const requires = Array.isArray(rawRequires)
5212
+ ? rawRequires.filter((entry) => typeof entry === 'string')
5213
+ : [];
5214
+ parsed[key] = {
5215
+ label: typeof (definition === null || definition === void 0 ? void 0 : definition.label) === 'string' ? definition.label : key,
5216
+ kind: (definition === null || definition === void 0 ? void 0 : definition.kind) === 'setting' ? 'setting' : 'api',
5217
+ requires,
5218
+ };
5219
+ });
5220
+ return parsed;
5221
+ };
5222
+ /**
5223
+ * Decodes `GET /api/v3/network-settings/modules`. Nothing is trimmed: the
5224
+ * catalog is the dependency table callers resolve against, and a client that
5225
+ * cannot see it has to hardcode one.
5226
+ *
5227
+ * @category private
5228
+ */
5229
+ const parseModuleSettings = (raw) => {
5230
+ var _a;
5231
+ return ({
5232
+ enforcement: parseEnforcement((_a = raw === null || raw === void 0 ? void 0 : raw.enforcement) !== null && _a !== void 0 ? _a : raw === null || raw === void 0 ? void 0 : raw.mode),
5233
+ modules: parseGrants(raw === null || raw === void 0 ? void 0 : raw.modules),
5234
+ catalog: parseCatalog(raw === null || raw === void 0 ? void 0 : raw.catalog),
5235
+ });
5236
+ };
5237
+
5238
+ /* begin_public_function
5239
+ id: client.getModuleSettings
5240
+ */
5241
+ /**
5242
+ * ```js
5243
+ * import { Client } from '@amityco/ts-sdk'
5244
+ * const moduleSettings = await Client.getModuleSettings()
5245
+ * ```
5246
+ *
5247
+ * Fetches the network's module entitlements: which modules the network was
5248
+ * granted, whether core is enforcing those grants, and the catalog of all
5249
+ * modules with their dependency chains.
5250
+ *
5251
+ * The payload is returned whole — `catalog` is the dependency table
5252
+ * {@link resolveModuleAvailability} reads, and a client that cannot see it has
5253
+ * to hardcode one.
5254
+ *
5255
+ * The read is **advisory**. It tells a host what to offer; under `enforce` the
5256
+ * backend refuses a call to an unowned module regardless of what was resolved
5257
+ * here, and that refusal arrives as `AmityModuleNotEntitledError`.
5258
+ *
5259
+ * @returns A Promise of {@link Amity.ModuleSettings} object
5260
+ *
5261
+ * @category Client API
5262
+ * @async
5263
+ */
5264
+ const getModuleSettings = async () => {
5265
+ const client = getActiveClient();
5266
+ const { data } = await client.http.get(`/api/v3/network-settings/modules`);
5267
+ return parseModuleSettings(data);
5268
+ };
5269
+ /* end_public_function */
5270
+
5074
5271
  const checkUserPermission = (userId, permission) => {
5075
5272
  var _a;
5076
5273
  const user = (_a = pullFromCache(['user', 'get', userId])) === null || _a === void 0 ? void 0 : _a.data;
@@ -5387,7 +5584,7 @@ const logout = async () => {
5387
5584
  const client = getActiveClient();
5388
5585
  client.log('client/api/disconnectClient');
5389
5586
  if (client.mqtt && client.mqtt.connected) {
5390
- client.mqtt.disconnect();
5587
+ await client.mqtt.disconnect({ endSession: true });
5391
5588
  }
5392
5589
  /*
5393
5590
  * for cases when session state is terminated (example on ban) or token expired,
@@ -8470,6 +8667,7 @@ const createClient = (apiKey, apiRegion = API_REGIONS.SG, { debugSession = DEFAU
8470
8667
  getCoreUserSettings,
8471
8668
  getSocialSettings,
8472
8669
  getChatSettings,
8670
+ getLiveViewerCountConfig,
8473
8671
  getVisitorDeviceId: getDeviceId,
8474
8672
  getMessagePreviewSetting: getMessagePreviewSetting$1,
8475
8673
  use: () => setActiveClient(client),
@@ -8478,6 +8676,7 @@ const createClient = (apiKey, apiRegion = API_REGIONS.SG, { debugSession = DEFAU
8478
8676
  getMarkerSyncConsistentMode,
8479
8677
  getProductCatalogueSetting,
8480
8678
  getForYouFeedSetting,
8679
+ getModuleSettings,
8481
8680
  /**
8482
8681
  * Prefix for the deviceId key in the local storage or async storage.
8483
8682
  * This is allow user to have multiple SDK client and Mqtt client within the same app.
@@ -9531,6 +9730,92 @@ const getUserUnread = (callback) => {
9531
9730
  };
9532
9731
  };
9533
9732
 
9733
+ /**
9734
+ * ```js
9735
+ * import { Client, resolveModuleAvailability } from '@amityco/ts-sdk'
9736
+ *
9737
+ * const moduleSettings = await Client.getModuleSettings()
9738
+ *
9739
+ * if (resolveModuleAvailability(moduleSettings, 'live').isAvailable) {
9740
+ * // offer the Live entry point
9741
+ * }
9742
+ * ```
9743
+ *
9744
+ * The SDK does not hold the settings — the caller keeps what it fetched and
9745
+ * resolves against it. With no settings at all (a fetch that never succeeded)
9746
+ * the caller reads that as every module available: under `enforce` the backend
9747
+ * refuses the calls anyway, so the exposure is a screen that offers too much,
9748
+ * not one that withholds what a customer paid for.
9749
+ *
9750
+ * Resolves whether one module is usable on this network.
9751
+ *
9752
+ * Availability is a function of all three fields of
9753
+ * {@link Amity.ModuleSettings} — the enforcement mode, the module's own grant,
9754
+ * and its prerequisite chain — combined in that order. Reading `modules`
9755
+ * directly contradicts the mode: staging answers `mode: 'off'` with
9756
+ * `modules: {}`, and every module still works.
9757
+ *
9758
+ * The dependency table comes from the payload's `catalog`, never from a
9759
+ * hardcoded copy, so a chain the backend changes takes effect without an SDK
9760
+ * release.
9761
+ *
9762
+ * @param moduleSettings The network's module settings
9763
+ * @param moduleKey The module to resolve — an {@link Amity.ModuleKey}, so the
9764
+ * 15 keys this build knows complete and type-check while a catalog entry it
9765
+ * does not know still resolves.
9766
+ * @returns An {@link Amity.ModuleAvailability} answer
9767
+ *
9768
+ * @category Client API
9769
+ */
9770
+ const resolveModuleAvailability = (moduleSettings, moduleKey, seen = new Set()) => {
9771
+ var _a, _b, _c, _d, _e;
9772
+ const isGranted = (_a = moduleSettings.modules[moduleKey]) !== null && _a !== void 0 ? _a : false;
9773
+ /*
9774
+ * Not enforcing: nothing is withheld, and no graph walk is needed. This has
9775
+ * to come first — `off` and `shadow` resolve available whatever the grant
9776
+ * says, and a cycle would otherwise return unavailable under `off` too.
9777
+ */
9778
+ if (moduleSettings.enforcement !== 'enforce') {
9779
+ return { moduleKey, isAvailable: true, isGranted };
9780
+ }
9781
+ // A cycle in `requires` resolves unavailable rather than recursing.
9782
+ if (seen.has(moduleKey)) {
9783
+ return {
9784
+ moduleKey,
9785
+ isAvailable: false,
9786
+ isGranted,
9787
+ reason: 'prerequisiteUnavailable',
9788
+ unsatisfied: (_c = (_b = moduleSettings.catalog[moduleKey]) === null || _b === void 0 ? void 0 : _b.requires) !== null && _c !== void 0 ? _c : [],
9789
+ };
9790
+ }
9791
+ // The module's own grant is evaluated before its prerequisites, so
9792
+ // `notGranted` is reported in preference when both hold.
9793
+ if (!isGranted) {
9794
+ return { moduleKey, isAvailable: false, isGranted, reason: 'notGranted' };
9795
+ }
9796
+ const requires = (_e = (_d = moduleSettings.catalog[moduleKey]) === null || _d === void 0 ? void 0 : _d.requires) !== null && _e !== void 0 ? _e : [];
9797
+ if (requires.length === 0)
9798
+ return { moduleKey, isAvailable: true, isGranted };
9799
+ // `requires` is satisfied by any one entry, transitively.
9800
+ const isSatisfied = requires.some(dependency => resolveModuleAvailability(moduleSettings, dependency, new Set([...seen, moduleKey]))
9801
+ .isAvailable);
9802
+ if (isSatisfied)
9803
+ return { moduleKey, isAvailable: true, isGranted };
9804
+ /*
9805
+ * `unsatisfied` carries the whole `requires` list rather than one entry. Any
9806
+ * one of them would have satisfied the requirement, so naming a single
9807
+ * module misdirects: telling a Community-only customer "Comment needs post"
9808
+ * hides that Story would also have done.
9809
+ */
9810
+ return {
9811
+ moduleKey,
9812
+ isAvailable: false,
9813
+ isGranted,
9814
+ reason: 'prerequisiteUnavailable',
9815
+ unsatisfied: requires,
9816
+ };
9817
+ };
9818
+
9534
9819
  var index$s = /*#__PURE__*/Object.freeze({
9535
9820
  __proto__: null,
9536
9821
  getActiveClient: getActiveClient,
@@ -9554,6 +9839,7 @@ var index$s = /*#__PURE__*/Object.freeze({
9554
9839
  getShareableLinkConfiguration: getShareableLinkConfiguration,
9555
9840
  getProductCatalogueSetting: getProductCatalogueSetting,
9556
9841
  getForYouFeedSetting: getForYouFeedSetting,
9842
+ getModuleSettings: getModuleSettings,
9557
9843
  loginAsVisitor: loginAsVisitor,
9558
9844
  loginAsBot: loginAsBot,
9559
9845
  getCurrentUser: getCurrentUser,
@@ -9561,6 +9847,7 @@ var index$s = /*#__PURE__*/Object.freeze({
9561
9847
  setCurrentUserType: setCurrentUserType,
9562
9848
  setAccessTokenHandler: setAccessTokenHandler,
9563
9849
  getChatSettings: getChatSettings,
9850
+ getLiveViewerCountConfig: getLiveViewerCountConfig,
9564
9851
  getCoreUserSettings: getCoreUserSettings,
9565
9852
  notifications: notifications,
9566
9853
  enableAutoSubscriptions: enableAutoSubscriptions,
@@ -9580,7 +9867,8 @@ var index$s = /*#__PURE__*/Object.freeze({
9580
9867
  startMarkerSync: startMarkerSync,
9581
9868
  startUnreadSync: startUnreadSync,
9582
9869
  stopUnreadSync: stopUnreadSync,
9583
- getMarkerSyncConsistentMode: getMarkerSyncConsistentMode
9870
+ getMarkerSyncConsistentMode: getMarkerSyncConsistentMode,
9871
+ resolveModuleAvailability: resolveModuleAvailability
9584
9872
  });
9585
9873
 
9586
9874
  /* begin_public_function
@@ -12477,7 +12765,7 @@ const getWatchSessionStorage = () => {
12477
12765
  return storageInstance;
12478
12766
  };
12479
12767
 
12480
- const privateKey = "-----BEGIN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BJScPTzMFbunZn/wjtGdcM10qdlVQ9doG61A/9P3ezFKCfS4AvF/H/59LcSx2Bh28fp3/efiVIOpVd4Y=";
12481
12769
  /*
12482
12770
  * The crypto algorithm used for importing key and signing string
12483
12771
  */
@@ -12905,6 +13193,21 @@ const productTagLinkedObject = (productTag) => {
12905
13193
  return Object.assign(Object.assign({}, productTag), { product: internalProduct ? productLinkedObject(internalProduct) : undefined });
12906
13194
  };
12907
13195
 
13196
+ const fileLinkedObject = (file) => {
13197
+ var _a, _b, _c;
13198
+ if (!file)
13199
+ return file;
13200
+ if (file.type === 'video') {
13201
+ const video = (_b = (_a = file.attributes) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.video;
13202
+ return Object.assign(Object.assign({}, file), { getWidth: () => { var _a; return (_a = video === null || video === void 0 ? void 0 : video.width) !== null && _a !== void 0 ? _a : 0; }, getHeight: () => { var _a; return (_a = video === null || video === void 0 ? void 0 : video.height) !== null && _a !== void 0 ? _a : 0; }, getRotation: () => { var _a; return (_a = video === null || video === void 0 ? void 0 : video.rotation) !== null && _a !== void 0 ? _a : 0; } });
13203
+ }
13204
+ if (file.type === 'image') {
13205
+ const metadata = (_c = file.attributes) === null || _c === void 0 ? void 0 : _c.metadata;
13206
+ return Object.assign(Object.assign({}, file), { getWidth: () => { var _a; return (_a = metadata === null || metadata === void 0 ? void 0 : metadata.width) !== null && _a !== void 0 ? _a : 0; }, getHeight: () => { var _a; return (_a = metadata === null || metadata === void 0 ? void 0 : metadata.height) !== null && _a !== void 0 ? _a : 0; } });
13207
+ }
13208
+ return file;
13209
+ };
13210
+
12908
13211
  const postLinkedObject = (post) => {
12909
13212
  return shallowClone(post, {
12910
13213
  childrenPosts: post.children
@@ -12962,19 +13265,19 @@ const postLinkedObject = (post) => {
12962
13265
  getImageInfo() {
12963
13266
  var _a, _b;
12964
13267
  return isAmityImagePost(post)
12965
- ? (_b = pullFromCache(['file', 'get', (_a = post === null || post === void 0 ? void 0 : post.data) === null || _a === void 0 ? void 0 : _a.fileId])) === null || _b === void 0 ? void 0 : _b.data
13268
+ ? fileLinkedObject((_b = pullFromCache(['file', 'get', (_a = post === null || post === void 0 ? void 0 : post.data) === null || _a === void 0 ? void 0 : _a.fileId])) === null || _b === void 0 ? void 0 : _b.data)
12966
13269
  : undefined;
12967
13270
  },
12968
13271
  getVideoInfo() {
12969
13272
  var _a, _b, _c;
12970
13273
  return isAmityVideoPost(post)
12971
- ? (_c = pullFromCache(['file', 'get', (_b = (_a = post === null || post === void 0 ? void 0 : post.data) === null || _a === void 0 ? void 0 : _a.videoFileId) === null || _b === void 0 ? void 0 : _b.original])) === null || _c === void 0 ? void 0 : _c.data
13274
+ ? fileLinkedObject((_c = pullFromCache(['file', 'get', (_b = (_a = post === null || post === void 0 ? void 0 : post.data) === null || _a === void 0 ? void 0 : _a.videoFileId) === null || _b === void 0 ? void 0 : _b.original])) === null || _c === void 0 ? void 0 : _c.data)
12972
13275
  : undefined;
12973
13276
  },
12974
13277
  getVideoThumbnailInfo() {
12975
13278
  var _a, _b;
12976
13279
  return isAmityVideoPost(post)
12977
- ? (_b = pullFromCache(['file', 'get', (_a = post === null || post === void 0 ? void 0 : post.data) === null || _a === void 0 ? void 0 : _a.thumbnailFileId])) === null || _b === void 0 ? void 0 : _b.data
13280
+ ? fileLinkedObject((_b = pullFromCache(['file', 'get', (_a = post === null || post === void 0 ? void 0 : post.data) === null || _a === void 0 ? void 0 : _a.thumbnailFileId])) === null || _b === void 0 ? void 0 : _b.data)
12978
13281
  : undefined;
12979
13282
  },
12980
13283
  getFileInfo() {
@@ -13965,6 +14268,7 @@ const eventLinkedObject = (event) => {
13965
14268
  };
13966
14269
 
13967
14270
  const LinkedObject = {
14271
+ file: fileLinkedObject,
13968
14272
  ad: adLinkedObject,
13969
14273
  comment: commentLinkedObject,
13970
14274
  post: postLinkedObject,
@@ -15128,10 +15432,58 @@ class SearchUserLiveCollectionController extends LiveCollectionController {
15128
15432
  }
15129
15433
  }
15130
15434
 
15435
+ /* begin_public_function
15436
+ id: user.searchUsers
15437
+ */
15438
+ /**
15439
+ * ```js
15440
+ * import { UserRepository } from '@amityco/ts-sdk'
15441
+ *
15442
+ * let users = []
15443
+ * const unsub = UserRepository.searchUsers(
15444
+ * { displayName: 'jack', searchBy: [SearchUsersByEnum.DISPLAY_NAME] },
15445
+ * response => merge(users, response.data),
15446
+ * )
15447
+ * ```
15448
+ *
15449
+ * Observe all mutations on a list of {@link Amity.InternalUser}s.
15450
+ *
15451
+ * Pass `searchBy` in `params` to restrict which user fields are matched
15452
+ * (e.g. `[SearchUsersByEnum.DISPLAY_NAME]`). When omitted, the backend
15453
+ * default (both `displayName` and `userId`) applies.
15454
+ *
15455
+ * @param params for searching users
15456
+ * @param callback the function to call when new data are available
15457
+ * @param config the configuration for the live collection
15458
+ * @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the users
15459
+ *
15460
+ * @category Category Live Collection
15461
+ */
15462
+ const searchUsers = (params, callback, config) => {
15463
+ const { log, cache } = getActiveClient();
15464
+ if (!cache) {
15465
+ // eslint-disable-next-line no-console
15466
+ console.log(ENABLE_CACHE_MESSAGE);
15467
+ }
15468
+ const timestamp = Date.now();
15469
+ log(`liveSearchUsers(tmpid: ${timestamp}) > listen`);
15470
+ const searchUsersLiveCollection = new SearchUserLiveCollectionController(params, callback);
15471
+ const disposers = searchUsersLiveCollection.startSubscription();
15472
+ const cacheKey = searchUsersLiveCollection.getCacheKey();
15473
+ disposers.push(() => dropFromCache(cacheKey));
15474
+ return () => {
15475
+ log(`liveSearchUsers(tmpid: ${timestamp}) > dispose`);
15476
+ disposers.forEach(fn => fn());
15477
+ };
15478
+ };
15479
+ /* end_public_function */
15480
+
15131
15481
  /* begin_public_function
15132
15482
  id: user.search
15133
15483
  */
15134
15484
  /**
15485
+ * @deprecated Use {@link searchUsers} instead. `searchUserByDisplayName` will be removed in a future major version.
15486
+ *
15135
15487
  * ```js
15136
15488
  * import { UserRepository } from '@amityco/ts-sdk'
15137
15489
  *
@@ -15280,6 +15632,7 @@ var index$q = /*#__PURE__*/Object.freeze({
15280
15632
  getUsers: getUsers,
15281
15633
  getBlockedUsers: getBlockedUsers,
15282
15634
  getBlockingUsers: getBlockingUsers,
15635
+ searchUsers: searchUsers,
15283
15636
  searchUserByDisplayName: searchUserByDisplayName,
15284
15637
  getReachedUsers: getReachedUsers,
15285
15638
  get AmityUserSearchMatchType () { return AmityUserSearchMatchType; }
@@ -15312,7 +15665,7 @@ const getFile = async (fileId) => {
15312
15665
  if (client.cache)
15313
15666
  ingestInCache({ files: [data] }, { cachedAt });
15314
15667
  return {
15315
- data,
15668
+ data: fileLinkedObject(data),
15316
15669
  cachedAt,
15317
15670
  };
15318
15671
  };
@@ -15339,7 +15692,7 @@ getFile.locally = (fileId) => {
15339
15692
  if (!cached)
15340
15693
  return;
15341
15694
  return {
15342
- data: cached.data,
15695
+ data: fileLinkedObject(cached.data),
15343
15696
  cachedAt: cached.cachedAt,
15344
15697
  };
15345
15698
  };
@@ -15476,7 +15829,7 @@ const uploadVideo = async (formData, feedType, onProgress) => {
15476
15829
  if (client.cache)
15477
15830
  ingestInCache({ files: data }, { cachedAt });
15478
15831
  return {
15479
- data,
15832
+ data: data.map(file => fileLinkedObject(file)),
15480
15833
  cachedAt,
15481
15834
  };
15482
15835
  };
@@ -15537,7 +15890,7 @@ const uploadImage = async (formData, onProgress, altText) => {
15537
15890
  if (client.cache)
15538
15891
  ingestInCache({ files: data }, { cachedAt });
15539
15892
  return {
15540
- data,
15893
+ data: data.map(file => fileLinkedObject(file)),
15541
15894
  cachedAt,
15542
15895
  };
15543
15896
  };
@@ -35494,4 +35847,4 @@ class AmityAttachmentProductTags {
35494
35847
  }
35495
35848
  }
35496
35849
 
35497
- export { API_REGIONS, index$5 as AdRepository, AmityAttachmentProductTags, AmityAutoSubscription, AmityChannelNotificationModeEnum, AmityCommunityType, AmityEventOrderOption, AmityEventOriginType, AmityEventResponseStatus, AmityEventSortOption, AmityEventStatus, AmityEventType, AmitySharableContentType, AnalyticsSourceTypeEnum, index$f as CategoryRepository, index$j as ChannelRepository, index$s as Client, index$e as CommentRepository, CommunityNotificationEventNameEnum, CommunityPostSettingMaps, CommunityPostSettings, index$g as CommunityRepository, ContentFeedType, ContentFlagReasonEnum, DefaultCommunityPostSetting, index$1 as EventRepository, FeedDataTypeEnum, index$d as FeedRepository, FeedSortByEnum, FeedSourceEnum, FeedTypeEnum, FileAccessTypeEnum, index$p as FileRepository, FileType, GET_WATCHER_URLS, index$3 as InvitationRepository, InvitationSortByEnum, InvitationStatusEnum, InvitationTargetTypeEnum, InvitationTypeEnum, JoinRequestStatusEnum, JoinResultStatusEnum, index$2 as LiveReactionRepository, index$7 as LiveStreamPlayer, MembershipAcceptanceTypeEnum, MessageContentType, index$n as MessageRepository, NotificationRolesFilterTypeEnum, NotificationSettingsLevelEnum, index$8 as PollRepository, PostContentType, index$b as PostRepository, PostStructureType, index as ProductRepository, index$o as ReactionRepository, index$9 as RoomPresenceRepository, index$c as RoomRepository, SearchUsersByEnum, index$6 as StoryRepository, index$a as StreamRepository, index$m as SubChannelRepository, SubscriptionLevels, UserNotificationModuleNameEnum, UserReportTypeEnum, index$q as UserRepository, UserTypeEnum, VERSION, VideoResolution, VideoSize, VideoTranscodingStatus, backupCache, createQuery, createReport, createUserToken, deleteReport, disableCache, dropFromCache, enableCache, exceedsUntilAtBoundary, filterByChannelMembership, filterByCommunityMembership, filterByFeedType, filterByPostDataTypes, filterByPropEquality, filterByPropInclusion, filterByPropIntersection, filterBySearchTerm, filterByStringComparePartially, filterByUntilAt, filterCommentsByBlockUsers, filterPostsByBlockUsers, getBlockUsersId, getChannelTopic, getCommentTopic, getCommunityStoriesTopic, getCommunityTopic, getLiveReactionTopic, getLiveStreamTopic, getMarkedMessageTopic, getMarkerUserFeedTopic, getMessageTopic, getMyFollowersTopic, getMyFollowingsTopic, getNetworkId, getNetworkTopic, getPostTopic, getRole, getRoomStreamerTopic, getRoomWatcherTopic, getSmartFeedChannelTopic, getSmartFeedMessageTopic, getSmartFeedSubChannelTopic, getStoryTopic, getSubChannelTopic, getUserTopic, isAfterBefore, isAfterBeforeRaw, isCachable, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkip, mergeInCache, index$4 as notificationTray, onChannelMarkerFetched, onFeedMarkerFetched, onFeedMarkerUpdated, onMessageMarked, onMessageMarkerFetched, onSubChannelMarkerFetched, onSubChannelMarkerUpdated, onUserMarkerFetched, onUserMarkerFetchedLegacy, pullFromCache, pushToCache, queryCache, queryOptions, queryRoles, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, validateUntilAt, wipeCache };
35850
+ export { API_REGIONS, index$5 as AdRepository, AmityAttachmentProductTags, AmityAutoSubscription, AmityChannelNotificationModeEnum, AmityCommunityType, AmityEventOrderOption, AmityEventOriginType, AmityEventResponseStatus, AmityEventSortOption, AmityEventStatus, AmityEventType, AmityLiveViewerCountMode, AmityModuleNotEntitledError, AmitySharableContentType, AnalyticsSourceTypeEnum, index$f as CategoryRepository, index$j as ChannelRepository, index$s as Client, index$e as CommentRepository, CommunityNotificationEventNameEnum, CommunityPostSettingMaps, CommunityPostSettings, index$g as CommunityRepository, ContentFeedType, ContentFlagReasonEnum, DefaultCommunityPostSetting, index$1 as EventRepository, FeedDataTypeEnum, index$d as FeedRepository, FeedSortByEnum, FeedSourceEnum, FeedTypeEnum, FileAccessTypeEnum, index$p as FileRepository, FileType, GET_WATCHER_URLS, index$3 as InvitationRepository, InvitationSortByEnum, InvitationStatusEnum, InvitationTargetTypeEnum, InvitationTypeEnum, JoinRequestStatusEnum, JoinResultStatusEnum, index$2 as LiveReactionRepository, index$7 as LiveStreamPlayer, MembershipAcceptanceTypeEnum, MessageContentType, index$n as MessageRepository, NotificationRolesFilterTypeEnum, NotificationSettingsLevelEnum, index$8 as PollRepository, PostContentType, index$b as PostRepository, PostStructureType, index as ProductRepository, index$o as ReactionRepository, index$9 as RoomPresenceRepository, index$c as RoomRepository, SearchUsersByEnum, index$6 as StoryRepository, index$a as StreamRepository, index$m as SubChannelRepository, SubscriptionLevels, UserNotificationModuleNameEnum, UserReportTypeEnum, index$q as UserRepository, UserTypeEnum, VERSION, VideoResolution, VideoSize, VideoTranscodingStatus, backupCache, createQuery, createReport, createUserToken, deleteReport, disableCache, dropFromCache, enableCache, exceedsUntilAtBoundary, filterByChannelMembership, filterByCommunityMembership, filterByFeedType, filterByPostDataTypes, filterByPropEquality, filterByPropInclusion, filterByPropIntersection, filterBySearchTerm, filterByStringComparePartially, filterByUntilAt, filterCommentsByBlockUsers, filterPostsByBlockUsers, getBlockUsersId, getChannelTopic, getCommentTopic, getCommunityStoriesTopic, getCommunityTopic, getLiveReactionTopic, getLiveStreamTopic, getMarkedMessageTopic, getMarkerUserFeedTopic, getMessageTopic, getMyFollowersTopic, getMyFollowingsTopic, getNetworkId, getNetworkTopic, getPostTopic, getRole, getRoomStreamerTopic, getRoomWatcherTopic, getSmartFeedChannelTopic, getSmartFeedMessageTopic, getSmartFeedSubChannelTopic, getStoryTopic, getSubChannelTopic, getUserTopic, isAfterBefore, isAfterBeforeRaw, isCachable, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkip, mergeInCache, index$4 as notificationTray, onChannelMarkerFetched, onFeedMarkerFetched, onFeedMarkerUpdated, onMessageMarked, onMessageMarkerFetched, onSubChannelMarkerFetched, onSubChannelMarkerUpdated, onUserMarkerFetched, onUserMarkerFetchedLegacy, pullFromCache, pushToCache, queryCache, queryOptions, queryRoles, resolveModuleAvailability, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, validateUntilAt, wipeCache };