lago-javascript-client 1.46.0 → 1.46.1
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 +95 -31
- package/package.json +1 -1
- package/script/openapi/client.d.ts +95 -31
package/esm/openapi/client.d.ts
CHANGED
|
@@ -4584,7 +4584,7 @@ export type AlertThresholdObject = AlertThresholdBaseObject & {
|
|
|
4584
4584
|
*/
|
|
4585
4585
|
value: string;
|
|
4586
4586
|
};
|
|
4587
|
-
export interface
|
|
4587
|
+
export interface WalletAlertObject {
|
|
4588
4588
|
/**
|
|
4589
4589
|
* Unique identifier of the alert, created by Lago.
|
|
4590
4590
|
* @format uuid
|
|
@@ -4597,46 +4597,36 @@ export interface AlertObject {
|
|
|
4597
4597
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4598
4598
|
*/
|
|
4599
4599
|
lago_organization_id: string;
|
|
4600
|
-
|
|
4601
|
-
* The subscription external unique identifier (provided by your own application).
|
|
4602
|
-
* @example "sub_1234567890"
|
|
4603
|
-
*/
|
|
4604
|
-
external_subscription_id: string | null;
|
|
4605
|
-
/**
|
|
4606
|
-
* The customer external unique identifier (provided by your own application).
|
|
4607
|
-
* @example "cus_0987654321"
|
|
4608
|
-
*/
|
|
4609
|
-
external_customer_id: string;
|
|
4600
|
+
external_subscription_id: null;
|
|
4610
4601
|
/**
|
|
4611
4602
|
* Unique identifier of the wallet, created by Lago.
|
|
4612
4603
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4613
4604
|
*/
|
|
4614
|
-
lago_wallet_id?: string
|
|
4605
|
+
lago_wallet_id?: string;
|
|
4615
4606
|
/**
|
|
4616
4607
|
* The wallet external unique identifier (provided by your own application).
|
|
4617
4608
|
* @example "wallet_code"
|
|
4618
4609
|
*/
|
|
4619
|
-
wallet_code?: string
|
|
4620
|
-
|
|
4621
|
-
billable_metric: BillableMetricObject;
|
|
4610
|
+
wallet_code?: string;
|
|
4611
|
+
billable_metric: null;
|
|
4622
4612
|
/**
|
|
4623
4613
|
* The type of alert.
|
|
4624
|
-
* @example "
|
|
4614
|
+
* @example "wallet_balance_amount"
|
|
4625
4615
|
*/
|
|
4626
|
-
alert_type: "
|
|
4616
|
+
alert_type: "wallet_balance_amount" | "wallet_credits_balance" | "wallet_ongoing_balance_amount" | "wallet_credits_ongoing_balance";
|
|
4627
4617
|
/**
|
|
4628
4618
|
* Unique code used to identify the alert.
|
|
4629
|
-
* @example "
|
|
4619
|
+
* @example "wallet_balance_alert"
|
|
4630
4620
|
*/
|
|
4631
4621
|
code: string;
|
|
4632
4622
|
/**
|
|
4633
4623
|
* The name of the alert.
|
|
4634
|
-
* @example "
|
|
4624
|
+
* @example "Wallet Balance Alert"
|
|
4635
4625
|
*/
|
|
4636
4626
|
name: string | null;
|
|
4637
4627
|
/**
|
|
4638
4628
|
* Indicates whether the alert is triggered when the monitored metric goes above or below the threshold.
|
|
4639
|
-
* @example "
|
|
4629
|
+
* @example "decreasing"
|
|
4640
4630
|
*/
|
|
4641
4631
|
direction?: "increasing" | "decreasing";
|
|
4642
4632
|
/**
|
|
@@ -4659,8 +4649,8 @@ export interface AlertObject {
|
|
|
4659
4649
|
*/
|
|
4660
4650
|
created_at: string;
|
|
4661
4651
|
}
|
|
4662
|
-
export interface
|
|
4663
|
-
alerts:
|
|
4652
|
+
export interface WalletAlerts {
|
|
4653
|
+
alerts: WalletAlertObject[];
|
|
4664
4654
|
meta?: PaginationMeta;
|
|
4665
4655
|
}
|
|
4666
4656
|
export type AlertThresholdInput = AlertThresholdBaseObject & {
|
|
@@ -4690,7 +4680,7 @@ export interface WalletAlertCreateInput {
|
|
|
4690
4680
|
* The type of alert.
|
|
4691
4681
|
* @example "wallet_balance_amount"
|
|
4692
4682
|
*/
|
|
4693
|
-
alert_type: "wallet_balance_amount" | "wallet_credits_balance";
|
|
4683
|
+
alert_type: "wallet_balance_amount" | "wallet_credits_balance" | "wallet_ongoing_balance_amount" | "wallet_credits_ongoing_balance";
|
|
4694
4684
|
/**
|
|
4695
4685
|
* Unique code used to identify the alert.
|
|
4696
4686
|
* @example "wallet_balance_alert"
|
|
@@ -4710,7 +4700,7 @@ export interface WalletAlertBatchCreateInput {
|
|
|
4710
4700
|
* The type of alert.
|
|
4711
4701
|
* @example "wallet_balance_amount"
|
|
4712
4702
|
*/
|
|
4713
|
-
alert_type: "wallet_balance_amount" | "wallet_credits_balance";
|
|
4703
|
+
alert_type: "wallet_balance_amount" | "wallet_credits_balance" | "wallet_ongoing_balance_amount" | "wallet_credits_ongoing_balance";
|
|
4714
4704
|
/**
|
|
4715
4705
|
* Unique code used to identify the alert.
|
|
4716
4706
|
* @example "wallet_balance_alert"
|
|
@@ -4723,8 +4713,8 @@ export interface WalletAlertBatchCreateInput {
|
|
|
4723
4713
|
name?: string | null;
|
|
4724
4714
|
})[];
|
|
4725
4715
|
}
|
|
4726
|
-
export interface
|
|
4727
|
-
alert:
|
|
4716
|
+
export interface WalletAlert {
|
|
4717
|
+
alert: WalletAlertObject;
|
|
4728
4718
|
}
|
|
4729
4719
|
export interface WalletAlertUpdateInput {
|
|
4730
4720
|
alert: AlertBaseInput & {
|
|
@@ -7812,6 +7802,72 @@ export interface LifetimeUsageInput {
|
|
|
7812
7802
|
external_historical_usage_amount_cents: number;
|
|
7813
7803
|
};
|
|
7814
7804
|
}
|
|
7805
|
+
export interface AlertObject {
|
|
7806
|
+
/**
|
|
7807
|
+
* Unique identifier of the alert, created by Lago.
|
|
7808
|
+
* @format uuid
|
|
7809
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7810
|
+
*/
|
|
7811
|
+
lago_id: string;
|
|
7812
|
+
/**
|
|
7813
|
+
* Unique identifier of the organization, created by Lago.
|
|
7814
|
+
* @format uuid
|
|
7815
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7816
|
+
*/
|
|
7817
|
+
lago_organization_id: string;
|
|
7818
|
+
/**
|
|
7819
|
+
* The subscription external unique identifier (provided by your own application).
|
|
7820
|
+
* @example "sub_1234567890"
|
|
7821
|
+
*/
|
|
7822
|
+
external_subscription_id: string | null;
|
|
7823
|
+
lago_wallet_id?: null;
|
|
7824
|
+
wallet_code?: null;
|
|
7825
|
+
/** The billable metric associated with the alert. Only for alerts based on a billable metric. */
|
|
7826
|
+
billable_metric: BillableMetricObject;
|
|
7827
|
+
/**
|
|
7828
|
+
* The type of alert.
|
|
7829
|
+
* @example "billable_metric_current_usage_amount"
|
|
7830
|
+
*/
|
|
7831
|
+
alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
|
|
7832
|
+
/**
|
|
7833
|
+
* Unique code used to identify the alert.
|
|
7834
|
+
* @example "storage_threshold_alert"
|
|
7835
|
+
*/
|
|
7836
|
+
code: string;
|
|
7837
|
+
/**
|
|
7838
|
+
* The name of the alert.
|
|
7839
|
+
* @example "Storage Usage Alert"
|
|
7840
|
+
*/
|
|
7841
|
+
name: string | null;
|
|
7842
|
+
/**
|
|
7843
|
+
* Indicates whether the alert is triggered when the monitored metric goes above or below the threshold.
|
|
7844
|
+
* @example "increasing"
|
|
7845
|
+
*/
|
|
7846
|
+
direction?: "increasing" | "decreasing";
|
|
7847
|
+
/**
|
|
7848
|
+
* When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds.
|
|
7849
|
+
* @example 1000
|
|
7850
|
+
*/
|
|
7851
|
+
previous_value: number;
|
|
7852
|
+
/**
|
|
7853
|
+
* The date and time in UTC (ISO 8601) when the system checked if this alert should be triggered. Null until it's processed for the first time.
|
|
7854
|
+
* @format date-time
|
|
7855
|
+
* @example "2025-05-19T10:04:21Z"
|
|
7856
|
+
*/
|
|
7857
|
+
last_processed_at: string | null;
|
|
7858
|
+
/** Array of thresholds associated with the alert. */
|
|
7859
|
+
thresholds: AlertThresholdObject[];
|
|
7860
|
+
/**
|
|
7861
|
+
* The date and time in UTC (ISO 8601) when the alert was created.
|
|
7862
|
+
* @format date-time
|
|
7863
|
+
* @example "2025-03-20T10:00:00Z"
|
|
7864
|
+
*/
|
|
7865
|
+
created_at: string;
|
|
7866
|
+
}
|
|
7867
|
+
export interface Alerts {
|
|
7868
|
+
alerts: AlertObject[];
|
|
7869
|
+
meta?: PaginationMeta;
|
|
7870
|
+
}
|
|
7815
7871
|
export interface AlertCreateInput {
|
|
7816
7872
|
alert: AlertBaseInput & {
|
|
7817
7873
|
/**
|
|
@@ -7844,8 +7900,16 @@ export interface AlertBatchCreateInput {
|
|
|
7844
7900
|
* @example "storage_threshold_alert"
|
|
7845
7901
|
*/
|
|
7846
7902
|
code: string;
|
|
7903
|
+
/**
|
|
7904
|
+
* The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
|
|
7905
|
+
* @example "storage_usage"
|
|
7906
|
+
*/
|
|
7907
|
+
billable_metric_code?: string | null;
|
|
7847
7908
|
})[];
|
|
7848
7909
|
}
|
|
7910
|
+
export interface Alert {
|
|
7911
|
+
alert: AlertObject;
|
|
7912
|
+
}
|
|
7849
7913
|
export interface AlertUpdateInput {
|
|
7850
7914
|
alert: AlertBaseInput & {
|
|
7851
7915
|
/**
|
|
@@ -10166,7 +10230,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10166
10230
|
* @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
|
|
10167
10231
|
* @secure
|
|
10168
10232
|
*/
|
|
10169
|
-
getCustomerWalletAlerts: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<
|
|
10233
|
+
getCustomerWalletAlerts: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<WalletAlerts, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10170
10234
|
/**
|
|
10171
10235
|
* @description This endpoint allows you to create new alerts for a wallet. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.
|
|
10172
10236
|
*
|
|
@@ -10176,7 +10240,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10176
10240
|
* @request POST:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
|
|
10177
10241
|
* @secure
|
|
10178
10242
|
*/
|
|
10179
|
-
createCustomerWalletAlert: (externalCustomerId: string, walletCode: string, data: WalletAlertCreateInput | WalletAlertBatchCreateInput, params?: RequestParams) => Promise<HttpResponse<
|
|
10243
|
+
createCustomerWalletAlert: (externalCustomerId: string, walletCode: string, data: WalletAlertCreateInput | WalletAlertBatchCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletAlerts | WalletAlert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10180
10244
|
/**
|
|
10181
10245
|
* @description This endpoint allows you to delete all alerts for a wallet.
|
|
10182
10246
|
*
|
|
@@ -10196,7 +10260,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10196
10260
|
* @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
|
|
10197
10261
|
* @secure
|
|
10198
10262
|
*/
|
|
10199
|
-
getCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<
|
|
10263
|
+
getCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<WalletAlert, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10200
10264
|
/**
|
|
10201
10265
|
* @description This endpoint allows you to update an existing alert for a wallet.
|
|
10202
10266
|
*
|
|
@@ -10206,7 +10270,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10206
10270
|
* @request PUT:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
|
|
10207
10271
|
* @secure
|
|
10208
10272
|
*/
|
|
10209
|
-
updateCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, data: WalletAlertUpdateInput, params?: RequestParams) => Promise<HttpResponse<
|
|
10273
|
+
updateCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, data: WalletAlertUpdateInput, params?: RequestParams) => Promise<HttpResponse<WalletAlert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10210
10274
|
/**
|
|
10211
10275
|
* @description This endpoint allows you to delete an existing alert for a wallet.
|
|
10212
10276
|
*
|
|
@@ -10216,7 +10280,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10216
10280
|
* @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
|
|
10217
10281
|
* @secure
|
|
10218
10282
|
*/
|
|
10219
|
-
deleteCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<
|
|
10283
|
+
deleteCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<WalletAlert, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10220
10284
|
/**
|
|
10221
10285
|
* @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.
|
|
10222
10286
|
*
|
package/package.json
CHANGED
|
@@ -4584,7 +4584,7 @@ export type AlertThresholdObject = AlertThresholdBaseObject & {
|
|
|
4584
4584
|
*/
|
|
4585
4585
|
value: string;
|
|
4586
4586
|
};
|
|
4587
|
-
export interface
|
|
4587
|
+
export interface WalletAlertObject {
|
|
4588
4588
|
/**
|
|
4589
4589
|
* Unique identifier of the alert, created by Lago.
|
|
4590
4590
|
* @format uuid
|
|
@@ -4597,46 +4597,36 @@ export interface AlertObject {
|
|
|
4597
4597
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4598
4598
|
*/
|
|
4599
4599
|
lago_organization_id: string;
|
|
4600
|
-
|
|
4601
|
-
* The subscription external unique identifier (provided by your own application).
|
|
4602
|
-
* @example "sub_1234567890"
|
|
4603
|
-
*/
|
|
4604
|
-
external_subscription_id: string | null;
|
|
4605
|
-
/**
|
|
4606
|
-
* The customer external unique identifier (provided by your own application).
|
|
4607
|
-
* @example "cus_0987654321"
|
|
4608
|
-
*/
|
|
4609
|
-
external_customer_id: string;
|
|
4600
|
+
external_subscription_id: null;
|
|
4610
4601
|
/**
|
|
4611
4602
|
* Unique identifier of the wallet, created by Lago.
|
|
4612
4603
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4613
4604
|
*/
|
|
4614
|
-
lago_wallet_id?: string
|
|
4605
|
+
lago_wallet_id?: string;
|
|
4615
4606
|
/**
|
|
4616
4607
|
* The wallet external unique identifier (provided by your own application).
|
|
4617
4608
|
* @example "wallet_code"
|
|
4618
4609
|
*/
|
|
4619
|
-
wallet_code?: string
|
|
4620
|
-
|
|
4621
|
-
billable_metric: BillableMetricObject;
|
|
4610
|
+
wallet_code?: string;
|
|
4611
|
+
billable_metric: null;
|
|
4622
4612
|
/**
|
|
4623
4613
|
* The type of alert.
|
|
4624
|
-
* @example "
|
|
4614
|
+
* @example "wallet_balance_amount"
|
|
4625
4615
|
*/
|
|
4626
|
-
alert_type: "
|
|
4616
|
+
alert_type: "wallet_balance_amount" | "wallet_credits_balance" | "wallet_ongoing_balance_amount" | "wallet_credits_ongoing_balance";
|
|
4627
4617
|
/**
|
|
4628
4618
|
* Unique code used to identify the alert.
|
|
4629
|
-
* @example "
|
|
4619
|
+
* @example "wallet_balance_alert"
|
|
4630
4620
|
*/
|
|
4631
4621
|
code: string;
|
|
4632
4622
|
/**
|
|
4633
4623
|
* The name of the alert.
|
|
4634
|
-
* @example "
|
|
4624
|
+
* @example "Wallet Balance Alert"
|
|
4635
4625
|
*/
|
|
4636
4626
|
name: string | null;
|
|
4637
4627
|
/**
|
|
4638
4628
|
* Indicates whether the alert is triggered when the monitored metric goes above or below the threshold.
|
|
4639
|
-
* @example "
|
|
4629
|
+
* @example "decreasing"
|
|
4640
4630
|
*/
|
|
4641
4631
|
direction?: "increasing" | "decreasing";
|
|
4642
4632
|
/**
|
|
@@ -4659,8 +4649,8 @@ export interface AlertObject {
|
|
|
4659
4649
|
*/
|
|
4660
4650
|
created_at: string;
|
|
4661
4651
|
}
|
|
4662
|
-
export interface
|
|
4663
|
-
alerts:
|
|
4652
|
+
export interface WalletAlerts {
|
|
4653
|
+
alerts: WalletAlertObject[];
|
|
4664
4654
|
meta?: PaginationMeta;
|
|
4665
4655
|
}
|
|
4666
4656
|
export type AlertThresholdInput = AlertThresholdBaseObject & {
|
|
@@ -4690,7 +4680,7 @@ export interface WalletAlertCreateInput {
|
|
|
4690
4680
|
* The type of alert.
|
|
4691
4681
|
* @example "wallet_balance_amount"
|
|
4692
4682
|
*/
|
|
4693
|
-
alert_type: "wallet_balance_amount" | "wallet_credits_balance";
|
|
4683
|
+
alert_type: "wallet_balance_amount" | "wallet_credits_balance" | "wallet_ongoing_balance_amount" | "wallet_credits_ongoing_balance";
|
|
4694
4684
|
/**
|
|
4695
4685
|
* Unique code used to identify the alert.
|
|
4696
4686
|
* @example "wallet_balance_alert"
|
|
@@ -4710,7 +4700,7 @@ export interface WalletAlertBatchCreateInput {
|
|
|
4710
4700
|
* The type of alert.
|
|
4711
4701
|
* @example "wallet_balance_amount"
|
|
4712
4702
|
*/
|
|
4713
|
-
alert_type: "wallet_balance_amount" | "wallet_credits_balance";
|
|
4703
|
+
alert_type: "wallet_balance_amount" | "wallet_credits_balance" | "wallet_ongoing_balance_amount" | "wallet_credits_ongoing_balance";
|
|
4714
4704
|
/**
|
|
4715
4705
|
* Unique code used to identify the alert.
|
|
4716
4706
|
* @example "wallet_balance_alert"
|
|
@@ -4723,8 +4713,8 @@ export interface WalletAlertBatchCreateInput {
|
|
|
4723
4713
|
name?: string | null;
|
|
4724
4714
|
})[];
|
|
4725
4715
|
}
|
|
4726
|
-
export interface
|
|
4727
|
-
alert:
|
|
4716
|
+
export interface WalletAlert {
|
|
4717
|
+
alert: WalletAlertObject;
|
|
4728
4718
|
}
|
|
4729
4719
|
export interface WalletAlertUpdateInput {
|
|
4730
4720
|
alert: AlertBaseInput & {
|
|
@@ -7812,6 +7802,72 @@ export interface LifetimeUsageInput {
|
|
|
7812
7802
|
external_historical_usage_amount_cents: number;
|
|
7813
7803
|
};
|
|
7814
7804
|
}
|
|
7805
|
+
export interface AlertObject {
|
|
7806
|
+
/**
|
|
7807
|
+
* Unique identifier of the alert, created by Lago.
|
|
7808
|
+
* @format uuid
|
|
7809
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7810
|
+
*/
|
|
7811
|
+
lago_id: string;
|
|
7812
|
+
/**
|
|
7813
|
+
* Unique identifier of the organization, created by Lago.
|
|
7814
|
+
* @format uuid
|
|
7815
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7816
|
+
*/
|
|
7817
|
+
lago_organization_id: string;
|
|
7818
|
+
/**
|
|
7819
|
+
* The subscription external unique identifier (provided by your own application).
|
|
7820
|
+
* @example "sub_1234567890"
|
|
7821
|
+
*/
|
|
7822
|
+
external_subscription_id: string | null;
|
|
7823
|
+
lago_wallet_id?: null;
|
|
7824
|
+
wallet_code?: null;
|
|
7825
|
+
/** The billable metric associated with the alert. Only for alerts based on a billable metric. */
|
|
7826
|
+
billable_metric: BillableMetricObject;
|
|
7827
|
+
/**
|
|
7828
|
+
* The type of alert.
|
|
7829
|
+
* @example "billable_metric_current_usage_amount"
|
|
7830
|
+
*/
|
|
7831
|
+
alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
|
|
7832
|
+
/**
|
|
7833
|
+
* Unique code used to identify the alert.
|
|
7834
|
+
* @example "storage_threshold_alert"
|
|
7835
|
+
*/
|
|
7836
|
+
code: string;
|
|
7837
|
+
/**
|
|
7838
|
+
* The name of the alert.
|
|
7839
|
+
* @example "Storage Usage Alert"
|
|
7840
|
+
*/
|
|
7841
|
+
name: string | null;
|
|
7842
|
+
/**
|
|
7843
|
+
* Indicates whether the alert is triggered when the monitored metric goes above or below the threshold.
|
|
7844
|
+
* @example "increasing"
|
|
7845
|
+
*/
|
|
7846
|
+
direction?: "increasing" | "decreasing";
|
|
7847
|
+
/**
|
|
7848
|
+
* When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds.
|
|
7849
|
+
* @example 1000
|
|
7850
|
+
*/
|
|
7851
|
+
previous_value: number;
|
|
7852
|
+
/**
|
|
7853
|
+
* The date and time in UTC (ISO 8601) when the system checked if this alert should be triggered. Null until it's processed for the first time.
|
|
7854
|
+
* @format date-time
|
|
7855
|
+
* @example "2025-05-19T10:04:21Z"
|
|
7856
|
+
*/
|
|
7857
|
+
last_processed_at: string | null;
|
|
7858
|
+
/** Array of thresholds associated with the alert. */
|
|
7859
|
+
thresholds: AlertThresholdObject[];
|
|
7860
|
+
/**
|
|
7861
|
+
* The date and time in UTC (ISO 8601) when the alert was created.
|
|
7862
|
+
* @format date-time
|
|
7863
|
+
* @example "2025-03-20T10:00:00Z"
|
|
7864
|
+
*/
|
|
7865
|
+
created_at: string;
|
|
7866
|
+
}
|
|
7867
|
+
export interface Alerts {
|
|
7868
|
+
alerts: AlertObject[];
|
|
7869
|
+
meta?: PaginationMeta;
|
|
7870
|
+
}
|
|
7815
7871
|
export interface AlertCreateInput {
|
|
7816
7872
|
alert: AlertBaseInput & {
|
|
7817
7873
|
/**
|
|
@@ -7844,8 +7900,16 @@ export interface AlertBatchCreateInput {
|
|
|
7844
7900
|
* @example "storage_threshold_alert"
|
|
7845
7901
|
*/
|
|
7846
7902
|
code: string;
|
|
7903
|
+
/**
|
|
7904
|
+
* The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
|
|
7905
|
+
* @example "storage_usage"
|
|
7906
|
+
*/
|
|
7907
|
+
billable_metric_code?: string | null;
|
|
7847
7908
|
})[];
|
|
7848
7909
|
}
|
|
7910
|
+
export interface Alert {
|
|
7911
|
+
alert: AlertObject;
|
|
7912
|
+
}
|
|
7849
7913
|
export interface AlertUpdateInput {
|
|
7850
7914
|
alert: AlertBaseInput & {
|
|
7851
7915
|
/**
|
|
@@ -10166,7 +10230,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10166
10230
|
* @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
|
|
10167
10231
|
* @secure
|
|
10168
10232
|
*/
|
|
10169
|
-
getCustomerWalletAlerts: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<
|
|
10233
|
+
getCustomerWalletAlerts: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<WalletAlerts, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10170
10234
|
/**
|
|
10171
10235
|
* @description This endpoint allows you to create new alerts for a wallet. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.
|
|
10172
10236
|
*
|
|
@@ -10176,7 +10240,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10176
10240
|
* @request POST:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
|
|
10177
10241
|
* @secure
|
|
10178
10242
|
*/
|
|
10179
|
-
createCustomerWalletAlert: (externalCustomerId: string, walletCode: string, data: WalletAlertCreateInput | WalletAlertBatchCreateInput, params?: RequestParams) => Promise<HttpResponse<
|
|
10243
|
+
createCustomerWalletAlert: (externalCustomerId: string, walletCode: string, data: WalletAlertCreateInput | WalletAlertBatchCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletAlerts | WalletAlert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10180
10244
|
/**
|
|
10181
10245
|
* @description This endpoint allows you to delete all alerts for a wallet.
|
|
10182
10246
|
*
|
|
@@ -10196,7 +10260,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10196
10260
|
* @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
|
|
10197
10261
|
* @secure
|
|
10198
10262
|
*/
|
|
10199
|
-
getCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<
|
|
10263
|
+
getCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<WalletAlert, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10200
10264
|
/**
|
|
10201
10265
|
* @description This endpoint allows you to update an existing alert for a wallet.
|
|
10202
10266
|
*
|
|
@@ -10206,7 +10270,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10206
10270
|
* @request PUT:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
|
|
10207
10271
|
* @secure
|
|
10208
10272
|
*/
|
|
10209
|
-
updateCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, data: WalletAlertUpdateInput, params?: RequestParams) => Promise<HttpResponse<
|
|
10273
|
+
updateCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, data: WalletAlertUpdateInput, params?: RequestParams) => Promise<HttpResponse<WalletAlert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10210
10274
|
/**
|
|
10211
10275
|
* @description This endpoint allows you to delete an existing alert for a wallet.
|
|
10212
10276
|
*
|
|
@@ -10216,7 +10280,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10216
10280
|
* @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
|
|
10217
10281
|
* @secure
|
|
10218
10282
|
*/
|
|
10219
|
-
deleteCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<
|
|
10283
|
+
deleteCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<WalletAlert, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10220
10284
|
/**
|
|
10221
10285
|
* @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.
|
|
10222
10286
|
*
|