Skip to content

Commit 0fc9c78

Browse files
authored
Merge pull request #53 from Space48/add-product-channel-assignments
Add support for product channel assignments
2 parents 0b7c6e6 + a0f4a1d commit 0fc9c78

8 files changed

Lines changed: 63 additions & 3 deletions

File tree

docs/big-commerce/reference.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
* [products[].variants[].metafields](#productsvariantsmetafields)
5252
* [products[].videos](#productsvideos)
5353
* [products.variants](#productsvariants)
54+
* [products.channel-assignments](#productschannel-assignments)
5455
* [promotions](#promotions)
5556
* [promotions[].codes](#promotionscodes)
5657
* [store](#store)
@@ -3193,6 +3194,39 @@ const command = bigCommerce.products.variants.update(input?: unknown);
31933194
```
31943195

31953196

3197+
## products.channel-assignments
3198+
3199+
### Endpoints
3200+
3201+
* [list](#productschannel-assignmentslist)
3202+
* [update](#productschannel-assignmentsupdate)
3203+
3204+
### products.channel-assignments.list
3205+
3206+
*CLI*
3207+
```sh
3208+
$ sdm 'big-commerce[some-store-alias].products.channel-assignments.list' [input-as-json5]
3209+
```
3210+
3211+
*TypeScript*
3212+
```javascript
3213+
const command = bigCommerce.products.channelAssignments.list(input?: unknown);
3214+
```
3215+
3216+
3217+
### products.channel-assignments.update
3218+
3219+
*CLI*
3220+
```sh
3221+
$ sdm 'big-commerce[some-store-alias].products.channel-assignments.update' [input-as-json5]
3222+
```
3223+
3224+
*TypeScript*
3225+
```javascript
3226+
const command = bigCommerce.products.channelAssignments.update(input?: unknown);
3227+
```
3228+
3229+
31963230
## promotions
31973231

31983232
### Endpoints

docs/summary.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
* [products[].variants[].metafields](#productsvariantsmetafields)
5454
* [products[].videos](#productsvideos)
5555
* [products.variants](#productsvariants)
56+
* [products.channel-assignments](#productschannel-assignments)
5657
* [promotions](#promotions)
5758
* [promotions[].codes](#promotionscodes)
5859
* [store](#store)

lib/connectors/big-commerce/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,12 @@ export declare const bigCommerce: f.Connector<{
402402
update: f.EndpointDefinition<BigCommerce, object, object>;
403403
};
404404
};
405+
channelAssignments: {
406+
endpoints: {
407+
list: f.EndpointDefinition<BigCommerce, Query | undefined, object>;
408+
update: f.EndpointDefinition<BigCommerce, object, object>;
409+
};
410+
};
405411
}, {
406412
idField: string;
407413
listIds: (client: BigCommerce) => (path: f.Path) => AsyncIterable<string | number>;

lib/connectors/big-commerce/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ exports.bigCommerce = framework_1.connector({
289289
update: functions_1.batch.updateMany("v3/catalog/variants"),
290290
},
291291
},
292+
channelAssignments: {
293+
endpoints: {
294+
list: functions_1.endpoint.list("v3/catalog/products/channel-assignments"),
295+
update: functions_1.batch.updateMany("v3/catalog/products/channel-assignments")
296+
}
297+
}
292298
},
293299
documents: {
294300
resources: {

lib/connectors/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,12 @@ export declare const regularConnectors: {
405405
update: import("..").EndpointDefinition<import("./big-commerce/client").default, object, object>;
406406
};
407407
};
408+
channelAssignments: {
409+
endpoints: {
410+
list: import("..").EndpointDefinition<import("./big-commerce/client").default, import("./big-commerce/functions").Query | undefined, object>;
411+
update: import("..").EndpointDefinition<import("./big-commerce/client").default, object, object>;
412+
};
413+
};
408414
}, {
409415
idField: string;
410416
listIds: (client: import("./big-commerce/client").default) => (path: import("..").Path) => AsyncIterable<string | number>;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@space48/sdm",
3-
"version": "0.20.0",
3+
"version": "0.21.0",
44
"description": "Command line tools for piping data in and out of APIs",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

src/connectors/big-commerce/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,13 @@ export const bigCommerce = connector({
304304
update: batch.updateMany("v3/catalog/variants"),
305305
},
306306
},
307+
308+
channelAssignments: {
309+
endpoints: {
310+
list: endpoint.list("v3/catalog/products/channel-assignments"),
311+
update: batch.updateMany("v3/catalog/products/channel-assignments"),
312+
},
313+
},
307314
},
308315

309316
documents: {

0 commit comments

Comments
 (0)