Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 9 additions & 28 deletions packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
## [2025-09-09] - v0.148.0

### Added:

- Support for Node Pool `label` field ([#12710](https://github.com/linode/manager/pull/12710))
- Volumes IAM RBAC permissions ([#12744](https://github.com/linode/manager/pull/12744))
- NodeBalancers IAM RBAC permissions ([#12780](https://github.com/linode/manager/pull/12780))
- Additional device slots to `Devices` type to match new API limits ([#12791](https://github.com/linode/manager/pull/12791))

### Changed:

- Use `v4beta` API endpoint for `updateNodePool` ([#12710](https://github.com/linode/manager/pull/12710))
- Update `CreateNodePoolData` to satisfy @linode/validation's `CreateNodePoolSchema`'s type ([#12793](https://github.com/linode/manager/pull/12793))

### Fixed:

- Wrong import path for EntityType ([#12764](https://github.com/linode/manager/pull/12764))

### Upcoming Features:

- Add DELETE, PUT API endpoints for Streams ([#12645](https://github.com/linode/manager/pull/12645))
- ACLP Alert: Add `regions` property in `CreateAlertDefinitionPayload` and `EditAlertDefinitionPayload` ([#12745](https://github.com/linode/manager/pull/12745))
- Add DELETE, PUT API endpoints for Destinations ([#12749](https://github.com/linode/manager/pull/12749))

## [2025-08-26] - v0.147.0


### Added:

- ACLP: `CloudPulseServiceType` type for type safety across cloudpulse ([#12646](https://github.com/linode/manager/pull/12646))
- ACLP: `CloudPulseServiceType` type for type safety across cloudpulse ([#12646](https://github.com/linode/manager/pull/12646))

### Changed:

Expand All @@ -41,11 +18,12 @@

- API endpoint for Datastream - Create Destination ([#12627](https://github.com/linode/manager/pull/12627))
- Updated AccontMaintenance interface to make time fields nullable to match API ([#12665](https://github.com/linode/manager/pull/12665))
- Update `KubernetesCluster` `vpc_id` and `subnet_id` types to include `null` ([#12700](https://github.com/linode/manager/pull/12700))
- Update `KubernetesCluster` `vpc_id` and `subnet_id` types to include `null` ([#12700](https://github.com/linode/manager/pull/12700))
- CloudPulse: Update cloud pulse metrics request payload type at `types.ts` ([#12704](https://github.com/linode/manager/pull/12704))

## [2025-08-12] - v0.146.0


### Added:

- ACLP: `string` type for `capabilityServiceTypeMapping` constant ([#12573](https://github.com/linode/manager/pull/12573))
Expand Down Expand Up @@ -73,6 +51,7 @@

## [2025-07-29] - v0.145.0


### Added:

- `VPC Dual Stack` and `VPC IPv6 Large Prefixes` to account capabilities ([#12309](https://github.com/linode/manager/pull/12309))
Expand All @@ -90,13 +69,14 @@
### Upcoming Features:

- CloudPulse: Update service type in `types.ts` ([#12508](https://github.com/linode/manager/pull/12508))
- ACLP-Alerting: Add nodebalancer to AlertServiceType for Alerts onboarding ([#12510](https://github.com/linode/manager/pull/12510))
- ACLP-Alerting: Add nodebalancer to AlertServiceType for Alerts onboarding ([#12510](https://github.com/linode/manager/pull/12510))
- Add vpc_id and subnet_id to KubernetesCluster payload type ([#12513](https://github.com/linode/manager/pull/12513))
- Add API endpoints (GET, POST) for Streams ([#12524](https://github.com/linode/manager/pull/12524))
- ACLP-Alerting: Add firewall to AlertServiceType for Alerts onboarding ([#12550](https://github.com/linode/manager/pull/12550))

## [2025-07-15] - v0.144.0


### Changed:

- ACLP:Alerting - fixed the typo from evaluation_periods_seconds to evaluation_period_seconds ([#12466](https://github.com/linode/manager/pull/12466))
Expand All @@ -116,7 +96,7 @@

### Changed:

- Allow `authorized_keys` to be null in `Profile` type ([#12390](https://github.com/linode/manager/pull/12390))
- Allow `authorized_keys` to be null in `Profile` type ([#12390](https://github.com/linode/manager/pull/12390))

### Removed:

Expand All @@ -134,6 +114,7 @@

## [2025-06-17] - v0.142.0


### Added:

- `has_user_data` to `Linode` type ([#12352](https://github.com/linode/manager/pull/12352))
Expand Down
4 changes: 2 additions & 2 deletions packages/api-v4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@linode/api-v4",
"version": "0.148.0",
"version": "0.147.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down Expand Up @@ -70,4 +70,4 @@
"tsc -p tsconfig.json --noEmit true --emitDeclarationOnly false"
]
}
}
}
4 changes: 0 additions & 4 deletions packages/api-v4/src/account/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,6 @@ export const EventActionKeys = [
'database_migrate',
'database_upgrade',
'destination_create',
'destination_delete',
'destination_update',
'disk_create',
'disk_delete',
'disk_duplicate',
Expand Down Expand Up @@ -472,8 +470,6 @@ export const EventActionKeys = [
'stackscript_revise',
'stackscript_update',
'stream_create',
'stream_delete',
'stream_update',
'subnet_create',
'subnet_delete',
'subnet_update',
Expand Down
3 changes: 1 addition & 2 deletions packages/api-v4/src/cloudpulse/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ export interface CreateAlertDefinitionPayload {
description?: string;
entity_ids?: string[];
label: string;
regions?: string[];
rule_criteria: {
rules: MetricCriteria[];
};
Expand Down Expand Up @@ -338,10 +337,10 @@ export interface EditAlertDefinitionPayload {
description?: string;
entity_ids?: string[];
label?: string;
regions?: string[];
rule_criteria?: {
rules: MetricCriteria[];
};
scope?: AlertDefinitionScope;
severity?: AlertSeverityType;
status?: AlertStatusType;
tags?: string[];
Expand Down
41 changes: 3 additions & 38 deletions packages/api-v4/src/datastream/destinations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { destinationSchema } from '@linode/validation';
import { createDestinationSchema } from '@linode/validation';

import { BETA_API_ROOT } from '../constants';
import Request, {
Expand All @@ -10,11 +10,7 @@ import Request, {
} from '../request';

import type { Filter, ResourcePage as Page, Params } from '../types';
import type {
CreateDestinationPayload,
Destination,
UpdateDestinationPayload,
} from './types';
import type { CreateDestinationPayload, Destination } from './types';

/**
* Returns all the information about a specified Destination.
Expand Down Expand Up @@ -49,38 +45,7 @@ export const getDestinations = (params?: Params, filter?: Filter) =>
*/
export const createDestination = (data: CreateDestinationPayload) =>
Request<Destination>(
setData(data, destinationSchema),
setData(data, createDestinationSchema),
setURL(`${BETA_API_ROOT}/monitor/streams/destinations`),
setMethod('POST'),
);

/**
* Updates a Destination.
*
* @param destinationId { number } The ID of the Destination.
* @param data { object } Options for type, label, etc.
*/
export const updateDestination = (
destinationId: number,
data: UpdateDestinationPayload,
) =>
Request<Destination>(
setData(data, destinationSchema),
setURL(
`${BETA_API_ROOT}/monitor/streams/destinations/${encodeURIComponent(destinationId)}`,
),
setMethod('PUT'),
);

/**
* Deletes a Destination.
*
* @param destinationId { number } The ID of the Destination.
*/
export const deleteDestination = (destinationId: number) =>
Request<{}>(
setURL(
`${BETA_API_ROOT}/monitor/streams/destinations/${encodeURIComponent(destinationId)}`,
),
setMethod('DELETE'),
);
28 changes: 2 additions & 26 deletions packages/api-v4/src/datastream/streams.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createStreamSchema, updateStreamSchema } from '@linode/validation';
import { createStreamSchema } from '@linode/validation';

import { BETA_API_ROOT } from '../constants';
import Request, {
Expand All @@ -10,7 +10,7 @@ import Request, {
} from '../request';

import type { Filter, ResourcePage as Page, Params } from '../types';
import type { CreateStreamPayload, Stream, UpdateStreamPayload } from './types';
import type { CreateStreamPayload, Stream } from './types';

/**
* Returns all the information about a specified Stream.
Expand Down Expand Up @@ -47,27 +47,3 @@ export const createStream = (data: CreateStreamPayload) =>
setURL(`${BETA_API_ROOT}/monitor/streams`),
setMethod('POST'),
);

/**
* Updates a Stream.
*
* @param streamId { number } The ID of the Stream.
* @param data { object } Options for type, status, etc.
*/
export const updateStream = (streamId: number, data: UpdateStreamPayload) =>
Request<Stream>(
setData(data, updateStreamSchema),
setURL(`${BETA_API_ROOT}/monitor/streams/${encodeURIComponent(streamId)}`),
setMethod('PUT'),
);

/**
* Deletes a Stream.
*
* @param streamId { number } The ID of the Stream.
*/
export const deleteStream = (streamId: number) =>
Request<{}>(
setURL(`${BETA_API_ROOT}/monitor/streams/${encodeURIComponent(streamId)}`),
setMethod('DELETE'),
);
21 changes: 1 addition & 20 deletions packages/api-v4/src/datastream/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,33 +103,14 @@ interface CustomHeader {

export interface CreateStreamPayload {
destinations: number[];
details: StreamDetails;
details?: StreamDetails;
label: string;
status?: StreamStatus;
type: StreamType;
}

export interface UpdateStreamPayload {
destinations: number[];
details: StreamDetails;
label: string;
status: StreamStatus;
type: StreamType;
}

export interface UpdateStreamPayloadWithId extends UpdateStreamPayload {
id: number;
}

export interface CreateDestinationPayload {
details: CustomHTTPsDetails | LinodeObjectStorageDetails;
label: string;
type: DestinationType;
}

export type UpdateDestinationPayload = CreateDestinationPayload;

export interface UpdateDestinationPayloadWithId
extends UpdateDestinationPayload {
id: number;
}
Loading
Loading