@businessdash/sdk 0.9.80 → 0.9.90

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 (264) hide show
  1. package/README.md +133 -949
  2. package/assets/{biab-sw.js → bd-sw.js} +2 -2
  3. package/dist/account-core/index.d.ts +1 -1
  4. package/dist/account-core/index.d.ts.map +1 -1
  5. package/dist/adapters-revalidate.d.ts +2 -2
  6. package/dist/adapters-revalidate.js +2 -2
  7. package/dist/adapters-revalidate.js.map +1 -1
  8. package/dist/analytics-core.d.ts +6 -6
  9. package/dist/analytics-core.d.ts.map +1 -1
  10. package/dist/analytics-core.js +4 -4
  11. package/dist/analytics-core.js.map +1 -1
  12. package/dist/analytics-server.d.ts +6 -6
  13. package/dist/analytics-server.d.ts.map +1 -1
  14. package/dist/analytics-server.js +5 -5
  15. package/dist/auth-handler.d.ts +14 -14
  16. package/dist/auth-handler.d.ts.map +1 -1
  17. package/dist/auth-handler.js +16 -16
  18. package/dist/auth-handler.js.map +1 -1
  19. package/dist/auth-links.d.ts +2 -2
  20. package/dist/auth-links.d.ts.map +1 -1
  21. package/dist/auth-links.js +2 -2
  22. package/dist/auth-links.js.map +1 -1
  23. package/dist/{biab-forms.css → bd-forms.css} +158 -158
  24. package/dist/cli.d.ts +4 -4
  25. package/dist/cli.js +78 -78
  26. package/dist/cli.js.map +1 -1
  27. package/dist/client.d.ts +158 -147
  28. package/dist/client.d.ts.map +1 -1
  29. package/dist/client.js +156 -137
  30. package/dist/client.js.map +1 -1
  31. package/dist/consent-core/index.cjs +2 -2
  32. package/dist/consent-core/index.d.ts +2 -2
  33. package/dist/consent-core/index.d.ts.map +1 -1
  34. package/dist/consent-core/index.js +10 -8
  35. package/dist/consent-core/index.js.map +1 -1
  36. package/dist/contracts.d.ts +411 -52
  37. package/dist/contracts.d.ts.map +1 -1
  38. package/dist/contracts.js +89 -15
  39. package/dist/contracts.js.map +1 -1
  40. package/dist/data-model-schema.d.ts +15 -15
  41. package/dist/data-model-schema.d.ts.map +1 -1
  42. package/dist/data-model-schema.js +19 -17
  43. package/dist/data-model-schema.js.map +1 -1
  44. package/dist/distribution.d.ts +5 -5
  45. package/dist/distribution.d.ts.map +1 -1
  46. package/dist/distribution.js +4 -4
  47. package/dist/element.d.ts +36 -36
  48. package/dist/element.d.ts.map +1 -1
  49. package/dist/element.js +43 -43
  50. package/dist/element.js.map +1 -1
  51. package/dist/embed-protocol.d.ts +11 -11
  52. package/dist/embed-protocol.d.ts.map +1 -1
  53. package/dist/embed-protocol.js +1 -1
  54. package/dist/embed-protocol.js.map +1 -1
  55. package/dist/errors.d.ts +15 -15
  56. package/dist/errors.d.ts.map +1 -1
  57. package/dist/errors.js +18 -18
  58. package/dist/errors.js.map +1 -1
  59. package/dist/forms-core/autocomplete.d.ts +3 -3
  60. package/dist/forms-core/autocomplete.d.ts.map +1 -1
  61. package/dist/forms-core/autocomplete.js +2 -2
  62. package/dist/forms-core/controller.d.ts +10 -10
  63. package/dist/forms-core/controller.d.ts.map +1 -1
  64. package/dist/forms-core/controller.js +4 -4
  65. package/dist/forms-core/controller.js.map +1 -1
  66. package/dist/forms-core/elements.d.ts +4 -4
  67. package/dist/forms-core/elements.d.ts.map +1 -1
  68. package/dist/forms-core/elements.js +7 -7
  69. package/dist/forms-core/elements.js.map +1 -1
  70. package/dist/forms-core/formula.d.ts +1 -1
  71. package/dist/forms-core/formula.js +1 -1
  72. package/dist/forms-core/index.d.ts +6 -6
  73. package/dist/forms-core/index.d.ts.map +1 -1
  74. package/dist/forms-core/index.js +5 -5
  75. package/dist/forms-core/index.js.map +1 -1
  76. package/dist/forms-core/units.d.ts +1 -1
  77. package/dist/forms-core/units.js +1 -1
  78. package/dist/forms-core/us-states.d.ts +1 -1
  79. package/dist/forms-core/us-states.js +1 -1
  80. package/dist/forms-core/validation.d.ts +12 -3
  81. package/dist/forms-core/validation.d.ts.map +1 -1
  82. package/dist/forms-core/validation.js +152 -17
  83. package/dist/forms-core/validation.js.map +1 -1
  84. package/dist/forms.d.ts +2 -2
  85. package/dist/forms.d.ts.map +1 -1
  86. package/dist/forms.js +2 -2
  87. package/dist/forms.js.map +1 -1
  88. package/dist/framework-support.js +1 -1
  89. package/dist/framework-support.js.map +1 -1
  90. package/dist/gallery-types.d.ts +1 -1
  91. package/dist/graphql.d.ts +3 -3
  92. package/dist/graphql.d.ts.map +1 -1
  93. package/dist/graphql.js +3 -3
  94. package/dist/graphql.js.map +1 -1
  95. package/dist/index.cjs +351 -272
  96. package/dist/index.d.cts +5 -5
  97. package/dist/index.d.mts +5 -5
  98. package/dist/index.d.ts +5 -5
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +5 -5
  101. package/dist/index.js.map +1 -1
  102. package/dist/legal-core/index.cjs +8 -8
  103. package/dist/legal-core/index.d.ts +3 -3
  104. package/dist/legal-core/index.d.ts.map +1 -1
  105. package/dist/legal-core/index.js +11 -11
  106. package/dist/legal-core/index.js.map +1 -1
  107. package/dist/marketing-core/index.d.ts +51 -1
  108. package/dist/marketing-core/index.d.ts.map +1 -1
  109. package/dist/marketing-core/index.js +35 -0
  110. package/dist/marketing-core/index.js.map +1 -1
  111. package/dist/marketing-schema.d.ts +9 -9
  112. package/dist/marketing-schema.d.ts.map +1 -1
  113. package/dist/marketing-schema.js +1 -1
  114. package/dist/mcp.d.ts +4 -4
  115. package/dist/mcp.js +4 -4
  116. package/dist/native.d.ts +6 -6
  117. package/dist/native.d.ts.map +1 -1
  118. package/dist/native.js +4 -4
  119. package/dist/native.js.map +1 -1
  120. package/dist/next-revalidate.d.ts +8 -8
  121. package/dist/next-revalidate.d.ts.map +1 -1
  122. package/dist/next-revalidate.js +7 -7
  123. package/dist/next-revalidate.js.map +1 -1
  124. package/dist/notifications-core/index.d.ts +1 -1
  125. package/dist/notifications-core/index.js +1 -1
  126. package/dist/parallel-pages.d.ts +4 -4
  127. package/dist/parallel-pages.d.ts.map +1 -1
  128. package/dist/parallel-pages.js +5 -5
  129. package/dist/parallel-pages.js.map +1 -1
  130. package/dist/portal-core/index.d.ts +1 -1
  131. package/dist/portal-core/index.js +1 -1
  132. package/dist/proxy.d.ts +18 -18
  133. package/dist/proxy.d.ts.map +1 -1
  134. package/dist/proxy.js +10 -10
  135. package/dist/proxy.js.map +1 -1
  136. package/dist/push-core/index.cjs +6 -2
  137. package/dist/push-core/index.d.ts +1 -1
  138. package/dist/push-core/index.d.ts.map +1 -1
  139. package/dist/push-core/index.js +6 -2
  140. package/dist/push-core/index.js.map +1 -1
  141. package/dist/react-analytics.d.ts +14 -14
  142. package/dist/react-analytics.d.ts.map +1 -1
  143. package/dist/react-analytics.js +15 -15
  144. package/dist/react-analytics.js.map +1 -1
  145. package/dist/react-attribution.d.ts +2 -2
  146. package/dist/react-attribution.d.ts.map +1 -1
  147. package/dist/react-attribution.js +1 -1
  148. package/dist/react-marketing.js +5 -5
  149. package/dist/react-marketing.js.map +1 -1
  150. package/dist/react.d.ts +38 -61
  151. package/dist/react.d.ts.map +1 -1
  152. package/dist/react.js +247 -261
  153. package/dist/react.js.map +1 -1
  154. package/dist/reserved-paths.d.ts +2 -2
  155. package/dist/reserved-paths.js +3 -3
  156. package/dist/reserved-paths.js.map +1 -1
  157. package/dist/revalidate-verify.d.ts +3 -3
  158. package/dist/revalidate-verify.d.ts.map +1 -1
  159. package/dist/revalidate-verify.js +1 -1
  160. package/dist/revalidate-verify.js.map +1 -1
  161. package/dist/sdk.d.ts +51 -45
  162. package/dist/sdk.d.ts.map +1 -1
  163. package/dist/sdk.js +48 -50
  164. package/dist/sdk.js.map +1 -1
  165. package/dist/seed-core/index.js +8 -8
  166. package/dist/seed-core/index.js.map +1 -1
  167. package/dist/seo-core/blog.d.ts +1 -1
  168. package/dist/seo-core/blog.js +1 -1
  169. package/dist/seo-core/blog.js.map +1 -1
  170. package/dist/seo-core/index.cjs +2 -2
  171. package/dist/seo-core/index.js +1 -1
  172. package/dist/seo-core/index.js.map +1 -1
  173. package/dist/seo.d.ts +1 -1
  174. package/dist/seo.d.ts.map +1 -1
  175. package/dist/seo.js +1 -1
  176. package/dist/seo.js.map +1 -1
  177. package/dist/sitemap-core/index.cjs +5 -5
  178. package/dist/sitemap-core/index.d.ts +13 -5
  179. package/dist/sitemap-core/index.d.ts.map +1 -1
  180. package/dist/sitemap-core/index.js +4 -4
  181. package/dist/sitemap-core/index.js.map +1 -1
  182. package/dist/socials.d.ts +6 -6
  183. package/dist/socials.d.ts.map +1 -1
  184. package/dist/socials.js +5 -5
  185. package/dist/socials.js.map +1 -1
  186. package/dist/solid-compat.d.ts +1 -1
  187. package/dist/solid-compat.js +4 -4
  188. package/dist/solid-compat.js.map +1 -1
  189. package/dist/store-core/index.d.ts +1 -1
  190. package/dist/vanilla.d.ts +12 -12
  191. package/dist/vanilla.d.ts.map +1 -1
  192. package/dist/vanilla.js +192 -145
  193. package/dist/vanilla.js.map +1 -1
  194. package/openapi.json +264 -1
  195. package/package.json +8 -8
  196. package/src/account-core/index.ts +1 -1
  197. package/src/adapters-revalidate.ts +3 -3
  198. package/src/analytics-core.ts +8 -8
  199. package/src/analytics-server.ts +6 -6
  200. package/src/angular/{biab-form.component.ts → bd-form.component.ts} +269 -161
  201. package/src/angular/headless.ts +12 -12
  202. package/src/angular/index.ts +9 -9
  203. package/src/auth-handler.ts +22 -22
  204. package/src/auth-links.ts +2 -2
  205. package/src/cli.ts +81 -81
  206. package/src/client.ts +218 -193
  207. package/src/consent-core/index.ts +10 -8
  208. package/src/contracts.ts +99 -15
  209. package/src/data-model-schema.ts +29 -26
  210. package/src/distribution.ts +5 -5
  211. package/src/element.ts +54 -54
  212. package/src/embed-protocol.ts +14 -14
  213. package/src/errors.ts +27 -27
  214. package/src/forms-core/autocomplete.ts +3 -3
  215. package/src/forms-core/controller.ts +12 -12
  216. package/src/forms-core/elements.ts +7 -7
  217. package/src/forms-core/formula.ts +1 -1
  218. package/src/forms-core/index.ts +8 -8
  219. package/src/forms-core/units.ts +1 -1
  220. package/src/forms-core/us-states.ts +1 -1
  221. package/src/forms-core/validation.ts +158 -14
  222. package/src/forms.ts +2 -2
  223. package/src/framework-support.ts +1 -1
  224. package/src/gallery-types.ts +1 -1
  225. package/src/graphql.ts +4 -4
  226. package/src/index.ts +38 -38
  227. package/src/legal-core/index.ts +12 -12
  228. package/src/marketing-core/index.ts +62 -0
  229. package/src/marketing-schema.ts +9 -9
  230. package/src/mcp.ts +4 -4
  231. package/src/native.ts +14 -14
  232. package/src/next-revalidate.ts +10 -10
  233. package/src/notifications-core/index.ts +1 -1
  234. package/src/parallel-pages.ts +6 -6
  235. package/src/portal-core/index.ts +1 -1
  236. package/src/proxy.ts +28 -28
  237. package/src/push-core/index.ts +11 -5
  238. package/src/qwik.tsx +262 -166
  239. package/src/react-analytics.tsx +17 -17
  240. package/src/react-attribution.tsx +2 -2
  241. package/src/react-marketing.tsx +5 -5
  242. package/src/react.tsx +541 -500
  243. package/src/reserved-paths.ts +3 -3
  244. package/src/revalidate-verify.ts +5 -5
  245. package/src/sdk.ts +131 -101
  246. package/src/seed-core/index.ts +8 -8
  247. package/src/seo-core/blog.ts +2 -2
  248. package/src/seo-core/index.ts +1 -1
  249. package/src/seo.ts +1 -1
  250. package/src/sitemap-core/index.ts +17 -9
  251. package/src/socials.ts +6 -6
  252. package/src/solid-compat.tsx +5 -5
  253. package/src/solid-surfaces.tsx +28 -28
  254. package/src/solid.tsx +264 -175
  255. package/src/store-core/index.ts +1 -1
  256. package/src/styles/{biab-forms.css → bd-forms.css} +158 -158
  257. package/src/svelte/{BiabForm.svelte → BdForm.svelte} +240 -173
  258. package/src/svelte/context.ts +16 -16
  259. package/src/svelte/headless.ts +10 -10
  260. package/src/svelte/index.ts +16 -16
  261. package/src/vanilla.ts +250 -169
  262. package/src/vue/{BiabForm.vue → BdForm.vue} +270 -157
  263. package/src/vue/headless.ts +11 -11
  264. package/src/vue/index.ts +26 -26
