@c1m-public/channel-client 0.21.0 → 0.22.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-FRUWMKQP.js → chunk-KXPPMNNQ.js} +1 -1
- package/dist/{chunk-BSTXJIVL.js → chunk-L6GZU55H.js} +1 -1
- package/dist/{chunk-C44TGKRK.js → chunk-S74HRBIF.js} +3 -2
- package/dist/dash-next.js +3 -3
- package/dist/dash.js +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/next.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isChannelAPIError, createChannelClient } from './chunk-
|
|
1
|
+
import { isChannelAPIError, createChannelClient } from './chunk-S74HRBIF.js';
|
|
2
2
|
import { parseChannelWebhookEvent, isChannelWebhookVerificationError, isChannelWebhookEventType, ChannelConfigurationError } from './chunk-RJQ4YEZV.js';
|
|
3
3
|
import 'server-only';
|
|
4
4
|
|
|
@@ -52,7 +52,7 @@ function isRetryableRequest(method, headers, retry) {
|
|
|
52
52
|
if (method === "GET") return true;
|
|
53
53
|
return retry.idempotentWrites === true && headers.has("Idempotency-Key");
|
|
54
54
|
}
|
|
55
|
-
async function performRequest(transport, url, init, observe) {
|
|
55
|
+
async function performRequest(transport, url, init, observe, decode) {
|
|
56
56
|
const method = (init.method ?? "GET").toUpperCase();
|
|
57
57
|
const headers = new Headers(init.headers);
|
|
58
58
|
const startedAt = Date.now();
|
|
@@ -113,7 +113,8 @@ async function performRequest(transport, url, init, observe) {
|
|
|
113
113
|
payload = void 0;
|
|
114
114
|
} else {
|
|
115
115
|
const text = await response.text();
|
|
116
|
-
|
|
116
|
+
const parsed = text ? JSON.parse(text) : void 0;
|
|
117
|
+
payload = decode ? decode(parsed) : parsed;
|
|
117
118
|
}
|
|
118
119
|
} catch {
|
|
119
120
|
return fail({ outcome: "invalid_response", status, code: "", message: "", requestId });
|
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-L6GZU55H.js';
|
|
2
|
+
import { narrow } from './chunk-KXPPMNNQ.js';
|
|
3
|
+
import './chunk-S74HRBIF.js';
|
|
4
4
|
import './chunk-RJQ4YEZV.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-KXPPMNNQ.js';
|
|
2
|
+
import './chunk-S74HRBIF.js';
|
|
3
3
|
import './chunk-RJQ4YEZV.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -269,7 +269,7 @@ interface DashLead {
|
|
|
269
269
|
}
|
|
270
270
|
interface PublicPageSummary {
|
|
271
271
|
id: string;
|
|
272
|
-
|
|
272
|
+
dash_id: string;
|
|
273
273
|
workspace_id: string;
|
|
274
274
|
source: string;
|
|
275
275
|
route_kind: string;
|
|
@@ -444,7 +444,7 @@ interface LeadResponse {
|
|
|
444
444
|
interface SiteSubject {
|
|
445
445
|
kind: "workspace";
|
|
446
446
|
id: string;
|
|
447
|
-
|
|
447
|
+
dash_id?: string;
|
|
448
448
|
display_name?: string;
|
|
449
449
|
}
|
|
450
450
|
interface SiteResolvedDocument {
|
|
@@ -1005,7 +1005,7 @@ interface DiningMenuItem {
|
|
|
1005
1005
|
combo_groups?: DiningComboGroup[];
|
|
1006
1006
|
}
|
|
1007
1007
|
interface DiningMenu {
|
|
1008
|
-
|
|
1008
|
+
dash_id: string;
|
|
1009
1009
|
workspace_id: string;
|
|
1010
1010
|
board: {
|
|
1011
1011
|
id: string;
|
|
@@ -1256,7 +1256,7 @@ interface OrderSummary {
|
|
|
1256
1256
|
interface ChannelPing {
|
|
1257
1257
|
channel_id: string;
|
|
1258
1258
|
workspace_id: string;
|
|
1259
|
-
|
|
1259
|
+
dash_id: string;
|
|
1260
1260
|
scope: "workspace" | "dash";
|
|
1261
1261
|
api_version: string;
|
|
1262
1262
|
attestation?: string;
|
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-S74HRBIF.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-RJQ4YEZV.js';
|
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-L6GZU55H.js';
|
|
2
|
+
import './chunk-S74HRBIF.js';
|
|
3
3
|
import './chunk-RJQ4YEZV.js';
|