@chift/chift-nodejs 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintcache +1 -0
- package/CHANGELOG.md +8 -0
- package/coverage/clover.xml +1645 -0
- package/coverage/coverage-final.json +19 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +146 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/helpers/index.html +131 -0
- package/coverage/lcov-report/src/helpers/openapi.ts.html +151 -0
- package/coverage/lcov-report/src/helpers/settings.ts.html +94 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/src/index.ts.html +88 -0
- package/coverage/lcov-report/src/modules/accounting.ts.html +1156 -0
- package/coverage/lcov-report/src/modules/api.ts.html +190 -0
- package/coverage/lcov-report/src/modules/consumer.ts.html +616 -0
- package/coverage/lcov-report/src/modules/consumers.ts.html +331 -0
- package/coverage/lcov-report/src/modules/custom.ts.html +193 -0
- package/coverage/lcov-report/src/modules/datastores.ts.html +142 -0
- package/coverage/lcov-report/src/modules/ecommerce.ts.html +331 -0
- package/coverage/lcov-report/src/modules/flow.ts.html +589 -0
- package/coverage/lcov-report/src/modules/index.html +326 -0
- package/coverage/lcov-report/src/modules/integrations.ts.html +151 -0
- package/coverage/lcov-report/src/modules/internalApi.ts.html +586 -0
- package/coverage/lcov-report/src/modules/invoicing.ts.html +391 -0
- package/coverage/lcov-report/src/modules/pos.ts.html +421 -0
- package/coverage/lcov-report/src/modules/sync.ts.html +316 -0
- package/coverage/lcov-report/src/modules/syncs.ts.html +169 -0
- package/coverage/lcov-report/src/modules/webhooks.ts.html +343 -0
- package/coverage/lcov.info +1976 -0
- package/dist/src/modules/api.d.ts +855 -420
- package/dist/src/modules/consumer.d.ts +56 -28
- package/dist/src/modules/consumers.d.ts +285 -140
- package/dist/src/modules/internalApi.js +13 -4
- package/dist/src/modules/pos.d.ts +4 -0
- package/dist/src/modules/pos.js +14 -0
- package/dist/src/modules/sync.d.ts +229 -113
- package/dist/src/modules/syncs.d.ts +570 -280
- package/dist/test/modules/flow.test.d.ts +1 -0
- package/dist/test/modules/flow.test.js +69 -0
- package/dist/test/modules/pos.test.js +13 -0
- package/jest.config.ts +1 -1
- package/package.json +1 -1
- package/src/modules/internalApi.ts +19 -10
- package/src/modules/pos.ts +26 -0
- package/src/modules/sync.ts +1 -1
- package/src/modules/syncs.ts +2 -2
- package/src/types/public-api/schema.d.ts +426 -80
- package/test/modules/consumer.test.ts +1 -1
- package/test/modules/pos.test.ts +15 -0
|
@@ -36,7 +36,7 @@ test('createConnection', async () => {
|
|
|
36
36
|
expect(result).toHaveProperty('url', expect.any(String));
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
let connections: components['schemas']['
|
|
39
|
+
let connections: components['schemas']['app__routers__connections__ConnectionItem'][];
|
|
40
40
|
|
|
41
41
|
test('getConnections', async () => {
|
|
42
42
|
connections = await syncConsumer.getConnections();
|
package/test/modules/pos.test.ts
CHANGED
|
@@ -14,12 +14,15 @@ const client = new chift.API({
|
|
|
14
14
|
// Split testing between two APIs to support all endpoints
|
|
15
15
|
const cashpadConsumerId = process.env.CHIFT_CASHPAD_CONSUMER_ID as string;
|
|
16
16
|
const lightspeedConsumerId = process.env.CHIFT_LIGHTSPEED_CONSUMER_ID as string;
|
|
17
|
+
const zeltyConsumerId = process.env.CHIFT_ZELTY_CONSUMER_ID as string;
|
|
17
18
|
|
|
18
19
|
let cashpadConsumer: any;
|
|
19
20
|
let lightspeedConsumer: any;
|
|
21
|
+
let zeltyConsumer: any;
|
|
20
22
|
beforeAll(async () => {
|
|
21
23
|
cashpadConsumer = await client.Consumers.getConsumerById(cashpadConsumerId);
|
|
22
24
|
lightspeedConsumer = await client.Consumers.getConsumerById(lightspeedConsumerId);
|
|
25
|
+
zeltyConsumer = await client.Consumers.getConsumerById(zeltyConsumerId);
|
|
23
26
|
});
|
|
24
27
|
|
|
25
28
|
test('getLocations', async () => {
|
|
@@ -143,3 +146,15 @@ test.skip('updateOrder', async () => {
|
|
|
143
146
|
expect(order).toBeTruthy();
|
|
144
147
|
expect(order).toHaveProperty('id', expect.any(String));
|
|
145
148
|
});
|
|
149
|
+
|
|
150
|
+
test('getProducts', async () => {
|
|
151
|
+
const products = await zeltyConsumer.pos.getProducts();
|
|
152
|
+
expect(products).toBeInstanceOf(Array);
|
|
153
|
+
expect(products.length).toBeGreaterThan(0);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
test('getProductCategories', async () => {
|
|
157
|
+
const productCategories = await zeltyConsumer.pos.getProductCategories();
|
|
158
|
+
expect(productCategories).toBeInstanceOf(Array);
|
|
159
|
+
expect(productCategories.length).toBeGreaterThan(0);
|
|
160
|
+
});
|