From 93a3389da3519c328a882ba7663569dacd6bdefa Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Thu, 18 Jun 2020 22:25:19 -0300 Subject: [PATCH 01/17] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b4ddd8c..3aa6548 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ - :hammer: Built 100% with Typescript. - :muscle: 0 dependencies. It uses the native `https` Node module. - :tada: Promise based. -- :dizzy: Type definitions for all VTEX requests and responses. +- :dizzy: Type definitions for many VTEX requests and responses. **Note**: *This is not a VTEX official package, we are VTEX Partners since 2017 and we developed this to collaborate with VTEX Community.* From 4073e01ddcf0176bb5bff8acb7f280a412d72f3e Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Thu, 18 Jun 2020 22:41:18 -0300 Subject: [PATCH 02/17] add price tables api --- package.json | 2 +- src/VTEX.ts | 7 +++++++ src/modules/pricing/Pricing.ts | 13 +++++++++++++ .../pricing/apis/price-tables/PriceTables.ts | 14 ++++++++++++++ src/modules/pricing/apis/price-tables/index.ts | 1 + src/modules/pricing/index.ts | 1 + test/VTEX.test.ts | 4 ++++ 7 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/modules/pricing/Pricing.ts create mode 100644 src/modules/pricing/apis/price-tables/PriceTables.ts create mode 100644 src/modules/pricing/apis/price-tables/index.ts create mode 100644 src/modules/pricing/index.ts diff --git a/package.json b/package.json index 65a9756..85bc2f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onreadydesa/vtex-node-sdk", - "version": "1.1.0-alpha", + "version": "1.2.0-alpha", "description": "VTEX Node SDK, built 100% with Typescript and 0 dependencies!", "author": "Onready", "private": false, diff --git a/src/VTEX.ts b/src/VTEX.ts index 8281f83..13e8d6b 100644 --- a/src/VTEX.ts +++ b/src/VTEX.ts @@ -2,6 +2,7 @@ import { VtexCredentials } from './VtexCredentials'; import { VtexHttpClient } from './utils/VtexHttpClient'; import { OMS } from './modules/OMS'; import { Logistics } from './modules/logistics'; +import { Pricing } from './modules/pricing'; export class VTEX { private static buildErrorMessage(paramName: string): string { @@ -32,6 +33,11 @@ export class VTEX { */ readonly logistics: Logistics; + /** + * Pricing Module + */ + readonly pricing: Pricing; + /** * @param {string} store * @param {string} appKey @@ -48,5 +54,6 @@ export class VTEX { // Create needed modules this.oms = new OMS(vtexHttpClient); this.logistics = new Logistics(vtexHttpClient); + this.pricing = new Pricing(vtexHttpClient); } } diff --git a/src/modules/pricing/Pricing.ts b/src/modules/pricing/Pricing.ts new file mode 100644 index 0000000..cd1fb2c --- /dev/null +++ b/src/modules/pricing/Pricing.ts @@ -0,0 +1,13 @@ +import { VtexHttpClient } from '../../utils/VtexHttpClient'; +import { PriceTables } from './apis/price-tables'; + +export class Pricing { + /** + * Price Tables API + */ + readonly priceTables: PriceTables + + constructor(vtexHttpClient: VtexHttpClient) { + this.priceTables = new PriceTables(vtexHttpClient); + } +} diff --git a/src/modules/pricing/apis/price-tables/PriceTables.ts b/src/modules/pricing/apis/price-tables/PriceTables.ts new file mode 100644 index 0000000..f11ffda --- /dev/null +++ b/src/modules/pricing/apis/price-tables/PriceTables.ts @@ -0,0 +1,14 @@ +import { AbstractApi } from '../../../AbstractApi'; +import { VtexHttpResponse } from '../../../../utils/VtexHttpResponse'; + +export class PriceTables extends AbstractApi { + private static readonly BASE_PATH: string = '/api/pricing/pipeline/catalog/'; + + /** + * This method will create the rules from a specific Price Table + * @param {any} data + */ + createRulesForPriceTable(data: any): Promise { + return this.vtexHttpClient.performRequest(PriceTables.BASE_PATH, this.HTTP_METHODS.POST, data); + } +} diff --git a/src/modules/pricing/apis/price-tables/index.ts b/src/modules/pricing/apis/price-tables/index.ts new file mode 100644 index 0000000..d92496e --- /dev/null +++ b/src/modules/pricing/apis/price-tables/index.ts @@ -0,0 +1 @@ +export * from './PriceTables'; diff --git a/src/modules/pricing/index.ts b/src/modules/pricing/index.ts new file mode 100644 index 0000000..344d831 --- /dev/null +++ b/src/modules/pricing/index.ts @@ -0,0 +1 @@ +export * from './Pricing'; diff --git a/test/VTEX.test.ts b/test/VTEX.test.ts index 6aa5507..a30c597 100644 --- a/test/VTEX.test.ts +++ b/test/VTEX.test.ts @@ -20,6 +20,7 @@ describe('VTEX tests', () => { expect(instance.oms.exportOrderReport).not.toBe(null); expect(instance.oms.userOrders).not.toBe(null); + expect(instance.logistics).not.toBe(null); expect(instance.logistics.shippingPolicies).not.toBe(null); expect(instance.logistics.carriers).not.toBe(null); expect(instance.logistics.docks).not.toBe(null); @@ -30,6 +31,9 @@ describe('VTEX tests', () => { expect(instance.logistics.sla).not.toBe(null); expect(instance.logistics.pickupPoints).not.toBe(null); expect(instance.logistics.polygons).not.toBe(null); + + expect(instance.pricing).not.toBe(null); + expect(instance.pricing.priceTables).not.toBe(null); done(); })); From 15dc1fcaaf65b74b7d76df419a2cfd01e24628ae Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 15:36:38 -0300 Subject: [PATCH 03/17] update eslint --- package.json | 2 +- yarn.lock | 120 ++++++++------------------------------------------- 2 files changed, 20 insertions(+), 102 deletions(-) diff --git a/package.json b/package.json index 85bc2f9..fd0a8db 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@typescript-eslint/eslint-plugin": "3.3.0", "@typescript-eslint/parser": "3.3.0", "babel-jest": "26.0.1", - "eslint": "7.2.0", + "eslint": "7.3.0", "eslint-config-airbnb-base": "14.2.0", "eslint-plugin-import": "2.21.2", "eslint-plugin-jest": "23.13.2", diff --git a/yarn.lock b/yarn.lock index 7be0851..c2f024d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1271,6 +1271,11 @@ ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ansi-colors@^3.2.1: + version "3.2.4" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" + integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== + ansi-escapes@^4.2.1: version "4.3.1" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" @@ -1637,11 +1642,6 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -1657,18 +1657,6 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-width@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" - integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== - cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -1965,6 +1953,13 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enquirer@^2.3.5: + version "2.3.5" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.5.tgz#3ab2b838df0a9d8ab9e7dff235b0e8712ef92381" + integrity sha512-BNT1C08P9XD0vNg3J475yIUG+mVdp9T6towYFHUv897X0KoHBjB1shyrNmhmtHWKP17iSWgo7Gqh7BBuzLZMSA== + dependencies: + ansi-colors "^3.2.1" + error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -2091,10 +2086,10 @@ eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.2.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.2.0.tgz#74415ac884874495f78ec2a97349525344c981fa" integrity sha512-WFb4ihckKil6hu3Dp798xdzSfddwKKU3+nGniKF6HfeW6OLd2OUDEPP7TcHtB5+QXOKg2s6B2DaMPE1Nn/kxKQ== -eslint@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.2.0.tgz#d41b2e47804b30dbabb093a967fb283d560082e6" - integrity sha512-B3BtEyaDKC5MlfDa2Ha8/D6DsS4fju95zs0hjS3HdGazw+LNayai38A25qMppK37wWGWNYSPOR6oYzlz5MHsRQ== +eslint@7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.3.0.tgz#f9f1fc3dc1227985d0db88769f2bbac7b4b875d7" + integrity sha512-dJMVXwfU5PT1cj2Nv2VPPrKahKTGdX+5Dh0Q3YuKt+Y2UhdL2YbzsVaBMyG9HC0tBismlv/r1+eZqs6SMIV38Q== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.10.0" @@ -2102,6 +2097,7 @@ eslint@7.2.0: cross-spawn "^7.0.2" debug "^4.0.1" doctrine "^3.0.0" + enquirer "^2.3.5" eslint-scope "^5.1.0" eslint-utils "^2.0.0" eslint-visitor-keys "^1.2.0" @@ -2115,7 +2111,6 @@ eslint@7.2.0: ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^7.0.0" is-glob "^4.0.0" js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" @@ -2259,15 +2254,6 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" @@ -2314,13 +2300,6 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -figures@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - file-entry-cache@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" @@ -2599,7 +2578,7 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== -iconv-lite@0.4.24, iconv-lite@^0.4.24: +iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -2645,25 +2624,6 @@ inherits@2: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inquirer@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" - integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== - dependencies: - ansi-escapes "^4.2.1" - chalk "^3.0.0" - cli-cursor "^3.1.0" - cli-width "^2.0.0" - external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.15" - mute-stream "0.0.8" - run-async "^2.4.0" - rxjs "^6.5.3" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" - invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -3646,11 +3606,6 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -mute-stream@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -3861,11 +3816,6 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - p-each-series@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.1.0.tgz#961c8dd3f195ea96c747e636b262b800a6b1af48" @@ -4308,14 +4258,6 @@ resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.3.2: dependencies: path-parse "^1.0.6" -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -4340,18 +4282,6 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - -rxjs@^6.5.3: - version "6.5.5" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" - integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== - dependencies: - tslib "^1.9.0" - safe-buffer@^5.0.1, safe-buffer@^5.1.2: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -4789,18 +4719,6 @@ throat@^5.0.0: resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -4893,7 +4811,7 @@ tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.8.1: version "1.13.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== From dac35b27697b73af67206539e40b937cb31f5330 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 15:56:57 -0300 Subject: [PATCH 04/17] add price tables api --- .../pricing/apis/price-tables/PriceTables.ts | 26 ++++++++++++++++++- .../GetRulesForPriceTableResponse.ts | 19 ++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 src/modules/pricing/apis/price-tables/responses/GetRulesForPriceTableResponse.ts diff --git a/src/modules/pricing/apis/price-tables/PriceTables.ts b/src/modules/pricing/apis/price-tables/PriceTables.ts index f11ffda..d4875d4 100644 --- a/src/modules/pricing/apis/price-tables/PriceTables.ts +++ b/src/modules/pricing/apis/price-tables/PriceTables.ts @@ -1,5 +1,6 @@ import { AbstractApi } from '../../../AbstractApi'; import { VtexHttpResponse } from '../../../../utils/VtexHttpResponse'; +import { GetRulesForPriceTableResponse } from './responses/GetRulesForPriceTableResponse'; export class PriceTables extends AbstractApi { private static readonly BASE_PATH: string = '/api/pricing/pipeline/catalog/'; @@ -8,7 +9,30 @@ export class PriceTables extends AbstractApi { * This method will create the rules from a specific Price Table * @param {any} data */ - createRulesForPriceTable(data: any): Promise { + createRulesForPriceTable(data: GetRulesForPriceTableResponse): Promise { return this.vtexHttpClient.performRequest(PriceTables.BASE_PATH, this.HTTP_METHODS.POST, data); } + + /** + * This method will retrieve the rules from a specific Price Table. + * @param {string} priceTableId + */ + getRulesForPriceTable(priceTableId: string) + : Promise> { + const path = `${PriceTables.BASE_PATH}/${priceTableId}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * This method will update the rules from a specific Price Table. + * It will delete all the rules from the requested Price Table and + * create new rules based on the content of the request + * @param {string} priceTableId + * @param {GetRulesForPriceTableResponse} data + */ + updateRulesForPriceTable(priceTableId: string, data: GetRulesForPriceTableResponse) + : Promise { + const path = `${PriceTables.BASE_PATH}/${priceTableId}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.PUT, data); + } } diff --git a/src/modules/pricing/apis/price-tables/responses/GetRulesForPriceTableResponse.ts b/src/modules/pricing/apis/price-tables/responses/GetRulesForPriceTableResponse.ts new file mode 100644 index 0000000..5ad805f --- /dev/null +++ b/src/modules/pricing/apis/price-tables/responses/GetRulesForPriceTableResponse.ts @@ -0,0 +1,19 @@ +interface Context { + categories?: any; + brands?: any; + stockStatuses?: any; + internalCategories?: any; + markupRange?: any; + dateRange?: any; +} + +interface Rule { + id?: string; + context?: Context; + percentualModifier?: number; +} + +export interface GetRulesForPriceTableResponse { + tradePolicyId?: string; + rules?: Array; +} From af5c822c16b667052a539a02fea883cf8f939fdd Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 16:48:23 -0300 Subject: [PATCH 05/17] add prices and fixed prices api --- src/modules/pricing/Pricing.ts | 7 ++ .../PricesAndFixedPrices.ts | 98 +++++++++++++++++++ .../apis/prices-and-fixed-prices/index.ts | 1 + .../GetComputedPriceByPriceTableResponse.ts | 6 ++ .../responses/GetPriceResponse.ts | 21 ++++ test/VTEX.test.ts | 1 + 6 files changed, 134 insertions(+) create mode 100644 src/modules/pricing/apis/prices-and-fixed-prices/PricesAndFixedPrices.ts create mode 100644 src/modules/pricing/apis/prices-and-fixed-prices/index.ts create mode 100644 src/modules/pricing/apis/prices-and-fixed-prices/responses/GetComputedPriceByPriceTableResponse.ts create mode 100644 src/modules/pricing/apis/prices-and-fixed-prices/responses/GetPriceResponse.ts diff --git a/src/modules/pricing/Pricing.ts b/src/modules/pricing/Pricing.ts index cd1fb2c..792846b 100644 --- a/src/modules/pricing/Pricing.ts +++ b/src/modules/pricing/Pricing.ts @@ -1,5 +1,6 @@ import { VtexHttpClient } from '../../utils/VtexHttpClient'; import { PriceTables } from './apis/price-tables'; +import { PricesAndFixedPrices } from './apis/prices-and-fixed-prices'; export class Pricing { /** @@ -7,7 +8,13 @@ export class Pricing { */ readonly priceTables: PriceTables + /** + * Prices and Fixed Prices API + */ + readonly pricesAndFixedPrices: PricesAndFixedPrices; + constructor(vtexHttpClient: VtexHttpClient) { this.priceTables = new PriceTables(vtexHttpClient); + this.pricesAndFixedPrices = new PricesAndFixedPrices(vtexHttpClient); } } diff --git a/src/modules/pricing/apis/prices-and-fixed-prices/PricesAndFixedPrices.ts b/src/modules/pricing/apis/prices-and-fixed-prices/PricesAndFixedPrices.ts new file mode 100644 index 0000000..19700af --- /dev/null +++ b/src/modules/pricing/apis/prices-and-fixed-prices/PricesAndFixedPrices.ts @@ -0,0 +1,98 @@ +import { AbstractApi } from '../../../AbstractApi'; +import { VtexHttpResponse } from '../../../../utils/VtexHttpResponse'; +import { GetPriceResponse, FixedPrice } from './responses/GetPriceResponse'; +import { GetComputedPriceByPriceTableResponse } from './responses/GetComputedPriceByPriceTableResponse'; + +export class PricesAndFixedPrices extends AbstractApi { + private static readonly BASE_PATH: string = '/api/pricing/prices/'; + + /** + * Retrieves price data by SKU Id It is possible that on the property fixedPrices + * exists a list of specific prices for Trade Policies and Minimium Quantities of the SKU. + * Fixed Prices may also be scheduled + * @param {string} skuId + */ + getPrice(skuId: string): Promise> { + const path = `${PricesAndFixedPrices.BASE_PATH}/${skuId}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * Removes an SKU price. This action removes both Base Price and + * all available Fixed Prices for and SKU in all trade policies + * @param {string} skuId + */ + deletePrice(skuId: string): Promise { + const path = `${PricesAndFixedPrices.BASE_PATH}/${skuId}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.DELETE); + } + + /** + * Creates or updates an SKU Price or Fixed Price. + * The Fixed Price is an optional price of the SKU for a specific Trade Policy + * with a specific Minimum Quantity to be activated + * @param {string} skuId + * @param {GetPriceResponse} priceData + */ + createOrEditPriceOrFixedPrice(skuId: string, priceData: GetPriceResponse) + : Promise { + const path = `${PricesAndFixedPrices.BASE_PATH}/${skuId}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.PUT, priceData); + } + + /** + * Fixed Prices are a sub resource of Prices. + * This method get an array of Fixed Prices for an SKU in a Trade Policy with Minimum Quantities + * @param {string} skuId + */ + getFixedPrices(skuId: string): Promise>> { + const path = `${PricesAndFixedPrices.BASE_PATH}/${skuId}/fixed`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * This method will create or update the Fixed Prices of an SKU just for an specific Price Table + * (according to its Trade Policy) + * @param {string} skuId + * @param {string} priceTableId + * @param {Array} fixedPrices + */ + createOrEditFixedPricesOnPriceTable(skuId: string, priceTableId: string, + fixedPrices: Array): Promise { + const path = `${PricesAndFixedPrices.BASE_PATH}/${skuId}/fixed/${priceTableId}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.POST, fixedPrices); + } + + /** + * Gets all Fixed Prices on a price table (or trade policy) + * @param {string} skuId + * @param {string} priceTableId + */ + getFixedPricesOnPriceTable(skuId: string, priceTableId: string) + : Promise>> { + const path = `${PricesAndFixedPrices.BASE_PATH}/${skuId}/fixed/${priceTableId}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * Deletes all Fixed Prices of an SKU in a specific Price Table (or Trade Policy) + * @param {string} skuId + * @param {string} priceTableId + */ + deleteFixedPricesOnPriceTable(skuId: string, priceTableId: string): Promise { + const path = `${PricesAndFixedPrices.BASE_PATH}/${skuId}/fixed/${priceTableId}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.DELETE); + } + + /** + * + * @param {string} skuId + * @param {string} priceTableId + * @param {string} params Example: categoryIds=1&brandId=1&quantity=2 + */ + getComputedPriceByPriceTable(skuId: string, priceTableId: string, params: string) + : Promise> { + const path = `${PricesAndFixedPrices.BASE_PATH}/${skuId}/computed/${priceTableId}?${params}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } +} diff --git a/src/modules/pricing/apis/prices-and-fixed-prices/index.ts b/src/modules/pricing/apis/prices-and-fixed-prices/index.ts new file mode 100644 index 0000000..c11076f --- /dev/null +++ b/src/modules/pricing/apis/prices-and-fixed-prices/index.ts @@ -0,0 +1 @@ +export * from './PricesAndFixedPrices'; diff --git a/src/modules/pricing/apis/prices-and-fixed-prices/responses/GetComputedPriceByPriceTableResponse.ts b/src/modules/pricing/apis/prices-and-fixed-prices/responses/GetComputedPriceByPriceTableResponse.ts new file mode 100644 index 0000000..94aa826 --- /dev/null +++ b/src/modules/pricing/apis/prices-and-fixed-prices/responses/GetComputedPriceByPriceTableResponse.ts @@ -0,0 +1,6 @@ +export interface GetComputedPriceByPriceTableResponse { + tradePolicyId?: string; + listPrice?: number; + sellingPrice?: number; + priceValidUntil?: string; +} diff --git a/src/modules/pricing/apis/prices-and-fixed-prices/responses/GetPriceResponse.ts b/src/modules/pricing/apis/prices-and-fixed-prices/responses/GetPriceResponse.ts new file mode 100644 index 0000000..497356f --- /dev/null +++ b/src/modules/pricing/apis/prices-and-fixed-prices/responses/GetPriceResponse.ts @@ -0,0 +1,21 @@ +interface DateRange { + from?: string; + to?: string; +} + +export interface FixedPrice { + tradePolicyId?: string; + value?: number; + listPrice?: string; + minQuantity?: number; + dateRange?: DateRange +} + +export interface GetPriceResponse { + itemId?: string; + listPrice?: number; + costPrice?: number; + markup?: number; + basePrice?: number; + fixedPrices?: Array; +} diff --git a/test/VTEX.test.ts b/test/VTEX.test.ts index a30c597..c940208 100644 --- a/test/VTEX.test.ts +++ b/test/VTEX.test.ts @@ -34,6 +34,7 @@ describe('VTEX tests', () => { expect(instance.pricing).not.toBe(null); expect(instance.pricing.priceTables).not.toBe(null); + expect(instance.pricing.pricesAndFixedPrices).not.toBe(null); done(); })); From 8961453377c04d824f2fa4f89896267e41cabf10 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 17:02:05 -0300 Subject: [PATCH 06/17] finish pricing api --- src/modules/pricing/Pricing.ts | 7 ++++++ .../apis/pricing-config/PricingConfig.ts | 24 +++++++++++++++++++ .../pricing/apis/pricing-config/index.ts | 1 + .../responses/GetPricingConfigResponse.ts | 20 ++++++++++++++++ .../GetPricingV2ActiveStatusResponse.ts | 4 ++++ test/VTEX.test.ts | 1 + 6 files changed, 57 insertions(+) create mode 100644 src/modules/pricing/apis/pricing-config/PricingConfig.ts create mode 100644 src/modules/pricing/apis/pricing-config/index.ts create mode 100644 src/modules/pricing/apis/pricing-config/responses/GetPricingConfigResponse.ts create mode 100644 src/modules/pricing/apis/pricing-config/responses/GetPricingV2ActiveStatusResponse.ts diff --git a/src/modules/pricing/Pricing.ts b/src/modules/pricing/Pricing.ts index 792846b..6593dcb 100644 --- a/src/modules/pricing/Pricing.ts +++ b/src/modules/pricing/Pricing.ts @@ -1,6 +1,7 @@ import { VtexHttpClient } from '../../utils/VtexHttpClient'; import { PriceTables } from './apis/price-tables'; import { PricesAndFixedPrices } from './apis/prices-and-fixed-prices'; +import { PricingConfig } from './apis/pricing-config'; export class Pricing { /** @@ -13,8 +14,14 @@ export class Pricing { */ readonly pricesAndFixedPrices: PricesAndFixedPrices; + /** + * Pricing Configuration API + */ + readonly pricingConfig: PricingConfig; + constructor(vtexHttpClient: VtexHttpClient) { this.priceTables = new PriceTables(vtexHttpClient); this.pricesAndFixedPrices = new PricesAndFixedPrices(vtexHttpClient); + this.pricingConfig = new PricingConfig(vtexHttpClient); } } diff --git a/src/modules/pricing/apis/pricing-config/PricingConfig.ts b/src/modules/pricing/apis/pricing-config/PricingConfig.ts new file mode 100644 index 0000000..991dfe8 --- /dev/null +++ b/src/modules/pricing/apis/pricing-config/PricingConfig.ts @@ -0,0 +1,24 @@ +import { AbstractApi } from '../../../AbstractApi'; +import { VtexHttpResponse } from '../../../../utils/VtexHttpResponse'; +import { GetPricingConfigResponse } from './responses/GetPricingConfigResponse'; +import { GetPricingV2ActiveStatusResponse } from './responses/GetPricingV2ActiveStatusResponse'; + +export class PricingConfig extends AbstractApi { + private static readonly BASE_PATH: string = '/api/pricing'; + + /** + * Retrieves Pricing Module Configuration + */ + getPricingConfig(): Promise> { + const path = `${PricingConfig.BASE_PATH}/config`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * Gets Pricing v2 Active Status + */ + getPricingV2ActiveStatus(): Promise> { + const path = `${PricingConfig.BASE_PATH}/migration`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } +} diff --git a/src/modules/pricing/apis/pricing-config/index.ts b/src/modules/pricing/apis/pricing-config/index.ts new file mode 100644 index 0000000..5ba71b2 --- /dev/null +++ b/src/modules/pricing/apis/pricing-config/index.ts @@ -0,0 +1 @@ +export * from './PricingConfig'; diff --git a/src/modules/pricing/apis/pricing-config/responses/GetPricingConfigResponse.ts b/src/modules/pricing/apis/pricing-config/responses/GetPricingConfigResponse.ts new file mode 100644 index 0000000..9fec289 --- /dev/null +++ b/src/modules/pricing/apis/pricing-config/responses/GetPricingConfigResponse.ts @@ -0,0 +1,20 @@ +interface PriceVariation { + upperLimit?: number; + lowerLimit?: number; +} + +export interface GetPricingConfigResponse { + hasMigrated?: boolean; + migrationStatus?: string; + defaultMarkup?: number; + priceVariation?: PriceVariation; + minimumMarkups?: number; + tradePolicyConfigs?: any; + sellersToOverride?: Array; + hasPriceInheritance?: boolean; + hasOptionalBasePrice?: boolean; + blockAccount?: boolean; + blockedRoutes?: any; + priceTableSelectionStrategy?: string; + priceTableLimit?: number; +} diff --git a/src/modules/pricing/apis/pricing-config/responses/GetPricingV2ActiveStatusResponse.ts b/src/modules/pricing/apis/pricing-config/responses/GetPricingV2ActiveStatusResponse.ts new file mode 100644 index 0000000..c40d880 --- /dev/null +++ b/src/modules/pricing/apis/pricing-config/responses/GetPricingV2ActiveStatusResponse.ts @@ -0,0 +1,4 @@ +export interface GetPricingV2ActiveStatusResponse { + isActive?: boolean; + hasMigrated?: boolean; +} diff --git a/test/VTEX.test.ts b/test/VTEX.test.ts index c940208..0ff94da 100644 --- a/test/VTEX.test.ts +++ b/test/VTEX.test.ts @@ -35,6 +35,7 @@ describe('VTEX tests', () => { expect(instance.pricing).not.toBe(null); expect(instance.pricing.priceTables).not.toBe(null); expect(instance.pricing.pricesAndFixedPrices).not.toBe(null); + expect(instance.pricing.pricingConfig).not.toBe(null); done(); })); From 0e6fb412acbf4dd925bdd6113e989e1dbd87b12a Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 17:04:43 -0300 Subject: [PATCH 07/17] update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3aa6548..561499b 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,8 @@ API | Implemented :------------: | :-------------:| OMS | :white_check_mark: | Logistics | :white_check_mark: | -Pricing | Comming soon... | +Pricing | :white_check_mark: | +Master Data (V2) | Comming soon... | Antifraud Provider | :x: | Catalog | :x: | Checkout | :x: | @@ -98,7 +99,6 @@ Giftcard | :x: | Giftcard Hub | :x: | Giftcard Provider Protocol | :x: | License Manager | :x: | -Master Data (V2) | :x: | Payment Provider Protocol | :x: | Payments Gateway | :x: | Rates and Benefits | :x: | From ca9ef05a3e4a713c33fa096a2637519411ab63dd Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 17:32:56 -0300 Subject: [PATCH 08/17] finish documents api --- package.json | 2 +- src/VTEX.ts | 7 ++ src/modules/master-data/v2/MasterData.ts | 13 +++ .../v2/apis/documents/Documents.ts | 92 +++++++++++++++++++ .../master-data/v2/apis/documents/index.ts | 1 + .../responses/CreateNewDocumentResponse.ts | 4 + .../responses/GetDocumentResponse.ts | 6 ++ src/modules/master-data/v2/index.ts | 1 + test/VTEX.test.ts | 3 + 9 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 src/modules/master-data/v2/MasterData.ts create mode 100644 src/modules/master-data/v2/apis/documents/Documents.ts create mode 100644 src/modules/master-data/v2/apis/documents/index.ts create mode 100644 src/modules/master-data/v2/apis/documents/responses/CreateNewDocumentResponse.ts create mode 100644 src/modules/master-data/v2/apis/documents/responses/GetDocumentResponse.ts create mode 100644 src/modules/master-data/v2/index.ts diff --git a/package.json b/package.json index fd0a8db..80ae336 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onreadydesa/vtex-node-sdk", - "version": "1.2.0-alpha", + "version": "1.3.0-alpha", "description": "VTEX Node SDK, built 100% with Typescript and 0 dependencies!", "author": "Onready", "private": false, diff --git a/src/VTEX.ts b/src/VTEX.ts index 13e8d6b..619c753 100644 --- a/src/VTEX.ts +++ b/src/VTEX.ts @@ -3,6 +3,7 @@ import { VtexHttpClient } from './utils/VtexHttpClient'; import { OMS } from './modules/OMS'; import { Logistics } from './modules/logistics'; import { Pricing } from './modules/pricing'; +import { MasterData } from './modules/master-data/v2'; export class VTEX { private static buildErrorMessage(paramName: string): string { @@ -38,6 +39,11 @@ export class VTEX { */ readonly pricing: Pricing; + /** + * Master Data (V2) Module + */ + readonly masterData: MasterData; + /** * @param {string} store * @param {string} appKey @@ -55,5 +61,6 @@ export class VTEX { this.oms = new OMS(vtexHttpClient); this.logistics = new Logistics(vtexHttpClient); this.pricing = new Pricing(vtexHttpClient); + this.masterData = new MasterData(vtexHttpClient); } } diff --git a/src/modules/master-data/v2/MasterData.ts b/src/modules/master-data/v2/MasterData.ts new file mode 100644 index 0000000..f881048 --- /dev/null +++ b/src/modules/master-data/v2/MasterData.ts @@ -0,0 +1,13 @@ +import { VtexHttpClient } from '../../../utils/VtexHttpClient'; +import { Documents } from './apis/documents'; + +export class MasterData { + /** + * Documents API + */ + readonly documents: Documents + + constructor(vtexHttpClient: VtexHttpClient) { + this.documents = new Documents(vtexHttpClient); + } +} diff --git a/src/modules/master-data/v2/apis/documents/Documents.ts b/src/modules/master-data/v2/apis/documents/Documents.ts new file mode 100644 index 0000000..fac07e4 --- /dev/null +++ b/src/modules/master-data/v2/apis/documents/Documents.ts @@ -0,0 +1,92 @@ +import { AbstractApi } from '../../../../AbstractApi'; +import { VtexHttpResponse } from '../../../../../utils/VtexHttpResponse'; +import { CreateNewDocumentResponse } from './responses/CreateNewDocumentResponse'; +import { GetDocumentResponse } from './responses/GetDocumentResponse'; + +export class Documents extends AbstractApi { + private static readonly BASE_PATH: string = '/api/dataentities'; + + /** + * + * @param {string} dataEntityName + * @param {any} documentData + * @param {string} params Example: _schema=schema1 + */ + createNewDocument(dataEntityName: string, documentData: any, params?: string) + : Promise> { + const path = `${Documents.BASE_PATH}/${dataEntityName}/documents?${params}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.POST, documentData); + } + + /** + * + * @param {string} dataEntityName + * @param {any} documentData + * @param {string} params Example: _schema=schema1 + */ + createOrUpdateEntireDocument(dataEntityName: string, documentData: any, params?: string) + : Promise { + const path = `${Documents.BASE_PATH}/${dataEntityName}/documents?${params}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.PUT, documentData); + } + + /** + * + * @param {string} dataEntityName + * @param {any} documentData + * @param {string} params Example: _schema=schema1 + */ + createOrUpdatePartialDocument(dataEntityName: string, documentData: any, params?: string) + : Promise { + const path = `${Documents.BASE_PATH}/${dataEntityName}/documents?${params}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.PATCH, documentData); + } + + /** + * + * @param {string} dataEntityName + * @param {string} id + * @param {string} params Example: _schema=schema1&_where=where-statement + */ + getDocument(dataEntityName: string, id: string, params?: string) + : Promise> { + const path = `${Documents.BASE_PATH}/${dataEntityName}/documents/${id}?${params}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * + * @param {string} dataEntityName + * @param {string} id + * @param {any} documentData + * @param {string} params Example: _schema=schema1&_where=where-statement + */ + updateEntireDocument(dataEntityName: string, id: string, documentData: any, params?: string) + : Promise { + const path = `${Documents.BASE_PATH}/${dataEntityName}/documents/${id}?${params}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.PUT, documentData); + } + + /** + * + * @param {string} dataEntityName + * @param {string} id + * @param {any} documentData + * @param {string} params Example: _schema=schema1&_where=where-statement + */ + updatePartialDocument(dataEntityName: string, id: string, documentData: any, params?: string) + : Promise { + const path = `${Documents.BASE_PATH}/${dataEntityName}/documents/${id}?${params}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.PATCH, documentData); + } + + /** + * + * @param {string} dataEntityName + * @param {string} id + */ + deleteDocument(dataEntityName: string, id: string): Promise { + const path = `${Documents.BASE_PATH}/${dataEntityName}/documents/${id}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.DELETE); + } +} diff --git a/src/modules/master-data/v2/apis/documents/index.ts b/src/modules/master-data/v2/apis/documents/index.ts new file mode 100644 index 0000000..da1ce4a --- /dev/null +++ b/src/modules/master-data/v2/apis/documents/index.ts @@ -0,0 +1 @@ +export * from './Documents'; diff --git a/src/modules/master-data/v2/apis/documents/responses/CreateNewDocumentResponse.ts b/src/modules/master-data/v2/apis/documents/responses/CreateNewDocumentResponse.ts new file mode 100644 index 0000000..e30ef7f --- /dev/null +++ b/src/modules/master-data/v2/apis/documents/responses/CreateNewDocumentResponse.ts @@ -0,0 +1,4 @@ +export interface CreateNewDocumentResponse { + Id?: string; + Href?: string; +} diff --git a/src/modules/master-data/v2/apis/documents/responses/GetDocumentResponse.ts b/src/modules/master-data/v2/apis/documents/responses/GetDocumentResponse.ts new file mode 100644 index 0000000..be3563b --- /dev/null +++ b/src/modules/master-data/v2/apis/documents/responses/GetDocumentResponse.ts @@ -0,0 +1,6 @@ +export interface GetDocumentResponse { + id?: string; + accountId?: string; + accountName?: string; + dataEntityId?: string; +} diff --git a/src/modules/master-data/v2/index.ts b/src/modules/master-data/v2/index.ts new file mode 100644 index 0000000..272177a --- /dev/null +++ b/src/modules/master-data/v2/index.ts @@ -0,0 +1 @@ +export * from './MasterData'; diff --git a/test/VTEX.test.ts b/test/VTEX.test.ts index 0ff94da..a005aec 100644 --- a/test/VTEX.test.ts +++ b/test/VTEX.test.ts @@ -36,6 +36,9 @@ describe('VTEX tests', () => { expect(instance.pricing.priceTables).not.toBe(null); expect(instance.pricing.pricesAndFixedPrices).not.toBe(null); expect(instance.pricing.pricingConfig).not.toBe(null); + + expect(instance.masterData).not.toBe(null); + expect(instance.masterData.documents).not.toBe(null); done(); })); From 88e5b677f35645a05c80b7803b269301d60f5e51 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 17:46:13 -0300 Subject: [PATCH 09/17] add search api --- src/modules/master-data/v2/MasterData.ts | 9 +++++++- .../master-data/v2/apis/search/Search.ts | 22 +++++++++++++++++++ .../master-data/v2/apis/search/index.ts | 1 + .../v2/apis/search/requests/RestRange.ts | 4 ++++ src/utils/VtexHttpClient.ts | 10 +++++++-- test/VTEX.test.ts | 1 + test/VtexHttpClient.test.ts | 21 ++++++++++++++++++ 7 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 src/modules/master-data/v2/apis/search/Search.ts create mode 100644 src/modules/master-data/v2/apis/search/index.ts create mode 100644 src/modules/master-data/v2/apis/search/requests/RestRange.ts diff --git a/src/modules/master-data/v2/MasterData.ts b/src/modules/master-data/v2/MasterData.ts index f881048..24070f5 100644 --- a/src/modules/master-data/v2/MasterData.ts +++ b/src/modules/master-data/v2/MasterData.ts @@ -1,13 +1,20 @@ import { VtexHttpClient } from '../../../utils/VtexHttpClient'; import { Documents } from './apis/documents'; +import { Search } from './apis/search'; export class MasterData { /** * Documents API */ - readonly documents: Documents + readonly documents: Documents; + + /** + * Search API + */ + readonly search: Search; constructor(vtexHttpClient: VtexHttpClient) { this.documents = new Documents(vtexHttpClient); + this.search = new Search(vtexHttpClient); } } diff --git a/src/modules/master-data/v2/apis/search/Search.ts b/src/modules/master-data/v2/apis/search/Search.ts new file mode 100644 index 0000000..900175c --- /dev/null +++ b/src/modules/master-data/v2/apis/search/Search.ts @@ -0,0 +1,22 @@ +import { AbstractApi } from '../../../../AbstractApi'; +import { VtexHttpResponse } from '../../../../../utils/VtexHttpResponse'; +import { RestRange } from './requests/RestRange'; + +export class Search extends AbstractApi { + /** + * + * @param {string} dataEntityName + * @param {RestRange} range + * @param {string} params Example: _schema=schema1&_where=where-statement + */ + searchDocuments(dataEntityName: string, range?: RestRange, params?: string) + : Promise { + const headers = range ? { 'REST-Range': `resources=${range.from}-${range.to}` } : null; + return this.vtexHttpClient.performRequest( + `/api/dataentities/${dataEntityName}/search?${params}`, + this.HTTP_METHODS.GET, + null, + headers, + ); + } +} diff --git a/src/modules/master-data/v2/apis/search/index.ts b/src/modules/master-data/v2/apis/search/index.ts new file mode 100644 index 0000000..addd533 --- /dev/null +++ b/src/modules/master-data/v2/apis/search/index.ts @@ -0,0 +1 @@ +export * from './Search'; diff --git a/src/modules/master-data/v2/apis/search/requests/RestRange.ts b/src/modules/master-data/v2/apis/search/requests/RestRange.ts new file mode 100644 index 0000000..e5f4baa --- /dev/null +++ b/src/modules/master-data/v2/apis/search/requests/RestRange.ts @@ -0,0 +1,4 @@ +export interface RestRange { + from?: number; + to?: number; +} diff --git a/src/utils/VtexHttpClient.ts b/src/utils/VtexHttpClient.ts index 898d7bf..63d91d1 100644 --- a/src/utils/VtexHttpClient.ts +++ b/src/utils/VtexHttpClient.ts @@ -26,11 +26,17 @@ export class VtexHttpClient { * @param {string} path * @param {('GET'|'POST'|'PUT'|'DELETE'|'PATCH')} method * @param {any} body + * @param {any} additionalHeaders */ - performRequest(path: string, method: string, body?: any): Promise { + performRequest(path: string, method: string, body?: any, additionalHeaders?: any) + : Promise { + const defaultRequestOptions = { ...this.defaultRequestOptions }; + if (additionalHeaders) { + defaultRequestOptions.headers = { ...defaultRequestOptions.headers, ...additionalHeaders }; + } return new Promise((resolve, reject) => { const requestOptions: https.RequestOptions = { - ...this.defaultRequestOptions, + ...defaultRequestOptions, path, method, }; diff --git a/test/VTEX.test.ts b/test/VTEX.test.ts index a005aec..9dc255d 100644 --- a/test/VTEX.test.ts +++ b/test/VTEX.test.ts @@ -39,6 +39,7 @@ describe('VTEX tests', () => { expect(instance.masterData).not.toBe(null); expect(instance.masterData.documents).not.toBe(null); + expect(instance.masterData.search).not.toBe(null); done(); })); diff --git a/test/VtexHttpClient.test.ts b/test/VtexHttpClient.test.ts index 550c8c1..d0f7d9a 100644 --- a/test/VtexHttpClient.test.ts +++ b/test/VtexHttpClient.test.ts @@ -50,6 +50,27 @@ describe('VTEXHttpClient tests', () => { }); })); + test('performRequest, with post method with body and additional headers, performs the request', + () => new Promise((done) => { + const path: string = '/api/oms/pvt/orders/orderId/changes'; + const method: string = 'POST'; + const requestBody: any = JSON.parse(readFileSync(getFilepath('vtexRequests/registerChangeOnOrder.json'), 'utf-8')); + const additionalHeaders = { + 'Rest-Range': '0-100', + }; + const scope: nock.Scope = nock(BASE_URL) + .post(path, requestBody) + .matchHeader('X-VTEX-API-AppKey', vtexCredentials.appKey) + .matchHeader('X-VTEX-API-AppToken', vtexCredentials.appToken) + .matchHeader('Rest-Range', '0-100') + .reply(200); + + vtexHttpClient.performRequest(path, method, requestBody, additionalHeaders).then(() => { + expect(scope.isDone()).toBe(true); + done(); + }); + })); + test('performRequest, with post method with body that returns 400, performs the request', () => new Promise((done) => { const path: string = '/api/oms/pvt/orders/orderId/changes'; const method: string = 'POST'; From b113e7c93285c2b9c2d169beebfb60053c062074 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 18:05:42 -0300 Subject: [PATCH 10/17] add scroll api --- src/modules/master-data/v2/MasterData.ts | 7 +++++++ src/modules/master-data/v2/apis/scroll/Scroll.ts | 14 ++++++++++++++ src/modules/master-data/v2/apis/scroll/index.ts | 1 + test/VTEX.test.ts | 1 + 4 files changed, 23 insertions(+) create mode 100644 src/modules/master-data/v2/apis/scroll/Scroll.ts create mode 100644 src/modules/master-data/v2/apis/scroll/index.ts diff --git a/src/modules/master-data/v2/MasterData.ts b/src/modules/master-data/v2/MasterData.ts index 24070f5..57103b9 100644 --- a/src/modules/master-data/v2/MasterData.ts +++ b/src/modules/master-data/v2/MasterData.ts @@ -1,6 +1,7 @@ import { VtexHttpClient } from '../../../utils/VtexHttpClient'; import { Documents } from './apis/documents'; import { Search } from './apis/search'; +import { Scroll } from './apis/scroll'; export class MasterData { /** @@ -13,8 +14,14 @@ export class MasterData { */ readonly search: Search; + /** + * Scroll API + */ + readonly scroll: Scroll; + constructor(vtexHttpClient: VtexHttpClient) { this.documents = new Documents(vtexHttpClient); this.search = new Search(vtexHttpClient); + this.scroll = new Scroll(vtexHttpClient); } } diff --git a/src/modules/master-data/v2/apis/scroll/Scroll.ts b/src/modules/master-data/v2/apis/scroll/Scroll.ts new file mode 100644 index 0000000..c4b7cfc --- /dev/null +++ b/src/modules/master-data/v2/apis/scroll/Scroll.ts @@ -0,0 +1,14 @@ +import { AbstractApi } from '../../../../AbstractApi'; + +export class Scroll extends AbstractApi { + /** + * + * @param {string} dataEntityName + * @param {string} params See https://developers.vtex.com/reference/scroll#scrolldocuments + */ + scrollDocuments(dataEntityName: string, params?: string) { + return this.vtexHttpClient.performRequest( + `/api/dataentities/${dataEntityName}/scroll?${params}`, this.HTTP_METHODS.GET, + ); + } +} diff --git a/src/modules/master-data/v2/apis/scroll/index.ts b/src/modules/master-data/v2/apis/scroll/index.ts new file mode 100644 index 0000000..2b89663 --- /dev/null +++ b/src/modules/master-data/v2/apis/scroll/index.ts @@ -0,0 +1 @@ +export * from './Scroll'; diff --git a/test/VTEX.test.ts b/test/VTEX.test.ts index 9dc255d..b27c15a 100644 --- a/test/VTEX.test.ts +++ b/test/VTEX.test.ts @@ -40,6 +40,7 @@ describe('VTEX tests', () => { expect(instance.masterData).not.toBe(null); expect(instance.masterData.documents).not.toBe(null); expect(instance.masterData.search).not.toBe(null); + expect(instance.masterData.scroll).not.toBe(null); done(); })); From 3bb3b6ebb3d8768bfdd959fcded9cb0c34957b48 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 18:21:35 -0300 Subject: [PATCH 11/17] add schemas api --- src/modules/master-data/v2/MasterData.ts | 7 ++++ .../master-data/v2/apis/schemas/Schemas.ts | 37 +++++++++++++++++++ .../master-data/v2/apis/schemas/index.ts | 1 + .../requests/SaveSchemaByNameRequest.ts | 3 ++ test/VTEX.test.ts | 1 + 5 files changed, 49 insertions(+) create mode 100644 src/modules/master-data/v2/apis/schemas/Schemas.ts create mode 100644 src/modules/master-data/v2/apis/schemas/index.ts create mode 100644 src/modules/master-data/v2/apis/schemas/requests/SaveSchemaByNameRequest.ts diff --git a/src/modules/master-data/v2/MasterData.ts b/src/modules/master-data/v2/MasterData.ts index 57103b9..c9f2e73 100644 --- a/src/modules/master-data/v2/MasterData.ts +++ b/src/modules/master-data/v2/MasterData.ts @@ -2,6 +2,7 @@ import { VtexHttpClient } from '../../../utils/VtexHttpClient'; import { Documents } from './apis/documents'; import { Search } from './apis/search'; import { Scroll } from './apis/scroll'; +import { Schemas } from './apis/schemas'; export class MasterData { /** @@ -19,9 +20,15 @@ export class MasterData { */ readonly scroll: Scroll; + /** + * Schemas API + */ + readonly schemas: Schemas; + constructor(vtexHttpClient: VtexHttpClient) { this.documents = new Documents(vtexHttpClient); this.search = new Search(vtexHttpClient); this.scroll = new Scroll(vtexHttpClient); + this.schemas = new Schemas(vtexHttpClient); } } diff --git a/src/modules/master-data/v2/apis/schemas/Schemas.ts b/src/modules/master-data/v2/apis/schemas/Schemas.ts new file mode 100644 index 0000000..8099672 --- /dev/null +++ b/src/modules/master-data/v2/apis/schemas/Schemas.ts @@ -0,0 +1,37 @@ +import { AbstractApi } from '../../../../AbstractApi'; +import { VtexHttpResponse } from '../../../../../utils/VtexHttpResponse'; + +export class Schemas extends AbstractApi { + private static readonly BASE_URL: string = '/api/dataentities'; + + /** + * Return the schemas saved. + * @param {string} dataEntityName + */ + getSchemas(dataEntityName: string): Promise { + const path = `${Schemas.BASE_URL}/${dataEntityName}/schemas`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * Return the schema saved. + * @param {string} dataEntityName + * @param {string} schemaName + */ + getSchemaByName(dataEntityName: string, schemaName: string): Promise { + const path = `${Schemas.BASE_URL}/${dataEntityName}/schemas/${schemaName}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * Save the schema. + * @param {string} dataEntityName + * @param {string} schemaName + * @param {any} schemaData + */ + saveSchemaByName(dataEntityName: string, schemaName: string, schemaData: any) + : Promise { + const path = `${Schemas.BASE_URL}/${dataEntityName}/schemas/${schemaName}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.PUT, schemaData); + } +} diff --git a/src/modules/master-data/v2/apis/schemas/index.ts b/src/modules/master-data/v2/apis/schemas/index.ts new file mode 100644 index 0000000..459ce26 --- /dev/null +++ b/src/modules/master-data/v2/apis/schemas/index.ts @@ -0,0 +1 @@ +export * from './Schemas'; diff --git a/src/modules/master-data/v2/apis/schemas/requests/SaveSchemaByNameRequest.ts b/src/modules/master-data/v2/apis/schemas/requests/SaveSchemaByNameRequest.ts new file mode 100644 index 0000000..52588e8 --- /dev/null +++ b/src/modules/master-data/v2/apis/schemas/requests/SaveSchemaByNameRequest.ts @@ -0,0 +1,3 @@ +export interface SaveSchemaByNameRequest { + properties?: any; +} diff --git a/test/VTEX.test.ts b/test/VTEX.test.ts index b27c15a..ac1930e 100644 --- a/test/VTEX.test.ts +++ b/test/VTEX.test.ts @@ -41,6 +41,7 @@ describe('VTEX tests', () => { expect(instance.masterData.documents).not.toBe(null); expect(instance.masterData.search).not.toBe(null); expect(instance.masterData.scroll).not.toBe(null); + expect(instance.masterData.schemas).not.toBe(null); done(); })); From f0eea57154ae37e825caf552a1ee0ae2bc966558 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 18:31:15 -0300 Subject: [PATCH 12/17] add indices api --- src/modules/master-data/v2/MasterData.ts | 7 ++++ .../master-data/v2/apis/indices/Indices.ts | 36 +++++++++++++++++++ .../master-data/v2/apis/indices/index.ts | 1 + .../indices/requests/PutIndicesRequest.ts | 5 +++ .../master-data/v2/apis/schemas/Schemas.ts | 8 ++--- test/VTEX.test.ts | 1 + 6 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 src/modules/master-data/v2/apis/indices/Indices.ts create mode 100644 src/modules/master-data/v2/apis/indices/index.ts create mode 100644 src/modules/master-data/v2/apis/indices/requests/PutIndicesRequest.ts diff --git a/src/modules/master-data/v2/MasterData.ts b/src/modules/master-data/v2/MasterData.ts index c9f2e73..7ef7a23 100644 --- a/src/modules/master-data/v2/MasterData.ts +++ b/src/modules/master-data/v2/MasterData.ts @@ -3,6 +3,7 @@ import { Documents } from './apis/documents'; import { Search } from './apis/search'; import { Scroll } from './apis/scroll'; import { Schemas } from './apis/schemas'; +import { Indices } from './apis/indices'; export class MasterData { /** @@ -25,10 +26,16 @@ export class MasterData { */ readonly schemas: Schemas; + /** + * Indices API + */ + readonly indices: Indices; + constructor(vtexHttpClient: VtexHttpClient) { this.documents = new Documents(vtexHttpClient); this.search = new Search(vtexHttpClient); this.scroll = new Scroll(vtexHttpClient); this.schemas = new Schemas(vtexHttpClient); + this.indices = new Indices(vtexHttpClient); } } diff --git a/src/modules/master-data/v2/apis/indices/Indices.ts b/src/modules/master-data/v2/apis/indices/Indices.ts new file mode 100644 index 0000000..2691770 --- /dev/null +++ b/src/modules/master-data/v2/apis/indices/Indices.ts @@ -0,0 +1,36 @@ +import { AbstractApi } from '../../../../AbstractApi'; +import { VtexHttpResponse } from '../../../../../utils/VtexHttpResponse'; +import { PutIndicesRequest } from './requests/PutIndicesRequest'; + +export class Indices extends AbstractApi { + private static readonly BASE_PATH: string = '/api/dataentities'; + + /** + * Return the list of indices by data entity. + * @param {string} dataEntityName + */ + getIndices(dataEntityName: string): Promise { + const path = `${Indices.BASE_PATH}/${dataEntityName}/indices`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * Create an indice. + * @param {string} dataEntityName + * @param {PutIndicesRequest} indexData + */ + putIndices(dataEntityName: string, indiceData: PutIndicesRequest): Promise { + const path = `${Indices.BASE_PATH}/${dataEntityName}/indices`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.PUT, indiceData); + } + + /** + * Return an indice. + * @param {string} dataEntityName + * @param {string} indiceName + */ + getIndiceByName(dataEntityName: string, indiceName: string): Promise { + const path = `${Indices.BASE_PATH}/${dataEntityName}/indices/${indiceName}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } +} diff --git a/src/modules/master-data/v2/apis/indices/index.ts b/src/modules/master-data/v2/apis/indices/index.ts new file mode 100644 index 0000000..088506f --- /dev/null +++ b/src/modules/master-data/v2/apis/indices/index.ts @@ -0,0 +1 @@ +export * from './Indices'; diff --git a/src/modules/master-data/v2/apis/indices/requests/PutIndicesRequest.ts b/src/modules/master-data/v2/apis/indices/requests/PutIndicesRequest.ts new file mode 100644 index 0000000..f7b2204 --- /dev/null +++ b/src/modules/master-data/v2/apis/indices/requests/PutIndicesRequest.ts @@ -0,0 +1,5 @@ +export interface PutIndicesRequest { + name?: string; + multiple?: boolean; + fields?: string; +} diff --git a/src/modules/master-data/v2/apis/schemas/Schemas.ts b/src/modules/master-data/v2/apis/schemas/Schemas.ts index 8099672..0032102 100644 --- a/src/modules/master-data/v2/apis/schemas/Schemas.ts +++ b/src/modules/master-data/v2/apis/schemas/Schemas.ts @@ -2,14 +2,14 @@ import { AbstractApi } from '../../../../AbstractApi'; import { VtexHttpResponse } from '../../../../../utils/VtexHttpResponse'; export class Schemas extends AbstractApi { - private static readonly BASE_URL: string = '/api/dataentities'; + private static readonly BASE_PATH: string = '/api/dataentities'; /** * Return the schemas saved. * @param {string} dataEntityName */ getSchemas(dataEntityName: string): Promise { - const path = `${Schemas.BASE_URL}/${dataEntityName}/schemas`; + const path = `${Schemas.BASE_PATH}/${dataEntityName}/schemas`; return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); } @@ -19,7 +19,7 @@ export class Schemas extends AbstractApi { * @param {string} schemaName */ getSchemaByName(dataEntityName: string, schemaName: string): Promise { - const path = `${Schemas.BASE_URL}/${dataEntityName}/schemas/${schemaName}`; + const path = `${Schemas.BASE_PATH}/${dataEntityName}/schemas/${schemaName}`; return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); } @@ -31,7 +31,7 @@ export class Schemas extends AbstractApi { */ saveSchemaByName(dataEntityName: string, schemaName: string, schemaData: any) : Promise { - const path = `${Schemas.BASE_URL}/${dataEntityName}/schemas/${schemaName}`; + const path = `${Schemas.BASE_PATH}/${dataEntityName}/schemas/${schemaName}`; return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.PUT, schemaData); } } diff --git a/test/VTEX.test.ts b/test/VTEX.test.ts index ac1930e..875e633 100644 --- a/test/VTEX.test.ts +++ b/test/VTEX.test.ts @@ -42,6 +42,7 @@ describe('VTEX tests', () => { expect(instance.masterData.search).not.toBe(null); expect(instance.masterData.scroll).not.toBe(null); expect(instance.masterData.schemas).not.toBe(null); + expect(instance.masterData.indices).not.toBe(null); done(); })); From a9143c1816792757207052fe7618a3b3176305d9 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 18:54:43 -0300 Subject: [PATCH 13/17] add clusters api --- src/modules/master-data/v2/MasterData.ts | 7 +++++++ .../master-data/v2/apis/clusters/Clusters.ts | 20 +++++++++++++++++++ .../master-data/v2/apis/clusters/index.ts | 1 + .../ValidateDocumentByClustersRequestItem.ts | 4 ++++ test/VTEX.test.ts | 1 + 5 files changed, 33 insertions(+) create mode 100644 src/modules/master-data/v2/apis/clusters/Clusters.ts create mode 100644 src/modules/master-data/v2/apis/clusters/index.ts create mode 100644 src/modules/master-data/v2/apis/clusters/requests/ValidateDocumentByClustersRequestItem.ts diff --git a/src/modules/master-data/v2/MasterData.ts b/src/modules/master-data/v2/MasterData.ts index 7ef7a23..d1b729d 100644 --- a/src/modules/master-data/v2/MasterData.ts +++ b/src/modules/master-data/v2/MasterData.ts @@ -4,6 +4,7 @@ import { Search } from './apis/search'; import { Scroll } from './apis/scroll'; import { Schemas } from './apis/schemas'; import { Indices } from './apis/indices'; +import { Clusters } from './apis/clusters'; export class MasterData { /** @@ -31,11 +32,17 @@ export class MasterData { */ readonly indices: Indices; + /** + * Clusters API + */ + readonly clusters: Clusters; + constructor(vtexHttpClient: VtexHttpClient) { this.documents = new Documents(vtexHttpClient); this.search = new Search(vtexHttpClient); this.scroll = new Scroll(vtexHttpClient); this.schemas = new Schemas(vtexHttpClient); this.indices = new Indices(vtexHttpClient); + this.clusters = new Clusters(vtexHttpClient); } } diff --git a/src/modules/master-data/v2/apis/clusters/Clusters.ts b/src/modules/master-data/v2/apis/clusters/Clusters.ts new file mode 100644 index 0000000..b5a175c --- /dev/null +++ b/src/modules/master-data/v2/apis/clusters/Clusters.ts @@ -0,0 +1,20 @@ +import { AbstractApi } from '../../../../AbstractApi'; +import { VtexHttpResponse } from '../../../../../utils/VtexHttpResponse'; +import { ValidateDocumentByClustersRequestItem } from './requests/ValidateDocumentByClustersRequestItem'; + +export class Clusters extends AbstractApi { + /** + * Lets you know if a particular document is in one or more clusters. + * @param {string} dataEntityName + * @param {string} id + * @param {Array} rules + */ + validateDocumentByClusters(dataEntityName: string, id: string, + rules: Array): Promise { + return this.vtexHttpClient.performRequest( + `/api/dataentities/${dataEntityName}/documents/${id}/clusters`, + this.HTTP_METHODS.POST, + rules, + ); + } +} diff --git a/src/modules/master-data/v2/apis/clusters/index.ts b/src/modules/master-data/v2/apis/clusters/index.ts new file mode 100644 index 0000000..148d503 --- /dev/null +++ b/src/modules/master-data/v2/apis/clusters/index.ts @@ -0,0 +1 @@ +export * from './Clusters'; diff --git a/src/modules/master-data/v2/apis/clusters/requests/ValidateDocumentByClustersRequestItem.ts b/src/modules/master-data/v2/apis/clusters/requests/ValidateDocumentByClustersRequestItem.ts new file mode 100644 index 0000000..73c57f1 --- /dev/null +++ b/src/modules/master-data/v2/apis/clusters/requests/ValidateDocumentByClustersRequestItem.ts @@ -0,0 +1,4 @@ +export interface ValidateDocumentByClustersRequestItem { + name?: string; + rule?: string; +} diff --git a/test/VTEX.test.ts b/test/VTEX.test.ts index 875e633..1ca992e 100644 --- a/test/VTEX.test.ts +++ b/test/VTEX.test.ts @@ -43,6 +43,7 @@ describe('VTEX tests', () => { expect(instance.masterData.scroll).not.toBe(null); expect(instance.masterData.schemas).not.toBe(null); expect(instance.masterData.indices).not.toBe(null); + expect(instance.masterData.clusters).not.toBe(null); done(); })); From 5128153fe69e5e08fd5ffe615d139879331ac047 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Fri, 19 Jun 2020 19:17:05 -0300 Subject: [PATCH 14/17] add versions api --- src/modules/master-data/v2/MasterData.ts | 7 +++ .../master-data/v2/apis/versions/Versions.ts | 44 +++++++++++++++++++ .../master-data/v2/apis/versions/index.ts | 1 + .../versions/responses/GetVersionResponse.ts | 24 ++++++++++ .../responses/ListVersionsResponseItem.ts | 4 ++ .../versions/responses/PutVersionResponse.ts | 4 ++ test/VTEX.test.ts | 1 + 7 files changed, 85 insertions(+) create mode 100644 src/modules/master-data/v2/apis/versions/Versions.ts create mode 100644 src/modules/master-data/v2/apis/versions/index.ts create mode 100644 src/modules/master-data/v2/apis/versions/responses/GetVersionResponse.ts create mode 100644 src/modules/master-data/v2/apis/versions/responses/ListVersionsResponseItem.ts create mode 100644 src/modules/master-data/v2/apis/versions/responses/PutVersionResponse.ts diff --git a/src/modules/master-data/v2/MasterData.ts b/src/modules/master-data/v2/MasterData.ts index d1b729d..a17b20e 100644 --- a/src/modules/master-data/v2/MasterData.ts +++ b/src/modules/master-data/v2/MasterData.ts @@ -5,6 +5,7 @@ import { Scroll } from './apis/scroll'; import { Schemas } from './apis/schemas'; import { Indices } from './apis/indices'; import { Clusters } from './apis/clusters'; +import { Versions } from './apis/versions'; export class MasterData { /** @@ -37,6 +38,11 @@ export class MasterData { */ readonly clusters: Clusters; + /** + * Versions API + */ + readonly versions: Versions; + constructor(vtexHttpClient: VtexHttpClient) { this.documents = new Documents(vtexHttpClient); this.search = new Search(vtexHttpClient); @@ -44,5 +50,6 @@ export class MasterData { this.schemas = new Schemas(vtexHttpClient); this.indices = new Indices(vtexHttpClient); this.clusters = new Clusters(vtexHttpClient); + this.versions = new Versions(vtexHttpClient); } } diff --git a/src/modules/master-data/v2/apis/versions/Versions.ts b/src/modules/master-data/v2/apis/versions/Versions.ts new file mode 100644 index 0000000..6b6bb62 --- /dev/null +++ b/src/modules/master-data/v2/apis/versions/Versions.ts @@ -0,0 +1,44 @@ +import { AbstractApi } from '../../../../AbstractApi'; +import { VtexHttpResponse } from '../../../../../utils/VtexHttpResponse'; +import { ListVersionsResponseItem } from './responses/ListVersionsResponseItem'; +import { GetVersionResponse } from './responses/GetVersionResponse'; +import { PutVersionResponse } from './responses/PutVersionResponse'; + +export class Versions extends AbstractApi { + private static readonly BASE_PATH: string = '/api/dataentities'; + + /** + * Allows to list the versions of a document. + * @param {string} dataEntityName + * @param {string} id + */ + listVersions(dataEntityName: string, id: string) + : Promise>> { + const path = `${Versions.BASE_PATH}/${dataEntityName}/documents/${id}/versions`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * Returns the version of a document. + * @param {string} dataEntityName + * @param {string} id + * @param {string} versionId + */ + getVersion(dataEntityName: string, id: string, versionId: string) + : Promise> { + const path = `${Versions.BASE_PATH}/${dataEntityName}/documents/${id}/versions/${versionId}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.GET); + } + + /** + * Updates document with version values. + * @param {string} dataEntityName + * @param {string} id + * @param {string} versionId + */ + putVersion(dataEntityName: string, id: string, versionId: string) + : Promise> { + const path = `${Versions.BASE_PATH}/${dataEntityName}/documents/${id}/versions/${versionId}`; + return this.vtexHttpClient.performRequest(path, this.HTTP_METHODS.PUT); + } +} diff --git a/src/modules/master-data/v2/apis/versions/index.ts b/src/modules/master-data/v2/apis/versions/index.ts new file mode 100644 index 0000000..958a80b --- /dev/null +++ b/src/modules/master-data/v2/apis/versions/index.ts @@ -0,0 +1 @@ +export * from './Versions'; diff --git a/src/modules/master-data/v2/apis/versions/responses/GetVersionResponse.ts b/src/modules/master-data/v2/apis/versions/responses/GetVersionResponse.ts new file mode 100644 index 0000000..345709a --- /dev/null +++ b/src/modules/master-data/v2/apis/versions/responses/GetVersionResponse.ts @@ -0,0 +1,24 @@ +interface DepartmentVisitedTag { + DisplayValue?: string; + Scores?: any; +} + +interface Document { + id?: string; + dataEntityId?: string; + accountId?: string; + accountName?: string; + followers?: Array; + email?: Array; + rclastsession?: Array; + rclastsessiondate?: Array; + checkouttag?: Array; + carttag?: Array; + departmentVisitedTag?: DepartmentVisitedTag; +} + +export interface GetVersionResponse { + id?: string; + author?: string; + document?: Document; +} diff --git a/src/modules/master-data/v2/apis/versions/responses/ListVersionsResponseItem.ts b/src/modules/master-data/v2/apis/versions/responses/ListVersionsResponseItem.ts new file mode 100644 index 0000000..e6b97d5 --- /dev/null +++ b/src/modules/master-data/v2/apis/versions/responses/ListVersionsResponseItem.ts @@ -0,0 +1,4 @@ +export interface ListVersionsResponseItem { + id?: string; + date?: string; +} diff --git a/src/modules/master-data/v2/apis/versions/responses/PutVersionResponse.ts b/src/modules/master-data/v2/apis/versions/responses/PutVersionResponse.ts new file mode 100644 index 0000000..74e8eb0 --- /dev/null +++ b/src/modules/master-data/v2/apis/versions/responses/PutVersionResponse.ts @@ -0,0 +1,4 @@ +export interface PutVersionResponse { + Id?: string; + Href?: string; +} diff --git a/test/VTEX.test.ts b/test/VTEX.test.ts index 1ca992e..d1d08aa 100644 --- a/test/VTEX.test.ts +++ b/test/VTEX.test.ts @@ -44,6 +44,7 @@ describe('VTEX tests', () => { expect(instance.masterData.schemas).not.toBe(null); expect(instance.masterData.indices).not.toBe(null); expect(instance.masterData.clusters).not.toBe(null); + expect(instance.masterData.versions).not.toBe(null); done(); })); From ecd57bf21c31b5bfca498a81ec1dfb27f1a68795 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Mon, 22 Jun 2020 10:57:38 -0300 Subject: [PATCH 15/17] update dependencies --- package.json | 8 +- yarn.lock | 316 +++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 235 insertions(+), 89 deletions(-) diff --git a/package.json b/package.json index 80ae336..ef9e3a5 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "lint": "eslint ." }, "devDependencies": { - "@babel/core": "7.10.2", - "@babel/preset-env": "7.10.2", + "@babel/core": "7.10.3", + "@babel/preset-env": "7.10.3", "@babel/preset-typescript": "7.10.1", "@types/jest": "26.0.0", "@types/node": "14.0.13", @@ -38,11 +38,11 @@ "eslint": "7.3.0", "eslint-config-airbnb-base": "14.2.0", "eslint-plugin-import": "2.21.2", - "eslint-plugin-jest": "23.13.2", + "eslint-plugin-jest": "23.16.0", "jest": "26.0.1", "nock": "12.0.3", "rimraf": "3.0.2", - "ts-jest": "26.1.0", + "ts-jest": "26.1.1", "typescript": "3.9.5" }, "engines": { diff --git a/yarn.lock b/yarn.lock index c2f024d..4ff5e7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,6 +9,13 @@ dependencies: "@babel/highlight" "^7.10.1" +"@babel/code-frame@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.3.tgz#324bcfd8d35cd3d47dae18cde63d752086435e9a" + integrity sha512-fDx9eNW0qz0WkUeqL6tXEXzVlPh6Y5aCDEZesl0xBGA8ndRukX91Uk44ZqnkECp01NAZUdCAl+aiQNGi0k88Eg== + dependencies: + "@babel/highlight" "^7.10.3" + "@babel/compat-data@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.10.1.tgz#b1085ffe72cd17bf2c0ee790fc09f9626011b2db" @@ -18,7 +25,38 @@ invariant "^2.2.4" semver "^5.5.0" -"@babel/core@7.10.2", "@babel/core@^7.1.0", "@babel/core@^7.7.5": +"@babel/compat-data@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.10.3.tgz#9af3e033f36e8e2d6e47570db91e64a846f5d382" + integrity sha512-BDIfJ9uNZuI0LajPfoYV28lX8kyCPMHY6uY4WH1lJdcicmAfxCK5ASzaeV0D/wsUaRH/cLk+amuxtC37sZ8TUg== + dependencies: + browserslist "^4.12.0" + invariant "^2.2.4" + semver "^5.5.0" + +"@babel/core@7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.10.3.tgz#73b0e8ddeec1e3fdd7a2de587a60e17c440ec77e" + integrity sha512-5YqWxYE3pyhIi84L84YcwjeEgS+fa7ZjK6IBVGTjDVfm64njkR2lfDhVR5OudLk8x2GK59YoSyVv+L/03k1q9w== + dependencies: + "@babel/code-frame" "^7.10.3" + "@babel/generator" "^7.10.3" + "@babel/helper-module-transforms" "^7.10.1" + "@babel/helpers" "^7.10.1" + "@babel/parser" "^7.10.3" + "@babel/template" "^7.10.3" + "@babel/traverse" "^7.10.3" + "@babel/types" "^7.10.3" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/core@^7.1.0", "@babel/core@^7.7.5": version "7.10.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.10.2.tgz#bd6786046668a925ac2bd2fd95b579b92a23b36a" integrity sha512-KQmV9yguEjQsXqyOUGKjS4+3K8/DlOCE2pZcq4augdQmtTy5iv5EHtmMSJ7V4c1BIPjuwtZYqYLCq9Ga+hGBRQ== @@ -50,6 +88,16 @@ lodash "^4.17.13" source-map "^0.5.0" +"@babel/generator@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.10.3.tgz#32b9a0d963a71d7a54f5f6c15659c3dbc2a523a5" + integrity sha512-drt8MUHbEqRzNR0xnF8nMehbY11b1SDkRw03PSNH/3Rb2Z35oxkddVSi3rcaak0YJQ86PCuE7Qx1jSFhbLNBMA== + dependencies: + "@babel/types" "^7.10.3" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.1.tgz#f6d08acc6f70bbd59b436262553fb2e259a1a268" @@ -97,13 +145,13 @@ "@babel/helper-regex" "^7.10.1" regexpu-core "^4.7.0" -"@babel/helper-define-map@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.10.1.tgz#5e69ee8308648470dd7900d159c044c10285221d" - integrity sha512-+5odWpX+OnvkD0Zmq7panrMuAGQBu6aPUgvMzuMGo4R+jUOvealEj2hiqI6WhxgKrTpFoFj0+VdsuA8KDxHBDg== +"@babel/helper-define-map@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.10.3.tgz#d27120a5e57c84727b30944549b2dfeca62401a8" + integrity sha512-bxRzDi4Sin/k0drWCczppOhov1sBSdBvXJObM1NLHQzjhXhwRtn7aRWGvLJWCYbuu2qUk3EKs6Ci9C9ps8XokQ== dependencies: - "@babel/helper-function-name" "^7.10.1" - "@babel/types" "^7.10.1" + "@babel/helper-function-name" "^7.10.3" + "@babel/types" "^7.10.3" lodash "^4.17.13" "@babel/helper-explode-assignable-expression@^7.10.1": @@ -123,6 +171,15 @@ "@babel/template" "^7.10.1" "@babel/types" "^7.10.1" +"@babel/helper-function-name@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.3.tgz#79316cd75a9fa25ba9787ff54544307ed444f197" + integrity sha512-FvSj2aiOd8zbeqijjgqdMDSyxsGHaMt5Tr0XjQsGKHD3/1FP3wksjnLAWzxw7lvXiej8W1Jt47SKTZ6upQNiRw== + dependencies: + "@babel/helper-get-function-arity" "^7.10.3" + "@babel/template" "^7.10.3" + "@babel/types" "^7.10.3" + "@babel/helper-get-function-arity@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz#7303390a81ba7cb59613895a192b93850e373f7d" @@ -130,12 +187,19 @@ dependencies: "@babel/types" "^7.10.1" -"@babel/helper-hoist-variables@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.1.tgz#7e77c82e5dcae1ebf123174c385aaadbf787d077" - integrity sha512-vLm5srkU8rI6X3+aQ1rQJyfjvCBLXP8cAGeuw04zeAM2ItKb1e7pmVmLyHb4sDaAYnLL13RHOZPLEtcGZ5xvjg== +"@babel/helper-get-function-arity@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.3.tgz#3a28f7b28ccc7719eacd9223b659fdf162e4c45e" + integrity sha512-iUD/gFsR+M6uiy69JA6fzM5seno8oE85IYZdbVVEuQaZlEzMO2MXblh+KSPJgsZAUx0EEbWXU0yJaW7C9CdAVg== dependencies: - "@babel/types" "^7.10.1" + "@babel/types" "^7.10.3" + +"@babel/helper-hoist-variables@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.3.tgz#d554f52baf1657ffbd7e5137311abc993bb3f068" + integrity sha512-9JyafKoBt5h20Yv1+BXQMdcXXavozI1vt401KBiRc2qzUepbVnd7ogVNymY1xkQN9fekGwfxtotH2Yf5xsGzgg== + dependencies: + "@babel/types" "^7.10.3" "@babel/helper-member-expression-to-functions@^7.10.1": version "7.10.1" @@ -151,6 +215,13 @@ dependencies: "@babel/types" "^7.10.1" +"@babel/helper-module-imports@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.3.tgz#766fa1d57608e53e5676f23ae498ec7a95e1b11a" + integrity sha512-Jtqw5M9pahLSUWA+76nhK9OG8nwYXzhQzVIGFoNaHnXF/r4l7kz4Fl0UAW7B6mqC5myoJiBP5/YQlXQTMfHI9w== + dependencies: + "@babel/types" "^7.10.3" + "@babel/helper-module-transforms@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz#24e2f08ee6832c60b157bb0936c86bef7210c622" @@ -171,11 +242,23 @@ dependencies: "@babel/types" "^7.10.1" +"@babel/helper-optimise-call-expression@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.3.tgz#f53c4b6783093195b0f69330439908841660c530" + integrity sha512-kT2R3VBH/cnSz+yChKpaKRJQJWxdGoc6SjioRId2wkeV3bK0wLLioFpJROrX0U4xr/NmxSSAWT/9Ih5snwIIzg== + dependencies: + "@babel/types" "^7.10.3" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.1", "@babel/helper-plugin-utils@^7.8.0": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz#ec5a5cf0eec925b66c60580328b122c01230a127" integrity sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA== +"@babel/helper-plugin-utils@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.3.tgz#aac45cccf8bc1873b99a85f34bceef3beb5d3244" + integrity sha512-j/+j8NAWUTxOtx4LKHybpSClxHoq6I91DQ/mKgAXn5oNUPIUiGppjPIX3TDtJWPrdfP9Kfl7e4fgVMiQR9VE/g== + "@babel/helper-regex@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.1.tgz#021cf1a7ba99822f993222a001cc3fec83255b96" @@ -194,6 +277,17 @@ "@babel/traverse" "^7.10.1" "@babel/types" "^7.10.1" +"@babel/helper-remap-async-to-generator@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.3.tgz#18564f8a6748be466970195b876e8bba3bccf442" + integrity sha512-sLB7666ARbJUGDO60ZormmhQOyqMX/shKBXZ7fy937s+3ID8gSrneMvKSSb+8xIM5V7Vn6uNVtOY1vIm26XLtA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.1" + "@babel/helper-wrap-function" "^7.10.1" + "@babel/template" "^7.10.3" + "@babel/traverse" "^7.10.3" + "@babel/types" "^7.10.3" + "@babel/helper-replace-supers@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz#ec6859d20c5d8087f6a2dc4e014db7228975f13d" @@ -224,6 +318,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz#5770b0c1a826c4f53f5ede5e153163e0318e94b5" integrity sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw== +"@babel/helper-validator-identifier@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.3.tgz#60d9847f98c4cea1b279e005fdb7c28be5412d15" + integrity sha512-bU8JvtlYpJSBPuj1VUmKpFGaDZuLxASky3LhaKj3bmpSTY6VWooSM8msk+Z0CZoErFye2tlABF6yDkT3FOPAXw== + "@babel/helper-wrap-function@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.10.1.tgz#956d1310d6696257a7afd47e4c42dfda5dfcedc9" @@ -252,18 +351,32 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.3.tgz#c633bb34adf07c5c13156692f5922c81ec53f28d" + integrity sha512-Ih9B/u7AtgEnySE2L2F0Xm0GaM729XqqLfHkalTsbjXGyqmf/6M0Cu0WpvqueUlW+xk88BHw9Nkpj49naU+vWw== + dependencies: + "@babel/helper-validator-identifier" "^7.10.3" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.1.0", "@babel/parser@^7.10.1", "@babel/parser@^7.10.2": version "7.10.2" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.2.tgz#871807f10442b92ff97e4783b9b54f6a0ca812d0" integrity sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ== -"@babel/plugin-proposal-async-generator-functions@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.1.tgz#6911af5ba2e615c4ff3c497fe2f47b35bf6d7e55" - integrity sha512-vzZE12ZTdB336POZjmpblWfNNRpMSua45EYnRigE2XsZxcXcIyly2ixnTJasJE4Zq3U7t2d8rRF7XRUuzHxbOw== +"@babel/parser@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.3.tgz#7e71d892b0d6e7d04a1af4c3c79d72c1f10f5315" + integrity sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA== + +"@babel/plugin-proposal-async-generator-functions@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.3.tgz#5a02453d46e5362e2073c7278beab2e53ad7d939" + integrity sha512-WUUWM7YTOudF4jZBAJIW9D7aViYC/Fn0Pln4RIHlQALyno3sXSjqmTA4Zy1TKC2D49RCR8Y/Pn4OIUtEypK3CA== dependencies: - "@babel/helper-plugin-utils" "^7.10.1" - "@babel/helper-remap-async-to-generator" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.3" + "@babel/helper-remap-async-to-generator" "^7.10.3" "@babel/plugin-syntax-async-generators" "^7.8.0" "@babel/plugin-proposal-class-properties@^7.10.1": @@ -306,12 +419,12 @@ "@babel/helper-plugin-utils" "^7.10.1" "@babel/plugin-syntax-numeric-separator" "^7.10.1" -"@babel/plugin-proposal-object-rest-spread@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.1.tgz#cba44908ac9f142650b4a65b8aa06bf3478d5fb6" - integrity sha512-Z+Qri55KiQkHh7Fc4BW6o+QBuTagbOp9txE+4U1i79u9oWlf2npkiDx+Rf3iK3lbcHBuNy9UOkwuR5wOMH3LIQ== +"@babel/plugin-proposal-object-rest-spread@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.3.tgz#b8d0d22f70afa34ad84b7a200ff772f9b9fce474" + integrity sha512-ZZh5leCIlH9lni5bU/wB/UcjtcVLgR8gc+FAgW2OOY+m9h1II3ItTO1/cewNUcsIDZSYcSaz/rYVls+Fb0ExVQ== dependencies: - "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.3" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" "@babel/plugin-transform-parameters" "^7.10.1" @@ -323,12 +436,12 @@ "@babel/helper-plugin-utils" "^7.10.1" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" -"@babel/plugin-proposal-optional-chaining@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.1.tgz#15f5d6d22708629451a91be28f8facc55b0e818c" - integrity sha512-dqQj475q8+/avvok72CF3AOSV/SGEcH29zT5hhohqqvvZ2+boQoOr7iGldBG5YXTO2qgCgc2B3WvVLUdbeMlGA== +"@babel/plugin-proposal-optional-chaining@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.3.tgz#9a726f94622b653c0a3a7a59cdce94730f526f7c" + integrity sha512-yyG3n9dJ1vZ6v5sfmIlMMZ8azQoqx/5/nZTSWX1td6L1H1bsjzA8TInDChpafCZiJkeOFzp/PtrfigAQXxI1Ng== dependencies: - "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.3" "@babel/plugin-syntax-optional-chaining" "^7.8.0" "@babel/plugin-proposal-private-methods@^7.10.1": @@ -469,26 +582,26 @@ "@babel/helper-plugin-utils" "^7.10.1" lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.1.tgz#6e11dd6c4dfae70f540480a4702477ed766d733f" - integrity sha512-P9V0YIh+ln/B3RStPoXpEQ/CoAxQIhRSUn7aXqQ+FZJ2u8+oCtjIXR3+X0vsSD8zv+mb56K7wZW1XiDTDGiDRQ== +"@babel/plugin-transform-classes@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.3.tgz#8d9a656bc3d01f3ff69e1fccb354b0f9d72ac544" + integrity sha512-irEX0ChJLaZVC7FvvRoSIxJlmk0IczFLcwaRXUArBKYHCHbOhe57aG8q3uw/fJsoSXvZhjRX960hyeAGlVBXZw== dependencies: "@babel/helper-annotate-as-pure" "^7.10.1" - "@babel/helper-define-map" "^7.10.1" - "@babel/helper-function-name" "^7.10.1" - "@babel/helper-optimise-call-expression" "^7.10.1" - "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-define-map" "^7.10.3" + "@babel/helper-function-name" "^7.10.3" + "@babel/helper-optimise-call-expression" "^7.10.3" + "@babel/helper-plugin-utils" "^7.10.3" "@babel/helper-replace-supers" "^7.10.1" "@babel/helper-split-export-declaration" "^7.10.1" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.1.tgz#59aa399064429d64dce5cf76ef9b90b7245ebd07" - integrity sha512-mqSrGjp3IefMsXIenBfGcPXxJxweQe2hEIwMQvjtiDQ9b1IBvDUjkAtV/HMXX47/vXf14qDNedXsIiNd1FmkaQ== +"@babel/plugin-transform-computed-properties@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.3.tgz#d3aa6eef67cb967150f76faff20f0abbf553757b" + integrity sha512-GWzhaBOsdbjVFav96drOz7FzrcEW6AP5nax0gLIpstiFaI3LOb2tAg06TimaWU6YKOfUACK3FVrxPJ4GSc5TgA== dependencies: - "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.3" "@babel/plugin-transform-destructuring@^7.10.1": version "7.10.1" @@ -568,14 +681,14 @@ "@babel/helper-simple-access" "^7.10.1" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.1.tgz#9962e4b0ac6aaf2e20431ada3d8ec72082cbffb6" - integrity sha512-ewNKcj1TQZDL3YnO85qh9zo1YF1CHgmSTlRQgHqe63oTrMI85cthKtZjAiZSsSNjPQ5NCaYo5QkbYqEw1ZBgZA== +"@babel/plugin-transform-modules-systemjs@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.3.tgz#004ae727b122b7b146b150d50cba5ffbff4ac56b" + integrity sha512-GWXWQMmE1GH4ALc7YXW56BTh/AlzvDWhUNn9ArFF0+Cz5G8esYlVbXfdyHa1xaD1j+GnBoCeoQNlwtZTVdiG/A== dependencies: - "@babel/helper-hoist-variables" "^7.10.1" + "@babel/helper-hoist-variables" "^7.10.3" "@babel/helper-module-transforms" "^7.10.1" - "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.3" babel-plugin-dynamic-import-node "^2.3.3" "@babel/plugin-transform-modules-umd@^7.10.1": @@ -586,10 +699,10 @@ "@babel/helper-module-transforms" "^7.10.1" "@babel/helper-plugin-utils" "^7.10.1" -"@babel/plugin-transform-named-capturing-groups-regex@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz#a2a72bffa202ac0e2d0506afd0939c5ecbc48c6c" - integrity sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw== +"@babel/plugin-transform-named-capturing-groups-regex@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.3.tgz#a4f8444d1c5a46f35834a410285f2c901c007ca6" + integrity sha512-I3EH+RMFyVi8Iy/LekQm948Z4Lz4yKT7rK+vuCAeRm0kTa6Z5W7xuhRxDNJv0FPya/her6AUgrDITb70YHtTvA== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.8.3" @@ -623,10 +736,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.1" -"@babel/plugin-transform-regenerator@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.1.tgz#10e175cbe7bdb63cc9b39f9b3f823c5c7c5c5490" - integrity sha512-B3+Y2prScgJ2Bh/2l9LJxKbb8C8kRfsG4AdPT+n7ixBHIxJaIG8bi8tgjxUMege1+WqSJ+7gu1YeoMVO3gPWzw== +"@babel/plugin-transform-regenerator@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.3.tgz#6ec680f140a5ceefd291c221cb7131f6d7e8cb6d" + integrity sha512-H5kNeW0u8mbk0qa1jVIVTeJJL6/TJ81ltD4oyPx0P499DhMJrTmmIFCmJ3QloGpQG8K9symccB7S7SJpCKLwtw== dependencies: regenerator-transform "^0.14.2" @@ -659,13 +772,13 @@ "@babel/helper-plugin-utils" "^7.10.1" "@babel/helper-regex" "^7.10.1" -"@babel/plugin-transform-template-literals@^7.10.1": - version "7.10.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.1.tgz#914c7b7f4752c570ea00553b4284dad8070e8628" - integrity sha512-t7B/3MQf5M1T9hPCRG28DNGZUuxAuDqLYS03rJrIk2prj/UV7Z6FOneijhQhnv/Xa039vidXeVbvjK2SK5f7Gg== +"@babel/plugin-transform-template-literals@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.3.tgz#69d39b3d44b31e7b4864173322565894ce939b25" + integrity sha512-yaBn9OpxQra/bk0/CaA4wr41O0/Whkg6nqjqApcinxM7pro51ojhX6fv1pimAnVjVfDy14K0ULoRL70CA9jWWA== dependencies: "@babel/helper-annotate-as-pure" "^7.10.1" - "@babel/helper-plugin-utils" "^7.10.1" + "@babel/helper-plugin-utils" "^7.10.3" "@babel/plugin-transform-typeof-symbol@^7.10.1": version "7.10.1" @@ -698,24 +811,24 @@ "@babel/helper-create-regexp-features-plugin" "^7.10.1" "@babel/helper-plugin-utils" "^7.10.1" -"@babel/preset-env@7.10.2": - version "7.10.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.10.2.tgz#715930f2cf8573b0928005ee562bed52fb65fdfb" - integrity sha512-MjqhX0RZaEgK/KueRzh+3yPSk30oqDKJ5HP5tqTSB1e2gzGS3PLy7K0BIpnp78+0anFuSwOeuCf1zZO7RzRvEA== +"@babel/preset-env@7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.10.3.tgz#3e58c9861bbd93b6a679987c7e4bd365c56c80c9" + integrity sha512-jHaSUgiewTmly88bJtMHbOd1bJf2ocYxb5BWKSDQIP5tmgFuS/n0gl+nhSrYDhT33m0vPxp+rP8oYYgPgMNQlg== dependencies: - "@babel/compat-data" "^7.10.1" + "@babel/compat-data" "^7.10.3" "@babel/helper-compilation-targets" "^7.10.2" - "@babel/helper-module-imports" "^7.10.1" - "@babel/helper-plugin-utils" "^7.10.1" - "@babel/plugin-proposal-async-generator-functions" "^7.10.1" + "@babel/helper-module-imports" "^7.10.3" + "@babel/helper-plugin-utils" "^7.10.3" + "@babel/plugin-proposal-async-generator-functions" "^7.10.3" "@babel/plugin-proposal-class-properties" "^7.10.1" "@babel/plugin-proposal-dynamic-import" "^7.10.1" "@babel/plugin-proposal-json-strings" "^7.10.1" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.10.1" "@babel/plugin-proposal-numeric-separator" "^7.10.1" - "@babel/plugin-proposal-object-rest-spread" "^7.10.1" + "@babel/plugin-proposal-object-rest-spread" "^7.10.3" "@babel/plugin-proposal-optional-catch-binding" "^7.10.1" - "@babel/plugin-proposal-optional-chaining" "^7.10.1" + "@babel/plugin-proposal-optional-chaining" "^7.10.3" "@babel/plugin-proposal-private-methods" "^7.10.1" "@babel/plugin-proposal-unicode-property-regex" "^7.10.1" "@babel/plugin-syntax-async-generators" "^7.8.0" @@ -732,8 +845,8 @@ "@babel/plugin-transform-async-to-generator" "^7.10.1" "@babel/plugin-transform-block-scoped-functions" "^7.10.1" "@babel/plugin-transform-block-scoping" "^7.10.1" - "@babel/plugin-transform-classes" "^7.10.1" - "@babel/plugin-transform-computed-properties" "^7.10.1" + "@babel/plugin-transform-classes" "^7.10.3" + "@babel/plugin-transform-computed-properties" "^7.10.3" "@babel/plugin-transform-destructuring" "^7.10.1" "@babel/plugin-transform-dotall-regex" "^7.10.1" "@babel/plugin-transform-duplicate-keys" "^7.10.1" @@ -744,24 +857,24 @@ "@babel/plugin-transform-member-expression-literals" "^7.10.1" "@babel/plugin-transform-modules-amd" "^7.10.1" "@babel/plugin-transform-modules-commonjs" "^7.10.1" - "@babel/plugin-transform-modules-systemjs" "^7.10.1" + "@babel/plugin-transform-modules-systemjs" "^7.10.3" "@babel/plugin-transform-modules-umd" "^7.10.1" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.10.3" "@babel/plugin-transform-new-target" "^7.10.1" "@babel/plugin-transform-object-super" "^7.10.1" "@babel/plugin-transform-parameters" "^7.10.1" "@babel/plugin-transform-property-literals" "^7.10.1" - "@babel/plugin-transform-regenerator" "^7.10.1" + "@babel/plugin-transform-regenerator" "^7.10.3" "@babel/plugin-transform-reserved-words" "^7.10.1" "@babel/plugin-transform-shorthand-properties" "^7.10.1" "@babel/plugin-transform-spread" "^7.10.1" "@babel/plugin-transform-sticky-regex" "^7.10.1" - "@babel/plugin-transform-template-literals" "^7.10.1" + "@babel/plugin-transform-template-literals" "^7.10.3" "@babel/plugin-transform-typeof-symbol" "^7.10.1" "@babel/plugin-transform-unicode-escapes" "^7.10.1" "@babel/plugin-transform-unicode-regex" "^7.10.1" "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.10.2" + "@babel/types" "^7.10.3" browserslist "^4.12.0" core-js-compat "^3.6.2" invariant "^2.2.2" @@ -803,6 +916,15 @@ "@babel/parser" "^7.10.1" "@babel/types" "^7.10.1" +"@babel/template@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.3.tgz#4d13bc8e30bf95b0ce9d175d30306f42a2c9a7b8" + integrity sha512-5BjI4gdtD+9fHZUsaxPHPNpwa+xRkDO7c7JbhYn2afvrkDu5SfAAbi9AIMXw2xEhO/BR35TqiW97IqNvCo/GqA== + dependencies: + "@babel/code-frame" "^7.10.3" + "@babel/parser" "^7.10.3" + "@babel/types" "^7.10.3" + "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.1": version "7.10.1" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.10.1.tgz#bbcef3031e4152a6c0b50147f4958df54ca0dd27" @@ -818,6 +940,21 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/traverse@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.10.3.tgz#0b01731794aa7b77b214bcd96661f18281155d7e" + integrity sha512-qO6623eBFhuPm0TmmrUFMT1FulCmsSeJuVGhiLodk2raUDFhhTECLd9E9jC4LBIWziqt4wgF6KuXE4d+Jz9yug== + dependencies: + "@babel/code-frame" "^7.10.3" + "@babel/generator" "^7.10.3" + "@babel/helper-function-name" "^7.10.3" + "@babel/helper-split-export-declaration" "^7.10.1" + "@babel/parser" "^7.10.3" + "@babel/types" "^7.10.3" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + "@babel/types@^7.0.0", "@babel/types@^7.10.1", "@babel/types@^7.10.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.10.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.10.2.tgz#30283be31cad0dbf6fb00bd40641ca0ea675172d" @@ -827,6 +964,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.10.3": + version "7.10.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.10.3.tgz#6535e3b79fea86a6b09e012ea8528f935099de8e" + integrity sha512-nZxaJhBXBQ8HVoIcGsf9qWep3Oh3jCENK54V4mRF7qaJabVsAYdbTtmSD8WmAp1R6ytPiu5apMwSXyxB1WlaBA== + dependencies: + "@babel/helper-validator-identifier" "^7.10.3" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -2059,10 +2205,10 @@ eslint-plugin-import@2.21.2: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-plugin-jest@23.13.2: - version "23.13.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.13.2.tgz#7b7993b4e09be708c696b02555083ddefd7e4cc7" - integrity sha512-qZit+moTXTyZFNDqSIR88/L3rdBlTU7CuW6XmyErD2FfHEkdoLgThkRbiQjzgYnX6rfgLx3Ci4eJmF4Ui5v1Cw== +eslint-plugin-jest@23.16.0: + version "23.16.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.16.0.tgz#fada00f765b5e32a1fb10a7490f75ebf673133b3" + integrity sha512-51KcQup31S2NBm+Yqg3rxZIPETd+wZ/gU2rb034RpdXLcZYsa2+uwubqbbDAYIpQw3m+wywF/A56OMEouBY/wA== dependencies: "@typescript-eslint/experimental-utils" "^2.5.0" @@ -4785,10 +4931,10 @@ tr46@^2.0.2: dependencies: punycode "^2.1.1" -ts-jest@26.1.0: - version "26.1.0" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.1.0.tgz#e9070fc97b3ea5557a48b67c631c74eb35e15417" - integrity sha512-JbhQdyDMYN5nfKXaAwCIyaWLGwevcT2/dbqRPsQeh6NZPUuXjZQZEfeLb75tz0ubCIgEELNm6xAzTe5NXs5Y4Q== +ts-jest@26.1.1: + version "26.1.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.1.1.tgz#b98569b8a4d4025d966b3d40c81986dd1c510f8d" + integrity sha512-Lk/357quLg5jJFyBQLnSbhycnB3FPe+e9i7ahxokyXxAYoB0q1pPmqxxRPYr4smJic1Rjcf7MXDBhZWgxlli0A== dependencies: bs-logger "0.x" buffer-from "1.x" From a5a0110f62bb8c45c61866b8aaa885b4893c33b9 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Mon, 22 Jun 2020 11:05:19 -0300 Subject: [PATCH 16/17] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 561499b..1bf108c 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ API | Implemented OMS | :white_check_mark: | Logistics | :white_check_mark: | Pricing | :white_check_mark: | -Master Data (V2) | Comming soon... | +Master Data (V2) | :white_check_mark: (*) Attachments API pending | Antifraud Provider | :x: | Catalog | :x: | Checkout | :x: | From f2b89387724c631f4b7b4101cc0f83e3d9441f30 Mon Sep 17 00:00:00 2001 From: Juan Cernadas Date: Mon, 22 Jun 2020 11:08:33 -0300 Subject: [PATCH 17/17] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1bf108c..124ecfb 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Logistics | :white_check_mark: | Pricing | :white_check_mark: | Master Data (V2) | :white_check_mark: (*) Attachments API pending | Antifraud Provider | :x: | -Catalog | :x: | +Catalog | Comming soon... | Checkout | :x: | CMS | :x: | Customer Credit | :x: |