diff --git a/gen/openapi.json b/gen/openapi.json index d86a292e..0d2860b6 100644 --- a/gen/openapi.json +++ b/gen/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "Commerce Layer API", - "version": "5.4.0", + "version": "5.4.1", "contact": { "name": "API Support", "url": "https://commercelayer.io", @@ -16544,142 +16544,6 @@ } } }, - "/order_validation_rules": { - "get": { - "operationId": "GET/order_validation_rules", - "summary": "List all order validation rules", - "description": "List all order validation rules", - "tags": [ - "order_validation_rules" - ], - "responses": { - "200": { - "description": "A list of order validation rule objects", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/orderValidationRuleResponseList" - } - } - } - } - } - } - }, - "/order_validation_rules/{orderValidationRuleId}": { - "get": { - "operationId": "GET/order_validation_rules/orderValidationRuleId", - "summary": "Retrieve an order validation rule", - "description": "Retrieve an order validation rule", - "tags": [ - "order_validation_rules" - ], - "parameters": [ - { - "name": "orderValidationRuleId", - "in": "path", - "schema": { - "type": "string" - }, - "required": true, - "description": "The resource's id" - } - ], - "responses": { - "200": { - "description": "The order validation rule object", - "content": { - "application/vnd.api+json": { - "schema": { - "$ref": "#/components/schemas/orderValidationRuleResponse" - } - } - } - } - } - } - }, - "/order_validation_rules/{orderValidationRuleId}/market": { - "get": { - "operationId": "GET/orderValidationRuleId/market", - "summary": "Retrieve the market associated to the order validation rule", - "description": "Retrieve the market associated to the order validation rule", - "tags": [ - "has_one", - "markets" - ], - "parameters": [ - { - "name": "orderValidationRuleId", - "in": "path", - "schema": { - "type": "string" - }, - "required": true, - "description": "The resource's id" - } - ], - "responses": { - "200": { - "description": "The market associated to the order validation rule" - } - } - } - }, - "/order_validation_rules/{orderValidationRuleId}/attachments": { - "get": { - "operationId": "GET/orderValidationRuleId/attachments", - "summary": "Retrieve the attachments associated to the order validation rule", - "description": "Retrieve the attachments associated to the order validation rule", - "tags": [ - "has_many", - "attachments" - ], - "parameters": [ - { - "name": "orderValidationRuleId", - "in": "path", - "schema": { - "type": "string" - }, - "required": true, - "description": "The resource's id" - } - ], - "responses": { - "200": { - "description": "The attachments associated to the order validation rule" - } - } - } - }, - "/order_validation_rules/{orderValidationRuleId}/versions": { - "get": { - "operationId": "GET/orderValidationRuleId/versions", - "summary": "Retrieve the versions associated to the order validation rule", - "description": "Retrieve the versions associated to the order validation rule", - "tags": [ - "has_many", - "versions" - ], - "parameters": [ - { - "name": "orderValidationRuleId", - "in": "path", - "schema": { - "type": "string" - }, - "required": true, - "description": "The resource's id" - } - ], - "responses": { - "200": { - "description": "The versions associated to the order validation rule" - } - } - } - }, "/orders": { "get": { "operationId": "GET/orders", @@ -32441,6 +32305,12 @@ "example": true, "nullable": true }, + "native_customer_payment_sources": { + "type": "boolean", + "description": "Indicates if the gateway will use the native customer payment sources.", + "example": true, + "nullable": true + }, "webhook_endpoint_secret": { "type": "string", "description": "The gateway webhook endpoint secret, generated by Adyen customer area.", @@ -32605,6 +32475,11 @@ "description": "Indicates if the gateway will leverage on the Adyen notification webhooks.", "example": true }, + "native_customer_payment_sources": { + "type": "boolean", + "description": "Indicates if the gateway will use the native customer payment sources.", + "example": true + }, "webhook_endpoint_secret": { "type": "string", "description": "The gateway webhook endpoint secret, generated by Adyen customer area.", @@ -32739,6 +32614,12 @@ "example": true, "nullable": false }, + "native_customer_payment_sources": { + "type": "boolean", + "description": "Indicates if the gateway will use the native customer payment sources.", + "example": true, + "nullable": false + }, "webhook_endpoint_secret": { "type": "string", "description": "The gateway webhook endpoint secret, generated by Adyen customer area.", @@ -33715,6 +33596,7 @@ "skus", "stock_items", "stock_locations", + "stock_transfers", "tax_calculators", "tax_categories" ] @@ -33812,6 +33694,9 @@ { "$ref": "#/components/schemas/stockLocation" }, + { + "$ref": "#/components/schemas/stockTransfer" + }, { "$ref": "#/components/schemas/taxCalculator" }, @@ -33930,6 +33815,7 @@ "skus", "stock_items", "stock_locations", + "stock_transfers", "tax_calculators", "tax_categories" ] @@ -34027,6 +33913,9 @@ { "$ref": "#/components/schemas/stockLocation" }, + { + "$ref": "#/components/schemas/stockTransfer" + }, { "$ref": "#/components/schemas/taxCalculator" }, @@ -34157,6 +34046,7 @@ "skus", "stock_items", "stock_locations", + "stock_transfers", "tax_calculators", "tax_categories" ] @@ -34254,6 +34144,9 @@ { "$ref": "#/components/schemas/stockLocation" }, + { + "$ref": "#/components/schemas/stockTransfer" + }, { "$ref": "#/components/schemas/taxCalculator" }, @@ -48358,6 +48251,12 @@ "example": 6, "nullable": true }, + "shopper_reference": { + "type": "string", + "description": "A reference to uniquely identify the shopper during payment sessions.", + "example": "xxx-yyy-zzz", + "nullable": true + }, "created_at": { "type": "string", "description": "Time at which the resource was created.", @@ -48676,6 +48575,11 @@ "description": "The customer's password. Initiate a customer password reset flow if you need to change it.", "example": "secret" }, + "shopper_reference": { + "type": "string", + "description": "A reference to uniquely identify the shopper during payment sessions.", + "example": "xxx-yyy-zzz" + }, "reference": { "type": "string", "description": "A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.", @@ -48797,6 +48701,12 @@ "description": "The customer's password. Initiate a customer password reset flow if you need to change it.", "example": "secret" }, + "shopper_reference": { + "type": "string", + "description": "A reference to uniquely identify the shopper during payment sessions.", + "example": "xxx-yyy-zzz", + "nullable": true + }, "reference": { "type": "string", "description": "A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.", @@ -65020,7 +64930,7 @@ "properties": { "session_id": { "type": "string", - "description": "The identifier of the payment session, useful to updated it.", + "description": "The identifier of the payment session.", "example": "xxxx-yyyy-zzzz", "nullable": true }, @@ -74250,287 +74160,6 @@ } } }, - "orderValidationRule": { - "type": "object", - "properties": { - "data": { - "type": "object", - "required": [ - "type", - "attributes" - ], - "properties": { - "type": { - "type": "string", - "description": "The resource's type", - "enum": [ - "order_validation_rules" - ] - }, - "attributes": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "description": "Time at which the resource was created.", - "example": "2018-01-01T12:00:00.000Z", - "nullable": false - }, - "updated_at": { - "type": "string", - "description": "Time at which the resource was last updated.", - "example": "2018-01-01T12:00:00.000Z", - "nullable": false - }, - "reference": { - "type": "string", - "description": "A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.", - "example": "ANY-EXTERNAL-REFEFERNCE", - "nullable": true - }, - "reference_origin": { - "type": "string", - "description": "Any identifier of the third party system that defines the reference code", - "example": "ANY-EXTERNAL-REFEFERNCE-ORIGIN", - "nullable": true - }, - "metadata": { - "type": "object", - "description": "Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.", - "example": { - "foo": "bar" - }, - "nullable": true - } - } - }, - "relationships": { - "type": "object", - "properties": { - "market": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The resource's type", - "enum": [ - "markets" - ] - }, - "id": { - "type": "string", - "description": "The resource's id", - "example": "XGZwpOSrWL" - } - } - } - } - }, - "attachments": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The resource's type", - "enum": [ - "attachments" - ] - }, - "id": { - "type": "string", - "description": "The resource's id", - "example": "XGZwpOSrWL" - } - } - } - } - }, - "versions": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The resource's type", - "enum": [ - "versions" - ] - }, - "id": { - "type": "string", - "description": "The resource's id", - "example": "XGZwpOSrWL" - } - } - } - } - } - } - } - } - } - } - }, - "orderValidationRuleResponse": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The resource's id", - "example": "XGZwpOSrWL" - }, - "type": { - "type": "string", - "description": "The resource's type", - "enum": [ - "order_validation_rules" - ] - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "string", - "description": "URL" - } - } - }, - "attributes": { - "$ref": "#/components/schemas/orderValidationRule/properties/data/properties/attributes" - }, - "relationships": { - "type": "object", - "properties": { - "market": { - "type": "object", - "properties": { - "links": { - "type": "object", - "properties": { - "self": { - "type": "string", - "description": "URL" - }, - "related": { - "type": "string", - "description": "URL" - } - } - }, - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The resource's type", - "enum": [ - "market" - ] - }, - "id": { - "type": "string", - "description": "The resource ID" - } - } - } - } - }, - "attachments": { - "type": "object", - "properties": { - "links": { - "type": "object", - "properties": { - "self": { - "type": "string", - "description": "URL" - }, - "related": { - "type": "string", - "description": "URL" - } - } - }, - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The resource's type", - "enum": [ - "attachments" - ] - }, - "id": { - "type": "string", - "description": "The resource ID" - } - } - } - } - }, - "versions": { - "type": "object", - "properties": { - "links": { - "type": "object", - "properties": { - "self": { - "type": "string", - "description": "URL" - }, - "related": { - "type": "string", - "description": "URL" - } - } - }, - "data": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The resource's type", - "enum": [ - "versions" - ] - }, - "id": { - "type": "string", - "description": "The resource ID" - } - } - } - } - } - } - } - } - } - } - }, - "orderValidationRuleResponseList": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/orderValidationRuleResponse/properties/data" - } - } - } - }, "order": { "type": "object", "properties": { @@ -106233,7 +105862,7 @@ }, "return_url": { "type": "string", - "description": "The URL where the payer is redirected after they authenticate the payment.", + "description": "The URL to return to when a redirect payment is completed.", "example": "https://yourdomain.com/thankyou", "nullable": true }, @@ -106404,7 +106033,7 @@ }, "return_url": { "type": "string", - "description": "The URL where the payer is redirected after they authenticate the payment.", + "description": "The URL to return to when a redirect payment is completed.", "example": "https://yourdomain.com/thankyou" }, "receipt_email": { @@ -106508,7 +106137,7 @@ }, "return_url": { "type": "string", - "description": "The URL where the payer is redirected after they authenticate the payment.", + "description": "The URL to return to when a redirect payment is completed.", "example": "https://yourdomain.com/thankyou", "nullable": true }, @@ -111678,10 +111307,6 @@ "name": "order_subscriptions", "description": "resource type" }, - { - "name": "order_validation_rules", - "description": "resource type" - }, { "name": "orders", "description": "resource type" diff --git a/package.json b/package.json index afaeffa6..2ad2df6c 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@semantic-release/git": "^10.0.1", "@types/debug": "^4.1.12", "@types/jest": "^29.5.12", - "@types/lodash": "^4.17.4", + "@types/lodash": "^4.17.5", "@types/node": "^20.14.2", "dotenv": "^16.4.5", "eslint": "^8.57.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99aae249..0dc0642d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,8 +40,8 @@ importers: specifier: ^29.5.12 version: 29.5.12 '@types/lodash': - specifier: ^4.17.4 - version: 4.17.4 + specifier: ^4.17.5 + version: 4.17.5 '@types/node': specifier: ^20.14.2 version: 20.14.2 @@ -864,6 +864,7 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -871,6 +872,7 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -1167,8 +1169,8 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/lodash@4.17.4': - resolution: {integrity: sha512-wYCP26ZLxaT3R39kiN2+HcJ4kTd3U1waI/cY7ivWYqFP6pW3ZNpvi6Wd6PHZx7T/t8z0vlkXMg3QYLa7DZ/IJQ==} + '@types/lodash@4.17.5': + resolution: {integrity: sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==} '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} @@ -1432,8 +1434,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.23.0: - resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} + browserslist@4.23.1: + resolution: {integrity: sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -1466,8 +1468,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001629: - resolution: {integrity: sha512-c3dl911slnQhmxUIT4HhYzT7wnBK/XYpGnYLOj4nJBaRiw52Ibe7YxlDaAeRECvA786zCuExhxIUJ2K7nHMrBw==} + caniuse-lite@1.0.30001632: + resolution: {integrity: sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==} chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} @@ -1710,8 +1712,8 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - electron-to-chromium@1.4.792: - resolution: {integrity: sha512-rkg5/N3L+Y844JyfgPUyuKK0Hk0efo3JNxUDKvz3HgP6EmN4rNGhr2D8boLsfTV/hGo7ZGAL8djw+jlg99zQyA==} + electron-to-chromium@1.4.798: + resolution: {integrity: sha512-by9J2CiM9KPGj9qfp5U4FcPSbXJG7FNzqnYaY4WLzX+v2PHieVGmnsA4dxfpGE3QEC7JofpPZmn7Vn1B9NR2+Q==} emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} @@ -1845,8 +1847,8 @@ packages: eslint-import-resolver-webpack: optional: true - eslint-plugin-es-x@7.6.0: - resolution: {integrity: sha512-I0AmeNgevgaTR7y2lrVCJmGYF0rjoznpDvqV/kIkZSZbZ8Rw3eu4cGlvBBULScfkSOCzqKbff5LR4CNrV7mZHA==} + eslint-plugin-es-x@7.7.0: + resolution: {integrity: sha512-aP3qj8BwiEDPttxQkZdI221DLKq9sI/qHolE2YSQL1/9+xk7dTV+tB1Fz8/IaCA+lnLA1bDEnvaS2LKs0k2Uig==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8' @@ -1933,9 +1935,9 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - execa@9.1.0: - resolution: {integrity: sha512-lSgHc4Elo2m6bUDhc3Hl/VxvUDJdQWI40RZ4KMY9bKRc+hgMOT7II/JjbNDhI8VnMtrCb7U/fhpJIkLORZozWw==} - engines: {node: '>=18'} + execa@9.2.0: + resolution: {integrity: sha512-vpOyYg7UAVKLAWWtRS2gAdgkT7oJbCn0me3gmUmxZih4kd3MF/oo8kNTBTIbkO3yuuF5uB4ZCZfn8BOolITYhg==} + engines: {node: ^18.19.0 || >=20.5.0} exit@0.1.2: resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} @@ -3092,8 +3094,8 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier@3.3.1: - resolution: {integrity: sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==} + prettier@3.3.2: + resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} engines: {node: '>=14'} hasBin: true @@ -3535,8 +3537,8 @@ packages: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} - type-fest@4.19.0: - resolution: {integrity: sha512-CN2l+hWACRiejlnr68vY0/7734Kzu+9+TOslUXbSCQ1ruY9XIHDBSceVXCcHm/oXrdzhtLMMdJEKfemf1yXiZQ==} + type-fest@4.20.0: + resolution: {integrity: sha512-MBh+PHUHHisjXf4tlx0CFWoMdjx8zCMLJHOjnV1prABYZFHqtFOyauCIK2/7w4oIfwkF8iNhLtnJEfVY2vn3iw==} engines: {node: '>=16'} typed-array-buffer@1.0.2: @@ -3564,8 +3566,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - uglify-js@3.17.4: - resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} + uglify-js@3.18.0: + resolution: {integrity: sha512-SyVVbcNBCk0dzr9XL/R/ySrmYf0s372K6/hFklzgcp2lBFyXtw4I7BOdDjlLhE1aVqaI/SHWXWmYdlZxuyF38A==} engines: {node: '>=0.8.0'} hasBin: true @@ -3768,7 +3770,7 @@ snapshots: dependencies: '@babel/compat-data': 7.24.7 '@babel/helper-validator-option': 7.24.7 - browserslist: 4.23.0 + browserslist: 4.23.1 lru-cache: 5.1.1 semver: 6.3.1 @@ -4537,9 +4539,9 @@ snapshots: eslint-config-standard-with-typescript: 42.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.2.0(eslint@8.57.0))(eslint@8.57.0)(typescript@5.4.5) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) eslint-plugin-n: 16.6.2(eslint@8.57.0) - eslint-plugin-prettier: 5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.1) + eslint-plugin-prettier: 5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.2) eslint-plugin-promise: 6.2.0(eslint@8.57.0) - prettier: 3.3.1 + prettier: 3.3.2 typescript: 5.4.5 transitivePeerDependencies: - '@types/eslint' @@ -5013,7 +5015,7 @@ snapshots: dependencies: '@semantic-release/error': 4.0.0 aggregate-error: 5.0.0 - execa: 9.1.0 + execa: 9.2.0 fs-extra: 11.2.0 lodash-es: 4.17.21 nerf-dart: 1.0.0 @@ -5114,7 +5116,7 @@ snapshots: '@types/json5@0.0.29': {} - '@types/lodash@4.17.4': {} + '@types/lodash@4.17.5': {} '@types/ms@0.7.34': {} @@ -5456,12 +5458,12 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.23.0: + browserslist@4.23.1: dependencies: - caniuse-lite: 1.0.30001629 - electron-to-chromium: 1.4.792 + caniuse-lite: 1.0.30001632 + electron-to-chromium: 1.4.798 node-releases: 2.0.14 - update-browserslist-db: 1.0.16(browserslist@4.23.0) + update-browserslist-db: 1.0.16(browserslist@4.23.1) bser@2.1.1: dependencies: @@ -5489,7 +5491,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001629: {} + caniuse-lite@1.0.30001632: {} chalk@2.4.2: dependencies: @@ -5605,7 +5607,7 @@ snapshots: core-js-compat@3.37.1: dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 core-util-is@1.0.3: {} @@ -5725,7 +5727,7 @@ snapshots: eastasianwidth@0.2.0: {} - electron-to-chromium@1.4.792: {} + electron-to-chromium@1.4.798: {} emittery@0.13.1: {} @@ -5903,7 +5905,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-es-x@7.6.0(eslint@8.57.0): + eslint-plugin-es-x@7.7.0(eslint@8.57.0): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.10.1 @@ -5942,7 +5944,7 @@ snapshots: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) builtins: 5.1.0 eslint: 8.57.0 - eslint-plugin-es-x: 7.6.0(eslint@8.57.0) + eslint-plugin-es-x: 7.7.0(eslint@8.57.0) get-tsconfig: 4.7.5 globals: 13.24.0 ignore: 5.3.1 @@ -5952,10 +5954,10 @@ snapshots: resolve: 1.22.8 semver: 7.6.2 - eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.1): + eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.2): dependencies: eslint: 8.57.0 - prettier: 3.3.1 + prettier: 3.3.2 prettier-linter-helpers: 1.0.0 synckit: 0.8.8 optionalDependencies: @@ -6059,7 +6061,7 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - execa@9.1.0: + execa@9.2.0: dependencies: '@sindresorhus/merge-streams': 4.0.0 cross-spawn: 7.0.3 @@ -6314,7 +6316,7 @@ snapshots: source-map: 0.6.1 wordwrap: 1.0.0 optionalDependencies: - uglify-js: 3.17.4 + uglify-js: 3.18.0 has-bigints@1.0.2: {} @@ -7226,7 +7228,7 @@ snapshots: dependencies: '@babel/code-frame': 7.24.7 index-to-position: 0.1.2 - type-fest: 4.19.0 + type-fest: 4.20.0 parse-ms@4.0.0: {} @@ -7284,7 +7286,7 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier@3.3.1: {} + prettier@3.3.2: {} pretty-bytes@6.1.1: {} @@ -7330,20 +7332,20 @@ snapshots: dependencies: find-up-simple: 1.0.0 read-pkg: 9.0.1 - type-fest: 4.19.0 + type-fest: 4.20.0 read-pkg-up@11.0.0: dependencies: find-up-simple: 1.0.0 read-pkg: 9.0.1 - type-fest: 4.19.0 + type-fest: 4.20.0 read-pkg@9.0.1: dependencies: '@types/normalize-package-data': 2.4.4 normalize-package-data: 6.0.1 parse-json: 8.1.0 - type-fest: 4.19.0 + type-fest: 4.20.0 unicorn-magic: 0.1.0 readable-stream@2.3.8: @@ -7448,7 +7450,7 @@ snapshots: cosmiconfig: 9.0.0(typescript@5.4.5) debug: 4.3.5 env-ci: 11.0.0 - execa: 9.1.0 + execa: 9.2.0 figures: 6.1.0 find-versions: 6.0.0 get-stream: 6.0.1 @@ -7759,7 +7761,7 @@ snapshots: type-fest@2.19.0: {} - type-fest@4.19.0: {} + type-fest@4.20.0: {} typed-array-buffer@1.0.2: dependencies: @@ -7804,7 +7806,7 @@ snapshots: typescript@5.4.5: {} - uglify-js@3.17.4: + uglify-js@3.18.0: optional: true unbox-primitive@1.0.2: @@ -7839,9 +7841,9 @@ snapshots: universalify@2.0.1: {} - update-browserslist-db@1.0.16(browserslist@4.23.0): + update-browserslist-db@1.0.16(browserslist@4.23.1): dependencies: - browserslist: 4.23.0 + browserslist: 4.23.1 escalade: 3.1.2 picocolors: 1.0.1 diff --git a/specs/resources/order_validation_rules.spec.ts b/specs/resources/order_validation_rules.spec.ts deleted file mode 100644 index 7e7a2e47..00000000 --- a/specs/resources/order_validation_rules.spec.ts +++ /dev/null @@ -1,191 +0,0 @@ -/** - * ©2024 Commerce Layer Inc. - * Source code generated automatically by SDK codegen - **/ - -import { CommerceLayerClient, OrderValidationRule } from '../../src' -import { isEqual } from 'lodash' -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import { getClient, TestData, CommonData, handleError, interceptRequest, checkCommon, checkCommonData, checkCommonParamsList, checkCommonParams, currentAccessToken, randomValue } from '../../test/common' - - - -let cl: CommerceLayerClient - - -beforeAll(async () => { cl = await getClient() }) - - -describe('OrderValidationRules resource', () => { - - const resourceType = 'order_validation_rules' - - - /* spec.retrieve.start */ - it(resourceType + '.retrieve', async () => { - - const id = TestData.id - const params = { fields: {[resourceType]: CommonData.paramsFields } } - - const intId = cl.addRequestInterceptor((config) => { - expect(config.method).toBe('get') - checkCommon(config, resourceType, id, currentAccessToken) - checkCommonParams(config, params) - return interceptRequest() - }) - - await cl[resourceType].retrieve(id, params, CommonData.options) - .catch(handleError) - .finally(() => cl.removeInterceptor('request', intId)) - - }) - /* spec.retrieve.stop */ - - - /* spec.list.start */ - it(resourceType + '.list', async () => { - - const params = CommonData.paramsList - - const intId = cl.addRequestInterceptor((config) => { - expect(config.method).toBe('get') - checkCommon(config, resourceType) - checkCommonParamsList(config, params) - return interceptRequest() - }) - - await cl[resourceType].list(params, CommonData.options) - .catch(handleError) - .finally(() => cl.removeInterceptor('request', intId)) - - }) - /* spec.list.stop */ - - - /* spec.type.start */ - it(resourceType + '.type', async () => { - - const resource = { id: TestData.id, type: resourceType } - expect(cl[resourceType].isOrderValidationRule(resource)).toBeTruthy() - - const type = cl[resourceType].type() - expect(type).toBe(resourceType) - - }) - /* spec.type.stop */ - - - /* spec.relationship.start */ - it(resourceType + '.relationship', async () => { - - const relId = cl[resourceType].relationship(TestData.id) - expect(isEqual(relId, { id: TestData.id, type: resourceType})) - - const relResId = cl[resourceType].relationship({ id: TestData.id, type: resourceType }) - expect(isEqual(relResId, { id: TestData.id, type: resourceType})) - - }) - /* spec.relationship.stop */ - - - /* spec.parse.start */ - it(resourceType + '.parse', async () => { - - const reference = 'myReferenceId' - - const payload = ` - { - "data": { - "id": "AbcdEfgHiL", - "meta": { - "mode": "test", - "organization_id": "myOrgId" - }, - "type": "${resourceType}", - "links": { - "self": "https://sdk-test-org.commercelayer.io/api/${resourceType}/AbcdEfgHiL" - }, - "attributes": { - "metadata": {}, - "reference": "${reference}", - "created_at": "2023-10-01T05:53:29.296Z", - "updated_at": "2023-10-10T08:52:13.251Z" - } - } - } - ` - - const res = cl[resourceType].parse(payload) as OrderValidationRule - - expect(res.type).toBe(resourceType) - expect(res.reference).toBe(reference) - - }) - /* spec.parse.stop */ - - - - /* relationship.market start */ - it(resourceType + '.market', async () => { - - const id = TestData.id - const params = { fields: { markets: CommonData.paramsFields } } - - const intId = cl.addRequestInterceptor((config) => { - expect(config.method).toBe('get') - checkCommon(config, resourceType, id, currentAccessToken, 'market') - checkCommonParams(config, params) - return interceptRequest() - }) - - await cl[resourceType].market(id, params, CommonData.options) - .catch(handleError) - .finally(() => cl.removeInterceptor('request', intId)) - - }) - /* relationship.market stop */ - - - /* relationship.attachments start */ - it(resourceType + '.attachments', async () => { - - const id = TestData.id - const params = { fields: { attachments: CommonData.paramsFields } } - - const intId = cl.addRequestInterceptor((config) => { - expect(config.method).toBe('get') - checkCommon(config, resourceType, id, currentAccessToken, 'attachments') - checkCommonParams(config, params) - return interceptRequest() - }) - - await cl[resourceType].attachments(id, params, CommonData.options) - .catch(handleError) - .finally(() => cl.removeInterceptor('request', intId)) - - }) - /* relationship.attachments stop */ - - - /* relationship.versions start */ - it(resourceType + '.versions', async () => { - - const id = TestData.id - const params = { fields: { versions: CommonData.paramsFields } } - - const intId = cl.addRequestInterceptor((config) => { - expect(config.method).toBe('get') - checkCommon(config, resourceType, id, currentAccessToken, 'versions') - checkCommonParams(config, params) - return interceptRequest() - }) - - await cl[resourceType].versions(id, params, CommonData.options) - .catch(handleError) - .finally(() => cl.removeInterceptor('request', intId)) - - }) - /* relationship.versions stop */ - - -}) diff --git a/src/api.ts b/src/api.ts index d5be1c3d..461782fd 100644 --- a/src/api.ts +++ b/src/api.ts @@ -73,7 +73,6 @@ export { default as OrderCopies } from './resources/order_copies' export { default as OrderFactories } from './resources/order_factories' export { default as OrderSubscriptionItems } from './resources/order_subscription_items' export { default as OrderSubscriptions } from './resources/order_subscriptions' -export { default as OrderValidationRules } from './resources/order_validation_rules' export { default as Orders } from './resources/orders' export { default as Organizations } from './resources/organization' export { default as Packages } from './resources/packages' @@ -201,7 +200,6 @@ export type ResourceTypeLock = | 'order_factories' | 'order_subscription_items' | 'order_subscriptions' -| 'order_validation_rules' | 'orders' | 'organization' | 'packages' @@ -329,7 +327,6 @@ export const resourceList = [ 'order_factories', 'order_subscription_items', 'order_subscriptions', - 'order_validation_rules', 'orders', 'organization', 'packages', @@ -849,7 +846,6 @@ export type VersionableResourceType = | 'merchants' | 'order_amount_promotion_rules' | 'order_subscriptions' -| 'order_validation_rules' | 'orders' | 'packages' | 'parcel_line_items' diff --git a/src/commercelayer.ts b/src/commercelayer.ts index 817f287e..aac8860d 100644 --- a/src/commercelayer.ts +++ b/src/commercelayer.ts @@ -10,7 +10,7 @@ const debug = Debug('commercelayer') // Autogenerated schema version number, do not remove this line -const OPEN_API_SCHEMA_VERSION = '5.4.0' +const OPEN_API_SCHEMA_VERSION = '5.4.1' export { OPEN_API_SCHEMA_VERSION } @@ -101,7 +101,6 @@ class CommerceLayerClient { order_factories: api.OrderFactories order_subscription_items: api.OrderSubscriptionItems order_subscriptions: api.OrderSubscriptions - order_validation_rules: api.OrderValidationRules orders: api.Orders organization: api.Organizations packages: api.Packages @@ -237,7 +236,6 @@ class CommerceLayerClient { this.order_factories = new api.OrderFactories(this.#adapter) this.order_subscription_items = new api.OrderSubscriptionItems(this.#adapter) this.order_subscriptions = new api.OrderSubscriptions(this.#adapter) - this.order_validation_rules = new api.OrderValidationRules(this.#adapter) this.orders = new api.Orders(this.#adapter) this.organization = new api.Organizations(this.#adapter) this.packages = new api.Packages(this.#adapter) diff --git a/src/model.ts b/src/model.ts index 992e115e..ebddea5f 100644 --- a/src/model.ts +++ b/src/model.ts @@ -70,7 +70,6 @@ export type { OrderCopy, OrderCopyCreate, OrderCopyUpdate } from './resources/or export type { OrderFactory } from './resources/order_factories' export type { OrderSubscriptionItem, OrderSubscriptionItemCreate, OrderSubscriptionItemUpdate } from './resources/order_subscription_items' export type { OrderSubscription, OrderSubscriptionCreate, OrderSubscriptionUpdate } from './resources/order_subscriptions' -export type { OrderValidationRule } from './resources/order_validation_rules' export type { Order, OrderCreate, OrderUpdate } from './resources/orders' export type { Organization } from './resources/organization' export type { Package, PackageCreate, PackageUpdate } from './resources/packages' diff --git a/src/resources/adyen_gateways.ts b/src/resources/adyen_gateways.ts index 0ee378cd..35e8f93a 100644 --- a/src/resources/adyen_gateways.ts +++ b/src/resources/adyen_gateways.ts @@ -19,6 +19,7 @@ interface AdyenGateway extends Resource { name: string live_url_prefix: string async_api?: boolean | null + native_customer_payment_sources?: boolean | null webhook_endpoint_secret?: string | null webhook_endpoint_url?: string | null @@ -38,6 +39,7 @@ interface AdyenGatewayCreate extends ResourceCreate { live_url_prefix: string api_version?: number | null async_api?: boolean | null + native_customer_payment_sources?: boolean | null webhook_endpoint_secret?: string | null adyen_payments?: AdyenPaymentRel[] | null @@ -54,6 +56,7 @@ interface AdyenGatewayUpdate extends ResourceUpdate { live_url_prefix?: string | null api_version?: number | null async_api?: boolean | null + native_customer_payment_sources?: boolean | null webhook_endpoint_secret?: string | null adyen_payments?: AdyenPaymentRel[] | null diff --git a/src/resources/attachments.ts b/src/resources/attachments.ts index 4eed4599..612d1619 100644 --- a/src/resources/attachments.ts +++ b/src/resources/attachments.ts @@ -30,6 +30,7 @@ import type { SkuOption, SkuOptionType } from './sku_options' import type { Sku, SkuType } from './skus' import type { StockItem, StockItemType } from './stock_items' import type { StockLocation, StockLocationType } from './stock_locations' +import type { StockTransfer, StockTransferType } from './stock_transfers' import type { TaxCalculator, TaxCalculatorType } from './tax_calculators' import type { TaxCategory, TaxCategoryType } from './tax_categories' @@ -64,6 +65,7 @@ type SkuOptionRel = ResourceRel & { type: SkuOptionType } type SkuRel = ResourceRel & { type: SkuType } type StockItemRel = ResourceRel & { type: StockItemType } type StockLocationRel = ResourceRel & { type: StockLocationType } +type StockTransferRel = ResourceRel & { type: StockTransferType } type TaxCalculatorRel = ResourceRel & { type: TaxCalculatorType } type TaxCategoryRel = ResourceRel & { type: TaxCategoryType } @@ -76,7 +78,7 @@ interface Attachment extends Resource { description?: string | null url?: string | null - attachable?: Bundle | CarrierAccount | CustomerGroup | Customer | DeliveryLeadTime | Geocoder | GiftCardRecipient | GiftCard | InventoryModel | Market | Merchant | BillingInfoValidationRule | Order | Package | Parcel | PaymentMethod | PriceList | Price | Promotion | Return | Shipment | ShippingCategory | ShippingMethod | ShippingZone | SkuOption | Sku | StockItem | StockLocation | TaxCalculator | TaxCategory | null + attachable?: Bundle | CarrierAccount | CustomerGroup | Customer | DeliveryLeadTime | Geocoder | GiftCardRecipient | GiftCard | InventoryModel | Market | Merchant | BillingInfoValidationRule | Order | Package | Parcel | PaymentMethod | PriceList | Price | Promotion | Return | Shipment | ShippingCategory | ShippingMethod | ShippingZone | SkuOption | Sku | StockItem | StockLocation | StockTransfer | TaxCalculator | TaxCategory | null } @@ -87,7 +89,7 @@ interface AttachmentCreate extends ResourceCreate { description?: string | null url?: string | null - attachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel + attachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | StockTransferRel | TaxCalculatorRel | TaxCategoryRel } @@ -98,7 +100,7 @@ interface AttachmentUpdate extends ResourceUpdate { description?: string | null url?: string | null - attachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel | null + attachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | StockTransferRel | TaxCalculatorRel | TaxCategoryRel | null } diff --git a/src/resources/customers.ts b/src/resources/customers.ts index dc2cea55..33fc1fca 100644 --- a/src/resources/customers.ts +++ b/src/resources/customers.ts @@ -29,6 +29,7 @@ interface Customer extends Resource { status: 'prospect' | 'acquired' | 'repeat' has_password?: boolean | null total_orders_count?: number | null + shopper_reference?: string | null customer_group?: CustomerGroup | null customer_addresses?: CustomerAddress[] | null @@ -49,6 +50,7 @@ interface CustomerCreate extends ResourceCreate { email: string password?: string | null + shopper_reference?: string | null customer_group?: CustomerGroupRel | null tags?: TagRel[] | null @@ -60,6 +62,7 @@ interface CustomerUpdate extends ResourceUpdate { email?: string | null password?: string | null + shopper_reference?: string | null customer_group?: CustomerGroupRel | null tags?: TagRel[] | null diff --git a/src/resources/order_validation_rules.ts b/src/resources/order_validation_rules.ts deleted file mode 100644 index 859c75ba..00000000 --- a/src/resources/order_validation_rules.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { ApiResource } from '../resource' -import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource' -import type { QueryParamsRetrieve, QueryParamsList } from '../query' - -import type { Market } from './markets' -import type { Attachment } from './attachments' -import type { Version } from './versions' - - -type OrderValidationRuleType = 'order_validation_rules' -type OrderValidationRuleRel = ResourceRel & { type: OrderValidationRuleType } - - -interface OrderValidationRule extends Resource { - - readonly type: OrderValidationRuleType - - - market?: Market | null - attachments?: Attachment[] | null - versions?: Version[] | null - -} - - -class OrderValidationRules extends ApiResource { - - static readonly TYPE: OrderValidationRuleType = 'order_validation_rules' as const - - async market(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise { - const _orderValidationRuleId = (orderValidationRuleId as OrderValidationRule).id || orderValidationRuleId as string - return this.resources.fetch({ type: 'markets' }, `order_validation_rules/${_orderValidationRuleId}/market`, params, options) as unknown as Market - } - - async attachments(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise> { - const _orderValidationRuleId = (orderValidationRuleId as OrderValidationRule).id || orderValidationRuleId as string - return this.resources.fetch({ type: 'attachments' }, `order_validation_rules/${_orderValidationRuleId}/attachments`, params, options) as unknown as ListResponse - } - - async versions(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList, options?: ResourcesConfig): Promise> { - const _orderValidationRuleId = (orderValidationRuleId as OrderValidationRule).id || orderValidationRuleId as string - return this.resources.fetch({ type: 'versions' }, `order_validation_rules/${_orderValidationRuleId}/versions`, params, options) as unknown as ListResponse - } - - - isOrderValidationRule(resource: any): resource is OrderValidationRule { - return resource.type && (resource.type === OrderValidationRules.TYPE) - } - - - relationship(id: string | ResourceId | null): OrderValidationRuleRel { - return ((id === null) || (typeof id === 'string')) ? { id, type: OrderValidationRules.TYPE } : { id: id.id, type: OrderValidationRules.TYPE } - } - - - type(): OrderValidationRuleType { - return OrderValidationRules.TYPE - } - -} - - -export default OrderValidationRules - -export type { OrderValidationRule, OrderValidationRuleType }