perspectapi-ts-sdk 1.5.1 → 1.5.2
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/index.js
CHANGED
|
@@ -906,7 +906,11 @@ var CategoriesClient = class extends BaseClient {
|
|
|
906
906
|
*/
|
|
907
907
|
async getProductCategoryBySlug(siteName, slug) {
|
|
908
908
|
return this.http.get(this.buildPath(
|
|
909
|
-
this.siteScopedEndpoint(
|
|
909
|
+
this.siteScopedEndpoint(
|
|
910
|
+
siteName,
|
|
911
|
+
`/product_category/slug/${encodeURIComponent(slug)}`,
|
|
912
|
+
{ includeSitesSegment: false }
|
|
913
|
+
)
|
|
910
914
|
));
|
|
911
915
|
}
|
|
912
916
|
/**
|
|
@@ -1105,7 +1109,7 @@ var CheckoutClient = class extends BaseClient {
|
|
|
1105
1109
|
token = csrfToken2;
|
|
1106
1110
|
}
|
|
1107
1111
|
return this.http.request(this.buildPath(
|
|
1108
|
-
this.siteScopedEndpoint(siteName, "/checkout/create-session")
|
|
1112
|
+
this.siteScopedEndpoint(siteName, "/checkout/create-session", { includeSitesSegment: false })
|
|
1109
1113
|
), {
|
|
1110
1114
|
method: "POST",
|
|
1111
1115
|
body: data,
|
package/dist/index.mjs
CHANGED
|
@@ -848,7 +848,11 @@ var CategoriesClient = class extends BaseClient {
|
|
|
848
848
|
*/
|
|
849
849
|
async getProductCategoryBySlug(siteName, slug) {
|
|
850
850
|
return this.http.get(this.buildPath(
|
|
851
|
-
this.siteScopedEndpoint(
|
|
851
|
+
this.siteScopedEndpoint(
|
|
852
|
+
siteName,
|
|
853
|
+
`/product_category/slug/${encodeURIComponent(slug)}`,
|
|
854
|
+
{ includeSitesSegment: false }
|
|
855
|
+
)
|
|
852
856
|
));
|
|
853
857
|
}
|
|
854
858
|
/**
|
|
@@ -1047,7 +1051,7 @@ var CheckoutClient = class extends BaseClient {
|
|
|
1047
1051
|
token = csrfToken2;
|
|
1048
1052
|
}
|
|
1049
1053
|
return this.http.request(this.buildPath(
|
|
1050
|
-
this.siteScopedEndpoint(siteName, "/checkout/create-session")
|
|
1054
|
+
this.siteScopedEndpoint(siteName, "/checkout/create-session", { includeSitesSegment: false })
|
|
1051
1055
|
), {
|
|
1052
1056
|
method: "POST",
|
|
1053
1057
|
body: data,
|
package/package.json
CHANGED
|
@@ -46,7 +46,11 @@ export class CategoriesClient extends BaseClient {
|
|
|
46
46
|
*/
|
|
47
47
|
async getProductCategoryBySlug(siteName: string, slug: string): Promise<ApiResponse<Category>> {
|
|
48
48
|
return this.http.get(this.buildPath(
|
|
49
|
-
this.siteScopedEndpoint(
|
|
49
|
+
this.siteScopedEndpoint(
|
|
50
|
+
siteName,
|
|
51
|
+
`/product_category/slug/${encodeURIComponent(slug)}`,
|
|
52
|
+
{ includeSitesSegment: false }
|
|
53
|
+
)
|
|
50
54
|
));
|
|
51
55
|
}
|
|
52
56
|
|
|
@@ -52,7 +52,7 @@ export class CheckoutClient extends BaseClient {
|
|
|
52
52
|
|
|
53
53
|
// Make the checkout request with CSRF token in headers
|
|
54
54
|
return this.http.request(this.buildPath(
|
|
55
|
-
this.siteScopedEndpoint(siteName, '/checkout/create-session')
|
|
55
|
+
this.siteScopedEndpoint(siteName, '/checkout/create-session', { includeSitesSegment: false })
|
|
56
56
|
), {
|
|
57
57
|
method: 'POST',
|
|
58
58
|
body: data,
|