@waffo/pancake-ts 0.6.0 → 0.7.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/CHANGELOG.md +17 -0
- package/README.md +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ All notable changes to `@waffo/pancake-ts` will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.7.0] - 2026-05-11
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **`AddWebhookParams.events` / `UpdateWebhookParams.events` / `StoreWebhook.events`** typed as `` `${WebhookEventType}`[] `` instead of `string[]`. Editors now autocomplete the 10 enum values and flag typos at compile time. Runtime behavior unchanged — server still accepts string literals.
|
|
12
|
+
- **README webhook examples** use `WebhookEventType.OrderCompleted` enum form instead of raw string literals.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`GraphQLResponse.warnings?[]`** — soft warning envelope emitted when query cost approaches the hard limit (graphql-service `v2026.5.11.3`). Each warning carries `message`, `layer`, and `aiHint` (e.g. `REDUCE_QUERY_SIZE`). Server still returns HTTP 200; the next slightly-larger query may be rejected with 400.
|
|
17
|
+
- **`GraphQLResponse.errors[].aiHint?`** — actionable agent hint on error items (e.g. `REDUCE_QUERY_SIZE` when query cost exceeds the hard limit).
|
|
18
|
+
|
|
19
|
+
### Migration
|
|
20
|
+
|
|
21
|
+
- TypeScript compile errors in webhook event arrays — import `WebhookEventType` and use enum values (or string literals matching the enum) instead of arbitrary strings. Runtime payload unchanged.
|
|
22
|
+
- Client logic reading webhook errors / warnings can now surface `aiHint` to operators or feed it back to LLM agents for self-correction.
|
|
23
|
+
|
|
7
24
|
## [0.6.0] - 2026-05-07
|
|
8
25
|
|
|
9
26
|
### BREAKING
|
package/README.md
CHANGED
|
@@ -341,12 +341,14 @@ const { store: deleted } = await client.stores.delete({ id: store.id });
|
|
|
341
341
|
Manage webhook endpoints across HTTP, Feishu, Discord, Telegram, and Slack. Each store can have up to 20 webhooks across all channels.
|
|
342
342
|
|
|
343
343
|
```typescript
|
|
344
|
+
import { WebhookEventType } from "@waffo/pancake-ts";
|
|
345
|
+
|
|
344
346
|
// Add a standard HTTPS webhook (RSA-signed envelope)
|
|
345
347
|
const { webhook } = await client.webhooks.add({
|
|
346
348
|
storeId: store.id,
|
|
347
349
|
channel: "http",
|
|
348
350
|
url: "https://example.com/webhooks/pancake",
|
|
349
|
-
events: [
|
|
351
|
+
events: [WebhookEventType.OrderCompleted, WebhookEventType.RefundSucceeded],
|
|
350
352
|
testMode: false,
|
|
351
353
|
});
|
|
352
354
|
|
|
@@ -355,7 +357,7 @@ await client.webhooks.add({
|
|
|
355
357
|
storeId: store.id,
|
|
356
358
|
channel: "discord",
|
|
357
359
|
url: "https://discord.com/api/webhooks/123/abc",
|
|
358
|
-
events: [
|
|
360
|
+
events: [WebhookEventType.OrderCompleted],
|
|
359
361
|
testMode: false,
|
|
360
362
|
});
|
|
361
363
|
|
|
@@ -364,7 +366,7 @@ await client.webhooks.add({
|
|
|
364
366
|
storeId: store.id,
|
|
365
367
|
channel: "telegram",
|
|
366
368
|
url: "https://api.telegram.org/bot123:ABC/sendMessage",
|
|
367
|
-
events: [
|
|
369
|
+
events: [WebhookEventType.OrderCompleted],
|
|
368
370
|
testMode: false,
|
|
369
371
|
secret: "8737101383",
|
|
370
372
|
});
|
|
@@ -372,7 +374,7 @@ await client.webhooks.add({
|
|
|
372
374
|
// Update events
|
|
373
375
|
await client.webhooks.update({
|
|
374
376
|
id: webhook.id,
|
|
375
|
-
events: [
|
|
377
|
+
events: [WebhookEventType.OrderCompleted, WebhookEventType.RefundSucceeded, WebhookEventType.SubscriptionCanceled],
|
|
376
378
|
});
|
|
377
379
|
|
|
378
380
|
// Hard-delete a webhook (delivery history retained for audit)
|