@ai-matrx/vault 0.1.9 → 0.1.11

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/dist/index.d.cts CHANGED
@@ -122,6 +122,19 @@ declare function locationFromParams(params: URLSearchParams, itemId?: string | n
122
122
  declare function locationToParams(loc: VaultLocation): URLSearchParams;
123
123
  /** The one search every list shares: name, type, tags, URLs, then plaintext custom fields. */
124
124
  declare function matchesQuery(item: VaultItem, query: string): boolean;
125
+ /**
126
+ * The authenticator's own storage on an item (the seed, digits, period, issuer…): shown only as the
127
+ * one "One-time password" row, never as loose fields — and always kept when the item is saved.
128
+ */
129
+ /**
130
+ * A vault item a host keeps for itself, never shown in any list (the desktop app's Touch ID key:
131
+ * its one-time-password factor's secret, so each of the person's computers can read it). Marked by
132
+ * this tag; the person's own vault holds it like any other item, encrypted by the server.
133
+ */
134
+ declare const HIDDEN_ITEM_TAG = "matrx:hidden";
135
+ declare const isHiddenItem: (item: {
136
+ tags?: readonly string[] | null;
137
+ }) => boolean;
125
138
  /** An item's website as people read it: `github.com` (no scheme, no `www.`), or "" when it has none. */
126
139
  declare function loginSiteOf(item: Pick<VaultItem, "loginUrls">): string;
127
140
  declare function sortItems(items: readonly VaultItem[], sort: VaultSort): VaultItem[];
@@ -228,8 +241,13 @@ interface IdentityAccount {
228
241
  }
229
242
  interface VaultIdentity {
230
243
  account(): Promise<IdentityAccount>;
231
- /** Leaves the page for the provider and comes back to the same address (the URL carries everything). */
232
- withProvider(provider: string): Promise<void>;
244
+ /**
245
+ * Confirms with that provider. On the web it leaves the page and comes back to the same address
246
+ * (resolves with nothing: the page is going away). A host that confirms IN PLACE (the desktop's
247
+ * Touch ID, a browser sign-in it waits for) resolves `"confirmed"`, and the gate closes and runs
248
+ * the refused call again — one confirmation, never a second click.
249
+ */
250
+ withProvider(provider: string): Promise<void | "confirmed">;
233
251
  withPassword(password: string): Promise<void>;
234
252
  sendEmailCode(): Promise<void>;
235
253
  withEmailCode(code: string): Promise<void>;
@@ -1247,4 +1265,4 @@ declare function GenerateButton({ onUse, label, limits, disabled }: {
1247
1265
  disabled?: boolean;
1248
1266
  }): react.JSX.Element | null;
1249
1267
 
1250
- export { type ApiVaultPortOptions, CATEGORIES, type CategoryId, type CopyOptions, DEFAULT_LOCATION, type DefinitionField, type FieldHandling, type FieldKind, GenerateButton, type IdentityAccount, type IdentityMethod, type ItemDraft, LOCKED_MESSAGE, type NoticeKind, type Notify, type SaveResult, type SupabaseAuthLike, type TotpReading, type UriMatchMode, type UrlGuess, VaultApp, type VaultAppProps, type VaultAttachment, type VaultAuthenticator, type VaultClipboard, type VaultCustomField, type VaultDefinition, type VaultField, type VaultHostCapabilities, type VaultIdentity, type VaultItem, type VaultItemCapabilities, type VaultKnobs, type VaultLayout, type VaultLocation, type VaultLock, VaultLockedError, type VaultOrganizationRef, type VaultOwner, type VaultPort, type VaultSelection, type VaultSnapshot, type VaultSort, type VaultUserStateDoor, categoryOf, copyValue, createApiVaultPort, createSupabaseIdentity, createVaultKnobs, guardPort, inferFromUrl, locationFromParams, locationToParams, loginSiteOf, matchesQuery, needsRecentSignIn, parseDefinitions, sortItems };
1268
+ export { type ApiVaultPortOptions, CATEGORIES, type CategoryId, type CopyOptions, DEFAULT_LOCATION, type DefinitionField, type FieldHandling, type FieldKind, GenerateButton, HIDDEN_ITEM_TAG, type IdentityAccount, type IdentityMethod, type ItemDraft, LOCKED_MESSAGE, type NoticeKind, type Notify, type SaveResult, type SupabaseAuthLike, type TotpReading, type UriMatchMode, type UrlGuess, VaultApp, type VaultAppProps, type VaultAttachment, type VaultAuthenticator, type VaultClipboard, type VaultCustomField, type VaultDefinition, type VaultField, type VaultHostCapabilities, type VaultIdentity, type VaultItem, type VaultItemCapabilities, type VaultKnobs, type VaultLayout, type VaultLocation, type VaultLock, VaultLockedError, type VaultOrganizationRef, type VaultOwner, type VaultPort, type VaultSelection, type VaultSnapshot, type VaultSort, type VaultUserStateDoor, categoryOf, copyValue, createApiVaultPort, createSupabaseIdentity, createVaultKnobs, guardPort, inferFromUrl, isHiddenItem, locationFromParams, locationToParams, loginSiteOf, matchesQuery, needsRecentSignIn, parseDefinitions, sortItems };
package/dist/index.d.ts CHANGED
@@ -122,6 +122,19 @@ declare function locationFromParams(params: URLSearchParams, itemId?: string | n
122
122
  declare function locationToParams(loc: VaultLocation): URLSearchParams;
123
123
  /** The one search every list shares: name, type, tags, URLs, then plaintext custom fields. */
124
124
  declare function matchesQuery(item: VaultItem, query: string): boolean;
125
+ /**
126
+ * The authenticator's own storage on an item (the seed, digits, period, issuer…): shown only as the
127
+ * one "One-time password" row, never as loose fields — and always kept when the item is saved.
128
+ */
129
+ /**
130
+ * A vault item a host keeps for itself, never shown in any list (the desktop app's Touch ID key:
131
+ * its one-time-password factor's secret, so each of the person's computers can read it). Marked by
132
+ * this tag; the person's own vault holds it like any other item, encrypted by the server.
133
+ */
134
+ declare const HIDDEN_ITEM_TAG = "matrx:hidden";
135
+ declare const isHiddenItem: (item: {
136
+ tags?: readonly string[] | null;
137
+ }) => boolean;
125
138
  /** An item's website as people read it: `github.com` (no scheme, no `www.`), or "" when it has none. */
126
139
  declare function loginSiteOf(item: Pick<VaultItem, "loginUrls">): string;
127
140
  declare function sortItems(items: readonly VaultItem[], sort: VaultSort): VaultItem[];
@@ -228,8 +241,13 @@ interface IdentityAccount {
228
241
  }
229
242
  interface VaultIdentity {
230
243
  account(): Promise<IdentityAccount>;
231
- /** Leaves the page for the provider and comes back to the same address (the URL carries everything). */
232
- withProvider(provider: string): Promise<void>;
244
+ /**
245
+ * Confirms with that provider. On the web it leaves the page and comes back to the same address
246
+ * (resolves with nothing: the page is going away). A host that confirms IN PLACE (the desktop's
247
+ * Touch ID, a browser sign-in it waits for) resolves `"confirmed"`, and the gate closes and runs
248
+ * the refused call again — one confirmation, never a second click.
249
+ */
250
+ withProvider(provider: string): Promise<void | "confirmed">;
233
251
  withPassword(password: string): Promise<void>;
234
252
  sendEmailCode(): Promise<void>;
235
253
  withEmailCode(code: string): Promise<void>;
@@ -1247,4 +1265,4 @@ declare function GenerateButton({ onUse, label, limits, disabled }: {
1247
1265
  disabled?: boolean;
1248
1266
  }): react.JSX.Element | null;
1249
1267
 
1250
- export { type ApiVaultPortOptions, CATEGORIES, type CategoryId, type CopyOptions, DEFAULT_LOCATION, type DefinitionField, type FieldHandling, type FieldKind, GenerateButton, type IdentityAccount, type IdentityMethod, type ItemDraft, LOCKED_MESSAGE, type NoticeKind, type Notify, type SaveResult, type SupabaseAuthLike, type TotpReading, type UriMatchMode, type UrlGuess, VaultApp, type VaultAppProps, type VaultAttachment, type VaultAuthenticator, type VaultClipboard, type VaultCustomField, type VaultDefinition, type VaultField, type VaultHostCapabilities, type VaultIdentity, type VaultItem, type VaultItemCapabilities, type VaultKnobs, type VaultLayout, type VaultLocation, type VaultLock, VaultLockedError, type VaultOrganizationRef, type VaultOwner, type VaultPort, type VaultSelection, type VaultSnapshot, type VaultSort, type VaultUserStateDoor, categoryOf, copyValue, createApiVaultPort, createSupabaseIdentity, createVaultKnobs, guardPort, inferFromUrl, locationFromParams, locationToParams, loginSiteOf, matchesQuery, needsRecentSignIn, parseDefinitions, sortItems };
1268
+ export { type ApiVaultPortOptions, CATEGORIES, type CategoryId, type CopyOptions, DEFAULT_LOCATION, type DefinitionField, type FieldHandling, type FieldKind, GenerateButton, HIDDEN_ITEM_TAG, type IdentityAccount, type IdentityMethod, type ItemDraft, LOCKED_MESSAGE, type NoticeKind, type Notify, type SaveResult, type SupabaseAuthLike, type TotpReading, type UriMatchMode, type UrlGuess, VaultApp, type VaultAppProps, type VaultAttachment, type VaultAuthenticator, type VaultClipboard, type VaultCustomField, type VaultDefinition, type VaultField, type VaultHostCapabilities, type VaultIdentity, type VaultItem, type VaultItemCapabilities, type VaultKnobs, type VaultLayout, type VaultLocation, type VaultLock, VaultLockedError, type VaultOrganizationRef, type VaultOwner, type VaultPort, type VaultSelection, type VaultSnapshot, type VaultSort, type VaultUserStateDoor, categoryOf, copyValue, createApiVaultPort, createSupabaseIdentity, createVaultKnobs, guardPort, inferFromUrl, isHiddenItem, locationFromParams, locationToParams, loginSiteOf, matchesQuery, needsRecentSignIn, parseDefinitions, sortItems };