{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Class: PersSDK"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/readme"},"children":["PERS SDK - v2.3.26"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/modules"},"children":["Exports"]}," / PersSDK"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"class-perssdk","__idx":0},"children":["Class: PersSDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PERS SDK - Main SDK class with domain managers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Main SDK interface providing clean, high-level managers for common operations"," ","while maintaining full access to the underlying API client and domain services."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK follows a layered architecture:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Managers"]},": High-level, intuitive APIs for common operations"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Domain Services"]},": Full-featured access for advanced use cases"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Client"]},": Direct REST API access for custom operations"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import { PersSDK } from '@explorins/pers-sdk';\nimport { BrowserFetchClientAdapter } from '@explorins/pers-sdk/platform-adapters';\n\nconst sdk = new PersSDK(new BrowserFetchClientAdapter(), {\n  environment: 'production',\n  apiProjectKey: 'your-project-key'\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Login with external JWT\nawait sdk.auth.loginWithToken(firebaseJWT, 'user');\n\n// Check authentication\nif (await sdk.auth.isAuthenticated()) {\n  const user = await sdk.auth.getCurrentUser();\n  console.log('Welcome,', user.name);\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Get active businesses\nconst businesses = await sdk.businesses.getActiveBusinesses();\n\n// Get business details\nconst business = await sdk.businesses.getBusinessById(businessId);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Get user's token balances\nconst tokens = await sdk.tokens.getTokens();\n\n// Get active credit token\nconst creditToken = await sdk.tokens.getActiveCreditToken();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Since"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["1.3.0 - Manager pattern architecture"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-of-contents","__idx":1},"children":["Table of contents"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"accessors","__idx":2},"children":["Accessors"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#events"},"children":["events"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#auth"},"children":["auth"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#users"},"children":["users"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#userstatus"},"children":["userStatus"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#tokens"},"children":["tokens"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#businesses"},"children":["businesses"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#campaigns"},"children":["campaigns"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#redemptions"},"children":["redemptions"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#transactions"},"children":["transactions"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#purchases"},"children":["purchases"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#files"},"children":["files"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#tenants"},"children":["tenants"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#apikeys"},"children":["apiKeys"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#analytics"},"children":["analytics"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#donations"},"children":["donations"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#triggersources"},"children":["triggerSources"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#webhooks"},"children":["webhooks"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#customfields"},"children":["customFields"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#bookings"},"children":["bookings"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#walletevents"},"children":["walletEvents"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#notifications"},"children":["notifications"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"constructors","__idx":3},"children":["Constructors"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#constructor"},"children":["constructor"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"methods","__idx":4},"children":["Methods"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#connectwalletevents"},"children":["connectWalletEvents"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#restoresession"},"children":["restoreSession"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#configurewalletevents"},"children":["configureWalletEvents"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#setdatasource"},"children":["setDataSource"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#updatedatasource"},"children":["updateDataSource"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#setplatform"},"children":["setPlatform"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#api"},"children":["api"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#isproduction"},"children":["isProduction"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk#isinitialized"},"children":["isInitialized"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"accessors-1","__idx":5},"children":["Accessors"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"events","__idx":6},"children":["events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["events"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perseventemitter"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PersEventEmitter"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Event emitter - Subscribe to SDK-wide events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provides a platform-agnostic event system for subscribing to transaction,"," ","authentication, campaign, and system events. Use this to display"," ","notifications, update UI, or trigger side effects in your application."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All events have a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userMessage"]}," field ready for display."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns","__idx":7},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perseventemitter"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PersEventEmitter"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PersEventEmitter instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const unsubscribe = sdk.events.subscribe((event) => {\n  // userMessage is always present and UI-ready\n  showNotification(event.userMessage, event.level);\n});\n\n// Later: cleanup\nunsubscribe();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"sdk.events.subscribe((event) => {\n  if (event.level === 'success' && event.domain === 'transaction') {\n    playSuccessSound();\n    confetti();\n  }\n  \n  if (event.level === 'error') {\n    logToSentry(event);\n  }\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Auto-unsubscribe after first event\nsdk.events.once((event) => {\n  console.log('First event received:', event.type);\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["See"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perseventemitter"},"children":["PersEventEmitter"]}," for detailed documentation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in","__idx":8},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L637"},"children":["pers-sdk.ts:637"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"auth","__idx":9},"children":["auth"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["auth"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AuthManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authentication manager - High-level authentication operations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provides methods for user login, logout, token management, and authentication"," ","status checking. Supports both user and admin authentication flows."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-1","__idx":10},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AuthManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["AuthManager instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Login with external JWT (Firebase, Auth0, etc.)\nawait sdk.auth.loginWithToken(firebaseJWT, 'user');\n\n// Check authentication status\nif (await sdk.auth.isAuthenticated()) {\n  const user = await sdk.auth.getCurrentUser();\n  console.log('Welcome,', user.name);\n}\n\n// Logout\nawait sdk.auth.clearAuth();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Admin login\nawait sdk.auth.loginAdmin(adminJWT);\n\n// Check if valid auth exists (synchronous)\nif (sdk.auth.hasValidAuth()) {\n  console.log('Authentication tokens found');\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["See"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/authmanager"},"children":["AuthManager"]}," for detailed documentation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-1","__idx":11},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L677"},"children":["pers-sdk.ts:677"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"users","__idx":12},"children":["users"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["users"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/usermanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["User manager - High-level user operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-2","__idx":13},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/usermanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const user = await sdk.user.getCurrentUser();\nawait sdk.user.updateCurrentUser(userData);\nconst users = await sdk.user.getAllUsersPublic();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-2","__idx":14},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L694"},"children":["pers-sdk.ts:694"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"userstatus","__idx":15},"children":["userStatus"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["userStatus"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/userstatusmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserStatusManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["User Status manager - High-level user status operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-3","__idx":16},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/userstatusmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserStatusManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const statusTypes = await sdk.userStatus.getUserStatusTypes();\nconst earnedStatus = await sdk.userStatus.getEarnedUserStatus();\nawait sdk.userStatus.createUserStatusType(statusData);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-3","__idx":17},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L711"},"children":["pers-sdk.ts:711"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tokens","__idx":18},"children":["tokens"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["tokens"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/tokenmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TokenManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Token manager - High-level token operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-4","__idx":19},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/tokenmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TokenManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const tokens = await sdk.tokens.getTokens();\nconst creditToken = await sdk.tokens.getActiveCreditToken();\nconst rewards = await sdk.tokens.getRewardTokens();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-4","__idx":20},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L728"},"children":["pers-sdk.ts:728"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"businesses","__idx":21},"children":["businesses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["businesses"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/businessmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BusinessManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Business manager - High-level business operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-5","__idx":22},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/businessmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BusinessManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const businesses = await sdk.business.getActiveBusinesses();\nconst business = await sdk.business.getBusinessById(id);\nconst types = await sdk.business.getBusinessTypes();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-5","__idx":23},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L745"},"children":["pers-sdk.ts:745"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"campaigns","__idx":24},"children":["campaigns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["campaigns"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/campaignmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CampaignManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Campaign manager - High-level campaign operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-6","__idx":25},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/campaignmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CampaignManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const campaigns = await sdk.campaigns.getActiveCampaigns();\nawait sdk.campaigns.claimCampaign(claimData);\nconst claims = await sdk.campaigns.getUserClaims();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-6","__idx":26},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L762"},"children":["pers-sdk.ts:762"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"redemptions","__idx":27},"children":["redemptions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["redemptions"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/redemptionmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RedemptionManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Redemption manager - High-level redemption operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-7","__idx":28},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/redemptionmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RedemptionManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const redemptions = await sdk.redemptions.getActiveRedemptions();\nawait sdk.redemptions.redeem(redemptionId);\nconst history = await sdk.redemptions.getUserRedemptions();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-7","__idx":29},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L779"},"children":["pers-sdk.ts:779"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"transactions","__idx":30},"children":["transactions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["transactions"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/transactionmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Transaction manager - High-level transaction operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-8","__idx":31},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/transactionmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const transaction = await sdk.transactions.getTransactionById(id);\nawait sdk.transactions.createTransaction(txData);\nconst history = await sdk.transactions.getUserTransactionHistory('all');\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-8","__idx":32},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L796"},"children":["pers-sdk.ts:796"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"purchases","__idx":33},"children":["purchases"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["purchases"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/purchasemanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PurchaseManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Purchase manager - High-level purchase operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-9","__idx":34},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/purchasemanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PurchaseManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const intent = await sdk.purchases.createPaymentIntent(100, 'usd', 'email@example.com', 'Purchase');\nconst tokens = await sdk.purchases.getActivePurchaseTokens();\nconst purchases = await sdk.purchases.getAllUserPurchases();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-9","__idx":35},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L813"},"children":["pers-sdk.ts:813"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"files","__idx":36},"children":["files"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["files"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/filemanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FileManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["File manager - High-level file operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-10","__idx":37},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/filemanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FileManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const uploadUrl = await sdk.files.getSignedPutUrl('entity-123', 'token', 'jpg');\nconst accessUrl = await sdk.files.getSignedGetUrl('entity-123', 'token');\nconst optimizedUrl = await sdk.files.optimizeMedia(originalUrl, 800, 600);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-10","__idx":38},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L830"},"children":["pers-sdk.ts:830"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tenants","__idx":39},"children":["tenants"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["tenants"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/tenantmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TenantManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tenant manager - High-level tenant operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-11","__idx":40},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/tenantmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TenantManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const tenant = await sdk.tenant.getTenantInfo();\nconst config = await sdk.tenant.getClientConfig();\nconst admins = await sdk.tenant.getAdmins();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-11","__idx":41},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L847"},"children":["pers-sdk.ts:847"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"apikeys","__idx":42},"children":["apiKeys"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["apiKeys"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/apikeymanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API Key manager - High-level API key management operations (Admin Only)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provides methods for creating, listing, and revoking API keys for the tenant."," ","All operations require tenant admin authentication."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-12","__idx":43},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/apikeymanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ApiKeyManager instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Create a JWT token for frontend authentication\nconst jwtToken = await sdk.apiKeys.createJwtToken('Frontend App');\nconsole.log('Store this JWT securely:', jwtToken.key);\n\n// List all API keys\nconst apiKeys = await sdk.apiKeys.listApiKeys();\n\n// Revoke an old API key\nawait sdk.apiKeys.revokeApiKey('old-key-id');\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-12","__idx":44},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L875"},"children":["pers-sdk.ts:875"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"analytics","__idx":45},"children":["analytics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["analytics"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AnalyticsManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Analytics manager - High-level analytics operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-13","__idx":46},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/analyticsmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AnalyticsManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const analytics = await sdk.analytics.getTransactionAnalytics(request);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-13","__idx":47},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L890"},"children":["pers-sdk.ts:890"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"donations","__idx":48},"children":["donations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["donations"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/donationmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DonationManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Donation manager - High-level donation operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-14","__idx":49},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/donationmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DonationManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const types = await sdk.donations.getDonationTypes();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-14","__idx":50},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L905"},"children":["pers-sdk.ts:905"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"triggersources","__idx":51},"children":["triggerSources"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["triggerSources"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/triggersourcemanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TriggerSourceManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["TriggerSource manager - High-level trigger source operations (Admin Only)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provides CRUD operations for managing trigger sources (QR codes, NFC tags,"," ","GPS geofences, API webhooks). TriggerSources are standalone entities that"," ","can be assigned to campaigns via the campaigns manager."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-15","__idx":52},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/triggersourcemanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TriggerSourceManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["TriggerSourceManager instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Create a QR code trigger source\nconst qrSource = await sdk.triggerSources.create({\n  name: 'Store Entrance QR',\n  type: 'QR_CODE',\n  description: 'QR code at main entrance'\n});\n\n// Get all trigger sources\nconst sources = await sdk.triggerSources.getAll();\n\n// Update trigger source\nawait sdk.triggerSources.update(sourceId, { name: 'Updated Name' });\n\n// Assign to campaign (via campaigns manager)\nawait sdk.campaigns.assignTriggerSource(campaignId, qrSource.id);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-15","__idx":53},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L940"},"children":["pers-sdk.ts:940"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"webhooks","__idx":54},"children":["webhooks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["webhooks"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/webhookmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WebhookManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhook manager - High-level webhook operations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provides methods for creating webhooks, triggering them programmatically,"," ","and monitoring execution history. Supports async workflows with callbacks."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-16","__idx":55},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/webhookmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WebhookManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["WebhookManager instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Admin: Create a webhook\nconst webhook = await sdk.webhooks.create({\n  name: 'Order Processing',\n  targetUrl: 'https://n8n.example.com/webhook/orders',\n  method: 'POST'\n});\n\n// Trigger webhook with payload\nconst result = await sdk.webhooks.trigger(webhook.id, {\n  orderId: 'order-123',\n  action: 'created'\n});\n\n// Trigger and wait for async workflow completion\nconst asyncResult = await sdk.webhooks.triggerAndWait(\n  'ai-webhook',\n  { prompt: 'Analyze this data' },\n  30000  // Wait up to 30s\n);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["See"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/webhookmanager"},"children":["WebhookManager"]}," for detailed documentation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-16","__idx":56},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L980"},"children":["pers-sdk.ts:980"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"customfields","__idx":57},"children":["customFields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["customFields"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/customfielddefinitionmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustomFieldDefinitionManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Custom Field Definition Manager - Manage tenant-specific custom fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provides CRUD operations for custom field definitions that extend the built-in"," ","user profile fields. Custom fields are tenant-specific and support validation."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-17","__idx":58},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/customfielddefinitionmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustomFieldDefinitionManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CustomFieldDefinitionManager instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// List all custom fields\nconst fields = await sdk.customFields.getDefinitions();\n\n// Create a new field\nconst field = await sdk.customFields.createDefinition({\n  key: 'employee_id',\n  label: 'Employee ID',\n  fieldType: 'text',\n  validation: { required: true }\n});\n\n// Validate user data\nconst errors = sdk.customFields.validateUserData(formData, fields.data);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-17","__idx":59},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1013"},"children":["pers-sdk.ts:1013"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"bookings","__idx":60},"children":["bookings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["bookings"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/bookingmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BookingManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Booking manager - High-level booking operations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provides methods for managing user bookings (hotel stays, reservations, etc.)"," ","Used for eligibility checks on redemptions that require valid bookings."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-18","__idx":61},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/bookingmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BookingManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["BookingManager instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Get all bookings for a user\nconst bookings = await sdk.bookings.getByUser('user-123');\n\n// Filter by status\nconst activeBookings = await sdk.bookings.getAll({ status: 'active' });\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const booking = await sdk.bookings.create({\n  userId: 'user-123',\n  locationName: 'Grand Hotel',\n  checkInDate: '2026-06-01',\n  checkOutDate: '2026-06-05'\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const hasBooking = await sdk.bookings.hasValidBooking('user-123');\nif (hasBooking) {\n  // User is eligible for booking-required redemption\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-18","__idx":62},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1055"},"children":["pers-sdk.ts:1055"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"walletevents","__idx":63},"children":["walletEvents"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["walletEvents"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/walleteventsmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WalletEventsManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Wallet Events Manager - Real-time blockchain events for user's wallets"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Provides real-time WebSocket connection to receive blockchain events"," ","for the user's wallets (transfers, approvals, NFT mints, etc.)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Events are also routed through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sdk.events"]}," for unified event handling."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Important:"]}," Requires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["walletEventsWsUrl"]}," configuration and authentication."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-19","__idx":64},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/walleteventsmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WalletEventsManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["WalletEventsManager instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Configure SDK with events URL\nsdk.configureWalletEvents({ wsUrl: 'wss://events.pers.ninja' });\n\n// Connect after authentication\nawait sdk.auth.loginWithToken(jwt, 'user');\nawait sdk.walletEvents.connect();\n\n// Listen for token transfers\nsdk.walletEvents.on('Transfer', (event) => {\n  if (event.data.to === myWallet) {\n    showNotification(`Received ${event.data.value} tokens!`);\n  }\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Wallet events also flow through sdk.events\nsdk.events.subscribe((event) => {\n  if (event.domain === 'wallet') {\n    console.log('Wallet event:', event.type);\n  }\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["See"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/walleteventsmanager"},"children":["WalletEventsManager"]}," for detailed documentation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-19","__idx":65},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1103"},"children":["pers-sdk.ts:1103"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"notifications","__idx":66},"children":["notifications"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["notifications"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/notificationmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NotificationManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Notification Manager - Per-recipient notification inbox (Flow 1 — transactional/private)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Notifications are delivered through two independent channels — use both together:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["REST inbox"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getUnreadCount"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["markAsRead"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["delete"]},"): source of truth"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["WS Relay ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notification.pending"]}]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPending"]},"): real-time wake signal only"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Real-time delivery shares the same WebSocket connection as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sdk.walletEvents"]}," —"," ","calling ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connectRealtime()"]}," connects it (if needed) and binds the channelId."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-20","__idx":67},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/notificationmanager"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NotificationManager"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["NotificationManager instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"await sdk.notifications.connectRealtime();\n\nconst inbox = await sdk.notifications.list({ unreadOnly: true });\nconst { count } = await sdk.notifications.getUnreadCount();\n\nsdk.notifications.onPending(() => {\n  // Signal carries no content — re-fetch the inbox\n  sdk.notifications.list();\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["See"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/notificationmanager"},"children":["NotificationManager"]}," for detailed documentation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-20","__idx":68},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1148"},"children":["pers-sdk.ts:1148"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"constructors-1","__idx":69},"children":["Constructors"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"constructor","__idx":70},"children":["constructor"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new PersSDK"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["httpClient"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["config"]},"): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PersSDK"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Creates a new PERS SDK instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initializes all domain managers and sets up the API client with the provided"," ","HTTP client adapter and configuration."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters","__idx":71},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["httpClient"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/httpclient"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HttpClient"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Platform-specific HTTP client implementation"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["config"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/persconfig"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PersConfig"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["SDK configuration options"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-21","__idx":72},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/perssdk"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PersSDK"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import { BrowserFetchClientAdapter } from '@explorins/pers-sdk/platform-adapters';\n\nconst sdk = new PersSDK(new BrowserFetchClientAdapter(), {\n  environment: 'production',\n  apiProjectKey: 'your-project-key'\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import { NodeHttpClientAdapter } from '@explorins/pers-sdk/platform-adapters';\n\nconst sdk = new PersSDK(new NodeHttpClientAdapter(), {\n  environment: 'production',\n  apiProjectKey: 'your-project-key',\n  baseUrl: 'https://api.yourpers.com'\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import { AngularHttpClientAdapter } from '@explorins/pers-sdk/platform-adapters';\n\nconstructor(private http: HttpClient) {\n  this.sdk = new PersSDK(new AngularHttpClientAdapter(this.http), {\n    environment: 'production',\n    apiProjectKey: 'your-project-key'\n  });\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-21","__idx":73},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L324"},"children":["pers-sdk.ts:324"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"methods-1","__idx":74},"children":["Methods"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"connectwalletevents","__idx":75},"children":["connectWalletEvents"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["connectWalletEvents"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Connect to wallet events and auto-subscribe based on auth type"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Connects to the WebSocket relay and automatically subscribes to relevant"," ","blockchain events based on the current authentication type:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["USER"]},": Subscribes to all user's wallets"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["BUSINESS"]},": Subscribes to all business's wallets"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TENANT"]},": Subscribes to all chains where tokens are deployed"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This method is called automatically on login when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["captureWalletEvents"]}," is enabled."," ","Call manually if you need to reconnect or refresh subscriptions."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-22","__idx":76},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"await sdk.connectWalletEvents();\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-22","__idx":77},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L439"},"children":["pers-sdk.ts:439"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"restoresession","__idx":78},"children":["restoreSession"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["restoreSession"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," | ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Restore user session from stored tokens"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," This method is called automatically on SDK initialization when"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["autoRestoreSession"]}," is enabled (default: true). You only need to call this"," ","manually if you disabled auto-restore or need to force a session refresh."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Validates stored tokens and fetches user data to restore the session."," ","Emits ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session_restored"]}," event on success, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session_restoration_failed"]}," on error."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Important:"]}," Only works for USER and BUSINESS accounts. Admin/tenant"," ","accounts don't support user data fetching, so this will return null for them"," ","(though their tokens remain valid for API calls)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-23","__idx":79},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," | ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UserDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Promise resolving to User data if session restored, null if no session or admin account"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Throws"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If token validation or user fetch fails"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Manual restore (only needed if autoRestoreSession: false)\nconst user = await sdk.restoreSession();\nif (user) {\n  console.log('Welcome back,', user.name);\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-23","__idx":80},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L500"},"children":["pers-sdk.ts:500"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configurewalletevents","__idx":81},"children":["configureWalletEvents"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["configureWalletEvents"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["config"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure wallet events (call before accessing walletEvents)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-1","__idx":82},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["config"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/interfaces/walleteventsconfig"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WalletEventsConfig"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Events configuration including wsUrl"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-24","__idx":83},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-24","__idx":84},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1115"},"children":["pers-sdk.ts:1115"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"setdatasource","__idx":85},"children":["setDataSource"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setDataSource"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dataSource"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set data source tracking for analytics attribution"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this to track where users and actions originate from."," ","Web apps typically only need medium/campaign/source (channel is auto-detected)."," ","Native apps must set channel: 'mobile'."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-2","__idx":86},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dataSource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DataSource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Data source configuration"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-25","__idx":87},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"sdk.setDataSource({\n  medium: 'email',\n  campaign: 'summer_2026',\n  source: 'mailchimp',\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"sdk.setDataSource({\n  channel: 'mobile',\n  medium: 'push',\n  campaign: 'retention_30d',\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-25","__idx":88},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1186"},"children":["pers-sdk.ts:1186"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"updatedatasource","__idx":89},"children":["updateDataSource"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["updateDataSource"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dataSource"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Update data source (merges with existing values)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-3","__idx":90},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dataSource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Partial"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DataSource"]},">"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Partial data source to merge"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-26","__idx":91},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"sdk.updateDataSource({ campaign: 'new_campaign' });\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-26","__idx":92},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1200"},"children":["pers-sdk.ts:1200"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"setplatform","__idx":93},"children":["setPlatform"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setPlatform"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["platform"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set platform info for device analytics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Native apps should call this on initialization with device info."," ","Web apps can optionally send browser/OS info."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-4","__idx":94},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["platform"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Platform"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Platform information"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-27","__idx":95},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"sdk.setPlatform({\n  os: 'iOS',\n  osVersion: '17.4',\n  app: 'MyApp',\n  appVersion: '2.3.1',\n  deviceType: 'phone',\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-27","__idx":96},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1223"},"children":["pers-sdk.ts:1223"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"api","__idx":97},"children":["api"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["api"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/persapiclient"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PersApiClient"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Gets the API client for direct PERS API requests"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this for advanced operations not covered by the managers."," ","The returned client handles authentication, token refresh, and error handling automatically."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-28","__idx":98},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/persapiclient"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PersApiClient"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configured PersApiClient instance"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const apiClient = sdk.api();\nconst customData = await apiClient.get<CustomType>('/custom-endpoint');\nawait apiClient.post('/custom-endpoint', customData);\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-28","__idx":99},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1242"},"children":["pers-sdk.ts:1242"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"isproduction","__idx":100},"children":["isProduction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["isProduction"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Checks if SDK is configured for production environment"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-29","__idx":101},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["True if environment is 'production', false otherwise"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-29","__idx":102},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1251"},"children":["pers-sdk.ts:1251"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"isinitialized","__idx":103},"children":["isInitialized"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["isInitialized"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Checks if SDK has an authentication provider configured"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note: This only checks if an auth provider exists, not if tokens are valid."," ","For token validity checking, use auth.hasValidAuth() (async) or auth.isAuthenticated() (async)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-30","__idx":104},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["True if authentication provider is configured, false otherwise"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-30","__idx":105},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/pers-sdk.ts#L1263"},"children":["pers-sdk.ts:1263"]}]}]},"headings":[{"value":"Class: PersSDK","id":"class-perssdk","depth":1},{"value":"Table of contents","id":"table-of-contents","depth":2},{"value":"Accessors","id":"accessors","depth":3},{"value":"Constructors","id":"constructors","depth":3},{"value":"Methods","id":"methods","depth":3},{"value":"Accessors","id":"accessors-1","depth":2},{"value":"events","id":"events","depth":3},{"value":"Returns","id":"returns","depth":4},{"value":"Defined in","id":"defined-in","depth":4},{"value":"auth","id":"auth","depth":3},{"value":"Returns","id":"returns-1","depth":4},{"value":"Defined in","id":"defined-in-1","depth":4},{"value":"users","id":"users","depth":3},{"value":"Returns","id":"returns-2","depth":4},{"value":"Defined in","id":"defined-in-2","depth":4},{"value":"userStatus","id":"userstatus","depth":3},{"value":"Returns","id":"returns-3","depth":4},{"value":"Defined in","id":"defined-in-3","depth":4},{"value":"tokens","id":"tokens","depth":3},{"value":"Returns","id":"returns-4","depth":4},{"value":"Defined in","id":"defined-in-4","depth":4},{"value":"businesses","id":"businesses","depth":3},{"value":"Returns","id":"returns-5","depth":4},{"value":"Defined in","id":"defined-in-5","depth":4},{"value":"campaigns","id":"campaigns","depth":3},{"value":"Returns","id":"returns-6","depth":4},{"value":"Defined in","id":"defined-in-6","depth":4},{"value":"redemptions","id":"redemptions","depth":3},{"value":"Returns","id":"returns-7","depth":4},{"value":"Defined in","id":"defined-in-7","depth":4},{"value":"transactions","id":"transactions","depth":3},{"value":"Returns","id":"returns-8","depth":4},{"value":"Defined in","id":"defined-in-8","depth":4},{"value":"purchases","id":"purchases","depth":3},{"value":"Returns","id":"returns-9","depth":4},{"value":"Defined in","id":"defined-in-9","depth":4},{"value":"files","id":"files","depth":3},{"value":"Returns","id":"returns-10","depth":4},{"value":"Defined in","id":"defined-in-10","depth":4},{"value":"tenants","id":"tenants","depth":3},{"value":"Returns","id":"returns-11","depth":4},{"value":"Defined in","id":"defined-in-11","depth":4},{"value":"apiKeys","id":"apikeys","depth":3},{"value":"Returns","id":"returns-12","depth":4},{"value":"Defined in","id":"defined-in-12","depth":4},{"value":"analytics","id":"analytics","depth":3},{"value":"Returns","id":"returns-13","depth":4},{"value":"Defined in","id":"defined-in-13","depth":4},{"value":"donations","id":"donations","depth":3},{"value":"Returns","id":"returns-14","depth":4},{"value":"Defined in","id":"defined-in-14","depth":4},{"value":"triggerSources","id":"triggersources","depth":3},{"value":"Returns","id":"returns-15","depth":4},{"value":"Defined in","id":"defined-in-15","depth":4},{"value":"webhooks","id":"webhooks","depth":3},{"value":"Returns","id":"returns-16","depth":4},{"value":"Defined in","id":"defined-in-16","depth":4},{"value":"customFields","id":"customfields","depth":3},{"value":"Returns","id":"returns-17","depth":4},{"value":"Defined in","id":"defined-in-17","depth":4},{"value":"bookings","id":"bookings","depth":3},{"value":"Returns","id":"returns-18","depth":4},{"value":"Defined in","id":"defined-in-18","depth":4},{"value":"walletEvents","id":"walletevents","depth":3},{"value":"Returns","id":"returns-19","depth":4},{"value":"Defined in","id":"defined-in-19","depth":4},{"value":"notifications","id":"notifications","depth":3},{"value":"Returns","id":"returns-20","depth":4},{"value":"Defined in","id":"defined-in-20","depth":4},{"value":"Constructors","id":"constructors-1","depth":2},{"value":"constructor","id":"constructor","depth":3},{"value":"Parameters","id":"parameters","depth":4},{"value":"Returns","id":"returns-21","depth":4},{"value":"Defined in","id":"defined-in-21","depth":4},{"value":"Methods","id":"methods-1","depth":2},{"value":"connectWalletEvents","id":"connectwalletevents","depth":3},{"value":"Returns","id":"returns-22","depth":4},{"value":"Defined in","id":"defined-in-22","depth":4},{"value":"restoreSession","id":"restoresession","depth":3},{"value":"Returns","id":"returns-23","depth":4},{"value":"Defined in","id":"defined-in-23","depth":4},{"value":"configureWalletEvents","id":"configurewalletevents","depth":3},{"value":"Parameters","id":"parameters-1","depth":4},{"value":"Returns","id":"returns-24","depth":4},{"value":"Defined in","id":"defined-in-24","depth":4},{"value":"setDataSource","id":"setdatasource","depth":3},{"value":"Parameters","id":"parameters-2","depth":4},{"value":"Returns","id":"returns-25","depth":4},{"value":"Defined in","id":"defined-in-25","depth":4},{"value":"updateDataSource","id":"updatedatasource","depth":3},{"value":"Parameters","id":"parameters-3","depth":4},{"value":"Returns","id":"returns-26","depth":4},{"value":"Defined in","id":"defined-in-26","depth":4},{"value":"setPlatform","id":"setplatform","depth":3},{"value":"Parameters","id":"parameters-4","depth":4},{"value":"Returns","id":"returns-27","depth":4},{"value":"Defined in","id":"defined-in-27","depth":4},{"value":"api","id":"api","depth":3},{"value":"Returns","id":"returns-28","depth":4},{"value":"Defined in","id":"defined-in-28","depth":4},{"value":"isProduction","id":"isproduction","depth":3},{"value":"Returns","id":"returns-29","depth":4},{"value":"Defined in","id":"defined-in-29","depth":4},{"value":"isInitialized","id":"isinitialized","depth":3},{"value":"Returns","id":"returns-30","depth":4},{"value":"Defined in","id":"defined-in-30","depth":4}],"frontmatter":{"seo":{"title":"Class: PersSDK"}},"lastModified":"2026-08-21T18:40:55.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-reference/classes/perssdk","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}