@shopify/admin-api-client
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -31,3 +31,3 @@ import { ApiClientConfig, CustomFetchApi, ApiClientLogger, ApiClientLogContentTypes, ApiClient } from '@shopify/graphql-client'; | ||
declare function createAdminApiClient({ storeDomain, apiVersion, accessToken, userAgentPrefix, retries, customFetchApi: clientFetchApi, logger, }: AdminApiClientOptions): AdminApiClient; | ||
declare function createAdminApiClient({ storeDomain, apiVersion, accessToken, userAgentPrefix, retries, customFetchApi, logger, }: AdminApiClientOptions): AdminApiClient; | ||
@@ -34,0 +34,0 @@ type SearchParamField = string | number; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
// This is value is replaced with package.json version during rollup build process | ||
const DEFAULT_CLIENT_VERSION = "0.2.0"; | ||
const DEFAULT_CLIENT_VERSION = "0.2.1"; | ||
const ACCESS_TOKEN_HEADER = "X-Shopify-Access-Token"; | ||
@@ -8,0 +8,0 @@ const CLIENT = "Admin API Client"; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
function createGraphQLClient({ headers, url, fetchApi = fetch, retries = 0, logger, }) { | ||
function createGraphQLClient({ headers, url, customFetchApi = fetch, retries = 0, logger, }) { | ||
utilities.validateRetries({ client: constants.CLIENT, retries }); | ||
@@ -17,3 +17,3 @@ const config = { | ||
const httpFetch$1 = httpFetch.generateHttpFetch({ | ||
fetchApi, | ||
customFetchApi, | ||
clientLogger, | ||
@@ -20,0 +20,0 @@ defaultRetryWaitTime: constants.RETRY_WAIT_TIME, |
@@ -6,3 +6,3 @@ 'use strict'; | ||
function generateHttpFetch({ clientLogger, fetchApi = fetch, client = constants.CLIENT, defaultRetryWaitTime = constants.RETRY_WAIT_TIME, retriableCodes = constants.RETRIABLE_STATUS_CODES, }) { | ||
function generateHttpFetch({ clientLogger, customFetchApi = fetch, client = constants.CLIENT, defaultRetryWaitTime = constants.RETRY_WAIT_TIME, retriableCodes = constants.RETRIABLE_STATUS_CODES, }) { | ||
const httpFetch = async (requestParams, count, maxRetries) => { | ||
@@ -13,3 +13,3 @@ const nextCount = count + 1; | ||
try { | ||
response = await fetchApi(...requestParams); | ||
response = await customFetchApi(...requestParams); | ||
clientLogger({ | ||
@@ -16,0 +16,0 @@ type: "HTTP-Response", |
@@ -10,3 +10,3 @@ 'use strict'; | ||
function createAdminApiClient({ storeDomain, apiVersion, accessToken, userAgentPrefix, retries = 0, customFetchApi: clientFetchApi, logger, }) { | ||
function createAdminApiClient({ storeDomain, apiVersion, accessToken, userAgentPrefix, retries = 0, customFetchApi, logger, }) { | ||
const currentSupportedApiVersions = apiVersions.getCurrentSupportedApiVersions(); | ||
@@ -48,3 +48,3 @@ const storeUrl = validations.validateDomainAndGetStoreUrl({ | ||
retries, | ||
fetchApi: clientFetchApi, | ||
customFetchApi, | ||
logger, | ||
@@ -51,0 +51,0 @@ }); |
@@ -34,3 +34,3 @@ 'use strict'; | ||
const httpFetch$1 = httpFetch.generateHttpFetch({ | ||
fetchApi: customFetchApi, | ||
customFetchApi, | ||
clientLogger, | ||
@@ -37,0 +37,0 @@ defaultRetryWaitTime: defaultRetryTime, |
import { AdminApiClientOptions } from "../types"; | ||
import { AdminApiClient } from "./types"; | ||
export declare function createAdminApiClient({ storeDomain, apiVersion, accessToken, userAgentPrefix, retries, customFetchApi: clientFetchApi, logger, }: AdminApiClientOptions): AdminApiClient; | ||
export declare function createAdminApiClient({ storeDomain, apiVersion, accessToken, userAgentPrefix, retries, customFetchApi, logger, }: AdminApiClientOptions): AdminApiClient; | ||
//# sourceMappingURL=client.d.ts.map |
{ | ||
"name": "@shopify/admin-api-client", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Shopify Admin API Client - A lightweight JS client to interact with Shopify's Admin API", | ||
@@ -63,3 +63,3 @@ "repository": { | ||
"dependencies": { | ||
"@shopify/graphql-client": "^0.9.0" | ||
"@shopify/graphql-client": "^0.9.1" | ||
}, | ||
@@ -66,0 +66,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12
192126