@businessdash/sdk 0.9.81 → 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 (261) hide show
  1. package/README.md +115 -902
  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 +350 -273
  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 +1 -1
  137. package/dist/push-core/index.d.ts +1 -1
  138. package/dist/push-core/index.js +1 -1
  139. package/dist/push-core/index.js.map +1 -1
  140. package/dist/react-analytics.d.ts +14 -14
  141. package/dist/react-analytics.d.ts.map +1 -1
  142. package/dist/react-analytics.js +15 -15
  143. package/dist/react-analytics.js.map +1 -1
  144. package/dist/react-attribution.d.ts +2 -2
  145. package/dist/react-attribution.d.ts.map +1 -1
  146. package/dist/react-attribution.js +1 -1
  147. package/dist/react-marketing.js +5 -5
  148. package/dist/react-marketing.js.map +1 -1
  149. package/dist/react.d.ts +38 -61
  150. package/dist/react.d.ts.map +1 -1
  151. package/dist/react.js +247 -261
  152. package/dist/react.js.map +1 -1
  153. package/dist/reserved-paths.d.ts +2 -2
  154. package/dist/reserved-paths.js +3 -3
  155. package/dist/reserved-paths.js.map +1 -1
  156. package/dist/revalidate-verify.d.ts +3 -3
  157. package/dist/revalidate-verify.d.ts.map +1 -1
  158. package/dist/revalidate-verify.js +1 -1
  159. package/dist/revalidate-verify.js.map +1 -1
  160. package/dist/sdk.d.ts +49 -49
  161. package/dist/sdk.d.ts.map +1 -1
  162. package/dist/sdk.js +47 -51
  163. package/dist/sdk.js.map +1 -1
  164. package/dist/seed-core/index.js +8 -8
  165. package/dist/seed-core/index.js.map +1 -1
  166. package/dist/seo-core/blog.d.ts +1 -1
  167. package/dist/seo-core/blog.js +1 -1
  168. package/dist/seo-core/blog.js.map +1 -1
  169. package/dist/seo-core/index.cjs +2 -2
  170. package/dist/seo-core/index.js +1 -1
  171. package/dist/seo-core/index.js.map +1 -1
  172. package/dist/seo.d.ts +1 -1
  173. package/dist/seo.d.ts.map +1 -1
  174. package/dist/seo.js +1 -1
  175. package/dist/seo.js.map +1 -1
  176. package/dist/sitemap-core/index.cjs +3 -3
  177. package/dist/sitemap-core/index.js +2 -2
  178. package/dist/sitemap-core/index.js.map +1 -1
  179. package/dist/socials.d.ts +6 -6
  180. package/dist/socials.d.ts.map +1 -1
  181. package/dist/socials.js +5 -5
  182. package/dist/socials.js.map +1 -1
  183. package/dist/solid-compat.d.ts +1 -1
  184. package/dist/solid-compat.js +4 -4
  185. package/dist/solid-compat.js.map +1 -1
  186. package/dist/store-core/index.d.ts +1 -1
  187. package/dist/vanilla.d.ts +12 -12
  188. package/dist/vanilla.d.ts.map +1 -1
  189. package/dist/vanilla.js +192 -145
  190. package/dist/vanilla.js.map +1 -1
  191. package/openapi.json +264 -1
  192. package/package.json +8 -8
  193. package/src/account-core/index.ts +1 -1
  194. package/src/adapters-revalidate.ts +3 -3
  195. package/src/analytics-core.ts +8 -8
  196. package/src/analytics-server.ts +6 -6
  197. package/src/angular/{biab-form.component.ts → bd-form.component.ts} +269 -161
  198. package/src/angular/headless.ts +12 -12
  199. package/src/angular/index.ts +9 -9
  200. package/src/auth-handler.ts +22 -22
  201. package/src/auth-links.ts +2 -2
  202. package/src/cli.ts +81 -81
  203. package/src/client.ts +218 -193
  204. package/src/consent-core/index.ts +10 -8
  205. package/src/contracts.ts +99 -15
  206. package/src/data-model-schema.ts +29 -26
  207. package/src/distribution.ts +5 -5
  208. package/src/element.ts +54 -54
  209. package/src/embed-protocol.ts +14 -14
  210. package/src/errors.ts +27 -27
  211. package/src/forms-core/autocomplete.ts +3 -3
  212. package/src/forms-core/controller.ts +12 -12
  213. package/src/forms-core/elements.ts +7 -7
  214. package/src/forms-core/formula.ts +1 -1
  215. package/src/forms-core/index.ts +8 -8
  216. package/src/forms-core/units.ts +1 -1
  217. package/src/forms-core/us-states.ts +1 -1
  218. package/src/forms-core/validation.ts +158 -14
  219. package/src/forms.ts +2 -2
  220. package/src/framework-support.ts +1 -1
  221. package/src/gallery-types.ts +1 -1
  222. package/src/graphql.ts +4 -4
  223. package/src/index.ts +38 -38
  224. package/src/legal-core/index.ts +12 -12
  225. package/src/marketing-core/index.ts +62 -0
  226. package/src/marketing-schema.ts +9 -9
  227. package/src/mcp.ts +4 -4
  228. package/src/native.ts +14 -14
  229. package/src/next-revalidate.ts +10 -10
  230. package/src/notifications-core/index.ts +1 -1
  231. package/src/parallel-pages.ts +6 -6
  232. package/src/portal-core/index.ts +1 -1
  233. package/src/proxy.ts +28 -28
  234. package/src/push-core/index.ts +2 -2
  235. package/src/qwik.tsx +262 -166
  236. package/src/react-analytics.tsx +17 -17
  237. package/src/react-attribution.tsx +2 -2
  238. package/src/react-marketing.tsx +5 -5
  239. package/src/react.tsx +541 -500
  240. package/src/reserved-paths.ts +3 -3
  241. package/src/revalidate-verify.ts +5 -5
  242. package/src/sdk.ts +106 -110
  243. package/src/seed-core/index.ts +8 -8
  244. package/src/seo-core/blog.ts +2 -2
  245. package/src/seo-core/index.ts +1 -1
  246. package/src/seo.ts +1 -1
  247. package/src/sitemap-core/index.ts +2 -2
  248. package/src/socials.ts +6 -6
  249. package/src/solid-compat.tsx +5 -5
  250. package/src/solid-surfaces.tsx +28 -28
  251. package/src/solid.tsx +264 -175
  252. package/src/store-core/index.ts +1 -1
  253. package/src/styles/{biab-forms.css → bd-forms.css} +158 -158
  254. package/src/svelte/{BiabForm.svelte → BdForm.svelte} +240 -173
  255. package/src/svelte/context.ts +16 -16
  256. package/src/svelte/headless.ts +10 -10
  257. package/src/svelte/index.ts +16 -16
  258. package/src/vanilla.ts +250 -169
  259. package/src/vue/{BiabForm.vue → BdForm.vue} +270 -157
  260. package/src/vue/headless.ts +11 -11
  261. package/src/vue/index.ts +26 -26
