@gala-chain/launchpad-sdk 5.0.4-beta.62 → 5.0.4-beta.63

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 (56) hide show
  1. package/dist/LaunchpadSDK.d.ts +117 -0
  2. package/dist/LaunchpadSDK.d.ts.map +1 -1
  3. package/dist/ai-docs.json +129 -15
  4. package/dist/constants/endpoints.d.ts +44 -0
  5. package/dist/constants/endpoints.d.ts.map +1 -1
  6. package/dist/constants/version.generated.d.ts +1 -1
  7. package/dist/index.browser.d.ts +1 -0
  8. package/dist/index.browser.d.ts.map +1 -1
  9. package/dist/index.browser.esm.js +1 -1
  10. package/dist/index.cjs +1 -1
  11. package/dist/index.esm.js +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/native.cjs +1 -0
  14. package/dist/native.d.ts +22 -0
  15. package/dist/native.d.ts.map +1 -0
  16. package/dist/native.esm.js +1 -0
  17. package/dist/react.cjs +1 -1
  18. package/dist/react.esm.js +1 -1
  19. package/dist/services/ClientConfigService.d.ts +61 -0
  20. package/dist/services/ClientConfigService.d.ts.map +1 -0
  21. package/dist/services/IntervalRegistry.d.ts +79 -0
  22. package/dist/services/IntervalRegistry.d.ts.map +1 -0
  23. package/dist/services/MultiPoolStateManager.d.ts.map +1 -1
  24. package/dist/services/NotificationService.d.ts +113 -0
  25. package/dist/services/NotificationService.d.ts.map +1 -0
  26. package/dist/src/LaunchpadSDK.d.ts +117 -0
  27. package/dist/src/LaunchpadSDK.d.ts.map +1 -1
  28. package/dist/src/constants/endpoints.d.ts +44 -0
  29. package/dist/src/constants/endpoints.d.ts.map +1 -1
  30. package/dist/src/constants/version.generated.d.ts +1 -1
  31. package/dist/src/index.browser.d.ts +1 -0
  32. package/dist/src/index.browser.d.ts.map +1 -1
  33. package/dist/src/native.d.ts +22 -0
  34. package/dist/src/native.d.ts.map +1 -0
  35. package/dist/src/services/ClientConfigService.d.ts +61 -0
  36. package/dist/src/services/ClientConfigService.d.ts.map +1 -0
  37. package/dist/src/services/IntervalRegistry.d.ts +79 -0
  38. package/dist/src/services/IntervalRegistry.d.ts.map +1 -0
  39. package/dist/src/services/MultiPoolStateManager.d.ts.map +1 -1
  40. package/dist/src/services/NotificationService.d.ts +113 -0
  41. package/dist/src/services/NotificationService.d.ts.map +1 -0
  42. package/dist/src/types/client-config.dto.d.ts +43 -0
  43. package/dist/src/types/client-config.dto.d.ts.map +1 -0
  44. package/dist/src/types/common.d.ts +2 -0
  45. package/dist/src/types/common.d.ts.map +1 -1
  46. package/dist/src/types/notification.dto.d.ts +92 -0
  47. package/dist/src/types/notification.dto.d.ts.map +1 -0
  48. package/dist/src/utils/http.d.ts.map +1 -1
  49. package/dist/types/client-config.dto.d.ts +43 -0
  50. package/dist/types/client-config.dto.d.ts.map +1 -0
  51. package/dist/types/common.d.ts +2 -0
  52. package/dist/types/common.d.ts.map +1 -1
  53. package/dist/types/notification.dto.d.ts +92 -0
  54. package/dist/types/notification.dto.d.ts.map +1 -0
  55. package/dist/utils/http.d.ts.map +1 -1
  56. package/package.json +9 -1
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Client Config Service
3
+ *
4
+ * Handles client-side feature flag configuration for native mobile apps.
5
+ *
6
+ * Public endpoint - no authentication required.
7
+ *
8
+ * @category Services
9
+ * @since 5.1.0
10
+ */
11
+ import type { GetClientFlagsResult } from '../types/client-config.dto';
12
+ import type { HttpClient } from '../utils/http';
13
+ import { BaseService } from './BaseService';
14
+ /**
15
+ * Client Config Service Class
16
+ *
17
+ * Provides methods for accessing client-side feature flags.
18
+ * These flags control which features are enabled/disabled in the mobile app.
19
+ *
20
+ * **Public endpoint** - no authentication required.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * const configService = new ClientConfigService(httpClient, true);
25
+ *
26
+ * const { flags } = await configService.getClientFlags();
27
+ * console.log('Push notifications:', flags.PUSH_NOTIFICATIONS);
28
+ * console.log('Dark mode:', flags.DARK_MODE);
29
+ * ```
30
+ */
31
+ export declare class ClientConfigService extends BaseService {
32
+ constructor(http: HttpClient, debugMode?: boolean);
33
+ /**
34
+ * Extract data from API response wrapper
35
+ * @throws Error if response indicates failure or has no data
36
+ */
37
+ private extractData;
38
+ /**
39
+ * Get client feature flags.
40
+ *
41
+ * Returns feature flag overrides for the native mobile app.
42
+ * No authentication required.
43
+ *
44
+ * @returns Client feature flags
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * const { flags } = await configService.getClientFlags();
49
+ *
50
+ * if (flags.PUSH_NOTIFICATIONS) {
51
+ * // Initialize push notification system
52
+ * }
53
+ *
54
+ * if (flags.DEX_TRADING) {
55
+ * // Show DEX trading UI
56
+ * }
57
+ * ```
58
+ */
59
+ getClientFlags(): Promise<GetClientFlagsResult>;
60
+ }
61
+ //# sourceMappingURL=ClientConfigService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientConfigService.d.ts","sourceRoot":"","sources":["../../src/services/ClientConfigService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAEV,oBAAoB,EAErB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;gBACtC,IAAI,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe;IAIxD;;;OAGG;IACH,OAAO,CAAC,WAAW;IAQnB;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,cAAc,IAAI,OAAO,CAAC,oBAAoB,CAAC;CAatD"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Interval Registry for SDK
3
+ *
4
+ * Centralized tracking for setInterval handles to ensure proper cleanup
5
+ * and prevent memory leaks during SDK disposal.
6
+ *
7
+ * Pattern:
8
+ * 1. registerInterval(setInterval(...)) - tracks the interval
9
+ * 2. unregisterInterval(handle) - removes from registry
10
+ * 3. unregisterAllIntervals() - nuclear cleanup on SDK shutdown
11
+ *
12
+ * @packageDocumentation
13
+ */
14
+ /**
15
+ * Register an interval handle for centralized tracking.
16
+ *
17
+ * @param handle - The interval ID returned by setInterval
18
+ * @param label - Optional label for debugging (e.g., 'background-warming')
19
+ * @returns The same interval handle for chaining
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const timer = registerInterval(setInterval(() => {
24
+ * // periodic work
25
+ * }, 5000), 'background-warming');
26
+ * ```
27
+ */
28
+ export declare function registerInterval(handle: number | NodeJS.Timeout, label?: string): number;
29
+ /**
30
+ * Unregister an interval handle from centralized tracking.
31
+ *
32
+ * Should be called alongside clearInterval() for complete cleanup.
33
+ *
34
+ * @param handle - The interval ID to unregister
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * // In cleanup function:
39
+ * unregisterInterval(timer);
40
+ * clearInterval(timer);
41
+ * ```
42
+ */
43
+ export declare function unregisterInterval(handle: number | NodeJS.Timeout): void;
44
+ /**
45
+ * Unregister all tracked intervals.
46
+ *
47
+ * Nuclear option - use only during SDK shutdown or test cleanup.
48
+ * Returns count of intervals cleared for monitoring.
49
+ *
50
+ * @returns Number of intervals that were registered
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * // In SDK cleanup:
55
+ * const cleared = unregisterAllIntervals();
56
+ * console.log(`Cleared ${cleared} leaked intervals`);
57
+ * ```
58
+ */
59
+ export declare function unregisterAllIntervals(): number;
60
+ /**
61
+ * Get registry statistics for debugging.
62
+ *
63
+ * @returns Current registry size and entries
64
+ */
65
+ export declare function getIntervalRegistryStats(): {
66
+ size: number;
67
+ entries: Array<{
68
+ id: number;
69
+ createdAt: number;
70
+ label?: string | undefined;
71
+ }>;
72
+ };
73
+ /**
74
+ * Clear the registry for test isolation.
75
+ *
76
+ * @internal - Test use only
77
+ */
78
+ export declare function __resetIntervalRegistryForTests(): void;
79
+ //# sourceMappingURL=IntervalRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntervalRegistry.d.ts","sourceRoot":"","sources":["../../src/services/IntervalRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,EAC/B,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CAOR;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,GAAG,IAAI,CAGxE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAI/C;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;CAC/E,CASA;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,IAAI,IAAI,CAEtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"MultiPoolStateManager.d.ts","sourceRoot":"","sources":["../../src/services/MultiPoolStateManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EAEjB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAK9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,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;IACH,OAAO,CAAC,aAAa;CAmBtB;AAED;;;;;;;GAOG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkC;IACtD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,OAAO,EAAE,MAAM;IAI3B,GAAG,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO;IAInC,GAAG,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;IAkBhC,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO;IAItC,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF"}
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Notification Service
3
+ *
4
+ * Handles push notification device registration and preference management.
5
+ *
6
+ * All operations require MultiAuth (JWT session or per-user API key).
7
+ *
8
+ * @category Services
9
+ * @since 5.1.0
10
+ */
11
+ import type { JwtAuth } from '../auth/JwtAuth';
12
+ import type { GetNotificationPreferencesResult, RegisterPushTokenParams, RegisterPushTokenResult, UnregisterPushTokenResult, UpdateNotificationPreferencesParams, UpdateNotificationPreferencesResult } from '../types/notification.dto';
13
+ import type { HttpClient } from '../utils/http';
14
+ import { BaseService } from './BaseService';
15
+ /**
16
+ * Notification Service Class
17
+ *
18
+ * Provides methods for:
19
+ * - Registering/unregistering push notification device tokens
20
+ * - Getting/updating notification preferences
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * const notificationService = new NotificationService(httpClient, true, jwtAuth);
25
+ *
26
+ * // Register a device
27
+ * await notificationService.registerPushToken({
28
+ * token: 'fcm-token-here',
29
+ * platform: 'android',
30
+ * });
31
+ *
32
+ * // Get preferences
33
+ * const { preferences } = await notificationService.getPreferences();
34
+ * console.log('Trades enabled:', preferences.tradesEnabled);
35
+ * ```
36
+ */
37
+ export declare class NotificationService extends BaseService {
38
+ constructor(http: HttpClient, debugMode?: boolean, jwtAuth?: JwtAuth);
39
+ /**
40
+ * Extract data from API response wrapper
41
+ * @throws Error if response indicates failure or has no data
42
+ */
43
+ private extractData;
44
+ /**
45
+ * Register a push notification device token.
46
+ *
47
+ * Associates a push token (FCM or APNs) with the authenticated user.
48
+ * If the token already exists, it updates the associated device info.
49
+ *
50
+ * @param params - Registration parameters
51
+ * @returns Registration result
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * const result = await notificationService.registerPushToken({
56
+ * token: 'fcm-device-token-abc123',
57
+ * platform: 'android',
58
+ * deviceId: 'pixel-7-main',
59
+ * });
60
+ * console.log('Registered:', result.registered);
61
+ * ```
62
+ */
63
+ registerPushToken(params: RegisterPushTokenParams): Promise<RegisterPushTokenResult>;
64
+ /**
65
+ * Unregister a push notification device token.
66
+ *
67
+ * Deactivates a push token so the device no longer receives notifications.
68
+ *
69
+ * @param token - The push token to unregister
70
+ * @returns Unregistration result
71
+ *
72
+ * @example
73
+ * ```typescript
74
+ * const result = await notificationService.unregisterPushToken('fcm-device-token-abc123');
75
+ * console.log('Unregistered:', result.unregistered);
76
+ * ```
77
+ */
78
+ unregisterPushToken(token: string): Promise<UnregisterPushTokenResult>;
79
+ /**
80
+ * Get notification preferences for the authenticated user.
81
+ *
82
+ * @returns Current notification preferences
83
+ *
84
+ * @example
85
+ * ```typescript
86
+ * const { preferences } = await notificationService.getPreferences();
87
+ * console.log('Trades:', preferences.tradesEnabled);
88
+ * console.log('Streams:', preferences.streamsEnabled);
89
+ * console.log('Chat:', preferences.chatEnabled);
90
+ * console.log('System:', preferences.systemEnabled);
91
+ * ```
92
+ */
93
+ getPreferences(): Promise<GetNotificationPreferencesResult>;
94
+ /**
95
+ * Update notification preferences for the authenticated user.
96
+ *
97
+ * Partial update - only provided fields are modified.
98
+ *
99
+ * @param params - Preference fields to update
100
+ * @returns Updated notification preferences
101
+ *
102
+ * @example
103
+ * ```typescript
104
+ * // Disable chat notifications only
105
+ * const { preferences } = await notificationService.updatePreferences({
106
+ * chatEnabled: false,
107
+ * });
108
+ * console.log('Chat now:', preferences.chatEnabled); // false
109
+ * ```
110
+ */
111
+ updatePreferences(params: UpdateNotificationPreferencesParams): Promise<UpdateNotificationPreferencesResult>;
112
+ }
113
+ //# sourceMappingURL=NotificationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationService.d.ts","sourceRoot":"","sources":["../../src/services/NotificationService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,KAAK,EACV,gCAAgC,EAGhC,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,mCAAmC,EACnC,mCAAmC,EACpC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;gBACtC,IAAI,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe,EAAE,OAAO,CAAC,EAAE,OAAO;IAI3E;;;OAGG;IACH,OAAO,CAAC,WAAW;IAQnB;;;;;;;;;;;;;;;;;;OAkBG;IACG,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAmB1F;;;;;;;;;;;;;OAaG;IACG,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAkB5E;;;;;;;;;;;;;OAaG;IACG,cAAc,IAAI,OAAO,CAAC,gCAAgC,CAAC;IAkBjE;;;;;;;;;;;;;;;;OAgBG;IACG,iBAAiB,CACrB,MAAM,EAAE,mCAAmC,GAC1C,OAAO,CAAC,mCAAmC,CAAC;CAiBhD"}
@@ -9,6 +9,7 @@ import type { ActiveUsersResult, BanListResult, BanStatusResult, CreateBanOption
9
9
  import type { BurnTokensData, BurnTokensResult } from './types/burn.dto';
10
10
  import type { FlushResult } from './types/cache-management.dto';
11
11
  import type { CreateChatMessageOptions, CreateChatMessageResult, GetChatMessagesOptions, GetChatMessagesResult, UpdateChatMessageOptions, UpdateChatMessageResult } from './types/chat-messages.dto';
12
+ import type { GetClientFlagsResult } from './types/client-config.dto';
12
13
  import type { CommentsResult, CreateCommentOptions, CreateCommentResult, DeleteCommentResult, GetCommentsOptions, UpdateCommentOptions, UpdateCommentResult } from './types/comments.dto';
13
14
  import type { AddressFormat, ApiResponse, SDKConfig, TokenClassKey, TokenId } from './types/common';
14
15
  import type { ActionFlagOptions, ActionFlagResult, CreateFlagOptions, CreateFlagResult, DismissFlagOptions, DismissFlagResult, FlagListResult, ListFlagsOptions, ListGlobalFlagsOptions } from './types/content-flag.dto';
@@ -19,6 +20,7 @@ import type { LockTokensData, LockTokensResult, UnlockTokensData, UnlockTokensRe
19
20
  import type { CreateMessageOptions, CreateMessageResult, DeleteMessageResult, FetchMessagesOptions, FetchMessagesResult, GetPinnedMessageResult, MessageStats, PinMessageResult, UpdateMessageOptions, UpdateMessageResult, UpdateTokenConfigOptions } from './types/messages.dto';
20
21
  import type { ClaimModeratorInviteOptions, ClaimModeratorInviteResult, CreateModeratorInviteOptions, CreateModeratorInviteResult, GetModeratedTokensOptions, ListModeratorInvitesOptions, ModeratedTokensResult, ModeratorInviteListResult, PublicInviteInfo, UpdateInviteRoleOptions, UpdateInviteRoleResult, UpdateModeratorInviteOptions, UpdateModeratorInviteResult } from './types/moderator.dto';
21
22
  import type { ClaimCollectionParams, ClaimCollectionResult, CreateTokenClassParams, CreateTokenClassResult, EstimateMintFeeParams, EstimateNftFeesParams, FetchTokenClassesParams, MintNftParams, MintNftResult, NftBalance, NftCollectionAuthorization, NftFeeEstimate, NftTokenClassWithSupply } from './types/nft.dto';
23
+ import type { GetNotificationPreferencesResult, RegisterPushTokenParams, RegisterPushTokenResult, UnregisterPushTokenResult, UpdateNotificationPreferencesParams, UpdateNotificationPreferencesResult } from './types/notification.dto';
22
24
  import type { GetHomeOEmbedJsonResult, GetHomeOEmbedOptions, GetPoolOEmbedJsonResult, GetPoolOEmbedOptions, GetProfileOEmbedJsonResult, GetProfileOEmbedOptions } from './types/oembed.dto';
23
25
  import type { BanStatsResponse, CreateOverseerDirectOptions, CreateOverseerInviteOptions, FlagStatsResponse, InviteStatsResponse, ListOverseerInvitesOptions, ListOverseersOptions, ListUsersOptions, Overseer, OverseerInviteWithUrl, OverseerStatusResponse, OverseerSummaryResponse, PaginatedOverseerInvites, PaginatedOverseers, PublicOverseerInviteInfo, TokenBanStatsResponse, UsersListResponse, UserStatsResponse, UserSummaryResponse } from './types/overseer.dto';
24
26
  import type { PlatformConfig, UpdatePlatformConfigOptions } from './types/platform-config.dto';
@@ -394,6 +396,8 @@ export declare class LaunchpadSDK {
394
396
  private _weeklyChallengeService;
395
397
  private _oembedService;
396
398
  private _platformStatsService;
399
+ private _notificationService;
400
+ private _clientConfigService;
397
401
  private readonly nftCollectionService;
398
402
  private readonly tradingQuotesService;
399
403
  private readonly launchpadAPI;
@@ -2045,6 +2049,24 @@ export declare class LaunchpadSDK {
2045
2049
  * @since 9.0.0
2046
2050
  */
2047
2051
  private getPlatformStatsService;
2052
+ /**
2053
+ * Get or create the NotificationService instance.
2054
+ *
2055
+ * Lazily initializes the NotificationService on first use.
2056
+ * The service handles push notification device registration and preference management.
2057
+ *
2058
+ * @returns Configured NotificationService instance
2059
+ */
2060
+ private getNotificationService;
2061
+ /**
2062
+ * Get or create the ClientConfigService instance.
2063
+ *
2064
+ * Lazily initializes the ClientConfigService on first use.
2065
+ * The service handles client-side feature flag queries.
2066
+ *
2067
+ * @returns Configured ClientConfigService instance
2068
+ */
2069
+ private getClientConfigService;
2048
2070
  /**
2049
2071
  * Get or create the ApiKeyService instance.
2050
2072
  *
@@ -5605,6 +5627,101 @@ export declare class LaunchpadSDK {
5605
5627
  * ```
5606
5628
  */
5607
5629
  getPlatformStats(): Promise<GetPlatformStatsResult>;
5630
+ /**
5631
+ * Register a push notification device token.
5632
+ *
5633
+ * Associates a push token (FCM or APNs) with the authenticated user.
5634
+ * If the token already exists, it updates the associated device info.
5635
+ *
5636
+ * Authentication: Requires JWT auth (call sdk.login() first).
5637
+ *
5638
+ * @param params - Registration parameters (token, platform, optional deviceId)
5639
+ * @returns Registration result
5640
+ *
5641
+ * @example
5642
+ * ```typescript
5643
+ * const result = await sdk.registerPushToken({
5644
+ * token: 'fcm-device-token-abc123',
5645
+ * platform: 'android',
5646
+ * deviceId: 'pixel-7-main',
5647
+ * });
5648
+ * console.log('Registered:', result.registered);
5649
+ * ```
5650
+ */
5651
+ registerPushToken(params: RegisterPushTokenParams): Promise<RegisterPushTokenResult>;
5652
+ /**
5653
+ * Unregister a push notification device token.
5654
+ *
5655
+ * Deactivates a push token so the device no longer receives notifications.
5656
+ *
5657
+ * Authentication: Requires JWT auth (call sdk.login() first).
5658
+ *
5659
+ * @param token - The push token to unregister
5660
+ * @returns Unregistration result
5661
+ *
5662
+ * @example
5663
+ * ```typescript
5664
+ * const result = await sdk.unregisterPushToken('fcm-device-token-abc123');
5665
+ * console.log('Unregistered:', result.unregistered);
5666
+ * ```
5667
+ */
5668
+ unregisterPushToken(token: string): Promise<UnregisterPushTokenResult>;
5669
+ /**
5670
+ * Get notification preferences for the authenticated user.
5671
+ *
5672
+ * Returns the current push notification preference settings.
5673
+ *
5674
+ * Authentication: Requires JWT auth (call sdk.login() first).
5675
+ *
5676
+ * @returns Current notification preferences
5677
+ *
5678
+ * @example
5679
+ * ```typescript
5680
+ * const { preferences } = await sdk.fetchNotificationPreferences();
5681
+ * console.log('Trades:', preferences.tradesEnabled);
5682
+ * console.log('Streams:', preferences.streamsEnabled);
5683
+ * console.log('Chat:', preferences.chatEnabled);
5684
+ * console.log('System:', preferences.systemEnabled);
5685
+ * ```
5686
+ */
5687
+ fetchNotificationPreferences(): Promise<GetNotificationPreferencesResult>;
5688
+ /**
5689
+ * Update notification preferences for the authenticated user.
5690
+ *
5691
+ * Partial update - only provided fields are modified, others remain unchanged.
5692
+ *
5693
+ * Authentication: Requires JWT auth (call sdk.login() first).
5694
+ *
5695
+ * @param params - Preference fields to update
5696
+ * @returns Updated notification preferences
5697
+ *
5698
+ * @example
5699
+ * ```typescript
5700
+ * // Disable chat notifications only
5701
+ * const { preferences } = await sdk.updateNotificationPreferences({
5702
+ * chatEnabled: false,
5703
+ * });
5704
+ * console.log('Chat now:', preferences.chatEnabled); // false
5705
+ * ```
5706
+ */
5707
+ updateNotificationPreferences(params: UpdateNotificationPreferencesParams): Promise<UpdateNotificationPreferencesResult>;
5708
+ /**
5709
+ * Get client feature flags.
5710
+ *
5711
+ * Returns feature flag overrides for the native mobile app.
5712
+ * No authentication required (public endpoint).
5713
+ *
5714
+ * @returns Client feature flags
5715
+ *
5716
+ * @example
5717
+ * ```typescript
5718
+ * const { flags } = await sdk.fetchClientFlags();
5719
+ * console.log('Push notifications:', flags.PUSH_NOTIFICATIONS);
5720
+ * console.log('Dark mode:', flags.DARK_MODE);
5721
+ * console.log('DEX trading:', flags.DEX_TRADING);
5722
+ * ```
5723
+ */
5724
+ fetchClientFlags(): Promise<GetClientFlagsResult>;
5608
5725
  /**
5609
5726
  * Add a reaction to a pool message (chat or comment).
5610
5727
  *