@kivacore/signin 0.20.0 → 0.21.1

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.
@@ -91,22 +91,22 @@ declare class IframeAuth {
91
91
  * Hand a payload to the host AI assistant (Docy). Resolves when the host
92
92
  * acknowledges delivery, rejects on host error or timeout.
93
93
  */
94
- sendToDocy(payload: DocyrusSharePayload): Promise<void>;
94
+ sendToDocy(payload: KivaSharePayload): Promise<void>;
95
95
  /**
96
96
  * Hand a payload to the host team-chat app. Resolves when the host
97
97
  * acknowledges delivery, rejects on host error or timeout.
98
98
  */
99
- sendToChat(payload: DocyrusSharePayload): Promise<void>;
99
+ sendToChat(payload: KivaSharePayload): Promise<void>;
100
100
  /**
101
101
  * Hand a draft email to the host. Resolves when the host acknowledges,
102
102
  * rejects on host error or timeout.
103
103
  */
104
- sendToEmail(payload: DocyrusEmailPayload): Promise<void>;
104
+ sendToEmail(payload: KivaEmailPayload): Promise<void>;
105
105
  /**
106
106
  * Hand a calendar event to the host. Resolves when the host acknowledges,
107
107
  * rejects on host error or timeout.
108
108
  */
109
- sendToCalendar(payload: DocyrusCalendarEventPayload): Promise<void>;
109
+ sendToCalendar(payload: KivaCalendarEventPayload): Promise<void>;
110
110
  /** Ask the host whether its MSAL session is signed in. */
111
111
  requestMsGraphStatus(): Promise<MsGraphStatus>;
112
112
  /** Perform a Microsoft Graph request through the host's MSAL session. */
@@ -156,7 +156,7 @@ interface MsGraphRequestOptions {
156
156
  * the token via MSAL, performs the Graph request, and returns only the
157
157
  * response. The MSAL access token never crosses the frame boundary.
158
158
  *
159
- * Obtain one via `useDocyrusMsGraph()` (React), `getDocyrusAuth().msGraph`
159
+ * Obtain one via `useKivaMsGraph()` (React), `getKivaAuth().msGraph`
160
160
  * (Vue), or `AuthManager.getMsGraphClient()`. Only available in iframe/WebView
161
161
  * mode — it is `null` elsewhere.
162
162
  */
@@ -194,9 +194,9 @@ interface AuthSessionResult {
194
194
  type OpenAuthSessionFn = (url: string, redirectUri: string) => Promise<AuthSessionResult>;
195
195
  /** Authentication state exposed to consumers */
196
196
  type AuthStatus = 'loading' | 'authenticated' | 'unauthenticated' | 'error';
197
- /** Configuration for the DocyrusAuthProvider */
198
- interface DocyrusAuthConfig {
199
- /** OAuth2 client ID. Defaults to the Docyrus public client ID */
197
+ /** Configuration for the KivaAuthProvider */
198
+ interface KivaAuthConfig {
199
+ /** OAuth2 client ID. Defaults to the Kiva public client ID */
200
200
  clientId?: string;
201
201
  /** API base URL. Defaults to https://alpha-api.docyrus.com */
202
202
  apiUrl?: string;
@@ -208,7 +208,7 @@ interface DocyrusAuthConfig {
208
208
  callbackPath?: string;
209
209
  /** Allowed host origins for iframe mode. Used alongside the default *.docyrus.app pattern */
210
210
  allowedHostOrigins?: string[];
211
- /** localStorage key prefix for token storage. Defaults to 'docyrus_oauth2' */
211
+ /** localStorage key prefix for token storage. Defaults to 'kiva_oauth2' */
212
212
  storageKeyPrefix?: string;
213
213
  /** Custom token storage implementation (e.g., Electron IPC storage). Overrides storageKeyPrefix */
214
214
  tokenStorage?: OAuth2TokenStorage;
@@ -229,13 +229,13 @@ interface DocyrusAuthConfig {
229
229
  * current access token is used as-is until replaced via
230
230
  * `signInWithTokens`. Use this when an external system owns the token
231
231
  * lifecycle (e.g. a Supabase session whose refresh token is not a valid
232
- * Docyrus OAuth2 grant) and pushes fresh tokens in through
232
+ * Kiva OAuth2 grant) and pushes fresh tokens in through
233
233
  * `signInWithTokens`.
234
234
  */
235
235
  autoRefresh?: boolean;
236
236
  /** Enable SSR: sync access token to a cookie readable by server components. Default: false */
237
237
  ssr?: boolean;
238
- /** Cookie name for SSR token sync. Default: 'docyrus-token' */
238
+ /** Cookie name for SSR token sync. Default: 'kiva-token' */
239
239
  ssrCookieKey?: string;
240
240
  /**
241
241
  * Iframe/WebView mode: post a `route-change` message to the host on
@@ -272,7 +272,7 @@ interface DocyrusAuthConfig {
272
272
  cryptoProvider?: CryptoProvider;
273
273
  }
274
274
  /** The shape of the React context value */
275
- interface DocyrusAuthContextValue {
275
+ interface KivaAuthContextValue {
276
276
  /** Current auth state */
277
277
  status: AuthStatus;
278
278
  /** The detected authentication mode */
@@ -282,7 +282,7 @@ interface DocyrusAuthContextValue {
282
282
  /** Current tokens (null when unauthenticated) */
283
283
  tokens: OAuth2Tokens | null;
284
284
  /** Current user data (null when not authenticated or not yet fetched) */
285
- user: DocyrusUser | null;
285
+ user: KivaUser | null;
286
286
  /** Initiate sign-in (only relevant in standalone mode) */
287
287
  signIn: () => void;
288
288
  /** Bootstrap an authenticated session from existing tokens */
@@ -343,26 +343,26 @@ interface DocyrusAuthContextValue {
343
343
  * Resolves when the host acknowledges delivery; rejects on host error or
344
344
  * timeout. Rejects immediately outside iframe mode.
345
345
  */
346
- sendToDocy: (payload: DocyrusSharePayload) => Promise<void>;
346
+ sendToDocy: (payload: KivaSharePayload) => Promise<void>;
347
347
  /**
348
348
  * Iframe/WebView mode: hand a payload to the host team-chat app.
349
349
  * Resolves when the host acknowledges delivery; rejects on host error or
350
350
  * timeout. Rejects immediately outside iframe mode.
351
351
  */
352
- sendToChat: (payload: DocyrusSharePayload) => Promise<void>;
352
+ sendToChat: (payload: KivaSharePayload) => Promise<void>;
353
353
  /**
354
354
  * Iframe/WebView mode: hand a draft email (to/subject/body/cc) to the host
355
355
  * to send or compose. Resolves when the host acknowledges; rejects on host
356
356
  * error or timeout. Rejects immediately outside iframe mode.
357
357
  */
358
- sendToEmail: (payload: DocyrusEmailPayload) => Promise<void>;
358
+ sendToEmail: (payload: KivaEmailPayload) => Promise<void>;
359
359
  /**
360
360
  * Iframe/WebView mode: hand a calendar event (subject/description/
361
361
  * participants/start/end) to the host to create. Resolves when the host
362
362
  * acknowledges; rejects on host error or timeout. Rejects immediately
363
363
  * outside iframe mode.
364
364
  */
365
- sendToCalendar: (payload: DocyrusCalendarEventPayload) => Promise<void>;
365
+ sendToCalendar: (payload: KivaCalendarEventPayload) => Promise<void>;
366
366
  /**
367
367
  * Iframe/WebView mode: a client for the host's Microsoft Graph (MSAL)
368
368
  * session. Check `isSignedIn()` and make host-proxied Graph requests — the
@@ -437,7 +437,7 @@ interface HostNavigationRequestOptions {
437
437
  * Notification payload pushed from the host into the embedded app.
438
438
  * Mirrors the NotificationEntity API contract.
439
439
  */
440
- interface DocyrusNotification {
440
+ interface KivaNotification {
441
441
  id: string;
442
442
  subject: string;
443
443
  message: string;
@@ -457,7 +457,7 @@ interface DocyrusNotification {
457
457
  /** PostMessage payload: host pushes a notification to the embedded app */
458
458
  interface HostNotificationMessage {
459
459
  type: 'notification';
460
- notification: DocyrusNotification;
460
+ notification: KivaNotification;
461
461
  }
462
462
  /**
463
463
  * A visible, interactive element the host assistant (Guidy) can target by id.
@@ -551,7 +551,7 @@ interface AdaptiveCard {
551
551
  [key: string]: unknown;
552
552
  }
553
553
  /** Plain-text (or markdown) payload handed to a host surface. */
554
- interface DocyrusShareTextPayload {
554
+ interface KivaShareTextPayload {
555
555
  kind: 'text';
556
556
  /** The text/markdown body. */
557
557
  text: string;
@@ -559,7 +559,7 @@ interface DocyrusShareTextPayload {
559
559
  title?: string;
560
560
  }
561
561
  /** Adaptive Card payload handed to a host surface. */
562
- interface DocyrusShareAdaptiveCardPayload {
562
+ interface KivaShareAdaptiveCardPayload {
563
563
  kind: 'adaptiveCard';
564
564
  /** Raw Adaptive Card JSON the host will render. */
565
565
  card: AdaptiveCard;
@@ -570,20 +570,20 @@ interface DocyrusShareAdaptiveCardPayload {
570
570
  * The payload an embedded app can hand off to a host surface (Docy or Chat).
571
571
  * Two kinds: plain `text` or an `adaptiveCard`.
572
572
  */
573
- type DocyrusSharePayload = DocyrusShareTextPayload | DocyrusShareAdaptiveCardPayload;
573
+ type KivaSharePayload = KivaShareTextPayload | KivaShareAdaptiveCardPayload;
574
574
  /** App → Host: hand a payload to the host AI assistant (Docy). */
575
575
  interface DocySendMessage {
576
576
  type: 'docy:send';
577
577
  /** Correlation id — the host echoes it in the matching `docy:send-ack`. */
578
578
  requestId: string;
579
- payload: DocyrusSharePayload;
579
+ payload: KivaSharePayload;
580
580
  }
581
581
  /** App → Host: hand a payload to the host team-chat app. */
582
582
  interface ChatSendMessage {
583
583
  type: 'chat:send';
584
584
  /** Correlation id — the host echoes it in the matching `chat:send-ack`. */
585
585
  requestId: string;
586
- payload: DocyrusSharePayload;
586
+ payload: KivaSharePayload;
587
587
  }
588
588
  /** Host → App: acknowledgement of a `docy:send`. */
589
589
  interface DocySendAckMessage {
@@ -604,7 +604,7 @@ interface ChatSendAckMessage {
604
604
  error?: string;
605
605
  }
606
606
  /** A draft email an embedded app hands to the host to send/compose. */
607
- interface DocyrusEmailPayload {
607
+ interface KivaEmailPayload {
608
608
  /** Recipient address(es). */
609
609
  to: string | string[];
610
610
  /** Subject line. */
@@ -615,7 +615,7 @@ interface DocyrusEmailPayload {
615
615
  cc?: string | string[];
616
616
  }
617
617
  /** A calendar event an embedded app hands to the host to create. */
618
- interface DocyrusCalendarEventPayload {
618
+ interface KivaCalendarEventPayload {
619
619
  /** Event title/subject. */
620
620
  subject: string;
621
621
  /** Event description/body. */
@@ -632,14 +632,14 @@ interface EmailSendMessage {
632
632
  type: 'email:send';
633
633
  /** Correlation id — the host echoes it in the matching `email:send-ack`. */
634
634
  requestId: string;
635
- payload: DocyrusEmailPayload;
635
+ payload: KivaEmailPayload;
636
636
  }
637
637
  /** App → Host: hand a calendar event to the host. */
638
638
  interface CalendarSendMessage {
639
639
  type: 'calendar:send';
640
640
  /** Correlation id — the host echoes it in the matching `calendar:send-ack`. */
641
641
  requestId: string;
642
- payload: DocyrusCalendarEventPayload;
642
+ payload: KivaCalendarEventPayload;
643
643
  }
644
644
  /** Host → App: acknowledgement of an `email:send`. */
645
645
  interface EmailSendAckMessage {
@@ -732,21 +732,21 @@ type AppToHostMessage = TokenRefreshRequestMessage | AppRouteChangeMessage | App
732
732
  /** Handler invoked when the host sends a navigation message */
733
733
  type HostNavigationHandler = (message: HostNavigationMessage) => void;
734
734
  /** Handler invoked when the host sends a notification message */
735
- type HostNotificationHandler = (notification: DocyrusNotification) => void;
735
+ type HostNotificationHandler = (notification: KivaNotification) => void;
736
736
  /** A role object as returned by GET /v1/users/me */
737
- interface DocyrusRole {
737
+ interface KivaRole {
738
738
  uid: string;
739
739
  slug: string;
740
- rules: DocyrusAclRule[];
740
+ rules: KivaAclRule[];
741
741
  }
742
742
  /**
743
743
  * An ACL rule — maps a data source to its allowed operations.
744
744
  *
745
- * Legacy shape, superseded by {@link DocyrusPermission}: every entity-less rule
745
+ * Legacy shape, superseded by {@link KivaPermission}: every entity-less rule
746
746
  * (ai/settings/devtools) and every app/ai-tool rule collapses into the single
747
747
  * entry whose `dataSourceId` is null.
748
748
  */
749
- interface DocyrusAclRule {
749
+ interface KivaAclRule {
750
750
  dataSourceId: string | null;
751
751
  allowedOperations: string[];
752
752
  }
@@ -758,7 +758,7 @@ type AclTargetType = 'data_source' | 'field' | 'app' | 'ai_tool' | 'ai' | 'setti
758
758
  * scopes them (`data_source`/`field` → dataSourceId, `app` → appId, `ai_tool`
759
759
  * → aiToolId); `ai`, `settings` and `devtools` are tenant-wide and carry none.
760
760
  */
761
- interface DocyrusPermission {
761
+ interface KivaPermission {
762
762
  targetType: AclTargetType;
763
763
  dataSourceId?: string | null;
764
764
  appId?: string | null;
@@ -777,20 +777,20 @@ interface PermissionScope {
777
777
  targetType?: AclTargetType;
778
778
  }
779
779
  /** The user object as returned by GET /v1/users/me */
780
- interface DocyrusUser {
780
+ interface KivaUser {
781
781
  id: string;
782
782
  email: string;
783
783
  firstname?: string | null;
784
784
  lastname?: string | null;
785
785
  photo?: string | null;
786
- primaryRole: DocyrusRole | null;
787
- roles: DocyrusRole[];
788
- aclRules: DocyrusAclRule[];
786
+ primaryRole: KivaRole | null;
787
+ roles: KivaRole[];
788
+ aclRules: KivaAclRule[];
789
789
  /**
790
790
  * Target-type-aware permissions. Absent on older API versions, where
791
791
  * `aclRules` is the only shape available.
792
792
  */
793
- permissions?: DocyrusPermission[];
793
+ permissions?: KivaPermission[];
794
794
  tenant?: {
795
795
  id: string;
796
796
  name: string;
@@ -807,10 +807,10 @@ interface PermissionConfig {
807
807
  /**
808
808
  * Data sources that are always permitted for certain operations,
809
809
  * keyed by data source UUID to an array of allowed operations.
810
- * Defaults to the standard Docyrus system data sources.
810
+ * Defaults to the standard Kiva system data sources.
811
811
  */
812
812
  alwaysPermittedDataSources?: Record<string, AclOperation[]>;
813
813
  }
814
814
 
815
- export { IframeAuth as $, MsGraphClient as p };
816
- export type { AclOperation as A, ChatSendAckMessage as B, CalendarSendAckMessage as C, DocyrusAuthConfig as D, ChatSendMessage as E, DocySendAckMessage as F, GuidyRoute as G, HostNavigationHandler as H, DocySendMessage as I, DocyrusNotification as J, EmailSendAckMessage as K, EmailSendMessage as L, MsGraphAccount as M, GuidyCommandHandler as N, OpenAuthSessionFn as O, PermissionConfig as P, GuidyCommandMessage as Q, RouteChangePayload as R, GuidyElement as S, GuidyElementsMessage as T, GuidyPointAckMessage as U, GuidyPointMessage as V, GuidyRoutesMessage as W, GuidyScanMessage as X, HostNavigationMessage as Y, HostNotificationMessage as Z, HostSignInMessage as _, AclTargetType as a, MsGraphRequestMessage as a0, MsGraphResponseMessage as a1, MsGraphStatusRequestMessage as a2, MsGraphStatusResponseMessage as a3, TokenRefreshRequestMessage as a4, AdaptiveCard as b, AuthMode as c, AuthSessionResult as d, AuthStatus as e, DocyrusAclRule as f, DocyrusAuthContextValue as g, DocyrusCalendarEventPayload as h, DocyrusEmailPayload as i, DocyrusPermission as j, DocyrusRole as k, DocyrusShareAdaptiveCardPayload as l, DocyrusSharePayload as m, DocyrusShareTextPayload as n, DocyrusUser as o, MsGraphRequest as q, MsGraphRequestOptions as r, MsGraphResponse as s, MsGraphStatus as t, PermissionScope as u, HostNotificationHandler as v, HostNavigationRequestOptions as w, AppNavigationRequestMessage as x, AppRouteChangeMessage as y, CalendarSendMessage as z };
815
+ export { IframeAuth as Q, MsGraphClient as S };
816
+ export type { PermissionConfig as $, AclOperation as A, GuidyPointMessage as B, CalendarSendAckMessage as C, DocySendAckMessage as D, EmailSendAckMessage as E, GuidyRoute as F, GuidyCommandHandler as G, GuidyRoutesMessage as H, GuidyScanMessage as I, HostNavigationHandler as J, KivaAclRule as K, HostNavigationMessage as L, HostNavigationRequestOptions as M, HostNotificationHandler as N, HostNotificationMessage as O, HostSignInMessage as P, MsGraphAccount as R, MsGraphRequest as T, MsGraphRequestMessage as U, MsGraphRequestOptions as V, MsGraphResponse as W, MsGraphResponseMessage as X, MsGraphStatus as Y, MsGraphStatusRequestMessage as Z, MsGraphStatusResponseMessage as _, KivaAuthConfig as a, PermissionScope as a0, RouteChangePayload as a1, TokenRefreshRequestMessage as a2, AuthSessionResult as a3, OpenAuthSessionFn as a4, KivaAuthContextValue as b, KivaCalendarEventPayload as c, KivaEmailPayload as d, KivaNotification as e, KivaPermission as f, KivaRole as g, KivaShareAdaptiveCardPayload as h, KivaSharePayload as i, KivaShareTextPayload as j, KivaUser as k, AclTargetType as l, AdaptiveCard as m, AppNavigationRequestMessage as n, AppRouteChangeMessage as o, AuthMode as p, AuthStatus as q, CalendarSendMessage as r, ChatSendAckMessage as s, ChatSendMessage as t, DocySendMessage as u, EmailSendMessage as v, GuidyCommandMessage as w, GuidyElement as x, GuidyElementsMessage as y, GuidyPointAckMessage as z };
@@ -0,0 +1,32 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { a as KivaAuthConfig, b as KivaAuthContextValue } from './types-DF2C4eb6.js';
4
+ import { RestApiClient } from '@kivacore/api-client';
5
+
6
+ interface KivaAuthProviderProps extends KivaAuthConfig {
7
+ children: ReactNode;
8
+ /** Render a custom screen for a blocking auth error. */
9
+ renderAuthError?: (error: Error) => ReactNode;
10
+ }
11
+ declare function KivaAuthProvider({ children, renderAuthError, ...config }: KivaAuthProviderProps): react.JSX.Element;
12
+
13
+ declare const KivaAuthContext: react.Context<KivaAuthContextValue | null>;
14
+
15
+ /**
16
+ * Hook to access Kiva auth state.
17
+ * Must be used within a <KivaAuthProvider>.
18
+ *
19
+ * Returns: { status, mode, tokens, signIn, signInWithTokens, signOut, client, error }
20
+ */
21
+ declare function useKivaAuth(): KivaAuthContextValue;
22
+
23
+ /**
24
+ * Hook to get the pre-configured RestApiClient.
25
+ * Returns null when not authenticated.
26
+ *
27
+ * Throws if used outside KivaAuthProvider.
28
+ */
29
+ declare function useKivaClient(): RestApiClient | null;
30
+
31
+ export { KivaAuthProvider as K, useKivaClient as b, KivaAuthContext as c, useKivaAuth as u };
32
+ export type { KivaAuthProviderProps as a };
@@ -1,11 +1,11 @@
1
1
  import * as vue from 'vue';
2
2
  import { PropType } from 'vue';
3
3
  import { OAuth2TokenStorage, OAuth2Tokens, RestApiClient } from '@kivacore/api-client';
4
- import { c as AuthMode, e as AuthStatus, m as DocyrusSharePayload, i as DocyrusEmailPayload, h as DocyrusCalendarEventPayload, p as MsGraphClient } from '../types-DmIgZa_v.js';
4
+ import { a as KivaAuthConfig, p as AuthMode, q as AuthStatus, i as KivaSharePayload, d as KivaEmailPayload, c as KivaCalendarEventPayload, S as MsGraphClient, h as KivaShareAdaptiveCardPayload, j as KivaShareTextPayload } from '../types-DF2C4eb6.js';
5
5
  import { HostNavigationHandler, HostNotificationHandler, RouteChangePayload, HostNavigationRequestOptions } from '../core-index.js';
6
- export { b as AdaptiveCard, D as DocyrusAuthConfig, l as DocyrusShareAdaptiveCardPayload, n as DocyrusShareTextPayload, M as MsGraphAccount, q as MsGraphRequest, r as MsGraphRequestOptions, s as MsGraphResponse, t as MsGraphStatus } from '../types-DmIgZa_v.js';
6
+ export { m as AdaptiveCard, R as MsGraphAccount, T as MsGraphRequest, V as MsGraphRequestOptions, W as MsGraphResponse, Y as MsGraphStatus } from '../types-DF2C4eb6.js';
7
7
 
8
- interface DocyrusAuthState {
8
+ interface KivaAuthState {
9
9
  status: AuthStatus;
10
10
  mode: AuthMode | null;
11
11
  tokens: OAuth2Tokens | null;
@@ -20,45 +20,45 @@ interface DocyrusAuthState {
20
20
  enableHostRouteSync: () => void;
21
21
  notifyRouteChange: (payload?: RouteChangePayload) => void;
22
22
  requestHostNavigation: (url: string, options?: HostNavigationRequestOptions) => void;
23
- sendToDocy: (payload: DocyrusSharePayload) => Promise<void>;
24
- sendToChat: (payload: DocyrusSharePayload) => Promise<void>;
25
- sendToEmail: (payload: DocyrusEmailPayload) => Promise<void>;
26
- sendToCalendar: (payload: DocyrusCalendarEventPayload) => Promise<void>;
23
+ sendToDocy: (payload: KivaSharePayload) => Promise<void>;
24
+ sendToChat: (payload: KivaSharePayload) => Promise<void>;
25
+ sendToEmail: (payload: KivaEmailPayload) => Promise<void>;
26
+ sendToCalendar: (payload: KivaCalendarEventPayload) => Promise<void>;
27
27
  msGraph: MsGraphClient | null;
28
28
  }
29
29
  /**
30
- * Vue composable to access Docyrus auth state.
31
- * Must be used within a `<DocyrusAuthProvider>`.
30
+ * Vue composable to access Kiva auth state.
31
+ * Must be used within a `<KivaAuthProvider>`.
32
32
  *
33
33
  * Returns: { status, mode, tokens, signIn, signInWithTokens, signOut, client, error }
34
34
  */
35
- declare function getDocyrusAuth(): DocyrusAuthState;
36
- /** @deprecated Use `getDocyrusAuth()` instead. */
37
- declare const useDocyrusAuth: typeof getDocyrusAuth;
35
+ declare function getKivaAuth(): KivaAuthState;
36
+ /** @deprecated Use `getKivaAuth()` instead. */
37
+ declare const useKivaAuth: typeof getKivaAuth;
38
38
  /**
39
39
  * Vue composable to get the pre-configured RestApiClient.
40
40
  * Returns a computed ref that is null when not authenticated.
41
41
  */
42
- declare function getDocyrusClient(): vue.ComputedRef<RestApiClient | null>;
43
- /** @deprecated Use `getDocyrusClient()` instead. */
44
- declare const useDocyrusClient: typeof getDocyrusClient;
42
+ declare function getKivaClient(): vue.ComputedRef<RestApiClient | null>;
43
+ /** @deprecated Use `getKivaClient()` instead. */
44
+ declare const useKivaClient: typeof getKivaClient;
45
45
  /**
46
- * Vue provider component that wraps your app with Docyrus auth context.
46
+ * Vue provider component that wraps your app with Kiva auth context.
47
47
  *
48
48
  * Usage:
49
49
  * ```vue
50
50
  * <template>
51
- * <DocyrusAuthProvider :apiUrl="apiUrl">
51
+ * <KivaAuthProvider :apiUrl="apiUrl">
52
52
  * <App />
53
- * </DocyrusAuthProvider>
53
+ * </KivaAuthProvider>
54
54
  * </template>
55
55
  *
56
56
  * <script setup>
57
- * import { DocyrusAuthProvider } from '@kivacore/signin/vue';
57
+ * import { KivaAuthProvider } from '@kivacore/signin/vue';
58
58
  * </script>
59
59
  * ```
60
60
  */
61
- declare const DocyrusAuthProvider: vue.DefineComponent<vue.ExtractPropTypes<{
61
+ declare const KivaAuthProvider: vue.DefineComponent<vue.ExtractPropTypes<{
62
62
  clientId: {
63
63
  type: StringConstructor;
64
64
  default: undefined;
@@ -166,7 +166,7 @@ declare const DocyrusAuthProvider: vue.DefineComponent<vue.ExtractPropTypes<{
166
166
  syncRouteToHost: boolean;
167
167
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
168
168
  /**
169
- * "Sign in with Docyrus" button component.
169
+ * "Sign in with Kiva" button component.
170
170
  *
171
171
  * In iframe mode: renders nothing (auth is handled by the host).
172
172
  * When authenticated: renders nothing.
@@ -210,5 +210,136 @@ declare const SignInButton: vue.DefineComponent<vue.ExtractPropTypes<{
210
210
  disabled: boolean;
211
211
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
212
212
 
213
- export { AuthMode, AuthStatus, DocyrusAuthProvider, DocyrusCalendarEventPayload, DocyrusEmailPayload, DocyrusSharePayload, MsGraphClient, SignInButton, getDocyrusAuth, getDocyrusClient, useDocyrusAuth, useDocyrusClient };
214
- export type { DocyrusAuthState };
213
+ /** @deprecated Use `getKivaAuth` instead. */
214
+ declare const getDocyrusAuth: typeof getKivaAuth;
215
+ /** @deprecated Use `getKivaClient` instead. */
216
+ declare const getDocyrusClient: typeof getKivaClient;
217
+ /** @deprecated Use `useKivaAuth` instead. */
218
+ declare const useDocyrusAuth: typeof getKivaAuth;
219
+ /** @deprecated Use `useKivaClient` instead. */
220
+ declare const useDocyrusClient: typeof getKivaClient;
221
+ /** @deprecated Use `KivaAuthProvider` instead. */
222
+ declare const DocyrusAuthProvider: vue.DefineComponent<vue.ExtractPropTypes<{
223
+ clientId: {
224
+ type: StringConstructor;
225
+ default: undefined;
226
+ };
227
+ apiUrl: {
228
+ type: StringConstructor;
229
+ default: undefined;
230
+ };
231
+ scopes: {
232
+ type: PropType<string[]>;
233
+ default: undefined;
234
+ };
235
+ redirectUri: {
236
+ type: StringConstructor;
237
+ default: undefined;
238
+ };
239
+ callbackPath: {
240
+ type: StringConstructor;
241
+ default: undefined;
242
+ };
243
+ allowedHostOrigins: {
244
+ type: PropType<string[]>;
245
+ default: undefined;
246
+ };
247
+ storageKeyPrefix: {
248
+ type: StringConstructor;
249
+ default: undefined;
250
+ };
251
+ tokenStorage: {
252
+ type: PropType<OAuth2TokenStorage>;
253
+ default: undefined;
254
+ };
255
+ forceMode: {
256
+ type: PropType<AuthMode>;
257
+ default: undefined;
258
+ };
259
+ initialTokens: {
260
+ type: PropType<OAuth2Tokens>;
261
+ default: undefined;
262
+ };
263
+ syncRouteToHost: {
264
+ type: BooleanConstructor;
265
+ default: boolean;
266
+ };
267
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
268
+ [key: string]: any;
269
+ }> | vue.VNode<vue.RendererNode, vue.RendererElement, {
270
+ [key: string]: any;
271
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
272
+ clientId: {
273
+ type: StringConstructor;
274
+ default: undefined;
275
+ };
276
+ apiUrl: {
277
+ type: StringConstructor;
278
+ default: undefined;
279
+ };
280
+ scopes: {
281
+ type: PropType<string[]>;
282
+ default: undefined;
283
+ };
284
+ redirectUri: {
285
+ type: StringConstructor;
286
+ default: undefined;
287
+ };
288
+ callbackPath: {
289
+ type: StringConstructor;
290
+ default: undefined;
291
+ };
292
+ allowedHostOrigins: {
293
+ type: PropType<string[]>;
294
+ default: undefined;
295
+ };
296
+ storageKeyPrefix: {
297
+ type: StringConstructor;
298
+ default: undefined;
299
+ };
300
+ tokenStorage: {
301
+ type: PropType<OAuth2TokenStorage>;
302
+ default: undefined;
303
+ };
304
+ forceMode: {
305
+ type: PropType<AuthMode>;
306
+ default: undefined;
307
+ };
308
+ initialTokens: {
309
+ type: PropType<OAuth2Tokens>;
310
+ default: undefined;
311
+ };
312
+ syncRouteToHost: {
313
+ type: BooleanConstructor;
314
+ default: boolean;
315
+ };
316
+ }>> & Readonly<{}>, {
317
+ clientId: string;
318
+ apiUrl: string;
319
+ scopes: string[];
320
+ redirectUri: string;
321
+ callbackPath: string;
322
+ allowedHostOrigins: string[];
323
+ storageKeyPrefix: string;
324
+ tokenStorage: OAuth2TokenStorage;
325
+ forceMode: AuthMode;
326
+ initialTokens: OAuth2Tokens;
327
+ syncRouteToHost: boolean;
328
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
329
+ /** @deprecated Use `KivaSharePayload` instead. */
330
+ type DocyrusSharePayload = KivaSharePayload;
331
+ /** @deprecated Use `KivaShareTextPayload` instead. */
332
+ type DocyrusShareTextPayload = KivaShareTextPayload;
333
+ /** @deprecated Use `KivaShareAdaptiveCardPayload` instead. */
334
+ type DocyrusShareAdaptiveCardPayload = KivaShareAdaptiveCardPayload;
335
+ /** @deprecated Use `KivaEmailPayload` instead. */
336
+ type DocyrusEmailPayload = KivaEmailPayload;
337
+ /** @deprecated Use `KivaCalendarEventPayload` instead. */
338
+ type DocyrusCalendarEventPayload = KivaCalendarEventPayload;
339
+ /** @deprecated Use `KivaAuthState` instead. */
340
+ type DocyrusAuthState = KivaAuthState;
341
+ /** @deprecated Use `KivaAuthConfig` instead. */
342
+ type DocyrusAuthConfig = KivaAuthConfig;
343
+
344
+ export { AuthMode, AuthStatus, DocyrusAuthProvider, KivaAuthConfig, KivaAuthProvider, KivaCalendarEventPayload, KivaEmailPayload, KivaShareAdaptiveCardPayload, KivaSharePayload, KivaShareTextPayload, MsGraphClient, SignInButton, getDocyrusAuth, getDocyrusClient, getKivaAuth, getKivaClient, useDocyrusAuth, useDocyrusClient, useKivaAuth, useKivaClient };
345
+ export type { DocyrusAuthConfig, DocyrusAuthState, DocyrusCalendarEventPayload, DocyrusEmailPayload, DocyrusShareAdaptiveCardPayload, DocyrusSharePayload, DocyrusShareTextPayload, KivaAuthState };