@amityco/ts-sdk 7.22.1-3704f92e.0 → 7.22.1-3ec58519.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.
@@ -5,10 +5,23 @@ export declare const enum MembershipAcceptanceTypeEnum {
5
5
  AUTOMATIC = "automatic",
6
6
  INVITATION = "invitation"
7
7
  }
8
+ export declare enum AmityAutoSubscription {
9
+ CHAT = "chat",
10
+ NETWORK = "network",
11
+ LIVESTREAM = "livestream",
12
+ BLOCK = "block"
13
+ }
8
14
  declare global {
9
15
  namespace Amity {
10
16
  type Logger = (topic: string, ...args: any[]) => void;
11
17
  type MembershipAcceptanceType = MembershipAcceptanceTypeEnum;
18
+ type AutoSubscription = AmityAutoSubscription;
19
+ type AutoSubscriptionState = {
20
+ feature: Amity.AutoSubscription;
21
+ isActive: boolean;
22
+ isSystem: boolean;
23
+ topicCount: number;
24
+ };
12
25
  const enum TokenTerminationReason {
13
26
  GLOBAL_BAN = "globalBan",
14
27
  USER_DELETED = "userDeleted",
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,0BAAkB,4BAA4B;IAC5C,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;QAEtD,KAAK,wBAAwB,GAAG,4BAA4B,CAAC;QAE7D,WAAW,sBAAsB;YAC/B,UAAU,cAAc;YACxB,YAAY,gBAAgB;YAC5B,YAAY,iBAA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,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;YAChD,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;SACrC,CAAC;QAEF,KAAK,4BAA4B,GAAG;YAClC,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;SACjC,CAAC;QAEF,KAAK,mBAAmB,GAAG;YACzB,UAAU,EAAE,OAAO,CAAC;SACrB,CAAC;QAEF,KAAK,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC;QAEtF,KAAK,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG;YACxD,WAAW,EAAE,OAAO,CAAC;SACtB,CAAC;KACH;CACF"}
@@ -1,10 +1,7 @@
1
- import { AutoSubscription, AutoSubscriptionState } from '~/client/utils/autoSubscriptionManager';
2
- export { AutoSubscription } from '~/client/utils/autoSubscriptionManager';
3
- export type { AutoSubscriptionState } from '~/client/utils/autoSubscriptionManager';
4
1
  /**
5
2
  * ```js
6
- * import { Client } from '@amityco/ts-sdk'
7
- * Client.enableAutoSubscriptions([Client.AutoSubscription.BLOCK])
3
+ * import { Client, AmityAutoSubscription } from '@amityco/ts-sdk'
4
+ * Client.enableAutoSubscriptions([AmityAutoSubscription.BLOCK])
8
5
  * ```
9
6
  *
10
7
  * Enables one or more managed auto-subscription handles. Managed handles are
@@ -13,26 +10,26 @@ export type { AutoSubscriptionState } from '~/client/utils/autoSubscriptionManag
13
10
  * {@link disableAutoSubscriptions}. Synchronous fire-and-forget — the registry
14
11
  * updates immediately and the broker subscribe is retried on reconnect.
15
12
  *
16
- * @param features the {@link AutoSubscription} handles to enable
13
+ * @param features the {@link AmityAutoSubscription} handles to enable
17
14
  *
18
15
  * @category Client API
19
16
  */
20
- export declare const enableAutoSubscriptions: (features: AutoSubscription[]) => void;
17
+ export declare const enableAutoSubscriptions: (features: Amity.AutoSubscription[]) => void;
21
18
  /**
22
19
  * ```js
23
- * import { Client } from '@amityco/ts-sdk'
24
- * Client.disableAutoSubscriptions([Client.AutoSubscription.LIVESTREAM])
20
+ * import { Client, AmityAutoSubscription } from '@amityco/ts-sdk'
21
+ * Client.disableAutoSubscriptions([AmityAutoSubscription.LIVESTREAM])
25
22
  * ```
26
23
  *
27
24
  * Disables one or more managed auto-subscription handles. The change persists
28
25
  * across reconnect (it is not silently re-enabled) until
29
26
  * {@link enableAutoSubscriptions} is called again. Synchronous fire-and-forget.
30
27
  *
31
- * @param features the {@link AutoSubscription} handles to disable
28
+ * @param features the {@link AmityAutoSubscription} handles to disable
32
29
  *
33
30
  * @category Client API
34
31
  */
35
- export declare const disableAutoSubscriptions: (features: AutoSubscription[]) => void;
32
+ export declare const disableAutoSubscriptions: (features: Amity.AutoSubscription[]) => void;
36
33
  /**
37
34
  * ```js
38
35
  * import { Client } from '@amityco/ts-sdk'
@@ -46,5 +43,5 @@ export declare const disableAutoSubscriptions: (features: AutoSubscription[]) =>
46
43
  *
47
44
  * @category Client API
48
45
  */
49
- export declare const autoSubscriptions: () => AutoSubscriptionState[];
46
+ export declare const autoSubscriptions: () => Amity.AutoSubscriptionState[];
50
47
  //# sourceMappingURL=autoSubscription.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autoSubscription.d.ts","sourceRoot":"","sources":["../../../src/client/api/autoSubscription.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EAEtB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,YAAY,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAKpF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,aAAc,gBAAgB,EAAE,KAAG,IAGtE,CAAC;AAMF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,aAAc,gBAAgB,EAAE,KAAG,IAGvE,CAAC;AAMF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,QAAO,qBAAqB,EACZ,CAAC"}
1
+ {"version":3,"file":"autoSubscription.d.ts","sourceRoot":"","sources":["../../../src/client/api/autoSubscription.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,aAAc,MAAM,gBAAgB,EAAE,KAAG,IAG5E,CAAC;AAMF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,aAAc,MAAM,gBAAgB,EAAE,KAAG,IAG7E,CAAC;AAMF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,QAAO,MAAM,qBAAqB,EAClB,CAAC"}
@@ -1,23 +1,3 @@
1
- /** Feature-grouped real-time handles; all default-on, toggleable per handle. */
2
- export declare enum AutoSubscription {
3
- /** SMART_CHANNEL + SMART_MESSAGE + SMART_MESSAGE_FEED — chat "smart" real-time. */
4
- CHAT = "chat",
5
- /** Network-wide events (e.g. global ban). */
6
- NETWORK = "network",
7
- /** Livestream state events. */
8
- LIVESTREAM = "livestream",
9
- /** Both membership wildcards (followers + followings) — block real-time. */
10
- BLOCK = "block"
11
- }
12
- export interface AutoSubscriptionState {
13
- feature: AutoSubscription;
14
- /** currently subscribed */
15
- isActive: boolean;
16
- /** backs a core SDK feature (turning it off degrades that feature) */
17
- isSystem: boolean;
18
- /** underlying MQTT topics (broker slots) this handle consumes */
19
- topicCount: number;
20
- }
21
1
  /** Ref-counted, reconnect-resilient registry of the managed auto-subscriptions. */
22
2
  declare class AutoSubscriptionManager {
23
3
  private readonly refCountByFeature;
@@ -29,9 +9,9 @@ declare class AutoSubscriptionManager {
29
9
  private unsubscribeTopics;
30
10
  /** Subscribe every enabled handle's topics, converging the broker to the registry. Called on each (re)connect. */
31
11
  initialize(): void;
32
- subscribe(feature: AutoSubscription): void;
33
- unsubscribe(feature: AutoSubscription): void;
34
- subscriptions(): AutoSubscriptionState[];
12
+ subscribe(feature: Amity.AutoSubscription): void;
13
+ unsubscribe(feature: Amity.AutoSubscription): void;
14
+ subscriptions(): Amity.AutoSubscriptionState[];
35
15
  reset(): void;
36
16
  }
37
17
  export declare const getAutoSubscriptionManager: () => AutoSubscriptionManager;
@@ -1 +1 @@
1
- {"version":3,"file":"autoSubscriptionManager.d.ts","sourceRoot":"","sources":["../../../src/client/utils/autoSubscriptionManager.ts"],"names":[],"mappings":"AAYA,gFAAgF;AAChF,oBAAY,gBAAgB;IAC1B,mFAAmF;IACnF,IAAI,SAAS;IACb,6CAA6C;IAC7C,OAAO,YAAY;IACnB,+BAA+B;IAC/B,UAAU,eAAe;IACzB,4EAA4E;IAC5E,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,2BAA2B;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,QAAQ,EAAE,OAAO,CAAC;IAClB,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;CACpB;AAyBD,mFAAmF;AACnF,cAAM,uBAAuB;IAC3B,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuC;IAEzE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqD;;IAM/E,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,iBAAiB;IAKzB,kHAAkH;IAClH,UAAU;IAMV,SAAS,CAAC,OAAO,EAAE,gBAAgB;IAMnC,WAAW,CAAC,OAAO,EAAE,gBAAgB;IAMrC,aAAa,IAAI,qBAAqB,EAAE;IASxC,KAAK;CAKN;AAID,eAAO,MAAM,0BAA0B,QAAO,uBAG7C,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,8BAA8B,QAAO,MAAM,YAGpD,CAAC"}
1
+ {"version":3,"file":"autoSubscriptionManager.d.ts","sourceRoot":"","sources":["../../../src/client/utils/autoSubscriptionManager.ts"],"names":[],"mappings":"AAoCA,mFAAmF;AACnF,cAAM,uBAAuB;IAC3B,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA6C;IAE/E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA2D;;IAMrF,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,iBAAiB;IAKzB,kHAAkH;IAClH,UAAU;IAMV,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,gBAAgB;IAMzC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,gBAAgB;IAM3C,aAAa,IAAI,KAAK,CAAC,qBAAqB,EAAE;IAS9C,KAAK;CAKN;AAID,eAAO,MAAM,0BAA0B,QAAO,uBAG7C,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,8BAA8B,QAAO,MAAM,YAGpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/core/transports/http.ts"],"names":[],"mappings":"AAeA,oBAAY,kBAAkB;IAC5B,WAAW,iBAAiB;IAC5B,gBAAgB,uBAAuB;IACvC,YAAY,kBAAkB;CAC/B;AAUD,yDAAyD;AACzD,eAAO,MAAM,oBAAoB,YAEhC,CAAC;AAuDF,mDAAmD;AACnD,eAAO,MAAM,yBAAyB,YAErC,CAAC;AAGF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,aAAc,MAAM,kCA+HnD,CAAC"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/core/transports/http.ts"],"names":[],"mappings":"AAeA,oBAAY,kBAAkB;IAC5B,WAAW,iBAAiB;IAC5B,gBAAgB,uBAAuB;IACvC,YAAY,kBAAkB;CAC/B;AAUD,yDAAyD;AACzD,eAAO,MAAM,oBAAoB,YAEhC,CAAC;AAuDF,mDAAmD;AACnD,eAAO,MAAM,yBAAyB,YAErC,CAAC;AAGF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,aAAc,MAAM,kCA+KnD,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -28,6 +28,13 @@ exports.MembershipAcceptanceTypeEnum = void 0;
28
28
  MembershipAcceptanceTypeEnum["AUTOMATIC"] = "automatic";
29
29
  MembershipAcceptanceTypeEnum["INVITATION"] = "invitation";
30
30
  })(exports.MembershipAcceptanceTypeEnum || (exports.MembershipAcceptanceTypeEnum = {}));
31
+ exports.AmityAutoSubscription = void 0;
32
+ (function (AmityAutoSubscription) {
33
+ AmityAutoSubscription["CHAT"] = "chat";
34
+ AmityAutoSubscription["NETWORK"] = "network";
35
+ AmityAutoSubscription["LIVESTREAM"] = "livestream";
36
+ AmityAutoSubscription["BLOCK"] = "block";
37
+ })(exports.AmityAutoSubscription || (exports.AmityAutoSubscription = {}));
31
38
 
32
39
  exports.UserTypeEnum = void 0;
33
40
  (function (UserTypeEnum) {
@@ -2069,6 +2076,51 @@ const createHttpTransport = (endpoint) => {
2069
2076
  */
2070
2077
  });
2071
2078
  instance.defaults.withCredentials = false;
2079
+ /*
2080
+ * FIX (React Native only): React Native's FormData implements append()/getParts() but does NOT
2081
+ * set Symbol.toStringTag, so axios's `isFormData()` fails to recognise it. axios then runs its
2082
+ * default `transformRequest`, which re-serialises the body and emits
2083
+ * `application/x-www-form-urlencoded` instead of the intended `multipart/form-data`. On Android
2084
+ * (RN 0.83+ New Architecture) the upload server + OkHttp reject this with
2085
+ * "multipart != application/x-www-form-urlencoded".
2086
+ *
2087
+ * We intercept at the `transformRequest` layer (before axios serialises) and, when the body is a
2088
+ * React Native FormData (duck-typed via `getParts`), hand it to the adapter untouched while
2089
+ * keeping a multipart Content-Type. (Deleting the Content-Type is NOT safe: axios then backfills
2090
+ * its POST default, `application/x-www-form-urlencoded`.) React Native's native networking layer
2091
+ * regenerates the multipart boundary on the wire.
2092
+ *
2093
+ * Strictly scoped: the `getParts` guard is unique to React Native's FormData — web FormData
2094
+ * (used by the React/web UIKit) and Node's `form-data` package have no `getParts()`, so this is a
2095
+ * no-op there and for any non-FormData request body. It also self-neutralises on any
2096
+ * platform/RN version where axios already serialises the FormData correctly.
2097
+ */
2098
+ try {
2099
+ const defaultTransform = [].concat(axios__default["default"].defaults.transformRequest || []);
2100
+ instance.defaults.transformRequest = [
2101
+ function transformRnFormData(data, headers) {
2102
+ const body = data;
2103
+ if (body && typeof body.getParts === 'function') {
2104
+ const h = headers;
2105
+ if (h) {
2106
+ if (typeof h.set === 'function')
2107
+ h.set('Content-Type', 'multipart/form-data', true);
2108
+ else
2109
+ h['Content-Type'] = 'multipart/form-data';
2110
+ }
2111
+ return data;
2112
+ }
2113
+ let result = data;
2114
+ for (let i = 0; i < defaultTransform.length; i += 1) {
2115
+ result = defaultTransform[i].call(this, result, headers);
2116
+ }
2117
+ return result;
2118
+ },
2119
+ ];
2120
+ }
2121
+ catch (_a) {
2122
+ /* leave the default transformRequest unchanged on any failure */
2123
+ }
2072
2124
  instance.interceptors.request.use(config => {
2073
2125
  // do not check expiration for token creation url
2074
2126
  if (config.url === '/api/v5/sessions') {
@@ -4766,35 +4818,23 @@ var SessionWatcher$1 = {
4766
4818
  */
4767
4819
  const onSessionStateChange = (callback) => SessionWatcher$1.getInstance().onSessionStateChange(callback);
4768
4820
 
4769
- /** Feature-grouped real-time handles; all default-on, toggleable per handle. */
4770
- var AutoSubscription;
4771
- (function (AutoSubscription) {
4772
- /** SMART_CHANNEL + SMART_MESSAGE + SMART_MESSAGE_FEED — chat "smart" real-time. */
4773
- AutoSubscription["CHAT"] = "chat";
4774
- /** Network-wide events (e.g. global ban). */
4775
- AutoSubscription["NETWORK"] = "network";
4776
- /** Livestream state events. */
4777
- AutoSubscription["LIVESTREAM"] = "livestream";
4778
- /** Both membership wildcards (followers + followings) — block real-time. */
4779
- AutoSubscription["BLOCK"] = "block";
4780
- })(AutoSubscription || (AutoSubscription = {}));
4781
4821
  const TOPICS = {
4782
- [AutoSubscription.NETWORK]: [getNetworkTopic],
4783
- [AutoSubscription.CHAT]: [
4822
+ [exports.AmityAutoSubscription.NETWORK]: [getNetworkTopic],
4823
+ [exports.AmityAutoSubscription.CHAT]: [
4784
4824
  getSmartFeedChannelTopic,
4785
4825
  getSmartFeedSubChannelTopic,
4786
4826
  getSmartFeedMessageTopic,
4787
4827
  ],
4788
- [AutoSubscription.LIVESTREAM]: [getLiveStreamTopic],
4789
- [AutoSubscription.BLOCK]: [getMyFollowersTopic, getMyFollowingsTopic],
4828
+ [exports.AmityAutoSubscription.LIVESTREAM]: [getLiveStreamTopic],
4829
+ [exports.AmityAutoSubscription.BLOCK]: [getMyFollowersTopic, getMyFollowingsTopic],
4790
4830
  };
4791
4831
  const DEFAULT_TOPICS = [
4792
- AutoSubscription.CHAT,
4793
- AutoSubscription.NETWORK,
4794
- AutoSubscription.LIVESTREAM,
4795
- AutoSubscription.BLOCK,
4832
+ exports.AmityAutoSubscription.CHAT,
4833
+ exports.AmityAutoSubscription.NETWORK,
4834
+ exports.AmityAutoSubscription.LIVESTREAM,
4835
+ exports.AmityAutoSubscription.BLOCK,
4796
4836
  ];
4797
- const ALL_FEATURES = Object.values(AutoSubscription);
4837
+ const ALL_FEATURES = Object.values(exports.AmityAutoSubscription);
4798
4838
  /** Ref-counted, reconnect-resilient registry of the managed auto-subscriptions. */
4799
4839
  class AutoSubscriptionManager {
4800
4840
  constructor() {
@@ -11394,8 +11434,8 @@ const notifications = () => new Notifications();
11394
11434
  */
11395
11435
  /**
11396
11436
  * ```js
11397
- * import { Client } from '@amityco/ts-sdk'
11398
- * Client.enableAutoSubscriptions([Client.AutoSubscription.BLOCK])
11437
+ * import { Client, AmityAutoSubscription } from '@amityco/ts-sdk'
11438
+ * Client.enableAutoSubscriptions([AmityAutoSubscription.BLOCK])
11399
11439
  * ```
11400
11440
  *
11401
11441
  * Enables one or more managed auto-subscription handles. Managed handles are
@@ -11404,7 +11444,7 @@ const notifications = () => new Notifications();
11404
11444
  * {@link disableAutoSubscriptions}. Synchronous fire-and-forget — the registry
11405
11445
  * updates immediately and the broker subscribe is retried on reconnect.
11406
11446
  *
11407
- * @param features the {@link AutoSubscription} handles to enable
11447
+ * @param features the {@link AmityAutoSubscription} handles to enable
11408
11448
  *
11409
11449
  * @category Client API
11410
11450
  */
@@ -11418,15 +11458,15 @@ const enableAutoSubscriptions = (features) => {
11418
11458
  */
11419
11459
  /**
11420
11460
  * ```js
11421
- * import { Client } from '@amityco/ts-sdk'
11422
- * Client.disableAutoSubscriptions([Client.AutoSubscription.LIVESTREAM])
11461
+ * import { Client, AmityAutoSubscription } from '@amityco/ts-sdk'
11462
+ * Client.disableAutoSubscriptions([AmityAutoSubscription.LIVESTREAM])
11423
11463
  * ```
11424
11464
  *
11425
11465
  * Disables one or more managed auto-subscription handles. The change persists
11426
11466
  * across reconnect (it is not silently re-enabled) until
11427
11467
  * {@link enableAutoSubscriptions} is called again. Synchronous fire-and-forget.
11428
11468
  *
11429
- * @param features the {@link AutoSubscription} handles to disable
11469
+ * @param features the {@link AmityAutoSubscription} handles to disable
11430
11470
  *
11431
11471
  * @category Client API
11432
11472
  */
@@ -11836,7 +11876,6 @@ var index$s = /*#__PURE__*/Object.freeze({
11836
11876
  setAccessTokenHandler: setAccessTokenHandler,
11837
11877
  getChatSettings: getChatSettings,
11838
11878
  notifications: notifications,
11839
- get AutoSubscription () { return AutoSubscription; },
11840
11879
  enableAutoSubscriptions: enableAutoSubscriptions,
11841
11880
  disableAutoSubscriptions: disableAutoSubscriptions,
11842
11881
  autoSubscriptions: autoSubscriptions,
package/dist/index.esm.js CHANGED
@@ -13,6 +13,13 @@ var MembershipAcceptanceTypeEnum;
13
13
  MembershipAcceptanceTypeEnum["AUTOMATIC"] = "automatic";
14
14
  MembershipAcceptanceTypeEnum["INVITATION"] = "invitation";
15
15
  })(MembershipAcceptanceTypeEnum || (MembershipAcceptanceTypeEnum = {}));
16
+ var AmityAutoSubscription;
17
+ (function (AmityAutoSubscription) {
18
+ AmityAutoSubscription["CHAT"] = "chat";
19
+ AmityAutoSubscription["NETWORK"] = "network";
20
+ AmityAutoSubscription["LIVESTREAM"] = "livestream";
21
+ AmityAutoSubscription["BLOCK"] = "block";
22
+ })(AmityAutoSubscription || (AmityAutoSubscription = {}));
16
23
 
17
24
  var UserTypeEnum;
18
25
  (function (UserTypeEnum) {
@@ -2054,6 +2061,51 @@ const createHttpTransport = (endpoint) => {
2054
2061
  */
2055
2062
  });
2056
2063
  instance.defaults.withCredentials = false;
2064
+ /*
2065
+ * FIX (React Native only): React Native's FormData implements append()/getParts() but does NOT
2066
+ * set Symbol.toStringTag, so axios's `isFormData()` fails to recognise it. axios then runs its
2067
+ * default `transformRequest`, which re-serialises the body and emits
2068
+ * `application/x-www-form-urlencoded` instead of the intended `multipart/form-data`. On Android
2069
+ * (RN 0.83+ New Architecture) the upload server + OkHttp reject this with
2070
+ * "multipart != application/x-www-form-urlencoded".
2071
+ *
2072
+ * We intercept at the `transformRequest` layer (before axios serialises) and, when the body is a
2073
+ * React Native FormData (duck-typed via `getParts`), hand it to the adapter untouched while
2074
+ * keeping a multipart Content-Type. (Deleting the Content-Type is NOT safe: axios then backfills
2075
+ * its POST default, `application/x-www-form-urlencoded`.) React Native's native networking layer
2076
+ * regenerates the multipart boundary on the wire.
2077
+ *
2078
+ * Strictly scoped: the `getParts` guard is unique to React Native's FormData — web FormData
2079
+ * (used by the React/web UIKit) and Node's `form-data` package have no `getParts()`, so this is a
2080
+ * no-op there and for any non-FormData request body. It also self-neutralises on any
2081
+ * platform/RN version where axios already serialises the FormData correctly.
2082
+ */
2083
+ try {
2084
+ const defaultTransform = [].concat(axios.defaults.transformRequest || []);
2085
+ instance.defaults.transformRequest = [
2086
+ function transformRnFormData(data, headers) {
2087
+ const body = data;
2088
+ if (body && typeof body.getParts === 'function') {
2089
+ const h = headers;
2090
+ if (h) {
2091
+ if (typeof h.set === 'function')
2092
+ h.set('Content-Type', 'multipart/form-data', true);
2093
+ else
2094
+ h['Content-Type'] = 'multipart/form-data';
2095
+ }
2096
+ return data;
2097
+ }
2098
+ let result = data;
2099
+ for (let i = 0; i < defaultTransform.length; i += 1) {
2100
+ result = defaultTransform[i].call(this, result, headers);
2101
+ }
2102
+ return result;
2103
+ },
2104
+ ];
2105
+ }
2106
+ catch (_a) {
2107
+ /* leave the default transformRequest unchanged on any failure */
2108
+ }
2057
2109
  instance.interceptors.request.use(config => {
2058
2110
  // do not check expiration for token creation url
2059
2111
  if (config.url === '/api/v5/sessions') {
@@ -20842,35 +20894,23 @@ var SessionWatcher$1 = {
20842
20894
  */
20843
20895
  const onSessionStateChange = (callback) => SessionWatcher$1.getInstance().onSessionStateChange(callback);
20844
20896
 
20845
- /** Feature-grouped real-time handles; all default-on, toggleable per handle. */
20846
- var AutoSubscription;
20847
- (function (AutoSubscription) {
20848
- /** SMART_CHANNEL + SMART_MESSAGE + SMART_MESSAGE_FEED — chat "smart" real-time. */
20849
- AutoSubscription["CHAT"] = "chat";
20850
- /** Network-wide events (e.g. global ban). */
20851
- AutoSubscription["NETWORK"] = "network";
20852
- /** Livestream state events. */
20853
- AutoSubscription["LIVESTREAM"] = "livestream";
20854
- /** Both membership wildcards (followers + followings) — block real-time. */
20855
- AutoSubscription["BLOCK"] = "block";
20856
- })(AutoSubscription || (AutoSubscription = {}));
20857
20897
  const TOPICS = {
20858
- [AutoSubscription.NETWORK]: [getNetworkTopic],
20859
- [AutoSubscription.CHAT]: [
20898
+ [AmityAutoSubscription.NETWORK]: [getNetworkTopic],
20899
+ [AmityAutoSubscription.CHAT]: [
20860
20900
  getSmartFeedChannelTopic,
20861
20901
  getSmartFeedSubChannelTopic,
20862
20902
  getSmartFeedMessageTopic,
20863
20903
  ],
20864
- [AutoSubscription.LIVESTREAM]: [getLiveStreamTopic],
20865
- [AutoSubscription.BLOCK]: [getMyFollowersTopic, getMyFollowingsTopic],
20904
+ [AmityAutoSubscription.LIVESTREAM]: [getLiveStreamTopic],
20905
+ [AmityAutoSubscription.BLOCK]: [getMyFollowersTopic, getMyFollowingsTopic],
20866
20906
  };
20867
20907
  const DEFAULT_TOPICS = [
20868
- AutoSubscription.CHAT,
20869
- AutoSubscription.NETWORK,
20870
- AutoSubscription.LIVESTREAM,
20871
- AutoSubscription.BLOCK,
20908
+ AmityAutoSubscription.CHAT,
20909
+ AmityAutoSubscription.NETWORK,
20910
+ AmityAutoSubscription.LIVESTREAM,
20911
+ AmityAutoSubscription.BLOCK,
20872
20912
  ];
20873
- const ALL_FEATURES = Object.values(AutoSubscription);
20913
+ const ALL_FEATURES = Object.values(AmityAutoSubscription);
20874
20914
  /** Ref-counted, reconnect-resilient registry of the managed auto-subscriptions. */
20875
20915
  class AutoSubscriptionManager {
20876
20916
  constructor() {
@@ -27486,8 +27526,8 @@ const notifications = () => new Notifications();
27486
27526
  */
27487
27527
  /**
27488
27528
  * ```js
27489
- * import { Client } from '@amityco/ts-sdk'
27490
- * Client.enableAutoSubscriptions([Client.AutoSubscription.BLOCK])
27529
+ * import { Client, AmityAutoSubscription } from '@amityco/ts-sdk'
27530
+ * Client.enableAutoSubscriptions([AmityAutoSubscription.BLOCK])
27491
27531
  * ```
27492
27532
  *
27493
27533
  * Enables one or more managed auto-subscription handles. Managed handles are
@@ -27496,7 +27536,7 @@ const notifications = () => new Notifications();
27496
27536
  * {@link disableAutoSubscriptions}. Synchronous fire-and-forget — the registry
27497
27537
  * updates immediately and the broker subscribe is retried on reconnect.
27498
27538
  *
27499
- * @param features the {@link AutoSubscription} handles to enable
27539
+ * @param features the {@link AmityAutoSubscription} handles to enable
27500
27540
  *
27501
27541
  * @category Client API
27502
27542
  */
@@ -27510,15 +27550,15 @@ const enableAutoSubscriptions = (features) => {
27510
27550
  */
27511
27551
  /**
27512
27552
  * ```js
27513
- * import { Client } from '@amityco/ts-sdk'
27514
- * Client.disableAutoSubscriptions([Client.AutoSubscription.LIVESTREAM])
27553
+ * import { Client, AmityAutoSubscription } from '@amityco/ts-sdk'
27554
+ * Client.disableAutoSubscriptions([AmityAutoSubscription.LIVESTREAM])
27515
27555
  * ```
27516
27556
  *
27517
27557
  * Disables one or more managed auto-subscription handles. The change persists
27518
27558
  * across reconnect (it is not silently re-enabled) until
27519
27559
  * {@link enableAutoSubscriptions} is called again. Synchronous fire-and-forget.
27520
27560
  *
27521
- * @param features the {@link AutoSubscription} handles to disable
27561
+ * @param features the {@link AmityAutoSubscription} handles to disable
27522
27562
  *
27523
27563
  * @category Client API
27524
27564
  */
@@ -27928,7 +27968,6 @@ var index$s = /*#__PURE__*/Object.freeze({
27928
27968
  setAccessTokenHandler: setAccessTokenHandler,
27929
27969
  getChatSettings: getChatSettings,
27930
27970
  notifications: notifications,
27931
- get AutoSubscription () { return AutoSubscription; },
27932
27971
  enableAutoSubscriptions: enableAutoSubscriptions,
27933
27972
  disableAutoSubscriptions: disableAutoSubscriptions,
27934
27973
  autoSubscriptions: autoSubscriptions,
@@ -53349,4 +53388,4 @@ class AmityAttachmentProductTags {
53349
53388
  }
53350
53389
  }
53351
53390
 
53352
- export { API_REGIONS, index$5 as AdRepository, AmityAttachmentProductTags, 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, 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 };
53391
+ 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, 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 };