Skip to content

Commit 78d384e

Browse files
authored
Merge pull request #12509 from linode/staging
Release v1.146.0 - staging → master
2 parents 29ffceb + 6ccb5e9 commit 78d384e

File tree

559 files changed

+12787
-6612
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

559 files changed

+12787
-6612
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ lib
1010

1111
# editor configuration
1212
.vscode
13+
.cursor
1314
.idea
1415
**/*.iml
1516
*.mdc

docs/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Feel free to open an issue to report a bug or request a feature.
3939
`Added`, `Fixed`, `Changed`, `Removed`, `Tech Stories`, `Tests`, `Upcoming Features`
4040
- Select the changeset category that matches the commit type in your PR title. (Where this isn't a 1:1 match: generally, a `feat` commit type falls under an `Added` change and `refactor` falls under `Tech Stories`.)
4141
- Write your changeset by following our [best practices](#writing-a-changeset).
42+
9. Automated tests and other CI checks will run automatically against the PR. It is the contributor's responsibility to ensure their changes pass the CI checks.
4243

4344
Two reviews from members of the Cloud Manager team are required before merge. After approval, all pull requests are squash merged.
4445

docs/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Please specify a release date (and environment, if applicable) to guarantee time
7272

7373
## As an Author, before moving this PR from Draft to Open, I confirmed ✅
7474

75-
- [ ] All unit tests are passing
75+
- [ ] All tests and CI checks are passing
7676
- [ ] TypeScript compilation succeeded without errors
7777
- [ ] Code passes all linting rules
7878

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"test:search": "pnpm run --filter @linode/search test",
5252
"test:ui": "pnpm run --filter @linode/ui test",
5353
"test:utilities": "pnpm run --filter @linode/utilities test",
54+
"test:shared": "pnpm run --filter @linode/shared test",
5455
"coverage": "pnpm run --filter linode-manager coverage",
5556
"coverage:summary": "pnpm run --filter linode-manager coverage:summary",
5657
"cy:run": "pnpm run --filter linode-manager cy:run",

packages/api-v4/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## [2025-07-15] - v0.144.0
2+
3+
4+
### Changed:
5+
6+
- ACLP:Alerting - fixed the typo from evaluation_periods_seconds to evaluation_period_seconds ([#12466](https://github.com/linode/manager/pull/12466))
7+
- Use `v4beta` for `/maintenance` endpoint ([#12519](https://github.com/linode/manager/pull/12519))
8+
9+
### Fixed:
10+
11+
- Unnecessary 404 errors when components attempt to fetch deleted resources ([#12474](https://github.com/linode/manager/pull/12474))
12+
13+
### Upcoming Features:
14+
15+
- CloudPulse: Update types in `alerts.ts` and `types.ts`; Linode: Update type in `types.ts` ([#12393](https://github.com/linode/manager/pull/12393))
16+
- CloudPulse: Update service type in `types.ts` ([#12401](https://github.com/linode/manager/pull/12401))
17+
- Add `regions` in `Alert` interface in `types.ts` file for cloudpulse ([#12435](https://github.com/linode/manager/pull/12435))
18+
119
## [2025-07-01] - v0.143.0
220

321
### Changed:

packages/api-v4/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@linode/api-v4",
3-
"version": "0.143.0",
3+
"version": "0.144.0",
44
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
55
"bugs": {
66
"url": "https://github.com/linode/manager/issues"

packages/api-v4/src/account/maintenance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { API_ROOT, BETA_API_ROOT } from '../constants';
1+
import { BETA_API_ROOT } from '../constants';
22
import Request, { setMethod, setParams, setURL, setXFilter } from '../request';
33

44
import type { Filter, Params, ResourcePage } from '../types';
@@ -12,7 +12,7 @@ import type { AccountMaintenance, MaintenancePolicy } from './types';
1212
*/
1313
export const getAccountMaintenance = (params?: Params, filter?: Filter) =>
1414
Request<ResourcePage<AccountMaintenance>>(
15-
setURL(`${API_ROOT}/account/maintenance`),
15+
setURL(`${BETA_API_ROOT}/account/maintenance`),
1616
setMethod('GET'),
1717
setParams(params),
1818
setXFilter(filter),

packages/api-v4/src/cloudpulse/alerts.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import type { Filter, Params, ResourcePage } from '../types';
1616
import type {
1717
Alert,
1818
AlertServiceType,
19+
CloudPulseAlertsPayload,
1920
CreateAlertDefinitionPayload,
2021
EditAlertDefinitionPayload,
2122
NotificationChannel,
@@ -126,3 +127,16 @@ export const deleteAlertDefinition = (serviceType: string, alertId: number) =>
126127
),
127128
setMethod('DELETE'),
128129
);
130+
131+
export const updateServiceAlerts = (
132+
serviceType: string,
133+
entityId: string,
134+
payload: CloudPulseAlertsPayload,
135+
) =>
136+
Request<{}>(
137+
setURL(
138+
`${API_ROOT}/${serviceType}/instances/${encodeURIComponent(entityId)}`,
139+
),
140+
setMethod('PUT'),
141+
setData(payload),
142+
);

