lago-javascript-client 1.49.0 → 1.50.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 +147 -14
- package/esm/openapi/client.js +27 -1
- package/esm/openapi/webhooks.d.ts +299 -14
- package/package.json +1 -1
- package/script/openapi/client.d.ts +147 -14
- package/script/openapi/client.js +27 -1
- package/script/openapi/webhooks.d.ts +299 -14
package/esm/openapi/client.d.ts
CHANGED
|
@@ -361,7 +361,7 @@ export interface TaxObject {
|
|
|
361
361
|
*/
|
|
362
362
|
rate: number;
|
|
363
363
|
/**
|
|
364
|
-
* This field
|
|
364
|
+
* **Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
|
|
365
365
|
* @deprecated
|
|
366
366
|
* @example true
|
|
367
367
|
*/
|
|
@@ -406,7 +406,7 @@ export interface InvoiceCustomSectionObject {
|
|
|
406
406
|
*/
|
|
407
407
|
display_name?: string;
|
|
408
408
|
/**
|
|
409
|
-
* This field
|
|
409
|
+
* **Deprecated.** This field will be removed in a future version. When set to true, it applies the invoice custom section to the organization's default billing entity. To apply or remove an invoice custom section from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
|
|
410
410
|
* @deprecated
|
|
411
411
|
* @example true
|
|
412
412
|
*/
|
|
@@ -3817,7 +3817,7 @@ export interface AppliedInvoiceCustomSectionObject {
|
|
|
3817
3817
|
*/
|
|
3818
3818
|
created_at: string;
|
|
3819
3819
|
/**
|
|
3820
|
-
* Unique identifier of the invoice custom section that was applied.
|
|
3820
|
+
* **Deprecated.** Unique identifier of the invoice custom section that was applied.
|
|
3821
3821
|
* @deprecated
|
|
3822
3822
|
* @format uuid
|
|
3823
3823
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
@@ -3839,6 +3839,54 @@ export interface PaymentMethodReference {
|
|
|
3839
3839
|
*/
|
|
3840
3840
|
payment_method_id?: string;
|
|
3841
3841
|
}
|
|
3842
|
+
export interface SubscriptionActivationRuleObject {
|
|
3843
|
+
/**
|
|
3844
|
+
* Unique identifier assigned to the activation rule within the Lago application. This ID is exclusively created by Lago.
|
|
3845
|
+
* @format uuid
|
|
3846
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3847
|
+
*/
|
|
3848
|
+
lago_id: string;
|
|
3849
|
+
/**
|
|
3850
|
+
* The type of the activation rule. Only `payment` is currently supported. A `payment` rule gates the subscription activation on a successful payment of the first invoice.
|
|
3851
|
+
* @example "payment"
|
|
3852
|
+
*/
|
|
3853
|
+
type: "payment";
|
|
3854
|
+
/**
|
|
3855
|
+
* The number of hours the subscription stays in the `incomplete` state waiting for the payment to succeed before it is automatically canceled.
|
|
3856
|
+
* @example 48
|
|
3857
|
+
*/
|
|
3858
|
+
timeout_hours: number;
|
|
3859
|
+
/**
|
|
3860
|
+
* The evaluation status of the activation rule:
|
|
3861
|
+
* - `inactive`: the rule has not been evaluated yet.
|
|
3862
|
+
* - `pending`: the rule is applicable and is waiting to be satisfied (e.g. waiting for the payment).
|
|
3863
|
+
* - `satisfied`: the rule has been satisfied and no longer blocks activation.
|
|
3864
|
+
* - `declined`: the rule was applicable but was declined.
|
|
3865
|
+
* - `failed`: the rule could not be satisfied (e.g. the payment failed).
|
|
3866
|
+
* - `expired`: the rule was not satisfied before its timeout elapsed.
|
|
3867
|
+
* - `not_applicable`: the rule did not apply to this subscription.
|
|
3868
|
+
* @example "pending"
|
|
3869
|
+
*/
|
|
3870
|
+
status: "inactive" | "pending" | "satisfied" | "declined" | "failed" | "expired" | "not_applicable";
|
|
3871
|
+
/**
|
|
3872
|
+
* The date and time when the rule expires, after which an unsatisfied rule causes the subscription to be canceled. Represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). Null until the rule starts being evaluated.
|
|
3873
|
+
* @format date-time
|
|
3874
|
+
* @example "2022-08-10T00:00:00Z"
|
|
3875
|
+
*/
|
|
3876
|
+
expires_at?: string | null;
|
|
3877
|
+
/**
|
|
3878
|
+
* The creation date of the activation rule, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
3879
|
+
* @format date-time
|
|
3880
|
+
* @example "2022-08-08T00:00:00Z"
|
|
3881
|
+
*/
|
|
3882
|
+
created_at: string;
|
|
3883
|
+
/**
|
|
3884
|
+
* The last update date of the activation rule, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
3885
|
+
* @format date-time
|
|
3886
|
+
* @example "2022-08-08T00:00:00Z"
|
|
3887
|
+
*/
|
|
3888
|
+
updated_at: string;
|
|
3889
|
+
}
|
|
3842
3890
|
export interface SubscriptionObject {
|
|
3843
3891
|
/**
|
|
3844
3892
|
* Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
|
|
@@ -3895,12 +3943,13 @@ export interface SubscriptionObject {
|
|
|
3895
3943
|
/**
|
|
3896
3944
|
* The status of the subscription, which can have the following values:
|
|
3897
3945
|
* - `active`: the subscription is currently active and applied to the customer.
|
|
3898
|
-
* - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer
|
|
3946
|
+
* - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer, when a subscription with a pending status is terminated, or when a payment-gated subscription fails to be paid (or its activation rule expires) before activation. When caused by payment gating, the `cancellation_reason` field is set.
|
|
3947
|
+
* - `incomplete`: the subscription was created with a payment activation rule and is waiting for the gating payment to succeed before it becomes `active`. It is automatically `canceled` if the payment fails or the activation rule expires.
|
|
3899
3948
|
* - `pending`: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period.
|
|
3900
3949
|
* - `terminated`: the subscription is no longer active.
|
|
3901
3950
|
* @example "active"
|
|
3902
3951
|
*/
|
|
3903
|
-
status: "active" | "canceled" | "pending" | "terminated";
|
|
3952
|
+
status: "active" | "canceled" | "incomplete" | "pending" | "terminated";
|
|
3904
3953
|
/**
|
|
3905
3954
|
* The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created.
|
|
3906
3955
|
* @format date-time
|
|
@@ -4007,6 +4056,22 @@ export interface SubscriptionObject {
|
|
|
4007
4056
|
* @example true
|
|
4008
4057
|
*/
|
|
4009
4058
|
consolidate_invoice?: boolean;
|
|
4059
|
+
/**
|
|
4060
|
+
* The reason a payment-gated subscription was canceled before activation. Null unless the subscription was canceled by payment gating.
|
|
4061
|
+
*
|
|
4062
|
+
* - `payment_failed`: the gating payment failed.
|
|
4063
|
+
* - `timeout`: the activation rule expired before the payment succeeded.
|
|
4064
|
+
* @example "payment_failed"
|
|
4065
|
+
*/
|
|
4066
|
+
cancellation_reason?: "payment_failed" | "timeout";
|
|
4067
|
+
/**
|
|
4068
|
+
* The date and time when a payment-gated subscription was activated (i.e. moved from `incomplete` to `active` once the gating payment succeeded), represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). Null while the subscription is still `incomplete`.
|
|
4069
|
+
* @format date-time
|
|
4070
|
+
* @example "2022-08-08T00:00:00Z"
|
|
4071
|
+
*/
|
|
4072
|
+
activated_at?: string | null;
|
|
4073
|
+
/** The activation rules attached to the subscription. A payment activation rule gates activation on a successful first payment, keeping the subscription in the `incomplete` state until the payment succeeds or the rule expires. */
|
|
4074
|
+
activation_rules?: SubscriptionActivationRuleObject[];
|
|
4010
4075
|
}
|
|
4011
4076
|
export interface SubscriptionsPaginated {
|
|
4012
4077
|
subscriptions: SubscriptionObject[];
|
|
@@ -5261,8 +5326,7 @@ export interface PaymentMethod {
|
|
|
5261
5326
|
}
|
|
5262
5327
|
export interface EventObject {
|
|
5263
5328
|
/**
|
|
5264
|
-
* Unique identifier assigned to the event within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the event's record within the Lago system
|
|
5265
|
-
* @format uuid
|
|
5329
|
+
* Unique identifier assigned to the event within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the event's record within the Lago system. It is an opaque identifier and is not guaranteed to be a UUID; on organizations using the ClickHouse events store it is a composite string.
|
|
5266
5330
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
5267
5331
|
*/
|
|
5268
5332
|
lago_id?: string | null;
|
|
@@ -6354,8 +6418,8 @@ export interface MinimumCommitmentObject {
|
|
|
6354
6418
|
export type ChargeModelEnum = "dynamic" | "graduated" | "graduated_percentage" | "package" | "percentage" | "standard" | "volume";
|
|
6355
6419
|
export interface ChargeProperties {
|
|
6356
6420
|
/**
|
|
6421
|
+
* **Deprecated.** Replaced by `pricing_group_keys`.
|
|
6357
6422
|
* The list of event properties that are used to group the events on the invoice for a `standard` charge model.
|
|
6358
|
-
* **DEPRECATED** Replaced by `pricing_group_keys`.
|
|
6359
6423
|
* @deprecated
|
|
6360
6424
|
* @example ["agent_name"]
|
|
6361
6425
|
*/
|
|
@@ -7847,6 +7911,18 @@ export interface PlanOverridesObject {
|
|
|
7847
7911
|
/** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
|
|
7848
7912
|
metadata?: MetadataInput;
|
|
7849
7913
|
}
|
|
7914
|
+
export interface SubscriptionActivationRuleInput {
|
|
7915
|
+
/**
|
|
7916
|
+
* The type of the activation rule. Only `payment` is currently supported. A `payment` rule gates the subscription activation on a successful payment of the first invoice.
|
|
7917
|
+
* @example "payment"
|
|
7918
|
+
*/
|
|
7919
|
+
type: "payment";
|
|
7920
|
+
/**
|
|
7921
|
+
* The number of hours the subscription stays in the `incomplete` state waiting for the payment to succeed before it is automatically canceled. Must be a positive integer or zero.
|
|
7922
|
+
* @example 48
|
|
7923
|
+
*/
|
|
7924
|
+
timeout_hours?: number;
|
|
7925
|
+
}
|
|
7850
7926
|
export interface SubscriptionCreateInput {
|
|
7851
7927
|
/**
|
|
7852
7928
|
* Optionally, you can create a pre-authorization on the customer's card before creating a subscription. This process places a temporary hold (capture) for a specified amount on the customer's account, but does not actually withdraw the funds.
|
|
@@ -7927,6 +8003,8 @@ export interface SubscriptionCreateInput {
|
|
|
7927
8003
|
* @example true
|
|
7928
8004
|
*/
|
|
7929
8005
|
consolidate_invoice?: boolean;
|
|
8006
|
+
/** Optional list of activation rules that gate the subscription activation. When a `payment` rule is provided and the plan is paid in advance (and the subscription is not in a trial), the subscription is created in the `incomplete` state and is only activated once the gating payment succeeds. If the payment fails or the rule's `timeout_hours` elapses, the subscription is canceled. */
|
|
8007
|
+
activation_rules?: SubscriptionActivationRuleInput[];
|
|
7930
8008
|
};
|
|
7931
8009
|
}
|
|
7932
8010
|
export interface ApplicableUsageThreshold {
|
|
@@ -7997,6 +8075,8 @@ export interface SubscriptionUpdateInput {
|
|
|
7997
8075
|
* @example "default"
|
|
7998
8076
|
*/
|
|
7999
8077
|
billing_entity_code?: string;
|
|
8078
|
+
/** Optional list of activation rules that gate the subscription activation. Activation rules can only be set or modified while the subscription is `pending` (future-dated and not yet activated); the request is rejected for `incomplete`, `active`, or `terminated` subscriptions. */
|
|
8079
|
+
activation_rules?: SubscriptionActivationRuleInput[];
|
|
8000
8080
|
};
|
|
8001
8081
|
}
|
|
8002
8082
|
export interface Subscription {
|
|
@@ -8279,7 +8359,7 @@ export interface TaxBaseInput {
|
|
|
8279
8359
|
*/
|
|
8280
8360
|
description?: string | null;
|
|
8281
8361
|
/**
|
|
8282
|
-
* This field
|
|
8362
|
+
* **Deprecated.** This field will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
|
|
8283
8363
|
* @deprecated
|
|
8284
8364
|
* @example true
|
|
8285
8365
|
*/
|
|
@@ -8570,6 +8650,16 @@ export type WalletTransactionFundingsPaginated = WalletTransactionFundings & {
|
|
|
8570
8650
|
export type WalletTransactionsPaginated = WalletTransactions & {
|
|
8571
8651
|
meta: PaginationMeta;
|
|
8572
8652
|
};
|
|
8653
|
+
export interface WebhookPublicKeyObject {
|
|
8654
|
+
/**
|
|
8655
|
+
* Base64-encoded public key used to verify webhook signatures.
|
|
8656
|
+
* @example "MEgCQQCo9+BpMRYQ/dL3DS2CyJxRF+j6ctbT3/Qp84+KeFhnii7NT7fELilKUSnxS30WAvQCCo2yU1orfgqr41mM70MBAgMBAAE="
|
|
8657
|
+
*/
|
|
8658
|
+
public_key: string;
|
|
8659
|
+
}
|
|
8660
|
+
export interface WebhookPublicKey {
|
|
8661
|
+
webhook: WebhookPublicKeyObject;
|
|
8662
|
+
}
|
|
8573
8663
|
export interface WebhookEndpointObject {
|
|
8574
8664
|
/**
|
|
8575
8665
|
* Unique identifier assigned to the wallet 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.
|
|
@@ -8825,6 +8915,18 @@ export interface CreditNotePaymentProviderRefundError {
|
|
|
8825
8915
|
payment_provider_code?: string;
|
|
8826
8916
|
provider_error?: string | Record<string, any>;
|
|
8827
8917
|
}
|
|
8918
|
+
export interface OverdueBalancePerCurrencyObject {
|
|
8919
|
+
/**
|
|
8920
|
+
* The amount of the overdue balance for this currency, expressed in cents.
|
|
8921
|
+
* @example 120
|
|
8922
|
+
*/
|
|
8923
|
+
amount_cents: number;
|
|
8924
|
+
/**
|
|
8925
|
+
* The currency of the overdue balance.
|
|
8926
|
+
* @example "EUR"
|
|
8927
|
+
*/
|
|
8928
|
+
currency: Currency;
|
|
8929
|
+
}
|
|
8828
8930
|
export interface DunningCampaignFinishedObject {
|
|
8829
8931
|
/**
|
|
8830
8932
|
* The customer external unique identifier (provided by your own application).
|
|
@@ -8846,6 +8948,8 @@ export interface DunningCampaignFinishedObject {
|
|
|
8846
8948
|
* @example "EUR"
|
|
8847
8949
|
*/
|
|
8848
8950
|
overdue_balance_currency: Currency;
|
|
8951
|
+
/** Overdue balance broken down per currency. */
|
|
8952
|
+
overdue_balances?: OverdueBalancePerCurrencyObject[];
|
|
8849
8953
|
}
|
|
8850
8954
|
export interface EventErrorsObject {
|
|
8851
8955
|
/**
|
|
@@ -8877,7 +8981,10 @@ export interface EventsErrorsObject {
|
|
|
8877
8981
|
* @example ["transaction_1234567890"]
|
|
8878
8982
|
*/
|
|
8879
8983
|
invalid_filter_values: string[];
|
|
8880
|
-
/**
|
|
8984
|
+
/**
|
|
8985
|
+
* **Deprecated.** List of event transaction_id with a missing group key.
|
|
8986
|
+
* @deprecated
|
|
8987
|
+
*/
|
|
8881
8988
|
missing_group_key: string[];
|
|
8882
8989
|
}
|
|
8883
8990
|
export interface FeeTaxProviderErrorObject {
|
|
@@ -9135,7 +9242,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
9135
9242
|
}
|
|
9136
9243
|
/**
|
|
9137
9244
|
* @title Lago API documentation
|
|
9138
|
-
* @version 1.
|
|
9245
|
+
* @version 1.50.0
|
|
9139
9246
|
* @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
|
|
9140
9247
|
* @baseUrl https://api.getlago.com/api/v1
|
|
9141
9248
|
* @externalDocs https://github.com/getlago
|
|
@@ -10617,20 +10724,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10617
10724
|
*/
|
|
10618
10725
|
group?: Record<string, string>;
|
|
10619
10726
|
/**
|
|
10620
|
-
* Filter usage to a specific charge by its Lago ID (UUID).
|
|
10727
|
+
* **Deprecated.** Filter usage to a specific charge by its Lago ID (UUID).
|
|
10621
10728
|
* @deprecated
|
|
10622
10729
|
* @format uuid
|
|
10623
10730
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
10624
10731
|
*/
|
|
10625
10732
|
filter_by_charge_id?: string;
|
|
10626
10733
|
/**
|
|
10627
|
-
* Filter usage to a specific charge by its code.
|
|
10734
|
+
* **Deprecated.** Filter usage to a specific charge by its code.
|
|
10628
10735
|
* @deprecated
|
|
10629
10736
|
* @example "storage"
|
|
10630
10737
|
*/
|
|
10631
10738
|
filter_by_charge_code?: string;
|
|
10632
10739
|
/**
|
|
10633
|
-
* Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `filter_by_group[cloud]=aws`.
|
|
10740
|
+
* **Deprecated.** Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `filter_by_group[cloud]=aws`.
|
|
10634
10741
|
* @deprecated
|
|
10635
10742
|
* @example {"cloud":"aws"}
|
|
10636
10743
|
*/
|
|
@@ -11297,6 +11404,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11297
11404
|
* @example 20
|
|
11298
11405
|
*/
|
|
11299
11406
|
per_page?: number;
|
|
11407
|
+
/**
|
|
11408
|
+
* Filter the results by currency, expressed as an ISO 4217 code.
|
|
11409
|
+
* @example "EUR"
|
|
11410
|
+
*/
|
|
11411
|
+
currency?: string;
|
|
11300
11412
|
/**
|
|
11301
11413
|
* Unique identifier assigned to the customer in your application.
|
|
11302
11414
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
@@ -11755,6 +11867,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11755
11867
|
* @example 20
|
|
11756
11868
|
*/
|
|
11757
11869
|
per_page?: number;
|
|
11870
|
+
/**
|
|
11871
|
+
* Filter the results by currency, expressed as an ISO 4217 code.
|
|
11872
|
+
* @example "EUR"
|
|
11873
|
+
*/
|
|
11874
|
+
currency?: string;
|
|
11758
11875
|
/**
|
|
11759
11876
|
* The customer external unique identifier (provided by your own application)
|
|
11760
11877
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
@@ -12351,6 +12468,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12351
12468
|
* @example 20
|
|
12352
12469
|
*/
|
|
12353
12470
|
per_page?: number;
|
|
12471
|
+
/**
|
|
12472
|
+
* Filter the results by currency, expressed as an ISO 4217 code.
|
|
12473
|
+
* @example "EUR"
|
|
12474
|
+
*/
|
|
12475
|
+
currency?: string;
|
|
12354
12476
|
/**
|
|
12355
12477
|
* The customer external unique identifier (provided by your own application).
|
|
12356
12478
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
@@ -12551,9 +12673,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12551
12673
|
* @name FetchPublicKey
|
|
12552
12674
|
* @summary Retrieve webhook public key
|
|
12553
12675
|
* @request GET:/webhooks/public_key
|
|
12676
|
+
* @deprecated
|
|
12554
12677
|
* @secure
|
|
12555
12678
|
*/
|
|
12556
12679
|
fetchPublicKey: (params?: RequestParams) => Promise<HttpResponse<string, ApiErrorUnauthorized>>;
|
|
12680
|
+
/**
|
|
12681
|
+
* @description This endpoint is used to retrieve the public key used to verify the webhooks signature, wrapped in a JSON object. Prefer this endpoint over the deprecated GET /webhooks/public_key.
|
|
12682
|
+
*
|
|
12683
|
+
* @tags webhooks
|
|
12684
|
+
* @name FetchJsonPublicKey
|
|
12685
|
+
* @summary Retrieve webhook public key (JSON)
|
|
12686
|
+
* @request GET:/webhooks/json_public_key
|
|
12687
|
+
* @secure
|
|
12688
|
+
*/
|
|
12689
|
+
fetchJsonPublicKey: (params?: RequestParams) => Promise<HttpResponse<WebhookPublicKey, ApiErrorUnauthorized>>;
|
|
12557
12690
|
};
|
|
12558
12691
|
webhookEndpoints: {
|
|
12559
12692
|
/**
|
package/esm/openapi/client.js
CHANGED
|
@@ -128,6 +128,14 @@ export class HttpClient {
|
|
|
128
128
|
if (r.ok) {
|
|
129
129
|
r.data = data;
|
|
130
130
|
}
|
|
131
|
+
else if (responseFormat === "text") {
|
|
132
|
+
try {
|
|
133
|
+
r.error = JSON.parse(data);
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
r.error = data;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
131
139
|
else {
|
|
132
140
|
r.error = data;
|
|
133
141
|
}
|
|
@@ -148,7 +156,7 @@ export class HttpClient {
|
|
|
148
156
|
}
|
|
149
157
|
/**
|
|
150
158
|
* @title Lago API documentation
|
|
151
|
-
* @version 1.
|
|
159
|
+
* @version 1.50.0
|
|
152
160
|
* @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
|
|
153
161
|
* @baseUrl https://api.getlago.com/api/v1
|
|
154
162
|
* @externalDocs https://github.com/getlago
|
|
@@ -3518,12 +3526,30 @@ export class Api extends HttpClient {
|
|
|
3518
3526
|
* @name FetchPublicKey
|
|
3519
3527
|
* @summary Retrieve webhook public key
|
|
3520
3528
|
* @request GET:/webhooks/public_key
|
|
3529
|
+
* @deprecated
|
|
3521
3530
|
* @secure
|
|
3522
3531
|
*/
|
|
3523
3532
|
fetchPublicKey: (params = {}) => this.request({
|
|
3524
3533
|
path: `/webhooks/public_key`,
|
|
3525
3534
|
method: "GET",
|
|
3526
3535
|
secure: true,
|
|
3536
|
+
format: "text",
|
|
3537
|
+
...params,
|
|
3538
|
+
}),
|
|
3539
|
+
/**
|
|
3540
|
+
* @description This endpoint is used to retrieve the public key used to verify the webhooks signature, wrapped in a JSON object. Prefer this endpoint over the deprecated GET /webhooks/public_key.
|
|
3541
|
+
*
|
|
3542
|
+
* @tags webhooks
|
|
3543
|
+
* @name FetchJsonPublicKey
|
|
3544
|
+
* @summary Retrieve webhook public key (JSON)
|
|
3545
|
+
* @request GET:/webhooks/json_public_key
|
|
3546
|
+
* @secure
|
|
3547
|
+
*/
|
|
3548
|
+
fetchJsonPublicKey: (params = {}) => this.request({
|
|
3549
|
+
path: `/webhooks/json_public_key`,
|
|
3550
|
+
method: "GET",
|
|
3551
|
+
secure: true,
|
|
3552
|
+
format: "json",
|
|
3527
3553
|
...params,
|
|
3528
3554
|
}),
|
|
3529
3555
|
};
|