@things-factory/integration-accounting 9.0.0-beta.25 → 9.0.0-beta.27
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/package.json +3 -3
- package/dist-server/controllers/accounting-api/decorators.d.ts +0 -1
- package/dist-server/controllers/accounting-api/decorators.js +0 -33
- package/dist-server/controllers/accounting-api/decorators.js.map +0 -1
- package/dist-server/controllers/accounting-api/index.d.ts +0 -25
- package/dist-server/controllers/accounting-api/index.js +0 -124
- package/dist-server/controllers/accounting-api/index.js.map +0 -1
- package/dist-server/controllers/index.d.ts +0 -2
- package/dist-server/controllers/index.js +0 -6
- package/dist-server/controllers/index.js.map +0 -1
- package/dist-server/controllers/xero/apis/contact/get-contact.d.ts +0 -19
- package/dist-server/controllers/xero/apis/contact/get-contact.js +0 -32
- package/dist-server/controllers/xero/apis/contact/get-contact.js.map +0 -1
- package/dist-server/controllers/xero/apis/contact/get-contacts.d.ts +0 -8
- package/dist-server/controllers/xero/apis/contact/get-contacts.js +0 -18
- package/dist-server/controllers/xero/apis/contact/get-contacts.js.map +0 -1
- package/dist-server/controllers/xero/apis/contact/index.d.ts +0 -2
- package/dist-server/controllers/xero/apis/contact/index.js +0 -6
- package/dist-server/controllers/xero/apis/contact/index.js.map +0 -1
- package/dist-server/controllers/xero/apis/index.d.ts +0 -4
- package/dist-server/controllers/xero/apis/index.js +0 -8
- package/dist-server/controllers/xero/apis/index.js.map +0 -1
- package/dist-server/controllers/xero/apis/invoice/create-invoice.d.ts +0 -6
- package/dist-server/controllers/xero/apis/invoice/create-invoice.js +0 -16
- package/dist-server/controllers/xero/apis/invoice/create-invoice.js.map +0 -1
- package/dist-server/controllers/xero/apis/invoice/get-invoice.d.ts +0 -10
- package/dist-server/controllers/xero/apis/invoice/get-invoice.js +0 -18
- package/dist-server/controllers/xero/apis/invoice/get-invoice.js.map +0 -1
- package/dist-server/controllers/xero/apis/invoice/get-invoices.d.ts +0 -10
- package/dist-server/controllers/xero/apis/invoice/get-invoices.js +0 -59
- package/dist-server/controllers/xero/apis/invoice/get-invoices.js.map +0 -1
- package/dist-server/controllers/xero/apis/invoice/index.d.ts +0 -4
- package/dist-server/controllers/xero/apis/invoice/index.js +0 -8
- package/dist-server/controllers/xero/apis/invoice/index.js.map +0 -1
- package/dist-server/controllers/xero/apis/invoice/update-invoice.d.ts +0 -6
- package/dist-server/controllers/xero/apis/invoice/update-invoice.js +0 -16
- package/dist-server/controllers/xero/apis/invoice/update-invoice.js.map +0 -1
- package/dist-server/controllers/xero/apis/item/create-item.d.ts +0 -16
- package/dist-server/controllers/xero/apis/item/create-item.js +0 -32
- package/dist-server/controllers/xero/apis/item/create-item.js.map +0 -1
- package/dist-server/controllers/xero/apis/item/delete-item.d.ts +0 -11
- package/dist-server/controllers/xero/apis/item/delete-item.js +0 -21
- package/dist-server/controllers/xero/apis/item/delete-item.js.map +0 -1
- package/dist-server/controllers/xero/apis/item/get-item.d.ts +0 -10
- package/dist-server/controllers/xero/apis/item/get-item.js +0 -34
- package/dist-server/controllers/xero/apis/item/get-item.js.map +0 -1
- package/dist-server/controllers/xero/apis/item/get-items.d.ts +0 -8
- package/dist-server/controllers/xero/apis/item/get-items.js +0 -32
- package/dist-server/controllers/xero/apis/item/get-items.js.map +0 -1
- package/dist-server/controllers/xero/apis/item/index.d.ts +0 -6
- package/dist-server/controllers/xero/apis/item/index.js +0 -10
- package/dist-server/controllers/xero/apis/item/index.js.map +0 -1
- package/dist-server/controllers/xero/apis/item/update-item.d.ts +0 -14
- package/dist-server/controllers/xero/apis/item/update-item.js +0 -30
- package/dist-server/controllers/xero/apis/item/update-item.js.map +0 -1
- package/dist-server/controllers/xero/apis/item/update-items.d.ts +0 -10
- package/dist-server/controllers/xero/apis/item/update-items.js +0 -36
- package/dist-server/controllers/xero/apis/item/update-items.js.map +0 -1
- package/dist-server/controllers/xero/apis/purchase-order/get-purchase-orders.d.ts +0 -8
- package/dist-server/controllers/xero/apis/purchase-order/get-purchase-orders.js +0 -56
- package/dist-server/controllers/xero/apis/purchase-order/get-purchase-orders.js.map +0 -1
- package/dist-server/controllers/xero/apis/purchase-order/index.d.ts +0 -1
- package/dist-server/controllers/xero/apis/purchase-order/index.js +0 -5
- package/dist-server/controllers/xero/apis/purchase-order/index.js.map +0 -1
- package/dist-server/controllers/xero/index.d.ts +0 -1
- package/dist-server/controllers/xero/index.js +0 -9
- package/dist-server/controllers/xero/index.js.map +0 -1
- package/dist-server/controllers/xero/platform-action.d.ts +0 -6
- package/dist-server/controllers/xero/platform-action.js +0 -49
- package/dist-server/controllers/xero/platform-action.js.map +0 -1
- package/dist-server/controllers/xero/xero.d.ts +0 -18
- package/dist-server/controllers/xero/xero.js +0 -155
- package/dist-server/controllers/xero/xero.js.map +0 -1
- package/dist-server/engine/connector/accounting-connector.d.ts +0 -8
- package/dist-server/engine/connector/accounting-connector.js +0 -28
- package/dist-server/engine/connector/accounting-connector.js.map +0 -1
- package/dist-server/engine/connector/index.d.ts +0 -1
- package/dist-server/engine/connector/index.js +0 -4
- package/dist-server/engine/connector/index.js.map +0 -1
- package/dist-server/engine/index.d.ts +0 -2
- package/dist-server/engine/index.js +0 -5
- package/dist-server/engine/index.js.map +0 -1
- package/dist-server/engine/task/accounting-api.d.ts +0 -1
- package/dist-server/engine/task/accounting-api.js +0 -54
- package/dist-server/engine/task/accounting-api.js.map +0 -1
- package/dist-server/engine/task/index.d.ts +0 -1
- package/dist-server/engine/task/index.js +0 -4
- package/dist-server/engine/task/index.js.map +0 -1
- package/dist-server/entities/account.d.ts +0 -23
- package/dist-server/entities/account.js +0 -113
- package/dist-server/entities/account.js.map +0 -1
- package/dist-server/entities/index.d.ts +0 -3
- package/dist-server/entities/index.js +0 -7
- package/dist-server/entities/index.js.map +0 -1
- package/dist-server/graphql/index.d.ts +0 -6
- package/dist-server/graphql/index.js +0 -11
- package/dist-server/graphql/index.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/account.d.ts +0 -6
- package/dist-server/graphql/resolvers/accounting/account.js +0 -15
- package/dist-server/graphql/resolvers/accounting/account.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/accounts.d.ts +0 -8
- package/dist-server/graphql/resolvers/accounting/accounts.js +0 -14
- package/dist-server/graphql/resolvers/accounting/accounts.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/create-account.d.ts +0 -5
- package/dist-server/graphql/resolvers/accounting/create-account.js +0 -13
- package/dist-server/graphql/resolvers/accounting/create-account.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/delete-account.d.ts +0 -5
- package/dist-server/graphql/resolvers/accounting/delete-account.js +0 -16
- package/dist-server/graphql/resolvers/accounting/delete-account.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/delete-accounts.d.ts +0 -5
- package/dist-server/graphql/resolvers/accounting/delete-accounts.js +0 -20
- package/dist-server/graphql/resolvers/accounting/delete-accounts.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/index.d.ts +0 -25
- package/dist-server/graphql/resolvers/accounting/index.js +0 -15
- package/dist-server/graphql/resolvers/accounting/index.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/update-account.d.ts +0 -6
- package/dist-server/graphql/resolvers/accounting/update-account.js +0 -15
- package/dist-server/graphql/resolvers/accounting/update-account.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/update-multiple-accounts.d.ts +0 -5
- package/dist-server/graphql/resolvers/accounting/update-multiple-accounts.js +0 -30
- package/dist-server/graphql/resolvers/accounting/update-multiple-accounts.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/xero/deactivate-xero-account.d.ts +0 -5
- package/dist-server/graphql/resolvers/accounting/xero/deactivate-xero-account.js +0 -51
- package/dist-server/graphql/resolvers/accounting/xero/deactivate-xero-account.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/xero/get-xero-auth-url.d.ts +0 -6
- package/dist-server/graphql/resolvers/accounting/xero/get-xero-auth-url.js +0 -31
- package/dist-server/graphql/resolvers/accounting/xero/get-xero-auth-url.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/xero/index.d.ts +0 -13
- package/dist-server/graphql/resolvers/accounting/xero/index.js +0 -9
- package/dist-server/graphql/resolvers/accounting/xero/index.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting/xero/refresh-xero-access-token.d.ts +0 -5
- package/dist-server/graphql/resolvers/accounting/xero/refresh-xero-access-token.js +0 -51
- package/dist-server/graphql/resolvers/accounting/xero/refresh-xero-access-token.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting-api/accounting-invoice.d.ts +0 -20
- package/dist-server/graphql/resolvers/accounting-api/accounting-invoice.js +0 -32
- package/dist-server/graphql/resolvers/accounting-api/accounting-invoice.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting-api/accounting-item.d.ts +0 -24
- package/dist-server/graphql/resolvers/accounting-api/accounting-item.js +0 -36
- package/dist-server/graphql/resolvers/accounting-api/accounting-item.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting-api/accounting-purchase-order.d.ts +0 -6
- package/dist-server/graphql/resolvers/accounting-api/accounting-purchase-order.js +0 -16
- package/dist-server/graphql/resolvers/accounting-api/accounting-purchase-order.js.map +0 -1
- package/dist-server/graphql/resolvers/accounting-api/index.d.ts +0 -44
- package/dist-server/graphql/resolvers/accounting-api/index.js +0 -9
- package/dist-server/graphql/resolvers/accounting-api/index.js.map +0 -1
- package/dist-server/graphql/resolvers/index.d.ts +0 -25
- package/dist-server/graphql/resolvers/index.js +0 -8
- package/dist-server/graphql/resolvers/index.js.map +0 -1
- package/dist-server/graphql/types/accounting/account-list.d.ts +0 -1
- package/dist-server/graphql/types/accounting/account-list.js +0 -12
- package/dist-server/graphql/types/accounting/account-list.js.map +0 -1
- package/dist-server/graphql/types/accounting/account-patch.d.ts +0 -1
- package/dist-server/graphql/types/accounting/account-patch.js +0 -18
- package/dist-server/graphql/types/accounting/account-patch.js.map +0 -1
- package/dist-server/graphql/types/accounting/account.d.ts +0 -1
- package/dist-server/graphql/types/accounting/account.js +0 -29
- package/dist-server/graphql/types/accounting/account.js.map +0 -1
- package/dist-server/graphql/types/accounting/index.d.ts +0 -3
- package/dist-server/graphql/types/accounting/index.js +0 -45
- package/dist-server/graphql/types/accounting/index.js.map +0 -1
- package/dist-server/graphql/types/accounting/new-account.d.ts +0 -1
- package/dist-server/graphql/types/accounting/new-account.js +0 -16
- package/dist-server/graphql/types/accounting/new-account.js.map +0 -1
- package/dist-server/graphql/types/accounting-api/invoice.d.ts +0 -3
- package/dist-server/graphql/types/accounting-api/invoice.js +0 -63
- package/dist-server/graphql/types/accounting-api/invoice.js.map +0 -1
- package/dist-server/graphql/types/accounting-api/item.d.ts +0 -3
- package/dist-server/graphql/types/accounting-api/item.js +0 -63
- package/dist-server/graphql/types/accounting-api/item.js.map +0 -1
- package/dist-server/graphql/types/accounting-api/purchase-order.d.ts +0 -2
- package/dist-server/graphql/types/accounting-api/purchase-order.js +0 -34
- package/dist-server/graphql/types/accounting-api/purchase-order.js.map +0 -1
- package/dist-server/graphql/types/index.d.ts +0 -3
- package/dist-server/graphql/types/index.js +0 -12
- package/dist-server/graphql/types/index.js.map +0 -1
- package/dist-server/index.d.ts +0 -6
- package/dist-server/index.js +0 -11
- package/dist-server/index.js.map +0 -1
- package/dist-server/migrations/index.d.ts +0 -1
- package/dist-server/migrations/index.js +0 -12
- package/dist-server/migrations/index.js.map +0 -1
- package/dist-server/routers/xero-private-router.d.ts +0 -1
- package/dist-server/routers/xero-private-router.js +0 -17
- package/dist-server/routers/xero-private-router.js.map +0 -1
- package/dist-server/routers/xero-router.d.ts +0 -1
- package/dist-server/routers/xero-router.js +0 -109
- package/dist-server/routers/xero-router.js.map +0 -1
- package/dist-server/routes.d.ts +0 -1
- package/dist-server/routes.js +0 -11
- package/dist-server/routes.js.map +0 -1
- package/dist-server/tsconfig.tsbuildinfo +0 -1
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateMultipleAccount = void 0;
|
|
4
|
-
const shell_1 = require("@things-factory/shell");
|
|
5
|
-
const entities_1 = require("../../../entities");
|
|
6
|
-
exports.updateMultipleAccount = {
|
|
7
|
-
async updateMultipleAccount(_, { patches }, context) {
|
|
8
|
-
let results = [];
|
|
9
|
-
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
10
|
-
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
11
|
-
const accountRepo = (0, shell_1.getRepository)(entities_1.Account);
|
|
12
|
-
if (_createRecords.length > 0) {
|
|
13
|
-
for (let i = 0; i < _createRecords.length; i++) {
|
|
14
|
-
const newRecord = _createRecords[i];
|
|
15
|
-
const result = await accountRepo.save(Object.assign(Object.assign({}, newRecord), { domain: context.state.domain, creator: context.state.user, updater: context.state.user }));
|
|
16
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
if (_updateRecords.length > 0) {
|
|
20
|
-
for (let i = 0; i < _updateRecords.length; i++) {
|
|
21
|
-
const newRecord = _updateRecords[i];
|
|
22
|
-
const account = await accountRepo.findOneBy({ id: newRecord.id });
|
|
23
|
-
const result = await accountRepo.save(Object.assign(Object.assign(Object.assign({}, account), newRecord), { updater: context.state.user }));
|
|
24
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return results;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=update-multiple-accounts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-multiple-accounts.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/accounting/update-multiple-accounts.ts"],"names":[],"mappings":";;;AAAA,iDAAqD;AAErD,gDAA2C;AAE9B,QAAA,qBAAqB,GAAG;IACnC,KAAK,CAAC,qBAAqB,CAAC,CAAM,EAAE,EAAE,OAAO,EAAE,EAAE,OAAwB;QACvE,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,CAAA;QACzF,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,CAAA;QACzF,MAAM,WAAW,GAAG,IAAA,qBAAa,EAAC,kBAAO,CAAC,CAAA;QAE1C,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC/C,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;gBAEnC,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,iCAChC,SAAS,KACZ,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;gBAEF,OAAO,CAAC,IAAI,iCAAM,MAAM,KAAE,MAAM,EAAE,GAAG,IAAG,CAAA;YAC1C,CAAC;QACH,CAAC;QAED,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC/C,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;gBACnC,MAAM,OAAO,GAAY,MAAM,WAAW,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAA;gBAE1E,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,+CAChC,OAAO,GACP,SAAS,KACZ,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;gBAEF,OAAO,CAAC,IAAI,iCAAM,MAAM,KAAE,MAAM,EAAE,GAAG,IAAG,CAAA;YAC1C,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;CACF,CAAA","sourcesContent":["import { getRepository } from '@things-factory/shell'\n\nimport { Account } from '../../../entities'\n\nexport const updateMultipleAccount = {\n async updateMultipleAccount(_: any, { patches }, context: ResolverContext) {\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const accountRepo = getRepository(Account)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await accountRepo.save({\n ...newRecord,\n domain: context.state.domain,\n creator: context.state.user,\n updater: context.state.user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const newRecord = _updateRecords[i]\n const account: Account = await accountRepo.findOneBy({ id: newRecord.id })\n\n const result = await accountRepo.save({\n ...account,\n ...newRecord,\n updater: context.state.user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n}\n"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deactivateXeroAccount = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
6
|
-
const shell_1 = require("@things-factory/shell");
|
|
7
|
-
const controllers_1 = require("../../../../controllers");
|
|
8
|
-
const entities_1 = require("../../../../entities");
|
|
9
|
-
const debug = require('debug')('things-factory:integration-accounting:deactivate-xero-account');
|
|
10
|
-
exports.deactivateXeroAccount = {
|
|
11
|
-
async deactivateXeroAccount(_, { id }, context) {
|
|
12
|
-
const repository = (0, shell_1.getRepository)(entities_1.Account);
|
|
13
|
-
const account = await repository.findOne({
|
|
14
|
-
where: { domain: { id: context.state.domain.id }, id }
|
|
15
|
-
});
|
|
16
|
-
try {
|
|
17
|
-
const connection = JSON.parse(account.accountInfo);
|
|
18
|
-
if (connection) {
|
|
19
|
-
/* delete connection request to xero */
|
|
20
|
-
const response = await (0, node_fetch_1.default)(`https://api.xero.com/connections/${connection.id}`, {
|
|
21
|
-
method: 'delete',
|
|
22
|
-
headers: {
|
|
23
|
-
Authorization: `Bearer ${account.accessToken}`
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
if (!response.ok) {
|
|
27
|
-
debug('delete connection failed', response.status, await response.text());
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
debug(`connection info from accountInfo is empty`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
catch (err) {
|
|
35
|
-
debug(`get connection info failed from accountInfo`);
|
|
36
|
-
}
|
|
37
|
-
var patch = {
|
|
38
|
-
accountId: '',
|
|
39
|
-
accessToken: '',
|
|
40
|
-
refreshToken: '',
|
|
41
|
-
accessInfo: '',
|
|
42
|
-
expiresIn: null,
|
|
43
|
-
tokenType: '',
|
|
44
|
-
accountInfo: '',
|
|
45
|
-
countryCode: '',
|
|
46
|
-
status: controllers_1.ACCOUNTING_STATUS.INACTIVE
|
|
47
|
-
};
|
|
48
|
-
return await repository.save(Object.assign(Object.assign(Object.assign({}, account), patch), { updater: context.state.user }));
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=deactivate-xero-account.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deactivate-xero-account.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/accounting/xero/deactivate-xero-account.ts"],"names":[],"mappings":";;;;AAAA,oEAA8B;AAE9B,iDAAqD;AAErD,yDAA2D;AAC3D,mDAA8C;AAE9C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,+DAA+D,CAAC,CAAA;AAElF,QAAA,qBAAqB,GAAG;IACnC,KAAK,CAAC,qBAAqB,CAAC,CAAM,EAAE,EAAE,EAAE,EAAE,EAAE,OAAwB;QAClE,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,kBAAO,CAAC,CAAA;QACzC,MAAM,OAAO,GAAQ,MAAM,UAAU,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACvD,CAAC,CAAA;QAEF,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;YAElD,IAAI,UAAU,EAAE,CAAC;gBACf,uCAAuC;gBACvC,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAK,EAAC,oCAAoC,UAAU,CAAC,EAAE,EAAE,EAAE;oBAChF,MAAM,EAAE,QAAQ;oBAChB,OAAO,EAAE;wBACP,aAAa,EAAE,UAAU,OAAO,CAAC,WAAW,EAAE;qBAC/C;iBACF,CAAC,CAAA;gBAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;oBACjB,KAAK,CAAC,0BAA0B,EAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;gBAC3E,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,2CAA2C,CAAC,CAAA;YACpD,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,KAAK,CAAC,6CAA6C,CAAC,CAAA;QACtD,CAAC;QAED,IAAI,KAAK,GAAG;YACV,SAAS,EAAE,EAAE;YACb,WAAW,EAAE,EAAE;YACf,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,EAAE;YACb,WAAW,EAAE,EAAE;YACf,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,+BAAiB,CAAC,QAAQ;SACnC,CAAA;QAED,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,OAAO,GACP,KAAK,KACR,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;IACJ,CAAC;CACF,CAAA","sourcesContent":["import fetch from 'node-fetch'\n\nimport { getRepository } from '@things-factory/shell'\n\nimport { ACCOUNTING_STATUS } from '../../../../controllers'\nimport { Account } from '../../../../entities'\n\nconst debug = require('debug')('things-factory:integration-accounting:deactivate-xero-account')\n\nexport const deactivateXeroAccount = {\n async deactivateXeroAccount(_: any, { id }, context: ResolverContext) {\n const repository = getRepository(Account)\n const account: any = await repository.findOne({\n where: { domain: { id: context.state.domain.id }, id }\n })\n\n try {\n const connection = JSON.parse(account.accountInfo)\n\n if (connection) {\n /* delete connection request to xero */\n const response = await fetch(`https://api.xero.com/connections/${connection.id}`, {\n method: 'delete',\n headers: {\n Authorization: `Bearer ${account.accessToken}`\n }\n })\n\n if (!response.ok) {\n debug('delete connection failed', response.status, await response.text())\n }\n } else {\n debug(`connection info from accountInfo is empty`)\n }\n } catch (err) {\n debug(`get connection info failed from accountInfo`)\n }\n\n var patch = {\n accountId: '',\n accessToken: '',\n refreshToken: '',\n accessInfo: '',\n expiresIn: null,\n tokenType: '',\n accountInfo: '',\n countryCode: '',\n status: ACCOUNTING_STATUS.INACTIVE\n }\n\n return await repository.save({\n ...account,\n ...patch,\n updater: context.state.user\n })\n }\n}\n"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getXeroAuthURL = void 0;
|
|
4
|
-
exports.makeVerificationTokenForNonce = makeVerificationTokenForNonce;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
const crypto_1 = tslib_1.__importDefault(require("crypto"));
|
|
7
|
-
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
|
-
const env_1 = require("@things-factory/env");
|
|
9
|
-
const shell_1 = require("@things-factory/shell");
|
|
10
|
-
const xero_1 = require("../../../../controllers/xero");
|
|
11
|
-
const xeroConfig = env_1.config.get('accountingIntegrationXero', {});
|
|
12
|
-
const { apiKey, apiSecret, callback } = xeroConfig;
|
|
13
|
-
function makeVerificationTokenForNonce() {
|
|
14
|
-
return crypto_1.default.randomBytes(16).toString('hex');
|
|
15
|
-
}
|
|
16
|
-
exports.getXeroAuthURL = {
|
|
17
|
-
async getXeroAuthURL(_, { accounting }, context) {
|
|
18
|
-
const { user } = context.state;
|
|
19
|
-
const xero = new xero_1.Xero({ apiKey, apiSecret, callback });
|
|
20
|
-
/* generate verification-token as a nonce */
|
|
21
|
-
const nonce = makeVerificationTokenForNonce();
|
|
22
|
-
await (0, shell_1.getRepository)(auth_base_1.VerificationToken).save({
|
|
23
|
-
userId: user.id,
|
|
24
|
-
token: nonce,
|
|
25
|
-
type: auth_base_1.VerificationTokenType.REQUEST_ACCESS_TOKEN,
|
|
26
|
-
suppliment: accounting
|
|
27
|
-
});
|
|
28
|
-
return xero.buildAuthURL(nonce);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=get-xero-auth-url.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-xero-auth-url.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/accounting/xero/get-xero-auth-url.ts"],"names":[],"mappings":";;;AAWA,sEAEC;;AAbD,4DAA2B;AAE3B,yDAAoF;AACpF,6CAA4C;AAC5C,iDAAqD;AAErD,uDAAmD;AAEnD,MAAM,UAAU,GAAG,YAAM,CAAC,GAAG,CAAC,2BAA2B,EAAE,EAAE,CAAC,CAAA;AAC9D,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAA;AAElD,SAAgB,6BAA6B;IAC3C,OAAO,gBAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC/C,CAAC;AAEY,QAAA,cAAc,GAAG;IAC5B,KAAK,CAAC,cAAc,CAAC,CAAM,EAAE,EAAE,UAAU,EAAE,EAAE,OAAwB;QACnE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAC9B,MAAM,IAAI,GAAG,IAAI,WAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAA;QAEtD,4CAA4C;QAC5C,MAAM,KAAK,GAAG,6BAA6B,EAAE,CAAA;QAC7C,MAAM,IAAA,qBAAa,EAAC,6BAAiB,CAAC,CAAC,IAAI,CAAC;YAC1C,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,iCAAqB,CAAC,oBAAoB;YAChD,UAAU,EAAE,UAAU;SACvB,CAAC,CAAA;QAEF,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IACjC,CAAC;CACF,CAAA","sourcesContent":["import crypto from 'crypto'\n\nimport { VerificationToken, VerificationTokenType } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { getRepository } from '@things-factory/shell'\n\nimport { Xero } from '../../../../controllers/xero'\n\nconst xeroConfig = config.get('accountingIntegrationXero', {})\nconst { apiKey, apiSecret, callback } = xeroConfig\n\nexport function makeVerificationTokenForNonce() {\n return crypto.randomBytes(16).toString('hex')\n}\n\nexport const getXeroAuthURL = {\n async getXeroAuthURL(_: any, { accounting }, context: ResolverContext) {\n const { user } = context.state\n const xero = new Xero({ apiKey, apiSecret, callback })\n\n /* generate verification-token as a nonce */\n const nonce = makeVerificationTokenForNonce()\n await getRepository(VerificationToken).save({\n userId: user.id,\n token: nonce,\n type: VerificationTokenType.REQUEST_ACCESS_TOKEN,\n suppliment: accounting\n })\n\n return xero.buildAuthURL(nonce)\n }\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const Query: {
|
|
2
|
-
getXeroAuthURL(_: any, { accounting }: {
|
|
3
|
-
accounting: any;
|
|
4
|
-
}, context: ResolverContext): Promise<string>;
|
|
5
|
-
};
|
|
6
|
-
export declare const Mutation: {
|
|
7
|
-
deactivateXeroAccount(_: any, { id }: {
|
|
8
|
-
id: any;
|
|
9
|
-
}, context: ResolverContext): Promise<any>;
|
|
10
|
-
refreshXeroAccessToken(_: any, { id }: {
|
|
11
|
-
id: any;
|
|
12
|
-
}, context: ResolverContext): Promise<any>;
|
|
13
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Mutation = exports.Query = void 0;
|
|
4
|
-
const get_xero_auth_url_1 = require("./get-xero-auth-url");
|
|
5
|
-
const deactivate_xero_account_1 = require("./deactivate-xero-account");
|
|
6
|
-
const refresh_xero_access_token_1 = require("./refresh-xero-access-token");
|
|
7
|
-
exports.Query = Object.assign({}, get_xero_auth_url_1.getXeroAuthURL);
|
|
8
|
-
exports.Mutation = Object.assign(Object.assign({}, refresh_xero_access_token_1.refreshXeroAccessToken), deactivate_xero_account_1.deactivateXeroAccount);
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/accounting/xero/index.ts"],"names":[],"mappings":";;;AAAA,2DAAoD;AAEpD,uEAAiE;AACjE,2EAAoE;AAEvD,QAAA,KAAK,qBACb,kCAAc,EAClB;AAEY,QAAA,QAAQ,mCAChB,kDAAsB,GACtB,+CAAqB,EACzB","sourcesContent":["import { getXeroAuthURL } from './get-xero-auth-url'\n\nimport { deactivateXeroAccount } from './deactivate-xero-account'\nimport { refreshXeroAccessToken } from './refresh-xero-access-token'\n\nexport const Query = {\n ...getXeroAuthURL\n}\n\nexport const Mutation = {\n ...refreshXeroAccessToken,\n ...deactivateXeroAccount\n}\n"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.refreshXeroAccessToken = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
6
|
-
const env_1 = require("@things-factory/env");
|
|
7
|
-
const shell_1 = require("@things-factory/shell");
|
|
8
|
-
const utils_1 = require("@things-factory/utils");
|
|
9
|
-
const entities_1 = require("../../../../entities");
|
|
10
|
-
const xeroConfig = env_1.config.get('accountingIntegrationXero', {});
|
|
11
|
-
const { apiKey, apiSecret } = xeroConfig;
|
|
12
|
-
const debug = require('debug')('things-factory:integration-accounting:refresh-xero-access-token');
|
|
13
|
-
exports.refreshXeroAccessToken = {
|
|
14
|
-
async refreshXeroAccessToken(_, { id }, context) {
|
|
15
|
-
const repository = (0, shell_1.getRepository)(entities_1.Account);
|
|
16
|
-
const account = await repository.findOne({
|
|
17
|
-
where: { domain: { id: context.state.domain.id }, id }
|
|
18
|
-
});
|
|
19
|
-
const refreshRequestData = {
|
|
20
|
-
grant_type: 'refresh_token',
|
|
21
|
-
refresh_token: account.refreshToken
|
|
22
|
-
};
|
|
23
|
-
const refreshResponse = await (0, node_fetch_1.default)(`https://identity.xero.com/connect/token`, {
|
|
24
|
-
method: 'post',
|
|
25
|
-
headers: {
|
|
26
|
-
Authorization: `Basic ${Buffer.from(apiKey + ':' + apiSecret).toString('base64')}`,
|
|
27
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
28
|
-
},
|
|
29
|
-
body: Object.entries(refreshRequestData)
|
|
30
|
-
.map(([key, value]) => encodeURIComponent(key) + '=' + encodeURIComponent(value))
|
|
31
|
-
.join('&')
|
|
32
|
-
});
|
|
33
|
-
if (!refreshResponse.ok) {
|
|
34
|
-
throw new Error(`get account information failed: ${await refreshResponse.text()}`);
|
|
35
|
-
}
|
|
36
|
-
const body = await refreshResponse.json();
|
|
37
|
-
const { access_token /* token used to call the API */, id_token /* token containing user identity details (only returned if OpenID Connect scopes are requested) */, expires_in /* amount of seconds until the access token expires */, token_type: tokenType /* must be Bearer */, refresh_token
|
|
38
|
-
/* token used to refresh the access token once it has expired (only returned if the offline_access scope is requested).
|
|
39
|
-
*/
|
|
40
|
-
} = body;
|
|
41
|
-
const { exp } = (0, utils_1.parseJwt)(access_token);
|
|
42
|
-
var patch = {
|
|
43
|
-
accessToken: access_token,
|
|
44
|
-
refreshToken: refresh_token,
|
|
45
|
-
tokenType,
|
|
46
|
-
expiresIn: new Date(exp * 1000)
|
|
47
|
-
};
|
|
48
|
-
return await repository.save(Object.assign(Object.assign(Object.assign({}, account), patch), { updater: context.state.user }));
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=refresh-xero-access-token.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-xero-access-token.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/accounting/xero/refresh-xero-access-token.ts"],"names":[],"mappings":";;;;AAAA,oEAA8B;AAE9B,6CAA4C;AAC5C,iDAAqD;AACrD,iDAAgD;AAEhD,mDAA8C;AAE9C,MAAM,UAAU,GAAG,YAAM,CAAC,GAAG,CAAC,2BAA2B,EAAE,EAAE,CAAC,CAAA;AAC9D,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,CAAA;AAExC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,iEAAiE,CAAC,CAAA;AAEpF,QAAA,sBAAsB,GAAG;IACpC,KAAK,CAAC,sBAAsB,CAAC,CAAM,EAAE,EAAE,EAAE,EAAE,EAAE,OAAwB;QACnE,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,kBAAO,CAAC,CAAA;QACzC,MAAM,OAAO,GAAQ,MAAM,UAAU,CAAC,OAAO,CAAC;YAC5C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACvD,CAAC,CAAA;QAEF,MAAM,kBAAkB,GAAG;YACzB,UAAU,EAAE,eAAe;YAC3B,aAAa,EAAE,OAAO,CAAC,YAAY;SACpC,CAAA;QAED,MAAM,eAAe,GAAG,MAAM,IAAA,oBAAK,EAAC,yCAAyC,EAAE;YAC7E,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,GAAG,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;gBAClF,cAAc,EAAE,mCAAmC;aACpD;YACD,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC;iBACrC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;iBAChF,IAAI,CAAC,GAAG,CAAC;SACb,CAAC,CAAA;QAEF,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,mCAAmC,MAAM,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QACpF,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,IAAI,EAAE,CAAA;QACzC,MAAM,EACJ,YAAY,CAAC,gCAAgC,EAC7C,QAAQ,CAAC,mGAAmG,EAC5G,UAAU,CAAC,sDAAsD,EACjE,UAAU,EAAE,SAAS,CAAC,oBAAoB,EAC1C,aAAa;QACb;WACG;UACJ,GAAG,IAAI,CAAA;QAER,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,gBAAQ,EAAC,YAAY,CAAC,CAAA;QAEtC,IAAI,KAAK,GAAG;YACV,WAAW,EAAE,YAAY;YACzB,YAAY,EAAE,aAAa;YAC3B,SAAS;YACT,SAAS,EAAE,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;SAChC,CAAA;QAED,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,OAAO,GACP,KAAK,KACR,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;IACJ,CAAC;CACF,CAAA","sourcesContent":["import fetch from 'node-fetch'\n\nimport { config } from '@things-factory/env'\nimport { getRepository } from '@things-factory/shell'\nimport { parseJwt } from '@things-factory/utils'\n\nimport { Account } from '../../../../entities'\n\nconst xeroConfig = config.get('accountingIntegrationXero', {})\nconst { apiKey, apiSecret } = xeroConfig\n\nconst debug = require('debug')('things-factory:integration-accounting:refresh-xero-access-token')\n\nexport const refreshXeroAccessToken = {\n async refreshXeroAccessToken(_: any, { id }, context: ResolverContext) {\n const repository = getRepository(Account)\n const account: any = await repository.findOne({\n where: { domain: { id: context.state.domain.id }, id }\n })\n\n const refreshRequestData = {\n grant_type: 'refresh_token',\n refresh_token: account.refreshToken\n }\n\n const refreshResponse = await fetch(`https://identity.xero.com/connect/token`, {\n method: 'post',\n headers: {\n Authorization: `Basic ${Buffer.from(apiKey + ':' + apiSecret).toString('base64')}`,\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n body: Object.entries(refreshRequestData)\n .map(([key, value]) => encodeURIComponent(key) + '=' + encodeURIComponent(value))\n .join('&')\n })\n\n if (!refreshResponse.ok) {\n throw new Error(`get account information failed: ${await refreshResponse.text()}`)\n }\n\n const body = await refreshResponse.json()\n const {\n access_token /* token used to call the API */,\n id_token /* token containing user identity details (only returned if OpenID Connect scopes are requested) */,\n expires_in /* amount of seconds until the access token expires */,\n token_type: tokenType /* must be Bearer */,\n refresh_token\n /* token used to refresh the access token once it has expired (only returned if the offline_access scope is requested).\n */\n } = body\n\n const { exp } = parseJwt(access_token)\n\n var patch = {\n accessToken: access_token,\n refreshToken: refresh_token,\n tokenType,\n expiresIn: new Date(exp * 1000)\n }\n\n return await repository.save({\n ...account,\n ...patch,\n updater: context.state.user\n })\n }\n}\n"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const queryAccountingInvoice: {
|
|
2
|
-
getAccountingInvoices(_: any, { accountingId, params: ListParam }: {
|
|
3
|
-
accountingId: any;
|
|
4
|
-
params: any;
|
|
5
|
-
}, context: ResolverContext): Promise<any>;
|
|
6
|
-
getAccountingInvoice(_: any, { accountingId, invoiceNo }: {
|
|
7
|
-
accountingId: any;
|
|
8
|
-
invoiceNo: any;
|
|
9
|
-
}, context: ResolverContext): Promise<any>;
|
|
10
|
-
};
|
|
11
|
-
export declare const mutateAccountingInvoice: {
|
|
12
|
-
createAccountingInvoice(_: any, { accountingId, newInvoice }: {
|
|
13
|
-
accountingId: any;
|
|
14
|
-
newInvoice: any;
|
|
15
|
-
}, context: ResolverContext): Promise<any>;
|
|
16
|
-
updateAccountingInvoice(_: any, { accountingId, patch }: {
|
|
17
|
-
accountingId: any;
|
|
18
|
-
patch: any;
|
|
19
|
-
}, context: ResolverContext): Promise<any>;
|
|
20
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mutateAccountingInvoice = exports.queryAccountingInvoice = void 0;
|
|
4
|
-
const accounting_api_1 = require("../../../controllers/accounting-api");
|
|
5
|
-
exports.queryAccountingInvoice = {
|
|
6
|
-
async getAccountingInvoices(_, { accountingId, params: ListParam }, context) {
|
|
7
|
-
var accounting = await accounting_api_1.AccountingAPI.getAccounting(accountingId);
|
|
8
|
-
return await accounting_api_1.AccountingAPI.getInvoices(accounting, {
|
|
9
|
-
pagination: {
|
|
10
|
-
page: 0,
|
|
11
|
-
limit: 100
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
|
-
async getAccountingInvoice(_, { accountingId, invoiceNo }, context) {
|
|
16
|
-
var accounting = await accounting_api_1.AccountingAPI.getAccounting(accountingId);
|
|
17
|
-
return await accounting_api_1.AccountingAPI.getInvoice(accounting, {
|
|
18
|
-
invoiceNo
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.mutateAccountingInvoice = {
|
|
23
|
-
async createAccountingInvoice(_, { accountingId, newInvoice }, context) {
|
|
24
|
-
var accounting = await accounting_api_1.AccountingAPI.getAccounting(accountingId);
|
|
25
|
-
return await accounting_api_1.AccountingAPI.createInvoice(accounting, newInvoice);
|
|
26
|
-
},
|
|
27
|
-
async updateAccountingInvoice(_, { accountingId, patch }, context) {
|
|
28
|
-
var accounting = await accounting_api_1.AccountingAPI.getAccounting(accountingId);
|
|
29
|
-
return await accounting_api_1.AccountingAPI.updateInvoice(accounting, patch);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=accounting-invoice.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accounting-invoice.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/accounting-api/accounting-invoice.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEtD,QAAA,sBAAsB,GAAG;IACpC,KAAK,CAAC,qBAAqB,CAAC,CAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,OAAwB;QAC/F,IAAI,UAAU,GAAG,MAAM,8BAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAEhE,OAAO,MAAM,8BAAa,CAAC,WAAW,CAAC,UAAU,EAAE;YACjD,UAAU,EAAE;gBACV,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,GAAG;aACX;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,CAAM,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,OAAwB;QACtF,IAAI,UAAU,GAAG,MAAM,8BAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAEhE,OAAO,MAAM,8BAAa,CAAC,UAAU,CAAC,UAAU,EAAE;YAChD,SAAS;SACV,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAEY,QAAA,uBAAuB,GAAG;IACrC,KAAK,CAAC,uBAAuB,CAAC,CAAM,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,OAAwB;QAC1F,IAAI,UAAU,GAAG,MAAM,8BAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAEhE,OAAO,MAAM,8BAAa,CAAC,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;IAClE,CAAC;IAED,KAAK,CAAC,uBAAuB,CAAC,CAAM,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,OAAwB;QACrF,IAAI,UAAU,GAAG,MAAM,8BAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAEhE,OAAO,MAAM,8BAAa,CAAC,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;IAC7D,CAAC;CACF,CAAA","sourcesContent":["import { AccountingAPI } from '../../../controllers/accounting-api'\n\nexport const queryAccountingInvoice = {\n async getAccountingInvoices(_: any, { accountingId, params: ListParam }, context: ResolverContext) {\n var accounting = await AccountingAPI.getAccounting(accountingId)\n\n return await AccountingAPI.getInvoices(accounting, {\n pagination: {\n page: 0,\n limit: 100\n }\n })\n },\n\n async getAccountingInvoice(_: any, { accountingId, invoiceNo }, context: ResolverContext) {\n var accounting = await AccountingAPI.getAccounting(accountingId)\n\n return await AccountingAPI.getInvoice(accounting, {\n invoiceNo\n })\n }\n}\n\nexport const mutateAccountingInvoice = {\n async createAccountingInvoice(_: any, { accountingId, newInvoice }, context: ResolverContext) {\n var accounting = await AccountingAPI.getAccounting(accountingId)\n\n return await AccountingAPI.createInvoice(accounting, newInvoice)\n },\n\n async updateAccountingInvoice(_: any, { accountingId, patch }, context: ResolverContext) {\n var accounting = await AccountingAPI.getAccounting(accountingId)\n\n return await AccountingAPI.updateInvoice(accounting, patch)\n }\n}\n"]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const queryAccountingItem: {
|
|
2
|
-
getAccountingItems(_: any, { accountingId, params: ListParam }: {
|
|
3
|
-
accountingId: any;
|
|
4
|
-
params: any;
|
|
5
|
-
}, context: ResolverContext): Promise<any>;
|
|
6
|
-
getAccountingItem(_: any, { accountingId, itemId }: {
|
|
7
|
-
accountingId: any;
|
|
8
|
-
itemId: any;
|
|
9
|
-
}, context: ResolverContext): Promise<any>;
|
|
10
|
-
};
|
|
11
|
-
export declare const mutateAccountingItem: {
|
|
12
|
-
createAccountingItem(_: any, { accountingId, newItem }: {
|
|
13
|
-
accountingId: any;
|
|
14
|
-
newItem: any;
|
|
15
|
-
}, context: ResolverContext): Promise<any>;
|
|
16
|
-
updateAccountingItem(_: any, { accountingId, patch }: {
|
|
17
|
-
accountingId: any;
|
|
18
|
-
patch: any;
|
|
19
|
-
}, context: ResolverContext): Promise<any>;
|
|
20
|
-
deleteAccountingItem(_: any, { accountingId, itemId }: {
|
|
21
|
-
accountingId: any;
|
|
22
|
-
itemId: any;
|
|
23
|
-
}, context: ResolverContext): Promise<any>;
|
|
24
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mutateAccountingItem = exports.queryAccountingItem = void 0;
|
|
4
|
-
const accounting_api_1 = require("../../../controllers/accounting-api");
|
|
5
|
-
exports.queryAccountingItem = {
|
|
6
|
-
async getAccountingItems(_, { accountingId, params: ListParam }, context) {
|
|
7
|
-
var accounting = await accounting_api_1.AccountingAPI.getAccounting(accountingId);
|
|
8
|
-
return await accounting_api_1.AccountingAPI.getItems(accounting, {
|
|
9
|
-
pagination: {
|
|
10
|
-
page: 0,
|
|
11
|
-
limit: 100
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
|
-
async getAccountingItem(_, { accountingId, itemId }, context) {
|
|
16
|
-
var accounting = await accounting_api_1.AccountingAPI.getAccounting(accountingId);
|
|
17
|
-
return await accounting_api_1.AccountingAPI.getItem(accounting, {
|
|
18
|
-
itemId
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.mutateAccountingItem = {
|
|
23
|
-
async createAccountingItem(_, { accountingId, newItem }, context) {
|
|
24
|
-
var accounting = await accounting_api_1.AccountingAPI.getAccounting(accountingId);
|
|
25
|
-
return await accounting_api_1.AccountingAPI.createItem(accounting, newItem);
|
|
26
|
-
},
|
|
27
|
-
async updateAccountingItem(_, { accountingId, patch }, context) {
|
|
28
|
-
var accounting = await accounting_api_1.AccountingAPI.getAccounting(accountingId);
|
|
29
|
-
return await accounting_api_1.AccountingAPI.updateItem(accounting, patch);
|
|
30
|
-
},
|
|
31
|
-
async deleteAccountingItem(_, { accountingId, itemId }, context) {
|
|
32
|
-
var accounting = await accounting_api_1.AccountingAPI.getAccounting(accountingId);
|
|
33
|
-
return await accounting_api_1.AccountingAPI.deleteItem(accounting, itemId);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=accounting-item.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accounting-item.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/accounting-api/accounting-item.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEtD,QAAA,mBAAmB,GAAG;IACjC,KAAK,CAAC,kBAAkB,CAAC,CAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,OAAwB;QAC5F,IAAI,UAAU,GAAG,MAAM,8BAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAEhE,OAAO,MAAM,8BAAa,CAAC,QAAQ,CAAC,UAAU,EAAE;YAC9C,UAAU,EAAE;gBACV,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,GAAG;aACX;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,CAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,OAAwB;QAChF,IAAI,UAAU,GAAG,MAAM,8BAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAEhE,OAAO,MAAM,8BAAa,CAAC,OAAO,CAAC,UAAU,EAAE;YAC7C,MAAM;SACP,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAEY,QAAA,oBAAoB,GAAG;IAClC,KAAK,CAAC,oBAAoB,CAAC,CAAM,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,OAAwB;QACpF,IAAI,UAAU,GAAG,MAAM,8BAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAEhE,OAAO,MAAM,8BAAa,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IAC5D,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,CAAM,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,OAAwB;QAClF,IAAI,UAAU,GAAG,MAAM,8BAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAEhE,OAAO,MAAM,8BAAa,CAAC,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;IAC1D,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,CAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,OAAwB;QACnF,IAAI,UAAU,GAAG,MAAM,8BAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAEhE,OAAO,MAAM,8BAAa,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;IAC3D,CAAC;CACF,CAAA","sourcesContent":["import { AccountingAPI } from '../../../controllers/accounting-api'\n\nexport const queryAccountingItem = {\n async getAccountingItems(_: any, { accountingId, params: ListParam }, context: ResolverContext) {\n var accounting = await AccountingAPI.getAccounting(accountingId)\n\n return await AccountingAPI.getItems(accounting, {\n pagination: {\n page: 0,\n limit: 100\n }\n })\n },\n\n async getAccountingItem(_: any, { accountingId, itemId }, context: ResolverContext) {\n var accounting = await AccountingAPI.getAccounting(accountingId)\n\n return await AccountingAPI.getItem(accounting, {\n itemId\n })\n }\n}\n\nexport const mutateAccountingItem = {\n async createAccountingItem(_: any, { accountingId, newItem }, context: ResolverContext) {\n var accounting = await AccountingAPI.getAccounting(accountingId)\n\n return await AccountingAPI.createItem(accounting, newItem)\n },\n\n async updateAccountingItem(_: any, { accountingId, patch }, context: ResolverContext) {\n var accounting = await AccountingAPI.getAccounting(accountingId)\n\n return await AccountingAPI.updateItem(accounting, patch)\n },\n\n async deleteAccountingItem(_: any, { accountingId, itemId }, context: ResolverContext) {\n var accounting = await AccountingAPI.getAccounting(accountingId)\n\n return await AccountingAPI.deleteItem(accounting, itemId)\n }\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.queryAccountingPurchaseOrder = void 0;
|
|
4
|
-
const accounting_api_1 = require("../../../controllers/accounting-api");
|
|
5
|
-
exports.queryAccountingPurchaseOrder = {
|
|
6
|
-
async getAccountingPurchaseOrders(_, { accountingId, params: ListParam }, context) {
|
|
7
|
-
var accounting = await accounting_api_1.AccountingAPI.getAccounting(accountingId);
|
|
8
|
-
return await accounting_api_1.AccountingAPI.getPurchaseOrders(accounting, {
|
|
9
|
-
pagination: {
|
|
10
|
-
page: 0,
|
|
11
|
-
limit: 100
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=accounting-purchase-order.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accounting-purchase-order.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/accounting-api/accounting-purchase-order.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AAEtD,QAAA,4BAA4B,GAAG;IAC1C,KAAK,CAAC,2BAA2B,CAAC,CAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,OAAwB;QACrG,IAAI,UAAU,GAAG,MAAM,8BAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;QAEhE,OAAO,MAAM,8BAAa,CAAC,iBAAiB,CAAC,UAAU,EAAE;YACvD,UAAU,EAAE;gBACV,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,GAAG;aACX;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA","sourcesContent":["import { AccountingAPI } from '../../../controllers/accounting-api'\n\nexport const queryAccountingPurchaseOrder = {\n async getAccountingPurchaseOrders(_: any, { accountingId, params: ListParam }, context: ResolverContext) {\n var accounting = await AccountingAPI.getAccounting(accountingId)\n\n return await AccountingAPI.getPurchaseOrders(accounting, {\n pagination: {\n page: 0,\n limit: 100\n }\n })\n }\n}\n"]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export declare const Query: {
|
|
2
|
-
getAccountingPurchaseOrders(_: any, { accountingId, params: ListParam }: {
|
|
3
|
-
accountingId: any;
|
|
4
|
-
params: any;
|
|
5
|
-
}, context: ResolverContext): Promise<any>;
|
|
6
|
-
getAccountingItems(_: any, { accountingId, params: ListParam }: {
|
|
7
|
-
accountingId: any;
|
|
8
|
-
params: any;
|
|
9
|
-
}, context: ResolverContext): Promise<any>;
|
|
10
|
-
getAccountingItem(_: any, { accountingId, itemId }: {
|
|
11
|
-
accountingId: any;
|
|
12
|
-
itemId: any;
|
|
13
|
-
}, context: ResolverContext): Promise<any>;
|
|
14
|
-
getAccountingInvoices(_: any, { accountingId, params: ListParam }: {
|
|
15
|
-
accountingId: any;
|
|
16
|
-
params: any;
|
|
17
|
-
}, context: ResolverContext): Promise<any>;
|
|
18
|
-
getAccountingInvoice(_: any, { accountingId, invoiceNo }: {
|
|
19
|
-
accountingId: any;
|
|
20
|
-
invoiceNo: any;
|
|
21
|
-
}, context: ResolverContext): Promise<any>;
|
|
22
|
-
};
|
|
23
|
-
export declare const Mutation: {
|
|
24
|
-
createAccountingItem(_: any, { accountingId, newItem }: {
|
|
25
|
-
accountingId: any;
|
|
26
|
-
newItem: any;
|
|
27
|
-
}, context: ResolverContext): Promise<any>;
|
|
28
|
-
updateAccountingItem(_: any, { accountingId, patch }: {
|
|
29
|
-
accountingId: any;
|
|
30
|
-
patch: any;
|
|
31
|
-
}, context: ResolverContext): Promise<any>;
|
|
32
|
-
deleteAccountingItem(_: any, { accountingId, itemId }: {
|
|
33
|
-
accountingId: any;
|
|
34
|
-
itemId: any;
|
|
35
|
-
}, context: ResolverContext): Promise<any>;
|
|
36
|
-
createAccountingInvoice(_: any, { accountingId, newInvoice }: {
|
|
37
|
-
accountingId: any;
|
|
38
|
-
newInvoice: any;
|
|
39
|
-
}, context: ResolverContext): Promise<any>;
|
|
40
|
-
updateAccountingInvoice(_: any, { accountingId, patch }: {
|
|
41
|
-
accountingId: any;
|
|
42
|
-
patch: any;
|
|
43
|
-
}, context: ResolverContext): Promise<any>;
|
|
44
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Mutation = exports.Query = void 0;
|
|
4
|
-
const accounting_invoice_1 = require("./accounting-invoice");
|
|
5
|
-
const accounting_item_1 = require("./accounting-item");
|
|
6
|
-
const accounting_purchase_order_1 = require("./accounting-purchase-order");
|
|
7
|
-
exports.Query = Object.assign(Object.assign(Object.assign({}, accounting_invoice_1.queryAccountingInvoice), accounting_item_1.queryAccountingItem), accounting_purchase_order_1.queryAccountingPurchaseOrder);
|
|
8
|
-
exports.Mutation = Object.assign(Object.assign({}, accounting_invoice_1.mutateAccountingInvoice), accounting_item_1.mutateAccountingItem);
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/accounting-api/index.ts"],"names":[],"mappings":";;;AAAA,6DAAsF;AACtF,uDAA6E;AAC7E,2EAA0E;AAE7D,QAAA,KAAK,iDACb,2CAAsB,GACtB,qCAAmB,GACnB,wDAA4B,EAChC;AAEY,QAAA,QAAQ,mCAChB,4CAAuB,GACvB,sCAAoB,EACxB","sourcesContent":["import { queryAccountingInvoice, mutateAccountingInvoice } from './accounting-invoice'\nimport { queryAccountingItem, mutateAccountingItem } from './accounting-item'\nimport { queryAccountingPurchaseOrder } from './accounting-purchase-order'\n\nexport const Query = {\n ...queryAccountingInvoice,\n ...queryAccountingItem,\n ...queryAccountingPurchaseOrder\n}\n\nexport const Mutation = {\n ...mutateAccountingInvoice,\n ...mutateAccountingItem\n}\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const queries: any;
|
|
2
|
-
export declare const mutations: {
|
|
3
|
-
deactivateXeroAccount(_: any, { id }: {
|
|
4
|
-
id: any;
|
|
5
|
-
}, context: ResolverContext): Promise<any>;
|
|
6
|
-
refreshXeroAccessToken(_: any, { id }: {
|
|
7
|
-
id: any;
|
|
8
|
-
}, context: ResolverContext): Promise<any>;
|
|
9
|
-
deleteAccounts(_: any, { ids }: {
|
|
10
|
-
ids: any;
|
|
11
|
-
}, context: ResolverContext): Promise<boolean>;
|
|
12
|
-
deleteAccount(_: any, { id }: {
|
|
13
|
-
id: any;
|
|
14
|
-
}, context: ResolverContext): Promise<boolean>;
|
|
15
|
-
createAccount(_: any, { account }: {
|
|
16
|
-
account: any;
|
|
17
|
-
}, context: ResolverContext): Promise<any>;
|
|
18
|
-
updateMultipleAccount(_: any, { patches }: {
|
|
19
|
-
patches: any;
|
|
20
|
-
}, context: ResolverContext): Promise<any[]>;
|
|
21
|
-
updateAccount(_: any, { name, patch }: {
|
|
22
|
-
name: any;
|
|
23
|
-
patch: any;
|
|
24
|
-
}, context: ResolverContext): Promise<any>;
|
|
25
|
-
}[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mutations = exports.queries = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const Accounting = tslib_1.__importStar(require("./accounting"));
|
|
6
|
-
exports.queries = [Accounting.Query];
|
|
7
|
-
exports.mutations = [Accounting.Mutation];
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/graphql/resolvers/index.ts"],"names":[],"mappings":";;;;AAAA,iEAA0C;AAE7B,QAAA,OAAO,GAAG,CAAC,UAAU,CAAC,KAAK,CAAQ,CAAA;AAEnC,QAAA,SAAS,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA","sourcesContent":["import * as Accounting from './accounting'\n\nexport const queries = [Accounting.Query] as any\n\nexport const mutations = [Accounting.Mutation]\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AccountList: import("graphql").DocumentNode;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AccountList = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
-
exports.AccountList = (0, graphql_tag_1.default) `
|
|
7
|
-
type AccountList {
|
|
8
|
-
items: [Account]
|
|
9
|
-
total: Int
|
|
10
|
-
}
|
|
11
|
-
`;
|
|
12
|
-
//# sourceMappingURL=account-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-list.js","sourceRoot":"","sources":["../../../../server/graphql/types/accounting/account-list.ts"],"names":[],"mappings":";;;;AAAA,sEAA6B;AAEhB,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA;;;;;CAK7B,CAAA","sourcesContent":["import gql from 'graphql-tag'\n\nexport const AccountList = gql`\n type AccountList {\n items: [Account]\n total: Int\n }\n`\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AccountPatch: import("graphql").DocumentNode;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AccountPatch = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
-
exports.AccountPatch = (0, graphql_tag_1.default) `
|
|
7
|
-
input AccountPatch {
|
|
8
|
-
id: String
|
|
9
|
-
name: String
|
|
10
|
-
description: String
|
|
11
|
-
platform: String
|
|
12
|
-
accountId: String
|
|
13
|
-
countryCode: String
|
|
14
|
-
trackedInventory: Boolean
|
|
15
|
-
cuFlag: String
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
18
|
-
//# sourceMappingURL=account-patch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-patch.js","sourceRoot":"","sources":["../../../../server/graphql/types/accounting/account-patch.ts"],"names":[],"mappings":";;;;AAAA,sEAA6B;AAEhB,QAAA,YAAY,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;CAW9B,CAAA","sourcesContent":["import gql from 'graphql-tag'\n\nexport const AccountPatch = gql`\n input AccountPatch {\n id: String\n name: String\n description: String\n platform: String\n accountId: String\n countryCode: String\n trackedInventory: Boolean\n cuFlag: String\n }\n`\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Account: import("graphql").DocumentNode;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Account = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
|
-
exports.Account = (0, graphql_tag_1.default) `
|
|
7
|
-
type Account {
|
|
8
|
-
id: String
|
|
9
|
-
name: String
|
|
10
|
-
domain: Domain
|
|
11
|
-
description: String
|
|
12
|
-
platform: String
|
|
13
|
-
accountId: String
|
|
14
|
-
countryCode: String
|
|
15
|
-
status: String
|
|
16
|
-
accessInfo: String
|
|
17
|
-
accessToken: String
|
|
18
|
-
refreshToken: String
|
|
19
|
-
trackedInventory: Boolean
|
|
20
|
-
expiresIn: String
|
|
21
|
-
tokenType: String
|
|
22
|
-
accountInfo: String
|
|
23
|
-
updater: User
|
|
24
|
-
creator: User
|
|
25
|
-
updatedAt: String
|
|
26
|
-
createdAt: String
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
29
|
-
//# sourceMappingURL=account.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../../server/graphql/types/accounting/account.ts"],"names":[],"mappings":";;;;AAAA,sEAA6B;AAEhB,QAAA,OAAO,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;CAsBzB,CAAA","sourcesContent":["import gql from 'graphql-tag'\n\nexport const Account = gql`\n type Account {\n id: String\n name: String\n domain: Domain\n description: String\n platform: String\n accountId: String\n countryCode: String\n status: String\n accessInfo: String\n accessToken: String\n refreshToken: String\n trackedInventory: Boolean\n expiresIn: String\n tokenType: String\n accountInfo: String\n updater: User\n creator: User\n updatedAt: String\n createdAt: String\n }\n`\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const Mutation = "\n createAccount (\n account: NewAccount!\n ): Account\n\n updateAccount (\n id: String!\n patch: AccountPatch!\n ): Account\n\n updateMultipleAccount (\n patches: [AccountPatch]!\n ): [Account]\n\n deleteAccount (\n id: String!\n ): Boolean\n\n deleteAccounts (\n ids: [String]!\n ): Boolean\n\n refreshXeroAccessToken (\n id: String!\n ): Account\n\n deactivateXeroAccount (\n id: String!\n ): Account\n";
|
|
2
|
-
export declare const Query = "\n accounts(filters: [Filter], pagination: Pagination, sortings: [Sorting]): AccountList\n account(id: String!): Account\n \n getXeroAuthURL(accounting: String!): String\n";
|
|
3
|
-
export declare const Types: import("graphql").DocumentNode[];
|