@reopt-ai/brandapp-sdk 3.3.0 → 3.4.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/README.md +10 -1
  3. package/dist/abort--nOBFN4M.js +50 -0
  4. package/dist/ai/index.d.ts +2 -314
  5. package/dist/ai/index.js +3 -8
  6. package/dist/ai-provider/index.d.ts +79 -163
  7. package/dist/ai-provider/index.js +752 -685
  8. package/dist/auth/index.d.ts +27 -27
  9. package/dist/auth/index.js +41 -34
  10. package/dist/better-auth/client.d.ts +6 -5
  11. package/dist/better-auth/client.js +28 -5
  12. package/dist/better-auth/index.d.ts +19 -17
  13. package/dist/better-auth/index.js +180 -144
  14. package/dist/client-B1q5P8rv.js +83 -0
  15. package/dist/client-B9QHVhdM.js +77 -0
  16. package/dist/client-BGGd_cpV.d.ts +103 -0
  17. package/dist/client-BJcy1V1a.js +140 -0
  18. package/dist/client-Beivhucf.js +55 -0
  19. package/dist/client-BruP5_nU.d.ts +147 -0
  20. package/dist/client-D-yNxNfk.js +28 -0
  21. package/dist/client-D0eBxh8j.d.ts +284 -0
  22. package/dist/client-D3RHHUUW.d.ts +207 -0
  23. package/dist/client-D6gs61w8.d.ts +53 -0
  24. package/dist/client-DBnK7ooQ.js +86 -0
  25. package/dist/client-DDw5yz_h.d.ts +53 -0
  26. package/dist/client-DPmoKuR9.js +305 -0
  27. package/dist/client-DsdakibF.js +503 -0
  28. package/dist/client-Dxg8_DIH.d.ts +71 -0
  29. package/dist/client-EbhUIhHq.js +53 -0
  30. package/dist/client-lk6wBu_0.d.ts +48 -0
  31. package/dist/client-p49ol9pg.d.ts +124 -0
  32. package/dist/cms/index.d.ts +52 -108
  33. package/dist/cms/index.js +103 -86
  34. package/dist/config-CRytOPPl.d.ts +394 -0
  35. package/dist/config-Cw0a3-C8.js +487 -0
  36. package/dist/dev/index.d.ts +2 -528
  37. package/dist/dev/index.js +2731 -2967
  38. package/dist/eav/coerce.d.ts +3 -1
  39. package/dist/eav/coerce.js +72 -46
  40. package/dist/eav/index.d.ts +72 -100
  41. package/dist/eav/index.js +158 -126
  42. package/dist/eav/migrate.d.ts +112 -109
  43. package/dist/eav/migrate.js +230 -196
  44. package/dist/eav/schema.d.ts +111 -150
  45. package/dist/eav/schema.js +624 -603
  46. package/dist/encoding-Bwfm3iaE.js +21 -0
  47. package/dist/{errors-BjDFIyA6.d.ts → errors-CRCcErNC.d.ts} +55 -53
  48. package/dist/feedback/index.d.ts +2 -132
  49. package/dist/feedback/index.js +3 -6
  50. package/dist/files/index.d.ts +14 -14
  51. package/dist/files/index.js +41 -25
  52. package/dist/http-client-QKUvvirs.js +386 -0
  53. package/dist/index-DrVaKfhs.d.ts +456 -0
  54. package/dist/index-Z6OGcurJ.d.ts +169 -0
  55. package/dist/index.d.ts +6 -230
  56. package/dist/index.js +119 -71
  57. package/dist/logout/index.d.ts +56 -53
  58. package/dist/logout/index.js +232 -289
  59. package/dist/plans/index.d.ts +2 -236
  60. package/dist/plans/index.js +3 -6
  61. package/dist/push/index.d.ts +2 -79
  62. package/dist/push/index.js +3 -6
  63. package/dist/query-BvbCiGWb.js +35 -0
  64. package/dist/react/hooks.d.ts +97 -99
  65. package/dist/react/hooks.js +742 -404
  66. package/dist/sse-parser-FMjxM7sY.js +86 -0
  67. package/dist/terms/index.d.ts +3 -79
  68. package/dist/terms/index.js +3 -6
  69. package/dist/testing/index.d.ts +52 -104
  70. package/dist/testing/index.js +94 -72
  71. package/dist/types-B-SMkH6s.d.ts +26 -0
  72. package/dist/types-BXDcoJHG.d.ts +131 -0
  73. package/dist/types-BrghN2rJ.d.ts +105 -0
  74. package/dist/types-DjDRszNj.js +11 -0
  75. package/dist/webhooks/index.d.ts +77 -50
  76. package/dist/webhooks/index.js +150 -127
  77. package/docs/api-reference.md +87 -6
  78. package/package.json +6 -5
  79. package/dist/chunk-2LSCQHAU.js +0 -21
  80. package/dist/chunk-4U4ZPPL4.js +0 -599
  81. package/dist/chunk-55KHY5GH.js +0 -96
  82. package/dist/chunk-C5VTRZWX.js +0 -458
  83. package/dist/chunk-F7BXBTZI.js +0 -54
  84. package/dist/chunk-FJUCWXX3.js +0 -350
  85. package/dist/chunk-H33OTQEN.js +0 -112
  86. package/dist/chunk-L4DHB36G.js +0 -75
  87. package/dist/chunk-OG7R3UAR.js +0 -105
  88. package/dist/chunk-PF24XU54.js +0 -32
  89. package/dist/chunk-QN3QD67K.js +0 -49
  90. package/dist/chunk-REIKXSMY.js +0 -7
  91. package/dist/chunk-UGBBXCZE.js +0 -157
  92. package/dist/chunk-UVT2E6KD.js +0 -81
  93. package/dist/chunk-YPLT3RFL.js +0 -63
  94. package/dist/chunk-YTKSAWV2.js +0 -463
  95. package/dist/client-BkcO-0C2.d.ts +0 -216
  96. package/dist/client-CN5_tNOC.d.ts +0 -147
  97. package/dist/client-DttyeM_h.d.ts +0 -102
  98. package/dist/config-CtxyJsDR.d.ts +0 -397
  99. package/dist/typed-client-BxOVIiMU.d.ts +0 -40
  100. package/dist/types-6E3ZLL9X.d.ts +0 -24
  101. package/dist/types-DskYLVb8.d.ts +0 -104
  102. package/dist/types-ckmDDW3N.d.ts +0 -129
