lago-javascript-client 1.33.4 → 1.40.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 +739 -51
- package/esm/openapi/client.js +222 -2
- package/package.json +1 -1
- package/script/openapi/client.d.ts +739 -51
- package/script/openapi/client.js +222 -2
package/esm/openapi/client.js
CHANGED
|
@@ -148,7 +148,7 @@ export class HttpClient {
|
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
150
|
* @title Lago API documentation
|
|
151
|
-
* @version 1.
|
|
151
|
+
* @version 1.40.0
|
|
152
152
|
* @license AGPLv3
|
|
153
153
|
* @baseUrl https://api.getlago.com/api/v1
|
|
154
154
|
* @externalDocs https://github.com/getlago
|
|
@@ -940,6 +940,74 @@ export class Api extends HttpClient {
|
|
|
940
940
|
format: "json",
|
|
941
941
|
...params,
|
|
942
942
|
}),
|
|
943
|
+
/**
|
|
944
|
+
* @description This endpoint replaces all existing metadata on a credit note with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
|
|
945
|
+
*
|
|
946
|
+
* @tags credit_notes
|
|
947
|
+
* @name ReplaceCreditNoteMetadata
|
|
948
|
+
* @summary Replace credit note metadata
|
|
949
|
+
* @request POST:/credit_notes/{lago_id}/metadata
|
|
950
|
+
* @secure
|
|
951
|
+
*/
|
|
952
|
+
replaceCreditNoteMetadata: (lagoId, data, params = {}) => this.request({
|
|
953
|
+
path: `/credit_notes/${lagoId}/metadata`,
|
|
954
|
+
method: "POST",
|
|
955
|
+
body: data,
|
|
956
|
+
secure: true,
|
|
957
|
+
type: ContentType.Json,
|
|
958
|
+
format: "json",
|
|
959
|
+
...params,
|
|
960
|
+
}),
|
|
961
|
+
/**
|
|
962
|
+
* @description This endpoint merges the provided metadata with existing metadata on the credit note. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
|
|
963
|
+
*
|
|
964
|
+
* @tags credit_notes
|
|
965
|
+
* @name MergeCreditNoteMetadata
|
|
966
|
+
* @summary Merge credit note metadata
|
|
967
|
+
* @request PATCH:/credit_notes/{lago_id}/metadata
|
|
968
|
+
* @secure
|
|
969
|
+
*/
|
|
970
|
+
mergeCreditNoteMetadata: (lagoId, data, params = {}) => this.request({
|
|
971
|
+
path: `/credit_notes/${lagoId}/metadata`,
|
|
972
|
+
method: "PATCH",
|
|
973
|
+
body: data,
|
|
974
|
+
secure: true,
|
|
975
|
+
type: ContentType.Json,
|
|
976
|
+
format: "json",
|
|
977
|
+
...params,
|
|
978
|
+
}),
|
|
979
|
+
/**
|
|
980
|
+
* @description This endpoint removes all metadata from a credit note.
|
|
981
|
+
*
|
|
982
|
+
* @tags credit_notes
|
|
983
|
+
* @name DeleteAllCreditNoteMetadata
|
|
984
|
+
* @summary Delete all credit note metadata
|
|
985
|
+
* @request DELETE:/credit_notes/{lago_id}/metadata
|
|
986
|
+
* @secure
|
|
987
|
+
*/
|
|
988
|
+
deleteAllCreditNoteMetadata: (lagoId, params = {}) => this.request({
|
|
989
|
+
path: `/credit_notes/${lagoId}/metadata`,
|
|
990
|
+
method: "DELETE",
|
|
991
|
+
secure: true,
|
|
992
|
+
format: "json",
|
|
993
|
+
...params,
|
|
994
|
+
}),
|
|
995
|
+
/**
|
|
996
|
+
* @description This endpoint removes a single metadata key from a credit note.
|
|
997
|
+
*
|
|
998
|
+
* @tags credit_notes
|
|
999
|
+
* @name DeleteCreditNoteMetadataKey
|
|
1000
|
+
* @summary Delete a metadata key
|
|
1001
|
+
* @request DELETE:/credit_notes/{lago_id}/metadata/{key}
|
|
1002
|
+
* @secure
|
|
1003
|
+
*/
|
|
1004
|
+
deleteCreditNoteMetadataKey: (lagoId, key, params = {}) => this.request({
|
|
1005
|
+
path: `/credit_notes/${lagoId}/metadata/${key}`,
|
|
1006
|
+
method: "DELETE",
|
|
1007
|
+
secure: true,
|
|
1008
|
+
format: "json",
|
|
1009
|
+
...params,
|
|
1010
|
+
}),
|
|
943
1011
|
};
|
|
944
1012
|
customers = {
|
|
945
1013
|
/**
|
|
@@ -1337,7 +1405,7 @@ export class Api extends HttpClient {
|
|
|
1337
1405
|
...params,
|
|
1338
1406
|
}),
|
|
1339
1407
|
/**
|
|
1340
|
-
* @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
|
|
1408
|
+
* @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription. Note that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id. WARNING: If your Lago organization is configured to use the Clickhouse-based event pipeline, multiple events can share the same `transaction_id` (with different timestamps). This endpoint will only return the first event found.
|
|
1341
1409
|
*
|
|
1342
1410
|
* @tags events
|
|
1343
1411
|
* @name FindEvent
|
|
@@ -1987,6 +2055,74 @@ export class Api extends HttpClient {
|
|
|
1987
2055
|
format: "json",
|
|
1988
2056
|
...params,
|
|
1989
2057
|
}),
|
|
2058
|
+
/**
|
|
2059
|
+
* @description This endpoint replaces all existing metadata on a plan with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
|
|
2060
|
+
*
|
|
2061
|
+
* @tags plans
|
|
2062
|
+
* @name ReplacePlanMetadata
|
|
2063
|
+
* @summary Replace plan metadata
|
|
2064
|
+
* @request POST:/plans/{code}/metadata
|
|
2065
|
+
* @secure
|
|
2066
|
+
*/
|
|
2067
|
+
replacePlanMetadata: (code, data, params = {}) => this.request({
|
|
2068
|
+
path: `/plans/${code}/metadata`,
|
|
2069
|
+
method: "POST",
|
|
2070
|
+
body: data,
|
|
2071
|
+
secure: true,
|
|
2072
|
+
type: ContentType.Json,
|
|
2073
|
+
format: "json",
|
|
2074
|
+
...params,
|
|
2075
|
+
}),
|
|
2076
|
+
/**
|
|
2077
|
+
* @description This endpoint merges the provided metadata with existing metadata on the plan. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
|
|
2078
|
+
*
|
|
2079
|
+
* @tags plans
|
|
2080
|
+
* @name MergePlanMetadata
|
|
2081
|
+
* @summary Merge plan metadata
|
|
2082
|
+
* @request PATCH:/plans/{code}/metadata
|
|
2083
|
+
* @secure
|
|
2084
|
+
*/
|
|
2085
|
+
mergePlanMetadata: (code, data, params = {}) => this.request({
|
|
2086
|
+
path: `/plans/${code}/metadata`,
|
|
2087
|
+
method: "PATCH",
|
|
2088
|
+
body: data,
|
|
2089
|
+
secure: true,
|
|
2090
|
+
type: ContentType.Json,
|
|
2091
|
+
format: "json",
|
|
2092
|
+
...params,
|
|
2093
|
+
}),
|
|
2094
|
+
/**
|
|
2095
|
+
* @description This endpoint removes all metadata from a plan.
|
|
2096
|
+
*
|
|
2097
|
+
* @tags plans
|
|
2098
|
+
* @name DeleteAllPlanMetadata
|
|
2099
|
+
* @summary Delete all plan metadata
|
|
2100
|
+
* @request DELETE:/plans/{code}/metadata
|
|
2101
|
+
* @secure
|
|
2102
|
+
*/
|
|
2103
|
+
deleteAllPlanMetadata: (code, params = {}) => this.request({
|
|
2104
|
+
path: `/plans/${code}/metadata`,
|
|
2105
|
+
method: "DELETE",
|
|
2106
|
+
secure: true,
|
|
2107
|
+
format: "json",
|
|
2108
|
+
...params,
|
|
2109
|
+
}),
|
|
2110
|
+
/**
|
|
2111
|
+
* @description This endpoint removes a single metadata key from a plan.
|
|
2112
|
+
*
|
|
2113
|
+
* @tags plans
|
|
2114
|
+
* @name DeletePlanMetadataKey
|
|
2115
|
+
* @summary Delete a metadata key
|
|
2116
|
+
* @request DELETE:/plans/{code}/metadata/{key}
|
|
2117
|
+
* @secure
|
|
2118
|
+
*/
|
|
2119
|
+
deletePlanMetadataKey: (code, key, params = {}) => this.request({
|
|
2120
|
+
path: `/plans/${code}/metadata/${key}`,
|
|
2121
|
+
method: "DELETE",
|
|
2122
|
+
secure: true,
|
|
2123
|
+
format: "json",
|
|
2124
|
+
...params,
|
|
2125
|
+
}),
|
|
1990
2126
|
};
|
|
1991
2127
|
subscriptions = {
|
|
1992
2128
|
/**
|
|
@@ -2261,6 +2397,22 @@ export class Api extends HttpClient {
|
|
|
2261
2397
|
format: "json",
|
|
2262
2398
|
...params,
|
|
2263
2399
|
}),
|
|
2400
|
+
/**
|
|
2401
|
+
* @description This endpoint retrieves all fixed charges for a specific subscription.
|
|
2402
|
+
*
|
|
2403
|
+
* @tags subscriptions
|
|
2404
|
+
* @name FindAllSubscriptionFixedCharges
|
|
2405
|
+
* @summary List subscription fixed charges
|
|
2406
|
+
* @request GET:/subscriptions/{external_id}/fixed_charges
|
|
2407
|
+
* @secure
|
|
2408
|
+
*/
|
|
2409
|
+
findAllSubscriptionFixedCharges: (externalId, params = {}) => this.request({
|
|
2410
|
+
path: `/subscriptions/${externalId}/fixed_charges`,
|
|
2411
|
+
method: "GET",
|
|
2412
|
+
secure: true,
|
|
2413
|
+
format: "json",
|
|
2414
|
+
...params,
|
|
2415
|
+
}),
|
|
2264
2416
|
};
|
|
2265
2417
|
taxes = {
|
|
2266
2418
|
/**
|
|
@@ -2435,6 +2587,74 @@ export class Api extends HttpClient {
|
|
|
2435
2587
|
format: "json",
|
|
2436
2588
|
...params,
|
|
2437
2589
|
}),
|
|
2590
|
+
/**
|
|
2591
|
+
* @description This endpoint replaces all existing metadata on a wallet with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
|
|
2592
|
+
*
|
|
2593
|
+
* @tags wallets
|
|
2594
|
+
* @name ReplaceWalletMetadata
|
|
2595
|
+
* @summary Replace wallet metadata
|
|
2596
|
+
* @request POST:/wallets/{lago_id}/metadata
|
|
2597
|
+
* @secure
|
|
2598
|
+
*/
|
|
2599
|
+
replaceWalletMetadata: (lagoId, data, params = {}) => this.request({
|
|
2600
|
+
path: `/wallets/${lagoId}/metadata`,
|
|
2601
|
+
method: "POST",
|
|
2602
|
+
body: data,
|
|
2603
|
+
secure: true,
|
|
2604
|
+
type: ContentType.Json,
|
|
2605
|
+
format: "json",
|
|
2606
|
+
...params,
|
|
2607
|
+
}),
|
|
2608
|
+
/**
|
|
2609
|
+
* @description This endpoint merges the provided metadata with existing metadata on the wallet. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
|
|
2610
|
+
*
|
|
2611
|
+
* @tags wallets
|
|
2612
|
+
* @name MergeWalletMetadata
|
|
2613
|
+
* @summary Merge wallet metadata
|
|
2614
|
+
* @request PATCH:/wallets/{lago_id}/metadata
|
|
2615
|
+
* @secure
|
|
2616
|
+
*/
|
|
2617
|
+
mergeWalletMetadata: (lagoId, data, params = {}) => this.request({
|
|
2618
|
+
path: `/wallets/${lagoId}/metadata`,
|
|
2619
|
+
method: "PATCH",
|
|
2620
|
+
body: data,
|
|
2621
|
+
secure: true,
|
|
2622
|
+
type: ContentType.Json,
|
|
2623
|
+
format: "json",
|
|
2624
|
+
...params,
|
|
2625
|
+
}),
|
|
2626
|
+
/**
|
|
2627
|
+
* @description This endpoint removes all metadata from a wallet.
|
|
2628
|
+
*
|
|
2629
|
+
* @tags wallets
|
|
2630
|
+
* @name DeleteAllWalletMetadata
|
|
2631
|
+
* @summary Delete all wallet metadata
|
|
2632
|
+
* @request DELETE:/wallets/{lago_id}/metadata
|
|
2633
|
+
* @secure
|
|
2634
|
+
*/
|
|
2635
|
+
deleteAllWalletMetadata: (lagoId, params = {}) => this.request({
|
|
2636
|
+
path: `/wallets/${lagoId}/metadata`,
|
|
2637
|
+
method: "DELETE",
|
|
2638
|
+
secure: true,
|
|
2639
|
+
format: "json",
|
|
2640
|
+
...params,
|
|
2641
|
+
}),
|
|
2642
|
+
/**
|
|
2643
|
+
* @description This endpoint removes a single metadata key from a wallet.
|
|
2644
|
+
*
|
|
2645
|
+
* @tags wallets
|
|
2646
|
+
* @name DeleteWalletMetadataKey
|
|
2647
|
+
* @summary Delete a metadata key
|
|
2648
|
+
* @request DELETE:/wallets/{lago_id}/metadata/{key}
|
|
2649
|
+
* @secure
|
|
2650
|
+
*/
|
|
2651
|
+
deleteWalletMetadataKey: (lagoId, key, params = {}) => this.request({
|
|
2652
|
+
path: `/wallets/${lagoId}/metadata/${key}`,
|
|
2653
|
+
method: "DELETE",
|
|
2654
|
+
secure: true,
|
|
2655
|
+
format: "json",
|
|
2656
|
+
...params,
|
|
2657
|
+
}),
|
|
2438
2658
|
/**
|
|
2439
2659
|
* @description This endpoint is used to list all wallet transactions.
|
|
2440
2660
|
*
|