Skip to content

Commit 66a1f06

Browse files
Merge pull request #12392 from linode/staging
Release v.1.144.0 - staging → master
2 parents be09b1a + 78551d4 commit 66a1f06

File tree

542 files changed

+16045
-7938
lines changed

Some content is hidden

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

542 files changed

+16045
-7938
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"typescript-eslint": "^8.29.0",
2828
"@typescript-eslint/eslint-plugin": "^8.29.0",
2929
"@typescript-eslint/parser": "^8.29.0",
30-
"@linode/eslint-plugin-cloud-manager": "^0.0.10"
30+
"@linode/eslint-plugin-cloud-manager": "^0.0.11"
3131
},
3232
"scripts": {
3333
"lint:all": "pnpm -r --parallel lint",

packages/api-v4/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
## [2025-06-17] - v0.142.0
2+
3+
4+
### Added:
5+
6+
- `has_user_data` to `Linode` type ([#12352](https://github.com/linode/manager/pull/12352))
7+
8+
### Changed:
9+
10+
- Make AccountMaintenance description field type more specific ([#12293](https://github.com/linode/manager/pull/12293))
11+
- Include `private_network` in BaseDatabase type ([#12324](https://github.com/linode/manager/pull/12324))
12+
- Make `placement_group` defined but nullable in `Linode` type ([#12352](https://github.com/linode/manager/pull/12352))
13+
- Make PrivateNetwork public_access property optional and UpdateDatabasePayload private_network property optional ([#12354](https://github.com/linode/manager/pull/12354))
14+
15+
### Upcoming Features:
16+
17+
- IAM RBAC: Add role and new entity types ([#12296](https://github.com/linode/manager/pull/12296))
18+
- Add ACLP `getCloudPulseServiceByServiceType` service and update `ServiceTypes` per API specs ([#12307](https://github.com/linode/manager/pull/12307))
19+
- IAM RBAC: implement the two new APIs and renamed old endpoints and queries to align terminology with the current focus on roles ([#12344](https://github.com/linode/manager/pull/12344))
20+
- Change references of `interface` to `linode_interface` for firewall types ([#12367](https://github.com/linode/manager/pull/12367))
21+
122
## [2025-06-03] - v0.141.0
223

324
### Added:

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.141.0",
3+
"version": "0.142.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/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ export interface SaveCreditCardData {
570570

571571
export interface AccountMaintenance {
572572
complete_time: string;
573-
description: string;
573+
description: 'emergency' | 'scheduled';
574574
entity: {
575575
id: number;
576576
label: string;

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import type {
1212
JWEToken,
1313
JWETokenPayLoad,
1414
MetricDefinition,
15+
ServiceTypes,
1516
ServiceTypesList,
1617
} from './types';
1718
import type { Filter, Params, ResourcePage } from 'src/types';
@@ -48,3 +49,9 @@ export const getCloudPulseServiceTypes = () =>
4849
setURL(`${API_ROOT}/monitor/services`),
4950
setMethod('GET'),
5051
);
52+
53+
export const getCloudPulseServiceByServiceType = (serviceType: string) =>
54+
Request<ServiceTypes>(
55+
setURL(`${API_ROOT}/monitor/services/${encodeURIComponent(serviceType)}`),
56+
setMethod('GET'),
57+
);

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,14 @@ export interface CloudPulseMetricsList {
164164
}
165165

166166
export interface ServiceTypes {
167+
alert: {
168+
evaluation_periods_seconds: number[];
169+
polling_interval_seconds: number[];
170+
scope: string[];
171+
};
172+
is_beta: boolean;
167173
label: string;
174+
regions: string;
168175
service_type: string;
169176
}
170177

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export interface DatabaseInstance {
128128
export type ClusterSize = 1 | 2 | 3;
129129

130130
export interface PrivateNetwork {
131-
public_access: boolean;
131+
public_access?: boolean;
132132
subnet_id: null | number;
133133
vpc_id: null | number;
134134
}
@@ -196,6 +196,7 @@ export interface PendingUpdates {
196196
// Database is the base interface for the shape of data returned by /databases/{engine}/instances
197197
interface BaseDatabase extends DatabaseInstance {
198198
port: number;
199+
private_network?: null | PrivateNetwork; // TODO (UIE-8831): Confirm whether this still needs to be optional (?) post VPC release.
199200
/** @Deprecated used by rdbms-legacy only, rdbms-default always uses TLS */
200201
ssl_connection: boolean;
201202
total_disk_size_gb: number;
@@ -240,6 +241,7 @@ export interface UpdateDatabasePayload {
240241
cluster_size?: number;
241242
engine_config?: DatabaseInstanceAdvancedConfig;
242243
label?: string;
244+
private_network?: null | PrivateNetwork;
243245
type?: string;
244246
updates?: UpdatesSchedule;
245247
version?: string;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ export type EntityType =
44
| 'firewall'
55
| 'image'
66
| 'linode'
7+
| 'lkecluster'
78
| 'longview'
89
| 'nodebalancer'
10+
| 'placement_group'
911
| 'stackscript'
1012
| 'volume'
1113
| 'vpc';

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ export type FirewallStatus = 'deleted' | 'disabled' | 'enabled';
22

33
export type FirewallRuleProtocol = 'ALL' | 'ICMP' | 'IPENCAP' | 'TCP' | 'UDP';
44

5-
export type FirewallDeviceEntityType = 'interface' | 'linode' | 'nodebalancer';
5+
export type FirewallDeviceEntityType =
6+
| 'linode'
7+
| 'linode_interface'
8+
| 'nodebalancer';
69

710
export type FirewallPolicyType = 'ACCEPT' | 'DROP';
811

@@ -68,7 +71,7 @@ export interface FirewallTemplate {
6871

6972
export interface CreateFirewallPayload {
7073
devices?: null | {
71-
interfaces?: number[];
74+
linode_interfaces?: number[];
7275
linodes?: number[];
7376
nodebalancers?: number[];
7477
};

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

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,43 @@
11
import { BETA_API_ROOT } from '../constants';
22
import Request, { setData, setMethod, setURL } from '../request';
33

4-
import type { IamAccountPermissions, IamUserPermissions } from './types';
4+
import type {
5+
EntityTypePermissions,
6+
IamAccountRoles,
7+
IamUserRoles,
8+
PermissionType,
9+
} from './types';
510

611
/**
7-
* getUserPermissions
12+
* getUserRoles
813
*
914
* Returns the full permissions structure for this User. This includes all entities on
1015
* the Account alongside what level of access this User has to each of them.
1116
*
12-
* @param username { number } the username to look up.
17+
* @param username { string } the username to look up.
1318
*
1419
*/
15-
export const getUserPermissions = (username: string) =>
16-
Request<IamUserPermissions>(
20+
export const getUserRoles = (username: string) =>
21+
Request<IamUserRoles>(
1722
setURL(
1823
`${BETA_API_ROOT}/iam/users/${encodeURIComponent(
1924
username,
2025
)}/role-permissions`,
2126
),
2227
setMethod('GET'),
2328
);
29+
2430
/**
25-
* updateUserPermissions
31+
* updateUserRoles
2632
*
27-
* Update the permissions a User has.
33+
* Update the roles a User has.
2834
*
29-
* @param username { number } ID of the client to be viewed.
30-
* @param data { object } the Permissions object to update.
35+
* @param username { string } username of the user to be updated.
36+
* @param data { object } the Roles object to update.
3137
*
3238
*/
33-
export const updateUserPermissions = (
34-
username: string,
35-
data: IamUserPermissions,
36-
) =>
37-
Request<IamUserPermissions>(
39+
export const updateUserRoles = (username: string, data: IamUserRoles) =>
40+
Request<IamUserRoles>(
3841
setURL(
3942
`${BETA_API_ROOT}/iam/users/${encodeURIComponent(
4043
username,
@@ -45,14 +48,55 @@ export const updateUserPermissions = (
4548
);
4649

4750
/**
48-
* getAccountPermissions
51+
* getAccountRoles
4952
*
50-
* Return all permissions for account.
53+
* Return all roles for account.
5154
*
5255
*/
53-
export const getAccountPermissions = () => {
54-
return Request<IamAccountPermissions>(
56+
export const getAccountRoles = () => {
57+
return Request<IamAccountRoles>(
5558
setURL(`${BETA_API_ROOT}/iam/role-permissions`),
5659
setMethod('GET'),
5760
);
5861
};
62+
63+
/**
64+
* getUserAccountPermissions
65+
*
66+
* Returns the current permissions for this User on the account.
67+
*
68+
* @param username { string } the username to look up.
69+
*
70+
*/
71+
export const getUserAccountPermissions = (username: string) =>
72+
Request<PermissionType[]>(
73+
setURL(
74+
`${BETA_API_ROOT}/iam/users/${encodeURIComponent(
75+
username,
76+
)}/permissions/account`,
77+
),
78+
setMethod('GET'),
79+
);
80+
81+
/**
82+
* getUserEntityPermissions
83+
*
84+
* Returns the current permissions for this User on the entity.
85+
*
86+
* @param username { string } the username to look up.
87+
* @param entityType { EntityTypePermissions } the entityType to look up.
88+
* @param entityId { number } the entityId to look up.
89+
*/
90+
export const getUserEntityPermissions = (
91+
username: string,
92+
entityType: EntityTypePermissions,
93+
entityId: number,
94+
) =>
95+
Request<PermissionType[]>(
96+
setURL(
97+
`${BETA_API_ROOT}/iam/users/${encodeURIComponent(
98+
username,
99+
)}/permissions/${entityType}/${entityId}`,
100+
),
101+
setMethod('GET'),
102+
);

0 commit comments

Comments
 (0)