@@ -1,528 +1,2 @@
1
- import { E as EditorSpec } from '../types-ckmDDW3N.js';
2
- import { e as TermsJurisdiction } from '../types-DskYLVb8.js';
3
-
4
- /**
5
- * In-Memory Store for BrandApp Dev Server
6
- *
7
- * Map-based storage that mirrors the production Prisma models.
8
- * Supports JSON serialization for persistence across restarts.
9
- */
10
-
11
- type DevEntity = {
12
- id: string;
13
- brandappId: string;
14
- name: string;
15
- description: string | null;
16
- icon: string;
17
- /** Host 분기. dev-server는 backend의 'brandapp' / 'brandappAuthUser'만 미러. */
18
- linkedTo: "brandapp" | "brandappAuthUser";
19
- maxRecords: number;
20
- createdAt: Date;
21
- updatedAt: Date;
22
- };
23
- type DevAttribute = {
24
- id: string;
25
- entityId: string;
26
- name: string;
27
- label: string;
28
- dataType: string;
29
- isRequired: boolean;
30
- isUnique: boolean;
31
- defaultValue: string | null;
32
- validation: unknown | null;
33
- options: unknown | null;
34
- sortOrder: number;
35
- createdAt: Date;
36
- updatedAt: Date;
37
- };
38
- type DevValue = {
39
- recordId: string;
40
- attributeId: string;
41
- value: string;
42
- };
43
- type DevRecord = {
44
- id: string;
45
- entityId: string;
46
- brandappAuthUserId: string | null;
47
- createdAt: Date;
48
- updatedAt: Date;
49
- values: DevValue[];
50
- };
51
- type DevAuthUser = {
52
- id: string;
53
- brandappId: string;
54
- email: string;
55
- emailVerified: boolean;
56
- name: string | null;
57
- image: string | null;
58
- createdAt: Date;
59
- updatedAt: Date;
60
- };
61
- type DevAuthSession = {
62
- id: string;
63
- userId: string;
64
- brandappId: string;
65
- token: string;
66
- expiresAt: Date;
67
- ipAddress: string | null;
68
- userAgent: string | null;
69
- createdAt: Date;
70
- updatedAt: Date;
71
- };
72
- type DevAuthAccount = {
73
- id: string;
74
- userId: string;
75
- brandappId: string;
76
- providerId: string;
77
- accountId: string;
78
- accessToken: string | null;
79
- refreshToken: string | null;
80
- accessTokenExpiresAt: Date | null;
81
- refreshTokenExpiresAt: Date | null;
82
- idToken: string | null;
83
- scope: string | null;
84
- password: string | null;
85
- createdAt: Date;
86
- updatedAt: Date;
87
- };
88
- type DevAuthVerification = {
89
- id: string;
90
- brandappId: string;
91
- identifier: string;
92
- value: string;
93
- expiresAt: Date;
94
- createdAt: Date;
95
- updatedAt: Date;
96
- };
97
- type DevFile = {
98
- id: string;
99
- brandappId: string;
100
- name: string;
101
- contentType: string;
102
- size: number;
103
- url: string;
104
- createdAt: Date;
105
- updatedAt: Date;
106
- };
107
- /**
108
- * DevPost mirrors production `Post`/`PostDetail` shape so dev-server responses are
109
- * indistinguishable from the remote API after the cms-handler maps them.
110
- * Dates remain as `Date` objects in-memory and are stringified at the boundary.
111
- */
112
- type DevPost = {
113
- id: string;
114
- brandappId: string;
115
- slug: string;
116
- title: string;
117
- /** Plain-text content (검색용). */
118
- content: string;
119
- /** EditorSpec — opt-editor 호환 rich content. dev seeder가 MDX→EditorSpec 변환해서 넣음. */
120
- contentRich: EditorSpec | null;
121
- status: string;
122
- groupId: string | null;
123
- /** Publish 시각 (status='published' or 'scheduled'에서 의미 있음). */
124
- publishedAt: Date | null;
125
- /** Cover image (id + URL). dev에서는 외부 URL 또는 placeholder 권장. */
126
- coverImage: {
127
- id: string;
128
- url: string | null;
129
- } | null;
130
- /** Author info. */
131
- author: {
132
- id: string;
133
- name: string;
134
- image: string | null;
135
- };
136
- /** Document icon (emoji 또는 URL). */
137
- icon: string | null;
138
- /** Tags as `{id, text}` references — production SDK Tag와 동일. */
139
- tags: {
140
- id: string;
141
- text: string;
142
- }[];
143
- /** SEO meta. */
144
- seo: {
145
- metaTitle: string | null;
146
- metaDescription: string | null;
147
- metaKeywords: string | null;
148
- };
149
- createdAt: Date;
150
- updatedAt: Date;
151
- };
152
- type DevPostGroup = {
153
- id: string;
154
- brandappId: string;
155
- /** 브랜드 내 안정적 식별자 (production PostGroup.slug 미러). null 허용. */
156
- slug: string | null;
157
- name: string;
158
- description: string | null;
159
- color: string;
160
- /** Brand reference (dev에서는 brandappId를 brand id로 사용해도 OK). */
161
- brand: {
162
- id: string;
163
- name: string;
164
- } | null;
165
- createdAt: Date;
166
- updatedAt: Date;
167
- };
168
- type DevTerms = {
169
- id: string;
170
- brandappId: string;
171
- title: string;
172
- type: "termsOfService" | "privacyPolicy" | "marketingConsent" | "custom";
173
- jurisdiction: TermsJurisdiction;
174
- isRequired: boolean;
175
- isActive: boolean;
176
- sortOrder: number;
177
- createdAt: Date;
178
- updatedAt: Date;
179
- };
180
- type DevTermsVersion = {
181
- id: string;
182
- termsId: string;
183
- version: number;
184
- locale: string;
185
- content: string;
186
- changeSummary: string | null;
187
- publishedAt: Date;
188
- isCurrent: boolean;
189
- reConsentDeadline: Date | null;
190
- createdAt: Date;
191
- };
192
- type DevTermsConsent = {
193
- id: string;
194
- versionId: string;
195
- customerId: string;
196
- status: "granted" | "withdrawn" | "pendingReConsent";
197
- consentedAt: Date;
198
- withdrawnAt: Date | null;
199
- source: string | null;
200
- ipAddress: string | null;
201
- userAgent: string | null;
202
- consentCountry: string | null;
203
- consentLocale: string | null;
204
- createdAt: Date;
205
- };
206
- type StoreSnapshot = {
207
- entities: DevEntity[];
208
- attributes: DevAttribute[];
209
- records: DevRecord[];
210
- authUsers: DevAuthUser[];
211
- authSessions: DevAuthSession[];
212
- authAccounts: DevAuthAccount[];
213
- authVerifications: DevAuthVerification[];
214
- files: DevFile[];
215
- posts: DevPost[];
216
- postGroups: DevPostGroup[];
217
- terms: DevTerms[];
218
- termsVersions: DevTermsVersion[];
219
- termsConsents: DevTermsConsent[];
220
- };
221
- declare class InMemoryStore {
222
- entities: Map<string, DevEntity>;
223
- attributes: Map<string, DevAttribute>;
224
- records: Map<string, DevRecord>;
225
- authUsers: Map<string, DevAuthUser>;
226
- authSessions: Map<string, DevAuthSession>;
227
- authAccounts: Map<string, DevAuthAccount>;
228
- authVerifications: Map<string, DevAuthVerification>;
229
- files: Map<string, DevFile>;
230
- posts: Map<string, DevPost>;
231
- postGroups: Map<string, DevPostGroup>;
232
- terms: Map<string, DevTerms>;
233
- termsVersions: Map<string, DevTermsVersion>;
234
- termsConsents: Map<string, DevTermsConsent>;
235
- generateId(): string;
236
- now(): Date;
237
- findMany<T>(map: Map<string, T>, predicate: (item: T) => boolean): T[];
238
- findFirst<T>(map: Map<string, T>, predicate: (item: T) => boolean): T | null;
239
- count<T>(map: Map<string, T>, predicate: (item: T) => boolean): number;
240
- getEntitiesByBrandapp(brandappId: string): DevEntity[];
241
- getAttributesByEntity(entityId: string): DevAttribute[];
242
- getRecordsByEntity(entityId: string): DevRecord[];
243
- getRecordValues(recordId: string): DevValue[];
244
- /**
245
- * Produce a snapshot that is safe to mutate without affecting the store.
246
- * Dates are preserved by reconstructing them after a structuredClone.
247
- */
248
- toSnapshot(): StoreSnapshot;
249
- toJSON(): string;
250
- fromSnapshot(snapshot: StoreSnapshot): void;
251
- fromJSON(json: string): void;
252
- clear(): void;
253
- }
254
-
255
- type MintLogoutTokenInput = {
256
- /** The RP's OAuth client_id — becomes the logout_token `aud`. */
257
- clientId: string;
258
- /** The IdP session id being revoked — becomes `sid` (RP session-termination key). */
259
- sessionId: string;
260
- /** Optional subject (`sub`). */
261
- userId?: string;
262
- /** Override `iat` (epoch ms) — for testing max-age/expiry branches. */
263
- issuedAtMs?: number;
264
- };
265
-
266
- /**
267
- * Markdown → EditorSpec converter for dev seed workflows.
268
- *
269
- * Production studio writes EditorSpec directly via opt-editor; reopt-www and
270
- * other marketing sites prefer authoring posts as `.mdx` files committed to
271
- * git. This helper bridges the two by calling `@reopt-ai/opt-editor`'s
272
- * `markdownToSpec` so the dev server returns EditorSpec identical to what
273
- * production studio would produce for the same markdown.
274
- *
275
- * `@reopt-ai/opt-editor` is an OPTIONAL peer dependency — the consumer
276
- * installs it as a devDependency. The dynamic import keeps it out of the
277
- * production bundle of any consumer that only fetches posts at runtime.
278
- *
279
- * Phase 1 scope: plain markdown (headings, paragraphs, lists, code, links,
280
- * images, blockquote, hr). MDX JSX components (`<Hero />` etc.) are NOT
281
- * converted — `markdownToSpec` will drop or error on them. Custom element
282
- * support is Phase 2 (register opt-editor element schemas + mapping table).
283
- *
284
- * @example
285
- * ```ts
286
- * import { createDevServer } from "@reopt-ai/brandapp-sdk/dev";
287
- * import { markdownToEditorSpec } from "@reopt-ai/brandapp-sdk/dev";
288
- * import { readFile } from "node:fs/promises";
289
- *
290
- * const mdx = await readFile("content/blog/hello.mdx", "utf-8");
291
- * const contentRich = await markdownToEditorSpec(mdx);
292
- *
293
- * await dev.seedPosts([
294
- * { groupSlug: "blog", slug: "hello", title: "Hello", contentRich },
295
- * ]);
296
- * ```
297
- */
298
-
299
- /**
300
- * Convert a single markdown string to EditorSpec.
301
- *
302
- * Throws if `@reopt-ai/opt-editor` is not installed.
303
- */
304
- declare function markdownToEditorSpec(markdown: string): Promise<EditorSpec>;
305
- /**
306
- * Batch helper — converts multiple markdown bodies in one go.
307
- * Useful when seeding many posts from MDX files.
308
- */
309
- declare function markdownToEditorSpecMany(markdowns: string[]): Promise<EditorSpec[]>;
310
-
311
- /**
312
- * @reopt-ai/brandapp-sdk/dev
313
- *
314
- * Local development server for BrandApp consumer projects.
315
- * Provides an in-memory implementation of the full BrandApp API
316
- * so developers can work offline without hitting the remote server.
317
- *
318
- * @example
319
- * ```ts
320
- * import { createDevServer } from "@reopt-ai/brandapp-sdk/dev";
321
- * import schema from "./eav.schema";
322
- *
323
- * const dev = await createDevServer({
324
- * schema,
325
- * port: 4300,
326
- * });
327
- *
328
- * console.log(`Dev server running at ${dev.url}`);
329
- *
330
- * // Seed data
331
- * await dev.seed({
332
- * contacts: [
333
- * { values: { name: "Alice", email: "alice@test.com" } },
334
- * ],
335
- * });
336
- *
337
- * // Use with SDK
338
- * const sdk = createReoptSDK({
339
- * clientId: "dev",
340
- * clientSecret: "dev",
341
- * brandappId: "dev",
342
- * baseUrl: dev.url,
343
- * });
344
- * ```
345
- */
346
-
347
- type ProxyConfig = {
348
- /** Remote Reopt server URL (e.g. "https://brand.reopt.de:3443") */
349
- remoteUrl: string;
350
- /** Remote OAuth credentials */
351
- remoteCredentials: {
352
- clientId: string;
353
- clientSecret: string;
354
- brandappId: string;
355
- };
356
- /** Per-module proxy strategy: "local" (in-memory) or "passthrough" (remote) */
357
- routes?: {
358
- eav?: "local" | "passthrough";
359
- ai?: "local" | "passthrough";
360
- files?: "local" | "passthrough";
361
- auth?: "local" | "passthrough";
362
- cms?: "local" | "passthrough";
363
- terms?: "local" | "passthrough";
364
- };
365
- };
366
- type DevServerOptions = {
367
- /** Port to listen on (default: 0 = auto-assign) */
368
- port?: number;
369
- /** BrandApp ID for dev context (default: "dev-brandapp") */
370
- brandappId?: string;
371
- /** Path to persist data across restarts (default: none) */
372
- dataPath?: string;
373
- /** Auto-seed entities from EAV schema definition */
374
- schema?: DevSchema;
375
- /** Enable verbose logging */
376
- verbose?: boolean;
377
- /** Proxy configuration — forward selected API calls to remote server */
378
- proxy?: ProxyConfig;
379
- };
380
- type DevSchema = {
381
- entities: Record<string, {
382
- name?: string;
383
- description?: string;
384
- icon?: string;
385
- maxRecords?: number;
386
- attributes: Record<string, {
387
- label?: string;
388
- dataType?: string;
389
- isRequired?: boolean;
390
- isUnique?: boolean;
391
- defaultValue?: string;
392
- options?: Array<{
393
- value: string;
394
- label: string;
395
- color?: string;
396
- }>;
397
- }>;
398
- }>;
399
- };
400
- type SeedRecordInput = {
401
- authUserId?: string;
402
- values: Record<string, unknown>;
403
- /**
404
- * Per-record upsert key. Defaults to the entity's provided unique
405
- * attributes, then falls back to all provided value keys in upsert mode.
406
- */
407
- upsertKey?: string | string[];
408
- };
409
- type SeedData = Record<string, SeedRecordInput[]>;
410
- type SeedOptions = {
411
- /** Append preserves legacy behaviour; upsert refreshes matching records. */
412
- mode?: "append" | "upsert";
413
- /** Global upsert key for every record in this seed call. */
414
- upsertKey?: string | string[];
415
- };
416
- type SeedTermsItem = {
417
- title: string;
418
- type?: "termsOfService" | "privacyPolicy" | "marketingConsent" | "custom";
419
- jurisdiction?: TermsJurisdiction;
420
- isRequired?: boolean;
421
- /** Defaults to inserting order, ascending. */
422
- sortOrder?: number;
423
- /** BCP 47 locale of the current published version. */
424
- locale?: string;
425
- /** Markdown / plain-text body of the current published version. */
426
- content: string;
427
- changeSummary?: string;
428
- };
429
- /**
430
- * Idempotent PostGroup seed. `(brandappId, slug)` is the upsert key.
431
- * The server generates `id` on first insert; subsequent calls with the same
432
- * slug update name/description/color in place.
433
- */
434
- type SeedPostGroupInput = {
435
- /** 브랜드 내 안정적 식별자. SDK consumer가 이 값으로 그룹을 참조한다. */
436
- slug: string;
437
- name: string;
438
- description?: string;
439
- color?: string;
440
- };
441
- type SeedPostInput = {
442
- /** 소속 PostGroup의 slug. seedPostGroups로 먼저 만들어두거나 함께 시드 가능. */
443
- groupSlug: string;
444
- /** 그룹 내 안정적 식별자 (URL slug). 같은 groupSlug+slug 조합으로 upsert. */
445
- slug: string;
446
- title: string;
447
- /** Plain-text content (검색용). */
448
- content?: string;
449
- /** EditorSpec — opt-editor 호환. MDX seed는 dev seeder에서 변환 후 여기에 넣음. */
450
- contentRich?: EditorSpec | null;
451
- status?: "draft" | "scheduled" | "published" | "archived";
452
- publishedAt?: string | Date | null;
453
- coverImage?: {
454
- id?: string;
455
- url: string | null;
456
- } | null;
457
- author?: Partial<{
458
- id: string;
459
- name: string;
460
- image: string | null;
461
- }>;
462
- icon?: string | null;
463
- /** Tags 입력 — 문자열은 dev seeder가 `{id: 'tag:<text>', text}` 형태로 정규화. */
464
- tags?: Array<string | {
465
- id: string;
466
- text: string;
467
- }>;
468
- seo?: {
469
- metaTitle?: string | null;
470
- metaDescription?: string | null;
471
- metaKeywords?: string | null;
472
- };
473
- };
474
- /**
475
- * Unified seed input for `dev.seedAll()`. Each field is optional and applied
476
- * in order: postGroups → posts → entities → terms.
477
- */
478
- type SeedAllInput = {
479
- postGroups?: SeedPostGroupInput[];
480
- posts?: SeedPostInput[];
481
- /** EAV records keyed by entity name — backward-compatible with `dev.seed()`. */
482
- entities?: SeedData;
483
- terms?: SeedTermsItem[];
484
- };
485
- type DevServer = {
486
- /** Base URL of the running server */
487
- url: string;
488
- /** Port the server is listening on */
489
- port: number;
490
- /** The underlying in-memory store */
491
- store: InMemoryStore;
492
- /** Seed records into entities by name */
493
- seed: (data: SeedData, options?: SeedOptions) => Promise<void>;
494
- /** Seed BrandApp terms with their initial published version */
495
- seedTerms: (items: SeedTermsItem[]) => Promise<void>;
496
- /**
497
- * Seed PostGroups identified by slug. Idempotent — running twice with the
498
- * same slug updates name/description/color in place.
499
- */
500
- seedPostGroups: (items: SeedPostGroupInput[]) => Promise<void>;
501
- /**
502
- * Seed Posts identified by `(groupSlug, slug)`. Idempotent. The PostGroup
503
- * referenced by `groupSlug` must exist (call `seedPostGroups` first or use
504
- * `seedAll`).
505
- */
506
- seedPosts: (items: SeedPostInput[]) => Promise<void>;
507
- /** One-shot seeder that applies postGroups → posts → entities → terms in order. */
508
- seedAll: (input: SeedAllInput) => Promise<void>;
509
- /** Reset all data (optionally re-seed schema) */
510
- reset: () => Promise<void>;
511
- /** Save current state to a JSON file */
512
- snapshot: (path: string) => Promise<void>;
513
- /** Restore state from a JSON file */
514
- restore: (path: string) => Promise<void>;
515
- /**
516
- * Mint a spec-compliant `logout_token` signed by the dev IdP, so you can
517
- * exercise a `createBackchannelLogoutHandler` end-to-end against this server
518
- * (which serves the matching JWKS at `/api/auth/jwks`). Point the SDK's logout
519
- * verifier at `dev.url` as `idBaseUrl`. Rejects if the runtime lacks Ed25519
520
- * Web Crypto (Node 20+).
521
- */
522
- mintLogoutToken: (input: MintLogoutTokenInput) => Promise<string>;
523
- /** Stop the dev server */
524
- close: () => Promise<void>;
525
- };
526
- declare function createDevServer(options?: DevServerOptions): Promise<DevServer>;
527
-
528
- export { type DevAttribute, type DevEntity, type DevPost, type DevPostGroup, type DevRecord, type DevSchema, type DevServer, type DevServerOptions, InMemoryStore, type ProxyConfig, type SeedAllInput, type SeedData, type SeedOptions, type SeedPostGroupInput, type SeedPostInput, type SeedRecordInput, type SeedTermsItem, type StoreSnapshot, createDevServer, markdownToEditorSpec, markdownToEditorSpecMany };
1
+ import { _ as DevPost, a as SeedAllInput, b as InMemoryStore, c as SeedPostGroupInput, d as SeedTermsItem, f as createDevServer, g as DevEntity, h as DevAttribute, i as ProxyConfig, l as SeedPostInput, m as markdownToEditorSpecMany, n as DevServer, o as SeedData, p as markdownToEditorSpec, r as DevServerOptions, s as SeedOptions, t as DevSchema, u as SeedRecordInput, v as DevPostGroup, x as StoreSnapshot, y as DevRecord } from "../index-DrVaKfhs.js";
2
+ export { type DevAttribute, type DevEntity, type DevPost, type DevPostGroup, type DevRecord, DevSchema, DevServer, DevServerOptions, InMemoryStore, ProxyConfig, SeedAllInput, SeedData, SeedOptions, SeedPostGroupInput, SeedPostInput, SeedRecordInput, SeedTermsItem, type StoreSnapshot, createDevServer, markdownToEditorSpec, markdownToEditorSpecMany };