chore: Remove unused clients in admin + clean up js-sdk (#8839)

* feat(js-sdk): Add API key

* chore: Remove unused clients in admin + clean up js-sdk

* fix sales channel hooks
This commit is contained in:
Oli Juhl
2024-08-28 15:43:55 +02:00
committed by GitHub
parent 5294ce8654
commit 37b7592fba
20 changed files with 98 additions and 300 deletions
+13
View File
@@ -18,6 +18,19 @@ export class Payment {
)
}
async listPaymentProviders(
query?: HttpTypes.AdminGetPaymentProvidersParams,
headers?: ClientHeaders
) {
return await this.client.fetch<HttpTypes.AdminPaymentProviderListResponse>(
`/admin/payments/payment-providers`,
{
query,
headers,
}
)
}
async retrieve(
id: string,
query?: HttpTypes.AdminPaymentFilters,
@@ -94,4 +94,19 @@ export class SalesChannel {
}
)
}
async batchProducts(
id: string,
body: HttpTypes.AdminBatchLink,
headers?: ClientHeaders
) {
return await this.client.fetch<HttpTypes.AdminSalesChannelResponse>(
`/admin/sales-channels/${id}/products`,
{
method: "POST",
headers,
body,
}
)
}
}