@monterosa/sdk-identify-kit 2.0.0-rc.3 → 2.0.0-rc.4

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.
@@ -8,30 +8,24 @@
8
8
  */
9
9
  import { MonterosaSdk } from '@monterosa/sdk-core';
10
10
  import { Emitter } from '@monterosa/sdk-util';
11
- import { IdentifyKit, IdentifyOptions, LoginState, Credentials, Signature, UserData } from './types';
12
- export default class Identify extends Emitter implements IdentifyKit {
11
+ import { IdentifyKit, IdentifyOptions, LoginState, Signature, UserData } from './types';
12
+ export declare class Identify extends Emitter implements IdentifyKit {
13
13
  sdk: MonterosaSdk;
14
- private wasLoggedIn;
14
+ wasLoggedIn: boolean;
15
15
  private host?;
16
16
  private readonly _options;
17
- private _credentials;
18
17
  private _signature;
19
18
  private _userData;
20
19
  private signatureExpireTimeout;
21
- private userDataExpireTimeout;
22
20
  _state: LoginState;
23
- constructor(sdk: MonterosaSdk, options?: IdentifyOptions);
21
+ constructor(sdk: MonterosaSdk, options?: Partial<IdentifyOptions>);
24
22
  private static fetchIdentifyHost;
25
23
  get state(): LoginState;
26
24
  set state(state: LoginState);
27
25
  get options(): IdentifyOptions;
28
26
  set signature(signature: Signature | null);
29
27
  get signature(): Signature | null;
30
- set credentials(credentials: Credentials | null);
31
- get credentials(): Credentials | null;
32
28
  set userData(data: UserData | null);
33
29
  get userData(): UserData | null;
34
- get shouldLoginOnReconnect(): boolean;
35
- reset(): void;
36
30
  getUrl(path?: string): Promise<string>;
37
31
  }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ * @monterosa/sdk-identify-kit
4
+ *
5
+ * Copyright © 2026 Monterosa Productions Limited. All rights reserved.
6
+ *
7
+ * More details on the license can be found at https://www.monterosa.co/sdk/license
8
+ */
9
+ import { IdentifyOptions } from './types';
10
+ /**
11
+ * Resolves partial identify options against defaults.
12
+ *
13
+ * Used by `getIdentify` (app-side) to ensure identify keys never diverge
14
+ * for the same logical inputs.
15
+ *
16
+ * @internal
17
+ */
18
+ export declare function resolveIdentifyOptions(options?: Partial<IdentifyOptions>): IdentifyOptions;
19
+ /**
20
+ * Deterministic identify key for memoisation.
21
+ *
22
+ * Includes the full identity tuple: `(host, projectId, strategy,
23
+ * provider, version)`. `loginPolicy` is intentionally excluded —
24
+ * behaviour is not identity-defining.
25
+ *
26
+ * @internal
27
+ */
28
+ export declare function identifyKey(host: string, projectId: string, options: IdentifyOptions): string;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * @monterosa/sdk-identify-kit
4
+ *
5
+ * Copyright © 2026 Monterosa Productions Limited. All rights reserved.
6
+ *
7
+ * More details on the license can be found at https://www.monterosa.co/sdk/license
8
+ */
9
+ import { IdentifyContext } from './types';
10
+ /**
11
+ * Resolve the identify backend host for `(host, projectId)`, cached so
12
+ * repeated requests don't re-fetch listings.
13
+ *
14
+ * @internal
15
+ */
16
+ export declare function fetchIdentifyHost(host: string, projectId: string): Promise<string>;
17
+ /**
18
+ * Build an identify backend URL from a wire context — no `Identify`
19
+ * instance required. Used by bridge handlers at intermediate levels that
20
+ * relay requests on behalf of a child without materialising a local
21
+ * identify.
22
+ *
23
+ * @internal
24
+ */
25
+ export declare function buildIdentifyUrl(context: IdentifyContext, path?: string): Promise<string>;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @license
3
+ * @monterosa/sdk-identify-kit
4
+ *
5
+ * Copyright © 2026 Monterosa Productions Limited. All rights reserved.
6
+ *
7
+ * More details on the license can be found at https://www.monterosa.co/sdk/license
8
+ */
9
+ import { IdentifyOptions, ResolvedIdentityOptions } from './types';
10
+ export type { ResolvedIdentityOptions };
11
+ /**
12
+ * Resolves partial identify options against defaults.
13
+ *
14
+ * Used by both `getIdentify` (app-side) and the bridge handler
15
+ * (parent-side, when reacting to request context) to ensure
16
+ * identity keys never diverge for the same logical inputs.
17
+ *
18
+ * @internal
19
+ */
20
+ export declare function resolveIdentityOptions(options?: IdentifyOptions): ResolvedIdentityOptions;
21
+ /**
22
+ * Deterministic identity key for memoisation.
23
+ *
24
+ * Includes only the auth-related fields that define an "identity":
25
+ * `(projectId, strategy, provider, version)`. `deviceId` and
26
+ * `loginPolicy` are intentionally excluded — they are session-level
27
+ * and behaviour-level respectively, not identity-defining.
28
+ *
29
+ * @internal
30
+ */
31
+ export declare function identityKey(projectId: string, options: ResolvedIdentityOptions): string;