@robosystems/client 2.8.0 → 2.8.1

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 (41) hide show
  1. package/artifacts/LedgerClient.d.ts +56 -17
  2. package/artifacts/LedgerClient.js +68 -25
  3. package/artifacts/LedgerClient.ts +113 -29
  4. package/artifacts/graphql/generated/graphql.d.ts +22 -5
  5. package/artifacts/graphql/generated/graphql.js +177 -0
  6. package/artifacts/graphql/generated/graphql.ts +209 -5
  7. package/artifacts/graphql/queries/ledger/accountRollups.js +12 -2
  8. package/artifacts/graphql/queries/ledger/accountRollups.ts +12 -2
  9. package/artifacts/graphql/queries/ledger/accountTree.js +2 -2
  10. package/artifacts/graphql/queries/ledger/accountTree.ts +2 -2
  11. package/artifacts/graphql/queries/ledger/accounts.js +8 -1
  12. package/artifacts/graphql/queries/ledger/accounts.ts +8 -1
  13. package/artifacts/graphql/queries/ledger/closingBookStructures.js +2 -2
  14. package/artifacts/graphql/queries/ledger/closingBookStructures.ts +2 -2
  15. package/artifacts/graphql/queries/ledger/entities.js +1 -0
  16. package/artifacts/graphql/queries/ledger/entities.ts +1 -0
  17. package/artifacts/graphql/queries/ledger/entity.js +4 -2
  18. package/artifacts/graphql/queries/ledger/entity.ts +4 -2
  19. package/artifacts/graphql/queries/ledger/eventBlocks.js +2 -0
  20. package/artifacts/graphql/queries/ledger/eventBlocks.ts +2 -0
  21. package/artifacts/graphql/queries/ledger/fiscalCalendar.js +3 -2
  22. package/artifacts/graphql/queries/ledger/fiscalCalendar.ts +3 -2
  23. package/artifacts/graphql/queries/ledger/journalEntries.js +2 -0
  24. package/artifacts/graphql/queries/ledger/journalEntries.ts +2 -0
  25. package/artifacts/graphql/queries/ledger/periodCloseStatus.js +2 -2
  26. package/artifacts/graphql/queries/ledger/periodCloseStatus.ts +2 -2
  27. package/artifacts/graphql/queries/ledger/periodDrafts.js +2 -2
  28. package/artifacts/graphql/queries/ledger/periodDrafts.ts +2 -2
  29. package/artifacts/graphql/queries/ledger/reconciliations.js +2 -2
  30. package/artifacts/graphql/queries/ledger/reconciliations.ts +2 -2
  31. package/artifacts/graphql/queries/ledger/report.js +1 -0
  32. package/artifacts/graphql/queries/ledger/report.ts +1 -0
  33. package/artifacts/graphql/queries/ledger/reports.js +3 -2
  34. package/artifacts/graphql/queries/ledger/reports.ts +3 -2
  35. package/artifacts/graphql/queries/ledger/summary.js +3 -2
  36. package/artifacts/graphql/queries/ledger/summary.ts +3 -2
  37. package/artifacts/graphql/queries/ledger/transactions.js +2 -0
  38. package/artifacts/graphql/queries/ledger/transactions.ts +2 -0
  39. package/artifacts/graphql/queries/ledger/trialBalance.js +2 -2
  40. package/artifacts/graphql/queries/ledger/trialBalance.ts +2 -2
  41. package/package.json +1 -1
@@ -13,8 +13,15 @@ export const LIST_ACCOUNTS = gql`
13
13
  $isActive: Boolean
14
14
  $limit: Int! = 100
15
15
  $offset: Int! = 0
16
+ $entityId: String
16
17
  ) {
17
- accounts(classification: $classification, isActive: $isActive, limit: $limit, offset: $offset) {
18
+ accounts(
19
+ classification: $classification
20
+ isActive: $isActive
21
+ limit: $limit
22
+ offset: $offset
23
+ entityId: $entityId
24
+ ) {
18
25
  accounts {
19
26
  id
20
27
  code
@@ -8,8 +8,8 @@ const graphql_request_1 = require("graphql-request");
8
8
  * what's available to close.
9
9
  */
10
10
  exports.GET_CLOSING_BOOK_STRUCTURES = (0, graphql_request_1.gql) `
