@cloudscaile-eng/web-ext-utils 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -7
- package/dist/cs-ext-utils.untrimmed.d.ts +114 -6
- package/dist/index.d.ts +114 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +67 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,10 @@ const hostAPI = initializeHost({
|
|
|
42
42
|
updateCookieConsent: updateCookieConsentFunction,
|
|
43
43
|
resetCookieConsent: resetCookieConsentFunction,
|
|
44
44
|
trackGA4Event: trackGA4EventFunction,
|
|
45
|
-
|
|
45
|
+
trackGTMEvent: trackGTMEventFunction,
|
|
46
|
+
getOAuthProviders: getOAuthProvidersFunction,
|
|
47
|
+
triggerSendOTP: triggerSendOtpFunction,
|
|
48
|
+
triggerSignUp: triggerSignUpFunction
|
|
46
49
|
});
|
|
47
50
|
```
|
|
48
51
|
|
|
@@ -69,7 +72,11 @@ import {
|
|
|
69
72
|
updateCookieConsent,
|
|
70
73
|
resetCookieConsent,
|
|
71
74
|
trackGA4Event,
|
|
72
|
-
|
|
75
|
+
trackGTMEvent,
|
|
76
|
+
getOAuthProviders,
|
|
77
|
+
triggerSendOTP,
|
|
78
|
+
triggerSignUp,
|
|
79
|
+
OTP_INTENT
|
|
73
80
|
} from '@cloudscaile-eng/web-ext-utils';
|
|
74
81
|
|
|
75
82
|
// Create extension object
|
|
@@ -116,18 +123,38 @@ if (result?.success) {
|
|
|
116
123
|
// Trigger logout with redirect
|
|
117
124
|
await triggerLogout(extension, { redirect: '/home/login' });
|
|
118
125
|
|
|
119
|
-
// Cookie consent
|
|
126
|
+
// Cookie consent (defaults to targeting all providers: ['ga4', 'gtm'])
|
|
120
127
|
const consent = getCookieConsent(extension); // { status: 'pending', timestamp: null }
|
|
121
128
|
updateCookieConsent(extension, 'accepted');
|
|
122
129
|
resetCookieConsent(extension);
|
|
123
130
|
|
|
131
|
+
// Cookie consent targeting a specific analytics provider
|
|
132
|
+
updateCookieConsent(extension, 'accepted', ['gtm']);
|
|
133
|
+
resetCookieConsent(extension, ['ga4']);
|
|
134
|
+
|
|
124
135
|
// Track GA4 events (no-ops if consent not given)
|
|
125
136
|
trackGA4Event(extension, 'login', { method: 'email' });
|
|
126
137
|
trackGA4Event(extension, 'purchase', { item: 'cart', value: 49 });
|
|
127
138
|
|
|
139
|
+
// Track GTM events (no-ops if consent not given)
|
|
140
|
+
trackGTMEvent(extension, 'login', { method: 'email' });
|
|
141
|
+
trackGTMEvent(extension, 'purchase', { item: 'cart', value: 49 });
|
|
142
|
+
|
|
128
143
|
// Get configured OAuth / SSO providers (sorted by order in the host)
|
|
129
144
|
const providers = getOAuthProviders(extension);
|
|
130
145
|
// providers → [{ value: 'google', name: 'Google', displayName: 'Continue with Google', icon: '/icons/google.svg', order: 1 }, ...]
|
|
146
|
+
|
|
147
|
+
// Send an OTP (tenant is injected by the host; extensions never pass or see it)
|
|
148
|
+
const otpResult = await triggerSendOTP(extension, { email: 'user@example.com', intent: OTP_INTENT.REGISTER });
|
|
149
|
+
|
|
150
|
+
// Sign up a new user with a verified OTP. On success, the host logs the user in immediately.
|
|
151
|
+
const signUpResult = await triggerSignUp(extension, {
|
|
152
|
+
email: 'user@example.com',
|
|
153
|
+
password: 'secret',
|
|
154
|
+
firstName: 'Jane',
|
|
155
|
+
lastName: 'Doe',
|
|
156
|
+
otp: '123456'
|
|
157
|
+
});
|
|
131
158
|
```
|
|
132
159
|
|
|
133
160
|
## API Reference
|
|
@@ -150,10 +177,13 @@ Initializes shared resources in the host application.
|
|
|
150
177
|
- `config.triggerLogin`: Function to trigger login in the host.
|
|
151
178
|
- `config.triggerLogout`: Function to trigger logout in the host.
|
|
152
179
|
- `config.getCookieConsent`: Function to retrieve the current cookie consent state.
|
|
153
|
-
- `config.updateCookieConsent`: Function to dispatch consent actions and initialize analytics on acceptance.
|
|
154
|
-
- `config.resetCookieConsent`: Function to reset consent state and stop analytics events.
|
|
180
|
+
- `config.updateCookieConsent`: Function to dispatch consent actions and initialize analytics on acceptance. Accepts an optional `providers` array (`('ga4' | 'gtm')[]`) to target specific analytics providers; defaults to both.
|
|
181
|
+
- `config.resetCookieConsent`: Function to reset consent state and stop analytics events. Accepts an optional `providers` array (`('ga4' | 'gtm')[]`) to target specific analytics providers; defaults to both.
|
|
155
182
|
- `config.trackGA4Event`: Function to track a GA4 event.
|
|
183
|
+
- `config.trackGTMEvent`: Function to track a GTM event.
|
|
156
184
|
- `config.getOAuthProviders`: Function to get the list of available OAuth providers.
|
|
185
|
+
- `config.triggerSendOTP`: Function to send an OTP to an email for a given intent.
|
|
186
|
+
- `config.triggerSignUp`: Function to register a new user; logs them in on success.
|
|
157
187
|
|
|
158
188
|
#### Returns
|
|
159
189
|
|
|
@@ -317,7 +347,7 @@ Returns the current cookie consent state from the host Redux store.
|
|
|
317
347
|
|
|
318
348
|
An object with `status` (`'accepted' | 'declined' | 'pending'`) and `timestamp` (`string | null`).
|
|
319
349
|
|
|
320
|
-
#### `updateCookieConsent(extension, status)`
|
|
350
|
+
#### `updateCookieConsent(extension, status, providers?)`
|
|
321
351
|
|
|
322
352
|
Updates cookie consent by dispatching `acceptConsent` or `declineConsent`. When status is `'accepted'`, also calls `initializeAnalytics` with the tenant's `measurementId`.
|
|
323
353
|
|
|
@@ -325,14 +355,16 @@ Updates cookie consent by dispatching `acceptConsent` or `declineConsent`. When
|
|
|
325
355
|
|
|
326
356
|
- `extension`: Extension object from `getExtension()`.
|
|
327
357
|
- `status`: The consent status to set — `'accepted'` or `'declined'`.
|
|
358
|
+
- `providers`: Optional array of analytics providers to target (`('ga4' | 'gtm')[]`). Defaults to both.
|
|
328
359
|
|
|
329
|
-
#### `resetCookieConsent(extension)`
|
|
360
|
+
#### `resetCookieConsent(extension, providers?)`
|
|
330
361
|
|
|
331
362
|
Resets the cookie consent state and stops further analytics events by calling `resetAnalytics()`.
|
|
332
363
|
|
|
333
364
|
**Parameters:**
|
|
334
365
|
|
|
335
366
|
- `extension`: Extension object from `getExtension()`.
|
|
367
|
+
- `providers`: Optional array of analytics providers to target (`('ga4' | 'gtm')[]`). Defaults to both.
|
|
336
368
|
|
|
337
369
|
#### `trackGA4Event(extension, eventName, params?)`
|
|
338
370
|
|
|
@@ -344,6 +376,16 @@ Tracks a GA4 event. Silently no-ops if analytics has not been initialized (i.e.
|
|
|
344
376
|
- `eventName`: The GA4 event name (e.g. `'login'`, `'purchase'`).
|
|
345
377
|
- `params`: Optional object of event parameters (e.g. `{ method: 'email' }`).
|
|
346
378
|
|
|
379
|
+
#### `trackGTMEvent(extension, eventName, params?)`
|
|
380
|
+
|
|
381
|
+
Tracks a GTM event by pushing to the dataLayer. Silently no-ops if GTM has not been initialized (i.e. consent not yet given).
|
|
382
|
+
|
|
383
|
+
**Parameters:**
|
|
384
|
+
|
|
385
|
+
- `extension`: Extension object from `getExtension()`.
|
|
386
|
+
- `eventName`: The event name pushed to the GTM dataLayer (e.g. `'login'`, `'purchase'`).
|
|
387
|
+
- `params`: Optional object of event parameters (e.g. `{ method: 'email' }`).
|
|
388
|
+
|
|
347
389
|
#### `getOAuthProviders(extension)`
|
|
348
390
|
|
|
349
391
|
Returns the list of OAuth / SSO login providers configured by the host application.
|
|
@@ -364,6 +406,37 @@ An array of `OAuthProvider` objects:
|
|
|
364
406
|
| `icon` | `string` | URL or path to the provider's icon image |
|
|
365
407
|
| `order` | `number` | Sort order relative to other providers |
|
|
366
408
|
|
|
409
|
+
#### `triggerSendOTP(extension, params)`
|
|
410
|
+
|
|
411
|
+
Sends an OTP to the given email for the given intent. The host injects the tenant identifier automatically; extensions never pass or receive it.
|
|
412
|
+
|
|
413
|
+
**Parameters:**
|
|
414
|
+
|
|
415
|
+
- `extension`: Extension object from `getExtension()`.
|
|
416
|
+
- `params.email`: The email address to send the OTP to.
|
|
417
|
+
- `params.intent`: One of the `OTP_INTENT` values — `'RESET_PASSWORD'`, `'REGISTER'`, or `'EMAIL_VERIFICATION'`.
|
|
418
|
+
|
|
419
|
+
**Returns:**
|
|
420
|
+
|
|
421
|
+
`Promise<{ success: boolean; data?: unknown; error?: unknown }>`
|
|
422
|
+
|
|
423
|
+
#### `triggerSignUp(extension, params)`
|
|
424
|
+
|
|
425
|
+
Registers a new user with the host application. The host injects the tenant identifier automatically. On success, the host logs the user in immediately, the same effect as a successful `triggerLogin`.
|
|
426
|
+
|
|
427
|
+
**Parameters:**
|
|
428
|
+
|
|
429
|
+
- `extension`: Extension object from `getExtension()`.
|
|
430
|
+
- `params.email`: The new user's email.
|
|
431
|
+
- `params.password`: The new user's password.
|
|
432
|
+
- `params.firstName`: The new user's first name.
|
|
433
|
+
- `params.lastName`: The new user's last name.
|
|
434
|
+
- `params.otp`: The OTP previously verified via `triggerSendOTP`.
|
|
435
|
+
|
|
436
|
+
**Returns:**
|
|
437
|
+
|
|
438
|
+
`Promise<{ success: boolean; data?: unknown; error?: unknown }>`
|
|
439
|
+
|
|
367
440
|
## Error Handling
|
|
368
441
|
|
|
369
442
|
- If the host has not initialized resources, individual resource functions will throw an error.
|
|
@@ -11,6 +11,12 @@ import { ThunkDispatch } from '@reduxjs/toolkit';
|
|
|
11
11
|
import { Tuple } from '@reduxjs/toolkit';
|
|
12
12
|
import { UnknownAction } from '@reduxjs/toolkit';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Supported analytics providers for cookie consent targeting
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export declare type AnalyticsProvider = 'ga4' | 'gtm';
|
|
19
|
+
|
|
14
20
|
export { AxiosError }
|
|
15
21
|
|
|
16
22
|
export { AxiosInstance }
|
|
@@ -172,7 +178,10 @@ export declare interface HostConfig {
|
|
|
172
178
|
updateCookieConsent: SharedResources['updateCookieConsent'];
|
|
173
179
|
resetCookieConsent: SharedResources['resetCookieConsent'];
|
|
174
180
|
trackGA4Event: SharedResources['trackGA4Event'];
|
|
181
|
+
trackGTMEvent: SharedResources['trackGTMEvent'];
|
|
175
182
|
getOAuthProviders: SharedResources['getOAuthProviders'];
|
|
183
|
+
triggerSendOTP: SharedResources['triggerSendOTP'];
|
|
184
|
+
triggerSignUp: SharedResources['triggerSignUp'];
|
|
176
185
|
}
|
|
177
186
|
|
|
178
187
|
/**
|
|
@@ -190,10 +199,16 @@ export declare interface HostConfig {
|
|
|
190
199
|
* - triggerLogin: Function to trigger login in the host
|
|
191
200
|
* - triggerLogout: Function to trigger logout in the host
|
|
192
201
|
* - getCookieConsent: Function to retrieve the current cookie consent state
|
|
193
|
-
* - updateCookieConsent: Function to dispatch consent actions and initialize analytics on
|
|
194
|
-
*
|
|
202
|
+
* - updateCookieConsent: Function to dispatch consent actions and initialize analytics on
|
|
203
|
+
* acceptance; accepts an optional `providers` array to target specific analytics
|
|
204
|
+
* providers (defaults to all)
|
|
205
|
+
* - resetCookieConsent: Function to reset consent state and stop analytics events; accepts
|
|
206
|
+
* an optional `providers` array to target specific analytics providers (defaults to all)
|
|
195
207
|
* - trackGA4Event: Function to track a GA4 event
|
|
208
|
+
* - trackGTMEvent: Function to track a GTM event
|
|
196
209
|
* - getOAuthProviders: Function to get the list of available OAuth providers
|
|
210
|
+
* - triggerSendOTP: Function to send an OTP to an email for a given intent
|
|
211
|
+
* - triggerSignUp: Function to register a new user and log them in on success
|
|
197
212
|
* @throws Will throw an error if any required configuration is missing
|
|
198
213
|
* @returns Object with method to access shared resources
|
|
199
214
|
* @public
|
|
@@ -231,6 +246,22 @@ export declare type OAuthProvider = {
|
|
|
231
246
|
order: number;
|
|
232
247
|
};
|
|
233
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Supported intents for sending a one-time password
|
|
251
|
+
* @public
|
|
252
|
+
*/
|
|
253
|
+
export declare const OTP_INTENT: {
|
|
254
|
+
readonly RESET_PASSWORD: "RESET_PASSWORD";
|
|
255
|
+
readonly REGISTER: "REGISTER";
|
|
256
|
+
readonly EMAIL_VERIFICATION: "EMAIL_VERIFICATION";
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Intent value describing why an OTP is being sent
|
|
261
|
+
* @public
|
|
262
|
+
*/
|
|
263
|
+
export declare type OtpIntent = (typeof OTP_INTENT)[keyof typeof OTP_INTENT];
|
|
264
|
+
|
|
234
265
|
/**
|
|
235
266
|
* Configuration for registering translations
|
|
236
267
|
* @public
|
|
@@ -252,9 +283,10 @@ export declare function registerTranslation(extension: Extension, params: Regist
|
|
|
252
283
|
/**
|
|
253
284
|
* Resets the cookie consent state and stops further analytics events for the given extension.
|
|
254
285
|
* @param extension - The extension object.
|
|
286
|
+
* @param providers - Optional list of analytics providers to target (defaults to all).
|
|
255
287
|
* @public
|
|
256
288
|
*/
|
|
257
|
-
export declare function resetCookieConsent(extension: Extension): void;
|
|
289
|
+
export declare function resetCookieConsent(extension: Extension, providers?: AnalyticsProvider[]): void;
|
|
258
290
|
|
|
259
291
|
/**
|
|
260
292
|
* Shared resources interface representing data shared between host and micro-frontends
|
|
@@ -296,10 +328,13 @@ export declare interface SharedResources {
|
|
|
296
328
|
theme: Theme;
|
|
297
329
|
initialized: boolean;
|
|
298
330
|
getCookieConsent: () => CookieConsent;
|
|
299
|
-
updateCookieConsent: (status: CookieConsentStatus) => void;
|
|
300
|
-
resetCookieConsent: () => void;
|
|
331
|
+
updateCookieConsent: (status: CookieConsentStatus, providers?: AnalyticsProvider[]) => void;
|
|
332
|
+
resetCookieConsent: (providers?: AnalyticsProvider[]) => void;
|
|
301
333
|
trackGA4Event: (eventName: string, params?: Record<string, unknown>) => void;
|
|
334
|
+
trackGTMEvent: (eventName: string, params?: Record<string, unknown>) => void;
|
|
302
335
|
getOAuthProviders: () => OAuthProvider[];
|
|
336
|
+
triggerSendOTP: (params: TriggerSendOtpParams) => Promise<TriggerSendOtpResult>;
|
|
337
|
+
triggerSignUp: (params: TriggerSignUpParams) => Promise<TriggerSignUpResult>;
|
|
303
338
|
}
|
|
304
339
|
|
|
305
340
|
export { StoreEnhancer }
|
|
@@ -335,6 +370,16 @@ export declare type ToastType = 'success' | 'error' | 'info' | 'warn';
|
|
|
335
370
|
*/
|
|
336
371
|
export declare function trackGA4Event(extension: Extension, eventName: string, params?: Record<string, unknown>): void;
|
|
337
372
|
|
|
373
|
+
/**
|
|
374
|
+
* Tracks a GTM event for the given extension.
|
|
375
|
+
* Silently no-ops if GTM has not been initialized (consent not given).
|
|
376
|
+
* @param extension - The extension object.
|
|
377
|
+
* @param eventName - The event name pushed to the GTM dataLayer.
|
|
378
|
+
* @param params - Optional event parameters.
|
|
379
|
+
* @public
|
|
380
|
+
*/
|
|
381
|
+
export declare function trackGTMEvent(extension: Extension, eventName: string, params?: Record<string, unknown>): void;
|
|
382
|
+
|
|
338
383
|
/**
|
|
339
384
|
* Triggers the login process in the host application for the given extension.
|
|
340
385
|
*
|
|
@@ -394,6 +439,68 @@ export declare type TriggerLogoutConfig = {
|
|
|
394
439
|
redirect?: string;
|
|
395
440
|
};
|
|
396
441
|
|
|
442
|
+
/**
|
|
443
|
+
* Triggers the host to send a one-time password to the given email for the given intent.
|
|
444
|
+
* The host injects the tenant identifier automatically.
|
|
445
|
+
* @param extension - The extension object.
|
|
446
|
+
* @param params - `email` and `intent` (see `OTP_INTENT`).
|
|
447
|
+
* @returns A promise resolving to `{ success, data }` or `{ success, error }`.
|
|
448
|
+
* @public
|
|
449
|
+
*/
|
|
450
|
+
export declare function triggerSendOTP(extension: Extension, params: TriggerSendOtpParams): Promise<TriggerSendOtpResult>;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Parameters for triggering an OTP send
|
|
454
|
+
* @public
|
|
455
|
+
*/
|
|
456
|
+
export declare type TriggerSendOtpParams = {
|
|
457
|
+
email: string;
|
|
458
|
+
intent: OtpIntent;
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Result returned by triggerSendOTP
|
|
463
|
+
* @public
|
|
464
|
+
*/
|
|
465
|
+
export declare type TriggerSendOtpResult = {
|
|
466
|
+
success: boolean;
|
|
467
|
+
data?: unknown;
|
|
468
|
+
error?: unknown;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Triggers the host to register a new user. On success, the host logs the user in
|
|
473
|
+
* immediately, equivalent to a successful triggerLogin. The host injects the tenant
|
|
474
|
+
* identifier automatically.
|
|
475
|
+
* @param extension - The extension object.
|
|
476
|
+
* @param params - `email`, `password`, `firstName`, `lastName`, and the verified `otp`.
|
|
477
|
+
* @returns A promise resolving to `{ success, data }` or `{ success, error }`.
|
|
478
|
+
* @public
|
|
479
|
+
*/
|
|
480
|
+
export declare function triggerSignUp(extension: Extension, params: TriggerSignUpParams): Promise<TriggerSignUpResult>;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Parameters for triggering sign up
|
|
484
|
+
* @public
|
|
485
|
+
*/
|
|
486
|
+
export declare type TriggerSignUpParams = {
|
|
487
|
+
email: string;
|
|
488
|
+
password: string;
|
|
489
|
+
firstName: string;
|
|
490
|
+
lastName: string;
|
|
491
|
+
otp: string;
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Result returned by triggerSignUp
|
|
496
|
+
* @public
|
|
497
|
+
*/
|
|
498
|
+
export declare type TriggerSignUpResult = {
|
|
499
|
+
success: boolean;
|
|
500
|
+
data?: unknown;
|
|
501
|
+
error?: unknown;
|
|
502
|
+
};
|
|
503
|
+
|
|
397
504
|
export { Tuple }
|
|
398
505
|
|
|
399
506
|
export { UnknownAction }
|
|
@@ -404,9 +511,10 @@ export { UnknownAction }
|
|
|
404
511
|
* using the tenant's measurementId.
|
|
405
512
|
* @param extension - The extension object.
|
|
406
513
|
* @param status - The consent status to set ('accepted' or 'declined').
|
|
514
|
+
* @param providers - Optional list of analytics providers to target (defaults to all).
|
|
407
515
|
* @public
|
|
408
516
|
*/
|
|
409
|
-
export declare function updateCookieConsent(extension: Extension, status: CookieConsentStatus): void;
|
|
517
|
+
export declare function updateCookieConsent(extension: Extension, status: CookieConsentStatus, providers?: AnalyticsProvider[]): void;
|
|
410
518
|
|
|
411
519
|
/**
|
|
412
520
|
* User information object
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,12 @@ import { ThunkDispatch } from '@reduxjs/toolkit';
|
|
|
11
11
|
import { Tuple } from '@reduxjs/toolkit';
|
|
12
12
|
import { UnknownAction } from '@reduxjs/toolkit';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Supported analytics providers for cookie consent targeting
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export declare type AnalyticsProvider = 'ga4' | 'gtm';
|
|
19
|
+
|
|
14
20
|
export { AxiosError }
|
|
15
21
|
|
|
16
22
|
export { AxiosInstance }
|
|
@@ -172,7 +178,10 @@ export declare interface HostConfig {
|
|
|
172
178
|
updateCookieConsent: SharedResources['updateCookieConsent'];
|
|
173
179
|
resetCookieConsent: SharedResources['resetCookieConsent'];
|
|
174
180
|
trackGA4Event: SharedResources['trackGA4Event'];
|
|
181
|
+
trackGTMEvent: SharedResources['trackGTMEvent'];
|
|
175
182
|
getOAuthProviders: SharedResources['getOAuthProviders'];
|
|
183
|
+
triggerSendOTP: SharedResources['triggerSendOTP'];
|
|
184
|
+
triggerSignUp: SharedResources['triggerSignUp'];
|
|
176
185
|
}
|
|
177
186
|
|
|
178
187
|
/**
|
|
@@ -190,10 +199,16 @@ export declare interface HostConfig {
|
|
|
190
199
|
* - triggerLogin: Function to trigger login in the host
|
|
191
200
|
* - triggerLogout: Function to trigger logout in the host
|
|
192
201
|
* - getCookieConsent: Function to retrieve the current cookie consent state
|
|
193
|
-
* - updateCookieConsent: Function to dispatch consent actions and initialize analytics on
|
|
194
|
-
*
|
|
202
|
+
* - updateCookieConsent: Function to dispatch consent actions and initialize analytics on
|
|
203
|
+
* acceptance; accepts an optional `providers` array to target specific analytics
|
|
204
|
+
* providers (defaults to all)
|
|
205
|
+
* - resetCookieConsent: Function to reset consent state and stop analytics events; accepts
|
|
206
|
+
* an optional `providers` array to target specific analytics providers (defaults to all)
|
|
195
207
|
* - trackGA4Event: Function to track a GA4 event
|
|
208
|
+
* - trackGTMEvent: Function to track a GTM event
|
|
196
209
|
* - getOAuthProviders: Function to get the list of available OAuth providers
|
|
210
|
+
* - triggerSendOTP: Function to send an OTP to an email for a given intent
|
|
211
|
+
* - triggerSignUp: Function to register a new user and log them in on success
|
|
197
212
|
* @throws Will throw an error if any required configuration is missing
|
|
198
213
|
* @returns Object with method to access shared resources
|
|
199
214
|
* @public
|
|
@@ -231,6 +246,22 @@ export declare type OAuthProvider = {
|
|
|
231
246
|
order: number;
|
|
232
247
|
};
|
|
233
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Supported intents for sending a one-time password
|
|
251
|
+
* @public
|
|
252
|
+
*/
|
|
253
|
+
export declare const OTP_INTENT: {
|
|
254
|
+
readonly RESET_PASSWORD: "RESET_PASSWORD";
|
|
255
|
+
readonly REGISTER: "REGISTER";
|
|
256
|
+
readonly EMAIL_VERIFICATION: "EMAIL_VERIFICATION";
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Intent value describing why an OTP is being sent
|
|
261
|
+
* @public
|
|
262
|
+
*/
|
|
263
|
+
export declare type OtpIntent = (typeof OTP_INTENT)[keyof typeof OTP_INTENT];
|
|
264
|
+
|
|
234
265
|
/**
|
|
235
266
|
* Configuration for registering translations
|
|
236
267
|
* @public
|
|
@@ -252,9 +283,10 @@ export declare function registerTranslation(extension: Extension, params: Regist
|
|
|
252
283
|
/**
|
|
253
284
|
* Resets the cookie consent state and stops further analytics events for the given extension.
|
|
254
285
|
* @param extension - The extension object.
|
|
286
|
+
* @param providers - Optional list of analytics providers to target (defaults to all).
|
|
255
287
|
* @public
|
|
256
288
|
*/
|
|
257
|
-
export declare function resetCookieConsent(extension: Extension): void;
|
|
289
|
+
export declare function resetCookieConsent(extension: Extension, providers?: AnalyticsProvider[]): void;
|
|
258
290
|
|
|
259
291
|
/**
|
|
260
292
|
* Shared resources interface representing data shared between host and micro-frontends
|
|
@@ -296,10 +328,13 @@ export declare interface SharedResources {
|
|
|
296
328
|
theme: Theme;
|
|
297
329
|
initialized: boolean;
|
|
298
330
|
getCookieConsent: () => CookieConsent;
|
|
299
|
-
updateCookieConsent: (status: CookieConsentStatus) => void;
|
|
300
|
-
resetCookieConsent: () => void;
|
|
331
|
+
updateCookieConsent: (status: CookieConsentStatus, providers?: AnalyticsProvider[]) => void;
|
|
332
|
+
resetCookieConsent: (providers?: AnalyticsProvider[]) => void;
|
|
301
333
|
trackGA4Event: (eventName: string, params?: Record<string, unknown>) => void;
|
|
334
|
+
trackGTMEvent: (eventName: string, params?: Record<string, unknown>) => void;
|
|
302
335
|
getOAuthProviders: () => OAuthProvider[];
|
|
336
|
+
triggerSendOTP: (params: TriggerSendOtpParams) => Promise<TriggerSendOtpResult>;
|
|
337
|
+
triggerSignUp: (params: TriggerSignUpParams) => Promise<TriggerSignUpResult>;
|
|
303
338
|
}
|
|
304
339
|
|
|
305
340
|
export { StoreEnhancer }
|
|
@@ -335,6 +370,16 @@ export declare type ToastType = 'success' | 'error' | 'info' | 'warn';
|
|
|
335
370
|
*/
|
|
336
371
|
export declare function trackGA4Event(extension: Extension, eventName: string, params?: Record<string, unknown>): void;
|
|
337
372
|
|
|
373
|
+
/**
|
|
374
|
+
* Tracks a GTM event for the given extension.
|
|
375
|
+
* Silently no-ops if GTM has not been initialized (consent not given).
|
|
376
|
+
* @param extension - The extension object.
|
|
377
|
+
* @param eventName - The event name pushed to the GTM dataLayer.
|
|
378
|
+
* @param params - Optional event parameters.
|
|
379
|
+
* @public
|
|
380
|
+
*/
|
|
381
|
+
export declare function trackGTMEvent(extension: Extension, eventName: string, params?: Record<string, unknown>): void;
|
|
382
|
+
|
|
338
383
|
/**
|
|
339
384
|
* Triggers the login process in the host application for the given extension.
|
|
340
385
|
*
|
|
@@ -394,6 +439,68 @@ export declare type TriggerLogoutConfig = {
|
|
|
394
439
|
redirect?: string;
|
|
395
440
|
};
|
|
396
441
|
|
|
442
|
+
/**
|
|
443
|
+
* Triggers the host to send a one-time password to the given email for the given intent.
|
|
444
|
+
* The host injects the tenant identifier automatically.
|
|
445
|
+
* @param extension - The extension object.
|
|
446
|
+
* @param params - `email` and `intent` (see `OTP_INTENT`).
|
|
447
|
+
* @returns A promise resolving to `{ success, data }` or `{ success, error }`.
|
|
448
|
+
* @public
|
|
449
|
+
*/
|
|
450
|
+
export declare function triggerSendOTP(extension: Extension, params: TriggerSendOtpParams): Promise<TriggerSendOtpResult>;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Parameters for triggering an OTP send
|
|
454
|
+
* @public
|
|
455
|
+
*/
|
|
456
|
+
export declare type TriggerSendOtpParams = {
|
|
457
|
+
email: string;
|
|
458
|
+
intent: OtpIntent;
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Result returned by triggerSendOTP
|
|
463
|
+
* @public
|
|
464
|
+
*/
|
|
465
|
+
export declare type TriggerSendOtpResult = {
|
|
466
|
+
success: boolean;
|
|
467
|
+
data?: unknown;
|
|
468
|
+
error?: unknown;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Triggers the host to register a new user. On success, the host logs the user in
|
|
473
|
+
* immediately, equivalent to a successful triggerLogin. The host injects the tenant
|
|
474
|
+
* identifier automatically.
|
|
475
|
+
* @param extension - The extension object.
|
|
476
|
+
* @param params - `email`, `password`, `firstName`, `lastName`, and the verified `otp`.
|
|
477
|
+
* @returns A promise resolving to `{ success, data }` or `{ success, error }`.
|
|
478
|
+
* @public
|
|
479
|
+
*/
|
|
480
|
+
export declare function triggerSignUp(extension: Extension, params: TriggerSignUpParams): Promise<TriggerSignUpResult>;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Parameters for triggering sign up
|
|
484
|
+
* @public
|
|
485
|
+
*/
|
|
486
|
+
export declare type TriggerSignUpParams = {
|
|
487
|
+
email: string;
|
|
488
|
+
password: string;
|
|
489
|
+
firstName: string;
|
|
490
|
+
lastName: string;
|
|
491
|
+
otp: string;
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Result returned by triggerSignUp
|
|
496
|
+
* @public
|
|
497
|
+
*/
|
|
498
|
+
export declare type TriggerSignUpResult = {
|
|
499
|
+
success: boolean;
|
|
500
|
+
data?: unknown;
|
|
501
|
+
error?: unknown;
|
|
502
|
+
};
|
|
503
|
+
|
|
397
504
|
export { Tuple }
|
|
398
505
|
|
|
399
506
|
export { UnknownAction }
|
|
@@ -404,9 +511,10 @@ export { UnknownAction }
|
|
|
404
511
|
* using the tenant's measurementId.
|
|
405
512
|
* @param extension - The extension object.
|
|
406
513
|
* @param status - The consent status to set ('accepted' or 'declined').
|
|
514
|
+
* @param providers - Optional list of analytics providers to target (defaults to all).
|
|
407
515
|
* @public
|
|
408
516
|
*/
|
|
409
|
-
export declare function updateCookieConsent(extension: Extension, status: CookieConsentStatus): void;
|
|
517
|
+
export declare function updateCookieConsent(extension: Extension, status: CookieConsentStatus, providers?: AnalyticsProvider[]): void;
|
|
410
518
|
|
|
411
519
|
/**
|
|
412
520
|
* User information object
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,KAAK,EACL,aAAa,EACb,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI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B,OAAO,CAAC,oBAAoB,CAAC,CAI/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAI9B;AAMD,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC1F,YAAY,EACV,aAAa,EACb,aAAa,EACb,aAAa,EACb,KAAK,EACL,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,15 @@ Copyright 2026 CloudScaile
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0
|
|
5
5
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Supported intents for sending a one-time password
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export const OTP_INTENT = {
|
|
12
|
+
RESET_PASSWORD: 'RESET_PASSWORD',
|
|
13
|
+
REGISTER: 'REGISTER',
|
|
14
|
+
EMAIL_VERIFICATION: 'EMAIL_VERIFICATION'
|
|
15
|
+
};
|
|
7
16
|
// ============ Implementation ============
|
|
8
17
|
let globalStore = {
|
|
9
18
|
initialized: false
|
|
@@ -24,7 +33,10 @@ const ERROR_MAPS = {
|
|
|
24
33
|
updateCookieConsent: 'Update Cookie Consent',
|
|
25
34
|
resetCookieConsent: 'Reset Cookie Consent',
|
|
26
35
|
trackGA4Event: 'Track GA4 Event',
|
|
27
|
-
|
|
36
|
+
trackGTMEvent: 'Track GTM Event',
|
|
37
|
+
getOAuthProviders: 'Get OAuth Providers',
|
|
38
|
+
triggerSendOTP: 'Trigger Send OTP',
|
|
39
|
+
triggerSignUp: 'Trigger Sign Up'
|
|
28
40
|
};
|
|
29
41
|
/**
|
|
30
42
|
* Initialize the communication package in the host application
|
|
@@ -41,10 +53,16 @@ const ERROR_MAPS = {
|
|
|
41
53
|
* - triggerLogin: Function to trigger login in the host
|
|
42
54
|
* - triggerLogout: Function to trigger logout in the host
|
|
43
55
|
* - getCookieConsent: Function to retrieve the current cookie consent state
|
|
44
|
-
* - updateCookieConsent: Function to dispatch consent actions and initialize analytics on
|
|
45
|
-
*
|
|
56
|
+
* - updateCookieConsent: Function to dispatch consent actions and initialize analytics on
|
|
57
|
+
* acceptance; accepts an optional `providers` array to target specific analytics
|
|
58
|
+
* providers (defaults to all)
|
|
59
|
+
* - resetCookieConsent: Function to reset consent state and stop analytics events; accepts
|
|
60
|
+
* an optional `providers` array to target specific analytics providers (defaults to all)
|
|
46
61
|
* - trackGA4Event: Function to track a GA4 event
|
|
62
|
+
* - trackGTMEvent: Function to track a GTM event
|
|
47
63
|
* - getOAuthProviders: Function to get the list of available OAuth providers
|
|
64
|
+
* - triggerSendOTP: Function to send an OTP to an email for a given intent
|
|
65
|
+
* - triggerSignUp: Function to register a new user and log them in on success
|
|
48
66
|
* @throws Will throw an error if any required configuration is missing
|
|
49
67
|
* @returns Object with method to access shared resources
|
|
50
68
|
* @public
|
|
@@ -267,22 +285,24 @@ export function getCookieConsent(extension) {
|
|
|
267
285
|
* using the tenant's measurementId.
|
|
268
286
|
* @param extension - The extension object.
|
|
269
287
|
* @param status - The consent status to set ('accepted' or 'declined').
|
|
288
|
+
* @param providers - Optional list of analytics providers to target (defaults to all).
|
|
270
289
|
* @public
|
|
271
290
|
*/
|
|
272
|
-
export function updateCookieConsent(extension, status) {
|
|
291
|
+
export function updateCookieConsent(extension, status, providers) {
|
|
273
292
|
validateExtension(extension);
|
|
274
293
|
const updateCookieConsentResource = getResource('updateCookieConsent');
|
|
275
|
-
updateCookieConsentResource(status);
|
|
294
|
+
updateCookieConsentResource(status, providers);
|
|
276
295
|
}
|
|
277
296
|
/**
|
|
278
297
|
* Resets the cookie consent state and stops further analytics events for the given extension.
|
|
279
298
|
* @param extension - The extension object.
|
|
299
|
+
* @param providers - Optional list of analytics providers to target (defaults to all).
|
|
280
300
|
* @public
|
|
281
301
|
*/
|
|
282
|
-
export function resetCookieConsent(extension) {
|
|
302
|
+
export function resetCookieConsent(extension, providers) {
|
|
283
303
|
validateExtension(extension);
|
|
284
304
|
const resetCookieConsentResource = getResource('resetCookieConsent');
|
|
285
|
-
resetCookieConsentResource();
|
|
305
|
+
resetCookieConsentResource(providers);
|
|
286
306
|
}
|
|
287
307
|
/**
|
|
288
308
|
* Tracks a GA4 event for the given extension.
|
|
@@ -297,6 +317,19 @@ export function trackGA4Event(extension, eventName, params = {}) {
|
|
|
297
317
|
const trackGA4EventResource = getResource('trackGA4Event');
|
|
298
318
|
trackGA4EventResource(eventName, params);
|
|
299
319
|
}
|
|
320
|
+
/**
|
|
321
|
+
* Tracks a GTM event for the given extension.
|
|
322
|
+
* Silently no-ops if GTM has not been initialized (consent not given).
|
|
323
|
+
* @param extension - The extension object.
|
|
324
|
+
* @param eventName - The event name pushed to the GTM dataLayer.
|
|
325
|
+
* @param params - Optional event parameters.
|
|
326
|
+
* @public
|
|
327
|
+
*/
|
|
328
|
+
export function trackGTMEvent(extension, eventName, params = {}) {
|
|
329
|
+
validateExtension(extension);
|
|
330
|
+
const trackGTMEventResource = getResource('trackGTMEvent');
|
|
331
|
+
trackGTMEventResource(eventName, params);
|
|
332
|
+
}
|
|
300
333
|
/**
|
|
301
334
|
* Returns the list of configured OAuth / SSO providers for the given extension,
|
|
302
335
|
* sorted by the host-defined order.
|
|
@@ -309,4 +342,31 @@ export function getOAuthProviders(extension) {
|
|
|
309
342
|
const getOAuthProvidersResource = getResource('getOAuthProviders');
|
|
310
343
|
return getOAuthProvidersResource();
|
|
311
344
|
}
|
|
345
|
+
/**
|
|
346
|
+
* Triggers the host to send a one-time password to the given email for the given intent.
|
|
347
|
+
* The host injects the tenant identifier automatically.
|
|
348
|
+
* @param extension - The extension object.
|
|
349
|
+
* @param params - `email` and `intent` (see `OTP_INTENT`).
|
|
350
|
+
* @returns A promise resolving to `{ success, data }` or `{ success, error }`.
|
|
351
|
+
* @public
|
|
352
|
+
*/
|
|
353
|
+
export function triggerSendOTP(extension, params) {
|
|
354
|
+
validateExtension(extension);
|
|
355
|
+
const triggerSendOTPResource = getResource('triggerSendOTP');
|
|
356
|
+
return triggerSendOTPResource(params);
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Triggers the host to register a new user. On success, the host logs the user in
|
|
360
|
+
* immediately, equivalent to a successful triggerLogin. The host injects the tenant
|
|
361
|
+
* identifier automatically.
|
|
362
|
+
* @param extension - The extension object.
|
|
363
|
+
* @param params - `email`, `password`, `firstName`, `lastName`, and the verified `otp`.
|
|
364
|
+
* @returns A promise resolving to `{ success, data }` or `{ success, error }`.
|
|
365
|
+
* @public
|
|
366
|
+
*/
|
|
367
|
+
export function triggerSignUp(extension, params) {
|
|
368
|
+
validateExtension(extension);
|
|
369
|
+
const triggerSignUpResource = getResource('triggerSignUp');
|
|
370
|
+
return triggerSignUpResource(params);
|
|
371
|
+
}
|
|
312
372
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAoGF;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,cAAc,EAAE,gBAAgB;IAChC,QAAQ,EAAE,UAAU;IACpB,kBAAkB,EAAE,oBAAoB;CAChC,CAAC;AAyLX,2CAA2C;AAE3C,IAAI,WAAW,GAA6B;IAC1C,WAAW,EAAE,KAAK;CACnB,CAAC;AAEF,MAAM,UAAU,GAA0D;IACxE,QAAQ,EAAE,mBAAmB;IAC7B,UAAU,EAAE,aAAa;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