@c1m-public/channel-client 0.29.0 → 0.31.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/dash-next.d.ts +1 -1
- package/dist/dash.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/next.d.ts +1 -1
- package/dist/site.d.ts +2 -8
- package/dist/site.js +1 -3
- package/dist/{types-DrmlZASd.d.ts → types-_6pxeQPE.d.ts} +1 -9
- package/package.json +1 -1
package/dist/dash-next.d.ts
CHANGED
package/dist/dash.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ChannelPing, j as ChannelGeo, P as PaymentCollectionAvailability, W as WaitlistVerification, k as WaitlistUnsubscription, D as DashProfileResponse, l as DashInitResponse, m as WaitlistGateStatus, n as WaitlistFormSettings, o as WaitlistSubmission, p as WaitlistAcknowledgement, q as DashPlansResponse, L as ListResponse, r as DashDirectoryRegion, s as DashDirectoryEntry, t as DashDirectoryProfileResponse, u as DashLead, v as DashLeadPortalRequestLinkInput, w as DashLeadPortalRequestLinkResponse, x as DashLeadPortalView, S as SiteDocument, y as PublicWorkspaceInit, z as LightInitResponse, B as PublicPageSummary, E as PublicPage, F as Product, G as ProductAsset, H as CatalogCategory, I as CatalogProductsResponse, J as CatalogCollection, K as CatalogBrand, C as CartResponse, A as AddCartItemInput, U as UpdateCartItemInput, M as MergeCartInput, a as CheckoutOptions, b as CheckoutStatusResponse, c as CheckoutCustomerInput, d as CheckoutAddressesInput, e as CheckoutFulfillmentInput, f as CheckoutPayInput, g as CheckoutPayResponse, h as CheckoutCancelInput, R as Review, N as ReviewSummaryResponse, Q as PublicSubmitReviewInput, T as ThemeResponse, V as MenuResponse, X as BlogPost, Y as BlogPostResponse, Z as GivingEntry, _ as StartGivingInput, $ as StartGivingResponse, a0 as SubscriptionPlanListResponse, a1 as SubscriptionPlanResponse, a2 as PublicPaymentLinkResponse, a3 as PaymentLinkCheckoutInput, a4 as PaymentLinkCheckoutResponse, a5 as PaymentLinkRedemptionStatusResponse, a6 as PrintSettingsResponse, a7 as PrintOptionsSelection, a8 as PrintQuoteResponse, a9 as PrintIntakeInput, aa as PrintJob, ab as DiningMenu, ac as CustomerSignupResponse, ad as SendCodeResponse, ae as CustomerSession, af as CustomerResponse, ag as CustomerAuthSession, ah as CustomerSecurityActivityPage, O as Order, ai as OrderSummary, aj as SavedAddress, ak as SavedAddressResponse, al as SavedAddressInput, am as SavedAddressUpdateInput, an as SavedPaymentMethod, ao as PaymentMethodSetupInput, ap as PaymentMethodSetupResult, aq as PaymentMethodConfirmInput, ar as PaymentMethodMutationResponse, as as StartSubscriptionInput, at as SubscriptionAgreementResponse, au as SubscriptionListResponse, av as SubscriptionSourceResponse, aw as SubscriptionInvoiceListResponse, ax as SubscriptionInvoiceResponse, ay as GivingIntentListResponse, az as LeadResponse } from './types-
|
|
2
|
-
export { aA as CatalogProduct, aB as CheckoutAddress, aC as CheckoutStatus, aD as Customer, aE as CustomerSecurityActivity, aF as DashBrandingInfo, aG as DashDirectoryProfile, aH as DashLeadPortalMatch, aI as DashLeadPortalMovingSummary, aJ as DashLeadPortalRequest, aK as DashLeadPortalRequestStatus, aL as DashLocaleInfo, aM as DashPlan, aN as DashPlanPricing, aO as DashPlanRegion, aP as DashPublicPage, aQ as DashPublicProfileInfo, aR as DashTenantInfo, aS as DiningAvailability, aT as DiningAvailabilityRule, aU as DiningComboChoice, aV as DiningComboGroup, aW as DiningItemSize, aX as DiningMenuItem, aY as DiningModifier, aZ as DiningModifierGroup, a_ as DiningOffer, a$ as DiningOfferBadge, b0 as GivingIntent, b1 as Menu, b2 as MenuItem, b3 as OrderItem, b4 as PaymentLinkRedemptionStatus, b5 as PaymentMethodOption, b6 as PaymentReadiness, b7 as PrintBranding, b8 as PrintIntakeLimits, b9 as PrintJobFile, ba as PrintPaperSize, bb as PrintPerPagePricing, bc as PrintPriceBreakdown, bd as PrintPriceLine, be as PrintPricing, bf as PrintPricingOption, bg as PublicGate, bh as PublicPaymentLink, bi as PublicSiteSignals, bj as ShippingMethodOption, bk as SiteGatedDocument, bl as SiteRef, bm as SiteResolvedDocument, bn as SiteSubject, bo as SubscriptionAgreement, bp as SubscriptionInvoice, bq as SubscriptionPlanOffer, br as SubscriptionSourceDisplay, bs as WaitlistAttribution, bt as WorkspaceInfo } from './types-
|
|
1
|
+
import { i as ChannelPing, j as ChannelGeo, P as PaymentCollectionAvailability, W as WaitlistVerification, k as WaitlistUnsubscription, D as DashProfileResponse, l as DashInitResponse, m as WaitlistGateStatus, n as WaitlistFormSettings, o as WaitlistSubmission, p as WaitlistAcknowledgement, q as DashPlansResponse, L as ListResponse, r as DashDirectoryRegion, s as DashDirectoryEntry, t as DashDirectoryProfileResponse, u as DashLead, v as DashLeadPortalRequestLinkInput, w as DashLeadPortalRequestLinkResponse, x as DashLeadPortalView, S as SiteDocument, y as PublicWorkspaceInit, z as LightInitResponse, B as PublicPageSummary, E as PublicPage, F as Product, G as ProductAsset, H as CatalogCategory, I as CatalogProductsResponse, J as CatalogCollection, K as CatalogBrand, C as CartResponse, A as AddCartItemInput, U as UpdateCartItemInput, M as MergeCartInput, a as CheckoutOptions, b as CheckoutStatusResponse, c as CheckoutCustomerInput, d as CheckoutAddressesInput, e as CheckoutFulfillmentInput, f as CheckoutPayInput, g as CheckoutPayResponse, h as CheckoutCancelInput, R as Review, N as ReviewSummaryResponse, Q as PublicSubmitReviewInput, T as ThemeResponse, V as MenuResponse, X as BlogPost, Y as BlogPostResponse, Z as GivingEntry, _ as StartGivingInput, $ as StartGivingResponse, a0 as SubscriptionPlanListResponse, a1 as SubscriptionPlanResponse, a2 as PublicPaymentLinkResponse, a3 as PaymentLinkCheckoutInput, a4 as PaymentLinkCheckoutResponse, a5 as PaymentLinkRedemptionStatusResponse, a6 as PrintSettingsResponse, a7 as PrintOptionsSelection, a8 as PrintQuoteResponse, a9 as PrintIntakeInput, aa as PrintJob, ab as DiningMenu, ac as CustomerSignupResponse, ad as SendCodeResponse, ae as CustomerSession, af as CustomerResponse, ag as CustomerAuthSession, ah as CustomerSecurityActivityPage, O as Order, ai as OrderSummary, aj as SavedAddress, ak as SavedAddressResponse, al as SavedAddressInput, am as SavedAddressUpdateInput, an as SavedPaymentMethod, ao as PaymentMethodSetupInput, ap as PaymentMethodSetupResult, aq as PaymentMethodConfirmInput, ar as PaymentMethodMutationResponse, as as StartSubscriptionInput, at as SubscriptionAgreementResponse, au as SubscriptionListResponse, av as SubscriptionSourceResponse, aw as SubscriptionInvoiceListResponse, ax as SubscriptionInvoiceResponse, ay as GivingIntentListResponse, az as LeadResponse } from './types-_6pxeQPE.js';
|
|
2
|
+
export { aA as CatalogProduct, aB as CheckoutAddress, aC as CheckoutStatus, aD as Customer, aE as CustomerSecurityActivity, aF as DashBrandingInfo, aG as DashDirectoryProfile, aH as DashLeadPortalMatch, aI as DashLeadPortalMovingSummary, aJ as DashLeadPortalRequest, aK as DashLeadPortalRequestStatus, aL as DashLocaleInfo, aM as DashPlan, aN as DashPlanPricing, aO as DashPlanRegion, aP as DashPublicPage, aQ as DashPublicProfileInfo, aR as DashTenantInfo, aS as DiningAvailability, aT as DiningAvailabilityRule, aU as DiningComboChoice, aV as DiningComboGroup, aW as DiningItemSize, aX as DiningMenuItem, aY as DiningModifier, aZ as DiningModifierGroup, a_ as DiningOffer, a$ as DiningOfferBadge, b0 as GivingIntent, b1 as Menu, b2 as MenuItem, b3 as OrderItem, b4 as PaymentLinkRedemptionStatus, b5 as PaymentMethodOption, b6 as PaymentReadiness, b7 as PrintBranding, b8 as PrintIntakeLimits, b9 as PrintJobFile, ba as PrintPaperSize, bb as PrintPerPagePricing, bc as PrintPriceBreakdown, bd as PrintPriceLine, be as PrintPricing, bf as PrintPricingOption, bg as PublicGate, bh as PublicPaymentLink, bi as PublicSiteSignals, bj as ShippingMethodOption, bk as SiteGatedDocument, bl as SiteRef, bm as SiteResolvedDocument, bn as SiteSubject, bo as SubscriptionAgreement, bp as SubscriptionInvoice, bq as SubscriptionPlanOffer, br as SubscriptionSourceDisplay, bs as WaitlistAttribution, bt as WorkspaceInfo } from './types-_6pxeQPE.js';
|
|
3
3
|
export { AnyChannelWebhookEvent, CHANNEL_WEBHOOK_EVENT_ID_HEADER, CHANNEL_WEBHOOK_EVENT_TYPES, CHANNEL_WEBHOOK_SIGNATURE_HEADER, CHANNEL_WEBHOOK_TIMESTAMP_HEADER, ChannelWebhookEvent, ChannelWebhookEventDataMap, ChannelWebhookEventType, ChannelWebhookVerificationCode, ChannelWebhookVerificationError, DEFAULT_TOLERANCE_SECONDS, FulfillmentEventData, LeadCreatedEventData, MenuUpdatedEventData, OrderEventData, PagePublishedEventData, ParseChannelWebhookEventOptions, ParsedChannelWebhookEvent, ProductEventData, ReviewPublishedEventData, ReviewSubmittedEventData, UnknownChannelWebhookEvent, VerifyChannelWebhookSignatureOptions, isChannelWebhookEventType, isChannelWebhookVerificationError, isKnownChannelWebhookEvent, parseChannelWebhookEvent, verifyChannelWebhookSignature } from './webhooks.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/next.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createChannelClient, ChannelCheckoutStatusParams, ChannelMutationOptions, CreateChannelClientOptions, ChannelVisitor, DashDirectoryListParams, ChannelLeadInput, ChannelSiteResolveParams, ChannelListParams, ChannelProductListParams, ChannelSubscriptionListParams, ChannelSubscriptionCancelParams, ChannelInvoiceListParams } from './index.js';
|
|
2
|
-
import { O as Order, A as AddCartItemInput, C as CartResponse, a as CheckoutOptions, b as CheckoutStatusResponse, c as CheckoutCustomerInput, d as CheckoutAddressesInput, e as CheckoutFulfillmentInput, f as CheckoutPayInput, g as CheckoutPayResponse, h as CheckoutCancelInput, i as ChannelPing, j as ChannelGeo, P as PaymentCollectionAvailability, W as WaitlistVerification, k as WaitlistUnsubscription, D as DashProfileResponse, l as DashInitResponse, m as WaitlistGateStatus, n as WaitlistFormSettings, o as WaitlistSubmission, p as WaitlistAcknowledgement, q as DashPlansResponse, L as ListResponse, r as DashDirectoryRegion, s as DashDirectoryEntry, t as DashDirectoryProfileResponse, u as DashLead, v as DashLeadPortalRequestLinkInput, w as DashLeadPortalRequestLinkResponse, x as DashLeadPortalView, S as SiteDocument, y as PublicWorkspaceInit, z as LightInitResponse, B as PublicPageSummary, E as PublicPage, F as Product, G as ProductAsset, H as CatalogCategory, I as CatalogProductsResponse, J as CatalogCollection, K as CatalogBrand, U as UpdateCartItemInput, M as MergeCartInput, R as Review, N as ReviewSummaryResponse, Q as PublicSubmitReviewInput, T as ThemeResponse, V as MenuResponse, X as BlogPost, Y as BlogPostResponse, Z as GivingEntry, _ as StartGivingInput, $ as StartGivingResponse, a0 as SubscriptionPlanListResponse, a1 as SubscriptionPlanResponse, a2 as PublicPaymentLinkResponse, a3 as PaymentLinkCheckoutInput, a4 as PaymentLinkCheckoutResponse, a5 as PaymentLinkRedemptionStatusResponse, a6 as PrintSettingsResponse, a7 as PrintOptionsSelection, a8 as PrintQuoteResponse, a9 as PrintIntakeInput, aa as PrintJob, ab as DiningMenu, ac as CustomerSignupResponse, ad as SendCodeResponse, ae as CustomerSession, af as CustomerResponse, ag as CustomerAuthSession, ah as CustomerSecurityActivityPage, ai as OrderSummary, aj as SavedAddress, ak as SavedAddressResponse, al as SavedAddressInput, am as SavedAddressUpdateInput, an as SavedPaymentMethod, ao as PaymentMethodSetupInput, ap as PaymentMethodSetupResult, aq as PaymentMethodConfirmInput, ar as PaymentMethodMutationResponse, as as StartSubscriptionInput, at as SubscriptionAgreementResponse, au as SubscriptionListResponse, av as SubscriptionSourceResponse, aw as SubscriptionInvoiceListResponse, ax as SubscriptionInvoiceResponse, ay as GivingIntentListResponse, az as LeadResponse } from './types-
|
|
2
|
+
import { O as Order, A as AddCartItemInput, C as CartResponse, a as CheckoutOptions, b as CheckoutStatusResponse, c as CheckoutCustomerInput, d as CheckoutAddressesInput, e as CheckoutFulfillmentInput, f as CheckoutPayInput, g as CheckoutPayResponse, h as CheckoutCancelInput, i as ChannelPing, j as ChannelGeo, P as PaymentCollectionAvailability, W as WaitlistVerification, k as WaitlistUnsubscription, D as DashProfileResponse, l as DashInitResponse, m as WaitlistGateStatus, n as WaitlistFormSettings, o as WaitlistSubmission, p as WaitlistAcknowledgement, q as DashPlansResponse, L as ListResponse, r as DashDirectoryRegion, s as DashDirectoryEntry, t as DashDirectoryProfileResponse, u as DashLead, v as DashLeadPortalRequestLinkInput, w as DashLeadPortalRequestLinkResponse, x as DashLeadPortalView, S as SiteDocument, y as PublicWorkspaceInit, z as LightInitResponse, B as PublicPageSummary, E as PublicPage, F as Product, G as ProductAsset, H as CatalogCategory, I as CatalogProductsResponse, J as CatalogCollection, K as CatalogBrand, U as UpdateCartItemInput, M as MergeCartInput, R as Review, N as ReviewSummaryResponse, Q as PublicSubmitReviewInput, T as ThemeResponse, V as MenuResponse, X as BlogPost, Y as BlogPostResponse, Z as GivingEntry, _ as StartGivingInput, $ as StartGivingResponse, a0 as SubscriptionPlanListResponse, a1 as SubscriptionPlanResponse, a2 as PublicPaymentLinkResponse, a3 as PaymentLinkCheckoutInput, a4 as PaymentLinkCheckoutResponse, a5 as PaymentLinkRedemptionStatusResponse, a6 as PrintSettingsResponse, a7 as PrintOptionsSelection, a8 as PrintQuoteResponse, a9 as PrintIntakeInput, aa as PrintJob, ab as DiningMenu, ac as CustomerSignupResponse, ad as SendCodeResponse, ae as CustomerSession, af as CustomerResponse, ag as CustomerAuthSession, ah as CustomerSecurityActivityPage, ai as OrderSummary, aj as SavedAddress, ak as SavedAddressResponse, al as SavedAddressInput, am as SavedAddressUpdateInput, an as SavedPaymentMethod, ao as PaymentMethodSetupInput, ap as PaymentMethodSetupResult, aq as PaymentMethodConfirmInput, ar as PaymentMethodMutationResponse, as as StartSubscriptionInput, at as SubscriptionAgreementResponse, au as SubscriptionListResponse, av as SubscriptionSourceResponse, aw as SubscriptionInvoiceListResponse, ax as SubscriptionInvoiceResponse, ay as GivingIntentListResponse, az as LeadResponse } from './types-_6pxeQPE.js';
|
|
3
3
|
import { ChannelWebhookEventDataMap, ChannelWebhookEvent } from './webhooks.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/site.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bl as SiteRef, bg as PublicGate, bi as PublicSiteSignals } from './types-
|
|
1
|
+
import { bl as SiteRef, bg as PublicGate, bi as PublicSiteSignals } from './types-_6pxeQPE.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Site signals: what a public site serves, decided from the `signals` block
|
|
@@ -42,15 +42,9 @@ declare const GATE_EXEMPT_PATHS: readonly string[];
|
|
|
42
42
|
* mode added on the server after a site shipped never breaks that site.
|
|
43
43
|
*/
|
|
44
44
|
declare function normalizeGate(gate: Partial<PublicGate> | null | undefined): SiteGate | null;
|
|
45
|
-
/**
|
|
46
|
-
* Reads a bootstrap's signals. A backend older than the signals block sends
|
|
47
|
-
* only the top-level `gate` and `site`; those are read as an active, public,
|
|
48
|
-
* entitled site so an upgrade never depends on release order.
|
|
49
|
-
*/
|
|
45
|
+
/** Reads a bootstrap's signals; a bootstrap without them is an open site. */
|
|
50
46
|
declare function normalizeSignals(bootstrap: {
|
|
51
47
|
signals?: PublicSiteSignals;
|
|
52
|
-
gate?: PublicGate;
|
|
53
|
-
site?: SiteRef;
|
|
54
48
|
} | null | undefined): SiteSignals;
|
|
55
49
|
/** What a request gets. `gate-page` is the gate's own page, served bare. */
|
|
56
50
|
type SiteDecision = {
|
package/dist/site.js
CHANGED
|
@@ -37,9 +37,7 @@ function normalizeGate(gate) {
|
|
|
37
37
|
}
|
|
38
38
|
function normalizeSignals(bootstrap) {
|
|
39
39
|
const signals = bootstrap?.signals;
|
|
40
|
-
if (!signals) {
|
|
41
|
-
return { site: bootstrap?.site ?? null, gate: normalizeGate(bootstrap?.gate), lifecycle: "active", visibility: "public", siteEnabled: true };
|
|
42
|
-
}
|
|
40
|
+
if (!signals) return { site: null, gate: null, lifecycle: "active", visibility: "public", siteEnabled: true };
|
|
43
41
|
return {
|
|
44
42
|
site: signals.site ?? null,
|
|
45
43
|
gate: normalizeGate(signals.gate),
|
|
@@ -7,8 +7,6 @@ interface WorkspaceInfo {
|
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
9
|
slug: string;
|
|
10
|
-
is_active: boolean;
|
|
11
|
-
status?: string;
|
|
12
10
|
}
|
|
13
11
|
/**
|
|
14
12
|
* The server-decided public gate: the site's mode. Absent means visitors see
|
|
@@ -34,8 +32,7 @@ interface PublicGate {
|
|
|
34
32
|
/**
|
|
35
33
|
* The standard site-decision block every bootstrap carries. Decide from it
|
|
36
34
|
* with `siteDecision` (`@c1m-public/channel-client/site`): site_enabled first,
|
|
37
|
-
* then lifecycle, then the gate.
|
|
38
|
-
* it until they are retired.
|
|
35
|
+
* then lifecycle, then the gate.
|
|
39
36
|
*/
|
|
40
37
|
interface PublicSiteSignals {
|
|
41
38
|
site?: SiteRef;
|
|
@@ -86,7 +83,6 @@ interface PublicWorkspaceInit {
|
|
|
86
83
|
branding?: Record<string, unknown>;
|
|
87
84
|
preferences?: Record<string, unknown>;
|
|
88
85
|
profile?: Record<string, unknown>;
|
|
89
|
-
gate?: PublicGate;
|
|
90
86
|
features?: Array<{
|
|
91
87
|
key: string;
|
|
92
88
|
name: string;
|
|
@@ -120,7 +116,6 @@ interface SiteRef {
|
|
|
120
116
|
*/
|
|
121
117
|
interface LightInitResponse {
|
|
122
118
|
signals?: PublicSiteSignals;
|
|
123
|
-
gate?: PublicGate;
|
|
124
119
|
workspace_id: string;
|
|
125
120
|
workspace_name: string;
|
|
126
121
|
workspace_slug?: string;
|
|
@@ -135,7 +130,6 @@ interface LightInitResponse {
|
|
|
135
130
|
locale?: string;
|
|
136
131
|
timezone?: string;
|
|
137
132
|
};
|
|
138
|
-
site?: SiteRef;
|
|
139
133
|
seo?: {
|
|
140
134
|
title?: string;
|
|
141
135
|
description?: string;
|
|
@@ -178,7 +172,6 @@ interface DashLocaleInfo {
|
|
|
178
172
|
*/
|
|
179
173
|
interface DashInitResponse {
|
|
180
174
|
signals?: PublicSiteSignals;
|
|
181
|
-
gate?: PublicGate;
|
|
182
175
|
tenant: DashTenantInfo;
|
|
183
176
|
public_profile: DashPublicProfileInfo;
|
|
184
177
|
branding?: DashBrandingInfo;
|
|
@@ -187,7 +180,6 @@ interface DashInitResponse {
|
|
|
187
180
|
title?: string;
|
|
188
181
|
description?: string;
|
|
189
182
|
};
|
|
190
|
-
site?: SiteRef;
|
|
191
183
|
}
|
|
192
184
|
interface DashPublicPage {
|
|
193
185
|
profile: DashPublicProfileInfo & {
|