@nymbalhq/platform 0.2.0 → 1.1.0
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/{chunk-74KODSYJ.js → chunk-2GFZHF5W.js} +99 -16
- package/dist/chunk-2GFZHF5W.js.map +1 -0
- package/dist/index.d.ts +132 -63
- package/dist/index.js +1276 -823
- package/dist/index.js.map +1 -1
- package/dist/{register-IVFYBJSX.js → register-FJA7YJV3.js} +2 -2
- package/migrations/postgres/0007_native_search.sql +12 -0
- package/migrations/postgres/meta/0007_snapshot.json +1598 -0
- package/migrations/postgres/meta/_journal.json +7 -0
- package/migrations/sqlite/0007_native_search.sql +39 -0
- package/migrations/sqlite/meta/0007_snapshot.json +1470 -0
- package/migrations/sqlite/meta/_journal.json +7 -0
- package/package.json +48 -10
- package/recipes/postgres.json +17 -0
- package/dist/chunk-74KODSYJ.js.map +0 -1
- /package/dist/{register-IVFYBJSX.js.map → register-FJA7YJV3.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { NymbalConfig } from '@nymbalhq/config';
|
|
2
|
-
import { Logger, DocumentStoreAdapter, EventBusAdapter, Product, ProductStatus, ProductType, ProductMedia, Variant, VariantDimensions, VariantOption, VariantStatus, Category, Customer, Role, CustomerAddress, Order, OrderStatus, Address, OrderLineItem, CaptureMethod, OrderHistoryEntry, OrderRefundStatus, OrderRefund, InventoryReservation, StockAdjustmentReason, StockAdjustment, Review, ReviewModerationStatus, NymbalEvent, Cart, PutOptions, QueryParams, QueryResult, EventHandler, SubscriptionConfig, Subscription, NymbalEnvironment, NymbalEventType, NymbalEventMap,
|
|
2
|
+
import { Logger, DocumentStoreAdapter, EventBusAdapter, MediaStorage, Product, ProductStatus, ProductType, ProductMedia, Variant, VariantDimensions, VariantOption, VariantStatus, Category, Customer, Role, CustomerAddress, Order, OrderStatus, Address, OrderLineItem, CaptureMethod, OrderHistoryEntry, OrderRefundStatus, OrderRefund, InventoryReservation, StockAdjustmentReason, StockAdjustment, Review, ReviewModerationStatus, NymbalEvent, Cart, HealthReport, PutOptions, QueryParams, QueryResult, EventHandler, SubscriptionConfig, Subscription, NymbalEnvironment, NymbalEventType, NymbalEventMap, CommerceSlotAdapters, SecurityAdapter, AiAdapter, PaymentsAdapter, ProductSnapshot, CartItem, StockStatus, PaymentIntent, CheckoutPayment, SearchParams, SearchResult, SearchAdapter, OrderPayment, Refund, HttpAdapter, CommerceSlot, Slot, RateLimitAction, SecurityConfigLike, EmailAdapter, ReviewsAdapter, AnalyticsAdapter, ShippingAdapter, TaxAdapter, HealthStatus } from '@nymbalhq/types';
|
|
3
|
+
export { MediaStorage } from '@nymbalhq/types';
|
|
3
4
|
import BetterSqlite3 from 'better-sqlite3';
|
|
4
5
|
import pg from 'pg';
|
|
5
6
|
import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
|
|
6
7
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
7
|
-
import {
|
|
8
|
+
import { sqliteSchema, postgresSchema } from './db/schema/index.js';
|
|
8
9
|
import { JWTPayload } from 'jose';
|
|
9
10
|
import { ZodTypeAny } from 'zod';
|
|
10
11
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -54,9 +55,16 @@ type RawClients = {
|
|
|
54
55
|
interface CommandStoreOptions {
|
|
55
56
|
sqlitePath?: string;
|
|
56
57
|
postgresUrl?: string;
|
|
58
|
+
/**
|
|
59
|
+
* For a caller that must change nothing: SQLite opens `readonly` on a file that must already exist, with no pragma
|
|
60
|
+
* (`journal_mode = WAL` rewrites a rollback-mode file's header); Postgres runs every transaction read-only.
|
|
61
|
+
*/
|
|
62
|
+
readOnly?: boolean;
|
|
57
63
|
}
|
|
58
64
|
/** For migrations, seeding and tests only; no repository or service imports it. */
|
|
59
65
|
declare function rawClients(store: CommandStore): RawClients;
|
|
66
|
+
/** The SQLite file a store opens: `sqlitePath`, else `NYMBAL_SQLITE_PATH`, else `./nymbal.db`. */
|
|
67
|
+
declare function sqliteFile(options?: CommandStoreOptions): string;
|
|
60
68
|
declare function createCommandStore(config: NymbalConfig, options?: CommandStoreOptions): CommandStore;
|
|
61
69
|
|
|
62
70
|
interface Platform {
|
|
@@ -64,15 +72,41 @@ interface Platform {
|
|
|
64
72
|
commandStore: CommandStore;
|
|
65
73
|
documentStore: DocumentStoreAdapter;
|
|
66
74
|
eventBus: EventBusAdapter;
|
|
75
|
+
media: MediaStorage;
|
|
67
76
|
logger: Logger;
|
|
68
77
|
close(): Promise<void>;
|
|
69
78
|
}
|
|
70
|
-
|
|
79
|
+
/** Where the command store is, and the logger; what `createApp` and `resolvePrimitives` take as well. */
|
|
80
|
+
interface PlatformConnectionOptions {
|
|
71
81
|
logger?: Logger;
|
|
72
82
|
sqlitePath?: string;
|
|
73
83
|
postgresUrl?: string;
|
|
74
84
|
}
|
|
75
|
-
|
|
85
|
+
/** The infrastructure primitives, as instances: `resolvePrimitives` builds them from the config. */
|
|
86
|
+
interface Primitives {
|
|
87
|
+
documentStore: DocumentStoreAdapter;
|
|
88
|
+
eventBus: EventBusAdapter;
|
|
89
|
+
media: MediaStorage;
|
|
90
|
+
}
|
|
91
|
+
interface CreatePlatformOptions extends PlatformConnectionOptions, Primitives {
|
|
92
|
+
}
|
|
93
|
+
interface ResolvePrimitivesOptions extends PlatformConnectionOptions {
|
|
94
|
+
/** Where local-fs media is written; `public/imported-media` under the working directory by default. */
|
|
95
|
+
mediaRoot?: string;
|
|
96
|
+
env?: NodeJS.ProcessEnv;
|
|
97
|
+
}
|
|
98
|
+
declare const REDIS_DEFAULTS: {
|
|
99
|
+
readonly prefix: "nymbal";
|
|
100
|
+
readonly ackTimeoutMs: 15000;
|
|
101
|
+
readonly claimIdleMs: 5000;
|
|
102
|
+
readonly streamMaxLen: 10000;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* The document store, event bus and media storage the config names. A primitive that lives in its own package is
|
|
106
|
+
* imported only when named; a missing package fails `adapter.package_missing` with the install line.
|
|
107
|
+
*/
|
|
108
|
+
declare function resolvePrimitives(config: NymbalConfig, options?: ResolvePrimitivesOptions): Promise<Primitives>;
|
|
109
|
+
declare function createPlatform(config: NymbalConfig, options: CreatePlatformOptions): Platform;
|
|
76
110
|
|
|
77
111
|
interface MigrateOptions {
|
|
78
112
|
migrationsRoot?: string;
|
|
@@ -597,6 +631,9 @@ interface InMemoryDocumentStoreOptions {
|
|
|
597
631
|
declare class InMemoryDocumentStore implements DocumentStoreAdapter {
|
|
598
632
|
#private;
|
|
599
633
|
constructor(options?: InMemoryDocumentStoreOptions);
|
|
634
|
+
capabilities(): readonly string[];
|
|
635
|
+
/** The process's own memory: healthy whenever it can answer. */
|
|
636
|
+
healthCheck(): Promise<HealthReport>;
|
|
600
637
|
get<T>(collection: string, key: string): Promise<T | null>;
|
|
601
638
|
put<T>(collection: string, key: string, document: T, options?: PutOptions): Promise<void>;
|
|
602
639
|
delete(collection: string, key: string): Promise<void>;
|
|
@@ -606,14 +643,15 @@ declare class InMemoryDocumentStore implements DocumentStoreAdapter {
|
|
|
606
643
|
close(): Promise<void>;
|
|
607
644
|
}
|
|
608
645
|
|
|
609
|
-
declare function createDocumentStore(config: NymbalConfig): DocumentStoreAdapter;
|
|
610
|
-
|
|
611
646
|
interface InProcessEventBusOptions {
|
|
612
647
|
logger?: Logger;
|
|
613
648
|
}
|
|
614
649
|
declare class InProcessEventBus implements EventBusAdapter {
|
|
615
650
|
#private;
|
|
616
651
|
constructor(options?: InProcessEventBusOptions);
|
|
652
|
+
capabilities(): readonly string[];
|
|
653
|
+
/** Delivery within the process: healthy whenever it can answer. */
|
|
654
|
+
healthCheck(): Promise<HealthReport>;
|
|
617
655
|
publish<T>(event: NymbalEvent<T>): Promise<void>;
|
|
618
656
|
publishBatch(events: NymbalEvent<unknown>[]): Promise<void>;
|
|
619
657
|
replay(events: NymbalEvent<unknown>[]): Promise<void>;
|
|
@@ -622,8 +660,6 @@ declare class InProcessEventBus implements EventBusAdapter {
|
|
|
622
660
|
close(): Promise<void>;
|
|
623
661
|
}
|
|
624
662
|
|
|
625
|
-
declare function createEventBus(config: NymbalConfig, logger?: Logger): EventBusAdapter;
|
|
626
|
-
|
|
627
663
|
interface EventBuilderContext {
|
|
628
664
|
storeId: string;
|
|
629
665
|
environment: NymbalEnvironment;
|
|
@@ -646,6 +682,12 @@ interface Relay {
|
|
|
646
682
|
/** Stops the interval and starts no new pass; resolves when the pass in flight, if any, has finished, so the
|
|
647
683
|
* store can be closed without cutting a delivery off between the handler and its bookkeeping. */
|
|
648
684
|
stop(): Promise<void>;
|
|
685
|
+
/**
|
|
686
|
+
* `handler`, run as part of a delivery: a drain it asks for (by running a command) returns at once instead of
|
|
687
|
+
* waiting on the pass that waits on it. The app wraps every subscribed handler in it, so this holds whether the bus
|
|
688
|
+
* calls the handler inside `publish` or from a consumer loop of its own.
|
|
689
|
+
*/
|
|
690
|
+
asDelivery(handler: EventHandler): EventHandler;
|
|
649
691
|
}
|
|
650
692
|
interface CreateRelayOptions {
|
|
651
693
|
store: CommandStore;
|
|
@@ -688,28 +730,25 @@ interface IdempotencyOptions {
|
|
|
688
730
|
}
|
|
689
731
|
declare function withIdempotency<T = unknown>(handlerName: string, handler: EventHandler<T>, { repo, logger }: IdempotencyOptions): EventHandler<T>;
|
|
690
732
|
|
|
691
|
-
|
|
733
|
+
/** One adapter per commerce slot. */
|
|
734
|
+
type CommerceAdapters = CommerceSlotAdapters;
|
|
735
|
+
/** Adapters a project hands `createApp`, each for a slot whose provider is `custom`. */
|
|
736
|
+
type InjectedAdapters = Partial<CommerceAdapters>;
|
|
737
|
+
interface AdapterRegistry extends Omit<CommerceAdapters, 'ai'> {
|
|
692
738
|
security: SecurityAdapter;
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
search: SearchAdapter;
|
|
696
|
-
reviews: ReviewsAdapter;
|
|
697
|
-
analytics: AnalyticsAdapter;
|
|
698
|
-
shipping: ShippingAdapter;
|
|
699
|
-
tax: TaxAdapter;
|
|
700
|
-
ai: AiAdapter;
|
|
739
|
+
/** `null` when the config's ai provider is `none`. */
|
|
740
|
+
ai: AiAdapter | null;
|
|
701
741
|
}
|
|
702
742
|
interface BuildAdaptersDeps {
|
|
703
743
|
config: NymbalConfig;
|
|
704
744
|
logger: Logger;
|
|
705
|
-
|
|
745
|
+
/** The command store's own connection: the native search index lives in its database. */
|
|
746
|
+
sql: RawClients;
|
|
706
747
|
repos: Repositories;
|
|
748
|
+
injected?: InjectedAdapters;
|
|
749
|
+
/** The payments adapter `createApp` resolved before it opened the store. */
|
|
750
|
+
payments: PaymentsAdapter;
|
|
707
751
|
}
|
|
708
|
-
/**
|
|
709
|
-
* The `providerName` of the payments adapter a configured provider resolves to. A provider with no adapter of its
|
|
710
|
-
* own falls back to the stub, which verifies no webhook signature.
|
|
711
|
-
*/
|
|
712
|
-
declare function paymentsAdapterFor(provider: string): 'stripe' | 'native-stub';
|
|
713
752
|
declare function buildAdapters(deps: BuildAdaptersDeps): Promise<AdapterRegistry>;
|
|
714
753
|
|
|
715
754
|
interface RegisterHandlersDeps {
|
|
@@ -1143,13 +1182,23 @@ interface NymbalApp {
|
|
|
1143
1182
|
* or null for a 404 that says how to build it) or `NYMBAL_ADMIN_DIST` is set.
|
|
1144
1183
|
*/
|
|
1145
1184
|
attachHttp(adapter: HttpAdapter, options?: AttachHttpOptions): Promise<void>;
|
|
1185
|
+
/** Each slot's provider and its adapter's own `capabilities()`; an ai slot of `none` offers nothing. */
|
|
1186
|
+
capabilities(): CapabilitiesReport;
|
|
1146
1187
|
stop(): Promise<void>;
|
|
1147
1188
|
}
|
|
1189
|
+
type CapabilitySlot = CommerceSlot | 'security' | 'documentStore' | 'eventBus' | 'media';
|
|
1190
|
+
interface SlotCapabilities {
|
|
1191
|
+
provider: string;
|
|
1192
|
+
capabilities: readonly string[];
|
|
1193
|
+
}
|
|
1194
|
+
type CapabilitiesReport = Record<CapabilitySlot, SlotCapabilities>;
|
|
1148
1195
|
interface AttachHttpOptions {
|
|
1149
1196
|
adminRoot?: string | null;
|
|
1150
1197
|
}
|
|
1151
|
-
interface CreateAppOptions extends
|
|
1198
|
+
interface CreateAppOptions extends ResolvePrimitivesOptions {
|
|
1152
1199
|
version?: string;
|
|
1200
|
+
/** The project's own adapters, one per slot whose provider is `custom`. */
|
|
1201
|
+
adapters?: InjectedAdapters;
|
|
1153
1202
|
}
|
|
1154
1203
|
declare function createApp(config: NymbalConfig, options?: CreateAppOptions): Promise<NymbalApp>;
|
|
1155
1204
|
|
|
@@ -1202,6 +1251,21 @@ interface EventRetentionSweeperDeps {
|
|
|
1202
1251
|
/** Deletes delivered events and processed-event records older than the window; undelivered and dead events stay. */
|
|
1203
1252
|
declare function startEventRetentionSweeper(deps: EventRetentionSweeperDeps): SweeperHandle;
|
|
1204
1253
|
|
|
1254
|
+
interface ProviderPackage {
|
|
1255
|
+
/** The adapter package, which exports `createAdapter(ctx: AdapterContext)`. */
|
|
1256
|
+
package: string;
|
|
1257
|
+
/** The provider SDK the package peers, which the project installs beside it. */
|
|
1258
|
+
sdk: string;
|
|
1259
|
+
}
|
|
1260
|
+
/**
|
|
1261
|
+
* The providers that live in their own package, by slot then provider. The kernel imports a package only when the
|
|
1262
|
+
* config names its provider; `native`, `none`, `custom` and the kernel's own primitives (`in-memory`, `in-process`,
|
|
1263
|
+
* `local-fs`) have no entry.
|
|
1264
|
+
*/
|
|
1265
|
+
declare const PROVIDER_PACKAGES: Readonly<Partial<Record<Slot, Readonly<Record<string, ProviderPackage>>>>>;
|
|
1266
|
+
/** The command that installs `packages` with the project's package manager, as `packageManager` picks it. */
|
|
1267
|
+
declare function installLine(packages: readonly string[], env: NodeJS.ProcessEnv, cwd: string): string;
|
|
1268
|
+
|
|
1205
1269
|
/**
|
|
1206
1270
|
* v0.1 security adapter.
|
|
1207
1271
|
*
|
|
@@ -1234,22 +1298,6 @@ declare function buildSecurityHeaders(security: SecurityConfigLike): Record<stri
|
|
|
1234
1298
|
declare const CSRF_COOKIE = "nymbal.csrf";
|
|
1235
1299
|
declare const CSRF_HEADER = "x-csrf-token";
|
|
1236
1300
|
|
|
1237
|
-
interface StripePaymentsConfig {
|
|
1238
|
-
secretKey: string;
|
|
1239
|
-
webhookSecret: string;
|
|
1240
|
-
apiVersion?: string;
|
|
1241
|
-
/** Override the Stripe API host (for stripe-mock style test servers). Omit in production. */
|
|
1242
|
-
host?: string;
|
|
1243
|
-
/** Override the Stripe API port. Only used together with `host`. */
|
|
1244
|
-
port?: number;
|
|
1245
|
-
/** Override the Stripe API protocol. Defaults to https when omitted. */
|
|
1246
|
-
protocol?: 'http' | 'https';
|
|
1247
|
-
}
|
|
1248
|
-
declare function createStripePaymentsAdapter(deps: {
|
|
1249
|
-
logger: Logger;
|
|
1250
|
-
config: StripePaymentsConfig;
|
|
1251
|
-
}): PaymentsAdapter;
|
|
1252
|
-
|
|
1253
1301
|
/**
|
|
1254
1302
|
* Deterministic payments adapter for local development without Stripe keys.
|
|
1255
1303
|
* Every intent succeeds at creation unless the receipt email asks otherwise (`statusFor`); webhook verification is a
|
|
@@ -1260,24 +1308,25 @@ declare function createNativeStubPaymentsAdapter(deps: {
|
|
|
1260
1308
|
logger: Logger;
|
|
1261
1309
|
}): PaymentsAdapter;
|
|
1262
1310
|
|
|
1311
|
+
/** The native provider logs mail to the console; SMTP is the `smtp` provider (@nymbalhq/adapter-smtp). */
|
|
1263
1312
|
interface NativeEmailAdapterConfig {
|
|
1264
|
-
transport?: 'console'
|
|
1313
|
+
transport?: 'console';
|
|
1265
1314
|
from?: string;
|
|
1266
|
-
smtp?: {
|
|
1267
|
-
host: string;
|
|
1268
|
-
port: number;
|
|
1269
|
-
user?: string;
|
|
1270
|
-
pass?: string;
|
|
1271
|
-
secure?: boolean;
|
|
1272
|
-
};
|
|
1273
1315
|
}
|
|
1274
1316
|
declare function createNativeEmailAdapter(deps: {
|
|
1275
1317
|
logger: Logger;
|
|
1276
1318
|
config?: NativeEmailAdapterConfig;
|
|
1277
1319
|
}): EmailAdapter;
|
|
1278
1320
|
|
|
1321
|
+
/** The cursor for a page starting at `offset`. It encodes any number; `search` rejects one that is not an offset. */
|
|
1322
|
+
declare function encodeSearchCursor(offset: number): string;
|
|
1323
|
+
/**
|
|
1324
|
+
* Full-text search in the command store's own database: FTS5 on SQLite, a GIN-indexed tsvector on Postgres. Both
|
|
1325
|
+
* match by `searchTerms` (every query term a prefix of a term in the name, a SKU, a variant name or the description)
|
|
1326
|
+
* and rank every-term-in-the-name matches first, then name/SKU/variant-name matches, then by the engine's score.
|
|
1327
|
+
*/
|
|
1279
1328
|
declare function createNativeSearchAdapter(deps: {
|
|
1280
|
-
|
|
1329
|
+
sql: RawClients;
|
|
1281
1330
|
logger: Logger;
|
|
1282
1331
|
}): SearchAdapter;
|
|
1283
1332
|
|
|
@@ -1294,13 +1343,6 @@ declare function createNativeTaxAdapter(logger: Logger, defaultRate?: number): T
|
|
|
1294
1343
|
|
|
1295
1344
|
declare function createNativeAiAdapter(_logger: Logger): AiAdapter;
|
|
1296
1345
|
|
|
1297
|
-
interface AnthropicAiAdapterConfig {
|
|
1298
|
-
apiKey: string;
|
|
1299
|
-
model?: string;
|
|
1300
|
-
logger: Logger;
|
|
1301
|
-
}
|
|
1302
|
-
declare function createAnthropicAiAdapter(config: AnthropicAiAdapterConfig): AiAdapter;
|
|
1303
|
-
|
|
1304
1346
|
interface CreateLoggerOptions {
|
|
1305
1347
|
level?: string;
|
|
1306
1348
|
pretty?: boolean;
|
|
@@ -1308,6 +1350,37 @@ interface CreateLoggerOptions {
|
|
|
1308
1350
|
}
|
|
1309
1351
|
declare function createLogger(options?: CreateLoggerOptions): Logger;
|
|
1310
1352
|
|
|
1353
|
+
/** `ok` is a check with no health semantics (config, a package, migrations); the rest are a health report's. */
|
|
1354
|
+
type DiagnosisStatus = HealthStatus | 'ok';
|
|
1355
|
+
interface DiagnosisCheck {
|
|
1356
|
+
name: string;
|
|
1357
|
+
status: DiagnosisStatus;
|
|
1358
|
+
detail: string;
|
|
1359
|
+
}
|
|
1360
|
+
interface DiagnosisReport {
|
|
1361
|
+
checks: DiagnosisCheck[];
|
|
1362
|
+
}
|
|
1363
|
+
interface DiagnoseOptions {
|
|
1364
|
+
/** The project's adapters, one per slot whose provider is `custom`, as `createApp` takes them. */
|
|
1365
|
+
adapters?: InjectedAdapters;
|
|
1366
|
+
logger?: Logger;
|
|
1367
|
+
/** Each check's bound; `HEALTH_CHECK_TIMEOUT_MS` when not given. */
|
|
1368
|
+
timeoutMs?: number;
|
|
1369
|
+
env?: NodeJS.ProcessEnv;
|
|
1370
|
+
sqlitePath?: string;
|
|
1371
|
+
postgresUrl?: string;
|
|
1372
|
+
mediaRoot?: string;
|
|
1373
|
+
/** Where the migrations journal is read; the platform's own migrations when not given. */
|
|
1374
|
+
migrationsRoot?: string;
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* Checks a project without changing it: its config, the packages its providers live in, the command store and its
|
|
1378
|
+
* migrations, and the health of every commerce slot and primitive. It builds what `createApp` builds, through the same
|
|
1379
|
+
* registry and constructors, and nothing more: no warm-up, no relay, no sweeper, no migrator, no seed, and no
|
|
1380
|
+
* primitive's `initialize()`. The command store is opened read-only. Every connection is closed before it returns.
|
|
1381
|
+
*/
|
|
1382
|
+
declare function diagnose(input: NymbalConfig, options?: DiagnoseOptions): Promise<DiagnosisReport>;
|
|
1383
|
+
|
|
1311
1384
|
interface SeedDeps {
|
|
1312
1385
|
config: NymbalConfig;
|
|
1313
1386
|
commandStore: CommandStore;
|
|
@@ -1357,16 +1430,12 @@ interface SeedProduct {
|
|
|
1357
1430
|
declare const seedCategories: SeedCategory[];
|
|
1358
1431
|
declare const seedProducts: SeedProduct[];
|
|
1359
1432
|
|
|
1360
|
-
interface MediaStorage {
|
|
1361
|
-
put(key: string, body: Uint8Array, contentType: string): Promise<{
|
|
1362
|
-
url: string;
|
|
1363
|
-
}>;
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
1433
|
interface LocalFsMediaStorageOptions {
|
|
1367
1434
|
root: string;
|
|
1368
1435
|
urlPrefix?: string;
|
|
1369
1436
|
}
|
|
1437
|
+
/** What the local filesystem storage offers, whatever its root: the app reports it for the media slot. */
|
|
1438
|
+
declare const LOCAL_FS_MEDIA_CAPABILITIES: readonly string[];
|
|
1370
1439
|
declare function createLocalFsMediaStorage(options: LocalFsMediaStorageOptions): MediaStorage;
|
|
1371
1440
|
|
|
1372
|
-
export { type AbandonedCart, type AbandonedWindow, type AdapterRegistry, type
|
|
1441
|
+
export { type AbandonedCart, type AbandonedWindow, type AdapterRegistry, type AttachHttpOptions, type AuthService, type AuthTokens, type BeginCheckoutInput, type BeginCheckoutResult, type BuildAdaptersDeps, type BuildServicesDeps, CSRF_COOKIE, CSRF_HEADER, type CapabilitiesReport, type CapabilitySlot, type CapturedPayment, type CartRepository, type CartService, type CategoryCreateInput, type CategoryInsert, type CategoryRepository, type CategoryService, type CategoryUpdate, type CategoryUpdateInput, type CheckoutService, type CommandStore, type CommandStoreOptions, type CommerceAdapters, type CreateAppOptions, type CreateAuthServiceDeps, type CreateCartServiceDeps, type CreateCheckoutServiceDeps, type CreateInventoryServiceDeps, type CreateLoggerOptions, type CreateOrderServiceDeps, type CreatePlatformOptions, type CreateProductServiceDeps, type CreatePublisherOptions, type CreateRefundServiceDeps, type CreateRelayOptions, type CustomerInsert, type CustomerJwtPayload, type CustomerRepository, type CustomerService, type CustomerUpdate, type CustomerWithHash, type DiagnoseOptions, type DiagnosisCheck, type DiagnosisReport, type DiagnosisStatus, type EventBuilderContext, type EventLogRepository, type EventPublisher, type EventRetentionSweeperDeps, type FinalizeResult, type IdempotencyOptions, type ImportCustomerInput, InMemoryDocumentStore, type InMemoryDocumentStoreOptions, InProcessEventBus, type InProcessEventBusOptions, type InjectedAdapters, type InventoryReservationRepository, type InventoryService, LOCAL_FS_MEDIA_CAPABILITIES, type CategoryInsert$1 as LegacyCategoryInsert, type CategoryRow as LegacyCategoryRow, type ProductInsert$1 as LegacyProductInsert, type ProductRow as LegacyProductRow, type LocalFsMediaStorageOptions, type LoggedEvent, type MakeEventOptions, type ManualPayments, type MigrateOptions, type NativeEmailAdapterConfig, type NymbalApp, type OrderCapture, type OrderCreateDraftInput, type OrderHistoryInsert, type OrderHistoryRepository, type OrderImportInput, type OrderInsert, type OrderRefundInsert, type OrderRefundRepository, type OrderRepository, type OrderSequenceRepository, type OrderService, PROVIDER_PACKAGES, PROVIDER_REFUND_REASON, type Platform, type PlatformConnectionOptions, type PostgresClient, type Primitives, type ProcessedEventRepository, type ProductCategoryRepository, type ProductCreateInput, type ProductInsert, type ProductRepository, type ProductService, type ProductUpdate, type ProductUpdateInput, type ProfileUpdate, type ProviderPackage, type PublishOptions, REDIS_DEFAULTS, RateLimiter, type RawClients, type ReadTx, type RefreshTokenInsert, type RefreshTokenRepository, type RefreshTokenRow, type RefundInput, type RefundResult, type RefundService, type RegisterAllRoutesDeps, type RegisterHandlersDeps, type RegisterInput, type Relay, type Repositories, type ReservationInsert, type ReserveStockResult, type ResolvePrimitivesOptions, type ReviewInsert, type ReviewRepository, type RouteSchema, type SearchService, type SeedCategory, type SeedDeps, type SeedProduct, type SeedResult, type ServiceRegistry, type Settlement, type SlotCapabilities, type SqliteClient, type StockAdjustmentInsert, type StockAdjustmentRepository, type StoreRepository, type SweeperHandle, type Tx, type VariantInsert, type VariantRepository, type VariantUpdate, type WarmDocumentStoreDeps, type WarmResult, buildAdapters, buildRepositories, buildSecurityHeaders, buildServices, createApp, createAuthService, createCartRepository, createCartService, createCategoryRepository, createCategoryService, createCheckoutService, createCommandStore, createCustomerRepository, createCustomerService, createEventBuilder, createEventLogRepository, createEventPublisher, createInventoryReservationRepository, createInventoryService, createCategoryRepository$1 as createLegacyCategoryRepository, createProductRepository$1 as createLegacyProductRepository, createLocalFsMediaStorage, createLogger, createMiddlewareSecurityAdapter, createNativeAiAdapter, createNativeAnalyticsAdapter, createNativeEmailAdapter, createNativeReviewsAdapter, createNativeSearchAdapter, createNativeShippingAdapter, createNativeStubPaymentsAdapter, createNativeTaxAdapter, createOrderHistoryRepository, createOrderRefundRepository, createOrderRepository, createOrderSequenceRepository, createOrderService, createPlatform, createProcessedEventRepository, createProductCategoryRepository, createProductRepository, createProductService, createRefreshTokenRepository, createRefundService, createRelay, createReviewRepository, createSearchService, createStockAdjustmentRepository, createVariantRepository, diagnose, encodeSearchCursor, installLine, orderPayment, rawClients, refreshRefunded, registerAdminStaticRoute, registerAllRoutes, registerHandlers, resolvePrimitives, routeSchemas, runMigrations, runSeed, seedCategories, seedProducts, settlementOf, sqliteFile, startCartAbandonmentSweeper, startEventRetentionSweeper, startInventoryReservationSweeper, warmDocumentStore, withIdempotency };
|