New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bss-sbc/shopify-api-fetcher

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bss-sbc/shopify-api-fetcher - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

dist/graphql.d.ts

@@ -25,3 +25,3 @@ import fetch, { RequestInfo, RequestInit } from 'node-fetch';

query: string;
variable?: any;
variables?: any;
};

@@ -28,0 +28,0 @@ declare class ShopifyGraphQL {

{
"name": "@bss-sbc/shopify-api-fetcher",
"version": "2.0.0",
"version": "2.0.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -26,26 +26,44 @@ # Shopify API Fetcher

```javascript
// To bulk initialize
const shops = [
{ id: 1, domain: 'dev-mida-dean.myshopify.com' },
{ id: 2, domain: 'dev-mida-store.myshopify.com' },
]
const intialized = BucketManager.initializeAll(shops);
const { GraphQL, Rest } = require("@bss-sbc/shopify-api-fetcher");
// To initialize
BucketManager.initializeOne({
id: 1,
domain: 'dev-mida-dean.myshopify.com',
});
const DOMAIN="...replace this....myshopify.com"
const TOKEN="...replace this..."
const API_VERSION="2022-10"
// To get specific bucket
const bucket = BucketManager.get('dev-mida-dean.myshopify.com');
async function main() {
await GraphQL.safeFetch(DOMAIN, TOKEN, {
query: `
query queryShop {
shop {
name
email
contactEmail
myshopifyDomain
ianaTimezone
currencyCode
currencyFormats {
moneyFormat
}
}
}
`,
}).then(data => console.log(JSON.stringify(data)));
// To clean up specific bucket
BucketManager.clear('dev-mida-dean.myshopify.com');
await Rest.safeFetch(DOMAIN, `https://${DOMAIN}/admin/api/${API_VERSION}/shop.json`, {
method: "GET",
headers: {
"Content-Type": "application/json",
'X-Shopify-Access-Token': TOKEN,
}
}).then(response => response.json()).then(data => console.log(JSON.stringify(data)));
}
// Auto initialize bucket,
// using safeFetch
const response = await safeFetch(domain, url, params);
main().finally(() => {
process.exit(0);
});
```
### Roadmap

@@ -52,0 +70,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc