@eweser/shared
Advanced tools
Comparing version 1.9.0 to 1.10.0
@@ -7,4 +7,5 @@ export * from './note'; | ||
export const COLLECTION_KEYS = ['notes', 'flashcards', 'profiles']; | ||
export const COLLECTION_KEYS_OR_ALL = [...COLLECTION_KEYS, 'all']; | ||
export const PUBLIC_ACCESS_TYPES = ['private', 'read', 'write']; | ||
export const collectionKeys = COLLECTION_KEYS.map((key) => key); | ||
//# sourceMappingURL=index.js.map |
export * from './collections'; | ||
export * from './utils'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@eweser/shared", | ||
"version": "1.9.0", | ||
"version": "1.10.0", | ||
"description": "shared types and helpers for @eweser/db and other @eweser packages", | ||
@@ -32,3 +32,3 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"build": "rm -rf ./dist; tsc", | ||
"build": "rm -rf ./dist; rm -rf ./types; tsc", | ||
"dev": "tsc -w", | ||
@@ -38,7 +38,7 @@ "clean": "rm -rf ./dist; rm -rf ./types" | ||
"devDependencies": { | ||
"@eweser/eslint-config-ts": "^1.9.0", | ||
"@eweser/eslint-config-ts": "^1.10.0", | ||
"request": "^2.88.2", | ||
"typescript": "^4.4.4" | ||
}, | ||
"gitHead": "530ba6df6de46383e16b33a8310ef4a776ce995f" | ||
"gitHead": "ac9a473da4e4f27fa23e8f6c3f87d0b1ec99f76c" | ||
} |
@@ -11,6 +11,8 @@ import type { DocumentBase } from './documentBase'; | ||
export declare const COLLECTION_KEYS: readonly ["notes", "flashcards", "profiles"]; | ||
export declare const COLLECTION_KEYS_OR_ALL: readonly ["notes", "flashcards", "profiles", "all"]; | ||
export declare const PUBLIC_ACCESS_TYPES: readonly ["private", "read", "write"]; | ||
export declare const collectionKeys: ("notes" | "flashcards" | "profiles")[]; | ||
export type Document = Note | Flashcard | Profile; | ||
export type EweDocument = Note | Flashcard | Profile; | ||
export type CollectionKey = (typeof COLLECTION_KEYS)[number]; | ||
export type DocumentWithoutBase<T extends Document> = Omit<T, keyof DocumentBase>; | ||
export type CollectionKeyOrAll = (typeof COLLECTION_KEYS_OR_ALL)[number]; | ||
export type DocumentWithoutBase<T extends EweDocument> = Omit<T, keyof DocumentBase>; |
@@ -0,6 +1,10 @@ | ||
import type { CollectionKey, CollectionKeyOrAll } from './collections'; | ||
export * from './collections'; | ||
export * from './utils'; | ||
export type LoginQueryOptions = { | ||
redirect: string; | ||
domain: string; | ||
collections: string[]; | ||
collections: CollectionKeyOrAll[]; | ||
/** app name */ | ||
name: string; | ||
}; | ||
@@ -10,11 +14,14 @@ export type LoginQueryParams = { | ||
domain: string; | ||
/** collections array string joined with '|' */ | ||
/** CollectionOrAll array string joined with '|' */ | ||
collections: string; | ||
/** app name */ | ||
name: string; | ||
}; | ||
/** Should match the rooms schema in the auth-server. Unfortunately we can't see the null values as undefined or else drizzle types will be out of sync. */ | ||
export type ServerRoom = { | ||
id: string; | ||
name: string; | ||
collectionKey: 'notes' | 'flashcards' | 'profiles'; | ||
token?: string | null; | ||
ySweetUrl?: string | null; | ||
collectionKey: CollectionKey; | ||
token: string | null; | ||
ySweetUrl: string | null; | ||
publicAccess: 'private' | 'read' | 'write'; | ||
@@ -24,6 +31,6 @@ readAccess: string[]; | ||
adminAccess: string[]; | ||
createdAt: string; | ||
createdAt: string | null; | ||
updatedAt: string | null; | ||
_deleted?: boolean; | ||
_ttl?: string | null; | ||
_deleted: boolean | null; | ||
_ttl: string | null; | ||
}; | ||
@@ -30,0 +37,0 @@ export type RegistrySyncRequestBody = { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23
8361
124
1