Skip to content

Commit

Permalink
feat: update resources to schema v6.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pviti committed Aug 13, 2024
1 parent 6bac789 commit bbe731a
Show file tree
Hide file tree
Showing 19 changed files with 1,618 additions and 1,161 deletions.
498 changes: 488 additions & 10 deletions gen/openapi.json

Large diffs are not rendered by default.

103 changes: 92 additions & 11 deletions gen/resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@
"default": 71,
"creatable": true,
"updatable": true,
"fetchable": false,
"fetchable": true,
"filterable": false,
"sortable": false,
"example": "71"
Expand Down Expand Up @@ -4770,8 +4770,8 @@
"type": "has_one",
"desc": "The associated market.",
"required": "optional",
"creatable": false,
"updatable": false,
"creatable": true,
"updatable": true,
"filterable": true,
"sortable": true,
"parent_resource": "Api::CarrierAccountResource",
Expand Down Expand Up @@ -7958,7 +7958,8 @@
"deprecated": false,
"actions": [
"list",
"retrieve"
"retrieve",
"update"
],
"examples": {},
"filter_scopes": [],
Expand All @@ -7974,6 +7975,18 @@
"sortable": true,
"example": "orders.create"
},
"_trigger": {
"type": "boolean",
"trigger": true,
"desc": "Send this attribute if you want to force webhooks execution for this event.",
"prohibited": true,
"creatable": false,
"updatable": true,
"fetchable": false,
"filterable": false,
"sortable": false,
"example": "true"
},
"id": {
"format": "id",
"type": "string",
Expand Down Expand Up @@ -15051,7 +15064,7 @@
"fetchable": true,
"filterable": true,
"sortable": false,
"example": "market:GhvCxsElAQ,market:kJhgVcxZDr"
"example": "market:id:GhvCxsElAQ,market:id:kJhgVcxZDr"
},
"starts_at": {
"type": "datetime",
Expand Down Expand Up @@ -15105,14 +15118,14 @@
"domain": {
"type": "string",
"desc": "The link URL second level domain.",
"required": "optional, default to \"c11r.link\"",
"default": "c11r.link",
"required": "optional, default to \"commercelayer.link\"",
"default": "commercelayer.link",
"creatable": true,
"updatable": true,
"fetchable": true,
"filterable": false,
"sortable": false,
"example": "c11r.link"
"example": "commercelayer.link"
},
"url": {
"type": "string",
Expand All @@ -15124,6 +15137,22 @@
"sortable": false,
"example": "https://c11r.link/ZXUtd2VzdC0xLzE5ZjBlMGVlLTg4OGMtNDQ1Yi1iYTA0LTg3MTUxY2FjZjFmYQ"
},
"item_type": {
"type": "string",
"desc": "The type of the associated item. One of 'orders', 'skus', or 'sku_lists'.",
"delegate": "item_resource_type",
"creatable": true,
"updatable": false,
"fetchable": true,
"filterable": true,
"sortable": true,
"example": "orders",
"enum": [
"orders",
"skus",
"sku_lists"
]
},
"id": {
"format": "id",
"type": "string",
Expand Down Expand Up @@ -15232,7 +15261,7 @@
"relationships": {
"item": {
"type": "has_one",
"desc": "The polymorphic item associated to the link. One of 'orders', or 'sku_lists'.",
"desc": "The polymorphic item associated to the link. One of 'orders', 'skus', or 'sku_lists'.",
"required": "required",
"creatable": true,
"updatable": true,
Expand All @@ -15244,6 +15273,7 @@
"class_name": "Item",
"enum": [
"orders",
"skus",
"sku_lists"
]
},
Expand All @@ -15263,6 +15293,7 @@
"scope",
"starts_at",
"expires_at",
"item_type",
"disabled_at",
"created_at",
"updated_at",
Expand Down Expand Up @@ -15919,6 +15950,17 @@
"parent_resource": "Api::MarketResource",
"class_name": "PriceListScheduler"
},
"order_validation_rules": {
"type": "has_many",
"desc": "The associated order validation rules.",
"filterable": true,
"sortable": false,
"polymorphic": true,
"sti": true,
"deprecated": true,
"parent_resource": "Api::MarketResource",
"class_name": "OrderValidationRule"
},
"attachments": {
"type": "has_many",
"desc": "The associated attachments.",
Expand Down Expand Up @@ -15958,6 +16000,7 @@
"customer_group_id",
"geocoder_id",
"price_list_schedulers_id",
"order_validation_rules_id",
"attachments_id",
"ids",
"disabled_at_from",
Expand Down Expand Up @@ -17076,7 +17119,7 @@
},
"place_total_amount_cents": {
"type": "integer",
"desc": "The total amount at place time, in cents.",
"desc": "The total amount at place time, in cents, which is used internally for editing.",
"creatable": false,
"updatable": false,
"fetchable": true,
Expand Down Expand Up @@ -17376,7 +17419,7 @@
"_fulfill": {
"type": "boolean",
"trigger": true,
"desc": "Send this attribute if you want to mark as fulfilled a shipped/delivered order.",
"desc": "Send this attribute if you want to mark as fulfilled the order (shipments must be cancelled, shipped or delivered).",
"prohibited": true,
"creatable": false,
"updatable": true,
Expand Down Expand Up @@ -18045,6 +18088,14 @@
"parent_resource": "Api::OrderResource",
"class_name": "Attachment"
},
"links": {
"type": "has_many",
"desc": "The associated links.",
"filterable": true,
"sortable": false,
"parent_resource": "Api::OrderResource",
"class_name": "Link"
},
"resource_errors": {
"type": "has_many",
"desc": "The associated resource errors.",
Expand Down Expand Up @@ -18152,6 +18203,7 @@
"order_copies_id",
"recurring_order_copies_id",
"attachments_id",
"links_id",
"resource_errors_id",
"events_id",
"tags_id",
Expand Down Expand Up @@ -25281,6 +25333,17 @@
"desc": "The associated stock reservations.",
"parent_resource": "Api::ReservedStockResource",
"class_name": "StockReservation"
},
"versions": {
"type": "has_many",
"desc": "The associated changes.",
"creatable": false,
"updatable": false,
"fetchable": true,
"filterable": false,
"sortable": false,
"parent_resource": "Api::ReservedStockResource",
"class_name": "Version"
}
},
"filters": [
Expand Down Expand Up @@ -29279,6 +29342,14 @@
"parent_resource": "Api::SkuResource",
"class_name": "Attachment"
},
"links": {
"type": "has_many",
"desc": "The associated links.",
"filterable": true,
"sortable": false,
"parent_resource": "Api::SkuResource",
"class_name": "Link"
},
"events": {
"type": "has_many",
"desc": "The associated events.",
Expand Down Expand Up @@ -29330,6 +29401,7 @@
"stock_reservations_id",
"delivery_lead_times_id",
"attachments_id",
"links_id",
"events_id",
"tags_id",
"ids",
Expand Down Expand Up @@ -29541,6 +29613,14 @@
"parent_resource": "Api::SkuListResource",
"class_name": "Attachment"
},
"links": {
"type": "has_many",
"desc": "The associated links.",
"filterable": true,
"sortable": false,
"parent_resource": "Api::SkuListResource",
"class_name": "Link"
},
"versions": {
"type": "has_many",
"desc": "The associated changes.",
Expand Down Expand Up @@ -29569,6 +29649,7 @@
"customer_id",
"sku_list_items_id",
"attachments_id",
"links_id",
"ids",
"created_at_from",
"created_at_to",
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@
"node": ">=20"
},
"devDependencies": {
"@babel/preset-env": "^7.24.8",
"@babel/preset-env": "^7.25.3",
"@babel/preset-typescript": "^7.24.7",
"@commercelayer/eslint-config-ts": "1.4.5",
"@commercelayer/js-auth": "^6.3.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/debug": "^4.1.12",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.11",
"@types/node": "^22.2.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"jest": "^29.7.0",
"json-typescript": "^1.1.2",
"jsonapi-typescript": "^0.1.3",
"lodash.isequal": "^4.5.0",
"semantic-release": "^23.1.1",
"tsup": "^8.2.2",
"tsx": "^4.16.2",
"semantic-release": "^24.0.0",
"tsup": "^8.2.4",
"tsx": "^4.17.0",
"typescript": "^5.5.4"
},
"repository": "github:commercelayer/commercelayer-sdk",
Expand Down
Loading

0 comments on commit bbe731a

Please sign in to comment.