Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ prettier *args: install
prettier "{src,examples,scripts,test,types}/**/*.{ts,js}" {{ args }}

# ⭐ format all files
format: (prettier "--write --loglevel silent")
format: (prettier "--write --loglevel error")

# verify formatting of files (without changes)
format-check: (prettier "--check")
Expand Down
30 changes: 14 additions & 16 deletions src/resources/Apps/Secrets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,25 +100,23 @@ export interface Secret {
*/
payload?: string | null;

scope: Apps.Secret.Scope;
scope: Secret.Scope;
}
export namespace Apps {
export namespace Secret {
export interface Scope {
/**
* The secret scope type.
*/
type: Scope.Type;
export namespace Secret {
export interface Scope {
/**
* The secret scope type.
*/
type: Scope.Type;

/**
* The user ID, if type is set to "user"
*/
user?: string;
}
/**
* The user ID, if type is set to "user"
*/
user?: string;
}

export namespace Scope {
export type Type = 'account' | 'user';
}
export namespace Scope {
export type Type = 'account' | 'user';
}
}
export namespace Apps {
Expand Down
70 changes: 34 additions & 36 deletions src/resources/Billing/AlertTriggereds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface AlertTriggered {
/**
* The aggregation period for which this alert triggered
*/
aggregation_period?: Billing.AlertTriggered.AggregationPeriod | null;
aggregation_period?: AlertTriggered.AggregationPeriod | null;

/**
* A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.
Expand Down Expand Up @@ -47,7 +47,7 @@ export interface AlertTriggered {
/**
* Populated specifically for spend alerts to notify merchants which group_by entity has the exceeded spend
*/
group_by?: Billing.AlertTriggered.GroupBy | null;
group_by?: AlertTriggered.GroupBy | null;

/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
Expand All @@ -64,39 +64,37 @@ export interface AlertTriggered {
*/
value: Decimal;
}
export namespace Billing {
export namespace AlertTriggered {
export interface AggregationPeriod {
/**
* End time of the aggregation period
*/
ends_at: number;

/**
* Start time of the aggregation period
*/
starts_at: number;
}

export interface GroupBy {
/**
* The billing cadence ID, populated when type is `billing_cadence`
*/
billing_cadence: string | null;

/**
* The pricing plan subscription ID, populated when type is `pricing_plan_subscription`
*/
pricing_plan_subscription: string | null;

/**
* The type of grouping used for this alert notification
*/
type: GroupBy.Type;
}

export namespace GroupBy {
export type Type = 'billing_cadence' | 'pricing_plan_subscription';
}
export namespace AlertTriggered {
export interface AggregationPeriod {
/**
* End time of the aggregation period
*/
ends_at: number;

/**
* Start time of the aggregation period
*/
starts_at: number;
}

export interface GroupBy {
/**
* The billing cadence ID, populated when type is `billing_cadence`
*/
billing_cadence: string | null;

/**
* The pricing plan subscription ID, populated when type is `pricing_plan_subscription`
*/
pricing_plan_subscription: string | null;

/**
* The type of grouping used for this alert notification
*/
type: GroupBy.Type;
}

export namespace GroupBy {
export type Type = 'billing_cadence' | 'pricing_plan_subscription';
}
}
Loading
Loading