@@ -23,7 +23,7 @@ import {
23
23
  type ChatSnapshot,
24
24
  createChatController,
25
25
  } from "../chat-core/index.js";
26
- import { BiabDevClient } from "../client.js";
26
+ import { BdApiClient } from "../client.js";
27
27
  import {
28
28
  createPortalController,
29
29
  type PortalSnapshot,
@@ -54,7 +54,7 @@ import {
54
54
  type CheckoutSnapshot,
55
55
  createCheckoutController,
56
56
  } from "../checkout-core/index.js";
57
- import { createBiabClient } from "../sdk.js";
57
+ import { createBdClient } from "../sdk.js";
58
58
 
59
59
  import type {
60
60
  BlogCommentPostInput,
@@ -132,7 +132,7 @@ export function createStorefront(
132
132
  options: CreateStorefrontOptions,
133
133
  ): StorefrontHandle {
134
134
  const controller = createStoreController({
135
- client: new BiabDevClient({
135
+ client: new BdApiClient({
136
136
  apiKey: options.apiKey,
137
137
  baseUrl: options.baseUrl,
138
138
  }),
@@ -170,7 +170,7 @@ export type ChatHandle = {
170
170
  /** Headless Front Desk chat — the native alternative to `<Chatbot>`. */
171
171
  export function createChat(options: CreateChatOptions): ChatHandle {
172
172
  const controller = createChatController({
173
- client: new BiabDevClient({
173
+ client: new BdApiClient({
174
174
  apiKey: options.apiKey,
175
175
  baseUrl: options.baseUrl,
176
176
  }),
@@ -208,7 +208,7 @@ export type BlogHandle = {
208
208
  /** Headless blog — the native alternative to `<Blog>`. */
209
209
  export function createBlog(options: CreateBlogOptions): BlogHandle {
210
210
  const controller = createBlogController({
211
- client: new BiabDevClient({
211
+ client: new BdApiClient({
212
212
  apiKey: options.apiKey,
213
213
  baseUrl: options.baseUrl,
214
214
  }),
@@ -244,7 +244,7 @@ export function createCheckout(
244
244
  options: CreateCheckoutOptions,
245
245
  ): CheckoutHandle {
246
246
  const controller = createCheckoutController({
247
- client: new BiabDevClient({
247
+ client: new BdApiClient({
248
248
  apiKey: options.apiKey,
249
249
  baseUrl: options.baseUrl,
250
250
  }),
@@ -288,7 +288,7 @@ export function createFollowers(
288
288
  options: CreateFollowersOptions,
289
289
  ): FollowersHandle {
290
290
  const controller = createFollowersController({
291
- client: createBiabClient({
291
+ client: createBdClient({
292
292
  apiKey: options.token,
293
293
  siteId: options.siteId,
294
294
  ...(options.baseUrl ? { baseUrl: options.baseUrl } : {}),
@@ -325,7 +325,7 @@ export type CreateMarketingOptions = {
325
325
  /** Headless marketing pages — the index, plus one page at a time. */
326
326
  export function createMarketing(options: CreateMarketingOptions) {
327
327
  const controller = createMarketingController({
328
- client: createBiabClient({
328
+ client: createBdClient({
329
329
  apiKey: options.token,
330
330
  siteId: options.siteId,
331
331
  ...(options.baseUrl ? { baseUrl: options.baseUrl } : {}),
@@ -351,7 +351,7 @@ export type CreateVerifyOptions = {
351
351
  export function createVerify(options: CreateVerifyOptions) {
352
352
  const { apiKey, baseUrl, ...rest } = options;
353
353
  const controller = createVerifyController({
354
- client: new BiabDevClient({ apiKey, baseUrl }),
354
+ client: new BdApiClient({ apiKey, baseUrl }),
355
355
  ...rest,
356
356
  });
357
357
  const { state, dispose } = bridge(controller);
@@ -386,7 +386,7 @@ export type CreatePortalOptions = {
386
386
  */
387
387
  export function createPortal(options: CreatePortalOptions) {
388
388
  const controller = createPortalController({
389
- client: new BiabDevClient({
389
+ client: new BdApiClient({
390
390
  apiKey: options.apiKey,
391
391
  baseUrl: options.baseUrl,
392
392
  }),
@@ -453,7 +453,7 @@ import {
453
453
  * `.html`, which keeps it inside this package's typecheck.
454
454
  */
455
455
  @Component({
456
- selector: "biab-social-links",
456
+ selector: "bd-social-links",
457
457
  standalone: true,
458
458
  template: `
459
459
  <ul *ngIf="rows.length" [attr.style]="listStyle">
@@ -499,7 +499,7 @@ import {
499
499
  </ul>
500
500
  `,
501
501
  })
502
- export class BiabSocialLinksComponent {
502
+ export class BdSocialLinksComponent {
503
503
  /** The company profile's `socials` record. */
504
504
  @Input() set socials(value: unknown) {
505
505
  this.rows = resolveSocialLinks(value, { color: this.color });
@@ -1,12 +1,12 @@
1
1
  /**
2
- * `@businessdash/sdk/angular` — public entry for the Angular `<biab-form>` binding.
2
+ * `@businessdash/sdk/angular` — public entry for the Angular `<bd-form>` binding.
3
3
  *
4
4
  * Ship mode: SOURCE. The component is shipped as plain TypeScript and compiled
5
5
  * by the consumer's own Angular toolchain (no ng-packagr / Angular Package
6
6
  * Format here — APF would force a build step and an `@angular/*` peer footprint
7
- * onto this SDK). The consumer adds `BiabFormComponent` to a standalone
8
- * component's `imports` (or provides {@link provideBiabClient} once at the app
9
- * root) and drops `<biab-form slug="…">` into any template.
7
+ * onto this SDK). The consumer adds `BdFormComponent` to a standalone
8
+ * component's `imports` (or provides {@link provideBdClient} once at the app
9
+ * root) and drops `<bd-form slug="…">` into any template.
10
10
  *
11
11
  * Everything framework-agnostic (the controller, validation, condition + field
12
12
  * primitives, and the SDK form types) is re-exported from `@businessdash/sdk/forms`;
@@ -15,11 +15,11 @@
15
15
  */
16
16
 
17
17
  export {
18
- BIAB_CLIENT,
19
- BiabFormComponent,
20
- BiabFormNodeComponent,
21
- provideBiabClient,
22
- } from "./biab-form.component.js";
18
+ BD_CLIENT,
19
+ BdFormComponent,
20
+ BdFormNodeComponent,
21
+ provideBdClient,
22
+ } from "./bd-form.component.js";
23
23
 
24
24
  // Re-export the headless core (controller + validation + SDK form types) so a
25
25
  // consumer reaches the full forms surface from the single `/angular` entry.
@@ -5,20 +5,20 @@
5
5
  *
6
6
  * Usage (Next.js App Router):
7
7
  *
8
- * // app/api/biab-auth/[...biab]/route.ts
8
+ * // app/api/bd-auth/[...bd]/route.ts
9
9
  * import { createAuthHandler } from "@businessdash/sdk";
10
10
  *
11
11
  * const handler = createAuthHandler({
12
- * baseUrl: process.env.BIAB_PACKAGE_API_BASE_URL!,
13
- * apiKey: process.env.BIAB_API_KEY!,
14
- * callbackUrl: "https://my-site.com/api/biab-auth/callback",
12
+ * baseUrl: process.env.BD_PACKAGE_API_BASE_URL!,
13
+ * apiKey: process.env.BD_API_KEY!,
14
+ * callbackUrl: "https://my-site.com/api/bd-auth/callback",
15
15
  * });
16
16
  *
17
17
  * export const GET = handler.GET;
18
18
  * export const POST = handler.POST;
19
19
  *
20
20
  * Then drop <SignIn />, <SignUp />, <SignOut /> into your pages — they call
21
- * `/api/biab-auth/sign-in?intent=sign-in` etc., which 302s through the
21
+ * `/api/bd-auth/sign-in?intent=sign-in` etc., which 302s through the
22
22
  * platform-hosted auth page and back to `callbackUrl`. The handler exchanges
23
23
  * the code,
24
24
  * sets the session cookie, and redirects the user to `returnTo`.
@@ -26,14 +26,14 @@
26
26
 
27
27
  import { Temporal } from "@js-temporal/polyfill";
28
28
 
29
- import { BiabDevClient, type BiabDevClientOptions } from "./client.js";
30
- import { BiabApiError } from "./errors.js";
29
+ import { BdApiClient, type BdApiClientOptions } from "./client.js";
30
+ import { BdApiError } from "./errors.js";
31
31
 
32
- export const DEFAULT_AUTH_COOKIE_NAME = "biab_session";
33
- export const DEFAULT_AUTH_BASE_PATH = "/api/biab-auth";
32
+ export const DEFAULT_AUTH_COOKIE_NAME = "bd_session";
33
+ export const DEFAULT_AUTH_BASE_PATH = "/api/bd-auth";
34
34
 
35
35
  export type CreateAuthHandlerOptions = {
36
- /** BIAB platform base URL — e.g. https://app.biab.com/api/package/v1 */
36
+ /** BD platform base URL — e.g. https://app.bd.com/api/package/v1 */
37
37
  baseUrl: string;
38
38
  /** Org-bound package API key (server-side secret). */
39
39
  apiKey: string;
@@ -46,7 +46,7 @@ export type CreateAuthHandlerOptions = {
46
46
  defaultReturnTo?: string;
47
47
  /** Where to send the user after sign-out. Defaults to "/". */
48
48
  signOutReturnTo?: string;
49
- /** Cookie name. Defaults to "biab_session". */
49
+ /** Cookie name. Defaults to "bd_session". */
50
50
  cookieName?: string;
51
51
  /**
52
52
  * Cookie domain. Leave undefined to scope to current host. Set if you want
@@ -55,11 +55,11 @@ export type CreateAuthHandlerOptions = {
55
55
  cookieDomain?: string;
56
56
  /**
57
57
  * The base path this handler is mounted at — used to derive sub-routes.
58
- * Defaults to "/api/biab-auth". Must match the route file location.
58
+ * Defaults to "/api/bd-auth". Must match the route file location.
59
59
  */
60
60
  basePath?: string;
61
61
  /** Optional fetch override (testing, edge runtimes). */
62
- fetch?: BiabDevClientOptions["fetch"];
62
+ fetch?: BdApiClientOptions["fetch"];
63
63
  /**
64
64
  * Origin sent on every server-to-server request to the platform. Defaults
65
65
  * to the origin of `callbackUrl`. Override only when your dev/prod hosts
@@ -131,11 +131,11 @@ function decodeReturnTo(state: string | null): string | null {
131
131
 
132
132
  /**
133
133
  * Returned as plain text so failed redirects show a readable page instead of
134
- * Next.js's empty 500 from an uncaught `BiabApiError`.
134
+ * Next.js's empty 500 from an uncaught `BdApiError`.
135
135
  */
136
136
  function authStartFailureResponse(error: unknown): Response {
137
137
  let detail = "";
138
- if (error instanceof BiabApiError) {
138
+ if (error instanceof BdApiError) {
139
139
  const fromBody =
140
140
  error.body &&
141
141
  typeof error.body === "object" &&
@@ -153,9 +153,9 @@ function authStartFailureResponse(error: unknown): Response {
153
153
  detail +=
154
154
  "Signing in requires API scope tenant_auth:public (it is on by default in Site Builder → Developer).\n";
155
155
  detail +=
156
- "If scope is included but this still fails, deploy the latest BIAB app (pinned-site keys were broken on tenant auth routes) or use an org-wide key (no “Pin to current site”).\n";
156
+ "If scope is included but this still fails, deploy the latest BD app (pinned-site keys were broken on tenant auth routes) or use an org-wide key (no “Pin to current site”).\n";
157
157
  detail +=
158
- "Platform operators issuing keys separately: include tenant_auth under Scopes. Re-issue the key, set BIAB_API_KEY, redeploy.";
158
+ "Platform operators issuing keys separately: include tenant_auth under Scopes. Re-issue the key, set BD_API_KEY, redeploy.";
159
159
  }
160
160
  const status =
161
161
  error.status >= 400 && error.status <= 599 ? error.status : 502;
@@ -193,7 +193,7 @@ export function createAuthHandler(
193
193
  return undefined;
194
194
  }
195
195
  })();
196
- const client = new BiabDevClient({
196
+ const client = new BdApiClient({
197
197
  baseUrl: options.baseUrl,
198
198
  apiKey: options.apiKey,
199
199
  ...(options.fetch ? { fetch: options.fetch } : {}),
@@ -284,7 +284,7 @@ export function createAuthHandler(
284
284
  }
285
285
 
286
286
  // /password-reset (POST { email } → 200 ok). Always succeeds from the
287
- // caller's perspective; the BIAB endpoint only emails when the address
287
+ // caller's perspective; the BD endpoint only emails when the address
288
288
  // belongs to a member of the org bound to this handler's API key.
289
289
  if (subroute === "password-reset" && request.method === "POST") {
290
290
  let payload: { email?: unknown; returnTo?: unknown };
@@ -337,12 +337,12 @@ export async function getTenantSession(input: {
337
337
  cookieValue: string | null | undefined;
338
338
  baseUrl: string;
339
339
  apiKey: string;
340
- /** Required when the API key has Allowed Host set; see {@link BiabDevClientOptions.siteOrigin}. */
340
+ /** Required when the API key has Allowed Host set; see {@link BdApiClientOptions.siteOrigin}. */
341
341
  siteOrigin?: string;
342
- fetch?: BiabDevClientOptions["fetch"];
342
+ fetch?: BdApiClientOptions["fetch"];
343
343
  }) {
344
344
  if (!input.cookieValue) return null;
345
- const client = new BiabDevClient({
345
+ const client = new BdApiClient({
346
346
  baseUrl: input.baseUrl,
347
347
  apiKey: input.apiKey,
348
348
  ...(input.fetch ? { fetch: input.fetch } : {}),
package/src/auth-links.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
  /** Where `createAuthHandler` is mounted unless the consumer says otherwise. */
13
- export const DEFAULT_AUTH_BASE_PATH = "/api/biab-auth";
13
+ export const DEFAULT_AUTH_BASE_PATH = "/api/bd-auth";
14
14
 
15
15
  export type AuthHrefOptions = {
16
16
  /** Where to send the user after auth completes. */
@@ -37,7 +37,7 @@ export function buildAuthHref(
37
37
  /** Local-storage bookkeeping for the "this browser already subscribed" hint. */
38
38
  export type LocalFollow = { email: string; at: number };
39
39
 
40
- export const FOLLOWER_STORE_PREFIX = "biab.followers.";
40
+ export const FOLLOWER_STORE_PREFIX = "bd.followers.";
41
41
 
42
42
  export function followerStoreKey(siteId: string): string {
43
43
  return `${FOLLOWER_STORE_PREFIX}${siteId}`;
package/src/cli.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * `biab-dev` CLI entry point.
3
+ * `bd` CLI entry point.
4
4
  *
5
5
  * Two independent flows, deliberately sharing nothing but transport
6
6
  * conventions — a website's content shape and an org's database shape are
7
7
  * different artifacts, with different review cadence and blast radius.
8
8
  *
9
- * WEBSITE CONTENT (`biab.config.{ts,mjs,js}`):
9
+ * WEBSITE CONTENT (`bd.config.{ts,mjs,js}`):
10
10
  * - `sync-schema` — resolve the config, compute the canonical SHA-256,
11
11
  * POST to the draft-schema endpoint. Idempotent.
12
12
  * - `sync-content` — walk `<contentSync.rootDir>/<locale>/<page>/
@@ -14,7 +14,7 @@
14
14
  * Per-row failures are reported but don't abort.
15
15
  * - `print-schema` — resolved schema + checksum, no upload.
16
16
  *
17
- * CUSTOM DATABASE (`biab.data-model.config.{ts,mjs,js}`):
17
+ * CUSTOM DATABASE (`bd.data-model.config.{ts,mjs,js}`):
18
18
  * - `view-data-model` — what's LIVE (not what was last pushed — the
19
19
  * dashboard writes this model too). `--diff` for the
20
20
  * migration plan, `--out` to scaffold a config.
@@ -36,7 +36,7 @@
36
36
  * change record contents, so its backup and confirmation guards are
37
37
  * load-bearing.
38
38
  *
39
- * Auth: `BIAB_API_KEY`, `BIAB_SITE_ID`, and `BIAB_PACKAGE_API_BASE_URL` from
39
+ * Auth: `BD_API_KEY`, `BD_SITE_ID`, and `BD_PACKAGE_API_BASE_URL` from
40
40
  * the environment (or a `.env` / `.env.local` in the cwd). Scopes:
41
41
  * `marketing:write_schema` / `marketing:write_content` for the website flow;
42
42
  * `metadata:read_schema` (view/plan), `metadata:write_schema` (push), and
@@ -98,31 +98,31 @@ const SEED_CONFIG_CANDIDATES = [
98
98
  "businessdash.seed.ts",
99
99
  "businessdash.seed.mjs",
100
100
  "businessdash.seed.js",
101
- "biab.seed.ts",
102
- "biab.seed.mjs",
103
- "biab.seed.js",
101
+ "bd.seed.ts",
102
+ "bd.seed.mjs",
103
+ "bd.seed.js",
104
104
  ];
105
105
  type Command = (typeof COMMANDS)[number];
106
106
 
107
107
  /** Config candidates per flow. The marketing and data-model configs are
108
108
  * deliberately different files: different artifacts, different blast radius.
109
- * `businessdash.*` names are preferred going forward; the `biab.*` names
109
+ * `businessdash.*` names are preferred going forward; the `bd.*` names
110
110
  * remain a permanent filesystem contract with every existing consumer. */
111
111
  const MARKETING_CONFIG_CANDIDATES = [
112
112
  "businessdash.config.ts",
113
113
  "businessdash.config.mjs",
114
114
  "businessdash.config.js",
115
- "biab.config.ts",
116
- "biab.config.mjs",
117
- "biab.config.js",
115
+ "bd.config.ts",
116
+ "bd.config.mjs",
117
+ "bd.config.js",
118
118
  ];
119
119
  const DATA_MODEL_CONFIG_CANDIDATES = [
120
120
  "businessdash.data-model.config.ts",
121
121
  "businessdash.data-model.config.mjs",
122
122
  "businessdash.data-model.config.js",
123
- "biab.data-model.config.ts",
124
- "biab.data-model.config.mjs",
125
- "biab.data-model.config.js",
123
+ "bd.data-model.config.ts",
124
+ "bd.data-model.config.mjs",
125
+ "bd.data-model.config.js",
126
126
  ];
127
127
 
128
128
  // V7-styled output: matches the dashboard's status-pill colors so the
@@ -139,7 +139,7 @@ const fg = {
139
139
  };
140
140
 
141
141
  function logStep(msg: string): void {
142
- console.log(`[biab-dev] ${msg}`);
142
+ console.log(`[bd] ${msg}`);
143
143
  }
144
144
 
145
145
  /**
@@ -174,7 +174,7 @@ function makeProgress(total: number): {
174
174
  }
175
175
 
176
176
  function logError(msg: string): void {
177
- console.error(`[biab-dev] ${msg}`);
177
+ console.error(`[bd] ${msg}`);
178
178
  }
179
179
 
180
180
  function parseEnvFile(path: string): Record<string, string> {
@@ -236,7 +236,7 @@ function findDataModelConfigPath(cwd: string, override?: string): string {
236
236
  }
237
237
 
238
238
  /**
239
- * Load the consumer's `biab.config.*`. Supports .ts (via the
239
+ * Load the consumer's `bd.config.*`. Supports .ts (via the
240
240
  * consumer's tsx / ts-node setup — we only invoke if `--require tsx`
241
241
  * or `tsx`/`ts-node` registered the loader), .mjs (native ESM), and
242
242
  * .js (CJS or ESM depending on package.json).
@@ -277,7 +277,7 @@ function normalizeBaseUrl(input: string): string {
277
277
  let next = input.trim();
278
278
  if (!/^https?:\/\//i.test(next)) {
279
279
  throw new Error(
280
- `BIAB_PACKAGE_API_BASE_URL must start with http(s):// — got "${input}".`,
280
+ `BD_PACKAGE_API_BASE_URL must start with http(s):// — got "${input}".`,
281
281
  );
282
282
  }
283
283
  if (!next.endsWith("/api/package/v1") && !next.endsWith("/api/package/v1/")) {
@@ -305,7 +305,7 @@ async function cmdSyncSchema(opts: {
305
305
  const artifact = schema.toJSONSchema();
306
306
  const checksum = await schema.checksum();
307
307
 
308
- // Reject any `contentSync.pages[].pageKey` that collides with a BIAB
308
+ // Reject any `contentSync.pages[].pageKey` that collides with a BD
309
309
  // platform-reserved route. Catches the misconfiguration before any
310
310
  // upload happens.
311
311
  const declaredPages = schema.contentSync?.pages ?? [];
@@ -331,16 +331,16 @@ async function cmdSyncSchema(opts: {
331
331
  return;
332
332
  }
333
333
 
334
- const apiKey = opts.env["BIAB_API_KEY"];
335
- const siteId = opts.env["BIAB_SITE_ID"];
334
+ const apiKey = opts.env["BD_API_KEY"];
335
+ const siteId = opts.env["BD_SITE_ID"];
336
336
  const rawBase =
337
- opts.env["BIAB_PACKAGE_API_BASE_URL"] ??
338
- opts.env["NEXT_PUBLIC_BIAB_PACKAGE_API_BASE_URL"];
339
- if (!apiKey) throw new Error("Missing BIAB_API_KEY in env or .env.local.");
340
- if (!siteId) throw new Error("Missing BIAB_SITE_ID in env or .env.local.");
337
+ opts.env["BD_PACKAGE_API_BASE_URL"] ??
338
+ opts.env["NEXT_PUBLIC_BD_PACKAGE_API_BASE_URL"];
339
+ if (!apiKey) throw new Error("Missing BD_API_KEY in env or .env.local.");
340
+ if (!siteId) throw new Error("Missing BD_SITE_ID in env or .env.local.");
341
341
  if (!rawBase) {
342
342
  throw new Error(
343
- "Missing BIAB_PACKAGE_API_BASE_URL in env or .env.local (e.g. https://your-host.tld/api/package/v1).",
343
+ "Missing BD_PACKAGE_API_BASE_URL in env or .env.local (e.g. https://your-host.tld/api/package/v1).",
344
344
  );
345
345
  }
346
346
 
@@ -456,16 +456,16 @@ async function loadDataModelConfig(
456
456
  type ApiTarget = { baseUrl: string; apiKey: string; siteId: string };
457
457
 
458
458
  function resolveApiTarget(env: Record<string, string>): ApiTarget {
459
- const apiKey = env["BIAB_API_KEY"];
460
- const siteId = env["BIAB_SITE_ID"];
459
+ const apiKey = env["BD_API_KEY"];
460
+ const siteId = env["BD_SITE_ID"];
461
461
  const rawBase =
462
- env["BIAB_PACKAGE_API_BASE_URL"] ??
463
- env["NEXT_PUBLIC_BIAB_PACKAGE_API_BASE_URL"];
464
- if (!apiKey) throw new Error("Missing BIAB_API_KEY in env or .env.local.");
465
- if (!siteId) throw new Error("Missing BIAB_SITE_ID in env or .env.local.");
462
+ env["BD_PACKAGE_API_BASE_URL"] ??
463
+ env["NEXT_PUBLIC_BD_PACKAGE_API_BASE_URL"];
464
+ if (!apiKey) throw new Error("Missing BD_API_KEY in env or .env.local.");
465
+ if (!siteId) throw new Error("Missing BD_SITE_ID in env or .env.local.");
466
466
  if (!rawBase) {
467
467
  throw new Error(
468
- "Missing BIAB_PACKAGE_API_BASE_URL in env or .env.local (e.g. https://your-host.tld/api/package/v1).",
468
+ "Missing BD_PACKAGE_API_BASE_URL in env or .env.local (e.g. https://your-host.tld/api/package/v1).",
469
469
  );
470
470
  }
471
471
  return { baseUrl: normalizeBaseUrl(rawBase), apiKey, siteId };
@@ -665,7 +665,7 @@ async function cmdViewDataModel(opts: {
665
665
  * Commit the file next to your code and it becomes a Drizzle/Convex-style
666
666
  * snapshot: deterministic ordering means successive exports git-diff cleanly,
667
667
  * so an AI agent (or a human) can read the collection's state and how it
668
- * changed over time without querying BIAB live. It also re-seeds a fresh org —
668
+ * changed over time without querying BD live. It also re-seeds a fresh org —
669
669
  * the `schema` half is the same shape `sync-data-model` pushes, the `records`
670
670
  * half is the same shape `sync-records` ingests.
671
671
  */
@@ -698,7 +698,7 @@ async function cmdExportDataModel(opts: {
698
698
  ? isAbsolute(opts.out)
699
699
  ? opts.out
700
700
  : resolve(opts.cwd, opts.out)
701
- : resolve(opts.cwd, "biab.data-model.snapshot.json");
701
+ : resolve(opts.cwd, "bd.data-model.snapshot.json");
702
702
  writeFileSync(outPath, `${JSON.stringify(seed, null, 2)}\n`, "utf8");
703
703
 
704
704
  const c = seed.counts;
@@ -763,7 +763,7 @@ async function cmdExportGraphqlSchema(opts: {
763
763
  ? isAbsolute(opts.out)
764
764
  ? opts.out
765
765
  : resolve(opts.cwd, opts.out)
766
- : resolve(opts.cwd, "biab.data-model.graphql");
766
+ : resolve(opts.cwd, "bd.data-model.graphql");
767
767
  writeFileSync(outPath, sdl, "utf8");
768
768
 
769
769
  const typeCount = (sdl.match(/^type \w/gm) ?? []).length;
@@ -794,9 +794,9 @@ function renderConfigModule(
794
794
  }>,
795
795
  ): string {
796
796
  const lines: string[] = [
797
- "// Generated by `biab-dev view-data-model --out`.",
797
+ "// Generated by `bd view-data-model --out`.",
798
798
  "// This is your org's live data model, as code. Edit it, push it with",
799
- "// `biab-dev sync-data-model`, then promote in the dashboard.",
799
+ "// `bd sync-data-model`, then promote in the dashboard.",
800
800
  "",
801
801
  'import { createSchema, defineCollection, defineField } from "@businessdash/sdk";',
802
802
  "",
@@ -1880,7 +1880,7 @@ async function cmdWipeDatabase(opts: {
1880
1880
  } else if (keep.length === 0) {
1881
1881
  logStep(
1882
1882
  fg.dim(
1883
- "Schema draft unchanged — all collections were removed from the config. Remove or edit biab.data-model.config.ts to rebuild.",
1883
+ "Schema draft unchanged — all collections were removed from the config. Remove or edit bd.data-model.config.ts to rebuild.",
1884
1884
  ),
1885
1885
  );
1886
1886
  }
@@ -2087,7 +2087,7 @@ async function postSectionBatch(input: {
2087
2087
  } catch {
2088
2088
  const looksHtml = /^\s*<(?:!doctype|html|head|body)/i.test(bodyText);
2089
2089
  if (looksHtml) {
2090
- message = `${message} (server returned an HTML page, not JSON — the bulk-upsert route may not exist on this host yet. Make sure BIAB is deployed with the marketing/sections endpoint, and that BIAB_PACKAGE_API_BASE_URL points at the right host.)`;
2090
+ message = `${message} (server returned an HTML page, not JSON — the bulk-upsert route may not exist on this host yet. Make sure BD is deployed with the marketing/sections endpoint, and that BD_PACKAGE_API_BASE_URL points at the right host.)`;
2091
2091
  } else if (bodyText.trim()) {
2092
2092
  message = `${message} — ${bodyText.slice(0, 240).trim()}`;
2093
2093
  }
@@ -2152,7 +2152,7 @@ async function cmdSyncContent(opts: {
2152
2152
  console.log(` ${fg.amber("⚠")} ${fg.dim(w.message)}`);
2153
2153
  }
2154
2154
 
2155
- // Reject content syncs that target a BIAB-reserved pageKey. We dedupe
2155
+ // Reject content syncs that target a BD-reserved pageKey. We dedupe
2156
2156
  // so we report each offending key once rather than per-file.
2157
2157
  const reservedKeys = Array.from(
2158
2158
  new Set(
@@ -2185,16 +2185,16 @@ async function cmdSyncContent(opts: {
2185
2185
  return;
2186
2186
  }
2187
2187
 
2188
- const apiKey = opts.env["BIAB_API_KEY"];
2189
- const siteId = opts.env["BIAB_SITE_ID"];
2188
+ const apiKey = opts.env["BD_API_KEY"];
2189
+ const siteId = opts.env["BD_SITE_ID"];
2190
2190
  const rawBase =
2191
- opts.env["BIAB_PACKAGE_API_BASE_URL"] ??
2192
- opts.env["NEXT_PUBLIC_BIAB_PACKAGE_API_BASE_URL"];
2193
- if (!apiKey) throw new Error("Missing BIAB_API_KEY in env or .env.local.");
2194
- if (!siteId) throw new Error("Missing BIAB_SITE_ID in env or .env.local.");
2191
+ opts.env["BD_PACKAGE_API_BASE_URL"] ??
2192
+ opts.env["NEXT_PUBLIC_BD_PACKAGE_API_BASE_URL"];
2193
+ if (!apiKey) throw new Error("Missing BD_API_KEY in env or .env.local.");
2194
+ if (!siteId) throw new Error("Missing BD_SITE_ID in env or .env.local.");
2195
2195
  if (!rawBase) {
2196
2196
  throw new Error(
2197
- "Missing BIAB_PACKAGE_API_BASE_URL in env or .env.local (e.g. https://your-host.tld/api/package/v1).",
2197
+ "Missing BD_PACKAGE_API_BASE_URL in env or .env.local (e.g. https://your-host.tld/api/package/v1).",
2198
2198
  );
2199
2199
  }
2200
2200
 
@@ -2278,27 +2278,27 @@ async function cmdSyncContent(opts: {
2278
2278
  }
2279
2279
 
2280
2280
  function printHelp(): void {
2281
- console.log(`biab-dev — Business In A Box developer CLI
2282
-
2283
- Run via your package runner — biab-dev is a package bin, not a global:
2284
- npx biab-dev <command> (or: pnpm exec biab-dev <command>)
2285
-
2286
- WEBSITE CONTENT (biab.config.ts)
2287
- npx biab-dev sync-schema [--config path] [--dry-run]
2288
- npx biab-dev sync-content [--config path] [--dry-run] [--lax] [--note "first import"]
2289
- npx biab-dev print-schema [--config path]
2290
-
2291
- CUSTOM DATABASE (biab.data-model.config.ts)
2292
- npx biab-dev view-data-model [--json] [--diff] [--out path] [--prune]
2293
- npx biab-dev print-data-model [--config path]
2294
- npx biab-dev export-data-model [--out path] [--schema-only]
2295
- npx biab-dev export-graphql-schema [--out path] [--include-standard]
2296
- npx biab-dev sync-data-model [--config path] [--dry-run] [--prune] [--forms [slugs]] [--no-forms] [--note "..."]
2297
- npx biab-dev sync-records [--records-dir path] [--dry-run]
2298
- npx biab-dev seed [--config path] [--dry-run] [--yes]
2299
- npx biab-dev wipe-collections --collections name-a,name-b [--dry-run]
2300
- npx biab-dev wipe-database --collections name-a,name-b [--config path] [--dry-run] [--yes]
2301
- npx biab-dev wipe-database --all [--config path] [--dry-run] [--yes]
2281
+ console.log(`bd — Business In A Box developer CLI
2282
+
2283
+ Run via your package runner — bd is a package bin, not a global:
2284
+ npx bd <command> (or: pnpm exec bd <command>)
2285
+
2286
+ WEBSITE CONTENT (bd.config.ts)
2287
+ npx bd sync-schema [--config path] [--dry-run]
2288
+ npx bd sync-content [--config path] [--dry-run] [--lax] [--note "first import"]
2289
+ npx bd print-schema [--config path]
2290
+
2291
+ CUSTOM DATABASE (bd.data-model.config.ts)
2292
+ npx bd view-data-model [--json] [--diff] [--out path] [--prune]
2293
+ npx bd print-data-model [--config path]
2294
+ npx bd export-data-model [--out path] [--schema-only]
2295
+ npx bd export-graphql-schema [--out path] [--include-standard]
2296
+ npx bd sync-data-model [--config path] [--dry-run] [--prune] [--forms [slugs]] [--no-forms] [--note "..."]
2297
+ npx bd sync-records [--records-dir path] [--dry-run]
2298
+ npx bd seed [--config path] [--dry-run] [--yes]
2299
+ npx bd wipe-collections --collections name-a,name-b [--dry-run]
2300
+ npx bd wipe-database --collections name-a,name-b [--config path] [--dry-run] [--yes]
2301
+ npx bd wipe-database --all [--config path] [--dry-run] [--yes]
2302
2302
 
2303
2303
  seed run businessdash.seed.ts — schema, records, static collections,
2304
2304
  products, blog posts and coupons, in dependency order. Products and
@@ -2306,18 +2306,18 @@ CUSTOM DATABASE (biab.data-model.config.ts)
2306
2306
  promote in the dashboard. A destructive schema plan refuses unless
2307
2307
  you pass --yes. Same code path as runSeed() from @businessdash/sdk/seed.
2308
2308
 
2309
- view what's LIVE in BIAB right now (the dashboard can change it too, so
2309
+ view what's LIVE in BD right now (the dashboard can change it too, so
2310
2310
  this is not just "what I last pushed")
2311
2311
  print what your local config resolves to — no network
2312
2312
  export pull the WHOLE custom database — schema + records + relations — into
2313
- one portable snapshot (default: ./biab.data-model.snapshot.json).
2313
+ one portable snapshot (default: ./bd.data-model.snapshot.json).
2314
2314
  Deterministic order, so committing it gives a git-diffable history an
2315
- AI agent can read without querying BIAB. Re-seeds a fresh org via
2315
+ AI agent can read without querying BD. Re-seeds a fresh org via
2316
2316
  sync-data-model (schema) + sync-records (rows). --schema-only skips
2317
2317
  the row scan. Needs metadata:read_schema + metadata:read_records.
2318
2318
  export-graphql-schema
2319
2319
  render a GraphQL SDL schema of your custom collections (default:
2320
- ./biab.data-model.graphql) — every object a type, relations as lists,
2320
+ ./bd.data-model.graphql) — every object a type, relations as lists,
2321
2321
  SELECTs as enums where valid. Feed it to GraphQL codegen or commit it
2322
2322
  as a typed contract. Schema only; this does not run a GraphQL server.
2323
2323
  --include-standard also emits standard CRM types. Needs
@@ -2325,7 +2325,7 @@ CUSTOM DATABASE (biab.data-model.config.ts)
2325
2325
  sync push your config to the draft slot. Prints the migration plan first;
2326
2326
  nothing changes until you promote in the dashboard.
2327
2327
 
2328
- seed upsert rows from JSON (default dir: ./biab-records). Each file is an
2328
+ seed upsert rows from JSON (default dir: ./bd-records). Each file is an
2329
2329
  array of { object, universalIdentifier, values, relations? }; identity
2330
2330
  is what makes re-running converge instead of duplicating. relations
2331
2331
  links rows by the TARGET row's universalIdentifier, e.g.
@@ -2355,16 +2355,16 @@ CUSTOM DATABASE (biab.data-model.config.ts)
2355
2355
  --no-forms push only collections. Generated forms are created inactive on
2356
2356
  promotion and must be activated separately in the dashboard.
2357
2357
 
2358
- npx biab-dev help
2358
+ npx bd help
2359
2359
 
2360
2360
  Environment (read from process.env, .env, or .env.local in the cwd):
2361
- BIAB_API_KEY API key. Website flow needs marketing:write_schema
2361
+ BD_API_KEY API key. Website flow needs marketing:write_schema
2362
2362
  / marketing:write_content. Data-model flow needs
2363
2363
  metadata:read_schema (view/plan) and
2364
2364
  metadata:write_schema (push) or
2365
2365
  metadata:write_records (seed/wipe).
2366
- BIAB_SITE_ID UUID of the site to publish to
2367
- BIAB_PACKAGE_API_BASE_URL Host URL (any path; the CLI canonicalises
2366
+ BD_SITE_ID UUID of the site to publish to
2367
+ BD_PACKAGE_API_BASE_URL Host URL (any path; the CLI canonicalises
2368
2368
  to "<origin>/api/package/v1" automatically).
2369
2369
  Use the APEX host — e.g. https://biab.app, NOT
2370
2370
  https://www.biab.app. A www→apex redirect makes
@@ -2380,8 +2380,8 @@ two interactive confirmations. wipe-database combines a data wipe with a
2380
2380
  pruned schema push for developer convenience.
2381
2381
 
2382
2382
  Config files (override either with --config path):
2383
- biab.config.ts → defineSiteMarketingSchema (website content)
2384
- biab.data-model.config.ts → createFormSchemaOrchestrator / createSchema
2383
+ bd.config.ts → defineSiteMarketingSchema (website content)
2384
+ bd.data-model.config.ts → createFormSchemaOrchestrator / createSchema
2385
2385
 
2386
2386
  sync-content also reads the optional \`contentSync\` field on your
2387
2387
  defineSiteMarketingSchema({...}) call. Minimal form (default layout
@@ -2444,7 +2444,7 @@ function parseArgs(argv: string[]): ParsedArgs {
2444
2444
  diff: false,
2445
2445
  out: null,
2446
2446
  prune: false,
2447
- recordsDir: "biab-records",
2447
+ recordsDir: "bd-records",
2448
2448
  forms: "prompt",
2449
2449
  collections: [],
2450
2450
  yes: false,