lago-javascript-client 0.31.0-beta → 0.32.0-beta

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.
@@ -567,12 +567,12 @@ export class Api extends HttpClient {
567
567
  * @description Return the deleted customer
568
568
  *
569
569
  * @tags customers
570
- * @name DeleteCustomer
570
+ * @name DestroyCustomer
571
571
  * @summary Delete a customer
572
572
  * @request DELETE:/customers/{external_id}
573
573
  * @secure
574
574
  */
575
- deleteCustomer: (externalId, params = {}) => this.request({
575
+ destroyCustomer: (externalId, params = {}) => this.request({
576
576
  path: `/customers/${externalId}`,
577
577
  method: "DELETE",
578
578
  secure: true,
@@ -758,7 +758,7 @@ export class Api extends HttpClient {
758
758
  *
759
759
  * @tags plans
760
760
  * @name FindPlan
761
- * @summary Fin plan by code
761
+ * @summary Find plan by code
762
762
  * @request GET:/plans/{code}
763
763
  * @secure
764
764
  */
@@ -875,6 +875,24 @@ export class Api extends HttpClient {
875
875
  }),
876
876
  };
877
877
  invoices = {
878
+ /**
879
+ * @description Create a new one off Invoice
880
+ *
881
+ * @tags invoices
882
+ * @name CreateInvoice
883
+ * @summary Create a new invoice
884
+ * @request POST:/invoices
885
+ * @secure
886
+ */
887
+ createInvoice: (data, params = {}) => this.request({
888
+ path: `/invoices`,
889
+ method: "POST",
890
+ body: data,
891
+ secure: true,
892
+ type: ContentType.Json,
893
+ format: "json",
894
+ ...params,
895
+ }),
878
896
  /**
879
897
  * @description Find all invoices in certain organisation
880
898
  *
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "types": "./types/mod.d.ts",
5
5
  "name": "lago-javascript-client",
6
6
  "sideEffects": false,
7
- "version": "v0.31.0-beta",
7
+ "version": "v0.32.0-beta",
8
8
  "description": "Lago JavaScript API Client",
9
9
  "repository": {
10
10
  "type": "git",
@@ -571,12 +571,12 @@ class Api extends HttpClient {
571
571
  * @description Return the deleted customer
572
572
  *
573
573
  * @tags customers
574
- * @name DeleteCustomer
574
+ * @name DestroyCustomer
575
575
  * @summary Delete a customer
576
576
  * @request DELETE:/customers/{external_id}
577
577
  * @secure
578
578
  */
579
- deleteCustomer: (externalId, params = {}) => this.request({
579
+ destroyCustomer: (externalId, params = {}) => this.request({
580
580
  path: `/customers/${externalId}`,
581
581
  method: "DELETE",
582
582
  secure: true,
@@ -762,7 +762,7 @@ class Api extends HttpClient {
762
762
  *
763
763
  * @tags plans
764
764
  * @name FindPlan
765
- * @summary Fin plan by code
765
+ * @summary Find plan by code
766
766
  * @request GET:/plans/{code}
767
767
  * @secure
768
768
  */
@@ -879,6 +879,24 @@ class Api extends HttpClient {
879
879
  }),
880
880
  };
881
881
  invoices = {
882
+ /**
883
+ * @description Create a new one off Invoice
884
+ *
885
+ * @tags invoices
886
+ * @name CreateInvoice
887
+ * @summary Create a new invoice
888
+ * @request POST:/invoices
889
+ * @secure
890
+ */
891
+ createInvoice: (data, params = {}) => this.request({
892
+ path: `/invoices`,
893
+ method: "POST",
894
+ body: data,
895
+ secure: true,
896
+ type: ContentType.Json,
897
+ format: "json",
898
+ ...params,
899
+ }),
882
900
  /**
883
901
  * @description Find all invoices in certain organisation
884
902
  *
@@ -1163,9 +1163,6 @@ export type InvoiceObjectExtended = InvoiceObject & {
1163
1163
  export interface Invoice {
1164
1164
  invoice: InvoiceObjectExtended;
1165
1165
  }
1166
- export interface Invoices {
1167
- invoices: InvoiceObject[];
1168
- }
1169
1166
  export interface InvoicesPaginated {
1170
1167
  invoices: InvoiceObject[];
1171
1168
  meta: PaginationMeta;
@@ -1187,6 +1184,24 @@ export interface InvoiceInput {
1187
1184
  }[];
1188
1185
  };
1189
1186
  }
1187
+ export interface InvoiceOneOffInput {
1188
+ invoice: {
1189
+ /** @example "_ID_" */
1190
+ external_customer_id: string;
1191
+ /** @example "EUR" */
1192
+ currency?: string;
1193
+ fees?: {
1194
+ /** @example "12345" */
1195
+ add_on_code: string;
1196
+ /** @example 1200 */
1197
+ unit_amount_cents?: number;
1198
+ /** @example 2.5 */
1199
+ units?: number;
1200
+ /** @example "This is description" */
1201
+ description?: string;
1202
+ }[];
1203
+ };
1204
+ }
1190
1205
  export interface WalletObject {
1191
1206
  /**
1192
1207
  * @format uuid
@@ -1314,9 +1329,6 @@ export interface WalletTransactionObject {
1314
1329
  */
1315
1330
  created_at: string;
1316
1331
  }
1317
- export interface WalletTransaction {
1318
- wallet_transaction: WalletTransactionObject;
1319
- }
1320
1332
  export interface WalletTransactions {
1321
1333
  wallet_transactions: WalletTransactionObject[];
1322
1334
  }
@@ -1939,12 +1951,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
1939
1951
  * @description Return the deleted customer
1940
1952
  *
1941
1953
  * @tags customers
1942
- * @name DeleteCustomer
1954
+ * @name DestroyCustomer
1943
1955
  * @summary Delete a customer
1944
1956
  * @request DELETE:/customers/{external_id}
1945
1957
  * @secure
1946
1958
  */
1947
- deleteCustomer: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiResponseUnauthorized | ApiResponseNotFound>>;
1959
+ destroyCustomer: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Customer, ApiResponseUnauthorized | ApiResponseNotFound>>;
1948
1960
  /**
1949
1961
  * @description Return a customer current usage
1950
1962
  *
@@ -2076,7 +2088,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2076
2088
  *
2077
2089
  * @tags plans
2078
2090
  * @name FindPlan
2079
- * @summary Fin plan by code
2091
+ * @summary Find plan by code
2080
2092
  * @request GET:/plans/{code}
2081
2093
  * @secure
2082
2094
  */
@@ -2163,6 +2175,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2163
2175
  fetchPublicKey: (params?: RequestParams) => Promise<HttpResponse<string, ApiResponseUnauthorized>>;
2164
2176
  };
2165
2177
  invoices: {
2178
+ /**
2179
+ * @description Create a new one off Invoice
2180
+ *
2181
+ * @tags invoices
2182
+ * @name CreateInvoice
2183
+ * @summary Create a new invoice
2184
+ * @request POST:/invoices
2185
+ * @secure
2186
+ */
2187
+ createInvoice: (data: InvoiceOneOffInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
2166
2188
  /**
2167
2189
  * @description Find all invoices in certain organisation
2168
2190
  *