@things-factory/integration-pos 7.0.1-beta.16 → 7.0.1-beta.18

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.
@@ -1,19 +1,2 @@
1
- export declare const queries: ({
2
- posStore(_: any, { id }: {
3
- id: any;
4
- }, context: ResolverContext): Promise<import("../..").PosStore>;
5
- posStores(_: any, params: import("@things-factory/shell").ListParam, context: ResolverContext): Promise<{
6
- items: import("../..").PosStore[];
7
- total: number;
8
- }>;
9
- } | {
10
- getPosOutlets(_: any, { posId, params: ListParam }: {
11
- posId: any;
12
- params: any;
13
- }, context: ResolverContext): Promise<any>;
14
- getPosOutlet(_: any, { posId, outletNo }: {
15
- posId: any;
16
- outletNo: any;
17
- }, context: ResolverContext): Promise<any>;
18
- })[];
1
+ export declare const queries: any;
19
2
  export declare const mutations: {}[];
@@ -4,12 +4,6 @@ exports.mutations = exports.queries = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const POS = tslib_1.__importStar(require("./pos"));
6
6
  const POSAPI = tslib_1.__importStar(require("./pos-api"));
7
- exports.queries = [
8
- POS.Query,
9
- POSAPI.Query
10
- ];
11
- exports.mutations = [
12
- POS.Mutation,
13
- POSAPI.Mutation
14
- ];
7
+ exports.queries = [POS.Query, POSAPI.Query];
8
+ exports.mutations = [POS.Mutation, POSAPI.Mutation];
15
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/graphql/resolvers/index.ts"],"names":[],"mappings":";;;;AAAA,mDAA4B;AAC5B,0DAAmC;AAEtB,QAAA,OAAO,GAAG;IACrB,GAAG,CAAC,KAAK;IACT,MAAM,CAAC,KAAK;CACb,CAAA;AAEY,QAAA,SAAS,GAAG;IACvB,GAAG,CAAC,QAAQ;IACZ,MAAM,CAAC,QAAQ;CAChB,CAAA","sourcesContent":["import * as POS from './pos'\nimport * as POSAPI from './pos-api'\n\nexport const queries = [\n POS.Query,\n POSAPI.Query\n]\n\nexport const mutations = [\n POS.Mutation,\n POSAPI.Mutation\n]\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/graphql/resolvers/index.ts"],"names":[],"mappings":";;;;AAAA,mDAA4B;AAC5B,0DAAmC;AAEtB,QAAA,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAQ,CAAA;AAE1C,QAAA,SAAS,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAA","sourcesContent":["import * as POS from './pos'\nimport * as POSAPI from './pos-api'\n\nexport const queries = [POS.Query, POSAPI.Query] as any\n\nexport const mutations = [POS.Mutation, POSAPI.Mutation]\n"]}
@@ -1,5 +1,6 @@
1
+ import { PosStore } from '../../../entities';
1
2
  export declare const createPosStore: {
2
3
  createPosStore(_: any, { store }: {
3
4
  store: any;
4
- }, context: ResolverContext): Promise<any>;
5
+ }, context: ResolverContext): Promise<PosStore>;
5
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"create-pos-store.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/create-pos-store.ts"],"names":[],"mappings":";;;AAAA,iDAAqD;AAErD,sDAAuD;AACvD,gDAA4C;AAE/B,QAAA,cAAc,GAAG;IAC5B,KAAK,CAAC,cAAc,CAAC,CAAM,EAAE,EAAE,KAAK,EAAE,EAAE,OAAwB;QAC9D,OAAO,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,IAAI,+BACvC,MAAM,EAAE,8BAAgB,CAAC,QAAQ,IAC9B,KAAK,KACR,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAC5B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,EAC3B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;IACJ,CAAC;CACF,CAAA","sourcesContent":["import { getRepository } from '@things-factory/shell'\n\nimport { POS_STORE_STATUS } from '../../../controllers'\nimport { PosStore } from '../../../entities'\n\nexport const createPosStore = {\n async createPosStore(_: any, { store }, context: ResolverContext) {\n return await getRepository(PosStore).save({\n status: POS_STORE_STATUS.INACTIVE,\n ...store,\n domain: context.state.domain,\n creator: context.state.user,\n updater: context.state.user\n })\n }\n}\n"]}
1
+ {"version":3,"file":"create-pos-store.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/create-pos-store.ts"],"names":[],"mappings":";;;AAAA,iDAAqD;AAErD,sDAAuD;AACvD,gDAA4C;AAE/B,QAAA,cAAc,GAAG;IAC5B,KAAK,CAAC,cAAc,CAAC,CAAM,EAAE,EAAE,KAAK,EAAE,EAAE,OAAwB;QAC9D,OAAO,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,IAAI,+BACvC,MAAM,EAAE,8BAAgB,CAAC,QAAQ,IAC9B,KAAK,KACR,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAC5B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,EAC3B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;IACJ,CAAC;CACF,CAAA","sourcesContent":["import { getRepository } from '@things-factory/shell'\n\nimport { POS_STORE_STATUS } from '../../../controllers'\nimport { PosStore } from '../../../entities'\n\nexport const createPosStore = {\n async createPosStore(_: any, { store }, context: ResolverContext): Promise<PosStore> {\n return await getRepository(PosStore).save({\n status: POS_STORE_STATUS.INACTIVE,\n ...store,\n domain: context.state.domain,\n creator: context.state.user,\n updater: context.state.user\n })\n }\n}\n"]}
@@ -1,12 +1,4 @@
1
- export declare const Query: {
2
- posStore(_: any, { id }: {
3
- id: any;
4
- }, context: ResolverContext): Promise<import("../../..").PosStore>;
5
- posStores(_: any, params: import("@things-factory/shell").ListParam, context: ResolverContext): Promise<{
6
- items: import("../../..").PosStore[];
7
- total: number;
8
- }>;
9
- };
1
+ export declare const Query: any;
10
2
  export declare const Mutation: {
11
3
  deactivateXilnexPosStore(_: any, { id }: {
12
4
  id: any;
@@ -24,7 +16,7 @@ export declare const Mutation: {
24
16
  }, context: ResolverContext): Promise<boolean>;
25
17
  createPosStore(_: any, { store }: {
26
18
  store: any;
27
- }, context: ResolverContext): Promise<any>;
19
+ }, context: ResolverContext): Promise<import("../../..").PosStore>;
28
20
  updateMultiplePosStore(_: any, { patches }: {
29
21
  patches: any;
30
22
  }, context: ResolverContext): Promise<any[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/index.ts"],"names":[],"mappings":";;;;AAAA,2CAA8C;AAC9C,6CAAgD;AAEhD,6EAAqE;AACrE,yDAAmD;AACnD,yDAAmD;AACnD,yDAAmD;AACnD,2DAAqD;AAErD,yDAAkC;AAErB,QAAA,KAAK,iDACb,8BAAiB,GACjB,4BAAgB,GAChB,MAAM,CAAC,KAAK,EAChB;AAEY,QAAA,QAAQ,2FAChB,iCAAc,GACd,mDAAsB,GACtB,iCAAc,GACd,iCAAc,GACd,mCAAe,GACf,MAAM,CAAC,QAAQ,EACnB","sourcesContent":["import { posStoreResolver } from './pos-store'\nimport { posStoresResolver } from './pos-stores'\n\nimport { updateMultiplePosStore } from './update-multiple-pos-stores'\nimport { updatePosStore } from './update-pos-store'\nimport { createPosStore } from './create-pos-store'\nimport { deletePosStore } from './delete-pos-store'\nimport { deletePosStores } from './delete-pos-stores'\n\nimport * as Xilnex from './xilnex'\n\nexport const Query = {\n ...posStoresResolver,\n ...posStoreResolver,\n ...Xilnex.Query\n}\n\nexport const Mutation = {\n ...updatePosStore,\n ...updateMultiplePosStore,\n ...createPosStore,\n ...deletePosStore,\n ...deletePosStores,\n ...Xilnex.Mutation\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/index.ts"],"names":[],"mappings":";;;;AAAA,2CAA8C;AAC9C,6CAAgD;AAEhD,6EAAqE;AACrE,yDAAmD;AACnD,yDAAmD;AACnD,yDAAmD;AACnD,2DAAqD;AAErD,yDAAkC;AAErB,QAAA,KAAK,GAAG,8CAChB,8BAAiB,GACjB,4BAAgB,GAChB,MAAM,CAAC,KAAK,CACT,CAAA;AAEK,QAAA,QAAQ,2FAChB,iCAAc,GACd,mDAAsB,GACtB,iCAAc,GACd,iCAAc,GACd,mCAAe,GACf,MAAM,CAAC,QAAQ,EACnB","sourcesContent":["import { posStoreResolver } from './pos-store'\nimport { posStoresResolver } from './pos-stores'\n\nimport { updateMultiplePosStore } from './update-multiple-pos-stores'\nimport { updatePosStore } from './update-pos-store'\nimport { createPosStore } from './create-pos-store'\nimport { deletePosStore } from './delete-pos-store'\nimport { deletePosStores } from './delete-pos-stores'\n\nimport * as Xilnex from './xilnex'\n\nexport const Query = {\n ...posStoresResolver,\n ...posStoreResolver,\n ...Xilnex.Query\n} as any\n\nexport const Mutation = {\n ...updatePosStore,\n ...updateMultiplePosStore,\n ...createPosStore,\n ...deletePosStore,\n ...deletePosStores,\n ...Xilnex.Mutation\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pos-store.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/pos-store.ts"],"names":[],"mappings":";;;AAAA,iDAAqD;AAErD,gDAA4C;AAE/B,QAAA,gBAAgB,GAAG;IAC9B,KAAK,CAAC,QAAQ,CAAC,CAAM,EAAE,EAAE,EAAE,EAAE,EAAE,OAAwB;QACrD,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAA;QAE1C,OAAO,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC;YAC3C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;YACtD,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;SAC5C,CAAC,CAAA;IACJ,CAAC;CACF,CAAA","sourcesContent":["import { getRepository } from '@things-factory/shell'\n\nimport { PosStore } from '../../../entities'\n\nexport const posStoreResolver = {\n async posStore(_: any, { id }, context: ResolverContext) {\n const repository = getRepository(PosStore)\n\n return await getRepository(PosStore).findOne({\n where: { domain: { id: context.state.domain.id }, id },\n relations: ['domain', 'creator', 'updater']\n })\n }\n}\n"]}
1
+ {"version":3,"file":"pos-store.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/pos-store.ts"],"names":[],"mappings":";;;AAAA,iDAAqD;AAErD,gDAA4C;AAE/B,QAAA,gBAAgB,GAAG;IAC9B,KAAK,CAAC,QAAQ,CAAC,CAAM,EAAE,EAAE,EAAE,EAAE,EAAE,OAAwB;QACrD,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAA;QAE1C,OAAO,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC;YAC3C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;YACtD,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;SAC5C,CAAC,CAAA;IACJ,CAAC;CACF,CAAA","sourcesContent":["import { getRepository } from '@things-factory/shell'\n\nimport { PosStore } from '../../../entities'\n\nexport const posStoreResolver = {\n async posStore(_: any, { id }, context: ResolverContext): Promise<PosStore> {\n const repository = getRepository(PosStore)\n\n return await getRepository(PosStore).findOne({\n where: { domain: { id: context.state.domain.id }, id },\n relations: ['domain', 'creator', 'updater']\n })\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pos-stores.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/pos-stores.ts"],"names":[],"mappings":";;;AAAA,iDAAmF;AAEnF,gDAA4C;AAE/B,QAAA,iBAAiB,GAAG;IAC/B,KAAK,CAAC,SAAS,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAwB;QACjE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;QAC7D,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,YAAY,iCAC5D,eAAe,KAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,IAC3C,CAAA;QACF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;CACF,CAAA","sourcesContent":["import { convertListParams, getRepository, ListParam } from '@things-factory/shell'\n\nimport { PosStore } from '../../../entities'\n\nexport const posStoresResolver = {\n async posStores(_: any, params: ListParam, context: ResolverContext) {\n const { domain } = context.state\n const convertedParams = convertListParams(params, { domain })\n const [items, total] = await getRepository(PosStore).findAndCount({\n ...convertedParams,\n relations: ['domain', 'creator', 'updater']\n })\n return { items, total }\n }\n}\n"]}
1
+ {"version":3,"file":"pos-stores.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/pos-stores.ts"],"names":[],"mappings":";;;AAAA,iDAAmF;AAEnF,gDAA4C;AAE/B,QAAA,iBAAiB,GAAG;IAC/B,KAAK,CAAC,SAAS,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAwB;QACjE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;QAC7D,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,YAAY,iCAC5D,eAAe,KAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,IAC3C,CAAA;QACF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;CACF,CAAA","sourcesContent":["import { convertListParams, getRepository, ListParam } from '@things-factory/shell'\n\nimport { PosStore } from '../../../entities'\n\nexport const posStoresResolver = {\n async posStores(_: any, params: ListParam, context: ResolverContext): Promise<{ items: PosStore[]; total: number }> {\n const { domain } = context.state\n const convertedParams = convertListParams(params, { domain })\n const [items, total] = await getRepository(PosStore).findAndCount({\n ...convertedParams,\n relations: ['domain', 'creator', 'updater']\n })\n return { items, total }\n }\n}\n"]}