@indietabletop/appkit 3.6.0-0 → 3.6.0-1
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/lib/client.ts +7 -4
- package/package.json +1 -1
package/lib/client.ts
CHANGED
|
@@ -337,16 +337,19 @@ export class IndieTabletopClient {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
async redeemPledge(id: string) {
|
|
340
|
+
async redeemPledge(campaignCode: string, id: string) {
|
|
341
341
|
return await this.fetch(
|
|
342
|
-
`/v1/redemptions/
|
|
342
|
+
`/v1/redemptions/${campaignCode}/pledges/${id}`,
|
|
343
343
|
redeemedPledge(),
|
|
344
344
|
);
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
async subscribeToNewsletterByPledgeId(
|
|
347
|
+
async subscribeToNewsletterByPledgeId(
|
|
348
|
+
newsletterCode: string,
|
|
349
|
+
pledgeId: string,
|
|
350
|
+
) {
|
|
348
351
|
return await this.fetch(
|
|
349
|
-
`/v1/newsletters/
|
|
352
|
+
`/v1/newsletters/${newsletterCode}/subscriptions`,
|
|
350
353
|
object({ message: string() }),
|
|
351
354
|
{ method: "POST", json: { pledgeId, type: "PLEDGE" } },
|
|
352
355
|
);
|