@tomei/finance 0.6.31 → 0.6.33

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.
Files changed (225) hide show
  1. package/dist/database.js +4 -0
  2. package/dist/database.js.map +1 -1
  3. package/dist/finance-company/finance-company.d.ts +5 -0
  4. package/dist/finance-company/finance-company.js +68 -0
  5. package/dist/finance-company/finance-company.js.map +1 -1
  6. package/dist/models/finance-company.entity.d.ts +2 -0
  7. package/dist/models/finance-company.entity.js +5 -0
  8. package/dist/models/finance-company.entity.js.map +1 -1
  9. package/dist/models/tax.entity.d.ts +13 -0
  10. package/dist/models/tax.entity.js +90 -0
  11. package/dist/models/tax.entity.js.map +1 -0
  12. package/dist/tax/interfaces/tax-attr.interface.d.ts +10 -0
  13. package/dist/{base/owner/owner.interface.js → tax/interfaces/tax-attr.interface.js} +1 -1
  14. package/dist/tax/interfaces/tax-attr.interface.js.map +1 -0
  15. package/dist/tax/tax.d.ts +20 -0
  16. package/dist/tax/tax.js +45 -0
  17. package/dist/tax/tax.js.map +1 -0
  18. package/dist/tax/tax.repository.d.ts +5 -0
  19. package/dist/tax/tax.repository.js +12 -0
  20. package/dist/tax/tax.repository.js.map +1 -0
  21. package/dist/tsconfig.tsbuildinfo +1 -1
  22. package/migrations/finance-document-migration.js +8 -2
  23. package/migrations/finance-tax-migration.js +52 -0
  24. package/package.json +1 -1
  25. package/src/database.ts +4 -0
  26. package/src/finance-company/finance-company.ts +82 -0
  27. package/src/models/finance-company.entity.ts +4 -0
  28. package/src/models/tax.entity.ts +75 -0
  29. package/src/tax/interfaces/tax-attr.interface.ts +10 -0
  30. package/src/tax/tax.repository.ts +11 -0
  31. package/src/tax/tax.ts +57 -0
  32. package/dist/account/entities/account.entity.d.ts +0 -26
  33. package/dist/account/entities/account.entity.js +0 -199
  34. package/dist/account/entities/account.entity.js.map +0 -1
  35. package/dist/account/entities/fee-associated-object.entity.d.ts +0 -6
  36. package/dist/account/entities/fee-associated-object.entity.js +0 -52
  37. package/dist/account/entities/fee-associated-object.entity.js.map +0 -1
  38. package/dist/account/index.d.ts +0 -6
  39. package/dist/account/index.js +0 -10
  40. package/dist/account/index.js.map +0 -1
  41. package/dist/account/interfaces/account.repository.interface.d.ts +0 -3
  42. package/dist/account/interfaces/account.repository.interface.js +0 -3
  43. package/dist/account/interfaces/account.repository.interface.js.map +0 -1
  44. package/dist/account-system-entity/index.d.ts +0 -2
  45. package/dist/account-system-entity/index.js +0 -6
  46. package/dist/account-system-entity/index.js.map +0 -1
  47. package/dist/account-system-entity/post-history.entity.d.ts +0 -11
  48. package/dist/account-system-entity/post-history.entity.js +0 -65
  49. package/dist/account-system-entity/post-history.entity.js.map +0 -1
  50. package/dist/base/account-system.interface.d.ts +0 -7
  51. package/dist/base/account-system.interface.js +0 -3
  52. package/dist/base/account-system.interface.js.map +0 -1
  53. package/dist/base/address.base.abstract.d.ts +0 -4
  54. package/dist/base/address.base.abstract.js +0 -10
  55. package/dist/base/address.base.abstract.js.map +0 -1
  56. package/dist/base/base.address.d.ts +0 -8
  57. package/dist/base/base.address.js +0 -15
  58. package/dist/base/base.address.js.map +0 -1
  59. package/dist/base/base.object.d.ts +0 -7
  60. package/dist/base/base.object.js +0 -14
  61. package/dist/base/base.object.js.map +0 -1
  62. package/dist/base/base.owner.d.ts +0 -23
  63. package/dist/base/base.owner.js +0 -34
  64. package/dist/base/base.owner.js.map +0 -1
  65. package/dist/base/base.repository.abstract.d.ts +0 -12
  66. package/dist/base/base.repository.abstract.js +0 -22
  67. package/dist/base/base.repository.abstract.js.map +0 -1
  68. package/dist/base/base.repository.interface.d.ts +0 -9
  69. package/dist/base/base.repository.interface.js +0 -3
  70. package/dist/base/base.repository.interface.js.map +0 -1
  71. package/dist/base/index.d.ts +0 -4
  72. package/dist/base/index.js +0 -10
  73. package/dist/base/index.js.map +0 -1
  74. package/dist/base/object/base.object.abstract.d.ts +0 -5
  75. package/dist/base/object/base.object.abstract.js +0 -7
  76. package/dist/base/object/base.object.abstract.js.map +0 -1
  77. package/dist/base/object/base.object.d.ts +0 -7
  78. package/dist/base/object/base.object.js +0 -14
  79. package/dist/base/object/base.object.js.map +0 -1
  80. package/dist/base/object/object.interface.d.ts +0 -4
  81. package/dist/base/object/object.interface.js +0 -3
  82. package/dist/base/object/object.interface.js.map +0 -1
  83. package/dist/base/object.base.abstract.d.ts +0 -5
  84. package/dist/base/object.base.abstract.js +0 -11
  85. package/dist/base/object.base.abstract.js.map +0 -1
  86. package/dist/base/owner/base.owner.abstract.d.ts +0 -20
  87. package/dist/base/owner/base.owner.abstract.js +0 -8
  88. package/dist/base/owner/base.owner.abstract.js.map +0 -1
  89. package/dist/base/owner/base.owner.d.ts +0 -22
  90. package/dist/base/owner/base.owner.js +0 -31
  91. package/dist/base/owner/base.owner.js.map +0 -1
  92. package/dist/base/owner/owner.interface.d.ts +0 -19
  93. package/dist/base/owner/owner.interface.js.map +0 -1
  94. package/dist/base/person.base.abstract.d.ts +0 -21
  95. package/dist/base/person.base.abstract.js +0 -17
  96. package/dist/base/person.base.abstract.js.map +0 -1
  97. package/dist/base/repository/base.repository.abstract.d.ts +0 -12
  98. package/dist/base/repository/base.repository.abstract.js +0 -22
  99. package/dist/base/repository/base.repository.abstract.js.map +0 -1
  100. package/dist/base/repository/base.repository.interface.d.ts +0 -9
  101. package/dist/base/repository/base.repository.interface.js +0 -3
  102. package/dist/base/repository/base.repository.interface.js.map +0 -1
  103. package/dist/customer/customer.repository.d.ts +0 -0
  104. package/dist/customer/customer.repository.js +0 -1
  105. package/dist/customer/customer.repository.js.map +0 -1
  106. package/dist/customer/entities/customer.entity.d.ts +0 -13
  107. package/dist/customer/entities/customer.entity.js +0 -111
  108. package/dist/customer/entities/customer.entity.js.map +0 -1
  109. package/dist/customer/index.d.ts +0 -7
  110. package/dist/customer/index.js +0 -10
  111. package/dist/customer/index.js.map +0 -1
  112. package/dist/document/entities/document-item.entity.d.ts +0 -27
  113. package/dist/document/entities/document-item.entity.js +0 -174
  114. package/dist/document/entities/document-item.entity.js.map +0 -1
  115. package/dist/document/entities/document.entity.d.ts +0 -22
  116. package/dist/document/entities/document.entity.js +0 -139
  117. package/dist/document/entities/document.entity.js.map +0 -1
  118. package/dist/document/index.d.ts +0 -11
  119. package/dist/document/index.js +0 -20
  120. package/dist/document/index.js.map +0 -1
  121. package/dist/document/interfaces/document.repository.interface.d.ts +0 -3
  122. package/dist/document/interfaces/document.repository.interface.js +0 -3
  123. package/dist/document/interfaces/document.repository.interface.js.map +0 -1
  124. package/dist/enum/document-type.enum.d.ts +0 -7
  125. package/dist/enum/document-type.enum.js +0 -12
  126. package/dist/enum/document-type.enum.js.map +0 -1
  127. package/dist/enum/intuit-client.enum.d.ts +0 -13
  128. package/dist/enum/intuit-client.enum.js +0 -19
  129. package/dist/enum/intuit-client.enum.js.map +0 -1
  130. package/dist/finance-company/entities/finance-company.entity.d.ts +0 -13
  131. package/dist/finance-company/entities/finance-company.entity.js +0 -113
  132. package/dist/finance-company/entities/finance-company.entity.js.map +0 -1
  133. package/dist/finance-company/finance-company.entity.d.ts +0 -13
  134. package/dist/finance-company/finance-company.entity.js +0 -66
  135. package/dist/finance-company/finance-company.entity.js.map +0 -1
  136. package/dist/finance-company/index.d.ts +0 -3
  137. package/dist/finance-company/index.js +0 -8
  138. package/dist/finance-company/index.js.map +0 -1
  139. package/dist/finance-company/interfaces/finance-company-attr.interface.d.ts +0 -10
  140. package/dist/finance-company/interfaces/finance-company-attr.interface.js +0 -3
  141. package/dist/finance-company/interfaces/finance-company-attr.interface.js.map +0 -1
  142. package/dist/finance-company/interfaces/finance-company.repository.interface.d.ts +0 -3
  143. package/dist/finance-company/interfaces/finance-company.repository.interface.js +0 -3
  144. package/dist/finance-company/interfaces/finance-company.repository.interface.js.map +0 -1
  145. package/dist/interfaces/account-system-entity.interface.d.ts +0 -7
  146. package/dist/interfaces/account-system-entity.interface.js +0 -3
  147. package/dist/interfaces/account-system-entity.interface.js.map +0 -1
  148. package/dist/interfaces/customer.repository.interface.d.ts +0 -3
  149. package/dist/interfaces/customer.repository.interface.js +0 -3
  150. package/dist/interfaces/customer.repository.interface.js.map +0 -1
  151. package/dist/interfaces/finance-customer.repository.interface.d.ts +0 -3
  152. package/dist/interfaces/finance-customer.repository.interface.js +0 -3
  153. package/dist/interfaces/finance-customer.repository.interface.js.map +0 -1
  154. package/dist/interfaces/systemConfig.interface.d.ts +0 -0
  155. package/dist/interfaces/systemConfig.interface.js +0 -1
  156. package/dist/interfaces/systemConfig.interface.js.map +0 -1
  157. package/dist/intuit-client/client.d.ts +0 -14
  158. package/dist/intuit-client/client.js +0 -44
  159. package/dist/intuit-client/client.js.map +0 -1
  160. package/dist/journal-entry/entities/journal-entry.entity.d.ts +0 -16
  161. package/dist/journal-entry/entities/journal-entry.entity.js +0 -129
  162. package/dist/journal-entry/entities/journal-entry.entity.js.map +0 -1
  163. package/dist/journal-entry/index.d.ts +0 -6
  164. package/dist/journal-entry/index.js +0 -10
  165. package/dist/journal-entry/index.js.map +0 -1
  166. package/dist/journal-entry/interfaces/journal-entry.repository.interface.d.ts +0 -10
  167. package/dist/journal-entry/interfaces/journal-entry.repository.interface.js +0 -3
  168. package/dist/journal-entry/interfaces/journal-entry.repository.interface.js.map +0 -1
  169. package/dist/ledger-transaction/entities/ledger-transaction.entity.d.ts +0 -19
  170. package/dist/ledger-transaction/entities/ledger-transaction.entity.js +0 -157
  171. package/dist/ledger-transaction/entities/ledger-transaction.entity.js.map +0 -1
  172. package/dist/ledger-transaction/index.d.ts +0 -6
  173. package/dist/ledger-transaction/index.js +0 -10
  174. package/dist/ledger-transaction/index.js.map +0 -1
  175. package/dist/payment/entities/payment-item.entity.d.ts +0 -10
  176. package/dist/payment/entities/payment-item.entity.js +0 -62
  177. package/dist/payment/entities/payment-item.entity.js.map +0 -1
  178. package/dist/payment/entities/payment.entity.d.ts +0 -25
  179. package/dist/payment/entities/payment.entity.js +0 -152
  180. package/dist/payment/entities/payment.entity.js.map +0 -1
  181. package/dist/payment/index.d.ts +0 -10
  182. package/dist/payment/index.js +0 -18
  183. package/dist/payment/index.js.map +0 -1
  184. package/dist/payment/interfaces/payment-item-attr.interface.d.ts +0 -8
  185. package/dist/payment/interfaces/payment-item-attr.interface.js +0 -7
  186. package/dist/payment/interfaces/payment-item-attr.interface.js.map +0 -1
  187. package/dist/payment/interfaces/payment-item.repository.interface.d.ts +0 -3
  188. package/dist/payment/interfaces/payment-item.repository.interface.js +0 -3
  189. package/dist/payment/interfaces/payment-item.repository.interface.js.map +0 -1
  190. package/dist/payment/interfaces/payment.repository.interface.d.ts +0 -3
  191. package/dist/payment/interfaces/payment.repository.interface.js +0 -3
  192. package/dist/payment/interfaces/payment.repository.interface.js.map +0 -1
  193. package/dist/payment/payment-item.repository.d.ts +0 -5
  194. package/dist/payment/payment-item.repository.js +0 -12
  195. package/dist/payment/payment-item.repository.js.map +0 -1
  196. package/dist/payment-item/interfaces/payment-item.repository.interface.d.ts +0 -3
  197. package/dist/payment-item/interfaces/payment-item.repository.interface.js +0 -3
  198. package/dist/payment-item/interfaces/payment-item.repository.interface.js.map +0 -1
  199. package/dist/quickbook-client/client.d.ts +0 -39
  200. package/dist/quickbook-client/client.js +0 -205
  201. package/dist/quickbook-client/client.js.map +0 -1
  202. package/dist/quickbook-client/constant.d.ts +0 -1
  203. package/dist/quickbook-client/constant.js +0 -5
  204. package/dist/quickbook-client/constant.js.map +0 -1
  205. package/dist/quickbook-client/index.d.ts +0 -5
  206. package/dist/quickbook-client/index.js +0 -6
  207. package/dist/quickbook-client/index.js.map +0 -1
  208. package/dist/quickbook-client/interfaces/quickbook-client-call-options.interface.d.ts +0 -6
  209. package/dist/quickbook-client/interfaces/quickbook-client-call-options.interface.js +0 -3
  210. package/dist/quickbook-client/interfaces/quickbook-client-call-options.interface.js.map +0 -1
  211. package/dist/quickbook-client/interfaces/quickbook-client-create-account-options.interface.d.ts +0 -9
  212. package/dist/quickbook-client/interfaces/quickbook-client-create-account-options.interface.js +0 -3
  213. package/dist/quickbook-client/interfaces/quickbook-client-create-account-options.interface.js.map +0 -1
  214. package/dist/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.d.ts +0 -7
  215. package/dist/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.js +0 -3
  216. package/dist/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.js.map +0 -1
  217. package/dist/quickbook-client/interfaces/quickbook-client-options.interface.d.ts +0 -8
  218. package/dist/quickbook-client/interfaces/quickbook-client-options.interface.js +0 -3
  219. package/dist/quickbook-client/interfaces/quickbook-client-options.interface.js.map +0 -1
  220. package/dist/quickbook-client/quickbook-client.module-definition.d.ts +0 -2
  221. package/dist/quickbook-client/quickbook-client.module-definition.js +0 -9
  222. package/dist/quickbook-client/quickbook-client.module-definition.js.map +0 -1
  223. package/dist/quickbook-client/quickbook-client.module.d.ts +0 -6
  224. package/dist/quickbook-client/quickbook-client.module.js +0 -34
  225. package/dist/quickbook-client/quickbook-client.module.js.map +0 -1