packages/api-v4/src/cloudpulse/types.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import type { AccountCapability } from 'src/account';
2+
13
export type AlertSeverityType = 0 | 1 | 2 | 3;
24
export type MetricAggregationType = 'avg' | 'count' | 'max' | 'min' | 'sum';
35
export type MetricOperatorType = 'eq' | 'gt' | 'gte' | 'lt' | 'lte';
46
export type AlertServiceType = 'dbaas' | 'linode';
7+
export type MetricsServiceType = 'dbaas' | 'linode' | 'nodebalancer';
58
export type AlertClass = 'dedicated' | 'shared';
69
export type DimensionFilterOperatorType =
710
| 'endswith'
@@ -165,7 +168,7 @@ export interface CloudPulseMetricsList {
165168
}
166169

167170
export interface ServiceAlert {
168-
evaluation_periods_seconds: number[];
171+
evaluation_period_seconds: number[];
169172
polling_interval_seconds: number[];
170173
scope: AlertDefinitionScope[];
171174
}
@@ -238,6 +241,7 @@ export interface Alert {
238241
has_more_resources: boolean;
239242
id: number;
240243
label: string;
244+
regions?: string[];
241245
rule_criteria: {
242246
rules: AlertDefinitionMetricCriteria[];
243247
};
@@ -366,10 +370,18 @@ export interface CloudPulseAlertsPayload {
366370
* Array of enabled system alert IDs in ACLP (Beta) mode.
367371
* Only included in Beta mode.
368372
*/
369-
system: number[];
373+
system?: number[];
370374
/**
371375
* Array of enabled user alert IDs in ACLP (Beta) mode.
372376
* Only included in Beta mode.
373377
*/
374-
user: number[];
375-
}
378+
user?: number[];
379+
}
380+
export const capabilityServiceTypeMapping: Record<
381+
MetricsServiceType,
382+
AccountCapability
383+
> = {
384+
linode: 'Linodes',
385+
dbaas: 'Managed Databases',
386+
nodebalancer: 'NodeBalancers',
387+
};

packages/api-v4/src/iam/types.ts

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -64,46 +64,32 @@ export type EntityRoleType =
6464

6565
export type RoleName = AccountRoleType | EntityRoleType;
6666

67-
/** Permissions associated with the "account_admin" role. */
67+
/**
68+
* Permissions associated with the "account_admin" role.
69+
* Note: Permissions associated with profile have been excluded as all users have access to their own profile.
70+
* This is to align with the permissions API array.
71+
*/
6872
export type AccountAdmin =
6973
| 'accept_service_transfer'
7074
| 'acknowledge_account_agreement'
71-
| 'answer_profile_security_questions'
7275
| 'cancel_account'
7376
| 'cancel_service_transfer'
74-
| 'create_profile_pat'
75-
| 'create_profile_ssh_key'
76-
| 'create_profile_tfa_secret'
7777
| 'create_service_transfer'
7878
| 'create_user'
79-
| 'delete_profile_pat'
80-
| 'delete_profile_phone_number'
81-
| 'delete_profile_ssh_key'
8279
| 'delete_user'
83-
| 'disable_profile_tfa'
8480
| 'enable_managed'
85-
| 'enable_profile_tfa'
8681
| 'enroll_beta_program'
8782
| 'is_account_admin'
8883
| 'list_account_agreements'
8984
| 'list_account_logins'
9085
| 'list_available_services'
9186
| 'list_default_firewalls'
92-
| 'list_enrolled_beta_programs'
9387
| 'list_service_transfers'
9488
| 'list_user_grants'
95-
| 'revoke_profile_app'
96-
| 'revoke_profile_device'
97-
| 'send_profile_phone_number_verification_code'
9889
| 'update_account'
9990
| 'update_account_settings'
100-
| 'update_profile'
101-
| 'update_profile_pat'
102-
| 'update_profile_ssh_key'
10391
| 'update_user'
10492
| 'update_user_grants'
105-
| 'update_user_preferences'
106-
| 'verify_profile_phone_number'
10793
| 'view_account'
10894
| 'view_account_login'
10995
| 'view_account_settings'
@@ -114,13 +100,8 @@ export type AccountAdmin =
114100
| 'view_user'
115101
| 'view_user_preferences'
116102
| AccountBillingAdmin
117-
| AccountEventViewer
118103
| AccountFirewallAdmin
119-
| AccountLinodeAdmin
120-
| AccountMaintenanceViewer
121-
| AccountNotificationViewer
122-
| AccountOauthClientAdmin
123-
| AccountProfileViewer;
104+
| AccountLinodeAdmin;
124105

125106
/** Permissions associated with the "account_billing_admin" role. */
126107
export type AccountBillingAdmin =

0 commit comments

Comments
 (0)