@ai-matrx/vault 0.1.10 → 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/CHANGELOG.md +24 -1
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
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[];
|
|
@@ -1252,4 +1265,4 @@ declare function GenerateButton({ onUse, label, limits, disabled }: {
|
|
|
1252
1265
|
disabled?: boolean;
|
|
1253
1266
|
}): react.JSX.Element | null;
|
|
1254
1267
|
|
|
1255
|
-
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[];
|
|
@@ -1252,4 +1265,4 @@ declare function GenerateButton({ onUse, label, limits, disabled }: {
|
|
|
1252
1265
|
disabled?: boolean;
|
|
1253
1266
|
}): react.JSX.Element | null;
|
|
1254
1267
|
|
|
1255
|
-
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.js
CHANGED
|
@@ -798,6 +798,8 @@ function matchesQuery(item, query) {
|
|
|
798
798
|
if (!q) return true;
|
|
799
799
|
return [item.name, item.definitionLabel, ...item.tags, ...item.loginUrls, ...item.custom.map((c) => `${c.label} ${c.value}`)].some((h) => h.toLowerCase().includes(q));
|
|
800
800
|
}
|
|
801
|
+
var HIDDEN_ITEM_TAG = "matrx:hidden";
|
|
802
|
+
var isHiddenItem = (item) => (item.tags ?? []).includes(HIDDEN_ITEM_TAG);
|
|
801
803
|
var isAuthenticatorStorage = (key) => key === "totp_seed" || key.startsWith("totp_") || key === "authenticator_last_time_step";
|
|
802
804
|
function loginSiteOf(item) {
|
|
803
805
|
const raw = item.loginUrls[0];
|
|
@@ -8791,7 +8793,7 @@ function createApiVaultPort(api, options = {}) {
|
|
|
8791
8793
|
lists.forEach((l, i) => {
|
|
8792
8794
|
const sharedList = i === lists.length - 1;
|
|
8793
8795
|
for (const w of l.items) {
|
|
8794
|
-
if (seen.has(w.id) || deleted.has(w.id)) continue;
|
|
8796
|
+
if (seen.has(w.id) || deleted.has(w.id) || isHiddenItem(w)) continue;
|
|
8795
8797
|
const owner = sharedList ? orgOf(w.organization_id, null, false) : orgOf(w.organization_id, w.user_id, i === 0);
|
|
8796
8798
|
const item = itemOf(w, sharedList && !w.organization_id ? { kind: "shared", label: "Shared with me", organizationId: null } : owner, defs, auth);
|
|
8797
8799
|
(isDeleted(w) ? deleted : seen).set(w.id, item);
|
|
@@ -8902,6 +8904,7 @@ export {
|
|
|
8902
8904
|
CATEGORIES,
|
|
8903
8905
|
DEFAULT_LOCATION,
|
|
8904
8906
|
GenerateButton,
|
|
8907
|
+
HIDDEN_ITEM_TAG,
|
|
8905
8908
|
LOCKED_MESSAGE,
|
|
8906
8909
|
VaultApp,
|
|
8907
8910
|
VaultLockedError,
|
|
@@ -8912,6 +8915,7 @@ export {
|
|
|
8912
8915
|
createVaultKnobs,
|
|
8913
8916
|
guardPort,
|
|
8914
8917
|
inferFromUrl,
|
|
8918
|
+
isHiddenItem,
|
|
8915
8919
|
locationFromParams,
|
|
8916
8920
|
locationToParams,
|
|
8917
8921
|
loginSiteOf,
|