11
- query GetLedgerClosingBookStructures {
12
- closingBookStructures {
11
+ query GetLedgerClosingBookStructures($entityId: String) {
12
+ closingBookStructures(entityId: $entityId) {
13
13
  hasData
14
14
  categories {
15
15
  label
@@ -6,8 +6,8 @@ import { gql } from 'graphql-request'
6
6
  * what's available to close.
7
7
  */
8
8
  export const GET_CLOSING_BOOK_STRUCTURES = gql`
9
- query GetLedgerClosingBookStructures {
10
- closingBookStructures {
9
+ query GetLedgerClosingBookStructures($entityId: String) {
10
+ closingBookStructures(entityId: $entityId) {
11
11
  hasData
12
12
  categories {
13
13
  label
@@ -21,6 +21,7 @@ exports.LIST_ENTITIES = (0, graphql_request_1.gql) `
21
21
  status
22
22
  isParent
23
23
  parentEntityId
24
+ ownershipPct
24
25
  source
25
26
  sourceGraphId
26
27
  connectionId
@@ -19,6 +19,7 @@ export const LIST_ENTITIES = gql`
19
19
  status
20
20
  isParent
21
21
  parentEntityId
22
+ ownershipPct
22
23
  source
23
24
  sourceGraphId
24
25
  connectionId
@@ -16,8 +16,8 @@ const graphql_request_1 = require("graphql-request");
16
16
  * as part of the request URL when calling `graphQLClient.request(...)`.
17
17
  */
18
18
  exports.GET_ENTITY = (0, graphql_request_1.gql) `
19
- query GetLedgerEntity {
20
- entity {
19
+ query GetLedgerEntity($entityId: String) {
20
+ entity(entityId: $entityId) {
21
21
  id
22
22
  name
23
23
  legalName
@@ -34,11 +34,13 @@ exports.GET_ENTITY = (0, graphql_request_1.gql) `
34
34
  lei
35
35
  industry
36
36
  entityType
37
+ reportingStyleId
37
38
  phone
38
39
  website
39
40
  status
40
41
  isParent
41
42
  parentEntityId
43
+ ownershipPct
42
44
  source
43
45
  sourceId
44
46
  sourceGraphId
@@ -15,8 +15,8 @@ import { gql } from 'graphql-request'
15
15
  */
16
16
 
17
17
  export const GET_ENTITY = gql`
18
- query GetLedgerEntity {
19
- entity {
18
+ query GetLedgerEntity($entityId: String) {
19
+ entity(entityId: $entityId) {
20
20
  id
21
21
  name
22
22
  legalName
@@ -33,11 +33,13 @@ export const GET_ENTITY = gql`
33
33
  lei
34
34
  industry
35
35
  entityType
36
+ reportingStyleId
36
37
  phone
37
38
  website
38
39
  status
39
40
  isParent
40
41
  parentEntityId
42
+ ownershipPct
41
43
  source
42
44
  sourceId
43
45
  sourceGraphId
@@ -23,6 +23,7 @@ exports.LIST_EVENT_BLOCKS = (0, graphql_request_1.gql) `
23
23
  $isReconcilingItem: Boolean
24
24
  $limit: Int! = 50
25
25
  $offset: Int! = 0
26
+ $entityId: String
26
27
  ) {
27
28
  eventBlocks(
28
29
  eventType: $eventType
@@ -33,6 +34,7 @@ exports.LIST_EVENT_BLOCKS = (0, graphql_request_1.gql) `
33
34
  isReconcilingItem: $isReconcilingItem
34
35
  limit: $limit
35
36
  offset: $offset
37
+ entityId: $entityId
36
38
  ) {
37
39
  id
38
40
  eventType
@@ -21,6 +21,7 @@ export const LIST_EVENT_BLOCKS = gql`
21
21
  $isReconcilingItem: Boolean
22
22
  $limit: Int! = 50
23
23
  $offset: Int! = 0
24
+ $entityId: String
24
25
  ) {
25
26
  eventBlocks(
26
27
  eventType: $eventType
@@ -31,6 +32,7 @@ export const LIST_EVENT_BLOCKS = gql`
31
32
  isReconcilingItem: $isReconcilingItem
32
33
  limit: $limit
33
34
  offset: $offset
35
+ entityId: $entityId
34
36
  ) {
35
37
  id
36
38
  eventType
@@ -17,9 +17,10 @@ const graphql_request_1 = require("graphql-request");
17
17
  * free of a second round trip for the case that matters most.
18
18
  */
19
19
  exports.GET_FISCAL_CALENDAR = (0, graphql_request_1.gql) `
20
- query GetLedgerFiscalCalendar {
21
- fiscalCalendar {
20
+ query GetLedgerFiscalCalendar($entityId: String) {
21
+ fiscalCalendar(entityId: $entityId) {
22
22
  graphId
23
+ entityId
23
24
  fiscalYearStartMonth
24
25
  closedThrough
25
26
  closeTarget
@@ -15,9 +15,10 @@ import { gql } from 'graphql-request'
15
15
  * free of a second round trip for the case that matters most.
16
16
  */
17
17
  export const GET_FISCAL_CALENDAR = gql`
18
- query GetLedgerFiscalCalendar {
19
- fiscalCalendar {
18
+ query GetLedgerFiscalCalendar($entityId: String) {
19
+ fiscalCalendar(entityId: $entityId) {
20
20
  graphId
21
+ entityId
21
22
  fiscalYearStartMonth
22
23
  closedThrough
23
24
  closeTarget
@@ -25,6 +25,7 @@ exports.LIST_JOURNAL_ENTRIES = (0, graphql_request_1.gql) `
25
25
  $transactionId: String
26
26
  $limit: Int! = 100
27
27
  $offset: Int! = 0
28
+ $entityId: String
28
29
  ) {
29
30
  journalEntries(
30
31
  startDate: $startDate
@@ -35,6 +36,7 @@ exports.LIST_JOURNAL_ENTRIES = (0, graphql_request_1.gql) `
35
36
  transactionId: $transactionId
36
37
  limit: $limit
37
38
  offset: $offset
39
+ entityId: $entityId
38
40
  ) {
39
41
  entries {
40
42
  id
@@ -23,6 +23,7 @@ export const LIST_JOURNAL_ENTRIES = gql`
23
23
  $transactionId: String
24
24
  $limit: Int! = 100
25
25
  $offset: Int! = 0
26
+ $entityId: String
26
27
  ) {
27
28
  journalEntries(
28
29
  startDate: $startDate
@@ -33,6 +34,7 @@ export const LIST_JOURNAL_ENTRIES = gql`
33
34
  transactionId: $transactionId
34
35
  limit: $limit
35
36
  offset: $offset
37
+ entityId: $entityId
36
38
  ) {
37
39
  entries {
38
40
  id
@@ -8,8 +8,8 @@ const graphql_request_1 = require("graphql-request");
8
8
  * many drafts exist in total.
9
9
  */
10
10
  exports.GET_PERIOD_CLOSE_STATUS = (0, graphql_request_1.gql) `
11
- query GetLedgerPeriodCloseStatus($periodStart: Date!, $periodEnd: Date!) {
12
- periodCloseStatus(periodStart: $periodStart, periodEnd: $periodEnd) {
11
+ query GetLedgerPeriodCloseStatus($periodStart: Date!, $periodEnd: Date!, $entityId: String) {
12
+ periodCloseStatus(periodStart: $periodStart, periodEnd: $periodEnd, entityId: $entityId) {
13
13
  fiscalPeriodStart
14
14
  fiscalPeriodEnd
15
15
  periodStatus
@@ -6,8 +6,8 @@ import { gql } from 'graphql-request'
6
6
  * many drafts exist in total.
7
7
  */
8
8
  export const GET_PERIOD_CLOSE_STATUS = gql`
9
- query GetLedgerPeriodCloseStatus($periodStart: Date!, $periodEnd: Date!) {
10
- periodCloseStatus(periodStart: $periodStart, periodEnd: $periodEnd) {
9
+ query GetLedgerPeriodCloseStatus($periodStart: Date!, $periodEnd: Date!, $entityId: String) {
10
+ periodCloseStatus(periodStart: $periodStart, periodEnd: $periodEnd, entityId: $entityId) {
11
11
  fiscalPeriodStart
12
12
  fiscalPeriodEnd
13
13
  periodStatus
@@ -16,8 +16,8 @@ const graphql_request_1 = require("graphql-request");
16
16
  * push to QuickBooks vs. post locally only.
17
17
  */
18
18
  exports.GET_PERIOD_DRAFTS = (0, graphql_request_1.gql) `
19
- query GetLedgerPeriodDrafts($period: String!) {
20
- periodDrafts(period: $period) {
19
+ query GetLedgerPeriodDrafts($period: String!, $entityId: String) {
20
+ periodDrafts(period: $period, entityId: $entityId) {
21
21
  period
22
22
  periodStart
23
23
  periodEnd
@@ -14,8 +14,8 @@ import { gql } from 'graphql-request'
14
14
  * push to QuickBooks vs. post locally only.
15
15
  */
16
16
  export const GET_PERIOD_DRAFTS = gql`
17
- query GetLedgerPeriodDrafts($period: String!) {
18
- periodDrafts(period: $period) {
17
+ query GetLedgerPeriodDrafts($period: String!, $entityId: String) {
18
+ periodDrafts(period: $period, entityId: $entityId) {
19
19
  period
20
20
  periodStart
21
21
  periodEnd
@@ -12,8 +12,8 @@ const graphql_request_1 = require("graphql-request");
12
12
  * `notes` is only populated on a refresh; a read returns it empty.
13
13
  */
14
14
  exports.LIST_RECONCILIATIONS = (0, graphql_request_1.gql) `
15
- query ListLedgerReconciliations($period: String!) {
16
- reconciliations(period: $period) {
15
+ query ListLedgerReconciliations($period: String!, $entityId: String) {
16
+ reconciliations(period: $period, entityId: $entityId) {
17
17
  period
18
18
  asOf
19
19
  notes
@@ -10,8 +10,8 @@ import { gql } from 'graphql-request'
10
10
  * `notes` is only populated on a refresh; a read returns it empty.
11
11
  */
12
12
  export const LIST_RECONCILIATIONS = gql`
13
- query ListLedgerReconciliations($period: String!) {
14
- reconciliations(period: $period) {
13
+ query ListLedgerReconciliations($period: String!, $entityId: String) {
14
+ reconciliations(period: $period, entityId: $entityId) {
15
15
  period
16
16
  asOf
17
17
  notes
@@ -11,6 +11,7 @@ exports.GET_REPORT = (0, graphql_request_1.gql) `
11
11
  report(reportId: $reportId) {
12
12
  id
13
13
  name
14
+ entityId
14
15
  taxonomyId
15
16
  generationStatus
16
17
  periodType
@@ -9,6 +9,7 @@ export const GET_REPORT = gql`
9
9
  report(reportId: $reportId) {
10
10
  id
11
11
  name
12
+ entityId
12
13
  taxonomyId
13
14
  generationStatus
14
15
  periodType
@@ -13,11 +13,12 @@ const graphql_request_1 = require("graphql-request");
13
13
  * `sourceGraphId` / `sourceReportId` / `sharedAt` identify shared reports.
14
14
  */
15
15
  exports.LIST_REPORTS = (0, graphql_request_1.gql) `
16
- query ListLedgerReports($lifecycle: ReportLifecycle! = CURRENT) {
17
- reports(lifecycle: $lifecycle) {
16
+ query ListLedgerReports($lifecycle: ReportLifecycle! = CURRENT, $entityId: String) {
17
+ reports(lifecycle: $lifecycle, entityId: $entityId) {
18
18
  reports {
19
19
  id
20
20
  name
21
+ entityId
21
22
  taxonomyId
22
23
  generationStatus
23
24
  filingStatus
@@ -11,11 +11,12 @@ import { gql } from 'graphql-request'
11
11
  * `sourceGraphId` / `sourceReportId` / `sharedAt` identify shared reports.
12
12
  */
13
13
  export const LIST_REPORTS = gql`
14
- query ListLedgerReports($lifecycle: ReportLifecycle! = CURRENT) {
15
- reports(lifecycle: $lifecycle) {
14
+ query ListLedgerReports($lifecycle: ReportLifecycle! = CURRENT, $entityId: String) {
15
+ reports(lifecycle: $lifecycle, entityId: $entityId) {
16
16
  reports {
17
17
  id
18
18
  name
19
+ entityId
19
20
  taxonomyId
20
21
  generationStatus
21
22
  filingStatus
@@ -9,9 +9,10 @@ const graphql_request_1 = require("graphql-request");
9
9
  * latest QB sync timestamp from the platform connections table.
10
10
  */
11
11
  exports.GET_SUMMARY = (0, graphql_request_1.gql) `
12
- query GetLedgerSummary {
13
- summary {
12
+ query GetLedgerSummary($entityId: String) {
13
+ summary(entityId: $entityId) {
14
14
  graphId
15
+ entityId
15
16
  accountCount
16
17
  transactionCount
17
18
  entryCount
@@ -7,9 +7,10 @@ import { gql } from 'graphql-request'
7
7
  * latest QB sync timestamp from the platform connections table.
8
8
  */
9
9
  export const GET_SUMMARY = gql`
10
- query GetLedgerSummary {
11
- summary {
10
+ query GetLedgerSummary($entityId: String) {
11
+ summary(entityId: $entityId) {
12
12
  graphId
13
+ entityId
13
14
  accountCount
14
15
  transactionCount
15
16
  entryCount
@@ -15,6 +15,7 @@ exports.LIST_TRANSACTIONS = (0, graphql_request_1.gql) `
15
15
  $endDate: Date
16
16
  $limit: Int! = 100
17
17
  $offset: Int! = 0
18
+ $entityId: String
18
19
  ) {
19
20
  transactions(
20
21
  type: $type
@@ -22,6 +23,7 @@ exports.LIST_TRANSACTIONS = (0, graphql_request_1.gql) `
22
23
  endDate: $endDate
23
24
  limit: $limit
24
25
  offset: $offset
26
+ entityId: $entityId
25
27
  ) {
26
28
  transactions {
27
29
  id
@@ -13,6 +13,7 @@ export const LIST_TRANSACTIONS = gql`
13
13
  $endDate: Date
14
14
  $limit: Int! = 100
15
15
  $offset: Int! = 0
16
+ $entityId: String
16
17
  ) {
17
18
  transactions(
18
19
  type: $type
@@ -20,6 +21,7 @@ export const LIST_TRANSACTIONS = gql`
20
21
  endDate: $endDate
21
22
  limit: $limit
22
23
  offset: $offset
24
+ entityId: $entityId
23
25
  ) {
24
26
  transactions {
25
27
  id
@@ -9,8 +9,8 @@ const graphql_request_1 = require("graphql-request");
9
9
  * balance from inception to now.
10
10
  */
11
11
  exports.GET_TRIAL_BALANCE = (0, graphql_request_1.gql) `
12
- query GetLedgerTrialBalance($startDate: Date, $endDate: Date) {
13
- trialBalance(startDate: $startDate, endDate: $endDate) {
12
+ query GetLedgerTrialBalance($startDate: Date, $endDate: Date, $entityId: String) {
13
+ trialBalance(startDate: $startDate, endDate: $endDate, entityId: $entityId) {
14
14
  totalDebits
15
15
  totalCredits
16
16
  rows {
@@ -7,8 +7,8 @@ import { gql } from 'graphql-request'
7
7
  * balance from inception to now.
8
8
  */
9
9
  export const GET_TRIAL_BALANCE = gql`
10
- query GetLedgerTrialBalance($startDate: Date, $endDate: Date) {
11
- trialBalance(startDate: $startDate, endDate: $endDate) {
10
+ query GetLedgerTrialBalance($startDate: Date, $endDate: Date, $entityId: String) {
11
+ trialBalance(startDate: $startDate, endDate: $endDate, entityId: $entityId) {
12
12
  totalDebits
13
13
  totalCredits
14
14
  rows {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robosystems/client",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "description": "TypeScript client library for the RoboSystems financial intelligence platform",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",