@@ -1,10 +0,0 @@
1
- import { PaymentModel } from './entities/payment.entity';
2
- import { IPaymentAttr } from './interfaces/payment-attr.interface';
3
- import { IPaymentRepository } from './interfaces/payment.repository.interface';
4
- import { PaymentItemModel } from './entities/payment-item.entity';
5
- import { IPaymentItemAttr } from './interfaces/payment-item-attr.interface';
6
- import { IPaymentItemRepository } from './interfaces/payment-item.repository.interface';
7
- import { Payment } from './payment';
8
- import { PaymentRepository } from './payment.repository';
9
- import { PaymentItemRepository } from './payment-item.repository';
10
- export { PaymentModel, PaymentItemModel, Payment, PaymentRepository, PaymentItemRepository, IPaymentRepository, IPaymentItemRepository, IPaymentAttr, IPaymentItemAttr, };
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IPaymentItemAttr = exports.IPaymentAttr = exports.PaymentItemRepository = exports.PaymentRepository = exports.Payment = exports.PaymentItemModel = exports.PaymentModel = void 0;
4
- const payment_entity_1 = require("./entities/payment.entity");
5
- Object.defineProperty(exports, "PaymentModel", { enumerable: true, get: function () { return payment_entity_1.PaymentModel; } });
6
- const payment_attr_interface_1 = require("./interfaces/payment-attr.interface");
7
- Object.defineProperty(exports, "IPaymentAttr", { enumerable: true, get: function () { return payment_attr_interface_1.IPaymentAttr; } });
8
- const payment_item_entity_1 = require("./entities/payment-item.entity");
9
- Object.defineProperty(exports, "PaymentItemModel", { enumerable: true, get: function () { return payment_item_entity_1.PaymentItemModel; } });
10
- const payment_item_attr_interface_1 = require("./interfaces/payment-item-attr.interface");
11
- Object.defineProperty(exports, "IPaymentItemAttr", { enumerable: true, get: function () { return payment_item_attr_interface_1.IPaymentItemAttr; } });
12
- const payment_1 = require("./payment");
13
- Object.defineProperty(exports, "Payment", { enumerable: true, get: function () { return payment_1.Payment; } });
14
- const payment_repository_1 = require("./payment.repository");
15
- Object.defineProperty(exports, "PaymentRepository", { enumerable: true, get: function () { return payment_repository_1.PaymentRepository; } });
16
- const payment_item_repository_1 = require("./payment-item.repository");
17
- Object.defineProperty(exports, "PaymentItemRepository", { enumerable: true, get: function () { return payment_item_repository_1.PaymentItemRepository; } });
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/payment/index.ts"],"names":[],"mappings":";;;AAAA,8DAAyD;AAWvD,6FAXO,6BAAY,OAWP;AAVd,gFAAmE;AAiBjE,6FAjBO,qCAAY,OAiBP;AAfd,wEAAkE;AAShE,iGATO,sCAAgB,OASP;AARlB,0FAA4E;AAe1E,iGAfO,8CAAgB,OAeP;AAblB,uCAAoC;AAOlC,wFAPO,iBAAO,OAOP;AANT,6DAAyD;AAOvD,kGAPO,sCAAiB,OAOP;AANnB,uEAAkE;AAOhE,sGAPO,+CAAqB,OAOP"}
@@ -1,8 +0,0 @@
1
- export declare class IPaymentItemAttr {
2
- PaymentId: string;
3
- PayForObjectId: string;
4
- PayForObjectType: string;
5
- Currency: string;
6
- Amount: number;
7
- TaxCode?: string;
8
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IPaymentItemAttr = void 0;
4
- class IPaymentItemAttr {
5
- }
6
- exports.IPaymentItemAttr = IPaymentItemAttr;
7
- //# sourceMappingURL=payment-item-attr.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-item-attr.interface.js","sourceRoot":"","sources":["../../../src/payment/interfaces/payment-item-attr.interface.ts"],"names":[],"mappings":";;;AAAA,MAAa,gBAAgB;CAO5B;AAPD,4CAOC"}
@@ -1,3 +0,0 @@
1
- import { IBaseRepository } from '@tomei/general';
2
- import PaymentItemModel from '../../models/payment-item.entity';
3
- export type IPaymentItemRepository = IBaseRepository<PaymentItemModel>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=payment-item.repository.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-item.repository.interface.js","sourceRoot":"","sources":["../../../src/payment/interfaces/payment-item.repository.interface.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import { IBaseRepository } from '@tomei/general';
2
- import PaymentModel from '../../models/payment.entity';
3
- export type IPaymentRepository = IBaseRepository<PaymentModel>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=payment.repository.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment.repository.interface.js","sourceRoot":"","sources":["../../../src/payment/interfaces/payment.repository.interface.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import { BaseRepository, IBaseRepository } from '@tomei/general';
2
- import PaymentItemModel from '../models/payment-item.entity';
3
- export declare class PaymentItemRepository extends BaseRepository<PaymentItemModel> implements IBaseRepository<PaymentItemModel> {
4
- constructor();
5
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentItemRepository = void 0;
4
- const general_1 = require("@tomei/general");
5
- const payment_item_entity_1 = require("../models/payment-item.entity");
6
- class PaymentItemRepository extends general_1.BaseRepository {
7
- constructor() {
8
- super(payment_item_entity_1.default);
9
- }
10
- }
11
- exports.PaymentItemRepository = PaymentItemRepository;
12
- //# sourceMappingURL=payment-item.repository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-item.repository.js","sourceRoot":"","sources":["../../src/payment/payment-item.repository.ts"],"names":[],"mappings":";;;AAAA,4CAAiE;AACjE,uEAA6D;AAE7D,MAAa,qBACX,SAAQ,wBAAgC;IAGxC;QACE,KAAK,CAAC,6BAAgB,CAAC,CAAC;IAC1B,CAAC;CACF;AAPD,sDAOC"}
@@ -1,3 +0,0 @@
1
- import { IBaseRepository } from '@tomei/general';
2
- import PaymentItemModel from '../../models/payment-item.entity';
3
- export type IPaymentItemRepository = IBaseRepository<PaymentItemModel>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=payment-item.repository.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-item.repository.interface.js","sourceRoot":"","sources":["../../../src/payment-item/interfaces/payment-item.repository.interface.ts"],"names":[],"mappings":""}
@@ -1,39 +0,0 @@
1
- import * as OAuthClient from 'intuit-oauth';
2
- import { Customer } from '../customer';
3
- import { Payment } from '../payment';
4
- import { ClientScopes } from '../enum/quick-book-client-scopes.enum';
5
- import { IAccountSystem } from '../interfaces';
6
- import { IQuickBookAPICallOptions } from './interfaces/quickbook-client-call-options.interface';
7
- import { IQuickBookCreateAccountOptions } from './interfaces/quickbook-client-create-account-options.interface';
8
- import { IQuickBookCreateCustomerOptions } from './interfaces/quickbook-client-create-customer-options.interface';
9
- export declare class QuickBookClient implements IAccountSystem {
10
- client: OAuthClient;
11
- apiUrl: string;
12
- authUrl: string;
13
- constructor(SysCode: string, scopes: ClientScopes[]);
14
- createAccount(payload: IQuickBookCreateAccountOptions): Promise<any>;
15
- createCustomer(payload: IQuickBookCreateCustomerOptions): Promise<any>;
16
- makePayment(customer: Customer, paymentInfo: Payment): Promise<any>;
17
- collectPayments(customer: Customer, paymentInfo: Payment): Promise<any>;
18
- createInvoice(): Promise<void>;
19
- createDebitNote(): Promise<void>;
20
- createCreditNote(): Promise<void>;
21
- postTransaction(): Promise<void>;
22
- connect(scopes: ClientScopes[]): string;
23
- authCallback(url: string): Promise<void>;
24
- isTokenValid(): boolean;
25
- refreshAccessToken(): Promise<void>;
26
- logout(): Promise<void>;
27
- get token(): {
28
- token_type: string;
29
- access_token: string;
30
- refresh_token: string;
31
- expires_in: number;
32
- x_refresh_token_expires_in: number;
33
- id_token: string;
34
- createdAt: number;
35
- };
36
- getCompanyId(): string;
37
- validateAndRefreshToken(): Promise<void>;
38
- callApi(options: IQuickBookAPICallOptions): Promise<any>;
39
- }
@@ -1,205 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QuickBookClient = void 0;
4
- const OAuthClient = require("intuit-oauth");
5
- const config_1 = require("../config");
6
- class QuickBookClient {
7
- constructor(SysCode, scopes) {
8
- const config = (0, config_1.getConfig)();
9
- const clientConfig = {
10
- apiUrl: config.accountingSystem.quickbooks.API_Url,
11
- clientId: config.systemConfig[SysCode].API_Key,
12
- clientSecret: config.systemConfig[SysCode].API_Secret,
13
- environment: config.environment === 'production' ? 'production' : 'sandbox',
14
- redirectUri: config.systemConfig[SysCode].redirectUrl,
15
- logging: config.environment === 'production' ? false : true,
16
- };
17
- this.client = new OAuthClient(clientConfig);
18
- this.apiUrl = config.accountingSystem.quickbooks.API_Url;
19
- this.authUrl = this.connect(scopes);
20
- }
21
- async createAccount(payload) {
22
- try {
23
- const companyId = this.getCompanyId();
24
- const response = await this.callApi({
25
- endpoint: `/v3/company/${companyId}/account`,
26
- method: 'POST',
27
- headers: {
28
- 'Content-Type': 'application/json',
29
- },
30
- body: JSON.stringify(payload),
31
- });
32
- return response.json.Account.id;
33
- }
34
- catch (error) {
35
- throw error;
36
- }
37
- }
38
- async createCustomer(payload) {
39
- try {
40
- const requestBody = {
41
- PrimaryEmailAddr: {
42
- Address: payload.Email,
43
- },
44
- DisplayName: payload.FullName,
45
- GivenName: payload.FullName,
46
- FullyQualifiedName: payload.FullName,
47
- PrimaryPhone: {
48
- FreeFormNumber: payload.ContractNo,
49
- },
50
- BillAddr: {
51
- CountrySubDivisionCode: '',
52
- City: payload.Address.City,
53
- PostalCode: payload.Address.PostalCode,
54
- Line1: payload.Address.Line1,
55
- Country: payload.Address.Country,
56
- },
57
- };
58
- const companyId = this.getCompanyId();
59
- const response = await this.callApi({
60
- endpoint: `/v3/company/${companyId}/customer?minorversion=65`,
61
- method: 'POST',
62
- headers: {
63
- 'Content-Type': 'application/json',
64
- },
65
- body: JSON.stringify(requestBody),
66
- });
67
- return response.json.Customer.id;
68
- }
69
- catch (error) {
70
- throw error;
71
- }
72
- }
73
- async makePayment(customer, paymentInfo) {
74
- try {
75
- const requestBody = {
76
- TotalAmt: paymentInfo.getAmount(),
77
- sparse: false,
78
- DepositToAccountRef: {
79
- value: await paymentInfo.getDepositAccountNo(),
80
- },
81
- ARAccountRef: {
82
- value: await paymentInfo.getReceivableAccountNo(),
83
- },
84
- CustomerRef: {
85
- value: customer.getCustomerId(),
86
- name: customer.FullName,
87
- },
88
- Line: [],
89
- };
90
- paymentInfo.getPaymentItems().forEach((item) => {
91
- requestBody.Line.push({
92
- Amount: item.Amount,
93
- LinkedTxn: [
94
- {
95
- TxnId: item.Id,
96
- TxnType: item.Type,
97
- },
98
- ],
99
- });
100
- });
101
- const companyId = this.getCompanyId();
102
- const response = await this.callApi({
103
- endpoint: `/v3/company/${companyId}/payment?minorversion=65`,
104
- method: 'POST',
105
- headers: {
106
- 'Content-Type': 'application/json',
107
- },
108
- body: JSON.stringify(requestBody),
109
- });
110
- return response.json.Payment.Id;
111
- }
112
- catch (error) { }
113
- }
114
- collectPayments(customer, paymentInfo) {
115
- console.log(customer, paymentInfo);
116
- throw new Error('Method not implemented.');
117
- }
118
- async createInvoice() {
119
- throw new Error('Method not implemented.');
120
- }
121
- async createDebitNote() {
122
- throw new Error('Method not implemented.');
123
- }
124
- async createCreditNote() {
125
- throw new Error('Method not implemented.');
126
- }
127
- async postTransaction() {
128
- throw new Error('Method not implemented.');
129
- }
130
- connect(scopes) {
131
- try {
132
- const authUrl = this.client.authorizeUri({
133
- scope: scopes,
134
- state: 'testState',
135
- });
136
- return authUrl;
137
- }
138
- catch (error) {
139
- throw error;
140
- }
141
- }
142
- async authCallback(url) {
143
- try {
144
- await this.client.createToken(url);
145
- }
146
- catch (error) {
147
- throw error;
148
- }
149
- }
150
- isTokenValid() {
151
- try {
152
- return this.client.isAccessTokenValid();
153
- }
154
- catch (error) {
155
- throw error;
156
- }
157
- }
158
- async refreshAccessToken() {
159
- try {
160
- await this.client.refresh();
161
- }
162
- catch (error) {
163
- throw error;
164
- }
165
- }
166
- async logout() {
167
- try {
168
- await this.client.revokeToken();
169
- }
170
- catch (error) {
171
- throw error;
172
- }
173
- }
174
- get token() {
175
- return this.client.token.getToken();
176
- }
177
- getCompanyId() {
178
- return this.client.getToken().realmId;
179
- }
180
- async validateAndRefreshToken() {
181
- if (!this.client.isAccessTokenValid()) {
182
- await this.client.refresh();
183
- }
184
- }
185
- async callApi(options) {
186
- try {
187
- const headers = {
188
- 'Content-Type': 'application/json',
189
- };
190
- const response = this.client.makeApiCall({
191
- url: this.apiUrl + options.endpoint,
192
- method: options.method,
193
- headers: options.headers
194
- ? Object.assign(Object.assign({}, headers), options.headers) : headers,
195
- body: options.body ? options.body : '',
196
- });
197
- return response;
198
- }
199
- catch (error) {
200
- throw error;
201
- }
202
- }
203
- }
204
- exports.QuickBookClient = QuickBookClient;
205
- //# sourceMappingURL=client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/quickbook-client/client.ts"],"names":[],"mappings":";;;AAAA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IAED,IAAW,KAAK;QASd,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,uBAAuB;QAC3B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,EAAE;YACrC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;SAC7B;IACH,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAiC;QAC7C,IAAI;YACF,MAAM,OAAO,GAAG;gBACd,cAAc,EAAE,kBAAkB;aACnC,CAAC;YAEF,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;gBACvC,GAAG,EAAE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,QAAQ;gBACnC,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,OAAO,EAAE,OAAO,CAAC,OAAO;oBACtB,CAAC,iCACM,OAAO,GACP,OAAO,CAAC,OAAO,EAEtB,CAAC,CAAC,OAAO;gBACX,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;aACvC,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC;SACjB;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF;AAjOD,0CAiOC"}
@@ -1 +0,0 @@
1
- export declare const QUICKBOOK_CLIENT = "quickbook-client";
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QUICKBOOK_CLIENT = void 0;
4
- exports.QUICKBOOK_CLIENT = 'quickbook-client';
5
- //# sourceMappingURL=constant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constant.js","sourceRoot":"","sources":["../../src/quickbook-client/constant.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,kBAAkB,CAAC"}
@@ -1,5 +0,0 @@
1
- import { QuickBookClient } from './client';
2
- import { IQuickBookCreateAccountOptions } from './interfaces/quickbook-client-create-account-options.interface';
3
- import { IQuickBookClientOptions } from './interfaces/quickbook-client-options.interface';
4
- import { IQuickBookCreateCustomerOptions } from './interfaces/quickbook-client-create-customer-options.interface';
5
- export { QuickBookClient, IQuickBookCreateAccountOptions, IQuickBookClientOptions, IQuickBookCreateCustomerOptions, };
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QuickBookClient = void 0;
4
- const client_1 = require("./client");
5
- Object.defineProperty(exports, "QuickBookClient", { enumerable: true, get: function () { return client_1.QuickBookClient; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/quickbook-client/index.ts"],"names":[],"mappings":";;;AAAA,qCAA2C;AAKzC,gGALO,wBAAe,OAKP"}
@@ -1,6 +0,0 @@
1
- export interface IQuickBookAPICallOptions {
2
- endpoint: string;
3
- method: 'GET' | 'POST' | 'PUT' | 'DELETE';
4
- headers?: object;
5
- body?: string;
6
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=quickbook-client-call-options.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quickbook-client-call-options.interface.js","sourceRoot":"","sources":["../../../src/quickbook-client/interfaces/quickbook-client-call-options.interface.ts"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- export interface IQuickBookCreateAccountOptions {
2
- Name: string;
3
- AcctNum: string;
4
- AccountType: string;
5
- AccountSubType: string;
6
- CurrencyRef?: string;
7
- ParentRef?: string;
8
- SubAccount?: boolean;
9
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=quickbook-client-create-account-options.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quickbook-client-create-account-options.interface.js","sourceRoot":"","sources":["../../../src/quickbook-client/interfaces/quickbook-client-create-account-options.interface.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { AddressBase } from '@tomei/general';
2
- export interface IQuickBookCreateCustomerOptions {
3
- FullName: string;
4
- Email: string;
5
- ContractNo: string;
6
- Address: AddressBase;
7
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=quickbook-client-create-customer-options.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quickbook-client-create-customer-options.interface.js","sourceRoot":"","sources":["../../../src/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- export interface IQuickBookClientOptions {
2
- clientId: string;
3
- clientSecret: string;
4
- redirectUri: string;
5
- apiUrl: string;
6
- environment: 'production' | 'sandbox';
7
- logging: boolean;
8
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=quickbook-client-options.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quickbook-client-options.interface.js","sourceRoot":"","sources":["../../../src/quickbook-client/interfaces/quickbook-client-options.interface.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import { IQuickBookClientModuleOptions } from './interfaces/quickbook-client-options.interface';
2
- export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<IQuickBookClientModuleOptions, "forRoot", "create", {}>, MODULE_OPTIONS_TOKEN: string | symbol;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.MODULE_OPTIONS_TOKEN = exports.ConfigurableModuleClass = void 0;
5
- const common_1 = require("@nestjs/common");
6
- _a = new common_1.ConfigurableModuleBuilder()
7
- .setClassMethodName('forRoot')
8
- .build(), exports.ConfigurableModuleClass = _a.ConfigurableModuleClass, exports.MODULE_OPTIONS_TOKEN = _a.MODULE_OPTIONS_TOKEN;
9
- //# sourceMappingURL=quickbook-client.module-definition.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quickbook-client.module-definition.js","sourceRoot":"","sources":["../../src/quickbook-client/quickbook-client.module-definition.ts"],"names":[],"mappings":";;;;AAAA,2CAA2D;AAG9C,KACX,IAAI,kCAAyB,EAAiC;KAC3D,kBAAkB,CAAC,SAAS,CAAC;KAC7B,KAAK,EAAE,EAHG,+BAAuB,+BAAE,4BAAoB,2BAG/C"}
@@ -1,6 +0,0 @@
1
- import { DynamicModule } from '@nestjs/common';
2
- import { IQuickBookClientModuleOptions } from './interfaces/quickbook-client-options.interface';
3
- import { ConfigurableModuleClass } from './quickbook-client.module-definition';
4
- export declare class QuickBookClientModule extends ConfigurableModuleClass {
5
- static forRoot(options: IQuickBookClientModuleOptions): DynamicModule;
6
- }
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var QuickBookClientModule_1;
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.QuickBookClientModule = void 0;
11
- const common_1 = require("@nestjs/common");
12
- const client_1 = require("./client");
13
- const constant_1 = require("./constant");
14
- const quickbook_client_module_definition_1 = require("./quickbook-client.module-definition");
15
- let QuickBookClientModule = QuickBookClientModule_1 = class QuickBookClientModule extends quickbook_client_module_definition_1.ConfigurableModuleClass {
16
- static forRoot(options) {
17
- const client = new client_1.QuickBookClient(options);
18
- const QuickBookClientProvider = {
19
- provide: constant_1.QUICKBOOK_CLIENT,
20
- useValue: client,
21
- };
22
- return {
23
- module: QuickBookClientModule_1,
24
- providers: [QuickBookClientProvider],
25
- exports: [QuickBookClientProvider],
26
- global: true,
27
- };
28
- }
29
- };
30
- QuickBookClientModule = QuickBookClientModule_1 = __decorate([
31
- (0, common_1.Module)({})
32
- ], QuickBookClientModule);
33
- exports.QuickBookClientModule = QuickBookClientModule;
34
- //# sourceMappingURL=quickbook-client.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quickbook-client.module.js","sourceRoot":"","sources":["../../src/quickbook-client/quickbook-client.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAiE;AACjE,qCAA2C;AAC3C,yCAA8C;AAE9C,6FAA+E;AAGxE,IAAM,qBAAqB,6BAA3B,MAAM,qBAAsB,SAAQ,4DAAuB;IAChE,MAAM,CAAC,OAAO,CAAC,OAAsC;QACnD,MAAM,MAAM,GAAG,IAAI,wBAAe,CAAC,OAAO,CAAC,CAAC;QAE5C,MAAM,uBAAuB,GAAa;YACxC,OAAO,EAAE,2BAAgB;YACzB,QAAQ,EAAE,MAAM;SACjB,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,uBAAqB;YAC7B,SAAS,EAAE,CAAC,uBAAuB,CAAC;YACpC,OAAO,EAAE,CAAC,uBAAuB,CAAC;YAClC,MAAM,EAAE,IAAI;SACb,CAAC;IACJ,CAAC;CACF,CAAA;AAhBY,qBAAqB;IADjC,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,qBAAqB,CAgBjC;AAhBY,sDAAqB"}