@waffo/pancake-ts 0.7.0 → 0.8.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 +33 -0
- package/README.md +26 -0
- package/dist/index.cjs +114 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +127 -54
- package/dist/index.d.ts +127 -54
- package/dist/index.js +114 -72
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -29,34 +29,56 @@ interface PostOptions {
|
|
|
29
29
|
* produce a new key after the window elapses (e.g. 60 = per-minute dedup).
|
|
30
30
|
*/
|
|
31
31
|
idempotencyWindow?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Skip the X-Idempotency-Key header entirely. Set for read-only queries
|
|
34
|
+
* (e.g. GraphQL) so the gateway's 24h idempotency cache does not serve
|
|
35
|
+
* stale data on identical repeat queries.
|
|
36
|
+
*/
|
|
37
|
+
noIdempotency?: boolean;
|
|
32
38
|
}
|
|
33
39
|
/**
|
|
34
|
-
* Single
|
|
40
|
+
* Single Notice entry within `errors` or `warnings` arrays.
|
|
41
|
+
*
|
|
42
|
+
* Both REST and GraphQL envelopes use the same Notice shape. `aiHint` is the
|
|
43
|
+
* structured migration instruction for LLM consumers (see handbook
|
|
44
|
+
* `command-layer.md` aiHint four-line template).
|
|
35
45
|
*
|
|
36
46
|
* @example
|
|
37
47
|
* { message: "Store slug already exists", layer: "store" }
|
|
48
|
+
* @example
|
|
49
|
+
* { message: "webhookSettings field ignored", layer: "store",
|
|
50
|
+
* aiHint: "Switch to client.webhooks.add / update / remove" }
|
|
38
51
|
*/
|
|
39
|
-
interface
|
|
40
|
-
/**
|
|
52
|
+
interface Notice {
|
|
53
|
+
/** Human-readable message */
|
|
41
54
|
message: string;
|
|
42
|
-
/** Layer
|
|
55
|
+
/** Layer that produced this notice */
|
|
43
56
|
layer: `${ErrorLayer}`;
|
|
57
|
+
/** Structured migration / remediation instruction for LLM consumers */
|
|
58
|
+
aiHint?: string;
|
|
44
59
|
}
|
|
45
|
-
/**
|
|
46
|
-
|
|
47
|
-
data: T;
|
|
48
|
-
}
|
|
60
|
+
/** @deprecated Use {@link Notice}. Kept for backwards compatibility with existing imports. */
|
|
61
|
+
type ApiError = Notice;
|
|
49
62
|
/**
|
|
50
|
-
*
|
|
63
|
+
* API response envelope. Both REST writes and GraphQL queries return this shape:
|
|
64
|
+
* - Success: `{ data: T }` (optionally with `warnings`)
|
|
65
|
+
* - Failure: `{ data: null, errors: Notice[] }`
|
|
66
|
+
* - Partial success (GraphQL only): `{ data: T, errors: Notice[] }`
|
|
51
67
|
*
|
|
52
68
|
* `errors` are ordered by call stack: `[0]` is the deepest layer, `[n]` is the outermost.
|
|
69
|
+
*
|
|
70
|
+
* See handbook `coding-standards/code-style-guide/command-layer.md` for the wire contract.
|
|
53
71
|
*/
|
|
54
|
-
interface
|
|
55
|
-
data: null;
|
|
56
|
-
errors
|
|
72
|
+
interface Envelope<T> {
|
|
73
|
+
data: T | null;
|
|
74
|
+
errors?: Notice[];
|
|
75
|
+
warnings?: Notice[];
|
|
76
|
+
}
|
|
77
|
+
/** Transport-layer result: HTTP status plus the parsed envelope. */
|
|
78
|
+
interface PostResult<T> extends Envelope<T> {
|
|
79
|
+
/** HTTP status code from the response */
|
|
80
|
+
status: number;
|
|
57
81
|
}
|
|
58
|
-
/** Union type of success and error API responses. */
|
|
59
|
-
type ApiResponse<T> = ApiSuccessResponse<T> | ApiErrorResponse;
|
|
60
82
|
/**
|
|
61
83
|
* Environment type.
|
|
62
84
|
* @see waffo-pancake-order-service/app/lib/types.ts
|
|
@@ -875,7 +897,11 @@ interface GraphQLParams {
|
|
|
875
897
|
/** Query variables */
|
|
876
898
|
variables?: Record<string, unknown>;
|
|
877
899
|
}
|
|
878
|
-
/**
|
|
900
|
+
/**
|
|
901
|
+
* GraphQL response envelope. Same shape as {@link Envelope}, but `errors` entries
|
|
902
|
+
* may additionally carry `locations` and `path` (graphql-js fields). The `layer`
|
|
903
|
+
* field is optional on GraphQL because resolver errors don't carry one.
|
|
904
|
+
*/
|
|
879
905
|
interface GraphQLResponse<T = Record<string, unknown>> {
|
|
880
906
|
data: T | null;
|
|
881
907
|
errors?: Array<{
|
|
@@ -886,12 +912,10 @@ interface GraphQLResponse<T = Record<string, unknown>> {
|
|
|
886
912
|
}>;
|
|
887
913
|
path?: string[];
|
|
888
914
|
aiHint?: string;
|
|
915
|
+
/** Service stage that produced the error ("graphql", "gateway"). Resolver errors omit it. */
|
|
916
|
+
layer?: string;
|
|
889
917
|
}>;
|
|
890
|
-
warnings?:
|
|
891
|
-
message: string;
|
|
892
|
-
layer: string;
|
|
893
|
-
aiHint?: string;
|
|
894
|
-
}>;
|
|
918
|
+
warnings?: Notice[];
|
|
895
919
|
}
|
|
896
920
|
/**
|
|
897
921
|
* Webhook event types.
|
|
@@ -1059,10 +1083,16 @@ interface VerifyWebhookOptions {
|
|
|
1059
1083
|
}
|
|
1060
1084
|
|
|
1061
1085
|
/**
|
|
1062
|
-
* Internal HTTP client that auto-signs requests
|
|
1086
|
+
* Internal HTTP client that auto-signs requests.
|
|
1063
1087
|
*
|
|
1064
|
-
* The
|
|
1065
|
-
*
|
|
1088
|
+
* The transport is intentionally thin: one {@link post} method that signs,
|
|
1089
|
+
* sends, and parses the {data, errors?, warnings?} envelope. It does NOT
|
|
1090
|
+
* unwrap `data`, throw on `errors[]`, or hide `warnings` — those are policy
|
|
1091
|
+
* choices that belong to the resource layer. See handbook
|
|
1092
|
+
* `coding-standards/code-style-guide/command-layer.md`.
|
|
1093
|
+
*
|
|
1094
|
+
* The `X-Merchant-Id` header is sent in `MER_{base62}` format as provided
|
|
1095
|
+
* by the user. The gateway decodes it to a raw UUID before forwarding.
|
|
1066
1096
|
*
|
|
1067
1097
|
* Not exported publicly — used by resource classes via {@link WaffoPancake}.
|
|
1068
1098
|
*/
|
|
@@ -1073,23 +1103,24 @@ declare class HttpClient {
|
|
|
1073
1103
|
private readonly _fetch;
|
|
1074
1104
|
constructor(config: WaffoPancakeConfig);
|
|
1075
1105
|
/**
|
|
1076
|
-
* Send a signed POST
|
|
1106
|
+
* Send a signed POST and return the full envelope plus HTTP status.
|
|
1077
1107
|
*
|
|
1078
1108
|
* Behavior:
|
|
1079
|
-
* -
|
|
1080
|
-
* -
|
|
1081
|
-
*
|
|
1082
|
-
* -
|
|
1083
|
-
*
|
|
1084
|
-
*
|
|
1085
|
-
* @
|
|
1109
|
+
* - Builds RSA-SHA256 signature (`X-Merchant-Id` / `X-Timestamp` / `X-Signature`)
|
|
1110
|
+
* - Attaches `X-Idempotency-Key` (deterministic `sha256(merchantId + path + body)`)
|
|
1111
|
+
* unless `options.noIdempotency` is set
|
|
1112
|
+
* - When `options.idempotencyWindow` is set, a floored timestamp is mixed into the
|
|
1113
|
+
* key so identical params produce a new key after the window elapses
|
|
1114
|
+
* - Does NOT throw on `errors[]` or non-2xx status — caller inspects the result
|
|
1115
|
+
* - Throws {@link WaffoPancakeError} only on transport failures (non-JSON body)
|
|
1116
|
+
*
|
|
1117
|
+
* @param path - API path (e.g. `/v1/actions/store/create-store`, `/v1/graphql`)
|
|
1086
1118
|
* @param body - Request body object
|
|
1087
1119
|
* @param options - Optional settings
|
|
1088
|
-
* @
|
|
1089
|
-
* @
|
|
1090
|
-
* @throws {WaffoPancakeError} When the API returns errors
|
|
1120
|
+
* @returns Parsed envelope with HTTP status
|
|
1121
|
+
* @throws {WaffoPancakeError} When the response body is not valid JSON
|
|
1091
1122
|
*/
|
|
1092
|
-
post<T>(path: string, body: object, options?: PostOptions): Promise<T
|
|
1123
|
+
post<T>(path: string, body: object, options?: PostOptions): Promise<PostResult<T>>;
|
|
1093
1124
|
}
|
|
1094
1125
|
|
|
1095
1126
|
/** Authentication resource — issue session tokens for buyers. */
|
|
@@ -1116,14 +1147,18 @@ declare class AuthResource {
|
|
|
1116
1147
|
* buyerIdentity: "customer@example.com",
|
|
1117
1148
|
* });
|
|
1118
1149
|
*/
|
|
1119
|
-
issueSessionToken(params: IssueSessionTokenParams): Promise<SessionToken
|
|
1150
|
+
issueSessionToken(params: IssueSessionTokenParams): Promise<SessionToken & {
|
|
1151
|
+
warnings?: Notice[];
|
|
1152
|
+
}>;
|
|
1120
1153
|
}
|
|
1121
1154
|
|
|
1122
1155
|
/**
|
|
1123
1156
|
* Internal HTTP client for buyer-side requests using Bearer token authentication.
|
|
1124
1157
|
*
|
|
1125
1158
|
* Unlike {@link HttpClient} which signs requests with RSA-SHA256 (API Key auth),
|
|
1126
|
-
* this client attaches a session token as `Authorization: Bearer <token
|
|
1159
|
+
* this client attaches a session token as `Authorization: Bearer <token>` and
|
|
1160
|
+
* never sends an idempotency key (buyer session actions are not protected by
|
|
1161
|
+
* gateway idempotency in the current architecture).
|
|
1127
1162
|
*
|
|
1128
1163
|
* Not exported publicly — used internally by {@link BuyerSession}.
|
|
1129
1164
|
*/
|
|
@@ -1133,14 +1168,12 @@ declare class BuyerHttpClient {
|
|
|
1133
1168
|
private readonly _fetch;
|
|
1134
1169
|
constructor(token: string, config: Pick<WaffoPancakeConfig, "baseUrl" | "fetch">);
|
|
1135
1170
|
/**
|
|
1136
|
-
* Send a Bearer-authenticated POST
|
|
1171
|
+
* Send a Bearer-authenticated POST and return the full envelope plus HTTP status.
|
|
1137
1172
|
*
|
|
1138
|
-
*
|
|
1139
|
-
* @
|
|
1140
|
-
* @returns Parsed `data` field from the response
|
|
1141
|
-
* @throws {WaffoPancakeError} When the API returns errors
|
|
1173
|
+
* Does NOT throw on `errors[]` or non-2xx status — caller inspects the result.
|
|
1174
|
+
* Throws {@link WaffoPancakeError} only when the response body is not valid JSON.
|
|
1142
1175
|
*/
|
|
1143
|
-
post<T>(path: string, body: object): Promise<T
|
|
1176
|
+
post<T>(path: string, body: object): Promise<PostResult<T>>;
|
|
1144
1177
|
}
|
|
1145
1178
|
|
|
1146
1179
|
/**
|
|
@@ -1172,7 +1205,9 @@ declare class BuyerSession {
|
|
|
1172
1205
|
* const { orderId, status } = await buyer.cancelSubscription({ orderId: "ORD_xxx" });
|
|
1173
1206
|
* // status: "canceled" (was pending) or "canceling" (was active)
|
|
1174
1207
|
*/
|
|
1175
|
-
cancelSubscription(params: CancelSubscriptionParams): Promise<CancelSubscriptionResult
|
|
1208
|
+
cancelSubscription(params: CancelSubscriptionParams): Promise<CancelSubscriptionResult & {
|
|
1209
|
+
warnings?: Notice[];
|
|
1210
|
+
}>;
|
|
1176
1211
|
/**
|
|
1177
1212
|
* Cancel a one-time order (only while payment is still pending).
|
|
1178
1213
|
*
|
|
@@ -1182,7 +1217,9 @@ declare class BuyerSession {
|
|
|
1182
1217
|
* @example
|
|
1183
1218
|
* const { orderId, status } = await buyer.cancelOnetimeOrder({ orderId: "ORD_xxx" });
|
|
1184
1219
|
*/
|
|
1185
|
-
cancelOnetimeOrder(params: CancelOnetimeOrderParams): Promise<CancelOnetimeOrderResult
|
|
1220
|
+
cancelOnetimeOrder(params: CancelOnetimeOrderParams): Promise<CancelOnetimeOrderResult & {
|
|
1221
|
+
warnings?: Notice[];
|
|
1222
|
+
}>;
|
|
1186
1223
|
/**
|
|
1187
1224
|
* Reactivate a subscription that is in `canceling` status.
|
|
1188
1225
|
*
|
|
@@ -1193,7 +1230,9 @@ declare class BuyerSession {
|
|
|
1193
1230
|
* const { orderId, status } = await buyer.reactivateSubscription({ orderId: "ORD_xxx" });
|
|
1194
1231
|
* // status: "active"
|
|
1195
1232
|
*/
|
|
1196
|
-
reactivateSubscription(params: ReactivateSubscriptionParams): Promise<ReactivateSubscriptionResult
|
|
1233
|
+
reactivateSubscription(params: ReactivateSubscriptionParams): Promise<ReactivateSubscriptionResult & {
|
|
1234
|
+
warnings?: Notice[];
|
|
1235
|
+
}>;
|
|
1197
1236
|
/**
|
|
1198
1237
|
* Submit a refund request for a payment.
|
|
1199
1238
|
*
|
|
@@ -1209,6 +1248,7 @@ declare class BuyerSession {
|
|
|
1209
1248
|
*/
|
|
1210
1249
|
createRefundTicket(params: CreateRefundTicketParams): Promise<{
|
|
1211
1250
|
ticket: RefundTicket;
|
|
1251
|
+
warnings?: Notice[];
|
|
1212
1252
|
}>;
|
|
1213
1253
|
/**
|
|
1214
1254
|
* Resubmit a previously rejected refund ticket with updated details.
|
|
@@ -1226,6 +1266,7 @@ declare class BuyerSession {
|
|
|
1226
1266
|
*/
|
|
1227
1267
|
resubmitRefundTicket(params: ResubmitRefundTicketParams): Promise<{
|
|
1228
1268
|
ticket: RefundTicket;
|
|
1269
|
+
warnings?: Notice[];
|
|
1229
1270
|
}>;
|
|
1230
1271
|
}
|
|
1231
1272
|
/**
|
|
@@ -1280,7 +1321,9 @@ declare class CheckoutAnonymousResource {
|
|
|
1280
1321
|
* billingDetail: { country: "US", isBusiness: false, postcode: "10001" },
|
|
1281
1322
|
* });
|
|
1282
1323
|
*/
|
|
1283
|
-
create(params: AnonymousCheckoutParams): Promise<CheckoutSessionResult
|
|
1324
|
+
create(params: AnonymousCheckoutParams): Promise<CheckoutSessionResult & {
|
|
1325
|
+
warnings?: Notice[];
|
|
1326
|
+
}>;
|
|
1284
1327
|
}
|
|
1285
1328
|
|
|
1286
1329
|
/**
|
|
@@ -1316,7 +1359,9 @@ declare class CheckoutAuthenticatedResource {
|
|
|
1316
1359
|
* });
|
|
1317
1360
|
* // Redirect to result.checkoutUrl (includes #token=...)
|
|
1318
1361
|
*/
|
|
1319
|
-
create(params: AuthenticatedCheckoutParams): Promise<AuthenticatedCheckoutResult
|
|
1362
|
+
create(params: AuthenticatedCheckoutParams): Promise<AuthenticatedCheckoutResult & {
|
|
1363
|
+
warnings?: Notice[];
|
|
1364
|
+
}>;
|
|
1320
1365
|
}
|
|
1321
1366
|
|
|
1322
1367
|
/**
|
|
@@ -1369,7 +1414,9 @@ declare class CheckoutResource {
|
|
|
1369
1414
|
* });
|
|
1370
1415
|
* // Redirect to session.checkoutUrl
|
|
1371
1416
|
*/
|
|
1372
|
-
createSession(params: CreateCheckoutSessionParams): Promise<CheckoutSessionResult
|
|
1417
|
+
createSession(params: CreateCheckoutSessionParams): Promise<CheckoutSessionResult & {
|
|
1418
|
+
warnings?: Notice[];
|
|
1419
|
+
}>;
|
|
1373
1420
|
}
|
|
1374
1421
|
|
|
1375
1422
|
/** GraphQL query resource (Query only, no Mutations). */
|
|
@@ -1416,6 +1463,7 @@ declare class OnetimeProductsResource {
|
|
|
1416
1463
|
*/
|
|
1417
1464
|
create(params: CreateOnetimeProductParams): Promise<{
|
|
1418
1465
|
product: OnetimeProductDetail;
|
|
1466
|
+
warnings?: Notice[];
|
|
1419
1467
|
}>;
|
|
1420
1468
|
/**
|
|
1421
1469
|
* Update a one-time product. Creates a new version; skips if unchanged.
|
|
@@ -1439,6 +1487,7 @@ declare class OnetimeProductsResource {
|
|
|
1439
1487
|
*/
|
|
1440
1488
|
update(params: UpdateOnetimeProductParams): Promise<{
|
|
1441
1489
|
product: OnetimeProductDetail;
|
|
1490
|
+
warnings?: Notice[];
|
|
1442
1491
|
}>;
|
|
1443
1492
|
/**
|
|
1444
1493
|
* Publish a one-time product's test version to production.
|
|
@@ -1451,6 +1500,7 @@ declare class OnetimeProductsResource {
|
|
|
1451
1500
|
*/
|
|
1452
1501
|
publish(params: PublishOnetimeProductParams): Promise<{
|
|
1453
1502
|
product: OnetimeProductDetail;
|
|
1503
|
+
warnings?: Notice[];
|
|
1454
1504
|
}>;
|
|
1455
1505
|
/**
|
|
1456
1506
|
* Update a one-time product's status (active/inactive).
|
|
@@ -1466,6 +1516,7 @@ declare class OnetimeProductsResource {
|
|
|
1466
1516
|
*/
|
|
1467
1517
|
updateStatus(params: UpdateOnetimeStatusParams): Promise<{
|
|
1468
1518
|
product: OnetimeProductDetail;
|
|
1519
|
+
warnings?: Notice[];
|
|
1469
1520
|
}>;
|
|
1470
1521
|
}
|
|
1471
1522
|
|
|
@@ -1488,7 +1539,9 @@ declare class OrdersResource {
|
|
|
1488
1539
|
* });
|
|
1489
1540
|
* // status: "canceled" or "canceling"
|
|
1490
1541
|
*/
|
|
1491
|
-
cancelSubscription(params: CancelSubscriptionParams): Promise<CancelSubscriptionResult
|
|
1542
|
+
cancelSubscription(params: CancelSubscriptionParams): Promise<CancelSubscriptionResult & {
|
|
1543
|
+
warnings?: Notice[];
|
|
1544
|
+
}>;
|
|
1492
1545
|
}
|
|
1493
1546
|
|
|
1494
1547
|
/** Store merchant management resource (coming soon — endpoints return 501). */
|
|
@@ -1508,7 +1561,9 @@ declare class StoreMerchantsResource {
|
|
|
1508
1561
|
* role: "admin",
|
|
1509
1562
|
* });
|
|
1510
1563
|
*/
|
|
1511
|
-
add(params: AddMerchantParams): Promise<AddMerchantResult
|
|
1564
|
+
add(params: AddMerchantParams): Promise<AddMerchantResult & {
|
|
1565
|
+
warnings?: Notice[];
|
|
1566
|
+
}>;
|
|
1512
1567
|
/**
|
|
1513
1568
|
* Remove a merchant from a store.
|
|
1514
1569
|
*
|
|
@@ -1521,7 +1576,9 @@ declare class StoreMerchantsResource {
|
|
|
1521
1576
|
* merchantId: "MER_xxx",
|
|
1522
1577
|
* });
|
|
1523
1578
|
*/
|
|
1524
|
-
remove(params: RemoveMerchantParams): Promise<RemoveMerchantResult
|
|
1579
|
+
remove(params: RemoveMerchantParams): Promise<RemoveMerchantResult & {
|
|
1580
|
+
warnings?: Notice[];
|
|
1581
|
+
}>;
|
|
1525
1582
|
/**
|
|
1526
1583
|
* Update a merchant's role in a store.
|
|
1527
1584
|
*
|
|
@@ -1535,7 +1592,9 @@ declare class StoreMerchantsResource {
|
|
|
1535
1592
|
* role: "member",
|
|
1536
1593
|
* });
|
|
1537
1594
|
*/
|
|
1538
|
-
updateRole(params: UpdateRoleParams): Promise<UpdateRoleResult
|
|
1595
|
+
updateRole(params: UpdateRoleParams): Promise<UpdateRoleResult & {
|
|
1596
|
+
warnings?: Notice[];
|
|
1597
|
+
}>;
|
|
1539
1598
|
}
|
|
1540
1599
|
|
|
1541
1600
|
/** Store management resource — create, update, and delete stores. */
|
|
@@ -1553,6 +1612,7 @@ declare class StoresResource {
|
|
|
1553
1612
|
*/
|
|
1554
1613
|
create(params: CreateStoreParams): Promise<{
|
|
1555
1614
|
store: Store;
|
|
1615
|
+
warnings?: Notice[];
|
|
1556
1616
|
}>;
|
|
1557
1617
|
/**
|
|
1558
1618
|
* Update an existing store's settings.
|
|
@@ -1584,6 +1644,7 @@ declare class StoresResource {
|
|
|
1584
1644
|
*/
|
|
1585
1645
|
update(params: UpdateStoreParams): Promise<{
|
|
1586
1646
|
store: Store;
|
|
1647
|
+
warnings?: Notice[];
|
|
1587
1648
|
}>;
|
|
1588
1649
|
/**
|
|
1589
1650
|
* Soft-delete a store. Only the owner can delete.
|
|
@@ -1596,6 +1657,7 @@ declare class StoresResource {
|
|
|
1596
1657
|
*/
|
|
1597
1658
|
delete(params: DeleteStoreParams): Promise<{
|
|
1598
1659
|
store: Store;
|
|
1660
|
+
warnings?: Notice[];
|
|
1599
1661
|
}>;
|
|
1600
1662
|
}
|
|
1601
1663
|
|
|
@@ -1619,6 +1681,7 @@ declare class SubscriptionProductGroupsResource {
|
|
|
1619
1681
|
*/
|
|
1620
1682
|
create(params: CreateSubscriptionProductGroupParams): Promise<{
|
|
1621
1683
|
group: SubscriptionProductGroup;
|
|
1684
|
+
warnings?: Notice[];
|
|
1622
1685
|
}>;
|
|
1623
1686
|
/**
|
|
1624
1687
|
* Update a subscription product group. `productIds` is a full replacement.
|
|
@@ -1634,6 +1697,7 @@ declare class SubscriptionProductGroupsResource {
|
|
|
1634
1697
|
*/
|
|
1635
1698
|
update(params: UpdateSubscriptionProductGroupParams): Promise<{
|
|
1636
1699
|
group: SubscriptionProductGroup;
|
|
1700
|
+
warnings?: Notice[];
|
|
1637
1701
|
}>;
|
|
1638
1702
|
/**
|
|
1639
1703
|
* Hard-delete a subscription product group.
|
|
@@ -1646,6 +1710,7 @@ declare class SubscriptionProductGroupsResource {
|
|
|
1646
1710
|
*/
|
|
1647
1711
|
delete(params: DeleteSubscriptionProductGroupParams): Promise<{
|
|
1648
1712
|
group: SubscriptionProductGroup;
|
|
1713
|
+
warnings?: Notice[];
|
|
1649
1714
|
}>;
|
|
1650
1715
|
/**
|
|
1651
1716
|
* Publish a test-environment group to production (upsert).
|
|
@@ -1658,6 +1723,7 @@ declare class SubscriptionProductGroupsResource {
|
|
|
1658
1723
|
*/
|
|
1659
1724
|
publish(params: PublishSubscriptionProductGroupParams): Promise<{
|
|
1660
1725
|
group: SubscriptionProductGroup;
|
|
1726
|
+
warnings?: Notice[];
|
|
1661
1727
|
}>;
|
|
1662
1728
|
}
|
|
1663
1729
|
|
|
@@ -1681,6 +1747,7 @@ declare class SubscriptionProductsResource {
|
|
|
1681
1747
|
*/
|
|
1682
1748
|
create(params: CreateSubscriptionProductParams): Promise<{
|
|
1683
1749
|
product: SubscriptionProductDetail;
|
|
1750
|
+
warnings?: Notice[];
|
|
1684
1751
|
}>;
|
|
1685
1752
|
/**
|
|
1686
1753
|
* Update a subscription product. Creates a new version; skips if unchanged.
|
|
@@ -1705,6 +1772,7 @@ declare class SubscriptionProductsResource {
|
|
|
1705
1772
|
*/
|
|
1706
1773
|
update(params: UpdateSubscriptionProductParams): Promise<{
|
|
1707
1774
|
product: SubscriptionProductDetail;
|
|
1775
|
+
warnings?: Notice[];
|
|
1708
1776
|
}>;
|
|
1709
1777
|
/**
|
|
1710
1778
|
* Publish a subscription product's test version to production.
|
|
@@ -1717,6 +1785,7 @@ declare class SubscriptionProductsResource {
|
|
|
1717
1785
|
*/
|
|
1718
1786
|
publish(params: PublishSubscriptionProductParams): Promise<{
|
|
1719
1787
|
product: SubscriptionProductDetail;
|
|
1788
|
+
warnings?: Notice[];
|
|
1720
1789
|
}>;
|
|
1721
1790
|
/**
|
|
1722
1791
|
* Update a subscription product's status (active/inactive).
|
|
@@ -1732,6 +1801,7 @@ declare class SubscriptionProductsResource {
|
|
|
1732
1801
|
*/
|
|
1733
1802
|
updateStatus(params: UpdateSubscriptionStatusParams): Promise<{
|
|
1734
1803
|
product: SubscriptionProductDetail;
|
|
1804
|
+
warnings?: Notice[];
|
|
1735
1805
|
}>;
|
|
1736
1806
|
}
|
|
1737
1807
|
|
|
@@ -1793,6 +1863,7 @@ declare class WebhooksResource {
|
|
|
1793
1863
|
*/
|
|
1794
1864
|
add(params: AddWebhookParams): Promise<{
|
|
1795
1865
|
webhook: StoreWebhook;
|
|
1866
|
+
warnings?: Notice[];
|
|
1796
1867
|
}>;
|
|
1797
1868
|
/**
|
|
1798
1869
|
* Update an existing webhook (only `url`, `events`, and `secret` are mutable).
|
|
@@ -1812,6 +1883,7 @@ declare class WebhooksResource {
|
|
|
1812
1883
|
*/
|
|
1813
1884
|
update(params: UpdateWebhookParams): Promise<{
|
|
1814
1885
|
webhook: StoreWebhook;
|
|
1886
|
+
warnings?: Notice[];
|
|
1815
1887
|
}>;
|
|
1816
1888
|
/**
|
|
1817
1889
|
* Hard-delete a webhook. Historical `webhook_deliveries` rows are retained
|
|
@@ -1825,6 +1897,7 @@ declare class WebhooksResource {
|
|
|
1825
1897
|
*/
|
|
1826
1898
|
remove(params: RemoveWebhookParams): Promise<{
|
|
1827
1899
|
webhook: StoreWebhook;
|
|
1900
|
+
warnings?: Notice[];
|
|
1828
1901
|
}>;
|
|
1829
1902
|
/**
|
|
1830
1903
|
* Verify and parse an incoming webhook event.
|
|
@@ -2017,4 +2090,4 @@ declare class WaffoPancakeError extends Error {
|
|
|
2017
2090
|
*/
|
|
2018
2091
|
declare function verifyWebhook<T = Record<string, unknown>>(payload: string, signatureHeader: string | undefined | null, options?: VerifyWebhookOptions): WebhookEvent<T>;
|
|
2019
2092
|
|
|
2020
|
-
export { type AddMerchantParams, type AddMerchantResult, type AddWebhookParams, type AnonymousCheckoutParams, type ApiError, type
|
|
2093
|
+
export { type AddMerchantParams, type AddMerchantResult, type AddWebhookParams, type AnonymousCheckoutParams, type ApiError, type AuthenticatedCheckoutParams, type AuthenticatedCheckoutResult, type BillingDetail, BillingPeriod, type CancelOnetimeOrderParams, type CancelOnetimeOrderResult, type CancelSubscriptionParams, type CancelSubscriptionResult, type CheckoutSessionResult, type CheckoutSettings, type CheckoutThemeSettings, type CreateCheckoutSessionParams, type CreateOnetimeProductParams, type CreateRefundTicketParams, type CreateStoreParams, type CreateSubscriptionProductGroupParams, type CreateSubscriptionProductParams, type DeleteStoreParams, type DeleteSubscriptionProductGroupParams, EntityStatus, type Envelope, Environment, ErrorLayer, type GraphQLParams, type GraphQLResponse, type GroupRules, type IssueSessionTokenParams, type MediaItem, MediaType, type Notice, type NotificationSettings, OnetimeOrderStatus, type OnetimeProductDetail, PaymentStatus, type PostResult, type PriceInfo, type Prices, ProductVersionStatus, type PublishOnetimeProductParams, type PublishSubscriptionProductGroupParams, type PublishSubscriptionProductParams, type ReactivateSubscriptionParams, type ReactivateSubscriptionResult, RefundStatus, type RefundTicket, RefundTicketStatus, type RefundTicketVersionData, type RemoveMerchantParams, type RemoveMerchantResult, type RemoveWebhookParams, type RequestedAmount, type ResubmitRefundTicketParams, type SessionToken, type Store, StoreRole, type StoreWebhook, SubscriptionOrderStatus, type SubscriptionProductDetail, type SubscriptionProductGroup, TaxCategory, type UpdateOnetimeProductParams, type UpdateOnetimeStatusParams, type UpdateRoleParams, type UpdateRoleResult, type UpdateStoreParams, type UpdateSubscriptionProductGroupParams, type UpdateSubscriptionProductParams, type UpdateSubscriptionStatusParams, type UpdateWebhookParams, type VerifyWebhookOptions, WaffoPancake, type WaffoPancakeConfig, WaffoPancakeError, type WebhookChannel, type WebhookEvent, type WebhookEventData, WebhookEventType, type WebhookPublicKeys, verifyWebhook };
|