@c1m-public/channel-client 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-6VQ4ZTZI.js → chunk-BANE7WSW.js} +1 -1
- package/dist/{chunk-3K45GH6B.js → chunk-O4N7PQJF.js} +1 -1
- package/dist/{chunk-LG43JMFW.js → chunk-UX7PRF5Z.js} +1 -3
- package/dist/dash-next.js +3 -3
- package/dist/dash.js +2 -2
- package/dist/index.d.ts +11 -3
- package/dist/index.js +1 -1
- package/dist/next.d.ts +4 -7
- package/dist/next.js +2 -2
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isChannelAPIError, createChannelClient } from './chunk-
|
|
1
|
+
import { isChannelAPIError, createChannelClient } from './chunk-UX7PRF5Z.js';
|
|
2
2
|
import { parseChannelWebhookEvent, isChannelWebhookVerificationError, isChannelWebhookEventType, ChannelConfigurationError } from './chunk-P3HX34X7.js';
|
|
3
3
|
import 'server-only';
|
|
4
4
|
|
|
@@ -366,9 +366,7 @@ function createChannelClient(options) {
|
|
|
366
366
|
},
|
|
367
367
|
// Checkout is addressed by the ORDER the cart became: the server mounts
|
|
368
368
|
// /checkout/{order_id}/... (the cart is an orders row, and every cart call
|
|
369
|
-
// returns its order.id).
|
|
370
|
-
// so every checkout call 404'd — the signature change is safe because the
|
|
371
|
-
// old shape never worked.
|
|
369
|
+
// returns its order.id).
|
|
372
370
|
checkout: {
|
|
373
371
|
options: (orderId, cartToken) => request("channel.checkout.options", appendQuery(`/checkout/${encodePath(orderId)}/options`, {
|
|
374
372
|
cart_token: required(cartToken, "cartToken")
|
package/dist/dash-next.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createNextChannelClient } from './chunk-
|
|
2
|
-
import { narrow } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { createNextChannelClient } from './chunk-BANE7WSW.js';
|
|
2
|
+
import { narrow } from './chunk-O4N7PQJF.js';
|
|
3
|
+
import './chunk-UX7PRF5Z.js';
|
|
4
4
|
import './chunk-P3HX34X7.js';
|
|
5
5
|
import 'server-only';
|
|
6
6
|
|
package/dist/dash.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createDashChannelClient, narrow as narrowToDash } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { createDashChannelClient, narrow as narrowToDash } from './chunk-O4N7PQJF.js';
|
|
2
|
+
import './chunk-UX7PRF5Z.js';
|
|
3
3
|
import './chunk-P3HX34X7.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -12,12 +12,18 @@ interface WorkspaceInfo {
|
|
|
12
12
|
is_active: boolean;
|
|
13
13
|
status?: string;
|
|
14
14
|
}
|
|
15
|
+
/** Public availability only; never participant data or an access grant. */
|
|
16
|
+
interface WaitlistPublicStatus {
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
accepting_entries: boolean;
|
|
19
|
+
display: "page" | "block";
|
|
20
|
+
}
|
|
15
21
|
interface PublicWorkspaceInit {
|
|
16
22
|
workspace: WorkspaceInfo;
|
|
17
23
|
branding?: Record<string, unknown>;
|
|
18
24
|
preferences?: Record<string, unknown>;
|
|
19
25
|
profile?: Record<string, unknown>;
|
|
20
|
-
|
|
26
|
+
waitlist?: WaitlistPublicStatus;
|
|
21
27
|
features?: Array<{
|
|
22
28
|
key: string;
|
|
23
29
|
name: string;
|
|
@@ -50,6 +56,7 @@ interface SiteRef {
|
|
|
50
56
|
* (`menus.get`) and theme (`theme.get`) stay separate, parallel reads.
|
|
51
57
|
*/
|
|
52
58
|
interface LightInitResponse {
|
|
59
|
+
waitlist?: WaitlistPublicStatus;
|
|
53
60
|
workspace_id: string;
|
|
54
61
|
workspace_name: string;
|
|
55
62
|
workspace_slug?: string;
|
|
@@ -106,6 +113,7 @@ interface DashLocaleInfo {
|
|
|
106
113
|
* `dash.profile()` remains for the full profile page (gallery, about template).
|
|
107
114
|
*/
|
|
108
115
|
interface DashInitResponse {
|
|
116
|
+
waitlist?: WaitlistPublicStatus;
|
|
109
117
|
tenant: DashTenantInfo;
|
|
110
118
|
public_profile: DashPublicProfileInfo;
|
|
111
119
|
branding?: DashBrandingInfo;
|
|
@@ -1291,7 +1299,7 @@ interface StartSubscriptionInput {
|
|
|
1291
1299
|
* malformed token, invalid retry/timeout/cache options, missing fetch, missing
|
|
1292
1300
|
* webhook secret — as opposed to ChannelAPIError, which describes what the
|
|
1293
1301
|
* network or the API did. Callers can branch on this without string-matching
|
|
1294
|
-
* messages
|
|
1302
|
+
* messages.
|
|
1295
1303
|
*/
|
|
1296
1304
|
declare class ChannelConfigurationError extends Error {
|
|
1297
1305
|
constructor(message: string);
|
|
@@ -1658,4 +1666,4 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
|
|
|
1658
1666
|
};
|
|
1659
1667
|
};
|
|
1660
1668
|
|
|
1661
|
-
export { type AddCartItemInput, type BlogPost, type BlogPostResponse, type CartResponse, type CatalogBrand, type CatalogCategory, type CatalogCollection, type CatalogProduct, type CatalogProductsResponse, ChannelAPIError, type ChannelCheckoutStatusParams, ChannelConfigurationError, type ChannelGeo, type ChannelInvoiceListParams, type ChannelLeadInput, type ChannelListParams, type ChannelMutationOptions, type ChannelOperation, type ChannelPing, type ChannelProductListParams, type ChannelRequestObservation, type ChannelRequestObserver, type ChannelRequestOutcome, type ChannelRetryPolicy, type ChannelSiteResolveParams, type ChannelSubscriptionCancelParams, type ChannelSubscriptionListParams, type ChannelVisitor, type CheckoutAddress, type CheckoutAddressesInput, type CheckoutCustomerInput, type CheckoutFulfillmentInput, type CheckoutOptions, type CheckoutPayInput, type CheckoutPayResponse, type CheckoutStatus, type CheckoutStatusResponse, type CreateChannelClientOptions, type Customer, type CustomerAuthSession, type CustomerResponse, type CustomerSecurityActivity, type CustomerSecurityActivityPage, type CustomerSession, type CustomerSignupResponse, DEFAULT_CHANNEL_API_URL, type DashBrandingInfo, type DashDirectoryEntry, type DashDirectoryListParams, type DashDirectoryProfile, type DashDirectoryProfileResponse, type DashDirectoryRegion, type DashInitResponse, type DashLead, type DashLeadPortalMatch, type DashLeadPortalMovingSummary, type DashLeadPortalRequest, type DashLeadPortalRequestLinkInput, type DashLeadPortalRequestLinkResponse, type DashLeadPortalRequestStatus, type DashLeadPortalView, type DashLocaleInfo, type DashPlan, type DashPlanPricing, type DashPlanRegion, type DashPlansResponse, type DashProfileResponse, type DashPublicPage, type DashPublicProfileInfo, type DashTenantInfo, type DiningAvailability, type DiningAvailabilityRule, type DiningComboChoice, type DiningComboGroup, type DiningItemSize, type DiningMenu, type DiningMenuItem, type DiningModifier, type DiningModifierGroup, type DiningOffer, type DiningOfferBadge, type GivingEntry, type GivingIntent, type GivingIntentListResponse, type LeadResponse, type LightInitResponse, type ListResponse, type Menu, type MenuItem, type MenuResponse, type MergeCartInput, type Order, type OrderItem, type OrderSummary, type PaymentCollectionAvailability, type PaymentLinkCheckoutInput, type PaymentLinkCheckoutResponse, type PaymentLinkRedemptionStatus, type PaymentLinkRedemptionStatusResponse, type PaymentMethodConfirmInput, type PaymentMethodMutationResponse, type PaymentMethodOption, type PaymentMethodSetupInput, type PaymentMethodSetupResult, type PaymentReadiness, type PrintBranding, type PrintIntakeInput, type PrintIntakeLimits, type PrintJob, type PrintJobFile, type PrintOptionsSelection, type PrintPaperSize, type PrintPerPagePricing, type PrintPriceBreakdown, type PrintPriceLine, type PrintPricing, type PrintPricingOption, type PrintQuoteResponse, type PrintSettingsResponse, type Product, type ProductAsset, type PublicPage, type PublicPageSummary, type PublicPaymentLink, type PublicPaymentLinkResponse, type PublicSubmitReviewInput, type PublicWorkspaceInit, type Review, type ReviewSummaryResponse, type SavedAddress, type SavedAddressDefaultKind, type SavedAddressInput, type SavedAddressResponse, type SavedAddressUpdateInput, type SavedPaymentMethod, type SendCodeResponse, type ShippingMethodOption, type SiteDocument, type SiteGatedDocument, type SiteRef, type SiteResolvedDocument, type SiteSubject, type StartGivingInput, type StartGivingResponse, type StartSubscriptionInput, type SubscriptionAgreement, type SubscriptionAgreementResponse, type SubscriptionInvoice, type SubscriptionInvoiceListResponse, type SubscriptionInvoiceResponse, type SubscriptionListResponse, type SubscriptionPlanListResponse, type SubscriptionPlanOffer, type SubscriptionPlanResponse, type SubscriptionSourceDisplay, type SubscriptionSourceResponse, type ThemeResponse, type UpdateCartItemInput, type WorkspaceInfo, createChannelClient, isChannelAPIError, isChannelConfigurationError };
|
|
1669
|
+
export { type AddCartItemInput, type BlogPost, type BlogPostResponse, type CartResponse, type CatalogBrand, type CatalogCategory, type CatalogCollection, type CatalogProduct, type CatalogProductsResponse, ChannelAPIError, type ChannelCheckoutStatusParams, ChannelConfigurationError, type ChannelGeo, type ChannelInvoiceListParams, type ChannelLeadInput, type ChannelListParams, type ChannelMutationOptions, type ChannelOperation, type ChannelPing, type ChannelProductListParams, type ChannelRequestObservation, type ChannelRequestObserver, type ChannelRequestOutcome, type ChannelRetryPolicy, type ChannelSiteResolveParams, type ChannelSubscriptionCancelParams, type ChannelSubscriptionListParams, type ChannelVisitor, type CheckoutAddress, type CheckoutAddressesInput, type CheckoutCustomerInput, type CheckoutFulfillmentInput, type CheckoutOptions, type CheckoutPayInput, type CheckoutPayResponse, type CheckoutStatus, type CheckoutStatusResponse, type CreateChannelClientOptions, type Customer, type CustomerAuthSession, type CustomerResponse, type CustomerSecurityActivity, type CustomerSecurityActivityPage, type CustomerSession, type CustomerSignupResponse, DEFAULT_CHANNEL_API_URL, type DashBrandingInfo, type DashDirectoryEntry, type DashDirectoryListParams, type DashDirectoryProfile, type DashDirectoryProfileResponse, type DashDirectoryRegion, type DashInitResponse, type DashLead, type DashLeadPortalMatch, type DashLeadPortalMovingSummary, type DashLeadPortalRequest, type DashLeadPortalRequestLinkInput, type DashLeadPortalRequestLinkResponse, type DashLeadPortalRequestStatus, type DashLeadPortalView, type DashLocaleInfo, type DashPlan, type DashPlanPricing, type DashPlanRegion, type DashPlansResponse, type DashProfileResponse, type DashPublicPage, type DashPublicProfileInfo, type DashTenantInfo, type DiningAvailability, type DiningAvailabilityRule, type DiningComboChoice, type DiningComboGroup, type DiningItemSize, type DiningMenu, type DiningMenuItem, type DiningModifier, type DiningModifierGroup, type DiningOffer, type DiningOfferBadge, type GivingEntry, type GivingIntent, type GivingIntentListResponse, type LeadResponse, type LightInitResponse, type ListResponse, type Menu, type MenuItem, type MenuResponse, type MergeCartInput, type Order, type OrderItem, type OrderSummary, type PaymentCollectionAvailability, type PaymentLinkCheckoutInput, type PaymentLinkCheckoutResponse, type PaymentLinkRedemptionStatus, type PaymentLinkRedemptionStatusResponse, type PaymentMethodConfirmInput, type PaymentMethodMutationResponse, type PaymentMethodOption, type PaymentMethodSetupInput, type PaymentMethodSetupResult, type PaymentReadiness, type PrintBranding, type PrintIntakeInput, type PrintIntakeLimits, type PrintJob, type PrintJobFile, type PrintOptionsSelection, type PrintPaperSize, type PrintPerPagePricing, type PrintPriceBreakdown, type PrintPriceLine, type PrintPricing, type PrintPricingOption, type PrintQuoteResponse, type PrintSettingsResponse, type Product, type ProductAsset, type PublicPage, type PublicPageSummary, type PublicPaymentLink, type PublicPaymentLinkResponse, type PublicSubmitReviewInput, type PublicWorkspaceInit, type Review, type ReviewSummaryResponse, type SavedAddress, type SavedAddressDefaultKind, type SavedAddressInput, type SavedAddressResponse, type SavedAddressUpdateInput, type SavedPaymentMethod, type SendCodeResponse, type ShippingMethodOption, type SiteDocument, type SiteGatedDocument, type SiteRef, type SiteResolvedDocument, type SiteSubject, type StartGivingInput, type StartGivingResponse, type StartSubscriptionInput, type SubscriptionAgreement, type SubscriptionAgreementResponse, type SubscriptionInvoice, type SubscriptionInvoiceListResponse, type SubscriptionInvoiceResponse, type SubscriptionListResponse, type SubscriptionPlanListResponse, type SubscriptionPlanOffer, type SubscriptionPlanResponse, type SubscriptionSourceDisplay, type SubscriptionSourceResponse, type ThemeResponse, type UpdateCartItemInput, type WaitlistPublicStatus, type WorkspaceInfo, createChannelClient, isChannelAPIError, isChannelConfigurationError };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ChannelAPIError, DEFAULT_CHANNEL_API_URL, createChannelClient, isChannelAPIError } from './chunk-
|
|
1
|
+
export { ChannelAPIError, DEFAULT_CHANNEL_API_URL, createChannelClient, isChannelAPIError } from './chunk-UX7PRF5Z.js';
|
|
2
2
|
export { CHANNEL_WEBHOOK_EVENT_ID_HEADER, CHANNEL_WEBHOOK_EVENT_TYPES, CHANNEL_WEBHOOK_SIGNATURE_HEADER, CHANNEL_WEBHOOK_TIMESTAMP_HEADER, ChannelConfigurationError, ChannelWebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, isChannelConfigurationError, isChannelWebhookEventType, isChannelWebhookVerificationError, isKnownChannelWebhookEvent, parseChannelWebhookEvent, verifyChannelWebhookSignature } from './chunk-P3HX34X7.js';
|
package/dist/next.d.ts
CHANGED
|
@@ -4,9 +4,8 @@ import { ChannelWebhookEventDataMap, ChannelWebhookEvent } from './webhooks.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Customer-session kit for Next.js sites.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* contested-vs-expired distinction. This kit ships them once.
|
|
7
|
+
* An httpOnly cookie codec, a refresh-skew decision, and the
|
|
8
|
+
* contested-vs-expired distinction.
|
|
10
9
|
*
|
|
11
10
|
* Framework-honest: no `next` imports. The codec returns names, values and
|
|
12
11
|
* attribute objects; the app applies them with `next/headers` or `NextResponse`
|
|
@@ -129,10 +128,8 @@ type CustomerSessionKit = ReturnType<typeof createCustomerSession>;
|
|
|
129
128
|
* invalidate: { revalidatePath, revalidateTag },
|
|
130
129
|
* });
|
|
131
130
|
*
|
|
132
|
-
* The invalidator is injected rather than imported
|
|
133
|
-
*
|
|
134
|
-
* is the app's two-line import — not eighty lines of verification, dispatch,
|
|
135
|
-
* path-safety and error-mapping boilerplate.
|
|
131
|
+
* The invalidator is injected rather than imported: it keeps this module free
|
|
132
|
+
* of `next` (bundler-safe, unit-testable with a fake).
|
|
136
133
|
*/
|
|
137
134
|
/** The cache tag every anonymous site read is filed under. */
|
|
138
135
|
declare const CHANNEL_SITE_CACHE_TAG = "channel:site";
|
package/dist/next.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CHANNEL_CATALOG_CACHE_TAG, CHANNEL_SITE_CACHE_TAG, cartCookie, createCart, createChannelWebhookRoute, createCustomerSession, createNextChannelClient, defaultChannelCacheTags, safePublishedPath, sessionCookie } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { CHANNEL_CATALOG_CACHE_TAG, CHANNEL_SITE_CACHE_TAG, cartCookie, createCart, createChannelWebhookRoute, createCustomerSession, createNextChannelClient, defaultChannelCacheTags, safePublishedPath, sessionCookie } from './chunk-BANE7WSW.js';
|
|
2
|
+
import './chunk-UX7PRF5Z.js';
|
|
3
3
|
import './chunk-P3HX34X7.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c1m-public/channel-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Typed server-side client for the MML headless Channel API",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"typescript": "5.9.3",
|
|
72
72
|
"vitest": "^4.1.4",
|
|
73
73
|
"zod": "^4.3.6",
|
|
74
|
-
"@c1m-public/
|
|
75
|
-
"@c1m-public/
|
|
74
|
+
"@c1m-public/transport": "0.0.0",
|
|
75
|
+
"@c1m-public/resilience": "0.1.0"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|