lago-javascript-client 1.54.0 → 1.55.0
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/esm/openapi/client.d.ts +124 -82
- package/esm/openapi/client.js +8 -8
- package/esm/openapi/webhooks.d.ts +132 -86
- package/package.json +1 -1
- package/script/openapi/client.d.ts +124 -82
- package/script/openapi/client.js +8 -8
- package/script/openapi/webhooks.d.ts +132 -86
|
@@ -264,7 +264,13 @@ export interface paths {
|
|
|
264
264
|
};
|
|
265
265
|
/**
|
|
266
266
|
* List MRR
|
|
267
|
-
* @description This
|
|
267
|
+
* @description Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle:
|
|
268
|
+
*
|
|
269
|
+
* - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued.
|
|
270
|
+
* - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing).
|
|
271
|
+
* - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).
|
|
272
|
+
* - Revenue from `semiannual` subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).
|
|
273
|
+
* - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.
|
|
268
274
|
*/
|
|
269
275
|
get: operations["findAllMrrs"];
|
|
270
276
|
put?: never;
|
|
@@ -485,8 +491,8 @@ export interface paths {
|
|
|
485
491
|
put?: never;
|
|
486
492
|
post?: never;
|
|
487
493
|
/**
|
|
488
|
-
* Delete a privilege
|
|
489
|
-
* @description
|
|
494
|
+
* Delete a privilege
|
|
495
|
+
* @description This endpoint deletes a privilege from a feature. Deleting a privilege removes it from all plans and subscriptions.
|
|
490
496
|
*/
|
|
491
497
|
delete: operations["deleteFeaturePrivilege"];
|
|
492
498
|
options?: never;
|
|
@@ -2094,7 +2100,7 @@ export interface paths {
|
|
|
2094
2100
|
head?: never;
|
|
2095
2101
|
/**
|
|
2096
2102
|
* Partial update of an entitlement
|
|
2097
|
-
* @description This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features
|
|
2103
|
+
* @description This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.
|
|
2098
2104
|
*/
|
|
2099
2105
|
patch: operations["updateEntitlement"];
|
|
2100
2106
|
trace?: never;
|
|
@@ -2731,7 +2737,7 @@ export interface paths {
|
|
|
2731
2737
|
head?: never;
|
|
2732
2738
|
/**
|
|
2733
2739
|
* Update subscription entitlements
|
|
2734
|
-
* @description This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features
|
|
2740
|
+
* @description This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.
|
|
2735
2741
|
*/
|
|
2736
2742
|
patch: operations["updateSubscriptionEntitlements"];
|
|
2737
2743
|
trace?: never;
|
|
@@ -2753,7 +2759,7 @@ export interface paths {
|
|
|
2753
2759
|
post?: never;
|
|
2754
2760
|
/**
|
|
2755
2761
|
* Remove an entitlement from a subscription
|
|
2756
|
-
* @description This endpoint removes a specific feature entitlement from a subscription. The entitlement remains available from the plan.
|
|
2762
|
+
* @description This endpoint removes a specific feature entitlement from a subscription. The entitlement remains available from the plan. It returns the full list of entitlements remaining on the subscription.
|
|
2757
2763
|
*/
|
|
2758
2764
|
delete: operations["destroySubscriptionEntitlement"];
|
|
2759
2765
|
options?: never;
|
|
@@ -2780,7 +2786,7 @@ export interface paths {
|
|
|
2780
2786
|
post?: never;
|
|
2781
2787
|
/**
|
|
2782
2788
|
* Remove a privilege from a subscription entitlement override
|
|
2783
|
-
* @description This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan.
|
|
2789
|
+
* @description This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan. It returns the full list of entitlements remaining on the subscription.
|
|
2784
2790
|
*/
|
|
2785
2791
|
delete: operations["destroySubscriptionEntitlementPrivilege"];
|
|
2786
2792
|
options?: never;
|
|
@@ -4408,8 +4414,8 @@ export interface webhooks {
|
|
|
4408
4414
|
get?: never;
|
|
4409
4415
|
put?: never;
|
|
4410
4416
|
/**
|
|
4411
|
-
*
|
|
4412
|
-
* @description
|
|
4417
|
+
* A new payment request has been created
|
|
4418
|
+
* @description A new payment request has been created
|
|
4413
4419
|
*/
|
|
4414
4420
|
post: operations["paymentRequestCreated"];
|
|
4415
4421
|
delete?: never;
|
|
@@ -4448,8 +4454,8 @@ export interface webhooks {
|
|
|
4448
4454
|
get?: never;
|
|
4449
4455
|
put?: never;
|
|
4450
4456
|
/**
|
|
4451
|
-
* The payment status of
|
|
4452
|
-
* @description The payment status of
|
|
4457
|
+
* The payment status of a payment request has been updated
|
|
4458
|
+
* @description The payment status of a payment request has been updated
|
|
4453
4459
|
*/
|
|
4454
4460
|
post: operations["paymentRequestPaymentStatusUpdated"];
|
|
4455
4461
|
delete?: never;
|
|
@@ -5541,8 +5547,8 @@ export interface components {
|
|
|
5541
5547
|
*/
|
|
5542
5548
|
user_email?: string | null;
|
|
5543
5549
|
/**
|
|
5544
|
-
* @description This field stores the
|
|
5545
|
-
* @example
|
|
5550
|
+
* @description This field stores the activity action that was performed on the activity_object.
|
|
5551
|
+
* @example billable_metric.created
|
|
5546
5552
|
*/
|
|
5547
5553
|
activity_type: string;
|
|
5548
5554
|
/**
|
|
@@ -5591,12 +5597,6 @@ export interface components {
|
|
|
5591
5597
|
* @example BillableMetric
|
|
5592
5598
|
*/
|
|
5593
5599
|
resource_type: string;
|
|
5594
|
-
/**
|
|
5595
|
-
* Format: uuid
|
|
5596
|
-
* @description Unique identifier for the organization associated with the activity log.
|
|
5597
|
-
* @example 1a901a90-1a90-1a90-1a90-1a901a901a90
|
|
5598
|
-
*/
|
|
5599
|
-
organization_id: string;
|
|
5600
5600
|
/**
|
|
5601
5601
|
* Format: date-time
|
|
5602
5602
|
* @description The logged date of the activity, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
|
|
@@ -5765,10 +5765,14 @@ export interface components {
|
|
|
5765
5765
|
*/
|
|
5766
5766
|
logged_at: string;
|
|
5767
5767
|
/**
|
|
5768
|
-
*
|
|
5769
|
-
* @example {
|
|
5768
|
+
* @description The parameters of the request, keyed by their top-level name. Nested values are returned JSON-encoded.
|
|
5769
|
+
* @example {
|
|
5770
|
+
* "billable_metric": "{\"name\":\"Storage\",\"code\":\"storage\"}"
|
|
5771
|
+
* }
|
|
5770
5772
|
*/
|
|
5771
|
-
request_body:
|
|
5773
|
+
request_body: {
|
|
5774
|
+
[key: string]: unknown;
|
|
5775
|
+
};
|
|
5772
5776
|
/**
|
|
5773
5777
|
* @description This field represents the API origin of the requested URL
|
|
5774
5778
|
* @example https://app.lago.dev/
|
|
@@ -5792,10 +5796,14 @@ export interface components {
|
|
|
5792
5796
|
*/
|
|
5793
5797
|
request_id: string;
|
|
5794
5798
|
/**
|
|
5795
|
-
*
|
|
5796
|
-
* @example {
|
|
5799
|
+
* @description The body Lago returned for the request, keyed by its top-level name. Nested values are returned JSON-encoded. Null when the response had no body.
|
|
5800
|
+
* @example {
|
|
5801
|
+
* "billable_metric": "{\"lago_id\":\"b9155544-e261-4e92-b54e-f65d7609294c\"}"
|
|
5802
|
+
* }
|
|
5797
5803
|
*/
|
|
5798
|
-
request_response?:
|
|
5804
|
+
request_response?: {
|
|
5805
|
+
[key: string]: unknown;
|
|
5806
|
+
} | null;
|
|
5799
5807
|
};
|
|
5800
5808
|
ApiLogsPaginated: {
|
|
5801
5809
|
api_logs: components["schemas"]["ApiLogObject"][];
|
|
@@ -6291,10 +6299,10 @@ export interface components {
|
|
|
6291
6299
|
*/
|
|
6292
6300
|
created_at: string;
|
|
6293
6301
|
/**
|
|
6294
|
-
* @description Expression used to calculate the event units. The expression is
|
|
6302
|
+
* @description Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.
|
|
6295
6303
|
* @example round((ended_at - started_at) * units)
|
|
6296
6304
|
*/
|
|
6297
|
-
expression?: string;
|
|
6305
|
+
expression?: string | null;
|
|
6298
6306
|
/**
|
|
6299
6307
|
* @description Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.
|
|
6300
6308
|
* @example gb
|
|
@@ -6354,8 +6362,8 @@ export interface components {
|
|
|
6354
6362
|
*/
|
|
6355
6363
|
recurring?: boolean;
|
|
6356
6364
|
/**
|
|
6357
|
-
* @description Expression used to calculate the event units. The expression is
|
|
6358
|
-
* Accepted
|
|
6365
|
+
* @description Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.
|
|
6366
|
+
* Accepted functions are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
|
|
6359
6367
|
* Round is accepting an optional second parameter to specify the number of decimal.
|
|
6360
6368
|
* @example round((ended_at - started_at) * units)
|
|
6361
6369
|
*/
|
|
@@ -6398,8 +6406,8 @@ export interface components {
|
|
|
6398
6406
|
};
|
|
6399
6407
|
BillableMetricEvaluateExpressionInput: {
|
|
6400
6408
|
/**
|
|
6401
|
-
* @description Expression used to calculate the event units. The expression is
|
|
6402
|
-
* Accepted
|
|
6409
|
+
* @description Expression used to calculate the event units. The expression is evaluated for each event and the result is then used to calculate the total aggregated units.
|
|
6410
|
+
* Accepted functions are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
|
|
6403
6411
|
* Round is accepting an optional second parameter to specify the number of decimal.
|
|
6404
6412
|
* @example round((ended_at - started_at) * units)
|
|
6405
6413
|
*/
|
|
@@ -10735,12 +10743,12 @@ export interface components {
|
|
|
10735
10743
|
code: string;
|
|
10736
10744
|
/**
|
|
10737
10745
|
* Format: date-time
|
|
10738
|
-
* @description
|
|
10746
|
+
* @description The date and time at which the event occurred, in ISO 8601 format with millisecond precision and expressed in Coordinated Universal Time (UTC). When no timestamp is sent on the event, it is set to the time of event reception.
|
|
10739
10747
|
* @example 2022-04-29T08:59:51.123Z
|
|
10740
10748
|
*/
|
|
10741
10749
|
timestamp: string;
|
|
10742
10750
|
/**
|
|
10743
|
-
* @description The precise total amount that was sent in the event payload. This
|
|
10751
|
+
* @description The precise total amount that was sent in the event payload. This field is used by the `dynamic` pricing model.
|
|
10744
10752
|
* @example 1234.56
|
|
10745
10753
|
*/
|
|
10746
10754
|
precise_total_amount_cents?: string | null;
|
|
@@ -10766,7 +10774,7 @@ export interface components {
|
|
|
10766
10774
|
*/
|
|
10767
10775
|
lago_subscription_id: string | null;
|
|
10768
10776
|
/**
|
|
10769
|
-
* @description The unique identifier of the subscription within your application
|
|
10777
|
+
* @description The unique identifier of the subscription within your application, as sent on the event. It is the value Lago uses to attach the event to a subscription.
|
|
10770
10778
|
* @example sub_1234567890
|
|
10771
10779
|
*/
|
|
10772
10780
|
external_subscription_id: string;
|
|
@@ -10805,7 +10813,7 @@ export interface components {
|
|
|
10805
10813
|
/**
|
|
10806
10814
|
* @description This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).
|
|
10807
10815
|
* If this timestamp is not provided, the API will automatically set it to the time of event reception.
|
|
10808
|
-
* You can also provide
|
|
10816
|
+
* You can also provide milliseconds precision by appending decimals to the timestamp.
|
|
10809
10817
|
* @example 1651240791.123
|
|
10810
10818
|
*/
|
|
10811
10819
|
timestamp?: number | string;
|
|
@@ -10870,6 +10878,11 @@ export interface components {
|
|
|
10870
10878
|
* @example sub_1234567890
|
|
10871
10879
|
*/
|
|
10872
10880
|
external_subscription_id: string;
|
|
10881
|
+
/**
|
|
10882
|
+
* @description The precise total amount in cents with precision used by the `dynamic` pricing model to compute the estimated usage amount. Defaults to `0` when omitted.
|
|
10883
|
+
* @example 1234.56
|
|
10884
|
+
*/
|
|
10885
|
+
precise_total_amount_cents?: string | null;
|
|
10873
10886
|
/** @description This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. Any property of the targeted billable metric can be sent here, in addition to the documented fields below. */
|
|
10874
10887
|
properties?: {
|
|
10875
10888
|
/**
|
|
@@ -12678,7 +12691,7 @@ export interface components {
|
|
|
12678
12691
|
* @description Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.
|
|
12679
12692
|
* @example Minimum Commitment (C1)
|
|
12680
12693
|
*/
|
|
12681
|
-
invoice_display_name?: string;
|
|
12694
|
+
invoice_display_name?: string | null;
|
|
12682
12695
|
/**
|
|
12683
12696
|
* @description The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `semiannual`, `quarterly`, `monthly` or `weekly`.
|
|
12684
12697
|
* @example monthly
|
|
@@ -13077,7 +13090,7 @@ export interface components {
|
|
|
13077
13090
|
* @description Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
|
|
13078
13091
|
* @example Setup fee
|
|
13079
13092
|
*/
|
|
13080
|
-
invoice_display_name: string;
|
|
13093
|
+
invoice_display_name: string | null;
|
|
13081
13094
|
/**
|
|
13082
13095
|
* @description Unique code used to identify the add-on.
|
|
13083
13096
|
* @example setup_fee
|
|
@@ -13132,6 +13145,23 @@ export interface components {
|
|
|
13132
13145
|
/** @description List of taxes applied to the fixed charge. */
|
|
13133
13146
|
taxes?: components["schemas"]["TaxObject"][];
|
|
13134
13147
|
};
|
|
13148
|
+
ApplicableUsageThreshold: {
|
|
13149
|
+
/**
|
|
13150
|
+
* @description The display name of the usage threshold.
|
|
13151
|
+
* @example Threshold 1
|
|
13152
|
+
*/
|
|
13153
|
+
threshold_display_name: string | null;
|
|
13154
|
+
/**
|
|
13155
|
+
* @description The amount to reach to trigger a `progressive_billing` invoice.
|
|
13156
|
+
* @example 10000
|
|
13157
|
+
*/
|
|
13158
|
+
amount_cents: number;
|
|
13159
|
+
/**
|
|
13160
|
+
* @description This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.
|
|
13161
|
+
* @example true
|
|
13162
|
+
*/
|
|
13163
|
+
recurring: boolean;
|
|
13164
|
+
};
|
|
13135
13165
|
PlanEntitlementPrivilegeObject: components["schemas"]["FeaturePrivilegeObject"] & {
|
|
13136
13166
|
/**
|
|
13137
13167
|
* @description Value assigned to this privilege in the entitlement. Type depends on the privilege's value_type.
|
|
@@ -13214,7 +13244,7 @@ export interface components {
|
|
|
13214
13244
|
* @description Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
|
|
13215
13245
|
* @example Startup plan
|
|
13216
13246
|
*/
|
|
13217
|
-
invoice_display_name?: string;
|
|
13247
|
+
invoice_display_name?: string | null;
|
|
13218
13248
|
/**
|
|
13219
13249
|
* Format: date-time
|
|
13220
13250
|
* @description The date and time when the plan was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the plan was initially created.
|
|
@@ -13234,9 +13264,9 @@ export interface components {
|
|
|
13234
13264
|
interval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
|
|
13235
13265
|
/**
|
|
13236
13266
|
* @description The description on the plan.
|
|
13237
|
-
* @example
|
|
13267
|
+
* @example Plan for early stage startups.
|
|
13238
13268
|
*/
|
|
13239
|
-
description?: string;
|
|
13269
|
+
description?: string | null;
|
|
13240
13270
|
/**
|
|
13241
13271
|
* @description The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
|
|
13242
13272
|
* @example 10000
|
|
@@ -13251,7 +13281,7 @@ export interface components {
|
|
|
13251
13281
|
* @description The duration in days during which the base cost of the plan is offered for free.
|
|
13252
13282
|
* @example 5
|
|
13253
13283
|
*/
|
|
13254
|
-
trial_period?: number;
|
|
13284
|
+
trial_period?: number | null;
|
|
13255
13285
|
/**
|
|
13256
13286
|
* @description This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
|
|
13257
13287
|
* @example true
|
|
@@ -13267,6 +13297,17 @@ export interface components {
|
|
|
13267
13297
|
* @example null
|
|
13268
13298
|
*/
|
|
13269
13299
|
bill_fixed_charges_monthly?: boolean | null;
|
|
13300
|
+
/**
|
|
13301
|
+
* Format: uuid
|
|
13302
|
+
* @description Unique identifier of the parent plan, created by Lago. It is set on plans that override a parent plan for a single subscription, and `null` on standard plans.
|
|
13303
|
+
* @example null
|
|
13304
|
+
*/
|
|
13305
|
+
parent_id?: string | null;
|
|
13306
|
+
/**
|
|
13307
|
+
* @description This field is set to `true` when the plan is scheduled for deletion but still attached to subscriptions that have to be billed first.
|
|
13308
|
+
* @example false
|
|
13309
|
+
*/
|
|
13310
|
+
pending_deletion?: boolean;
|
|
13270
13311
|
minimum_commitment?: components["schemas"]["MinimumCommitmentObject"];
|
|
13271
13312
|
/**
|
|
13272
13313
|
* @description Additional usage-based charges for this plan.
|
|
@@ -13519,6 +13560,8 @@ export interface components {
|
|
|
13519
13560
|
taxes?: components["schemas"]["TaxObject"][];
|
|
13520
13561
|
/** @description List of usage thresholds applied to the plan. */
|
|
13521
13562
|
usage_thresholds?: components["schemas"]["UsageThresholdObject"][];
|
|
13563
|
+
/** @description List of usage thresholds that actually apply to the plan. For an overriding plan these are inherited from its parent plan; for a standard plan they match `usage_thresholds`. */
|
|
13564
|
+
applicable_usage_thresholds?: components["schemas"]["ApplicableUsageThreshold"][];
|
|
13522
13565
|
/** @description List of all feature entitlements and their privileges available for this plan. */
|
|
13523
13566
|
entitlements?: components["schemas"]["PlanEntitlement"][];
|
|
13524
13567
|
metadata?: components["schemas"]["MetadataObject"];
|
|
@@ -13831,6 +13874,7 @@ export interface components {
|
|
|
13831
13874
|
* "amount": "500"
|
|
13832
13875
|
* },
|
|
13833
13876
|
* "units": 1,
|
|
13877
|
+
* "apply_units_immediately": false,
|
|
13834
13878
|
* "tax_codes": [
|
|
13835
13879
|
* "french_standard_vat"
|
|
13836
13880
|
* ]
|
|
@@ -13933,6 +13977,12 @@ export interface components {
|
|
|
13933
13977
|
properties?: components["schemas"]["FixedChargeProperties"];
|
|
13934
13978
|
/** @description List of taxes applied to the fixed charge. */
|
|
13935
13979
|
tax_codes?: components["schemas"]["TaxCodes"];
|
|
13980
|
+
/**
|
|
13981
|
+
* @description When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period.
|
|
13982
|
+
* @default false
|
|
13983
|
+
* @example false
|
|
13984
|
+
*/
|
|
13985
|
+
apply_units_immediately: boolean;
|
|
13936
13986
|
}[];
|
|
13937
13987
|
/** @description List of usage thresholds to apply to the plan. */
|
|
13938
13988
|
usage_thresholds?: components["schemas"]["UsageThresholdInput"][];
|
|
@@ -15077,23 +15127,6 @@ export interface components {
|
|
|
15077
15127
|
activation_rules?: components["schemas"]["SubscriptionActivationRuleInput"][];
|
|
15078
15128
|
};
|
|
15079
15129
|
};
|
|
15080
|
-
ApplicableUsageThreshold: {
|
|
15081
|
-
/**
|
|
15082
|
-
* @description The display name of the usage threshold.
|
|
15083
|
-
* @example Threshold 1
|
|
15084
|
-
*/
|
|
15085
|
-
threshold_display_name: string | null;
|
|
15086
|
-
/**
|
|
15087
|
-
* @description The amount to reach to trigger a `progressive_billing` invoice.
|
|
15088
|
-
* @example 10000
|
|
15089
|
-
*/
|
|
15090
|
-
amount_cents: number;
|
|
15091
|
-
/**
|
|
15092
|
-
* @description This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.
|
|
15093
|
-
* @example true
|
|
15094
|
-
*/
|
|
15095
|
-
recurring: boolean;
|
|
15096
|
-
};
|
|
15097
15130
|
SubscriptionObjectExtended: components["schemas"]["SubscriptionObject"] & {
|
|
15098
15131
|
plan?: components["schemas"]["PlanObject"];
|
|
15099
15132
|
/** @description List of usage thresholds applicable to this subscription. */
|
|
@@ -15372,15 +15405,15 @@ export interface components {
|
|
|
15372
15405
|
};
|
|
15373
15406
|
SubscriptionEntitlementPrivilegeObject: components["schemas"]["FeaturePrivilegeObject"] & {
|
|
15374
15407
|
/**
|
|
15375
|
-
* @description Applicable value
|
|
15408
|
+
* @description Applicable value for this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.
|
|
15376
15409
|
* @example 10
|
|
15377
15410
|
*/
|
|
15378
15411
|
value: number | boolean | string;
|
|
15379
15412
|
/**
|
|
15380
|
-
* @description Value assigned to this privilege in the plan. Type depends on the privilege's value_type.
|
|
15413
|
+
* @description Value assigned to this privilege in the plan. Type depends on the privilege's value_type. Null when the privilege only exists as a subscription override.
|
|
15381
15414
|
* @example 10
|
|
15382
15415
|
*/
|
|
15383
|
-
plan_value: number | boolean | string;
|
|
15416
|
+
plan_value: number | boolean | string | null;
|
|
15384
15417
|
/**
|
|
15385
15418
|
* @description Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.
|
|
15386
15419
|
* @example 10
|
|
@@ -15463,9 +15496,6 @@ export interface components {
|
|
|
15463
15496
|
SubscriptionEntitlements: {
|
|
15464
15497
|
entitlements: components["schemas"]["SubscriptionEntitlementObject"][];
|
|
15465
15498
|
};
|
|
15466
|
-
SubscriptionEntitlement: {
|
|
15467
|
-
entitlement: components["schemas"]["SubscriptionEntitlementObject"];
|
|
15468
|
-
};
|
|
15469
15499
|
SubscriptionChargeOverride: {
|
|
15470
15500
|
charge: components["schemas"]["ChargeOverridableInput"];
|
|
15471
15501
|
};
|
|
@@ -15846,7 +15876,7 @@ export interface components {
|
|
|
15846
15876
|
WebhookEndpointObject: {
|
|
15847
15877
|
/**
|
|
15848
15878
|
* Format: uuid
|
|
15849
|
-
* @description Unique identifier assigned to the
|
|
15879
|
+
* @description Unique identifier assigned to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.
|
|
15850
15880
|
* @example 1a901a90-1a90-1a90-1a90-1a901a901a90
|
|
15851
15881
|
*/
|
|
15852
15882
|
lago_id: string;
|
|
@@ -15899,11 +15929,12 @@ export interface components {
|
|
|
15899
15929
|
*/
|
|
15900
15930
|
webhook_url: string;
|
|
15901
15931
|
/**
|
|
15902
|
-
* @description The
|
|
15932
|
+
* @description The algorithm used to sign the webhook payload. Defaults to `jwt` when no value is passed.
|
|
15933
|
+
* @default jwt
|
|
15903
15934
|
* @example hmac
|
|
15904
15935
|
* @enum {string|null}
|
|
15905
15936
|
*/
|
|
15906
|
-
signature_algo
|
|
15937
|
+
signature_algo: "jwt" | "hmac" | null;
|
|
15907
15938
|
/**
|
|
15908
15939
|
* @description The name of the webhook.
|
|
15909
15940
|
* @example EC2-production
|
|
@@ -15928,9 +15959,9 @@ export interface components {
|
|
|
15928
15959
|
* @description The URL of the webhook endpoint.
|
|
15929
15960
|
* @example https://foo.bar
|
|
15930
15961
|
*/
|
|
15931
|
-
webhook_url
|
|
15962
|
+
webhook_url?: string;
|
|
15932
15963
|
/**
|
|
15933
|
-
* @description The
|
|
15964
|
+
* @description The algorithm used to sign the webhook payload. When the field is omitted, the current value is kept.
|
|
15934
15965
|
* @example hmac
|
|
15935
15966
|
* @enum {string|null}
|
|
15936
15967
|
*/
|
|
@@ -16452,6 +16483,9 @@ export interface components {
|
|
|
16452
16483
|
[key: string]: unknown;
|
|
16453
16484
|
};
|
|
16454
16485
|
};
|
|
16486
|
+
SubscriptionEntitlement: {
|
|
16487
|
+
entitlement: components["schemas"]["SubscriptionEntitlementObject"];
|
|
16488
|
+
};
|
|
16455
16489
|
};
|
|
16456
16490
|
responses: {
|
|
16457
16491
|
/** @description Unauthorized error */
|
|
@@ -16518,6 +16552,8 @@ export interface components {
|
|
|
16518
16552
|
external_customer_id: string;
|
|
16519
16553
|
/** @description External subscription ID */
|
|
16520
16554
|
external_subscription_id: string;
|
|
16555
|
+
/** @description Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. */
|
|
16556
|
+
billing_entity_code: string;
|
|
16521
16557
|
/** @description Show data only for given number of months. */
|
|
16522
16558
|
months: number;
|
|
16523
16559
|
/** @description Filter by the invoice purchase order number. The match is exact but case-insensitive. */
|
|
@@ -16913,8 +16949,10 @@ export interface operations {
|
|
|
16913
16949
|
"http_statuses[]"?: (("succeeded" | "failed") | number)[];
|
|
16914
16950
|
/** @description Filter results by API version */
|
|
16915
16951
|
api_version?: string;
|
|
16916
|
-
/** @description Filter results by the path of the request */
|
|
16917
|
-
request_paths?: string;
|
|
16952
|
+
/** @description Filter results by the path of the request. A value containing `*` is matched as a wildcard, otherwise the path must match exactly. */
|
|
16953
|
+
"request_paths[]"?: string[];
|
|
16954
|
+
/** @description Filter results by the client that issued the request, as reported by its user agent. */
|
|
16955
|
+
"clients[]"?: string[];
|
|
16918
16956
|
};
|
|
16919
16957
|
header?: never;
|
|
16920
16958
|
path?: never;
|
|
@@ -16966,6 +17004,8 @@ export interface operations {
|
|
|
16966
17004
|
currency?: components["schemas"]["Currency"] & unknown;
|
|
16967
17005
|
/** @description The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. */
|
|
16968
17006
|
external_customer_id?: string;
|
|
17007
|
+
/** @description Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. */
|
|
17008
|
+
billing_entity_code?: components["parameters"]["billing_entity_code"];
|
|
16969
17009
|
/** @description Show data only for given number of months. */
|
|
16970
17010
|
months?: components["parameters"]["months"];
|
|
16971
17011
|
};
|
|
@@ -16993,6 +17033,8 @@ export interface operations {
|
|
|
16993
17033
|
query?: {
|
|
16994
17034
|
/** @description The currency of revenue analytics. Format must be ISO 4217. */
|
|
16995
17035
|
currency?: components["schemas"]["Currency"] & unknown;
|
|
17036
|
+
/** @description Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. */
|
|
17037
|
+
billing_entity_code?: components["parameters"]["billing_entity_code"];
|
|
16996
17038
|
/** @description Show data only for given number of months. */
|
|
16997
17039
|
months?: components["parameters"]["months"];
|
|
16998
17040
|
};
|
|
@@ -17019,6 +17061,8 @@ export interface operations {
|
|
|
17019
17061
|
query?: {
|
|
17020
17062
|
/** @description The currency of invoiced usage analytics. Format must be ISO 4217. */
|
|
17021
17063
|
currency?: components["schemas"]["Currency"] & unknown;
|
|
17064
|
+
/** @description Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. */
|
|
17065
|
+
billing_entity_code?: components["parameters"]["billing_entity_code"];
|
|
17022
17066
|
/** @description Show data only for given number of months. */
|
|
17023
17067
|
months?: components["parameters"]["months"];
|
|
17024
17068
|
};
|
|
@@ -17043,16 +17087,10 @@ export interface operations {
|
|
|
17043
17087
|
findAllMrrs: {
|
|
17044
17088
|
parameters: {
|
|
17045
17089
|
query?: {
|
|
17046
|
-
/**
|
|
17047
|
-
* @description Quantifies the revenue generated from `subscription` fees on a monthly basis. This figure is calculated post-application of applicable taxes and deduction of any applicable discounts. The method of calculation varies based on the subscription billing cycle:
|
|
17048
|
-
*
|
|
17049
|
-
* - Revenue from `monthly` subscription invoices is included in the MRR for the month in which the invoice is issued.
|
|
17050
|
-
* - Revenue from `quarterly` subscription invoices is distributed evenly over three months. This distribution applies to fees paid in advance (allocated to the next remaining months depending on calendar or anniversary billing) as well as to fees paid in arrears (allocated to the preceding months depending on calendar or anniversary billing).
|
|
17051
|
-
* - Revenue from `yearly` subscription invoices is distributed evenly over twelve months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).
|
|
17052
|
-
* - Revenue from `semiannual` subscription invoices is distributed evenly over six months. This allocation is applicable for fees paid in advance (spread over the next remaining months depending on calendar or anniversary billing) and for fees paid in arrears (spread over the previous months depending on calendar or anniversary billing).
|
|
17053
|
-
* - Revenue from `weekly` subscription invoices, the total revenue from all invoices issued within a month is summed up. This total is then divided by the number of invoices issued during that month, and the result is multiplied by 4.33, representing the average number of weeks in a month.
|
|
17054
|
-
*/
|
|
17090
|
+
/** @description The currency of MRR analytics. Format must be ISO 4217. */
|
|
17055
17091
|
currency?: components["schemas"]["Currency"] & unknown;
|
|
17092
|
+
/** @description Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. */
|
|
17093
|
+
billing_entity_code?: components["parameters"]["billing_entity_code"];
|
|
17056
17094
|
/** @description Show data only for given number of months. */
|
|
17057
17095
|
months?: components["parameters"]["months"];
|
|
17058
17096
|
};
|
|
@@ -17082,6 +17120,8 @@ export interface operations {
|
|
|
17082
17120
|
currency?: components["schemas"]["Currency"] & unknown;
|
|
17083
17121
|
/** @description The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level. */
|
|
17084
17122
|
external_customer_id?: string;
|
|
17123
|
+
/** @description Restrict the analytics to a single billing entity, identified by its code. An unknown code is ignored and the analytics cover the whole organization. */
|
|
17124
|
+
billing_entity_code?: components["parameters"]["billing_entity_code"];
|
|
17085
17125
|
/** @description Show data only for given number of months. */
|
|
17086
17126
|
months?: components["parameters"]["months"];
|
|
17087
17127
|
};
|
|
@@ -17107,7 +17147,7 @@ export interface operations {
|
|
|
17107
17147
|
findAllUsages: {
|
|
17108
17148
|
parameters: {
|
|
17109
17149
|
query?: {
|
|
17110
|
-
/** @description The time granularity of usage analytics. Possible values are 'daily', 'weekly'
|
|
17150
|
+
/** @description The time granularity of usage analytics. Possible values are 'daily', 'weekly' and 'monthly'. Defaults to 'daily'. */
|
|
17111
17151
|
time_granularity?: "daily" | "weekly" | "monthly";
|
|
17112
17152
|
/** @description The currency of usage analytics. Format must be ISO 4217. */
|
|
17113
17153
|
currency?: components["schemas"]["Currency"] & unknown;
|
|
@@ -19160,7 +19200,7 @@ export interface operations {
|
|
|
19160
19200
|
external_subscription_id?: components["parameters"]["external_subscription_id"];
|
|
19161
19201
|
/** @description Filter events by its code. */
|
|
19162
19202
|
code?: string;
|
|
19163
|
-
/** @description Requires `external_subscription_id` to be set
|
|
19203
|
+
/** @description Requires `external_subscription_id` to be set, and cannot be combined with `timestamp_from`. Filter events by timestamp after the subscription started at datetime. */
|
|
19164
19204
|
timestamp_from_started_at?: boolean;
|
|
19165
19205
|
/** @description Filter events by timestamp starting from a specific date. */
|
|
19166
19206
|
timestamp_from?: string;
|
|
@@ -22052,13 +22092,13 @@ export interface operations {
|
|
|
22052
22092
|
};
|
|
22053
22093
|
requestBody?: never;
|
|
22054
22094
|
responses: {
|
|
22055
|
-
/** @description
|
|
22095
|
+
/** @description Remaining subscription entitlements */
|
|
22056
22096
|
200: {
|
|
22057
22097
|
headers: {
|
|
22058
22098
|
[name: string]: unknown;
|
|
22059
22099
|
};
|
|
22060
22100
|
content: {
|
|
22061
|
-
"application/json": components["schemas"]["
|
|
22101
|
+
"application/json": components["schemas"]["SubscriptionEntitlements"];
|
|
22062
22102
|
};
|
|
22063
22103
|
};
|
|
22064
22104
|
401: components["responses"]["Unauthorized"];
|
|
@@ -22084,13 +22124,13 @@ export interface operations {
|
|
|
22084
22124
|
};
|
|
22085
22125
|
requestBody?: never;
|
|
22086
22126
|
responses: {
|
|
22087
|
-
/** @description
|
|
22127
|
+
/** @description Remaining subscription entitlements */
|
|
22088
22128
|
200: {
|
|
22089
22129
|
headers: {
|
|
22090
22130
|
[name: string]: unknown;
|
|
22091
22131
|
};
|
|
22092
22132
|
content: {
|
|
22093
|
-
"application/json": components["schemas"]["
|
|
22133
|
+
"application/json": components["schemas"]["SubscriptionEntitlements"];
|
|
22094
22134
|
};
|
|
22095
22135
|
};
|
|
22096
22136
|
400: components["responses"]["BadRequest"];
|
|
@@ -24071,6 +24111,12 @@ export interface operations {
|
|
|
24071
24111
|
webhook_type: "credit_note.refund_failure";
|
|
24072
24112
|
/** @enum {string} */
|
|
24073
24113
|
object_type: "credit_note_payment_provider_refund_error";
|
|
24114
|
+
/**
|
|
24115
|
+
* Format: uuid
|
|
24116
|
+
* @description Unique identifier of the organization, created by Lago.
|
|
24117
|
+
* @example 1a901a90-1a90-1a90-1a90-1a901a901a90
|
|
24118
|
+
*/
|
|
24119
|
+
organization_id: string;
|
|
24074
24120
|
credit_note_payment_provider_refund_error: components["schemas"]["CreditNotePaymentProviderRefundError"];
|
|
24075
24121
|
};
|
|
24076
24122
|
};
|