@@ -67,10 +67,12 @@ declare module "@juspay-tech/hyper-js" {
6767 [ key : string ] : any ;
6868 }
6969
70- export interface HyperObject {
71- publishableKey ?: string ;
72- [ key : string ] : any ;
73- }
70+ export type HyperObject =
71+ | string
72+ | {
73+ publishableKey : string ;
74+ profileId : string ;
75+ } ;
7476
7577 export interface AnalyticsData {
7678 sessionID : string ;
@@ -80,7 +82,7 @@ declare module "@juspay-tech/hyper-js" {
8082 /**
8183 * Initializes the Hyper SDK with the given publishable key and options.
8284 *
83- * @param hyperObject - Either a string publishable key or an object containing publishableKey
85+ * @param hyperObject - Either a string publishable key or an object containing publishableKey and profileId
8486 * @param options - Configuration options including customBackendUrl and env settings
8587 * @returns A Promise that resolves to a HyperInstance object
8688 *
@@ -93,14 +95,15 @@ declare module "@juspay-tech/hyper-js" {
9395 *
9496 * // Using object with publishable key
9597 * const hyperPromise = loadHyper({
96- * publishableKey: "YOUR_PUBLISHABLE_KEY"
98+ * publishableKey: "YOUR_PUBLISHABLE_KEY",
99+ * profileId: "YOUR_PROFILE_ID"
97100 * }, {
98101 * customBackendUrl: "YOUR_BACKEND_URL",
99102 * env: "PROD"
100103 * });
101104 */
102105 export function loadHyper (
103- hyperObject : string | HyperObject ,
106+ hyperObject : HyperObject ,
104107 options ?: LoadOptions
105108 ) : Promise < HyperInstance > ;
106109
0 commit comments