@c1m-public/channel-client 0.39.0 → 1.0.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-VARU5HM6.js → chunk-BOZTNLMF.js} +2 -2
- package/dist/{chunk-LFHMWK6A.js → chunk-FBTHKZOP.js} +2 -2
- package/dist/{chunk-GPSFEKWL.js → chunk-GWOZY23T.js} +1 -1
- package/dist/dash-next.js +3 -3
- package/dist/dash.d.ts +3 -3
- package/dist/dash.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.js +2 -2
- package/dist/site.d.ts +4 -3
- package/dist/site.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createChannelClient } from './chunk-
|
|
1
|
+
import { createChannelClient } from './chunk-FBTHKZOP.js';
|
|
2
2
|
import 'server-only';
|
|
3
3
|
|
|
4
4
|
function narrow(client) {
|
|
@@ -6,7 +6,7 @@ function narrow(client) {
|
|
|
6
6
|
ping: client.ping,
|
|
7
7
|
geo: client.geo,
|
|
8
8
|
dash: client.dash,
|
|
9
|
-
|
|
9
|
+
waitlist: client.waitlist,
|
|
10
10
|
assetUrl: client.assetUrl,
|
|
11
11
|
withVisitor: (visitor) => narrow(client.withVisitor(visitor))
|
|
12
12
|
};
|
|
@@ -294,8 +294,8 @@ function createChannelClient(options) {
|
|
|
294
294
|
{ cache: "no-store" }
|
|
295
295
|
)
|
|
296
296
|
},
|
|
297
|
-
/** Confirmation and unsubscribe links from waitlist emails. */
|
|
298
|
-
|
|
297
|
+
/** Confirmation and unsubscribe links from waitlist emails (any scope). */
|
|
298
|
+
waitlist: {
|
|
299
299
|
verify: (token2) => linkRequest("/verify", { token: required(token2, "token") }),
|
|
300
300
|
unsubscribe: (key) => linkRequest("/unsubscribe", { key: required(key, "key") })
|
|
301
301
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isChannelAPIError, createChannelClient } from './chunk-
|
|
1
|
+
import { isChannelAPIError, createChannelClient } from './chunk-FBTHKZOP.js';
|
|
2
2
|
import { parseChannelWebhookEvent, isChannelWebhookVerificationError, isChannelWebhookEventType, ChannelConfigurationError } from './chunk-XPO7C3DW.js';
|
|
3
3
|
import 'server-only';
|
|
4
4
|
|
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-GWOZY23T.js';
|
|
2
|
+
import { narrow } from './chunk-BOZTNLMF.js';
|
|
3
|
+
import './chunk-FBTHKZOP.js';
|
|
4
4
|
import './chunk-XPO7C3DW.js';
|
|
5
5
|
import 'server-only';
|
|
6
6
|
|
package/dist/dash.d.ts
CHANGED
|
@@ -13,10 +13,10 @@ import './webhooks.js';
|
|
|
13
13
|
*
|
|
14
14
|
* `ping` and `geo` are deliberately included: both are scope-agnostic on the
|
|
15
15
|
* door (the credential self-check must answer for either scope, and geo lets
|
|
16
|
-
* a dash site localise pricing). `
|
|
17
|
-
* surface every waitlist site needs.
|
|
16
|
+
* a dash site localise pricing). `waitlist` is the scope-free email-link
|
|
17
|
+
* surface (verify, unsubscribe) every waitlist site needs.
|
|
18
18
|
*/
|
|
19
|
-
type DashChannelClient = Pick<ReturnType<typeof createChannelClient>, "ping" | "geo" | "dash" | "
|
|
19
|
+
type DashChannelClient = Pick<ReturnType<typeof createChannelClient>, "ping" | "geo" | "dash" | "waitlist" | "assetUrl"> & {
|
|
20
20
|
/** Request-scoped clone carrying signed visitor metadata (see ChannelVisitor). */
|
|
21
21
|
withVisitor(visitor: ChannelVisitor): DashChannelClient;
|
|
22
22
|
};
|
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-BOZTNLMF.js';
|
|
2
|
+
import './chunk-FBTHKZOP.js';
|
|
3
3
|
import './chunk-XPO7C3DW.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -161,8 +161,8 @@ declare function createChannelClient(options: CreateChannelClientOptions): {
|
|
|
161
161
|
*/
|
|
162
162
|
readonly availability: () => Promise<PaymentCollectionAvailability>;
|
|
163
163
|
};
|
|
164
|
-
/** Confirmation and unsubscribe links from waitlist emails. */
|
|
165
|
-
readonly
|
|
164
|
+
/** Confirmation and unsubscribe links from waitlist emails (any scope). */
|
|
165
|
+
readonly waitlist: {
|
|
166
166
|
readonly verify: (token: string) => Promise<WaitlistVerification>;
|
|
167
167
|
readonly unsubscribe: (key: string) => Promise<WaitlistUnsubscription>;
|
|
168
168
|
};
|
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-FBTHKZOP.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-XPO7C3DW.js';
|
package/dist/next.d.ts
CHANGED
|
@@ -290,7 +290,7 @@ declare function createNextChannelClient(options: CreateNextChannelClientOptions
|
|
|
290
290
|
readonly payments: {
|
|
291
291
|
readonly availability: () => Promise<PaymentCollectionAvailability>;
|
|
292
292
|
};
|
|
293
|
-
readonly
|
|
293
|
+
readonly waitlist: {
|
|
294
294
|
readonly verify: (token: string) => Promise<WaitlistVerification>;
|
|
295
295
|
readonly unsubscribe: (key: string) => Promise<WaitlistUnsubscription>;
|
|
296
296
|
};
|
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-GWOZY23T.js';
|
|
2
|
+
import './chunk-FBTHKZOP.js';
|
|
3
3
|
import './chunk-XPO7C3DW.js';
|
package/dist/site.d.ts
CHANGED
|
@@ -76,9 +76,10 @@ type SiteDecision = {
|
|
|
76
76
|
* Decides one request, in the server's order: no public site, then an
|
|
77
77
|
* inactive owner, then the gate. Exempt paths are always served, and a
|
|
78
78
|
* waitlist or maintenance gate never takes over `UNAVAILABLE_PATH` or
|
|
79
|
-
* `PRIVATE_PATH`. `private` means the
|
|
80
|
-
*
|
|
81
|
-
* private
|
|
79
|
+
* `PRIVATE_PATH`. `private` means nobody but the owner may see the site:
|
|
80
|
+
* neither this nor site/resolve checks membership, and only a signed editor
|
|
81
|
+
* preview bypasses a private site. `siteResponse` turns the decision into what
|
|
82
|
+
* a proxy does.
|
|
82
83
|
*/
|
|
83
84
|
declare function siteDecision(signals: SiteSignals, pathname: string, options?: {
|
|
84
85
|
exempt?: readonly string[];
|
package/dist/site.js
CHANGED
|
@@ -110,7 +110,7 @@ function withSiteModeChoice(base, choice) {
|
|
|
110
110
|
function describeLiveGate(gate) {
|
|
111
111
|
if (!gate) return "Live \xB7 visitors see the normal site";
|
|
112
112
|
if (gate.kind === "maintenance") return "Maintenance \xB7 visitors see the maintenance notice";
|
|
113
|
-
if (gate.kind === "private") return "Private \xB7 only
|
|
113
|
+
if (gate.kind === "private") return "Private \xB7 only the owner can preview the site";
|
|
114
114
|
return gate.placement === "page" ? "Waitlist \xB7 every page redirects to /waitlist" : "Waitlist \xB7 the site stays open with a signup form";
|
|
115
115
|
}
|
|
116
116
|
function toDateTimeLocal(value) {
|