@rechargeapps/storefront-client 0.21.0 → 0.23.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 +82 -3
- package/dist/cjs/api/auth.js.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/auth.js +79 -4
- package/dist/esm/api/auth.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +15 -2
- package/dist/umd/recharge-client.min.js +10 -10
- package/package.json +1 -1
package/dist/cjs/api/auth.js
CHANGED
|
@@ -23,14 +23,93 @@ async function loginShopifyApi(shopifyStorefrontToken, shopifyCustomerAccessToke
|
|
|
23
23
|
customer_token: shopifyCustomerAccessToken,
|
|
24
24
|
storefront_token: shopifyStorefrontToken,
|
|
25
25
|
shop_url: storeIdentifier
|
|
26
|
-
},
|
|
27
|
-
headers: {
|
|
28
|
-
"X-Recharge-App": "storefront-client"
|
|
29
26
|
}
|
|
30
27
|
});
|
|
31
28
|
return response.api_token ? { apiToken: response.api_token, customerId: response.customer_id } : null;
|
|
32
29
|
}
|
|
30
|
+
async function sendPasswordlessCode(email) {
|
|
31
|
+
const { environment, storefrontAccessToken, storeIdentifier } = options.getOptions();
|
|
32
|
+
const rechargeBaseUrl = api.RECHARGE_ADMIN_URL(environment);
|
|
33
|
+
const headers = {};
|
|
34
|
+
if (storefrontAccessToken) {
|
|
35
|
+
headers["X-Recharge-Storefront-Access-Token"] = storefrontAccessToken;
|
|
36
|
+
}
|
|
37
|
+
const response = await request.request("post", `${rechargeBaseUrl}/attempt_login`, {
|
|
38
|
+
data: {
|
|
39
|
+
email,
|
|
40
|
+
shop: storeIdentifier
|
|
41
|
+
},
|
|
42
|
+
headers
|
|
43
|
+
});
|
|
44
|
+
if (response.errors) {
|
|
45
|
+
throw new Error(response.errors);
|
|
46
|
+
}
|
|
47
|
+
return response.session_token;
|
|
48
|
+
}
|
|
49
|
+
async function sendPasswordlessCodeAppProxy(email) {
|
|
50
|
+
const { storefrontAccessToken, storeIdentifier } = options.getOptions();
|
|
51
|
+
const headers = {};
|
|
52
|
+
if (storefrontAccessToken) {
|
|
53
|
+
headers["X-Recharge-Storefront-Access-Token"] = storefrontAccessToken;
|
|
54
|
+
}
|
|
55
|
+
const response = await request.shopifyAppProxyRequest("post", "/attempt_login", {
|
|
56
|
+
data: {
|
|
57
|
+
email,
|
|
58
|
+
shop: storeIdentifier
|
|
59
|
+
},
|
|
60
|
+
headers
|
|
61
|
+
});
|
|
62
|
+
if (response.errors) {
|
|
63
|
+
throw new Error(response.errors);
|
|
64
|
+
}
|
|
65
|
+
return response.session_token;
|
|
66
|
+
}
|
|
67
|
+
async function validatePasswordlessCode(email, session_token, code) {
|
|
68
|
+
const { environment, storefrontAccessToken, storeIdentifier } = options.getOptions();
|
|
69
|
+
const rechargeBaseUrl = api.RECHARGE_ADMIN_URL(environment);
|
|
70
|
+
const headers = {};
|
|
71
|
+
if (storefrontAccessToken) {
|
|
72
|
+
headers["X-Recharge-Storefront-Access-Token"] = storefrontAccessToken;
|
|
73
|
+
}
|
|
74
|
+
const response = await request.request("post", `${rechargeBaseUrl}/validate_login`, {
|
|
75
|
+
data: {
|
|
76
|
+
code,
|
|
77
|
+
email,
|
|
78
|
+
session_token,
|
|
79
|
+
shop: storeIdentifier
|
|
80
|
+
},
|
|
81
|
+
headers
|
|
82
|
+
});
|
|
83
|
+
if (response.errors) {
|
|
84
|
+
throw new Error(response.errors);
|
|
85
|
+
}
|
|
86
|
+
return { apiToken: response.api_token, customerId: response.customer_id };
|
|
87
|
+
}
|
|
88
|
+
async function validatePasswordlessCodeAppProxy(email, session_token, code) {
|
|
89
|
+
const { storefrontAccessToken, storeIdentifier } = options.getOptions();
|
|
90
|
+
const headers = {};
|
|
91
|
+
if (storefrontAccessToken) {
|
|
92
|
+
headers["X-Recharge-Storefront-Access-Token"] = storefrontAccessToken;
|
|
93
|
+
}
|
|
94
|
+
const response = await request.shopifyAppProxyRequest("post", "/validate_login", {
|
|
95
|
+
data: {
|
|
96
|
+
code,
|
|
97
|
+
email,
|
|
98
|
+
session_token,
|
|
99
|
+
shop: storeIdentifier
|
|
100
|
+
},
|
|
101
|
+
headers
|
|
102
|
+
});
|
|
103
|
+
if (response.errors) {
|
|
104
|
+
throw new Error(response.errors);
|
|
105
|
+
}
|
|
106
|
+
return { apiToken: response.api_token, customerId: response.customer_id };
|
|
107
|
+
}
|
|
33
108
|
|
|
34
109
|
exports.loginShopifyApi = loginShopifyApi;
|
|
35
110
|
exports.loginShopifyAppProxy = loginShopifyAppProxy;
|
|
111
|
+
exports.sendPasswordlessCode = sendPasswordlessCode;
|
|
112
|
+
exports.sendPasswordlessCodeAppProxy = sendPasswordlessCodeAppProxy;
|
|
113
|
+
exports.validatePasswordlessCode = validatePasswordlessCode;
|
|
114
|
+
exports.validatePasswordlessCodeAppProxy = validatePasswordlessCodeAppProxy;
|
|
36
115
|
//# sourceMappingURL=auth.js.map
|
package/dist/cjs/api/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sources":["../../../src/api/auth.ts"],"sourcesContent":["import { request as baseRequest, shopifyAppProxyRequest } from '../utils/request';\nimport { LoginResponse } from '../types/auth';\nimport { getOptions } from '../utils/options';\nimport { RECHARGE_ADMIN_URL } from '../constants/api';\nimport { Session } from '../types/session';\nimport { RequestHeaders } from '../types';\n\nexport async function loginShopifyAppProxy(): Promise<Session> {\n const { storefrontAccessToken } = getOptions();\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await shopifyAppProxyRequest<LoginResponse>('get', '/access', { headers });\n\n return { apiToken: response.api_token, customerId: response.customer_id };\n}\n\nexport async function loginShopifyApi(\n shopifyStorefrontToken: string,\n shopifyCustomerAccessToken?: string\n): Promise<Session | null> {\n const { environment, storeIdentifier } = getOptions();\n const rechargeBaseUrl = RECHARGE_ADMIN_URL(environment);\n const response = await baseRequest<LoginResponse>('post', `${rechargeBaseUrl}/shopify_storefront_access`, {\n data: {\n customer_token: shopifyCustomerAccessToken,\n storefront_token: shopifyStorefrontToken,\n shop_url: storeIdentifier,\n },\n headers: {\n 'X-Recharge-
|
|
1
|
+
{"version":3,"file":"auth.js","sources":["../../../src/api/auth.ts"],"sourcesContent":["import { request as baseRequest, shopifyAppProxyRequest } from '../utils/request';\nimport { LoginResponse, PasswordlessCodeResponse, PasswordlessValidateResponse } from '../types/auth';\nimport { getOptions } from '../utils/options';\nimport { RECHARGE_ADMIN_URL } from '../constants/api';\nimport { Session } from '../types/session';\nimport { RequestHeaders } from '../types';\n\nexport async function loginShopifyAppProxy(): Promise<Session> {\n const { storefrontAccessToken } = getOptions();\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await shopifyAppProxyRequest<LoginResponse>('get', '/access', { headers });\n\n return { apiToken: response.api_token, customerId: response.customer_id };\n}\n\nexport async function loginShopifyApi(\n shopifyStorefrontToken: string,\n shopifyCustomerAccessToken?: string\n): Promise<Session | null> {\n const { environment, storeIdentifier } = getOptions();\n const rechargeBaseUrl = RECHARGE_ADMIN_URL(environment);\n const response = await baseRequest<LoginResponse>('post', `${rechargeBaseUrl}/shopify_storefront_access`, {\n data: {\n customer_token: shopifyCustomerAccessToken,\n storefront_token: shopifyStorefrontToken,\n shop_url: storeIdentifier,\n },\n });\n\n return response.api_token ? { apiToken: response.api_token, customerId: response.customer_id } : null;\n}\n\nexport async function sendPasswordlessCode(email: string): Promise<string> {\n const { environment, storefrontAccessToken, storeIdentifier } = getOptions();\n const rechargeBaseUrl = RECHARGE_ADMIN_URL(environment);\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await baseRequest<PasswordlessCodeResponse>('post', `${rechargeBaseUrl}/attempt_login`, {\n data: {\n email,\n shop: storeIdentifier,\n },\n headers,\n });\n\n if (response.errors) {\n throw new Error(response.errors);\n }\n return response.session_token;\n}\n\nexport async function sendPasswordlessCodeAppProxy(email: string): Promise<string> {\n const { storefrontAccessToken, storeIdentifier } = getOptions();\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await shopifyAppProxyRequest<PasswordlessCodeResponse>('post', '/attempt_login', {\n data: {\n email,\n shop: storeIdentifier,\n },\n headers,\n });\n\n if (response.errors) {\n throw new Error(response.errors);\n }\n return response.session_token;\n}\n\nexport async function validatePasswordlessCode(email: string, session_token: string, code: string): Promise<Session> {\n const { environment, storefrontAccessToken, storeIdentifier } = getOptions();\n const rechargeBaseUrl = RECHARGE_ADMIN_URL(environment);\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await baseRequest<PasswordlessValidateResponse>('post', `${rechargeBaseUrl}/validate_login`, {\n data: {\n code,\n email,\n session_token,\n shop: storeIdentifier,\n },\n headers,\n });\n\n if (response.errors) {\n throw new Error(response.errors);\n }\n return { apiToken: response.api_token, customerId: response.customer_id };\n}\n\nexport async function validatePasswordlessCodeAppProxy(\n email: string,\n session_token: string,\n code: string\n): Promise<Session> {\n const { storefrontAccessToken, storeIdentifier } = getOptions();\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await shopifyAppProxyRequest<PasswordlessValidateResponse>('post', '/validate_login', {\n data: {\n code,\n email,\n session_token,\n shop: storeIdentifier,\n },\n headers,\n });\n\n if (response.errors) {\n throw new Error(response.errors);\n }\n return { apiToken: response.api_token, customerId: response.customer_id };\n}\n"],"names":["getOptions","shopifyAppProxyRequest","RECHARGE_ADMIN_URL","baseRequest"],"mappings":";;;;;;;;AAGO,e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AAI,IAAI,EAAE;AACV,MAAM,IAAI;AACV,MAAM,KAAK;AACX,MAAM,aAAa;AACnB,MAAM,IAAI,EAAE,eAAe;AAC3B,KAAK;AACL,IAAI,OAAO;AACX,GAAG,CAAC,CAAC;AACL,EAAE,IAAI,QAAQ,CAAC,MAAM,EAAE;AACvB,IAAI,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACrC,GAAG;AACH,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,WAAW,EAAE,CAAC;AAC5E;;;;;;;;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,6 +29,10 @@ exports.skipFutureCharge = address.skipFutureCharge;
|
|
|
29
29
|
exports.updateAddress = address.updateAddress;
|
|
30
30
|
exports.loginShopifyApi = auth.loginShopifyApi;
|
|
31
31
|
exports.loginShopifyAppProxy = auth.loginShopifyAppProxy;
|
|
32
|
+
exports.sendPasswordlessCode = auth.sendPasswordlessCode;
|
|
33
|
+
exports.sendPasswordlessCodeAppProxy = auth.sendPasswordlessCodeAppProxy;
|
|
34
|
+
exports.validatePasswordlessCode = auth.validatePasswordlessCode;
|
|
35
|
+
exports.validatePasswordlessCodeAppProxy = auth.validatePasswordlessCodeAppProxy;
|
|
32
36
|
exports.applyDiscountToCharge = charge.applyDiscountToCharge;
|
|
33
37
|
exports.getCharge = charge.getCharge;
|
|
34
38
|
exports.listCharges = charge.listCharges;
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/esm/api/auth.js
CHANGED
|
@@ -19,13 +19,88 @@ async function loginShopifyApi(shopifyStorefrontToken, shopifyCustomerAccessToke
|
|
|
19
19
|
customer_token: shopifyCustomerAccessToken,
|
|
20
20
|
storefront_token: shopifyStorefrontToken,
|
|
21
21
|
shop_url: storeIdentifier
|
|
22
|
-
},
|
|
23
|
-
headers: {
|
|
24
|
-
"X-Recharge-App": "storefront-client"
|
|
25
22
|
}
|
|
26
23
|
});
|
|
27
24
|
return response.api_token ? { apiToken: response.api_token, customerId: response.customer_id } : null;
|
|
28
25
|
}
|
|
26
|
+
async function sendPasswordlessCode(email) {
|
|
27
|
+
const { environment, storefrontAccessToken, storeIdentifier } = getOptions();
|
|
28
|
+
const rechargeBaseUrl = RECHARGE_ADMIN_URL(environment);
|
|
29
|
+
const headers = {};
|
|
30
|
+
if (storefrontAccessToken) {
|
|
31
|
+
headers["X-Recharge-Storefront-Access-Token"] = storefrontAccessToken;
|
|
32
|
+
}
|
|
33
|
+
const response = await request("post", `${rechargeBaseUrl}/attempt_login`, {
|
|
34
|
+
data: {
|
|
35
|
+
email,
|
|
36
|
+
shop: storeIdentifier
|
|
37
|
+
},
|
|
38
|
+
headers
|
|
39
|
+
});
|
|
40
|
+
if (response.errors) {
|
|
41
|
+
throw new Error(response.errors);
|
|
42
|
+
}
|
|
43
|
+
return response.session_token;
|
|
44
|
+
}
|
|
45
|
+
async function sendPasswordlessCodeAppProxy(email) {
|
|
46
|
+
const { storefrontAccessToken, storeIdentifier } = getOptions();
|
|
47
|
+
const headers = {};
|
|
48
|
+
if (storefrontAccessToken) {
|
|
49
|
+
headers["X-Recharge-Storefront-Access-Token"] = storefrontAccessToken;
|
|
50
|
+
}
|
|
51
|
+
const response = await shopifyAppProxyRequest("post", "/attempt_login", {
|
|
52
|
+
data: {
|
|
53
|
+
email,
|
|
54
|
+
shop: storeIdentifier
|
|
55
|
+
},
|
|
56
|
+
headers
|
|
57
|
+
});
|
|
58
|
+
if (response.errors) {
|
|
59
|
+
throw new Error(response.errors);
|
|
60
|
+
}
|
|
61
|
+
return response.session_token;
|
|
62
|
+
}
|
|
63
|
+
async function validatePasswordlessCode(email, session_token, code) {
|
|
64
|
+
const { environment, storefrontAccessToken, storeIdentifier } = getOptions();
|
|
65
|
+
const rechargeBaseUrl = RECHARGE_ADMIN_URL(environment);
|
|
66
|
+
const headers = {};
|
|
67
|
+
if (storefrontAccessToken) {
|
|
68
|
+
headers["X-Recharge-Storefront-Access-Token"] = storefrontAccessToken;
|
|
69
|
+
}
|
|
70
|
+
const response = await request("post", `${rechargeBaseUrl}/validate_login`, {
|
|
71
|
+
data: {
|
|
72
|
+
code,
|
|
73
|
+
email,
|
|
74
|
+
session_token,
|
|
75
|
+
shop: storeIdentifier
|
|
76
|
+
},
|
|
77
|
+
headers
|
|
78
|
+
});
|
|
79
|
+
if (response.errors) {
|
|
80
|
+
throw new Error(response.errors);
|
|
81
|
+
}
|
|
82
|
+
return { apiToken: response.api_token, customerId: response.customer_id };
|
|
83
|
+
}
|
|
84
|
+
async function validatePasswordlessCodeAppProxy(email, session_token, code) {
|
|
85
|
+
const { storefrontAccessToken, storeIdentifier } = getOptions();
|
|
86
|
+
const headers = {};
|
|
87
|
+
if (storefrontAccessToken) {
|
|
88
|
+
headers["X-Recharge-Storefront-Access-Token"] = storefrontAccessToken;
|
|
89
|
+
}
|
|
90
|
+
const response = await shopifyAppProxyRequest("post", "/validate_login", {
|
|
91
|
+
data: {
|
|
92
|
+
code,
|
|
93
|
+
email,
|
|
94
|
+
session_token,
|
|
95
|
+
shop: storeIdentifier
|
|
96
|
+
},
|
|
97
|
+
headers
|
|
98
|
+
});
|
|
99
|
+
if (response.errors) {
|
|
100
|
+
throw new Error(response.errors);
|
|
101
|
+
}
|
|
102
|
+
return { apiToken: response.api_token, customerId: response.customer_id };
|
|
103
|
+
}
|
|
29
104
|
|
|
30
|
-
export { loginShopifyApi, loginShopifyAppProxy };
|
|
105
|
+
export { loginShopifyApi, loginShopifyAppProxy, sendPasswordlessCode, sendPasswordlessCodeAppProxy, validatePasswordlessCode, validatePasswordlessCodeAppProxy };
|
|
31
106
|
//# sourceMappingURL=auth.js.map
|
package/dist/esm/api/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sources":["../../../src/api/auth.ts"],"sourcesContent":["import { request as baseRequest, shopifyAppProxyRequest } from '../utils/request';\nimport { LoginResponse } from '../types/auth';\nimport { getOptions } from '../utils/options';\nimport { RECHARGE_ADMIN_URL } from '../constants/api';\nimport { Session } from '../types/session';\nimport { RequestHeaders } from '../types';\n\nexport async function loginShopifyAppProxy(): Promise<Session> {\n const { storefrontAccessToken } = getOptions();\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await shopifyAppProxyRequest<LoginResponse>('get', '/access', { headers });\n\n return { apiToken: response.api_token, customerId: response.customer_id };\n}\n\nexport async function loginShopifyApi(\n shopifyStorefrontToken: string,\n shopifyCustomerAccessToken?: string\n): Promise<Session | null> {\n const { environment, storeIdentifier } = getOptions();\n const rechargeBaseUrl = RECHARGE_ADMIN_URL(environment);\n const response = await baseRequest<LoginResponse>('post', `${rechargeBaseUrl}/shopify_storefront_access`, {\n data: {\n customer_token: shopifyCustomerAccessToken,\n storefront_token: shopifyStorefrontToken,\n shop_url: storeIdentifier,\n },\n headers: {\n 'X-Recharge-
|
|
1
|
+
{"version":3,"file":"auth.js","sources":["../../../src/api/auth.ts"],"sourcesContent":["import { request as baseRequest, shopifyAppProxyRequest } from '../utils/request';\nimport { LoginResponse, PasswordlessCodeResponse, PasswordlessValidateResponse } from '../types/auth';\nimport { getOptions } from '../utils/options';\nimport { RECHARGE_ADMIN_URL } from '../constants/api';\nimport { Session } from '../types/session';\nimport { RequestHeaders } from '../types';\n\nexport async function loginShopifyAppProxy(): Promise<Session> {\n const { storefrontAccessToken } = getOptions();\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await shopifyAppProxyRequest<LoginResponse>('get', '/access', { headers });\n\n return { apiToken: response.api_token, customerId: response.customer_id };\n}\n\nexport async function loginShopifyApi(\n shopifyStorefrontToken: string,\n shopifyCustomerAccessToken?: string\n): Promise<Session | null> {\n const { environment, storeIdentifier } = getOptions();\n const rechargeBaseUrl = RECHARGE_ADMIN_URL(environment);\n const response = await baseRequest<LoginResponse>('post', `${rechargeBaseUrl}/shopify_storefront_access`, {\n data: {\n customer_token: shopifyCustomerAccessToken,\n storefront_token: shopifyStorefrontToken,\n shop_url: storeIdentifier,\n },\n });\n\n return response.api_token ? { apiToken: response.api_token, customerId: response.customer_id } : null;\n}\n\nexport async function sendPasswordlessCode(email: string): Promise<string> {\n const { environment, storefrontAccessToken, storeIdentifier } = getOptions();\n const rechargeBaseUrl = RECHARGE_ADMIN_URL(environment);\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await baseRequest<PasswordlessCodeResponse>('post', `${rechargeBaseUrl}/attempt_login`, {\n data: {\n email,\n shop: storeIdentifier,\n },\n headers,\n });\n\n if (response.errors) {\n throw new Error(response.errors);\n }\n return response.session_token;\n}\n\nexport async function sendPasswordlessCodeAppProxy(email: string): Promise<string> {\n const { storefrontAccessToken, storeIdentifier } = getOptions();\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await shopifyAppProxyRequest<PasswordlessCodeResponse>('post', '/attempt_login', {\n data: {\n email,\n shop: storeIdentifier,\n },\n headers,\n });\n\n if (response.errors) {\n throw new Error(response.errors);\n }\n return response.session_token;\n}\n\nexport async function validatePasswordlessCode(email: string, session_token: string, code: string): Promise<Session> {\n const { environment, storefrontAccessToken, storeIdentifier } = getOptions();\n const rechargeBaseUrl = RECHARGE_ADMIN_URL(environment);\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await baseRequest<PasswordlessValidateResponse>('post', `${rechargeBaseUrl}/validate_login`, {\n data: {\n code,\n email,\n session_token,\n shop: storeIdentifier,\n },\n headers,\n });\n\n if (response.errors) {\n throw new Error(response.errors);\n }\n return { apiToken: response.api_token, customerId: response.customer_id };\n}\n\nexport async function validatePasswordlessCodeAppProxy(\n email: string,\n session_token: string,\n code: string\n): Promise<Session> {\n const { storefrontAccessToken, storeIdentifier } = getOptions();\n const headers: RequestHeaders = {};\n if (storefrontAccessToken) {\n headers['X-Recharge-Storefront-Access-Token'] = storefrontAccessToken;\n }\n const response = await shopifyAppProxyRequest<PasswordlessValidateResponse>('post', '/validate_login', {\n data: {\n code,\n email,\n session_token,\n shop: storeIdentifier,\n },\n headers,\n });\n\n if (response.errors) {\n throw new Error(response.errors);\n }\n return { apiToken: response.api_token, customerId: response.customer_id };\n}\n"],"names":["baseRequest"],"mappings":";;;;AAGO,eAAe,oBAAoB,GAAG;AAC7C,EAAE,MAAM,EAAE,qBAAqB,EAAE,GAAG,UAAU,EAAE,CAAC;AACjD,EAAE,MAAM,OAAO,GAAG,EAAE,CAAC;AACrB,EAAE,IAAI,qBAAqB,EAAE;AAC7B,IAAI,OAAO,CAAC,oCAAoC,CAAC,GAAG,qBAAqB,CAAC;AAC1E,GAAG;AACH,EAAE,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AAC/E,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,WAAW,EAAE,CAAC;AAC5E,CAAC;AACM,eAAe,eAAe,CAAC,sBAAsB,EAAE,0BAA0B,EAAE;AAC1F,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,UAAU,EAAE,CAAC;AACxD,EAAE,MAAM,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C;AACL,EAAE,IAAI,QAAQ,CAAC,MAAM,EAAE;AACvB,IAAI,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACrC,GAAG;AACH,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,WAAW,EAAE,CAAC;AAC5E,CAAC;AACM,eAAe,gCAAgC,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE;AACnF,EAAE,MAAM,EAAE,qBAAqB,EAAE,eAAe,EAAE,GAAG,UAAU,EAAE,CAAC;AAClE,EAAE,MAAM,OAAO,GAAG,EAAE,CAAC;AACrB,EAAE,IAAI,qBAAqB,EAAE;AAC7B,IAAI,OAAO,CAAC,oCAAoC,CAAC,GAAG,qBAAqB,CAAC;AAC1E,GAAG;AACH,EAAE,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,EAAE;AAC3E,IAAI,IAAI,EAAE;AACV,MAAM,IAAI;AACV,MAAM,KAAK;AACX,MAAM,aAAa;AACnB,MAAM,IAAI,EAAE,eAAe;AAC3B,KAAK;AACL,IAAI,OAAO;AACX,GAAG,CAAC,CAAC;AACL,EAAE,IAAI,QAAQ,CAAC,MAAM,EAAE;AACvB,IAAI,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACrC,GAAG;AACH,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,WAAW,EAAE,CAAC;AAC5E;;;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { applyDiscountToAddress, createAddress, deleteAddress, getAddress, listAddresses, mergeAddresses, removeDiscountsFromAddress, skipFutureCharge, updateAddress } from './api/address.js';
|
|
2
|
-
export { loginShopifyApi, loginShopifyAppProxy } from './api/auth.js';
|
|
2
|
+
export { loginShopifyApi, loginShopifyAppProxy, sendPasswordlessCode, sendPasswordlessCodeAppProxy, validatePasswordlessCode, validatePasswordlessCodeAppProxy } from './api/auth.js';
|
|
3
3
|
export { applyDiscountToCharge, getCharge, listCharges, processCharge, removeDiscountsFromCharge, skipCharge, unskipCharge } from './api/charge.js';
|
|
4
4
|
export { getCDNBundleSettings, getCDNProduct, getCDNProductAndSettings, getCDNProducts, getCDNProductsAndSettings, getCDNStoreSettings, getCDNWidgetSettings, resetCDNCache } from './api/cdn.js';
|
|
5
5
|
export { getBundleId, getDynamicBundleItems, validateBundle, validateDynamicBundle } from './api/bundle.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -904,6 +904,10 @@ declare function skipFutureCharge(session: Session, id: string | number, skipReq
|
|
|
904
904
|
|
|
905
905
|
declare function loginShopifyAppProxy(): Promise<Session>;
|
|
906
906
|
declare function loginShopifyApi(shopifyStorefrontToken: string, shopifyCustomerAccessToken?: string): Promise<Session | null>;
|
|
907
|
+
declare function sendPasswordlessCode(email: string): Promise<string>;
|
|
908
|
+
declare function sendPasswordlessCodeAppProxy(email: string): Promise<string>;
|
|
909
|
+
declare function validatePasswordlessCode(email: string, session_token: string, code: string): Promise<Session>;
|
|
910
|
+
declare function validatePasswordlessCodeAppProxy(email: string, session_token: string, code: string): Promise<Session>;
|
|
907
911
|
|
|
908
912
|
declare function getCharge(session: Session, id: number | string, options?: GetChargeOptions): Promise<Charge>;
|
|
909
913
|
/** Lists charges */
|
|
@@ -951,6 +955,15 @@ interface LoginResponse {
|
|
|
951
955
|
api_token: string;
|
|
952
956
|
customer_id?: string;
|
|
953
957
|
}
|
|
958
|
+
interface PasswordlessCodeResponse {
|
|
959
|
+
session_token: string;
|
|
960
|
+
errors?: string;
|
|
961
|
+
}
|
|
962
|
+
interface PasswordlessValidateResponse {
|
|
963
|
+
api_token: string;
|
|
964
|
+
customer_id: string;
|
|
965
|
+
errors?: string;
|
|
966
|
+
}
|
|
954
967
|
|
|
955
968
|
interface BundleSelection {
|
|
956
969
|
collectionId: string;
|
|
@@ -1441,7 +1454,7 @@ interface OnetimeCreateProps {
|
|
|
1441
1454
|
add_to_next_charge?: boolean;
|
|
1442
1455
|
}
|
|
1443
1456
|
declare type CreateOnetimeRequest = SubType<Onetime, OnetimeRequiredCreateProps, OnetimeOptionalCreateProps> & OnetimeCreateProps;
|
|
1444
|
-
declare type OnetimeOptionalUpdateProps = '
|
|
1457
|
+
declare type OnetimeOptionalUpdateProps = 'next_charge_scheduled_at' | 'properties' | 'quantity' | 'external_variant_id' | 'sku';
|
|
1445
1458
|
declare type UpdateOnetimeRequest = Partial<Pick<Onetime, OnetimeOptionalUpdateProps>>;
|
|
1446
1459
|
interface OnetimesResponse {
|
|
1447
1460
|
next_cursor: null | string;
|
|
@@ -1662,4 +1675,4 @@ declare const api: {
|
|
|
1662
1675
|
};
|
|
1663
1676
|
declare function initRecharge(opt?: InitOptions): void;
|
|
1664
1677
|
|
|
1665
|
-
export { ActivateMembershipRequest, Address, AddressIncludes, AddressListParams, AddressListResponse, AddressResponse, AddressSortBy, AnalyticsData, AssociatedAddress, Bundle, BundleItem, BundleProperties, BundleSelection, BundleTranslations, CDNBaseWidgetSettings, CDNBundleLayoutSettings, CDNBundleSettings, CDNBundleStep, CDNBundleStepOption, CDNBundleVariant, CDNBundleVariantOptionSource, CDNBundleVariantSelectionDefault, CDNPrices, CDNProduct, CDNProductAndSettings, CDNProductKeyObject, CDNProductOption, CDNProductOptionValue, CDNProductRaw, CDNProductResource, CDNProductsAndSettings, CDNProductsAndSettingsResource, CDNSellingPlan, CDNSellingPlanAllocations, CDNSellingPlanGroup, CDNStoreSettings, CDNSubscriptionOption, CDNVariant, CDNVariantOptionValue, CDNWidgetSettings, CDNWidgetSettingsRaw, CDNWidgetSettingsResource, CRUDRequestOptions, CancelMembershipRequest, CancelSubscriptionRequest, ChannelSettings, Charge, ChargeIncludes, ChargeListParams, ChargeListResponse, ChargeResponse, ChargeSortBy, ChargeStatus, ColorString, CreateAddressRequest, CreateOnetimeRequest, CreateSubscriptionRequest, Customer, CustomerDeliveryScheduleParams, CustomerDeliveryScheduleResponse, CustomerIncludes, CustomerOptionalUpdateProps, Delivery, DeliveryLineItem, DeliveryOrder, DeliveryPaymentMethod, Discount, ExternalId, ExternalTransactionId, FirstOption, GetAddressOptions, GetChargeOptions, GetCustomerOptions, GetPaymentMethodOptions, GetRequestOptions, GetSubscriptionOptions, HTMLString, InitOptions, IntervalUnit, IsoDateString, LineItem, ListParams, LoginResponse, Membership, MembershipIncludes, MembershipListParams, MembershipListResponse, MembershipResponse, MembershipStatus, MembershipsSortBy, MergeAddressesRequest, Method, Onetime, OnetimeCreateProps, OnetimeListParams, OnetimeOptionalCreateProps, OnetimeOptionalUpdateProps, OnetimeRequiredCreateProps, OnetimesResponse, OnetimesSortBy, Order, OrderListParams, OrderSortBy, OrderStatus, OrderType, OrdersResponse, PaymentDetails, PaymentMethod, PaymentMethodIncludes, PaymentMethodListParams, PaymentMethodOptionalUpdateProps, PaymentMethodSortBy, PaymentMethodStatus, PaymentMethodsResponse, PaymentType, Plan, PlanListParams, PlanSortBy, PlanType, PlansResponse, PriceAdjustmentsType, ProcessorName, ProductImage, Property, Request, RequestHeaders, RequestOptions, RequestOptionsHeaders, Session, ShippingLine, SkipFutureChargeAddressRequest, SkipFutureChargeAddressResponse, StorefrontEnvironment, StorefrontOptions, StorefrontPurchaseOption, SubType, Subscription, SubscriptionIncludes, SubscriptionListParams, SubscriptionOptionalCreateProps, SubscriptionOptionalUpdateProps, SubscriptionPreferences, SubscriptionRequiredCreateProps, SubscriptionSortBy, SubscriptionStatus, SubscriptionsResponse, TaxLine, Translations, UpdateAddressRequest, UpdateCustomerRequest, UpdateOnetimeRequest, UpdatePaymentMethodRequest, UpdateSubscriptionParams, UpdateSubscriptionRequest, WidgetIconColor, WidgetTemplateType, activateMembership, activateSubscription, api, applyDiscountToAddress, applyDiscountToCharge, cancelMembership, cancelSubscription, createAddress, createOnetime, createSubscription, deleteAddress, deleteOnetime, getAddress, getBundleId, getCDNBundleSettings, getCDNProduct, getCDNProductAndSettings, getCDNProducts, getCDNProductsAndSettings, getCDNStoreSettings, getCDNWidgetSettings, getCharge, getCustomer, getDeliverySchedule, getDynamicBundleItems, getMembership, getOnetime, getOrder, getPaymentMethod, getPlan, getSubscription, initRecharge, listAddresses, listCharges, listMemberships, listOnetimes, listOrders, listPaymentMethods, listPlans, listSubscriptions, loginShopifyApi, loginShopifyAppProxy, membershipIncludes, mergeAddresses, processCharge, removeDiscountsFromAddress, removeDiscountsFromCharge, resetCDNCache, skipCharge, skipFutureCharge, skipSubscriptionCharge, unskipCharge, updateAddress, updateCustomer, updateOnetime, updatePaymentMethod, updateSubscription, updateSubscriptionAddress, updateSubscriptionChargeDate, validateBundle, validateDynamicBundle };
|
|
1678
|
+
export { ActivateMembershipRequest, Address, AddressIncludes, AddressListParams, AddressListResponse, AddressResponse, AddressSortBy, AnalyticsData, AssociatedAddress, Bundle, BundleItem, BundleProperties, BundleSelection, BundleTranslations, CDNBaseWidgetSettings, CDNBundleLayoutSettings, CDNBundleSettings, CDNBundleStep, CDNBundleStepOption, CDNBundleVariant, CDNBundleVariantOptionSource, CDNBundleVariantSelectionDefault, CDNPrices, CDNProduct, CDNProductAndSettings, CDNProductKeyObject, CDNProductOption, CDNProductOptionValue, CDNProductRaw, CDNProductResource, CDNProductsAndSettings, CDNProductsAndSettingsResource, CDNSellingPlan, CDNSellingPlanAllocations, CDNSellingPlanGroup, CDNStoreSettings, CDNSubscriptionOption, CDNVariant, CDNVariantOptionValue, CDNWidgetSettings, CDNWidgetSettingsRaw, CDNWidgetSettingsResource, CRUDRequestOptions, CancelMembershipRequest, CancelSubscriptionRequest, ChannelSettings, Charge, ChargeIncludes, ChargeListParams, ChargeListResponse, ChargeResponse, ChargeSortBy, ChargeStatus, ColorString, CreateAddressRequest, CreateOnetimeRequest, CreateSubscriptionRequest, Customer, CustomerDeliveryScheduleParams, CustomerDeliveryScheduleResponse, CustomerIncludes, CustomerOptionalUpdateProps, Delivery, DeliveryLineItem, DeliveryOrder, DeliveryPaymentMethod, Discount, ExternalId, ExternalTransactionId, FirstOption, GetAddressOptions, GetChargeOptions, GetCustomerOptions, GetPaymentMethodOptions, GetRequestOptions, GetSubscriptionOptions, HTMLString, InitOptions, IntervalUnit, IsoDateString, LineItem, ListParams, LoginResponse, Membership, MembershipIncludes, MembershipListParams, MembershipListResponse, MembershipResponse, MembershipStatus, MembershipsSortBy, MergeAddressesRequest, Method, Onetime, OnetimeCreateProps, OnetimeListParams, OnetimeOptionalCreateProps, OnetimeOptionalUpdateProps, OnetimeRequiredCreateProps, OnetimesResponse, OnetimesSortBy, Order, OrderListParams, OrderSortBy, OrderStatus, OrderType, OrdersResponse, PasswordlessCodeResponse, PasswordlessValidateResponse, PaymentDetails, PaymentMethod, PaymentMethodIncludes, PaymentMethodListParams, PaymentMethodOptionalUpdateProps, PaymentMethodSortBy, PaymentMethodStatus, PaymentMethodsResponse, PaymentType, Plan, PlanListParams, PlanSortBy, PlanType, PlansResponse, PriceAdjustmentsType, ProcessorName, ProductImage, Property, Request, RequestHeaders, RequestOptions, RequestOptionsHeaders, Session, ShippingLine, SkipFutureChargeAddressRequest, SkipFutureChargeAddressResponse, StorefrontEnvironment, StorefrontOptions, StorefrontPurchaseOption, SubType, Subscription, SubscriptionIncludes, SubscriptionListParams, SubscriptionOptionalCreateProps, SubscriptionOptionalUpdateProps, SubscriptionPreferences, SubscriptionRequiredCreateProps, SubscriptionSortBy, SubscriptionStatus, SubscriptionsResponse, TaxLine, Translations, UpdateAddressRequest, UpdateCustomerRequest, UpdateOnetimeRequest, UpdatePaymentMethodRequest, UpdateSubscriptionParams, UpdateSubscriptionRequest, WidgetIconColor, WidgetTemplateType, activateMembership, activateSubscription, api, applyDiscountToAddress, applyDiscountToCharge, cancelMembership, cancelSubscription, createAddress, createOnetime, createSubscription, deleteAddress, deleteOnetime, getAddress, getBundleId, getCDNBundleSettings, getCDNProduct, getCDNProductAndSettings, getCDNProducts, getCDNProductsAndSettings, getCDNStoreSettings, getCDNWidgetSettings, getCharge, getCustomer, getDeliverySchedule, getDynamicBundleItems, getMembership, getOnetime, getOrder, getPaymentMethod, getPlan, getSubscription, initRecharge, listAddresses, listCharges, listMemberships, listOnetimes, listOrders, listPaymentMethods, listPlans, listSubscriptions, loginShopifyApi, loginShopifyAppProxy, membershipIncludes, mergeAddresses, processCharge, removeDiscountsFromAddress, removeDiscountsFromCharge, resetCDNCache, sendPasswordlessCode, sendPasswordlessCodeAppProxy, skipCharge, skipFutureCharge, skipSubscriptionCharge, unskipCharge, updateAddress, updateCustomer, updateOnetime, updatePaymentMethod, updateSubscription, updateSubscriptionAddress, updateSubscriptionChargeDate, validateBundle, validateDynamicBundle, validatePasswordlessCode, validatePasswordlessCodeAppProxy };
|