package/dist/client.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- import { addressDetailsResponseSchema, addressFormValuesSchema, addressSearchInputSchema, addressSearchResponseSchema, addressVerifyResponseSchema, aiVisibilityInputSchema, aiVisibilityResponseSchema, attributionHeartbeatInputSchema, attributionHeartbeatResponseSchema, attributionPolicySchema, authIntrospectResponseSchema, blogCategoryListResponseSchema, blogCommentListResponseSchema, blogCommentPostInputSchema, blogCommentPostResponseSchema, blogLikeResponseSchema, blogListPostsResponseSchema, blogPostBySlugResponseSchema, blogSessionInputSchema, blogSessionResponseSchema, blogTagListResponseSchema, cartAddItemInputSchema, cartCouponInputSchema, cartSessionResponseSchema, cartSnapshotSchema, cartUpdateItemInputSchema, chatbotAppendMessageInputSchema, chatbotAvailabilitySchema, chatbotChatInputSchema, chatbotChatResponseSchema, chatbotConfigSchema, chatbotConfigUpdateInputSchema, chatbotFormDefinitionSchema, chatbotFormSubmitInputSchema, chatbotFormSubmitResponseSchema, chatbotMessagesResponseSchema, chatbotPersistedSessionInputSchema, chatbotPersistedSessionResponseSchema, chatbotRequestHumanInputSchema, chatbotRequestHumanResponseSchema, chatbotSessionResponseSchema, chatbotUploadUrlResponseSchema, checkoutSessionInputSchema, checkoutSessionResponseSchema, checkoutStartInputSchema, checkoutStartResponseSchema, checkoutStatusResponseSchema, confirmVerificationInputSchema, confirmVerificationResponseSchema, couponCreateInputSchema, couponCreateResponseSchema, couponListResponseSchema, couponValidateInputSchema, couponValidateResponseSchema, createCollectionInputSchema, createCollectionResponseSchema, createEmailTemplateInputSchema, createEmailTemplateResponseSchema, createEmailTemplateVersionInputSchema, createEmailTemplateVersionResponseSchema, customerContactCompanyInputSchema, customerContactCompanyResponseSchema, customerContractDetailSchema, customerContractListResponseSchema, customerContractSignResponseSchema, customerDownloadsResponseSchema, customerInviteResendResponseSchema, customerInvoiceDetailSchema, customerInvoiceListResponseSchema, customerInvoicePayInputSchema, customerInvoicePayResponseSchema, customerInvoicePdfSchema, customerJobActivityResponseSchema, customerJobCommentPostInputSchema, customerJobCommentSchema, customerJobCommentsListResponseSchema, customerJobDetailSchema, customerJobEtaResponseSchema, customerNotificationPreferencesResponseSchema, customerNotificationPreferencesUpdateInputSchema, customerNotificationPreferencesUpdateResponseSchema, customerNotReceivedResultSchema, customerOrderDetailSchema, customerOrderListResponseSchema, customerPaymentHistoryResponseSchema, customerPortalContextResponseSchema, customerPortalMessageListResponseSchema, customerPortalMessageSchema, customerPortalMessagesMarkReadResponseSchema, customerPortalOtherOrgsResponseSchema, customerPortalProfileSchema, customerPortalQuizResultsResponseSchema, customerPortalUpdateProfileInputSchema, customerPortalUpdateProfileResponseSchema, customerProductReviewCreatedSchema, customerProductReviewListSchema, customerPushConfigSchema, customerQuoteActionResponseSchema, customerQuoteDetailSchema, customerQuoteListResponseSchema, customerReferralHistoryResponseSchema, customerReferralPayoutsResponseSchema, customerReferralStatsSchema, customerReturnRequestCreatedSchema, customerReturnRequestInputSchema, customerReturnRequestListResponseSchema, customerReviewListResponseSchema, customerReviewSubmitInputSchema, customerReviewSubmitResponseSchema, customerShipmentListResponseSchema, customerShipmentTrackingSchema, customerSubscriberContentResponseSchema, customerSubscriptionCancelResponseSchema, customerSubscriptionResponseSchema, customerWorkBundleSchema, dashboardSessionResponseSchema, executeActionInputSchema, executeActionResponseSchema, followerEditInputSchema, followerEditResponseSchema, followerJoinInputSchema, followerJoinResponseSchema, followerLeaveInputSchema, followerLeaveResponseSchema, followerMeInputSchema, followerMeResponseSchema, getCollectionResponseSchema, getEmailTemplateResponseSchema, getMarketingLocalesResponseSchema, getMarketingPageBundleResponseSchema, getPublishedMarketingSchemaResponseSchema, getSiteMarketingPageResponseSchema, jobCategoryListResponseSchema, jobPostingListResponseSchema, jobPostingSchema, legalDocumentSchema, legalListResponseSchema, listCollectionsResponseSchema, listDataModelRecordsInputSchema, listDataModelRecordsResponseSchema, listEmailTemplatesInputSchema, listEmailTemplatesResponseSchema, listRowsInputSchema, listRowsResponseSchema, listSiteMarketingPagesResponseSchema, notificationPreferencesResponseSchema, notificationPreferencesUpdateInputSchema, pageViewsInputSchema, pageViewsResponseSchema, publishMarketingSectionsInputSchema, publishMarketingSectionsResponseSchema, queryRowsInputSchema, queryRowsResponseSchema, reviewWallListResponseSchema, schedulingBookingResultSchema, schedulingBookingViewSchema, schedulingCancelResultSchema, schedulingEventTypeDetailSchema, schedulingEventTypeListSchema, schedulingRescheduleResultSchema, schedulingSlotsResponseSchema, shippingRatesInputSchema, shippingRatesResponseSchema, shippingSettingsResponseSchema, shippingTrackResponseSchema, siteAssetInputSchema, siteBrandingSchema, startVerificationInputSchema, startVerificationResponseSchema, storefrontAddonsResponseSchema, storefrontCategoriesResponseSchema, storefrontListProductsResponseSchema, storefrontProductDetailSchema, storefrontProductReviewsResponseSchema, storefrontProductsWithMetaResponseSchema, storefrontRelatedProductsResponseSchema, storefrontSessionInputSchema, storefrontSessionResponseSchema, storefrontSyncToStripeResponseSchema, subscriptionCheckoutInputSchema, subscriptionCheckoutResponseSchema, subscriptionOfferingSchema, subscriptionOfferingsListResponseSchema, tenantAuthExchangeInputSchema, tenantAuthExchangeResponseSchema, tenantAuthMeResponseSchema, tenantAuthPasswordResetInputSchema, tenantAuthPasswordResetResponseSchema, tenantAuthSignOutResponseSchema, tenantAuthStartInputSchema, tenantAuthStartResponseSchema, uploadSiteAssetResponseSchema, upsertDraftMarketingSchemaInputSchema, upsertDraftMarketingSchemaResponseSchema, upsertRowInputSchema, upsertRowResponseSchema, } from "./contracts.js";
3
- import { accessRejectionFromBody, BiabApiError, isBiabPlanGateBody, } from "./errors.js";
2
+ import { addressDetailsResponseSchema, addressFormValuesSchema, addressSearchInputSchema, addressSearchResponseSchema, addressVerifyResponseSchema, aiVisibilityInputSchema, aiVisibilityResponseSchema, attributionHeartbeatInputSchema, attributionHeartbeatResponseSchema, attributionPolicySchema, authIntrospectResponseSchema, blogCategoryListResponseSchema, blogCommentListResponseSchema, blogCommentPostInputSchema, blogCommentPostResponseSchema, blogLikeResponseSchema, blogListPostsResponseSchema, blogPostBySlugResponseSchema, blogSessionInputSchema, blogSessionResponseSchema, blogTagListResponseSchema, cartAddItemInputSchema, cartCouponInputSchema, cartSessionResponseSchema, cartSnapshotSchema, cartUpdateItemInputSchema, chatbotAppendMessageInputSchema, chatbotAvailabilitySchema, chatbotChatInputSchema, chatbotChatResponseSchema, chatbotConfigSchema, chatbotConfigUpdateInputSchema, chatbotFormDefinitionSchema, chatbotFormSubmitInputSchema, chatbotFormSubmitResponseSchema, chatbotMessagesResponseSchema, chatbotPersistedSessionInputSchema, chatbotPersistedSessionResponseSchema, chatbotRequestHumanInputSchema, chatbotRequestHumanResponseSchema, chatbotSessionResponseSchema, chatbotUploadUrlResponseSchema, checkoutSessionInputSchema, checkoutSessionResponseSchema, checkoutStartInputSchema, checkoutStartResponseSchema, checkoutStatusResponseSchema, confirmVerificationInputSchema, confirmVerificationResponseSchema, couponCreateInputSchema, couponCreateResponseSchema, couponListResponseSchema, couponValidateInputSchema, couponValidateResponseSchema, createCollectionInputSchema, createCollectionResponseSchema, createEmailTemplateInputSchema, createEmailTemplateResponseSchema, createEmailTemplateVersionInputSchema, createEmailTemplateVersionResponseSchema, customerContactCompanyInputSchema, customerContactCompanyResponseSchema, customerContractDetailSchema, customerContractListResponseSchema, customerContractSignResponseSchema, customerDownloadsResponseSchema, customerInviteResendResponseSchema, customerInvoiceDetailSchema, customerInvoiceListResponseSchema, customerInvoicePayInputSchema, customerInvoicePayResponseSchema, customerInvoicePdfSchema, customerJobActivityResponseSchema, customerJobCommentPostInputSchema, customerJobCommentSchema, customerJobCommentsListResponseSchema, customerJobDetailSchema, customerJobEtaResponseSchema, customerNotificationPreferencesResponseSchema, customerNotificationPreferencesUpdateInputSchema, customerNotificationPreferencesUpdateResponseSchema, customerNotReceivedResultSchema, customerOrderDetailSchema, customerOrderListResponseSchema, customerPaymentHistoryResponseSchema, customerPortalContextResponseSchema, customerPortalMessageListResponseSchema, customerPortalMessageSchema, customerPortalMessagesMarkReadResponseSchema, customerPortalOtherOrgsResponseSchema, customerPortalProfileSchema, customerPortalQuizResultsResponseSchema, customerPortalUpdateProfileInputSchema, customerPortalUpdateProfileResponseSchema, customerProductReviewCreatedSchema, customerProductReviewListSchema, customerProposalListResponseSchema, customerProposalSchema, customerPushConfigSchema, customerQuoteActionResponseSchema, customerQuoteDetailSchema, customerQuoteListResponseSchema, customerReferralHistoryResponseSchema, customerReferralPayoutsResponseSchema, customerReferralStatsSchema, customerReturnRequestCreatedSchema, customerReturnRequestInputSchema, customerReturnRequestListResponseSchema, customerReviewListResponseSchema, customerReviewSubmitInputSchema, customerReviewSubmitResponseSchema, customerShipmentListResponseSchema, customerShipmentTrackingSchema, customerSubscriberContentResponseSchema, customerSubscriptionCancelResponseSchema, customerSubscriptionResponseSchema, customerWorkBundleSchema, dashboardSessionResponseSchema, executeActionInputSchema, executeActionResponseSchema, followerEditInputSchema, followerEditResponseSchema, followerJoinInputSchema, followerJoinResponseSchema, followerLeaveInputSchema, followerLeaveResponseSchema, followerMeInputSchema, followerMeResponseSchema, getCollectionResponseSchema, getEmailTemplateResponseSchema, getMarketingLocalesResponseSchema, getMarketingPageBundleResponseSchema, getPublishedMarketingSchemaResponseSchema, getSiteMarketingPageResponseSchema, jobCategoryListResponseSchema, jobPostingListResponseSchema, jobPostingSchema, legalDocumentSchema, legalListResponseSchema, listCollectionsResponseSchema, listDataModelRecordsInputSchema, listDataModelRecordsResponseSchema, listEmailTemplatesInputSchema, listEmailTemplatesResponseSchema, listRowsInputSchema, listRowsResponseSchema, listSiteMarketingPagesResponseSchema, notificationPreferencesResponseSchema, notificationPreferencesUpdateInputSchema, pageViewsInputSchema, pageViewsResponseSchema, publishMarketingSectionsInputSchema, publishMarketingSectionsResponseSchema, queryRowsInputSchema, queryRowsResponseSchema, reviewWallListResponseSchema, schedulingBookingResultSchema, schedulingBookingViewSchema, schedulingCancelResultSchema, schedulingEventTypeDetailSchema, schedulingEventTypeListSchema, schedulingRescheduleResultSchema, schedulingSlotsResponseSchema, shippingRatesInputSchema, shippingRatesResponseSchema, shippingSettingsResponseSchema, shippingTrackResponseSchema, siteAssetInputSchema, siteBrandingSchema, startVerificationInputSchema, startVerificationResponseSchema, storefrontAddonsResponseSchema, storefrontCategoriesResponseSchema, storefrontListProductsResponseSchema, storefrontProductDetailSchema, storefrontProductReviewsResponseSchema, storefrontProductsWithMetaResponseSchema, storefrontRelatedProductsResponseSchema, storefrontSessionInputSchema, storefrontSessionResponseSchema, storefrontSyncToStripeResponseSchema, subscriptionCheckoutInputSchema, subscriptionCheckoutResponseSchema, subscriptionOfferingSchema, subscriptionOfferingsListResponseSchema, tenantAuthExchangeInputSchema, tenantAuthExchangeResponseSchema, tenantAuthMeResponseSchema, tenantAuthPasswordResetInputSchema, tenantAuthPasswordResetResponseSchema, tenantAuthSignOutResponseSchema, tenantAuthStartInputSchema, tenantAuthStartResponseSchema, uploadSiteAssetResponseSchema, upsertDraftMarketingSchemaInputSchema, upsertDraftMarketingSchemaResponseSchema, upsertRowInputSchema, upsertRowResponseSchema, } from "./contracts.js";
3
+ import { accessRejectionFromBody, BdApiError, isBdPlanGateBody, } from "./errors.js";
4
4
  function buildUrl(baseUrl, path, query) {
5
5
  /**
6
6
  * Strip any leading slash from `path` so it is treated as a relative path and
@@ -66,13 +66,13 @@ function extractErrorMessage(body, fallback) {
66
66
  return fallback;
67
67
  }
68
68
  /**
69
- * Typed client for the BIAB package HTTP API.
69
+ * Typed client for the BD package HTTP API.
70
70
  *
71
71
  * @remarks
72
72
  * **Alpha:** This SDK is in alpha. Surfaces and behavior may change without semver guarantees.
73
73
  * Do not rely on it for production workloads—use development, staging, or experiments only.
74
74
  */
75
- export class BiabDevClient {
75
+ export class BdApiClient {
76
76
  baseUrl;
77
77
  apiKey;
78
78
  fetchImpl;
@@ -96,47 +96,47 @@ export class BiabDevClient {
96
96
  }
97
97
  siteOrigin;
98
98
  site(siteId) {
99
- return new BiabDevSiteClient(this, siteId);
99
+ return new BdSiteClient(this, siteId);
100
100
  }
101
101
  get emailTemplates() {
102
- return new BiabDevEmailTemplatesClient(this);
102
+ return new BdEmailTemplatesClient(this);
103
103
  }
104
104
  get dashboard() {
105
- return new BiabDevDashboardClient(this);
105
+ return new BdDashboardClient(this);
106
106
  }
107
107
  get storefront() {
108
- return new BiabDevStorefrontClient(this);
108
+ return new BdStorefrontClient(this);
109
109
  }
110
110
  get cart() {
111
- return new BiabDevCartClient(this);
111
+ return new BdCartClient(this);
112
112
  }
113
113
  get checkout() {
114
- return new BiabDevCheckoutClient(this);
114
+ return new BdCheckoutClient(this);
115
115
  }
116
116
  get coupons() {
117
- return new BiabDevCouponsClient(this);
117
+ return new BdCouponsClient(this);
118
118
  }
119
119
  get subscriptions() {
120
- return new BiabDevSubscriptionsClient(this);
120
+ return new BdSubscriptionsClient(this);
121
121
  }
122
122
  get shipping() {
123
- return new BiabDevShippingClient(this);
123
+ return new BdShippingClient(this);
124
124
  }
125
125
  /** Customer-portal invitations — currently resend. */
126
126
  get customerInvites() {
127
- return new BiabDevCustomerInvitesClient(this);
127
+ return new BdCustomerInvitesClient(this);
128
128
  }
129
129
  get notifications() {
130
- return new BiabDevNotificationsClient(this);
130
+ return new BdNotificationsClient(this);
131
131
  }
132
132
  get address() {
133
- return new BiabDevAddressClient(this);
133
+ return new BdAddressClient(this);
134
134
  }
135
135
  get blog() {
136
- return new BiabDevBlogClient(this);
136
+ return new BdBlogClient(this);
137
137
  }
138
138
  get reviews() {
139
- return new BiabDevReviewsClient(this);
139
+ return new BdReviewsClient(this);
140
140
  }
141
141
  /**
142
142
  * Tracking consent for this org's site.
@@ -145,11 +145,11 @@ export class BiabDevClient {
145
145
  * and gives you a gate to check before starting analytics.
146
146
  */
147
147
  get consent() {
148
- return new BiabDevConsentClient(this);
148
+ return new BdConsentClient(this);
149
149
  }
150
150
  /** Public job postings — build a careers page on your own domain. */
151
151
  get hiring() {
152
- return new BiabDevHiringClient(this);
152
+ return new BdHiringClient(this);
153
153
  }
154
154
  /**
155
155
  * The org's published legal pages — privacy, terms, refund policy, whatever
@@ -159,23 +159,23 @@ export class BiabDevClient {
159
159
  * per document.
160
160
  */
161
161
  get legal() {
162
- return new BiabDevLegalClient(this);
162
+ return new BdLegalClient(this);
163
163
  }
164
164
  get chatbot() {
165
- return new BiabDevChatbotClient(this);
165
+ return new BdChatbotClient(this);
166
166
  }
167
167
  get auth() {
168
- return new BiabDevAuthClient(this);
168
+ return new BdAuthClient(this);
169
169
  }
170
170
  /**
171
- * Customer-portal client. Pin to a specific BIAB organization id so the
171
+ * Customer-portal client. Pin to a specific BD organization id so the
172
172
  * caller never sees data from any other org (recommended). Omit
173
173
  * `organizationId` to fall back to the user's currently-active session
174
174
  * org — only use that on first-party hosts where the host already pins
175
175
  * the org.
176
176
  */
177
177
  customerPortal(organizationId) {
178
- return new BiabDevCustomerPortalClient(this, organizationId ?? null);
178
+ return new BdCustomerPortalClient(this, organizationId ?? null);
179
179
  }
180
180
  async introspect() {
181
181
  return this.request({
@@ -206,12 +206,12 @@ export class BiabDevClient {
206
206
  const body = await parseResponseBody(response);
207
207
  // Access gate — 200 (reads, body-only signal) and 402 (writes)
208
208
  // both surface as a typed error so consumer code is uniform.
209
- // Three flavours: plan-required (BiabFeatureNotEntitledError),
210
- // payment-required (BiabPaymentLapsedError), service-suspended
211
- // (BiabServiceSuspendedError) — all extend BiabAccessRejectedError
209
+ // Three flavours: plan-required (BdFeatureNotEntitledError),
210
+ // payment-required (BdPaymentLapsedError), service-suspended
211
+ // (BdServiceSuspendedError) — all extend BdAccessRejectedError
212
212
  // for "catch any" patterns. `unwrapAccess()` is the opt-in
213
213
  // Result-shape escape hatch.
214
- if (isBiabPlanGateBody(body)) {
214
+ if (isBdPlanGateBody(body)) {
215
215
  throw accessRejectionFromBody({
216
216
  body,
217
217
  path: url.pathname,
@@ -219,17 +219,17 @@ export class BiabDevClient {
219
219
  });
220
220
  }
221
221
  if (!response.ok) {
222
- throw new BiabApiError({
222
+ throw new BdApiError({
223
223
  status: response.status,
224
224
  path: url.pathname,
225
- message: extractErrorMessage(body, `BIAB API request failed with status ${response.status}.`),
225
+ message: extractErrorMessage(body, `BD API request failed with status ${response.status}.`),
226
226
  body,
227
227
  });
228
228
  }
229
229
  return options.responseSchema.parse(body);
230
230
  }
231
231
  }
232
- export class BiabDevSiteClient {
232
+ export class BdSiteClient {
233
233
  client;
234
234
  siteId;
235
235
  collections;
@@ -237,18 +237,18 @@ export class BiabDevSiteClient {
237
237
  /**
238
238
  * The org's custom database — the tables from `defineDataModel()`.
239
239
  * Distinct from `collections`/`rows`, which are Site Data. See
240
- * {@link BiabDevDataModelClient}.
240
+ * {@link BdDataModelClient}.
241
241
  */
242
242
  dataModel;
243
243
  /**
244
244
  * Read your site's visitor counts back (the counterpart to the
245
- * `<BIABAnalytics/>` tracker, which only records). See
246
- * {@link BiabDevAnalyticsClient}.
245
+ * `<BDAnalytics/>` tracker, which only records). See
246
+ * {@link BdAnalyticsClient}.
247
247
  */
248
248
  analytics;
249
249
  /**
250
250
  * The "Powered by BusinessDash" badge's policy + heartbeat. See
251
- * {@link BiabDevAttributionClient}.
251
+ * {@link BdAttributionClient}.
252
252
  */
253
253
  attribution;
254
254
  assets;
@@ -257,7 +257,7 @@ export class BiabDevSiteClient {
257
257
  marketingPages;
258
258
  /**
259
259
  * Schema-driven marketing flow (Phase 2). Pair with the SDK's
260
- * `defineSiteMarketingSchema()` builder + the `biab-dev sync-schema`
260
+ * `defineSiteMarketingSchema()` builder + the `bd sync-schema`
261
261
  * CLI for the authoring side; this client is the live-site read
262
262
  * path (`getPageBundle`) and the upload entry point for the CLI.
263
263
  */
@@ -274,18 +274,18 @@ export class BiabDevSiteClient {
274
274
  constructor(client, siteId) {
275
275
  this.client = client;
276
276
  this.siteId = siteId;
277
- this.collections = new BiabDevCollectionsClient(client, siteId);
278
- this.scheduling = new BiabDevSchedulingClient(client, siteId);
279
- this.rows = new BiabDevRowsClient(client, siteId);
280
- this.dataModel = new BiabDevDataModelClient(client, siteId);
281
- this.analytics = new BiabDevAnalyticsClient(client, siteId);
282
- this.attribution = new BiabDevAttributionClient(client, siteId);
283
- this.assets = new BiabDevAssetsClient(client, siteId);
284
- this.actions = new BiabDevActionsClient(client, siteId);
285
- this.followers = new BiabDevFollowersClient(client, siteId);
286
- this.marketingPages = new BiabDevMarketingPagesClient(client, siteId);
287
- this.marketing = new BiabDevMarketingClient(client, siteId);
288
- this.parallelPages = new BiabDevParallelPagesClient(client, siteId);
277
+ this.collections = new BdCollectionsClient(client, siteId);
278
+ this.scheduling = new BdSchedulingClient(client, siteId);
279
+ this.rows = new BdRowsClient(client, siteId);
280
+ this.dataModel = new BdDataModelClient(client, siteId);
281
+ this.analytics = new BdAnalyticsClient(client, siteId);
282
+ this.attribution = new BdAttributionClient(client, siteId);
283
+ this.assets = new BdAssetsClient(client, siteId);
284
+ this.actions = new BdActionsClient(client, siteId);
285
+ this.followers = new BdFollowersClient(client, siteId);
286
+ this.marketingPages = new BdMarketingPagesClient(client, siteId);
287
+ this.marketing = new BdMarketingClient(client, siteId);
288
+ this.parallelPages = new BdParallelPagesClient(client, siteId);
289
289
  }
290
290
  /**
291
291
  * The org's storefront branding — logo + favicon (site static media) plus
@@ -389,7 +389,7 @@ export const parallelPagesRenderResponseSchema = z.object({
389
389
  * return <RenderTemplate bundle={bundle} />;
390
390
  * }
391
391
  */
392
- export class BiabDevParallelPagesClient {
392
+ export class BdParallelPagesClient {
393
393
  client;
394
394
  siteId;
395
395
  constructor(client, siteId) {
@@ -477,7 +477,7 @@ export function clearMarketingCache(siteId) {
477
477
  * checksum = `noop: true`).
478
478
  * - `getLocales()` — enabled locales + brand-token map.
479
479
  */
480
- export class BiabDevMarketingClient {
480
+ export class BdMarketingClient {
481
481
  client;
482
482
  siteId;
483
483
  constructor(client, siteId) {
@@ -544,15 +544,15 @@ export class BiabDevMarketingClient {
544
544
  });
545
545
  }
546
546
  /**
547
- * Bulk-upsert section values. Used by `biab-dev sync-content` to push
548
- * local JSON content to BIAB. Server caps each request at 256 items;
547
+ * Bulk-upsert section values. Used by `bd sync-content` to push
548
+ * local JSON content to BD. Server caps each request at 256 items;
549
549
  * larger imports are batched by the CLI. Per-item failures are
550
550
  * reported in the response (`results[].ok === false`) without aborting
551
551
  * the rest of the batch.
552
552
  *
553
553
  * The CLI's `--lax` flag sets `validate: false` for first-time imports
554
554
  * of legacy content that doesn't yet match the published schema —
555
- * useful so writers can pull existing content into BIAB and fix
555
+ * useful so writers can pull existing content into BD and fix
556
556
  * validation errors in the dashboard incrementally.
557
557
  */
558
558
  async publishSections(input) {
@@ -580,7 +580,7 @@ export class BiabDevMarketingClient {
580
580
  }
581
581
  /**
582
582
  * Process-wide cache for marketing-page payloads, keyed by `(siteId, pageKey)`.
583
- * Shared across `BiabDevMarketingPagesClient` instances so that
583
+ * Shared across `BdMarketingPagesClient` instances so that
584
584
  * `prefetch(pageKey)` warms the same store `get(pageKey)` reads on demand.
585
585
  *
586
586
  * Lives on a module-level `Map` rather than instance state because consumers
@@ -620,7 +620,7 @@ export function clearMarketingPageCache(siteId, pageKey) {
620
620
  * `list()` (no payloads) with `get(pageKey)` / `prefetch(pageKey)` to load
621
621
  * pages on demand instead of paying the full-content cost up front.
622
622
  */
623
- export class BiabDevMarketingPagesClient {
623
+ export class BdMarketingPagesClient {
624
624
  client;
625
625
  siteId;
626
626
  constructor(client, siteId) {
@@ -681,7 +681,7 @@ export class BiabDevMarketingPagesClient {
681
681
  return this.get(pageKey);
682
682
  }
683
683
  }
684
- export class BiabDevCollectionsClient {
684
+ export class BdCollectionsClient {
685
685
  client;
686
686
  siteId;
687
687
  constructor(client, siteId) {
@@ -710,7 +710,7 @@ export class BiabDevCollectionsClient {
710
710
  });
711
711
  }
712
712
  }
713
- export class BiabDevRowsClient {
713
+ export class BdRowsClient {
714
714
  client;
715
715
  siteId;
716
716
  constructor(client, siteId) {
@@ -746,11 +746,11 @@ export class BiabDevRowsClient {
746
746
  }
747
747
  /**
748
748
  * Read rows out of the org's CUSTOM DATABASE — the tables you declare with
749
- * `defineDataModel()` and push with `biab-dev sync-data-model`.
749
+ * `defineDataModel()` and push with `bd sync-data-model`.
750
750
  *
751
751
  * ⚠️ Not the same thing as `.collections` / `.rows`. Those read Site Data (the
752
752
  * site builder's tables, `site_data_rows`). Rows seeded with
753
- * `biab-dev sync-records` live in `org_object_records` and are reachable only
753
+ * `bd sync-records` live in `org_object_records` and are reachable only
754
754
  * through here — no `collections:*` call will ever return one.
755
755
  *
756
756
  * Requires the `metadata:read_records` scope. What a key can actually read is
@@ -766,7 +766,7 @@ export class BiabDevRowsClient {
766
766
  * private one never is. Open a table by declaring `visibility` in your model.
767
767
  *
768
768
  * ```ts
769
- * const result = await biab.site(siteId).dataModel.listRecords({
769
+ * const result = await bd.site(siteId).dataModel.listRecords({
770
770
  * object: TECH_OBJECT_ID, // the universalIdentifier from your config
771
771
  * });
772
772
  * if (!result.available) return <UpgradeCard feature={result.requiredFeature} />;
@@ -776,7 +776,7 @@ export class BiabDevRowsClient {
776
776
  * }
777
777
  * ```
778
778
  */
779
- export class BiabDevDataModelClient {
779
+ export class BdDataModelClient {
780
780
  client;
781
781
  siteId;
782
782
  constructor(client, siteId) {
@@ -828,20 +828,20 @@ export class BiabDevDataModelClient {
828
828
  /**
829
829
  * Read your site's visitor counts back.
830
830
  *
831
- * The `<BIABAnalytics/>` tracker (`@businessdash/sdk/react-analytics`) RECORDS
831
+ * The `<BDAnalytics/>` tracker (`@businessdash/sdk/react-analytics`) RECORDS
832
832
  * pageviews; this READS the totals, so you can put a number on the page instead
833
833
  * of only feeding the dashboard.
834
834
  *
835
835
  * ```ts
836
836
  * // Site-wide, all time
837
- * const all = await biab.site(siteId).analytics.pageViews();
837
+ * const all = await bd.site(siteId).analytics.pageViews();
838
838
  * if (all.available) console.log(`${all.total.views} views`);
839
839
  *
840
840
  * // One page, last 30 days
841
- * const home = await biab.site(siteId).analytics.pageViews({ paths: ['/'], days: 30 });
841
+ * const home = await bd.site(siteId).analytics.pageViews({ paths: ['/'], days: 30 });
842
842
  *
843
843
  * // A batch of pages in one round-trip
844
- * const list = await biab.site(siteId).analytics.pageViews({
844
+ * const list = await bd.site(siteId).analytics.pageViews({
845
845
  * paths: ['/tech/typescript', '/tech/rust'],
846
846
  * });
847
847
  * // list.paths → [{ path, views, visitors }, …], every requested path present
@@ -851,7 +851,7 @@ export class BiabDevDataModelClient {
851
851
  * Requires the `analytics.web` entitlement — an org without it gets
852
852
  * `{ available: false }`, so branch on `.available`.
853
853
  */
854
- export class BiabDevAnalyticsClient {
854
+ export class BdAnalyticsClient {
855
855
  client;
856
856
  siteId;
857
857
  constructor(client, siteId) {
@@ -886,7 +886,7 @@ export class BiabDevAnalyticsClient {
886
886
  * to a 30-day window.
887
887
  *
888
888
  * ```ts
889
- * const ai = await biab.site(siteId).analytics.aiVisibility({ days: 30 });
889
+ * const ai = await bd.site(siteId).analytics.aiVisibility({ days: 30 });
890
890
  * if (ai.available) {
891
891
  * for (const c of ai.crawlers)
892
892
  * console.log(`${c.name}: ${c.fetches} fetches over ${c.distinctPages} pages`);
@@ -913,7 +913,7 @@ export class BiabDevAnalyticsClient {
913
913
  * verifies the badge by fetching your live domain, not by trusting this call. So
914
914
  * don't build logic on the heartbeat; do honor `policy().required`.
915
915
  */
916
- export class BiabDevAttributionClient {
916
+ export class BdAttributionClient {
917
917
  client;
918
918
  siteId;
919
919
  constructor(client, siteId) {
@@ -946,7 +946,7 @@ export class BiabDevAttributionClient {
946
946
  });
947
947
  }
948
948
  }
949
- export class BiabDevAssetsClient {
949
+ export class BdAssetsClient {
950
950
  client;
951
951
  siteId;
952
952
  constructor(client, siteId) {
@@ -963,7 +963,7 @@ export class BiabDevAssetsClient {
963
963
  });
964
964
  }
965
965
  }
966
- export class BiabDevActionsClient {
966
+ export class BdActionsClient {
967
967
  client;
968
968
  siteId;
969
969
  constructor(client, siteId) {
@@ -980,7 +980,7 @@ export class BiabDevActionsClient {
980
980
  });
981
981
  }
982
982
  }
983
- export class BiabDevEmailTemplatesClient {
983
+ export class BdEmailTemplatesClient {
984
984
  client;
985
985
  constructor(client) {
986
986
  this.client = client;
@@ -1018,7 +1018,7 @@ export class BiabDevEmailTemplatesClient {
1018
1018
  });
1019
1019
  }
1020
1020
  }
1021
- export class BiabDevFollowersClient {
1021
+ export class BdFollowersClient {
1022
1022
  client;
1023
1023
  siteId;
1024
1024
  constructor(client, siteId) {
@@ -1073,7 +1073,7 @@ export class BiabDevFollowersClient {
1073
1073
  return followerLeaveResponseSchema.parse(response.result);
1074
1074
  }
1075
1075
  }
1076
- export class BiabDevDashboardClient {
1076
+ export class BdDashboardClient {
1077
1077
  client;
1078
1078
  constructor(client) {
1079
1079
  this.client = client;
@@ -1086,7 +1086,7 @@ export class BiabDevDashboardClient {
1086
1086
  });
1087
1087
  }
1088
1088
  }
1089
- export class BiabDevStorefrontClient {
1089
+ export class BdStorefrontClient {
1090
1090
  client;
1091
1091
  constructor(client) {
1092
1092
  this.client = client;
@@ -1094,7 +1094,7 @@ export class BiabDevStorefrontClient {
1094
1094
  /**
1095
1095
  * Legacy embed-session mint (kept for iframe-widget consumers).
1096
1096
  * The programmatic methods below let consumer sites render their
1097
- * own native product catalog using BIAB as the data layer.
1097
+ * own native product catalog using BD as the data layer.
1098
1098
  */
1099
1099
  async createSession(input) {
1100
1100
  const body = storefrontSessionInputSchema.parse(input ?? undefined);
@@ -1125,7 +1125,7 @@ export class BiabDevStorefrontClient {
1125
1125
  * ```ts
1126
1126
  * let remaining = 1;
1127
1127
  * while (remaining > 0) {
1128
- * const res = await biab.storefront.syncToStripe();
1128
+ * const res = await bd.storefront.syncToStripe();
1129
1129
  * remaining = res.remaining;
1130
1130
  * }
1131
1131
  * ```
@@ -1201,7 +1201,7 @@ export class BiabDevStorefrontClient {
1201
1201
  }
1202
1202
  /**
1203
1203
  * Full product detail with variants + per-image rows. Returns 404
1204
- * via `BiabApiError` if the product isn't live or doesn't belong
1204
+ * via `BdApiError` if the product isn't live or doesn't belong
1205
1205
  * to the org bound to the API key.
1206
1206
  */
1207
1207
  /**
@@ -1216,7 +1216,7 @@ export class BiabDevStorefrontClient {
1216
1216
  * The platform withholds the raw URL from every product payload on purpose:
1217
1217
  * CAD files are the largest thing it serves and are the org's intellectual
1218
1218
  * property, so a catalog of naked URLs is a design library published to
1219
- * anyone willing to write a loop. This endpoint requires a `biab_cad` cookie
1219
+ * anyone willing to write a loop. This endpoint requires a `bd_cad` cookie
1220
1220
  * on the incoming request, rate-limits per IP, and re-checks the
1221
1221
  * `ecommerce.product_3d` entitlement before answering.
1222
1222
  *
@@ -1275,7 +1275,7 @@ export class BiabDevStorefrontClient {
1275
1275
  });
1276
1276
  }
1277
1277
  }
1278
- export class BiabDevCartClient {
1278
+ export class BdCartClient {
1279
1279
  client;
1280
1280
  visitorToken;
1281
1281
  sessionToken;
@@ -1290,7 +1290,7 @@ export class BiabDevCartClient {
1290
1290
  * sign-in required.
1291
1291
  */
1292
1292
  forVisitor(visitorToken) {
1293
- return new BiabDevCartClient(this.client, visitorToken, null);
1293
+ return new BdCartClient(this.client, visitorToken, null);
1294
1294
  }
1295
1295
  /**
1296
1296
  * Use a tenantAuth session token instead of a visitor token.
@@ -1298,14 +1298,14 @@ export class BiabDevCartClient {
1298
1298
  * across devices.
1299
1299
  */
1300
1300
  withSession(sessionToken) {
1301
- return new BiabDevCartClient(this.client, null, sessionToken);
1301
+ return new BdCartClient(this.client, null, sessionToken);
1302
1302
  }
1303
1303
  headers() {
1304
1304
  const out = {};
1305
1305
  if (this.visitorToken)
1306
- out["X-BIAB-Cart-Visitor"] = this.visitorToken;
1306
+ out["X-BD-Cart-Visitor"] = this.visitorToken;
1307
1307
  if (this.sessionToken)
1308
- out["X-BIAB-Session-Token"] = this.sessionToken;
1308
+ out["X-BD-Session-Token"] = this.sessionToken;
1309
1309
  return out;
1310
1310
  }
1311
1311
  /**
@@ -1404,7 +1404,7 @@ export class BiabDevCartClient {
1404
1404
  });
1405
1405
  }
1406
1406
  }
1407
- export class BiabDevCheckoutClient {
1407
+ export class BdCheckoutClient {
1408
1408
  client;
1409
1409
  visitorToken;
1410
1410
  sessionToken;
@@ -1418,7 +1418,7 @@ export class BiabDevCheckoutClient {
1418
1418
  * (visitor-token cart). Same UUID you used with `client.cart.forVisitor(...)`.
1419
1419
  */
1420
1420
  forVisitor(visitorToken) {
1421
- return new BiabDevCheckoutClient(this.client, visitorToken, null);
1421
+ return new BdCheckoutClient(this.client, visitorToken, null);
1422
1422
  }
1423
1423
  /**
1424
1424
  * Authenticate as a signed-in customer (tenantAuth session token).
@@ -1426,14 +1426,14 @@ export class BiabDevCheckoutClient {
1426
1426
  * customer's saved cart.
1427
1427
  */
1428
1428
  withSession(sessionToken) {
1429
- return new BiabDevCheckoutClient(this.client, null, sessionToken);
1429
+ return new BdCheckoutClient(this.client, null, sessionToken);
1430
1430
  }
1431
1431
  headers() {
1432
1432
  const out = {};
1433
1433
  if (this.visitorToken)
1434
- out["X-BIAB-Cart-Visitor"] = this.visitorToken;
1434
+ out["X-BD-Cart-Visitor"] = this.visitorToken;
1435
1435
  if (this.sessionToken)
1436
- out["X-BIAB-Session-Token"] = this.sessionToken;
1436
+ out["X-BD-Session-Token"] = this.sessionToken;
1437
1437
  return out;
1438
1438
  }
1439
1439
  /**
@@ -1451,7 +1451,7 @@ export class BiabDevCheckoutClient {
1451
1451
  });
1452
1452
  }
1453
1453
  /**
1454
- * Convert the caller's saved BIAB cart (resolved via visitor token
1454
+ * Convert the caller's saved BD cart (resolved via visitor token
1455
1455
  * or session token) into a Stripe Checkout Session. Returns the
1456
1456
  * Stripe-hosted URL; redirect the browser there to collect payment.
1457
1457
  *
@@ -1483,7 +1483,7 @@ export class BiabDevCheckoutClient {
1483
1483
  }
1484
1484
  }
1485
1485
  /**
1486
- * White-glove Google Places proxy. BIAB owns the API key — consumer
1486
+ * White-glove Google Places proxy. BD owns the API key — consumer
1487
1487
  * code never sees it. Use at the checkout delivery-address input
1488
1488
  * to give shoppers text-search predictions + verify deliverability
1489
1489
  * before submitting the order.
@@ -1508,7 +1508,7 @@ export class BiabDevCheckoutClient {
1508
1508
  * // When user picks a prediction:
1509
1509
  * const detail = await client.address.getDetails(prediction.place_id);
1510
1510
  * if (detail.enabled && detail.address) {
1511
- * const form = BiabDevAddressClient.googleToFormValues(detail.address);
1511
+ * const form = BdAddressClient.googleToFormValues(detail.address);
1512
1512
  * reactHookForm.reset(form);
1513
1513
  * }
1514
1514
  *
@@ -1517,7 +1517,7 @@ export class BiabDevCheckoutClient {
1517
1517
  * if (!v.isVerified) showDidYouMean(v.googleAddress);
1518
1518
  * ```
1519
1519
  */
1520
- export class BiabDevAddressClient {
1520
+ export class BdAddressClient {
1521
1521
  client;
1522
1522
  constructor(client) {
1523
1523
  this.client = client;
@@ -1579,7 +1579,7 @@ export class BiabDevAddressClient {
1579
1579
  * dashboard's "Sync to Stripe" action — otherwise `startCheckout`
1580
1580
  * returns 409 `subscription_not_synced`.
1581
1581
  */
1582
- export class BiabDevSubscriptionsClient {
1582
+ export class BdSubscriptionsClient {
1583
1583
  client;
1584
1584
  constructor(client) {
1585
1585
  this.client = client;
@@ -1606,7 +1606,7 @@ export class BiabDevSubscriptionsClient {
1606
1606
  });
1607
1607
  }
1608
1608
  }
1609
- export class BiabDevCouponsClient {
1609
+ export class BdCouponsClient {
1610
1610
  client;
1611
1611
  constructor(client) {
1612
1612
  this.client = client;
@@ -1642,7 +1642,7 @@ export class BiabDevCouponsClient {
1642
1642
  * Requires a SECRET key holding `storefront:write`.
1643
1643
  *
1644
1644
  * ```ts
1645
- * const { coupon, stripeSynced } = await biab.coupons.create({
1645
+ * const { coupon, stripeSynced } = await bd.coupons.create({
1646
1646
  * code: 'WELCOME10',
1647
1647
  * discountType: 'percent',
1648
1648
  * value: 10,
@@ -1681,10 +1681,10 @@ export class BiabDevCouponsClient {
1681
1681
  }
1682
1682
  /**
1683
1683
  * Shipping: rate lookups + on-demand tracking. White-glove model —
1684
- * BIAB owns the carrier integration; consumer code never sees the
1684
+ * BD owns the carrier integration; consumer code never sees the
1685
1685
  * underlying provider name. Gated on `ecommerce.shipping` so calls
1686
1686
  * from orgs on the Launch plan return the standard plan-gate body
1687
- * via {@link BiabApiError} (status 403).
1687
+ * via {@link BdApiError} (status 403).
1688
1688
  *
1689
1689
  * @example
1690
1690
  * ```ts
@@ -1701,7 +1701,7 @@ export class BiabDevCouponsClient {
1701
1701
  * }
1702
1702
  * ```
1703
1703
  */
1704
- export class BiabDevShippingClient {
1704
+ export class BdShippingClient {
1705
1705
  client;
1706
1706
  visitorToken;
1707
1707
  sessionToken;
@@ -1711,17 +1711,17 @@ export class BiabDevShippingClient {
1711
1711
  this.sessionToken = sessionToken;
1712
1712
  }
1713
1713
  forVisitor(visitorToken) {
1714
- return new BiabDevShippingClient(this.client, visitorToken, null);
1714
+ return new BdShippingClient(this.client, visitorToken, null);
1715
1715
  }
1716
1716
  withSession(sessionToken) {
1717
- return new BiabDevShippingClient(this.client, null, sessionToken);
1717
+ return new BdShippingClient(this.client, null, sessionToken);
1718
1718
  }
1719
1719
  headers() {
1720
1720
  const out = {};
1721
1721
  if (this.visitorToken)
1722
- out["X-BIAB-Cart-Visitor"] = this.visitorToken;
1722
+ out["X-BD-Cart-Visitor"] = this.visitorToken;
1723
1723
  if (this.sessionToken)
1724
- out["X-BIAB-Session-Token"] = this.sessionToken;
1724
+ out["X-BD-Session-Token"] = this.sessionToken;
1725
1725
  return out;
1726
1726
  }
1727
1727
  /**
@@ -1786,11 +1786,11 @@ export class BiabDevShippingClient {
1786
1786
  * - `order.return_label_created`
1787
1787
  *
1788
1788
  * The webhook payload is JSON + signed with the customer's saved
1789
- * `webhookSigningSecret` via `X-BIAB-Signature: <hex hmac-sha256>`.
1789
+ * `webhookSigningSecret` via `X-BD-Signature: <hex hmac-sha256>`.
1790
1790
  * Consumer's receiver verifies via:
1791
1791
  * crypto.createHmac('sha256', secret).update(rawBody).digest('hex')
1792
1792
  */
1793
- export class BiabDevNotificationsClient {
1793
+ export class BdNotificationsClient {
1794
1794
  client;
1795
1795
  sessionToken;
1796
1796
  constructor(client, sessionToken = null) {
@@ -1798,12 +1798,10 @@ export class BiabDevNotificationsClient {
1798
1798
  this.sessionToken = sessionToken;
1799
1799
  }
1800
1800
  withSession(sessionToken) {
1801
- return new BiabDevNotificationsClient(this.client, sessionToken);
1801
+ return new BdNotificationsClient(this.client, sessionToken);
1802
1802
  }
1803
1803
  headers() {
1804
- return this.sessionToken
1805
- ? { "X-BIAB-Session-Token": this.sessionToken }
1806
- : {};
1804
+ return this.sessionToken ? { "X-BD-Session-Token": this.sessionToken } : {};
1807
1805
  }
1808
1806
  async getPreferences() {
1809
1807
  return this.client.request({
@@ -1856,7 +1854,7 @@ export class BiabDevNotificationsClient {
1856
1854
  });
1857
1855
  }
1858
1856
  }
1859
- export class BiabDevBlogClient {
1857
+ export class BdBlogClient {
1860
1858
  client;
1861
1859
  sessionToken;
1862
1860
  constructor(client, sessionToken = null) {
@@ -1875,12 +1873,10 @@ export class BiabDevBlogClient {
1875
1873
  * ```
1876
1874
  */
1877
1875
  withSession(sessionToken) {
1878
- return new BiabDevBlogClient(this.client, sessionToken);
1876
+ return new BdBlogClient(this.client, sessionToken);
1879
1877
  }
1880
1878
  headers() {
1881
- return this.sessionToken
1882
- ? { "X-BIAB-Session-Token": this.sessionToken }
1883
- : {};
1879
+ return this.sessionToken ? { "X-BD-Session-Token": this.sessionToken } : {};
1884
1880
  }
1885
1881
  /**
1886
1882
  * Legacy embed-session mint (kept for backwards compat with
@@ -2010,7 +2006,7 @@ export class BiabDevBlogClient {
2010
2006
  * }
2011
2007
  * ```
2012
2008
  */
2013
- export class BiabDevReviewsClient {
2009
+ export class BdReviewsClient {
2014
2010
  client;
2015
2011
  constructor(client) {
2016
2012
  this.client = client;
@@ -2053,7 +2049,7 @@ export class BiabDevReviewsClient {
2053
2049
  * }
2054
2050
  * ```
2055
2051
  */
2056
- export class BiabDevHiringClient {
2052
+ export class BdHiringClient {
2057
2053
  client;
2058
2054
  constructor(client) {
2059
2055
  this.client = client;
@@ -2117,7 +2113,7 @@ export class BiabDevHiringClient {
2117
2113
  * const privacy = await client.legal.get("privacy");
2118
2114
  * ```
2119
2115
  */
2120
- export class BiabDevLegalClient {
2116
+ export class BdLegalClient {
2121
2117
  client;
2122
2118
  constructor(client) {
2123
2119
  this.client = client;
@@ -2166,11 +2162,11 @@ const consentStateSchema = z.object({
2166
2162
  * that could read or write another org's consent — consent is given to a
2167
2163
  * controller, and one controller's record is not another's to act on.
2168
2164
  *
2169
- * The visitor is identified by an `x-biab-visitor` header carrying an opaque id
2165
+ * The visitor is identified by an `x-bd-visitor` header carrying an opaque id
2170
2166
  * from the caller's own first-party cookie. `@businessdash/sdk/consent` manages
2171
2167
  * that for you; these methods are the transport underneath it.
2172
2168
  */
2173
- export class BiabDevConsentClient {
2169
+ export class BdConsentClient {
2174
2170
  client;
2175
2171
  constructor(client) {
2176
2172
  this.client = client;
@@ -2180,7 +2176,7 @@ export class BiabDevConsentClient {
2180
2176
  return this.client.request({
2181
2177
  path: "consent",
2182
2178
  responseSchema: consentStateSchema,
2183
- ...(visitorKey ? { headers: { "x-biab-visitor": visitorKey } } : {}),
2179
+ ...(visitorKey ? { headers: { "x-bd-visitor": visitorKey } } : {}),
2184
2180
  });
2185
2181
  }
2186
2182
  /**
@@ -2198,12 +2194,12 @@ export class BiabDevConsentClient {
2198
2194
  noticeVersion: input.noticeVersion,
2199
2195
  source: input.source ?? "banner",
2200
2196
  },
2201
- headers: { "x-biab-visitor": input.visitorKey },
2197
+ headers: { "x-bd-visitor": input.visitorKey },
2202
2198
  responseSchema: z.object({ ok: z.boolean() }),
2203
2199
  });
2204
2200
  }
2205
2201
  }
2206
- export class BiabDevChatbotClient {
2202
+ export class BdChatbotClient {
2207
2203
  client;
2208
2204
  constructor(client) {
2209
2205
  this.client = client;
@@ -2443,7 +2439,7 @@ export class BiabDevChatbotClient {
2443
2439
  *
2444
2440
  * @remarks
2445
2441
  * **Privacy:** When `organizationId` is set, every request is pinned to that
2446
- * org via the `X-BIAB-Customer-Portal-Org` header. The server-side
2442
+ * org via the `X-BD-Customer-Portal-Org` header. The server-side
2447
2443
  * `customerPortalProcedure` will reject any access to a different org, so a
2448
2444
  * customer browsing a Dominoes-branded site can never accidentally see Pizza
2449
2445
  * Hut data even if their account is linked to both. This is the recommended
@@ -2461,14 +2457,14 @@ function decodeBase64ToBytes(base64) {
2461
2457
  }
2462
2458
  return bytes;
2463
2459
  }
2464
- export class BiabDevCustomerPortalClient {
2460
+ export class BdCustomerPortalClient {
2465
2461
  client;
2466
2462
  organizationId;
2467
2463
  sessionToken;
2468
2464
  constructor(client, organizationId,
2469
2465
  /**
2470
2466
  * Optional tenantAuth session token. When set, requests include
2471
- * an `X-BIAB-Session-Token` header and the BIAB customer-portal
2467
+ * an `X-BD-Session-Token` header and the BD customer-portal
2472
2468
  * routes resolve the calling user via the session payload
2473
2469
  * instead of the API key's user binding.
2474
2470
  *
@@ -2500,15 +2496,15 @@ export class BiabDevCustomerPortalClient {
2500
2496
  * ```
2501
2497
  */
2502
2498
  withSession(sessionToken) {
2503
- return new BiabDevCustomerPortalClient(this.client, this.organizationId, sessionToken);
2499
+ return new BdCustomerPortalClient(this.client, this.organizationId, sessionToken);
2504
2500
  }
2505
2501
  headers() {
2506
2502
  const out = {};
2507
2503
  if (this.organizationId) {
2508
- out["X-BIAB-Customer-Portal-Org"] = this.organizationId;
2504
+ out["X-BD-Customer-Portal-Org"] = this.organizationId;
2509
2505
  }
2510
2506
  if (this.sessionToken) {
2511
- out["X-BIAB-Session-Token"] = this.sessionToken;
2507
+ out["X-BD-Session-Token"] = this.sessionToken;
2512
2508
  }
2513
2509
  return out;
2514
2510
  }
@@ -2638,6 +2634,29 @@ export class BiabDevCustomerPortalClient {
2638
2634
  headers: this.headers(),
2639
2635
  });
2640
2636
  }
2637
+ /**
2638
+ * Designed proposals the customer has been sent.
2639
+ *
2640
+ * Separate from `listQuotes` because a proposal is the document built
2641
+ * around a quote, not the quote: `kind` decides whether a consumer offers
2642
+ * a download or frames a page, and a UI that guessed would get one of the
2643
+ * two wrong every time.
2644
+ */
2645
+ async listProposals() {
2646
+ return this.client.request({
2647
+ path: "customer-portal/proposals",
2648
+ responseSchema: customerProposalListResponseSchema,
2649
+ headers: this.headers(),
2650
+ });
2651
+ }
2652
+ /** One proposal the customer owns. */
2653
+ async getProposal(proposalId) {
2654
+ return this.client.request({
2655
+ path: `customer-portal/proposals/${encodeURIComponent(proposalId)}`,
2656
+ responseSchema: customerProposalSchema,
2657
+ headers: this.headers(),
2658
+ });
2659
+ }
2641
2660
  /** Read a single quote the signed-in customer owns. */
2642
2661
  async getQuote(quoteId) {
2643
2662
  return this.client.request({
@@ -2745,7 +2764,7 @@ export class BiabDevCustomerPortalClient {
2745
2764
  /**
2746
2765
  * Begin signing a contract the customer owns. Returns a ready, absolute
2747
2766
  * signing URL on the org's branded hostname — redirect the customer there
2748
- * to BIAB's hosted e-sign page, which captures the signature and generates
2767
+ * to BD's hosted e-sign page, which captures the signature and generates
2749
2768
  * the executed PDF. No signature payload is collected client-side, so the
2750
2769
  * legal record stays consistent across consumers.
2751
2770
  *
@@ -3269,7 +3288,7 @@ export class BiabDevCustomerPortalClient {
3269
3288
  /**
3270
3289
  * List the digital downloads the customer is entitled to for a paid order
3271
3290
  * (P10d). Each item is a ready-to-use URL — a short-lived presigned link for
3272
- * BIAB-hosted files (`expiresInSeconds` set) or the org's external link.
3291
+ * BD-hosted files (`expiresInSeconds` set) or the org's external link.
3273
3292
  * Returns an empty list until the order's payment settles.
3274
3293
  *
3275
3294
  * @example
@@ -3415,21 +3434,21 @@ export class BiabDevCustomerPortalClient {
3415
3434
  }
3416
3435
  }
3417
3436
  /**
3418
- * Creates a {@link BiabDevClient} for the given host `baseUrl` and package API key.
3437
+ * Creates a {@link BdApiClient} for the given host `baseUrl` and package API key.
3419
3438
  *
3420
3439
  * @remarks
3421
3440
  * **Alpha:** This package is still in alpha release. APIs may change; it is **not** intended
3422
3441
  * for production use yet. Prefer non-production environments until a stable major is published.
3423
3442
  */
3424
- export function createBiabDevClient(options) {
3425
- return new BiabDevClient(options);
3443
+ export function createBdApiClient(options) {
3444
+ return new BdApiClient(options);
3426
3445
  }
3427
3446
  /**
3428
3447
  * Per-tenant auth: hosted sign-in/sign-up scoped to the org bound to
3429
3448
  * the API key. Used by the SDK's `createAuthHandler` (server) and
3430
3449
  * `<SignIn />` / `<SignUp />` / `<SignOut />` components (client).
3431
3450
  */
3432
- export class BiabDevAuthClient {
3451
+ export class BdAuthClient {
3433
3452
  client;
3434
3453
  constructor(client) {
3435
3454
  this.client = client;
@@ -3479,7 +3498,7 @@ export class BiabDevAuthClient {
3479
3498
  return this.client.request({
3480
3499
  method: "GET",
3481
3500
  path: "auth/me",
3482
- headers: { "x-biab-session": input.sessionToken },
3501
+ headers: { "x-bd-session": input.sessionToken },
3483
3502
  responseSchema: tenantAuthMeResponseSchema,
3484
3503
  });
3485
3504
  }
@@ -3539,7 +3558,7 @@ export class BiabDevAuthClient {
3539
3558
  *
3540
3559
  * For an org running its own admin tooling rather than the dashboard.
3541
3560
  */
3542
- export class BiabDevCustomerInvitesClient {
3561
+ export class BdCustomerInvitesClient {
3543
3562
  client;
3544
3563
  constructor(client) {
3545
3564
  this.client = client;
@@ -3575,7 +3594,7 @@ export class BiabDevCustomerInvitesClient {
3575
3594
  });
3576
3595
  }
3577
3596
  }
3578
- export class BiabDevSchedulingClient {
3597
+ export class BdSchedulingClient {
3579
3598
  client;
3580
3599
  siteId;
3581
3600
  constructor(client, siteId) {