@spaceinvoices/js-sdk 11.1.0 → 11.1.2
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/dist/generated/activities/activities.d.cts +1 -1
- package/dist/generated/activities/activities.d.ts +1 -1
- package/dist/generated/entity-stats/entity-stats.d.cts +1 -0
- package/dist/generated/entity-stats/entity-stats.d.ts +1 -0
- package/dist/generated/model/getActivities200DataItem.d.cts +1 -1
- package/dist/generated/model/getActivities200DataItem.d.ts +1 -1
- package/dist/generated/model/getActivitiesParams.d.cts +2 -2
- package/dist/generated/model/getActivitiesParams.d.ts +2 -2
- package/dist/generated-zod/activities/activities.d.cts +1 -1
- package/dist/generated-zod/activities/activities.d.ts +1 -1
- package/dist/generated-zod/entity-stats/entity-stats.d.cts +1 -0
- package/dist/generated-zod/entity-stats/entity-stats.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { Error, GetActivities200, GetActivitiesParams } from '../model/index.cjs';
|
|
9
9
|
/**
|
|
10
|
-
* Retrieve a paginated list of activities for the entity. Supports filtering by resource_type, resource_id, and action. Set include_related_payments=true with resource_id to include historical
|
|
10
|
+
* Retrieve a paginated list of activities for the entity. Supports filtering by resource_type, resource_id, and action. Set include_related_payments=true with resource_id to include historical payment events linked through invoice_id, credit_note_id, or advance_invoice_id. Other filters still apply. Omitted, null, or false retains exact resource filtering; without resource_id the flag has no effect. Activities are ordered by ID descending by default.
|
|
11
11
|
* @summary List activities
|
|
12
12
|
*/
|
|
13
13
|
export type getActivitiesResponse200 = {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { Error, GetActivities200, GetActivitiesParams } from '../model/index.js';
|
|
9
9
|
/**
|
|
10
|
-
* Retrieve a paginated list of activities for the entity. Supports filtering by resource_type, resource_id, and action. Set include_related_payments=true with resource_id to include historical
|
|
10
|
+
* Retrieve a paginated list of activities for the entity. Supports filtering by resource_type, resource_id, and action. Set include_related_payments=true with resource_id to include historical payment events linked through invoice_id, credit_note_id, or advance_invoice_id. Other filters still apply. Omitted, null, or false retains exact resource filtering; without resource_id the flag has no effect. Activities are ordered by ID descending by default.
|
|
11
11
|
* @summary List activities
|
|
12
12
|
*/
|
|
13
13
|
export type getActivitiesResponse200 = {
|
|
@@ -22,6 +22,7 @@ Send an array of 1-25 queries. Queries share one read-only database snapshot and
|
|
|
22
22
|
- Sum `financial_gross_converted` for gross invoice-date sales in the entity currency; subtract the equivalent eligible credit-note sum for net sales after credits. This is tax-inclusive sales, not service-period revenue recognition. Invoice `total_due_converted` reports invoice-only outstanding balances.
|
|
23
23
|
- Sum `collection_amount_converted` for direct invoice cash receipts or positive credit-note refund magnitudes, capped per document. Applied credits and advance allocations are excluded. Include `collection_conversion_missing` to detect unusable cash conversions as well as missing document conversion. Subtract refunds from invoice collections, and eligible credits from invoiced gross; bound collected cash to zero through net invoiced gross before calculating the rate. A nonpositive denominator has a zero rate.
|
|
24
24
|
- Payment charts use `active_invoice_cash_receipt: true` and `cash_amount_converted`. These are receipts on active invoices, excluding supplier payments, refunds and noncash allocations.
|
|
25
|
+
- Sum `expense_cash_amount_converted` with `expense_cash_payment: true` for cash paid to suppliers in the entity currency, and include `expense_cash_conversion_missing` the same way as the receipt counter.
|
|
25
26
|
- On `invoice_taxes` and `credit_note_taxes`, use `financial_eligible: true` and `reverse_charge: false`, sum `tax_converted` by `rate`, then subtract eligible credit-note tax. This measures tax charged by document date, not cash tax collections or tax liability after expenses. `base_converted` provides the corresponding taxable base.
|
|
26
27
|
- Include a sum of `financial_conversion_missing` in every financial query. A positive result means the aggregate is incomplete and must be shown as unavailable, rather than treating omitted conversion values as zero. For limited rankings, check missing conversions across the whole eligible population in a separate query before presenting the ranking. Historical copied foreign amounts without conversion evidence are not treated as valid 1:1 conversions.
|
|
27
28
|
- Group invoice sales by `customer_key` and `customer_display_name` to keep linked customers stable across name changes; unlinked snapshots use a normalized-name fallback.
|
|
@@ -22,6 +22,7 @@ Send an array of 1-25 queries. Queries share one read-only database snapshot and
|
|
|
22
22
|
- Sum `financial_gross_converted` for gross invoice-date sales in the entity currency; subtract the equivalent eligible credit-note sum for net sales after credits. This is tax-inclusive sales, not service-period revenue recognition. Invoice `total_due_converted` reports invoice-only outstanding balances.
|
|
23
23
|
- Sum `collection_amount_converted` for direct invoice cash receipts or positive credit-note refund magnitudes, capped per document. Applied credits and advance allocations are excluded. Include `collection_conversion_missing` to detect unusable cash conversions as well as missing document conversion. Subtract refunds from invoice collections, and eligible credits from invoiced gross; bound collected cash to zero through net invoiced gross before calculating the rate. A nonpositive denominator has a zero rate.
|
|
24
24
|
- Payment charts use `active_invoice_cash_receipt: true` and `cash_amount_converted`. These are receipts on active invoices, excluding supplier payments, refunds and noncash allocations.
|
|
25
|
+
- Sum `expense_cash_amount_converted` with `expense_cash_payment: true` for cash paid to suppliers in the entity currency, and include `expense_cash_conversion_missing` the same way as the receipt counter.
|
|
25
26
|
- On `invoice_taxes` and `credit_note_taxes`, use `financial_eligible: true` and `reverse_charge: false`, sum `tax_converted` by `rate`, then subtract eligible credit-note tax. This measures tax charged by document date, not cash tax collections or tax liability after expenses. `base_converted` provides the corresponding taxable base.
|
|
26
27
|
- Include a sum of `financial_conversion_missing` in every financial query. A positive result means the aggregate is incomplete and must be shown as unavailable, rather than treating omitted conversion values as zero. For limited rankings, check missing conversions across the whole eligible population in a separate query before presenting the ranking. Historical copied foreign amounts without conversion evidence are not treated as valid 1:1 conversions.
|
|
27
28
|
- Group invoice sales by `customer_key` and `customer_display_name` to keep linked customers stable across name changes; unlinked snapshots use a normalized-name fallback.
|
|
@@ -12,7 +12,7 @@ export type GetActivities200DataItem = {
|
|
|
12
12
|
id: string;
|
|
13
13
|
/** Entity that owns this activity */
|
|
14
14
|
entity_id: string;
|
|
15
|
-
/** Type of resource (e.g.,
|
|
15
|
+
/** Type of resource (e.g., invoice, customer, payment) */
|
|
16
16
|
resource_type: string;
|
|
17
17
|
/** ID of the resource */
|
|
18
18
|
resource_id: string;
|
|
@@ -12,7 +12,7 @@ export type GetActivities200DataItem = {
|
|
|
12
12
|
id: string;
|
|
13
13
|
/** Entity that owns this activity */
|
|
14
14
|
entity_id: string;
|
|
15
|
-
/** Type of resource (e.g.,
|
|
15
|
+
/** Type of resource (e.g., invoice, customer, payment) */
|
|
16
16
|
resource_type: string;
|
|
17
17
|
/** ID of the resource */
|
|
18
18
|
resource_id: string;
|
|
@@ -57,7 +57,7 @@ export type GetActivitiesParams = {
|
|
|
57
57
|
*/
|
|
58
58
|
query?: string;
|
|
59
59
|
/**
|
|
60
|
-
* Filter by resource type (e.g.,
|
|
60
|
+
* Filter by resource type (e.g., invoice, customer, payment). During the transition to the current naming, legacy historical values (e.g. Invoice, Payment) are also accepted and return the same results as the current value.
|
|
61
61
|
*/
|
|
62
62
|
resource_type?: string;
|
|
63
63
|
/**
|
|
@@ -65,7 +65,7 @@ export type GetActivitiesParams = {
|
|
|
65
65
|
*/
|
|
66
66
|
resource_id?: string;
|
|
67
67
|
/**
|
|
68
|
-
* Include
|
|
68
|
+
* Include payment activities linked to resource_id within the current entity. Other filters still apply. Defaults to false; has no effect without resource_id.
|
|
69
69
|
*/
|
|
70
70
|
include_related_payments?: boolean;
|
|
71
71
|
/**
|
|
@@ -57,7 +57,7 @@ export type GetActivitiesParams = {
|
|
|
57
57
|
*/
|
|
58
58
|
query?: string;
|
|
59
59
|
/**
|
|
60
|
-
* Filter by resource type (e.g.,
|
|
60
|
+
* Filter by resource type (e.g., invoice, customer, payment). During the transition to the current naming, legacy historical values (e.g. Invoice, Payment) are also accepted and return the same results as the current value.
|
|
61
61
|
*/
|
|
62
62
|
resource_type?: string;
|
|
63
63
|
/**
|
|
@@ -65,7 +65,7 @@ export type GetActivitiesParams = {
|
|
|
65
65
|
*/
|
|
66
66
|
resource_id?: string;
|
|
67
67
|
/**
|
|
68
|
-
* Include
|
|
68
|
+
* Include payment activities linked to resource_id within the current entity. Other filters still apply. Defaults to false; has no effect without resource_id.
|
|
69
69
|
*/
|
|
70
70
|
include_related_payments?: boolean;
|
|
71
71
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
/**
|
|
10
|
-
* Retrieve a paginated list of activities for the entity. Supports filtering by resource_type, resource_id, and action. Set include_related_payments=true with resource_id to include historical
|
|
10
|
+
* Retrieve a paginated list of activities for the entity. Supports filtering by resource_type, resource_id, and action. Set include_related_payments=true with resource_id to include historical payment events linked through invoice_id, credit_note_id, or advance_invoice_id. Other filters still apply. Omitted, null, or false retains exact resource filtering; without resource_id the flag has no effect. Activities are ordered by ID descending by default.
|
|
11
11
|
* @summary List activities
|
|
12
12
|
*/
|
|
13
13
|
export declare const getActivitiesQueryLimitDefault = 10;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
/**
|
|
10
|
-
* Retrieve a paginated list of activities for the entity. Supports filtering by resource_type, resource_id, and action. Set include_related_payments=true with resource_id to include historical
|
|
10
|
+
* Retrieve a paginated list of activities for the entity. Supports filtering by resource_type, resource_id, and action. Set include_related_payments=true with resource_id to include historical payment events linked through invoice_id, credit_note_id, or advance_invoice_id. Other filters still apply. Omitted, null, or false retains exact resource filtering; without resource_id the flag has no effect. Activities are ordered by ID descending by default.
|
|
11
11
|
* @summary List activities
|
|
12
12
|
*/
|
|
13
13
|
export declare const getActivitiesQueryLimitDefault = 10;
|
|
@@ -22,6 +22,7 @@ Send an array of 1-25 queries. Queries share one read-only database snapshot and
|
|
|
22
22
|
- Sum `financial_gross_converted` for gross invoice-date sales in the entity currency; subtract the equivalent eligible credit-note sum for net sales after credits. This is tax-inclusive sales, not service-period revenue recognition. Invoice `total_due_converted` reports invoice-only outstanding balances.
|
|
23
23
|
- Sum `collection_amount_converted` for direct invoice cash receipts or positive credit-note refund magnitudes, capped per document. Applied credits and advance allocations are excluded. Include `collection_conversion_missing` to detect unusable cash conversions as well as missing document conversion. Subtract refunds from invoice collections, and eligible credits from invoiced gross; bound collected cash to zero through net invoiced gross before calculating the rate. A nonpositive denominator has a zero rate.
|
|
24
24
|
- Payment charts use `active_invoice_cash_receipt: true` and `cash_amount_converted`. These are receipts on active invoices, excluding supplier payments, refunds and noncash allocations.
|
|
25
|
+
- Sum `expense_cash_amount_converted` with `expense_cash_payment: true` for cash paid to suppliers in the entity currency, and include `expense_cash_conversion_missing` the same way as the receipt counter.
|
|
25
26
|
- On `invoice_taxes` and `credit_note_taxes`, use `financial_eligible: true` and `reverse_charge: false`, sum `tax_converted` by `rate`, then subtract eligible credit-note tax. This measures tax charged by document date, not cash tax collections or tax liability after expenses. `base_converted` provides the corresponding taxable base.
|
|
26
27
|
- Include a sum of `financial_conversion_missing` in every financial query. A positive result means the aggregate is incomplete and must be shown as unavailable, rather than treating omitted conversion values as zero. For limited rankings, check missing conversions across the whole eligible population in a separate query before presenting the ranking. Historical copied foreign amounts without conversion evidence are not treated as valid 1:1 conversions.
|
|
27
28
|
- Group invoice sales by `customer_key` and `customer_display_name` to keep linked customers stable across name changes; unlinked snapshots use a normalized-name fallback.
|
|
@@ -22,6 +22,7 @@ Send an array of 1-25 queries. Queries share one read-only database snapshot and
|
|
|
22
22
|
- Sum `financial_gross_converted` for gross invoice-date sales in the entity currency; subtract the equivalent eligible credit-note sum for net sales after credits. This is tax-inclusive sales, not service-period revenue recognition. Invoice `total_due_converted` reports invoice-only outstanding balances.
|
|
23
23
|
- Sum `collection_amount_converted` for direct invoice cash receipts or positive credit-note refund magnitudes, capped per document. Applied credits and advance allocations are excluded. Include `collection_conversion_missing` to detect unusable cash conversions as well as missing document conversion. Subtract refunds from invoice collections, and eligible credits from invoiced gross; bound collected cash to zero through net invoiced gross before calculating the rate. A nonpositive denominator has a zero rate.
|
|
24
24
|
- Payment charts use `active_invoice_cash_receipt: true` and `cash_amount_converted`. These are receipts on active invoices, excluding supplier payments, refunds and noncash allocations.
|
|
25
|
+
- Sum `expense_cash_amount_converted` with `expense_cash_payment: true` for cash paid to suppliers in the entity currency, and include `expense_cash_conversion_missing` the same way as the receipt counter.
|
|
25
26
|
- On `invoice_taxes` and `credit_note_taxes`, use `financial_eligible: true` and `reverse_charge: false`, sum `tax_converted` by `rate`, then subtract eligible credit-note tax. This measures tax charged by document date, not cash tax collections or tax liability after expenses. `base_converted` provides the corresponding taxable base.
|
|
26
27
|
- Include a sum of `financial_conversion_missing` in every financial query. A positive result means the aggregate is incomplete and must be shown as unavailable, rather than treating omitted conversion values as zero. For limited rankings, check missing conversions across the whole eligible population in a separate query before presenting the ranking. Historical copied foreign amounts without conversion evidence are not treated as valid 1:1 conversions.
|
|
27
28
|
- Group invoice sales by `customer_key` and `customer_display_name` to keep linked customers stable across name changes; unlinked snapshots use a normalized-name fallback.
|