@rechargeapps/storefront-client 1.65.0 → 1.67.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/cjs/api/auth.js +1 -1
- package/dist/cjs/api/bundleData.js +1 -1
- package/dist/cjs/api/charge.js +15 -0
- package/dist/cjs/api/charge.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/request.js +1 -1
- package/dist/esm/api/auth.js +1 -1
- package/dist/esm/api/bundleData.js +1 -1
- package/dist/esm/api/charge.js +15 -1
- package/dist/esm/api/charge.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/utils/request.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/umd/recharge-client.min.js +7 -7
- package/package.json +1 -1
package/dist/cjs/api/auth.js
CHANGED
|
@@ -181,7 +181,7 @@ async function rechargeAdminRequest(method, url, { id, query, data, headers } =
|
|
|
181
181
|
...storefrontAccessToken ? { "X-Recharge-Storefront-Access-Token": storefrontAccessToken } : {},
|
|
182
182
|
...appName ? { "X-Recharge-Sdk-App-Name": appName } : {},
|
|
183
183
|
...appVersion ? { "X-Recharge-Sdk-App-Version": appVersion } : {},
|
|
184
|
-
"X-Recharge-Sdk-Version": "1.
|
|
184
|
+
"X-Recharge-Sdk-Version": "1.67.0",
|
|
185
185
|
...headers ? headers : {}
|
|
186
186
|
};
|
|
187
187
|
return request.request(method, `${rechargeBaseUrl}${url}`, { id, query, data, headers: reqHeaders });
|
|
@@ -15,7 +15,7 @@ async function loadFromOnlineStore(id, country_code) {
|
|
|
15
15
|
const { appName, appVersion } = options.getOptions();
|
|
16
16
|
const headers = {
|
|
17
17
|
"X-Recharge-Sdk-Fn": "loadFromOnlineStore",
|
|
18
|
-
"X-Recharge-Sdk-Version": "1.
|
|
18
|
+
"X-Recharge-Sdk-Version": "1.67.0",
|
|
19
19
|
...appName ? { "X-Recharge-Sdk-App-Name": appName } : {},
|
|
20
20
|
...appVersion ? { "X-Recharge-Sdk-App-Version": appVersion } : {}
|
|
21
21
|
};
|
package/dist/cjs/api/charge.js
CHANGED
|
@@ -100,12 +100,27 @@ async function processCharge(session, id) {
|
|
|
100
100
|
);
|
|
101
101
|
return charge;
|
|
102
102
|
}
|
|
103
|
+
async function rescheduleCharge(session, id, date) {
|
|
104
|
+
if (id === void 0 || id === "") {
|
|
105
|
+
throw new Error("ID is required");
|
|
106
|
+
}
|
|
107
|
+
const { charge } = await request.rechargeApiRequest(
|
|
108
|
+
"post",
|
|
109
|
+
`/charges/${id}/change_next_charge_date`,
|
|
110
|
+
{
|
|
111
|
+
data: { next_charge_date: date }
|
|
112
|
+
},
|
|
113
|
+
request.getInternalSession(session, "rescheduleCharge")
|
|
114
|
+
);
|
|
115
|
+
return charge;
|
|
116
|
+
}
|
|
103
117
|
|
|
104
118
|
exports.applyDiscountToCharge = applyDiscountToCharge;
|
|
105
119
|
exports.getCharge = getCharge;
|
|
106
120
|
exports.listCharges = listCharges;
|
|
107
121
|
exports.processCharge = processCharge;
|
|
108
122
|
exports.removeDiscountsFromCharge = removeDiscountsFromCharge;
|
|
123
|
+
exports.rescheduleCharge = rescheduleCharge;
|
|
109
124
|
exports.skipCharge = skipCharge;
|
|
110
125
|
exports.unskipCharge = unskipCharge;
|
|
111
126
|
//# sourceMappingURL=charge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charge.js","sources":["../../../src/api/charge.ts"],"sourcesContent":["import {\n ChargeListParams,\n ChargeListResponse,\n ChargeResponse,\n GetChargeOptions,\n Session,\n SkipChargeParams,\n} from '../types';\nimport { getInternalSession, rechargeApiRequest } from '../utils/request';\n\n/* Retrieve a Charge using the charge_id. */\nexport async function getCharge(session: Session, id: number | string, options?: GetChargeOptions) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'get',\n `/charges`,\n { id, query: { include: options?.include } },\n getInternalSession(session, 'getCharge')\n );\n return charge;\n}\n\n/** Lists charges */\nexport function listCharges(session: Session, query?: ChargeListParams) {\n return rechargeApiRequest<ChargeListResponse>(\n 'get',\n `/charges`,\n { query },\n getInternalSession(session, 'listCharges')\n );\n}\n\n/**\n * You cannot add a Discount to an existing queued Charge if the Charge or the associated Address already has one.\n * If a Charge has a Discount and it gets updated, or a regeneration occurs, the Discount will be lost. Regeneration is a process that refreshes the Charge JSON with new data in the case of the Subscription or Address being updated.\n */\nexport async function applyDiscountToCharge(session: Session, id: number | string, discountCode: string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/apply_discount`,\n {\n data: { discount_code: discountCode },\n },\n getInternalSession(session, 'applyDiscountToCharge')\n );\n return charge;\n}\n\n/**\n * Remove all Discounts from a Charge without destroying the Discount.\n * In most cases the Discount should be removed from the Address. When the Discount is removed from the Address, the Discount is also removed from any future Charges.\n * If the Discount is on the parent Address, you cannot remove it using charge_id.\n * When removing your Discount, it is preferable to pass the address_id so that the Discount stays removed if the Charge is regenerated. Only pass charge_id in edge cases in which there are two or more Charges on a parent Address and you only want to remove the Discount from one Charge.\n * If you pass both parameters, it will remove the Discount from the Address.\n */\nexport async function removeDiscountsFromCharge(session: Session, id: number | string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/remove_discount`,\n {},\n getInternalSession(session, 'removeDiscountsFromCharge')\n );\n return charge;\n}\n\n/* Skip a Charge. */\nexport async function skipCharge(\n session: Session,\n id: number | string,\n purchaseItemIds: (string | number)[],\n query?: SkipChargeParams\n) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n if (purchaseItemIds === undefined || purchaseItemIds.length === 0) {\n throw new Error('Purchase item IDs are required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/skip`,\n {\n query,\n data: {\n purchase_item_ids: purchaseItemIds.map(id => Number(id)),\n },\n },\n getInternalSession(session, 'skipCharge')\n );\n return charge;\n}\n\n/* Unskip a Charge. */\nexport async function unskipCharge(\n session: Session,\n id: number | string,\n purchaseItemIds: (string | number)[],\n query?: SkipChargeParams\n) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n if (purchaseItemIds === undefined || purchaseItemIds.length === 0) {\n throw new Error('Purchase item IDs are required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/unskip`,\n {\n query,\n data: {\n purchase_item_ids: purchaseItemIds.map(id => Number(id)),\n },\n },\n getInternalSession(session, 'unskipCharge')\n );\n return charge;\n}\n\n/* Process a Charge. */\nexport async function processCharge(session: Session, id: number | string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/process`,\n {},\n getInternalSession(session, 'processCharge')\n );\n return charge;\n}\n"],"names":["rechargeApiRequest","getInternalSession","id"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"charge.js","sources":["../../../src/api/charge.ts"],"sourcesContent":["import {\n ChargeListParams,\n ChargeListResponse,\n ChargeResponse,\n GetChargeOptions,\n IsoDateString,\n Session,\n SkipChargeParams,\n} from '../types';\nimport { getInternalSession, rechargeApiRequest } from '../utils/request';\n\n/* Retrieve a Charge using the charge_id. */\nexport async function getCharge(session: Session, id: number | string, options?: GetChargeOptions) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'get',\n `/charges`,\n { id, query: { include: options?.include } },\n getInternalSession(session, 'getCharge')\n );\n return charge;\n}\n\n/** Lists charges */\nexport function listCharges(session: Session, query?: ChargeListParams) {\n return rechargeApiRequest<ChargeListResponse>(\n 'get',\n `/charges`,\n { query },\n getInternalSession(session, 'listCharges')\n );\n}\n\n/**\n * You cannot add a Discount to an existing queued Charge if the Charge or the associated Address already has one.\n * If a Charge has a Discount and it gets updated, or a regeneration occurs, the Discount will be lost. Regeneration is a process that refreshes the Charge JSON with new data in the case of the Subscription or Address being updated.\n */\nexport async function applyDiscountToCharge(session: Session, id: number | string, discountCode: string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/apply_discount`,\n {\n data: { discount_code: discountCode },\n },\n getInternalSession(session, 'applyDiscountToCharge')\n );\n return charge;\n}\n\n/**\n * Remove all Discounts from a Charge without destroying the Discount.\n * In most cases the Discount should be removed from the Address. When the Discount is removed from the Address, the Discount is also removed from any future Charges.\n * If the Discount is on the parent Address, you cannot remove it using charge_id.\n * When removing your Discount, it is preferable to pass the address_id so that the Discount stays removed if the Charge is regenerated. Only pass charge_id in edge cases in which there are two or more Charges on a parent Address and you only want to remove the Discount from one Charge.\n * If you pass both parameters, it will remove the Discount from the Address.\n */\nexport async function removeDiscountsFromCharge(session: Session, id: number | string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/remove_discount`,\n {},\n getInternalSession(session, 'removeDiscountsFromCharge')\n );\n return charge;\n}\n\n/* Skip a Charge. */\nexport async function skipCharge(\n session: Session,\n id: number | string,\n purchaseItemIds: (string | number)[],\n query?: SkipChargeParams\n) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n if (purchaseItemIds === undefined || purchaseItemIds.length === 0) {\n throw new Error('Purchase item IDs are required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/skip`,\n {\n query,\n data: {\n purchase_item_ids: purchaseItemIds.map(id => Number(id)),\n },\n },\n getInternalSession(session, 'skipCharge')\n );\n return charge;\n}\n\n/* Unskip a Charge. */\nexport async function unskipCharge(\n session: Session,\n id: number | string,\n purchaseItemIds: (string | number)[],\n query?: SkipChargeParams\n) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n if (purchaseItemIds === undefined || purchaseItemIds.length === 0) {\n throw new Error('Purchase item IDs are required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/unskip`,\n {\n query,\n data: {\n purchase_item_ids: purchaseItemIds.map(id => Number(id)),\n },\n },\n getInternalSession(session, 'unskipCharge')\n );\n return charge;\n}\n\n/* Process a Charge. */\nexport async function processCharge(session: Session, id: number | string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/process`,\n {},\n getInternalSession(session, 'processCharge')\n );\n return charge;\n}\n\n/* Reschedule all items associated with a Charge. */\nexport async function rescheduleCharge(session: Session, id: number | string, date: IsoDateString) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/change_next_charge_date`,\n {\n data: { next_charge_date: date },\n },\n getInternalSession(session, 'rescheduleCharge')\n );\n return charge;\n}\n"],"names":["rechargeApiRequest","getInternalSession","id"],"mappings":";;;;AAYsB,eAAA,SAAA,CAAU,OAAkB,EAAA,EAAA,EAAqB,OAA4B,EAAA;AACjG,EAAI,IAAA,EAAA,KAAO,KAAa,CAAA,IAAA,EAAA,KAAO,EAAI,EAAA;AACjC,IAAM,MAAA,IAAI,MAAM,gBAAgB,CAAA,CAAA;AAAA,GAClC;AACA,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,MAAMA,0BAAA;AAAA,IACvB,KAAA;AAAA,IACA,CAAA,QAAA,CAAA;AAAA,IACA,EAAE,EAAI,EAAA,KAAA,EAAO,EAAE,OAAS,EAAA,OAAA,EAAS,SAAU,EAAA;AAAA,IAC3CC,0BAAA,CAAmB,SAAS,WAAW,CAAA;AAAA,GACzC,CAAA;AACA,EAAO,OAAA,MAAA,CAAA;AACT,CAAA;AAGgB,SAAA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AC,CAAA;AAAA,OACzD;AAAA,KACF;AAAA,IACAD,0BAAA,CAAmB,SAAS,cAAc,CAAA;AAAA,GAC5C,CAAA;AACA,EAAO,OAAA,MAAA,CAAA;AACT,CAAA;AAGsB,eAAA,aAAA,CAAc,SAAkB,EAAqB,EAAA;AACzE,EAAI,IAAA,EAAA,KAAO,KAAa,CAAA,IAAA,EAAA,KAAO,EAAI,EAAA;AACjC,IAAM,MAAA,IAAI,MAAM,gBAAgB,CAAA,CAAA;AAAA,GAClC;AACA,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,MAAMD,0BAAA;AAAA,IACvB,MAAA;AAAA,IACA,YAAY,EAAE,CAAA,QAAA,CAAA;AAAA,IACd,EAAC;AAAA,IACDC,0BAAA,CAAmB,SAAS,eAAe,CAAA;AAAA,GAC7C,CAAA;AACA,EAAO,OAAA,MAAA,CAAA;AACT,CAAA;AAGsB,eAAA,gBAAA,CAAiB,OAAkB,EAAA,EAAA,EAAqB,IAAqB,EAAA;AACjG,EAAI,IAAA,EAAA,KAAO,KAAa,CAAA,IAAA,EAAA,KAAO,EAAI,EAAA;AACjC,IAAM,MAAA,IAAI,MAAM,gBAAgB,CAAA,CAAA;AAAA,GAClC;AACA,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,MAAMD,0BAAA;AAAA,IACvB,MAAA;AAAA,IACA,YAAY,EAAE,CAAA,wBAAA,CAAA;AAAA,IACd;AAAA,MACE,IAAA,EAAM,EAAE,gBAAA,EAAkB,IAAK,EAAA;AAAA,KACjC;AAAA,IACAC,0BAAA,CAAmB,SAAS,kBAAkB,CAAA;AAAA,GAChD,CAAA;AACA,EAAO,OAAA,MAAA,CAAA;AACT;;;;;;;;;;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -69,6 +69,7 @@ exports.getCharge = charge.getCharge;
|
|
|
69
69
|
exports.listCharges = charge.listCharges;
|
|
70
70
|
exports.processCharge = charge.processCharge;
|
|
71
71
|
exports.removeDiscountsFromCharge = charge.removeDiscountsFromCharge;
|
|
72
|
+
exports.rescheduleCharge = charge.rescheduleCharge;
|
|
72
73
|
exports.skipCharge = charge.skipCharge;
|
|
73
74
|
exports.unskipCharge = charge.unskipCharge;
|
|
74
75
|
exports.getCollection = collection.getCollection;
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -49,7 +49,7 @@ async function rechargeApiRequest(method, url, { id, query, data, headers } = {}
|
|
|
49
49
|
"X-Recharge-Sdk-Fn": session.internalFnCall,
|
|
50
50
|
...appName ? { "X-Recharge-Sdk-App-Name": appName } : {},
|
|
51
51
|
...appVersion ? { "X-Recharge-Sdk-App-Version": appVersion } : {},
|
|
52
|
-
"X-Recharge-Sdk-Version": "1.
|
|
52
|
+
"X-Recharge-Sdk-Version": "1.67.0",
|
|
53
53
|
"X-Request-Id": session.internalRequestId,
|
|
54
54
|
...session.tmp_fn_identifier ? { "X-Recharge-Sdk-Fn-Identifier": session.tmp_fn_identifier } : {},
|
|
55
55
|
...headers ? headers : {}
|
package/dist/esm/api/auth.js
CHANGED
|
@@ -179,7 +179,7 @@ async function rechargeAdminRequest(method, url, { id, query, data, headers } =
|
|
|
179
179
|
...storefrontAccessToken ? { "X-Recharge-Storefront-Access-Token": storefrontAccessToken } : {},
|
|
180
180
|
...appName ? { "X-Recharge-Sdk-App-Name": appName } : {},
|
|
181
181
|
...appVersion ? { "X-Recharge-Sdk-App-Version": appVersion } : {},
|
|
182
|
-
"X-Recharge-Sdk-Version": "1.
|
|
182
|
+
"X-Recharge-Sdk-Version": "1.67.0",
|
|
183
183
|
...headers ? headers : {}
|
|
184
184
|
};
|
|
185
185
|
return request(method, `${rechargeBaseUrl}${url}`, { id, query, data, headers: reqHeaders });
|
|
@@ -13,7 +13,7 @@ async function loadFromOnlineStore(id, country_code) {
|
|
|
13
13
|
const { appName, appVersion } = getOptions();
|
|
14
14
|
const headers = {
|
|
15
15
|
"X-Recharge-Sdk-Fn": "loadFromOnlineStore",
|
|
16
|
-
"X-Recharge-Sdk-Version": "1.
|
|
16
|
+
"X-Recharge-Sdk-Version": "1.67.0",
|
|
17
17
|
...appName ? { "X-Recharge-Sdk-App-Name": appName } : {},
|
|
18
18
|
...appVersion ? { "X-Recharge-Sdk-App-Version": appVersion } : {}
|
|
19
19
|
};
|
package/dist/esm/api/charge.js
CHANGED
|
@@ -98,6 +98,20 @@ async function processCharge(session, id) {
|
|
|
98
98
|
);
|
|
99
99
|
return charge;
|
|
100
100
|
}
|
|
101
|
+
async function rescheduleCharge(session, id, date) {
|
|
102
|
+
if (id === void 0 || id === "") {
|
|
103
|
+
throw new Error("ID is required");
|
|
104
|
+
}
|
|
105
|
+
const { charge } = await rechargeApiRequest(
|
|
106
|
+
"post",
|
|
107
|
+
`/charges/${id}/change_next_charge_date`,
|
|
108
|
+
{
|
|
109
|
+
data: { next_charge_date: date }
|
|
110
|
+
},
|
|
111
|
+
getInternalSession(session, "rescheduleCharge")
|
|
112
|
+
);
|
|
113
|
+
return charge;
|
|
114
|
+
}
|
|
101
115
|
|
|
102
|
-
export { applyDiscountToCharge, getCharge, listCharges, processCharge, removeDiscountsFromCharge, skipCharge, unskipCharge };
|
|
116
|
+
export { applyDiscountToCharge, getCharge, listCharges, processCharge, removeDiscountsFromCharge, rescheduleCharge, skipCharge, unskipCharge };
|
|
103
117
|
//# sourceMappingURL=charge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charge.js","sources":["../../../src/api/charge.ts"],"sourcesContent":["import {\n ChargeListParams,\n ChargeListResponse,\n ChargeResponse,\n GetChargeOptions,\n Session,\n SkipChargeParams,\n} from '../types';\nimport { getInternalSession, rechargeApiRequest } from '../utils/request';\n\n/* Retrieve a Charge using the charge_id. */\nexport async function getCharge(session: Session, id: number | string, options?: GetChargeOptions) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'get',\n `/charges`,\n { id, query: { include: options?.include } },\n getInternalSession(session, 'getCharge')\n );\n return charge;\n}\n\n/** Lists charges */\nexport function listCharges(session: Session, query?: ChargeListParams) {\n return rechargeApiRequest<ChargeListResponse>(\n 'get',\n `/charges`,\n { query },\n getInternalSession(session, 'listCharges')\n );\n}\n\n/**\n * You cannot add a Discount to an existing queued Charge if the Charge or the associated Address already has one.\n * If a Charge has a Discount and it gets updated, or a regeneration occurs, the Discount will be lost. Regeneration is a process that refreshes the Charge JSON with new data in the case of the Subscription or Address being updated.\n */\nexport async function applyDiscountToCharge(session: Session, id: number | string, discountCode: string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/apply_discount`,\n {\n data: { discount_code: discountCode },\n },\n getInternalSession(session, 'applyDiscountToCharge')\n );\n return charge;\n}\n\n/**\n * Remove all Discounts from a Charge without destroying the Discount.\n * In most cases the Discount should be removed from the Address. When the Discount is removed from the Address, the Discount is also removed from any future Charges.\n * If the Discount is on the parent Address, you cannot remove it using charge_id.\n * When removing your Discount, it is preferable to pass the address_id so that the Discount stays removed if the Charge is regenerated. Only pass charge_id in edge cases in which there are two or more Charges on a parent Address and you only want to remove the Discount from one Charge.\n * If you pass both parameters, it will remove the Discount from the Address.\n */\nexport async function removeDiscountsFromCharge(session: Session, id: number | string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/remove_discount`,\n {},\n getInternalSession(session, 'removeDiscountsFromCharge')\n );\n return charge;\n}\n\n/* Skip a Charge. */\nexport async function skipCharge(\n session: Session,\n id: number | string,\n purchaseItemIds: (string | number)[],\n query?: SkipChargeParams\n) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n if (purchaseItemIds === undefined || purchaseItemIds.length === 0) {\n throw new Error('Purchase item IDs are required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/skip`,\n {\n query,\n data: {\n purchase_item_ids: purchaseItemIds.map(id => Number(id)),\n },\n },\n getInternalSession(session, 'skipCharge')\n );\n return charge;\n}\n\n/* Unskip a Charge. */\nexport async function unskipCharge(\n session: Session,\n id: number | string,\n purchaseItemIds: (string | number)[],\n query?: SkipChargeParams\n) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n if (purchaseItemIds === undefined || purchaseItemIds.length === 0) {\n throw new Error('Purchase item IDs are required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/unskip`,\n {\n query,\n data: {\n purchase_item_ids: purchaseItemIds.map(id => Number(id)),\n },\n },\n getInternalSession(session, 'unskipCharge')\n );\n return charge;\n}\n\n/* Process a Charge. */\nexport async function processCharge(session: Session, id: number | string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/process`,\n {},\n getInternalSession(session, 'processCharge')\n );\n return charge;\n}\n"],"names":["id"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"charge.js","sources":["../../../src/api/charge.ts"],"sourcesContent":["import {\n ChargeListParams,\n ChargeListResponse,\n ChargeResponse,\n GetChargeOptions,\n IsoDateString,\n Session,\n SkipChargeParams,\n} from '../types';\nimport { getInternalSession, rechargeApiRequest } from '../utils/request';\n\n/* Retrieve a Charge using the charge_id. */\nexport async function getCharge(session: Session, id: number | string, options?: GetChargeOptions) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'get',\n `/charges`,\n { id, query: { include: options?.include } },\n getInternalSession(session, 'getCharge')\n );\n return charge;\n}\n\n/** Lists charges */\nexport function listCharges(session: Session, query?: ChargeListParams) {\n return rechargeApiRequest<ChargeListResponse>(\n 'get',\n `/charges`,\n { query },\n getInternalSession(session, 'listCharges')\n );\n}\n\n/**\n * You cannot add a Discount to an existing queued Charge if the Charge or the associated Address already has one.\n * If a Charge has a Discount and it gets updated, or a regeneration occurs, the Discount will be lost. Regeneration is a process that refreshes the Charge JSON with new data in the case of the Subscription or Address being updated.\n */\nexport async function applyDiscountToCharge(session: Session, id: number | string, discountCode: string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/apply_discount`,\n {\n data: { discount_code: discountCode },\n },\n getInternalSession(session, 'applyDiscountToCharge')\n );\n return charge;\n}\n\n/**\n * Remove all Discounts from a Charge without destroying the Discount.\n * In most cases the Discount should be removed from the Address. When the Discount is removed from the Address, the Discount is also removed from any future Charges.\n * If the Discount is on the parent Address, you cannot remove it using charge_id.\n * When removing your Discount, it is preferable to pass the address_id so that the Discount stays removed if the Charge is regenerated. Only pass charge_id in edge cases in which there are two or more Charges on a parent Address and you only want to remove the Discount from one Charge.\n * If you pass both parameters, it will remove the Discount from the Address.\n */\nexport async function removeDiscountsFromCharge(session: Session, id: number | string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/remove_discount`,\n {},\n getInternalSession(session, 'removeDiscountsFromCharge')\n );\n return charge;\n}\n\n/* Skip a Charge. */\nexport async function skipCharge(\n session: Session,\n id: number | string,\n purchaseItemIds: (string | number)[],\n query?: SkipChargeParams\n) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n if (purchaseItemIds === undefined || purchaseItemIds.length === 0) {\n throw new Error('Purchase item IDs are required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/skip`,\n {\n query,\n data: {\n purchase_item_ids: purchaseItemIds.map(id => Number(id)),\n },\n },\n getInternalSession(session, 'skipCharge')\n );\n return charge;\n}\n\n/* Unskip a Charge. */\nexport async function unskipCharge(\n session: Session,\n id: number | string,\n purchaseItemIds: (string | number)[],\n query?: SkipChargeParams\n) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n if (purchaseItemIds === undefined || purchaseItemIds.length === 0) {\n throw new Error('Purchase item IDs are required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/unskip`,\n {\n query,\n data: {\n purchase_item_ids: purchaseItemIds.map(id => Number(id)),\n },\n },\n getInternalSession(session, 'unskipCharge')\n );\n return charge;\n}\n\n/* Process a Charge. */\nexport async function processCharge(session: Session, id: number | string) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/process`,\n {},\n getInternalSession(session, 'processCharge')\n );\n return charge;\n}\n\n/* Reschedule all items associated with a Charge. */\nexport async function rescheduleCharge(session: Session, id: number | string, date: IsoDateString) {\n if (id === undefined || id === '') {\n throw new Error('ID is required');\n }\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/change_next_charge_date`,\n {\n data: { next_charge_date: date },\n },\n getInternalSession(session, 'rescheduleCharge')\n );\n return charge;\n}\n"],"names":["id"],"mappings":";;AAYsB,eAAA,SAAA,CAAU,OAAkB,EAAA,EAAA,EAAqB,OAA4B,EAAA;AACjG,EAAI,IAAA,EAAA,KAAO,KAAa,CAAA,IAAA,EAAA,KAAO,EAAI,EAAA;AACjC,IAAM,MAAA,IAAI,MAAM,gBAAgB,CAAA,CAAA;AAAA,GAClC;AACA,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,MAAM,kBAAA;AAAA,IACvB,KAAA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O,OAAA,MAAA,CAAA;AACT;;;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { loginCustomerPortal, loginShopifyApi, loginShopifyAppProxy, loginWithSh
|
|
|
3
3
|
export { createBundleSelection, deleteBundleSelection, getBundleId, getBundleSelection, getBundleSelectionId, getDynamicBundleItems, listBundleSelections, updateBundle, updateBundleSelection, validateBundle, validateBundleSelection, validateDynamicBundle } from './api/bundle.js';
|
|
4
4
|
export { loadBundleData } from './api/bundleData.js';
|
|
5
5
|
export { getCDNBundleSettings, getCDNProduct, getCDNProductAndSettings, getCDNProducts, getCDNProductsAndSettings, getCDNStoreSettings, getCDNWidgetSettings, resetCDNCache } from './api/cdn.js';
|
|
6
|
-
export { applyDiscountToCharge, getCharge, listCharges, processCharge, removeDiscountsFromCharge, skipCharge, unskipCharge } from './api/charge.js';
|
|
6
|
+
export { applyDiscountToCharge, getCharge, listCharges, processCharge, removeDiscountsFromCharge, rescheduleCharge, skipCharge, unskipCharge } from './api/charge.js';
|
|
7
7
|
export { getCollection, listCollectionProducts, listCollections } from './api/collection.js';
|
|
8
8
|
export { getCreditSummary, listCreditAccounts, setApplyCreditsToNextCharge } from './api/credit.js';
|
|
9
9
|
export { getActiveChurnLandingPageURL, getCustomer, getCustomerPortalAccess, getDeliverySchedule, getFailedPaymentMethodRecoveryLandingPageURL, getGiftRedemptionLandingPageURL, sendCustomerNotification, updateCustomer } from './api/customer.js';
|
|
@@ -47,7 +47,7 @@ async function rechargeApiRequest(method, url, { id, query, data, headers } = {}
|
|
|
47
47
|
"X-Recharge-Sdk-Fn": session.internalFnCall,
|
|
48
48
|
...appName ? { "X-Recharge-Sdk-App-Name": appName } : {},
|
|
49
49
|
...appVersion ? { "X-Recharge-Sdk-App-Version": appVersion } : {},
|
|
50
|
-
"X-Recharge-Sdk-Version": "1.
|
|
50
|
+
"X-Recharge-Sdk-Version": "1.67.0",
|
|
51
51
|
"X-Request-Id": session.internalRequestId,
|
|
52
52
|
...session.tmp_fn_identifier ? { "X-Recharge-Sdk-Fn-Identifier": session.tmp_fn_identifier } : {},
|
|
53
53
|
...headers ? headers : {}
|
package/dist/index.d.ts
CHANGED
|
@@ -1107,7 +1107,7 @@ interface SubscriptionsResponse {
|
|
|
1107
1107
|
previous_cursor: null | string;
|
|
1108
1108
|
subscriptions: Subscription[];
|
|
1109
1109
|
}
|
|
1110
|
-
type SubscriptionIncludes = 'address' | 'customer' | 'metafields' | 'bundle_product' | 'bundle_selections' | 'charge_activities';
|
|
1110
|
+
type SubscriptionIncludes = 'address' | 'customer' | 'metafields' | 'bundle_product' | 'bundle_selections' | 'charge_activities' | 'customer_entitlements';
|
|
1111
1111
|
interface GetSubscriptionOptions {
|
|
1112
1112
|
include?: SubscriptionIncludes[];
|
|
1113
1113
|
}
|
|
@@ -3669,6 +3669,7 @@ declare function removeDiscountsFromCharge(session: Session, id: number | string
|
|
|
3669
3669
|
declare function skipCharge(session: Session, id: number | string, purchaseItemIds: (string | number)[], query?: SkipChargeParams): Promise<Charge>;
|
|
3670
3670
|
declare function unskipCharge(session: Session, id: number | string, purchaseItemIds: (string | number)[], query?: SkipChargeParams): Promise<Charge>;
|
|
3671
3671
|
declare function processCharge(session: Session, id: number | string): Promise<Charge>;
|
|
3672
|
+
declare function rescheduleCharge(session: Session, id: number | string, date: IsoDateString): Promise<Charge>;
|
|
3672
3673
|
|
|
3673
3674
|
type ProductListResponse<T extends ProductSearchParams_2020_12 | ProductSearchParams_2022_06> = T extends ProductSearchParams_2020_12 ? {
|
|
3674
3675
|
products: Product_2020_12[];
|
|
@@ -3831,4 +3832,4 @@ declare const api: {
|
|
|
3831
3832
|
};
|
|
3832
3833
|
declare function initRecharge(opt?: InitOptions): void;
|
|
3833
3834
|
|
|
3834
|
-
export { type ActivateMembershipRequest, type AddToCartCallbackSettings, type AddonProduct, type AddonSettings, type AddonsSection, type Address, type AddressIncludes, type AddressListParams, type AddressListResponse, type AddressResponse, type AddressSortBy, type AnalyticsData, type Announcement, type ApplyCreditOptions, type AssociatedAddress, type BaseProduct, type BaseProductVariant, type BaseVariant, type BasicSubscriptionParams, type BooleanLike, type BooleanNumbers, type BooleanString, type BooleanStringNumbers, type BulkSubscriptionParams, type BundleAppProxy, type BundleData, type BundleDataBaseProduct, type BundleDataCollection, type BundleDataSellingPlan, type BundleDataSellingPlanGroup, type BundleDataVariant, type BundlePriceRule, type BundleProduct, type BundleProductLayoutSettings, type BundlePurchaseItem, type BundlePurchaseItemParams, type BundleSelection, type BundleSelectionAppProxy, type BundleSelectionItem, type BundleSelectionItemRequiredCreateProps, type BundleSelectionListParams, type BundleSelectionsResponse, type BundleSelectionsSortBy, type BundleSettings, type BundleTemplateSettings, type BundleTemplateType, type BundleTranslations, type BundleVariant, type BundleVariantOptionSource, type BundleVariantRange, type BundleVariantSelectionDefault, type CDNBaseWidgetSettings, type CDNBundleSettings, type CDNBundleVariant, type CDNBundleVariantOptionSource, type CDNPlan, type CDNProduct, type CDNProductAndSettings, type CDNProductKeyObject, type CDNProductQuery_2020_12, type CDNProductQuery_2022_06, type CDNProductRaw, type CDNProductResource, type CDNProductResponseType, type CDNProductType, type CDNProductVariant_2022_06, type CDNProduct_2022_06, type CDNProductsAndSettings, type CDNProductsAndSettingsResource, type CDNStoreSettings, type CDNSubscriptionOption, type CDNVariant, type CDNVersion, type CDNWidgetSettings, type CDNWidgetSettingsRaw, type CDNWidgetSettingsResource, type CRUDRequestOptions, type CancelMembershipRequest, type CancelSubscriptionRequest, type ChangeMembershipRequest, type ChannelSettings, type Charge, type ChargeIncludes, type ChargeListParams, type ChargeListResponse, type ChargeResponse, type ChargeSortBy, type ChargeStatus, type Collection, type CollectionBinding, type CollectionListParams, type CollectionTypes, type CollectionsResponse, type CollectionsSortBy, type ColorString, type CreateAddressRequest, type CreateBundleSelectionRequest, type CreateMetafieldRequest, type CreateOnetimeRequest, type CreatePaymentMethodRequest, type CreateRecipientAddress, type CreateSubscriptionRequest, type CreateSubscriptionsParams, type CreateSubscriptionsRequest, type CreditAccount, type CreditAccountIncludes, type CreditAccountListParams, type CreditAccountType, type CreditAccountsResponse, type CreditAccountsSortBy, type CreditSummaryIncludes, type CrossSellsSection, type CrossSellsSettings, type CurrencyPriceSet, type Customer, type CustomerCreditSummary, type CustomerDeliveryScheduleParams, type CustomerDeliveryScheduleResponse, type CustomerIncludes, type CustomerNotification, type CustomerNotificationOptions, type CustomerNotificationTemplate, type CustomerNotificationType, type CustomerPortalAccessOptions, type CustomerPortalAccessResponse, type CustomerPortalSettings, type CustomerSurveyOfferParams, type CustomerSurveyOfferResponse, type CustomerSurveyOffersResponse, type CustomerSurveyReason, type CustomerSurveyReasonsResponse, type DefaultProduct, type DefaultSelection, type DefaultVariant, type DelayOption, type DeleteSubscriptionsParams, type DeleteSubscriptionsRequest, type Delivery, type DeliveryLineItem, type DeliveryOrder, type DeliveryPaymentMethod, type Discount, type DiscountType, type DynamicBundleItemAppProxy, type DynamicBundlePropertiesAppProxy, type EligibleChargeType, type EligibleLineItemType, type ExternalAttributeSchema, type ExternalId, type ExternalProductStatus, type ExternalTransactionId, type FirstOption, type GetAddressOptions, type GetChargeOptions, type GetCreditSummaryOptions, type GetCustomerOptions, type GetMembershipProgramOptions, type GetPaymentMethodOptions, type GetRequestOptions, type GetSubscriptionOptions, type GiftPurchase, type GiftPurchasesParams, type GiftPurchasesResponse, type HTMLString, type Incentives, type InitOptions, type InternalSession, type IntervalUnit, type InventoryPolicy, type IsoDateString, type LineItem, type ListParams, type LoginResponse, type Membership, type MembershipBenefit, type MembershipIncludes, type MembershipListParams, type MembershipListResponse, type MembershipProgram, type MembershipProgramIncludes, type MembershipProgramListParams, type MembershipProgramListResponse, type MembershipProgramResponse, type MembershipProgramSortBy, type MembershipProgramStatus, type MembershipResponse, type MembershipStatus, type MembershipsSortBy, type MergeAddressesRequest, type Metafield, type MetafieldOptionalCreateProps, type MetafieldOwnerResource, type MetafieldRequiredCreateProps, type Method, type Modifier, type MultiStepSettings, type OfferAttributes, type OnePageSettings, type Onetime, type OnetimeIncludes, type OnetimeListParams, type OnetimeOptionalCreateProps, type OnetimeRequiredCreateProps, type OnetimeSubscription, type OnetimesResponse, type OnetimesSortBy, type OnlineStoreOptions, type Options, type Order, type OrderIncludes, type OrderListParams, type OrderSortBy, type OrderStatus, type OrderType, type OrdersResponse, type PasswordlessCodeResponse, type PasswordlessOptions, type PasswordlessValidateResponse, type PaymentDetails, type PaymentMethod, type PaymentMethodIncludes, type PaymentMethodListParams, type PaymentMethodOptionalCreateProps, type PaymentMethodRequiredCreateProps, type PaymentMethodSortBy, type PaymentMethodStatus, type PaymentMethodsResponse, type PaymentType, type Plan, type PlanListParams, type PlanSortBy, type PlanType, type PlansResponse, type PriceRange, type PriceRule, type PriceSet, type ProcessorName, type Product, type ProductImage, type ProductInclude, type ProductListResponse, type ProductOption, type ProductSearchParams_2020_12, type ProductSearchParams_2022_06, type ProductSearchResponse_2020_12, type ProductSearchResponse_2022_06, type ProductSearchType, type ProductSource, type ProductValueOption, type ProductVariant_2020_12, type ProductVariant_2022_06, type Product_2020_12, type Product_2022_06, type Property, type PublicBundleData, type PublishStatus, type QuantityRange, type RecurringSubscription, type ReferralInfo, type ReferralUrl, type Request, type RequestHeaders, type RequestOptions, type SellingPlan, type SellingPlanAllocation, type SellingPlanGroup, type Session, type ShippingCountriesOptions, type ShippingCountriesResponse, type ShippingCountry, type ShippingLine, type ShippingProvince, type ShopifyStorefrontOptions, type ShopifyUpdatePaymentInfoOptions, type SkipChargeParams, type SkipFutureChargeAddressRequest, type SkipFutureChargeAddressResponse, type SortBy, type SortField, type SortKeys, type StepSettings, type StepSettingsCommon, type StepSettingsTypes, type StoreSettings, type StorefrontEnvironment, type StorefrontOptions, type StorefrontPurchaseOption, type SubType, type Subscription, type SubscriptionBase, type SubscriptionCancelled, type SubscriptionIncludes, type SubscriptionListParams, type SubscriptionOption, type SubscriptionOptionalCreateProps, type SubscriptionPreferences, type SubscriptionRequiredCreateProps, type SubscriptionSortBy, type SubscriptionStatus, type Subscription_2021_01, type SubscriptionsResponse, type TaxLine, type Tier, type TieredDiscount, type TieredDiscountStatus, type Translations, type UpdateAddressParams, type UpdateAddressRequest, type UpdateBundlePurchaseItem, type UpdateBundleSelectionRequest, type UpdateCustomerRequest, type UpdateMetafieldRequest, type UpdateOnetimeRequest, type UpdatePaymentMethodRequest, type UpdateSubscriptionChargeDateParams, type UpdateSubscriptionParams, type UpdateSubscriptionRequest, type UpdateSubscriptionsParams, type UpdateSubscriptionsRequest, type Variant, type VariantSelector, type VariantSelectorStepSetting, type WidgetIconColor, type WidgetTemplateType, type WidgetVisibility, activateMembership, activateSubscription, api, applyDiscountToAddress, applyDiscountToCharge, cancelMembership, cancelSubscription, changeMembership, claimOfferCustomerSurvey, createAddress, createBundleSelection, createMetafield, createOnetime, createPaymentMethod, createSubscription, createSubscriptions, delayOrder, deleteAddress, deleteBundleSelection, deleteMetafield, deleteOnetime, deleteSubscriptions, getActiveChurnLandingPageURL, getAddress, getBundleId, getBundleSelection, getBundleSelectionId, getCDNBundleSettings, getCDNProduct, getCDNProductAndSettings, getCDNProducts, getCDNProductsAndSettings, getCDNStoreSettings, getCDNWidgetSettings, getCharge, getCollection, getCreditSummary, getCustomer, getCustomerPortalAccess, getCustomerSurveyOffers, getCustomerSurveyReasons, getDeliverySchedule, getDynamicBundleItems, getFailedPaymentMethodRecoveryLandingPageURL, getGiftPurchase, getGiftRedemptionLandingPageURL, getMembership, getMembershipProgram, getOnetime, getOrder, getPaymentMethod, getPlan, getShippingCountries, getStoreSettings, getSubscription, initRecharge, type intervalUnit, listAddresses, listBundleSelections, listCharges, listCollectionProducts, listCollections, listCreditAccounts, listGiftPurchases, listMembershipPrograms, listMemberships, listOnetimes, listOrders, listPaymentMethods, listPlans, listSubscriptions, loadBundleData, loginCustomerPortal, loginShopifyApi, loginShopifyAppProxy, loginWithShopifyCustomerAccount, loginWithShopifyStorefront, type membershipIncludes, mergeAddresses, processCharge, productSearch, removeDiscountsFromAddress, removeDiscountsFromCharge, resetCDNCache, sendCustomerNotification, sendPasswordlessCode, sendPasswordlessCodeAppProxy, setApplyCreditsToNextCharge, skipCharge, skipFutureCharge, skipGiftSubscriptionCharge, skipSubscriptionCharge, unskipCharge, updateAddress, updateBundle, updateBundleSelection, updateCustomer, updateMetafield, updateOnetime, updatePaymentMethod, updateSubscription, updateSubscriptionAddress, updateSubscriptionChargeDate, updateSubscriptions, validateBundle, validateBundleSelection, validateDynamicBundle, validatePasswordlessCode, validatePasswordlessCodeAppProxy };
|
|
3835
|
+
export { type ActivateMembershipRequest, type AddToCartCallbackSettings, type AddonProduct, type AddonSettings, type AddonsSection, type Address, type AddressIncludes, type AddressListParams, type AddressListResponse, type AddressResponse, type AddressSortBy, type AnalyticsData, type Announcement, type ApplyCreditOptions, type AssociatedAddress, type BaseProduct, type BaseProductVariant, type BaseVariant, type BasicSubscriptionParams, type BooleanLike, type BooleanNumbers, type BooleanString, type BooleanStringNumbers, type BulkSubscriptionParams, type BundleAppProxy, type BundleData, type BundleDataBaseProduct, type BundleDataCollection, type BundleDataSellingPlan, type BundleDataSellingPlanGroup, type BundleDataVariant, type BundlePriceRule, type BundleProduct, type BundleProductLayoutSettings, type BundlePurchaseItem, type BundlePurchaseItemParams, type BundleSelection, type BundleSelectionAppProxy, type BundleSelectionItem, type BundleSelectionItemRequiredCreateProps, type BundleSelectionListParams, type BundleSelectionsResponse, type BundleSelectionsSortBy, type BundleSettings, type BundleTemplateSettings, type BundleTemplateType, type BundleTranslations, type BundleVariant, type BundleVariantOptionSource, type BundleVariantRange, type BundleVariantSelectionDefault, type CDNBaseWidgetSettings, type CDNBundleSettings, type CDNBundleVariant, type CDNBundleVariantOptionSource, type CDNPlan, type CDNProduct, type CDNProductAndSettings, type CDNProductKeyObject, type CDNProductQuery_2020_12, type CDNProductQuery_2022_06, type CDNProductRaw, type CDNProductResource, type CDNProductResponseType, type CDNProductType, type CDNProductVariant_2022_06, type CDNProduct_2022_06, type CDNProductsAndSettings, type CDNProductsAndSettingsResource, type CDNStoreSettings, type CDNSubscriptionOption, type CDNVariant, type CDNVersion, type CDNWidgetSettings, type CDNWidgetSettingsRaw, type CDNWidgetSettingsResource, type CRUDRequestOptions, type CancelMembershipRequest, type CancelSubscriptionRequest, type ChangeMembershipRequest, type ChannelSettings, type Charge, type ChargeIncludes, type ChargeListParams, type ChargeListResponse, type ChargeResponse, type ChargeSortBy, type ChargeStatus, type Collection, type CollectionBinding, type CollectionListParams, type CollectionTypes, type CollectionsResponse, type CollectionsSortBy, type ColorString, type CreateAddressRequest, type CreateBundleSelectionRequest, type CreateMetafieldRequest, type CreateOnetimeRequest, type CreatePaymentMethodRequest, type CreateRecipientAddress, type CreateSubscriptionRequest, type CreateSubscriptionsParams, type CreateSubscriptionsRequest, type CreditAccount, type CreditAccountIncludes, type CreditAccountListParams, type CreditAccountType, type CreditAccountsResponse, type CreditAccountsSortBy, type CreditSummaryIncludes, type CrossSellsSection, type CrossSellsSettings, type CurrencyPriceSet, type Customer, type CustomerCreditSummary, type CustomerDeliveryScheduleParams, type CustomerDeliveryScheduleResponse, type CustomerIncludes, type CustomerNotification, type CustomerNotificationOptions, type CustomerNotificationTemplate, type CustomerNotificationType, type CustomerPortalAccessOptions, type CustomerPortalAccessResponse, type CustomerPortalSettings, type CustomerSurveyOfferParams, type CustomerSurveyOfferResponse, type CustomerSurveyOffersResponse, type CustomerSurveyReason, type CustomerSurveyReasonsResponse, type DefaultProduct, type DefaultSelection, type DefaultVariant, type DelayOption, type DeleteSubscriptionsParams, type DeleteSubscriptionsRequest, type Delivery, type DeliveryLineItem, type DeliveryOrder, type DeliveryPaymentMethod, type Discount, type DiscountType, type DynamicBundleItemAppProxy, type DynamicBundlePropertiesAppProxy, type EligibleChargeType, type EligibleLineItemType, type ExternalAttributeSchema, type ExternalId, type ExternalProductStatus, type ExternalTransactionId, type FirstOption, type GetAddressOptions, type GetChargeOptions, type GetCreditSummaryOptions, type GetCustomerOptions, type GetMembershipProgramOptions, type GetPaymentMethodOptions, type GetRequestOptions, type GetSubscriptionOptions, type GiftPurchase, type GiftPurchasesParams, type GiftPurchasesResponse, type HTMLString, type Incentives, type InitOptions, type InternalSession, type IntervalUnit, type InventoryPolicy, type IsoDateString, type LineItem, type ListParams, type LoginResponse, type Membership, type MembershipBenefit, type MembershipIncludes, type MembershipListParams, type MembershipListResponse, type MembershipProgram, type MembershipProgramIncludes, type MembershipProgramListParams, type MembershipProgramListResponse, type MembershipProgramResponse, type MembershipProgramSortBy, type MembershipProgramStatus, type MembershipResponse, type MembershipStatus, type MembershipsSortBy, type MergeAddressesRequest, type Metafield, type MetafieldOptionalCreateProps, type MetafieldOwnerResource, type MetafieldRequiredCreateProps, type Method, type Modifier, type MultiStepSettings, type OfferAttributes, type OnePageSettings, type Onetime, type OnetimeIncludes, type OnetimeListParams, type OnetimeOptionalCreateProps, type OnetimeRequiredCreateProps, type OnetimeSubscription, type OnetimesResponse, type OnetimesSortBy, type OnlineStoreOptions, type Options, type Order, type OrderIncludes, type OrderListParams, type OrderSortBy, type OrderStatus, type OrderType, type OrdersResponse, type PasswordlessCodeResponse, type PasswordlessOptions, type PasswordlessValidateResponse, type PaymentDetails, type PaymentMethod, type PaymentMethodIncludes, type PaymentMethodListParams, type PaymentMethodOptionalCreateProps, type PaymentMethodRequiredCreateProps, type PaymentMethodSortBy, type PaymentMethodStatus, type PaymentMethodsResponse, type PaymentType, type Plan, type PlanListParams, type PlanSortBy, type PlanType, type PlansResponse, type PriceRange, type PriceRule, type PriceSet, type ProcessorName, type Product, type ProductImage, type ProductInclude, type ProductListResponse, type ProductOption, type ProductSearchParams_2020_12, type ProductSearchParams_2022_06, type ProductSearchResponse_2020_12, type ProductSearchResponse_2022_06, type ProductSearchType, type ProductSource, type ProductValueOption, type ProductVariant_2020_12, type ProductVariant_2022_06, type Product_2020_12, type Product_2022_06, type Property, type PublicBundleData, type PublishStatus, type QuantityRange, type RecurringSubscription, type ReferralInfo, type ReferralUrl, type Request, type RequestHeaders, type RequestOptions, type SellingPlan, type SellingPlanAllocation, type SellingPlanGroup, type Session, type ShippingCountriesOptions, type ShippingCountriesResponse, type ShippingCountry, type ShippingLine, type ShippingProvince, type ShopifyStorefrontOptions, type ShopifyUpdatePaymentInfoOptions, type SkipChargeParams, type SkipFutureChargeAddressRequest, type SkipFutureChargeAddressResponse, type SortBy, type SortField, type SortKeys, type StepSettings, type StepSettingsCommon, type StepSettingsTypes, type StoreSettings, type StorefrontEnvironment, type StorefrontOptions, type StorefrontPurchaseOption, type SubType, type Subscription, type SubscriptionBase, type SubscriptionCancelled, type SubscriptionIncludes, type SubscriptionListParams, type SubscriptionOption, type SubscriptionOptionalCreateProps, type SubscriptionPreferences, type SubscriptionRequiredCreateProps, type SubscriptionSortBy, type SubscriptionStatus, type Subscription_2021_01, type SubscriptionsResponse, type TaxLine, type Tier, type TieredDiscount, type TieredDiscountStatus, type Translations, type UpdateAddressParams, type UpdateAddressRequest, type UpdateBundlePurchaseItem, type UpdateBundleSelectionRequest, type UpdateCustomerRequest, type UpdateMetafieldRequest, type UpdateOnetimeRequest, type UpdatePaymentMethodRequest, type UpdateSubscriptionChargeDateParams, type UpdateSubscriptionParams, type UpdateSubscriptionRequest, type UpdateSubscriptionsParams, type UpdateSubscriptionsRequest, type Variant, type VariantSelector, type VariantSelectorStepSetting, type WidgetIconColor, type WidgetTemplateType, type WidgetVisibility, activateMembership, activateSubscription, api, applyDiscountToAddress, applyDiscountToCharge, cancelMembership, cancelSubscription, changeMembership, claimOfferCustomerSurvey, createAddress, createBundleSelection, createMetafield, createOnetime, createPaymentMethod, createSubscription, createSubscriptions, delayOrder, deleteAddress, deleteBundleSelection, deleteMetafield, deleteOnetime, deleteSubscriptions, getActiveChurnLandingPageURL, getAddress, getBundleId, getBundleSelection, getBundleSelectionId, getCDNBundleSettings, getCDNProduct, getCDNProductAndSettings, getCDNProducts, getCDNProductsAndSettings, getCDNStoreSettings, getCDNWidgetSettings, getCharge, getCollection, getCreditSummary, getCustomer, getCustomerPortalAccess, getCustomerSurveyOffers, getCustomerSurveyReasons, getDeliverySchedule, getDynamicBundleItems, getFailedPaymentMethodRecoveryLandingPageURL, getGiftPurchase, getGiftRedemptionLandingPageURL, getMembership, getMembershipProgram, getOnetime, getOrder, getPaymentMethod, getPlan, getShippingCountries, getStoreSettings, getSubscription, initRecharge, type intervalUnit, listAddresses, listBundleSelections, listCharges, listCollectionProducts, listCollections, listCreditAccounts, listGiftPurchases, listMembershipPrograms, listMemberships, listOnetimes, listOrders, listPaymentMethods, listPlans, listSubscriptions, loadBundleData, loginCustomerPortal, loginShopifyApi, loginShopifyAppProxy, loginWithShopifyCustomerAccount, loginWithShopifyStorefront, type membershipIncludes, mergeAddresses, processCharge, productSearch, removeDiscountsFromAddress, removeDiscountsFromCharge, rescheduleCharge, resetCDNCache, sendCustomerNotification, sendPasswordlessCode, sendPasswordlessCodeAppProxy, setApplyCreditsToNextCharge, skipCharge, skipFutureCharge, skipGiftSubscriptionCharge, skipSubscriptionCharge, unskipCharge, updateAddress, updateBundle, updateBundleSelection, updateCustomer, updateMetafield, updateOnetime, updatePaymentMethod, updateSubscription, updateSubscriptionAddress, updateSubscriptionChargeDate, updateSubscriptions, validateBundle, validateBundleSelection, validateDynamicBundle, validatePasswordlessCode, validatePasswordlessCodeAppProxy };
|