@foxtware/mineral 0.1.0 → 0.1.1

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.
Files changed (59) hide show
  1. package/.creds.yml.sample +5 -0
  2. package/README.md +1 -1
  3. package/_build_scripts/publish.js +85 -0
  4. package/api/logiwa/logiwa.constants.js +8 -0
  5. package/api/logiwa/logiwa.utils.js +53 -0
  6. package/api/logiwa/logiwaAuthGet.js +86 -0
  7. package/api/logiwa/logiwaInventoriesGet.js +67 -0
  8. package/api/logiwa/logiwaOrderGet.js +54 -0
  9. package/api/logiwa/logiwaOrdersGet.js +92 -0
  10. package/api/logiwa/logiwaProductGet.js +54 -0
  11. package/api/logiwa/logiwaProductsGet.js +80 -0
  12. package/api/logiwa/logiwaReportGetAvailableToPromise.js +179 -0
  13. package/api/logiwa/logiwaReportGetInventoryCalculation.js +62 -0
  14. package/api/logiwa/logiwaReportGetInventorySnapshot.js +66 -0
  15. package/api/logiwa/logiwaReportGetTotalInventory.js +72 -0
  16. package/api/logiwa/logiwaWebhookStatusGet.js +54 -0
  17. package/api/logiwa/logiwaWebhookSubscribe.js +64 -0
  18. package/api/logiwa/logiwaWebhookUnsubscribe.js +54 -0
  19. package/api/logiwa/logiwaWebhooksGet.js +48 -0
  20. package/api/shopify/_example.get.js +46 -0
  21. package/api/shopify/shopifyAbandonedCheckoutsGet.js +46 -0
  22. package/api/shopify/shopifyArticlesGet.js +46 -0
  23. package/api/shopify/shopifyBlogsGet.js +46 -0
  24. package/api/shopify/shopifyBulkOperationsGet.js +46 -0
  25. package/api/shopify/shopifyCatalogsGet.js +46 -0
  26. package/api/shopify/shopifyChannelsGet.js +46 -0
  27. package/api/shopify/shopifyCheckoutAndAccountsConfigurationsGet.js +46 -0
  28. package/api/shopify/shopifyCollectionsGet.js +46 -0
  29. package/api/shopify/shopifyCustomersGet.js +2 -0
  30. package/api/shopify/shopifyDeliveryCustomizationsGet.js +46 -0
  31. package/api/shopify/shopifyDeliveryProfilesGet.js +46 -0
  32. package/api/shopify/shopifyDiscountNodesGet.js +46 -0
  33. package/api/shopify/shopifyDisputesGet.js +46 -0
  34. package/api/shopify/shopifyDraftOrdersGet.js +46 -0
  35. package/api/shopify/shopifyEventsGet.js +46 -0
  36. package/api/shopify/shopifyFilesGet.js +46 -0
  37. package/api/shopify/shopifyFulfillmentOrdersGet.js +46 -0
  38. package/api/shopify/shopifyGiftCardsGet.js +46 -0
  39. package/api/shopify/shopifyInventoryItemsGet.js +46 -0
  40. package/api/shopify/shopifyLocationsGet.js +46 -0
  41. package/api/shopify/shopifyMarketingEventsGet.js +46 -0
  42. package/api/shopify/shopifyMarketsGet.js +46 -0
  43. package/api/shopify/shopifyMenusGet.js +46 -0
  44. package/api/shopify/shopifyMetafieldDefinitionsGet.js +50 -0
  45. package/api/shopify/shopifyMetaobjectDefinitionsGet.js +46 -0
  46. package/api/shopify/shopifyMetaobjectsGet.js +50 -0
  47. package/api/shopify/shopifyPagesGet.js +46 -0
  48. package/api/shopify/shopifyPaymentCustomizationsGet.js +46 -0
  49. package/api/shopify/shopifyProductFeedsGet.js +46 -0
  50. package/api/shopify/shopifyProductVariantsGet.js +46 -0
  51. package/api/shopify/shopifyProductsGet.js +46 -0
  52. package/api/shopify/shopifyPublicationsGet.js +46 -0
  53. package/api/shopify/shopifySegmentsGet.js +46 -0
  54. package/api/shopify/shopifyUrlRedirectsGet.js +46 -0
  55. package/api/shopify/shopifyWebhookSubscriptionsGet.js +46 -0
  56. package/api/utils.js +4 -3
  57. package/api/workspace.js +43 -0
  58. package/package.json +5 -3
  59. package/server.js +205 -105
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/fulfillment-orders
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyFulfillmentOrdersGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'fulfillmentOrder', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyFulfillmentOrdersGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyFulfillmentOrdersGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/giftCards
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyGiftCardsGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'giftCard', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyGiftCardsGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyGiftCardsGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/inventoryItems
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyInventoryItemsGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'inventoryItem', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyInventoryItemsGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyInventoryItemsGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/locations
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyLocationsGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'location', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyLocationsGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyLocationsGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/marketingEvents
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyMarketingEventsGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'marketingEvent', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyMarketingEventsGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyMarketingEventsGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/markets
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyMarketsGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'market', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyMarketsGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyMarketsGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/menus
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyMenusGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'menu', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyMenusGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyMenusGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,50 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/metafieldDefinitions
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ['ownerType'],
10
+ ]);
11
+
12
+ const shopifyMetafieldDefinitionsGet = async (
13
+ credsPayload,
14
+ ownerType,
15
+ {
16
+ ...getterOptions // e.g. limit
17
+ } = {},
18
+ ) => {
19
+
20
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
21
+ credsPayload,
22
+ ownerType,
23
+ });
24
+ if (rejectResponse) {
25
+ return rejectResponse;
26
+ }
27
+
28
+ return await shopifyGet(credsPayload, 'metafieldDefinition', { ownerType, ...getterOptions });
29
+ };
30
+
31
+ const funcApiConfig = {
32
+ argsWarden,
33
+ };
34
+
35
+ module.exports = {
36
+ shopifyMetafieldDefinitionsGet,
37
+ funcApiConfig,
38
+ };
39
+
40
+ /*
41
+ curl -X POST "http://localhost:8000/shopifyMetafieldDefinitionsGet" \
42
+ -H "Content-Type: application/json" \
43
+ -d '{
44
+ "credsPayload": { "credsPath": "shopify.au" },
45
+ "ownerType": "PRODUCT",
46
+ "options": {
47
+ "limit": 10
48
+ }
49
+ }'
50
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/metaobjectDefinitions
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyMetaobjectDefinitionsGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'metaobjectDefinition', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyMetaobjectDefinitionsGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyMetaobjectDefinitionsGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,50 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/metaobjects
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ['type'],
10
+ ]);
11
+
12
+ const shopifyMetaobjectsGet = async (
13
+ credsPayload,
14
+ type,
15
+ {
16
+ ...getterOptions // e.g. limit
17
+ } = {},
18
+ ) => {
19
+
20
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
21
+ credsPayload,
22
+ type,
23
+ });
24
+ if (rejectResponse) {
25
+ return rejectResponse;
26
+ }
27
+
28
+ return await shopifyGet(credsPayload, 'metaobject', { type, ...getterOptions });
29
+ };
30
+
31
+ const funcApiConfig = {
32
+ argsWarden,
33
+ };
34
+
35
+ module.exports = {
36
+ shopifyMetaobjectsGet,
37
+ funcApiConfig,
38
+ };
39
+
40
+ /*
41
+ curl -X POST "http://localhost:8000/shopifyMetaobjectsGet" \
42
+ -H "Content-Type: application/json" \
43
+ -d '{
44
+ "credsPayload": { "credsPath": "shopify.au" },
45
+ "type": "image_hotspot",
46
+ "options": {
47
+ "limit": 10
48
+ }
49
+ }'
50
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/pages
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyPagesGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'page', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyPagesGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyPagesGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/paymentCustomizations
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyPaymentCustomizationsGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'paymentCustomization', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyPaymentCustomizationsGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyPaymentCustomizationsGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/productFeeds
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyProductFeedsGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'productFeed', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyProductFeedsGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyProductFeedsGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */
@@ -0,0 +1,46 @@
1
+ // https://shopify.dev/docs/api/admin-graphql/latest/queries/productVariants
2
+
3
+ const { ArgsWarden } = require('../utils');
4
+ const { credsValidator } = require('../validators');
5
+ const { shopifyGet } = require('./shopifyGet');
6
+
7
+ const argsWarden = new ArgsWarden([
8
+ ['credsPayload', credsValidator],
9
+ ]);
10
+
11
+ const shopifyProductVariantsGet = async (
12
+ credsPayload,
13
+ {
14
+ ...getterOptions // e.g. limit
15
+ } = {},
16
+ ) => {
17
+
18
+ const rejectResponse = await argsWarden.responseIfRejectingArgs({
19
+ credsPayload,
20
+ });
21
+ if (rejectResponse) {
22
+ return rejectResponse;
23
+ }
24
+
25
+ return await shopifyGet(credsPayload, 'productVariant', { ...getterOptions });
26
+ };
27
+
28
+ const funcApiConfig = {
29
+ argsWarden,
30
+ };
31
+
32
+ module.exports = {
33
+ shopifyProductVariantsGet,
34
+ funcApiConfig,
35
+ };
36
+
37
+ /*
38
+ curl -X POST "http://localhost:8000/shopifyProductVariantsGet" \
39
+ -H "Content-Type: application/json" \
40
+ -d '{
41
+ "credsPayload": { "credsPath": "shopify.au" },
42
+ "options": {
43
+ "limit": 10
44
+ }
45
+ }'
46
+ */