@waffo/pancake-ts 0.6.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 +50 -0
- package/README.md +32 -4
- package/dist/index.cjs +114 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +134 -55
- package/dist/index.d.ts +134 -55
- 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
|
|
@@ -253,8 +275,8 @@ interface StoreWebhook {
|
|
|
253
275
|
channel: WebhookChannel;
|
|
254
276
|
/** Target webhook URL */
|
|
255
277
|
url: string;
|
|
256
|
-
/** Subscribed event types (
|
|
257
|
-
events:
|
|
278
|
+
/** Subscribed event types (use `WebhookEventType` enum or its string literal) */
|
|
279
|
+
events: `${WebhookEventType}`[];
|
|
258
280
|
/** Whether this webhook fires in test or prod environment */
|
|
259
281
|
testMode: boolean;
|
|
260
282
|
/** Channel-specific credential (e.g. Telegram chat_id) */
|
|
@@ -269,8 +291,8 @@ interface AddWebhookParams {
|
|
|
269
291
|
channel: WebhookChannel;
|
|
270
292
|
/** Target webhook URL */
|
|
271
293
|
url: string;
|
|
272
|
-
/** Subscribed event types */
|
|
273
|
-
events:
|
|
294
|
+
/** Subscribed event types (use `WebhookEventType` enum or its string literal) */
|
|
295
|
+
events: `${WebhookEventType}`[];
|
|
274
296
|
/** Whether this webhook fires in test (true) or prod (false) */
|
|
275
297
|
testMode: boolean;
|
|
276
298
|
/** Channel-specific credential (e.g. Telegram chat_id) */
|
|
@@ -282,8 +304,8 @@ interface UpdateWebhookParams {
|
|
|
282
304
|
id: string;
|
|
283
305
|
/** Replace target URL (must remain on the same channel host) */
|
|
284
306
|
url?: string;
|
|
285
|
-
/** Replace subscribed event types */
|
|
286
|
-
events?:
|
|
307
|
+
/** Replace subscribed event types (use `WebhookEventType` enum or its string literal) */
|
|
308
|
+
events?: `${WebhookEventType}`[];
|
|
287
309
|
/** Replace channel-specific credential */
|
|
288
310
|
secret?: string | null;
|
|
289
311
|
}
|
|
@@ -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<{
|
|
@@ -885,7 +911,11 @@ interface GraphQLResponse<T = Record<string, unknown>> {
|
|
|
885
911
|
column: number;
|
|
886
912
|
}>;
|
|
887
913
|
path?: string[];
|
|
914
|
+
aiHint?: string;
|
|
915
|
+
/** Service stage that produced the error ("graphql", "gateway"). Resolver errors omit it. */
|
|
916
|
+
layer?: string;
|
|
888
917
|
}>;
|
|
918
|
+
warnings?: Notice[];
|
|
889
919
|
}
|
|
890
920
|
/**
|
|
891
921
|
* Webhook event types.
|
|
@@ -1053,10 +1083,16 @@ interface VerifyWebhookOptions {
|
|
|
1053
1083
|
}
|
|
1054
1084
|
|
|
1055
1085
|
/**
|
|
1056
|
-
* Internal HTTP client that auto-signs requests
|
|
1086
|
+
* Internal HTTP client that auto-signs requests.
|
|
1087
|
+
*
|
|
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`.
|
|
1057
1093
|
*
|
|
1058
|
-
* The `X-Merchant-Id` header is sent in `MER_{base62}` format as provided
|
|
1059
|
-
* The gateway decodes it to a raw UUID before forwarding
|
|
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.
|
|
1060
1096
|
*
|
|
1061
1097
|
* Not exported publicly — used by resource classes via {@link WaffoPancake}.
|
|
1062
1098
|
*/
|
|
@@ -1067,23 +1103,24 @@ declare class HttpClient {
|
|
|
1067
1103
|
private readonly _fetch;
|
|
1068
1104
|
constructor(config: WaffoPancakeConfig);
|
|
1069
1105
|
/**
|
|
1070
|
-
* Send a signed POST
|
|
1106
|
+
* Send a signed POST and return the full envelope plus HTTP status.
|
|
1071
1107
|
*
|
|
1072
1108
|
* Behavior:
|
|
1073
|
-
* -
|
|
1074
|
-
* -
|
|
1075
|
-
*
|
|
1076
|
-
* -
|
|
1077
|
-
*
|
|
1078
|
-
*
|
|
1079
|
-
* @
|
|
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`)
|
|
1080
1118
|
* @param body - Request body object
|
|
1081
1119
|
* @param options - Optional settings
|
|
1082
|
-
* @
|
|
1083
|
-
* @
|
|
1084
|
-
* @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
|
|
1085
1122
|
*/
|
|
1086
|
-
post<T>(path: string, body: object, options?: PostOptions): Promise<T
|
|
1123
|
+
post<T>(path: string, body: object, options?: PostOptions): Promise<PostResult<T>>;
|
|
1087
1124
|
}
|
|
1088
1125
|
|
|
1089
1126
|
/** Authentication resource — issue session tokens for buyers. */
|
|
@@ -1110,14 +1147,18 @@ declare class AuthResource {
|
|
|
1110
1147
|
* buyerIdentity: "customer@example.com",
|
|
1111
1148
|
* });
|
|
1112
1149
|
*/
|
|
1113
|
-
issueSessionToken(params: IssueSessionTokenParams): Promise<SessionToken
|
|
1150
|
+
issueSessionToken(params: IssueSessionTokenParams): Promise<SessionToken & {
|
|
1151
|
+
warnings?: Notice[];
|
|
1152
|
+
}>;
|
|
1114
1153
|
}
|
|
1115
1154
|
|
|
1116
1155
|
/**
|
|
1117
1156
|
* Internal HTTP client for buyer-side requests using Bearer token authentication.
|
|
1118
1157
|
*
|
|
1119
1158
|
* Unlike {@link HttpClient} which signs requests with RSA-SHA256 (API Key auth),
|
|
1120
|
-
* 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).
|
|
1121
1162
|
*
|
|
1122
1163
|
* Not exported publicly — used internally by {@link BuyerSession}.
|
|
1123
1164
|
*/
|
|
@@ -1127,14 +1168,12 @@ declare class BuyerHttpClient {
|
|
|
1127
1168
|
private readonly _fetch;
|
|
1128
1169
|
constructor(token: string, config: Pick<WaffoPancakeConfig, "baseUrl" | "fetch">);
|
|
1129
1170
|
/**
|
|
1130
|
-
* Send a Bearer-authenticated POST
|
|
1171
|
+
* Send a Bearer-authenticated POST and return the full envelope plus HTTP status.
|
|
1131
1172
|
*
|
|
1132
|
-
*
|
|
1133
|
-
* @
|
|
1134
|
-
* @returns Parsed `data` field from the response
|
|
1135
|
-
* @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.
|
|
1136
1175
|
*/
|
|
1137
|
-
post<T>(path: string, body: object): Promise<T
|
|
1176
|
+
post<T>(path: string, body: object): Promise<PostResult<T>>;
|
|
1138
1177
|
}
|
|
1139
1178
|
|
|
1140
1179
|
/**
|
|
@@ -1166,7 +1205,9 @@ declare class BuyerSession {
|
|
|
1166
1205
|
* const { orderId, status } = await buyer.cancelSubscription({ orderId: "ORD_xxx" });
|
|
1167
1206
|
* // status: "canceled" (was pending) or "canceling" (was active)
|
|
1168
1207
|
*/
|
|
1169
|
-
cancelSubscription(params: CancelSubscriptionParams): Promise<CancelSubscriptionResult
|
|
1208
|
+
cancelSubscription(params: CancelSubscriptionParams): Promise<CancelSubscriptionResult & {
|
|
1209
|
+
warnings?: Notice[];
|
|
1210
|
+
}>;
|
|
1170
1211
|
/**
|
|
1171
1212
|
* Cancel a one-time order (only while payment is still pending).
|
|
1172
1213
|
*
|
|
@@ -1176,7 +1217,9 @@ declare class BuyerSession {
|
|
|
1176
1217
|
* @example
|
|
1177
1218
|
* const { orderId, status } = await buyer.cancelOnetimeOrder({ orderId: "ORD_xxx" });
|
|
1178
1219
|
*/
|
|
1179
|
-
cancelOnetimeOrder(params: CancelOnetimeOrderParams): Promise<CancelOnetimeOrderResult
|
|
1220
|
+
cancelOnetimeOrder(params: CancelOnetimeOrderParams): Promise<CancelOnetimeOrderResult & {
|
|
1221
|
+
warnings?: Notice[];
|
|
1222
|
+
}>;
|
|
1180
1223
|
/**
|
|
1181
1224
|
* Reactivate a subscription that is in `canceling` status.
|
|
1182
1225
|
*
|
|
@@ -1187,7 +1230,9 @@ declare class BuyerSession {
|
|
|
1187
1230
|
* const { orderId, status } = await buyer.reactivateSubscription({ orderId: "ORD_xxx" });
|
|
1188
1231
|
* // status: "active"
|
|
1189
1232
|
*/
|
|
1190
|
-
reactivateSubscription(params: ReactivateSubscriptionParams): Promise<ReactivateSubscriptionResult
|
|
1233
|
+
reactivateSubscription(params: ReactivateSubscriptionParams): Promise<ReactivateSubscriptionResult & {
|
|
1234
|
+
warnings?: Notice[];
|
|
1235
|
+
}>;
|
|
1191
1236
|
/**
|
|
1192
1237
|
* Submit a refund request for a payment.
|
|
1193
1238
|
*
|
|
@@ -1203,6 +1248,7 @@ declare class BuyerSession {
|
|
|
1203
1248
|
*/
|
|
1204
1249
|
createRefundTicket(params: CreateRefundTicketParams): Promise<{
|
|
1205
1250
|
ticket: RefundTicket;
|
|
1251
|
+
warnings?: Notice[];
|
|
1206
1252
|
}>;
|
|
1207
1253
|
/**
|
|
1208
1254
|
* Resubmit a previously rejected refund ticket with updated details.
|
|
@@ -1220,6 +1266,7 @@ declare class BuyerSession {
|
|
|
1220
1266
|
*/
|
|
1221
1267
|
resubmitRefundTicket(params: ResubmitRefundTicketParams): Promise<{
|
|
1222
1268
|
ticket: RefundTicket;
|
|
1269
|
+
warnings?: Notice[];
|
|
1223
1270
|
}>;
|
|
1224
1271
|
}
|
|
1225
1272
|
/**
|
|
@@ -1274,7 +1321,9 @@ declare class CheckoutAnonymousResource {
|
|
|
1274
1321
|
* billingDetail: { country: "US", isBusiness: false, postcode: "10001" },
|
|
1275
1322
|
* });
|
|
1276
1323
|
*/
|
|
1277
|
-
create(params: AnonymousCheckoutParams): Promise<CheckoutSessionResult
|
|
1324
|
+
create(params: AnonymousCheckoutParams): Promise<CheckoutSessionResult & {
|
|
1325
|
+
warnings?: Notice[];
|
|
1326
|
+
}>;
|
|
1278
1327
|
}
|
|
1279
1328
|
|
|
1280
1329
|
/**
|
|
@@ -1310,7 +1359,9 @@ declare class CheckoutAuthenticatedResource {
|
|
|
1310
1359
|
* });
|
|
1311
1360
|
* // Redirect to result.checkoutUrl (includes #token=...)
|
|
1312
1361
|
*/
|
|
1313
|
-
create(params: AuthenticatedCheckoutParams): Promise<AuthenticatedCheckoutResult
|
|
1362
|
+
create(params: AuthenticatedCheckoutParams): Promise<AuthenticatedCheckoutResult & {
|
|
1363
|
+
warnings?: Notice[];
|
|
1364
|
+
}>;
|
|
1314
1365
|
}
|
|
1315
1366
|
|
|
1316
1367
|
/**
|
|
@@ -1363,7 +1414,9 @@ declare class CheckoutResource {
|
|
|
1363
1414
|
* });
|
|
1364
1415
|
* // Redirect to session.checkoutUrl
|
|
1365
1416
|
*/
|
|
1366
|
-
createSession(params: CreateCheckoutSessionParams): Promise<CheckoutSessionResult
|
|
1417
|
+
createSession(params: CreateCheckoutSessionParams): Promise<CheckoutSessionResult & {
|
|
1418
|
+
warnings?: Notice[];
|
|
1419
|
+
}>;
|
|
1367
1420
|
}
|
|
1368
1421
|
|
|
1369
1422
|
/** GraphQL query resource (Query only, no Mutations). */
|
|
@@ -1410,6 +1463,7 @@ declare class OnetimeProductsResource {
|
|
|
1410
1463
|
*/
|
|
1411
1464
|
create(params: CreateOnetimeProductParams): Promise<{
|
|
1412
1465
|
product: OnetimeProductDetail;
|
|
1466
|
+
warnings?: Notice[];
|
|
1413
1467
|
}>;
|
|
1414
1468
|
/**
|
|
1415
1469
|
* Update a one-time product. Creates a new version; skips if unchanged.
|
|
@@ -1433,6 +1487,7 @@ declare class OnetimeProductsResource {
|
|
|
1433
1487
|
*/
|
|
1434
1488
|
update(params: UpdateOnetimeProductParams): Promise<{
|
|
1435
1489
|
product: OnetimeProductDetail;
|
|
1490
|
+
warnings?: Notice[];
|
|
1436
1491
|
}>;
|
|
1437
1492
|
/**
|
|
1438
1493
|
* Publish a one-time product's test version to production.
|
|
@@ -1445,6 +1500,7 @@ declare class OnetimeProductsResource {
|
|
|
1445
1500
|
*/
|
|
1446
1501
|
publish(params: PublishOnetimeProductParams): Promise<{
|
|
1447
1502
|
product: OnetimeProductDetail;
|
|
1503
|
+
warnings?: Notice[];
|
|
1448
1504
|
}>;
|
|
1449
1505
|
/**
|
|
1450
1506
|
* Update a one-time product's status (active/inactive).
|
|
@@ -1460,6 +1516,7 @@ declare class OnetimeProductsResource {
|
|
|
1460
1516
|
*/
|
|
1461
1517
|
updateStatus(params: UpdateOnetimeStatusParams): Promise<{
|
|
1462
1518
|
product: OnetimeProductDetail;
|
|
1519
|
+
warnings?: Notice[];
|
|
1463
1520
|
}>;
|
|
1464
1521
|
}
|
|
1465
1522
|
|
|
@@ -1482,7 +1539,9 @@ declare class OrdersResource {
|
|
|
1482
1539
|
* });
|
|
1483
1540
|
* // status: "canceled" or "canceling"
|
|
1484
1541
|
*/
|
|
1485
|
-
cancelSubscription(params: CancelSubscriptionParams): Promise<CancelSubscriptionResult
|
|
1542
|
+
cancelSubscription(params: CancelSubscriptionParams): Promise<CancelSubscriptionResult & {
|
|
1543
|
+
warnings?: Notice[];
|
|
1544
|
+
}>;
|
|
1486
1545
|
}
|
|
1487
1546
|
|
|
1488
1547
|
/** Store merchant management resource (coming soon — endpoints return 501). */
|
|
@@ -1502,7 +1561,9 @@ declare class StoreMerchantsResource {
|
|
|
1502
1561
|
* role: "admin",
|
|
1503
1562
|
* });
|
|
1504
1563
|
*/
|
|
1505
|
-
add(params: AddMerchantParams): Promise<AddMerchantResult
|
|
1564
|
+
add(params: AddMerchantParams): Promise<AddMerchantResult & {
|
|
1565
|
+
warnings?: Notice[];
|
|
1566
|
+
}>;
|
|
1506
1567
|
/**
|
|
1507
1568
|
* Remove a merchant from a store.
|
|
1508
1569
|
*
|
|
@@ -1515,7 +1576,9 @@ declare class StoreMerchantsResource {
|
|
|
1515
1576
|
* merchantId: "MER_xxx",
|
|
1516
1577
|
* });
|
|
1517
1578
|
*/
|
|
1518
|
-
remove(params: RemoveMerchantParams): Promise<RemoveMerchantResult
|
|
1579
|
+
remove(params: RemoveMerchantParams): Promise<RemoveMerchantResult & {
|
|
1580
|
+
warnings?: Notice[];
|
|
1581
|
+
}>;
|
|
1519
1582
|
/**
|
|
1520
1583
|
* Update a merchant's role in a store.
|
|
1521
1584
|
*
|
|
@@ -1529,7 +1592,9 @@ declare class StoreMerchantsResource {
|
|
|
1529
1592
|
* role: "member",
|
|
1530
1593
|
* });
|
|
1531
1594
|
*/
|
|
1532
|
-
updateRole(params: UpdateRoleParams): Promise<UpdateRoleResult
|
|
1595
|
+
updateRole(params: UpdateRoleParams): Promise<UpdateRoleResult & {
|
|
1596
|
+
warnings?: Notice[];
|
|
1597
|
+
}>;
|
|
1533
1598
|
}
|
|
1534
1599
|
|
|
1535
1600
|
/** Store management resource — create, update, and delete stores. */
|
|
@@ -1547,6 +1612,7 @@ declare class StoresResource {
|
|
|
1547
1612
|
*/
|
|
1548
1613
|
create(params: CreateStoreParams): Promise<{
|
|
1549
1614
|
store: Store;
|
|
1615
|
+
warnings?: Notice[];
|
|
1550
1616
|
}>;
|
|
1551
1617
|
/**
|
|
1552
1618
|
* Update an existing store's settings.
|
|
@@ -1578,6 +1644,7 @@ declare class StoresResource {
|
|
|
1578
1644
|
*/
|
|
1579
1645
|
update(params: UpdateStoreParams): Promise<{
|
|
1580
1646
|
store: Store;
|
|
1647
|
+
warnings?: Notice[];
|
|
1581
1648
|
}>;
|
|
1582
1649
|
/**
|
|
1583
1650
|
* Soft-delete a store. Only the owner can delete.
|
|
@@ -1590,6 +1657,7 @@ declare class StoresResource {
|
|
|
1590
1657
|
*/
|
|
1591
1658
|
delete(params: DeleteStoreParams): Promise<{
|
|
1592
1659
|
store: Store;
|
|
1660
|
+
warnings?: Notice[];
|
|
1593
1661
|
}>;
|
|
1594
1662
|
}
|
|
1595
1663
|
|
|
@@ -1613,6 +1681,7 @@ declare class SubscriptionProductGroupsResource {
|
|
|
1613
1681
|
*/
|
|
1614
1682
|
create(params: CreateSubscriptionProductGroupParams): Promise<{
|
|
1615
1683
|
group: SubscriptionProductGroup;
|
|
1684
|
+
warnings?: Notice[];
|
|
1616
1685
|
}>;
|
|
1617
1686
|
/**
|
|
1618
1687
|
* Update a subscription product group. `productIds` is a full replacement.
|
|
@@ -1628,6 +1697,7 @@ declare class SubscriptionProductGroupsResource {
|
|
|
1628
1697
|
*/
|
|
1629
1698
|
update(params: UpdateSubscriptionProductGroupParams): Promise<{
|
|
1630
1699
|
group: SubscriptionProductGroup;
|
|
1700
|
+
warnings?: Notice[];
|
|
1631
1701
|
}>;
|
|
1632
1702
|
/**
|
|
1633
1703
|
* Hard-delete a subscription product group.
|
|
@@ -1640,6 +1710,7 @@ declare class SubscriptionProductGroupsResource {
|
|
|
1640
1710
|
*/
|
|
1641
1711
|
delete(params: DeleteSubscriptionProductGroupParams): Promise<{
|
|
1642
1712
|
group: SubscriptionProductGroup;
|
|
1713
|
+
warnings?: Notice[];
|
|
1643
1714
|
}>;
|
|
1644
1715
|
/**
|
|
1645
1716
|
* Publish a test-environment group to production (upsert).
|
|
@@ -1652,6 +1723,7 @@ declare class SubscriptionProductGroupsResource {
|
|
|
1652
1723
|
*/
|
|
1653
1724
|
publish(params: PublishSubscriptionProductGroupParams): Promise<{
|
|
1654
1725
|
group: SubscriptionProductGroup;
|
|
1726
|
+
warnings?: Notice[];
|
|
1655
1727
|
}>;
|
|
1656
1728
|
}
|
|
1657
1729
|
|
|
@@ -1675,6 +1747,7 @@ declare class SubscriptionProductsResource {
|
|
|
1675
1747
|
*/
|
|
1676
1748
|
create(params: CreateSubscriptionProductParams): Promise<{
|
|
1677
1749
|
product: SubscriptionProductDetail;
|
|
1750
|
+
warnings?: Notice[];
|
|
1678
1751
|
}>;
|
|
1679
1752
|
/**
|
|
1680
1753
|
* Update a subscription product. Creates a new version; skips if unchanged.
|
|
@@ -1699,6 +1772,7 @@ declare class SubscriptionProductsResource {
|
|
|
1699
1772
|
*/
|
|
1700
1773
|
update(params: UpdateSubscriptionProductParams): Promise<{
|
|
1701
1774
|
product: SubscriptionProductDetail;
|
|
1775
|
+
warnings?: Notice[];
|
|
1702
1776
|
}>;
|
|
1703
1777
|
/**
|
|
1704
1778
|
* Publish a subscription product's test version to production.
|
|
@@ -1711,6 +1785,7 @@ declare class SubscriptionProductsResource {
|
|
|
1711
1785
|
*/
|
|
1712
1786
|
publish(params: PublishSubscriptionProductParams): Promise<{
|
|
1713
1787
|
product: SubscriptionProductDetail;
|
|
1788
|
+
warnings?: Notice[];
|
|
1714
1789
|
}>;
|
|
1715
1790
|
/**
|
|
1716
1791
|
* Update a subscription product's status (active/inactive).
|
|
@@ -1726,6 +1801,7 @@ declare class SubscriptionProductsResource {
|
|
|
1726
1801
|
*/
|
|
1727
1802
|
updateStatus(params: UpdateSubscriptionStatusParams): Promise<{
|
|
1728
1803
|
product: SubscriptionProductDetail;
|
|
1804
|
+
warnings?: Notice[];
|
|
1729
1805
|
}>;
|
|
1730
1806
|
}
|
|
1731
1807
|
|
|
@@ -1787,6 +1863,7 @@ declare class WebhooksResource {
|
|
|
1787
1863
|
*/
|
|
1788
1864
|
add(params: AddWebhookParams): Promise<{
|
|
1789
1865
|
webhook: StoreWebhook;
|
|
1866
|
+
warnings?: Notice[];
|
|
1790
1867
|
}>;
|
|
1791
1868
|
/**
|
|
1792
1869
|
* Update an existing webhook (only `url`, `events`, and `secret` are mutable).
|
|
@@ -1806,6 +1883,7 @@ declare class WebhooksResource {
|
|
|
1806
1883
|
*/
|
|
1807
1884
|
update(params: UpdateWebhookParams): Promise<{
|
|
1808
1885
|
webhook: StoreWebhook;
|
|
1886
|
+
warnings?: Notice[];
|
|
1809
1887
|
}>;
|
|
1810
1888
|
/**
|
|
1811
1889
|
* Hard-delete a webhook. Historical `webhook_deliveries` rows are retained
|
|
@@ -1819,6 +1897,7 @@ declare class WebhooksResource {
|
|
|
1819
1897
|
*/
|
|
1820
1898
|
remove(params: RemoveWebhookParams): Promise<{
|
|
1821
1899
|
webhook: StoreWebhook;
|
|
1900
|
+
warnings?: Notice[];
|
|
1822
1901
|
}>;
|
|
1823
1902
|
/**
|
|
1824
1903
|
* Verify and parse an incoming webhook event.
|
|
@@ -2011,4 +2090,4 @@ declare class WaffoPancakeError extends Error {
|
|
|
2011
2090
|
*/
|
|
2012
2091
|
declare function verifyWebhook<T = Record<string, unknown>>(payload: string, signatureHeader: string | undefined | null, options?: VerifyWebhookOptions): WebhookEvent<T>;
|
|
2013
2092
|
|
|
2014
|
-
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 };
|