Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Types update #4523

Closed
wants to merge 1 commit into from
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
34 changes: 19 additions & 15 deletions src/js/api/types/AuthSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,36 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { IdentityData } from "./IdentityData";
/**
* AuthSet describes the identity a device use to authenticate with the Mender servier.
* Authentication data set
*/
export type AuthSet = {
/**
* The unique ID of the authentication set.
* Authentication data set ID.
*/
id?: string;
/**
* The unique ID of the device the authentication set belongs.
*/
device_id?: string;
/**
* The identity data presented by the device.
*/
identity_data?: Record<string, any>;
/**
* PEM-encoded public key of the device authentication set.
* The device's public key (PEM encoding), generated by the device or pre-provisioned by the vendor. Currently supported public algorithms are: RSA, ED25519 and ECDSA.
*/
pubkey?: string;
identity_data?: IdentityData;
status?: AuthSet.status;
/**
* Authentication status of the set.
* Created timestamp
*/
status?: string;
ts?: string;
/**
* The creation timestamp of the authentication set.
* Device ID connected to authentication data set
*/
ts?: string;
device_id?: string;
};
export namespace AuthSet {
export enum status {
PENDING = "pending",
ACCEPTED = "accepted",
REJECTED = "rejected",
PREAUTHORIZED = "preauthorized",
NOAUTH = "noauth",
}
}
33 changes: 33 additions & 0 deletions src/js/api/types/AuthSetIot_manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
/**
* AuthSet describes the identity a device use to authenticate with the Mender servier.
*/
export type AuthSetIot_manager = {
/**
* The unique ID of the authentication set.
*/
id?: string;
/**
* The unique ID of the device the authentication set belongs.
*/
device_id?: string;
/**
* The identity data presented by the device.
*/
identity_data?: Record<string, any>;
/**
* PEM-encoded public key of the device authentication set.
*/
pubkey?: string;
/**
* Authentication status of the set.
*/
status?: string;
/**
* The creation timestamp of the authentication set.
*/
ts?: string;
};
90 changes: 3 additions & 87 deletions src/js/api/types/Deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DeploymentPhase } from "./DeploymentPhase";
import type { DeploymentStatistics } from "./DeploymentStatistics";
import type { Filter } from "./Filter";
/**
* The deployment descriptor.
*/
export type Deployment = {
/**
* Deployment identifier
*/
id: string;
/**
* Name of the deployment
*/
name: string;
/**
* Name of the artifact to deploy
*/
artifact_name: string;
/**
* Deployment's creation date and time
*/
created: string;
/**
* Deployment's completion date and time
*/
finished?: string;
/**
* Status of the deployment
*/
status: Deployment.status;
/**
* Number of devices the deployment acted upon
*/
device_count: number;
/**
* An array of artifact's identifiers.
*/
artifacts?: Array<string>;
/**
* An array of groups the devices targeted by the deployment belong to.
* Available only if the user created the deployment for a group or a single device (if the device was in a static group).
*/
groups?: Array<string>;
phases?: Array<DeploymentPhase>;
/**
* The number of times a device can retry the deployment in case of failure, defaults to 0
*/
retries?: number;
/**
* A valid JSON object defining the update control map.
* *NOTE*: Available only in the Enterprise plan.
*/
update_control_map?: Record<string, any>;
/**
* max_devices denotes a limit on a number of completed deployments (failed or successful) above which the dynamic deployment will be finished.
*/
max_devices?: number;
/**
* In case of dynamic deployments this is a number of devices targeted initially (maching the filter at the moment of deployment creation).
*/
initial_device_count?: number;
/**
* Flag indicating if the deployment is dynamic or not.
*/
dynamic?: boolean;
filter?: Filter;
type?: Deployment.type;
/**
* A string containing a configuration object provided
* with the deployment constructor.
*/
configuration?: string;
/**
* The flag idicating if the autogeneration of delta artifacts is enabled for a given deployment.
*/
autogenerate_delta?: boolean;
statistics?: DeploymentStatistics;
};
export namespace Deployment {
/**
* Status of the deployment
*/
export enum status {
SCHEDULED = "scheduled",
PENDING = "pending",
INPROGRESS = "inprogress",
FINISHED = "finished",
}
export enum type {
CONFIGURATION = "configuration",
SOFTWARE = "software",
}
}
6 changes: 1 addition & 5 deletions src/js/api/types/DeploymentDeployments.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { DeploymentPhase } from "./DeploymentPhase";
import type { DeploymentStatistics } from "./DeploymentStatistics";
import type { Filter } from "./Filter";

export type DeploymentDeployments = {
/**
* Deployment identifier
Expand Down Expand Up @@ -80,7 +78,6 @@ export type DeploymentDeployments = {
autogenerate_delta?: boolean;
statistics?: DeploymentStatistics;
};

export namespace DeploymentDeployments {
/**
* Status of the deployment
Expand All @@ -91,7 +88,6 @@ export namespace DeploymentDeployments {
INPROGRESS = "inprogress",
FINISHED = "finished",
}

export enum type {
CONFIGURATION = "configuration",
SOFTWARE = "software",
Expand Down
43 changes: 28 additions & 15 deletions src/js/api/types/Device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,41 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DeviceStatus } from "./DeviceStatus";
import type { AuthSet } from "./AuthSet";
import type { ExternalIdentity } from "./ExternalIdentity";
import type { IdentityData } from "./IdentityData";
export type Device = {
/**
* Device identifier.
* Mender assigned Device ID.
*/
id: string;
status: DeviceStatus;
created?: string;
started?: string;
finished?: string;
deleted?: string;
device_type?: string;
id?: string;
identity_data?: IdentityData;
status?: Device.status;
/**
* Availability of the device's deployment log.
* Created timestamp
*/
log: boolean;
created_ts?: string;
/**
* State reported by device
* Updated timestamp
*/
state?: string;
updated_ts?: string;
/**
* Additional state information
* Time when accepted device contacted server for the last time.
*/
substate?: string;
check_in_time?: string;
auth_sets?: Array<AuthSet>;
/**
* Devices that are part of ongoing decommissioning process will return True
*/
decommissioning?: boolean;
external_id?: ExternalIdentity;
};
export namespace Device {
export enum status {
PENDING = "pending",
ACCEPTED = "accepted",
REJECTED = "rejected",
PREAUTHORIZED = "preauthorized",
NOAUTH = "noauth",
}
}
4 changes: 1 addition & 3 deletions src/js/api/types/DeviceDeployments.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { DeviceStatus } from "./DeviceStatus";

export type DeviceDeployments = {
/**
* Device identifier.
Expand Down
26 changes: 4 additions & 22 deletions src/js/api/types/DeviceState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,11 @@
/* eslint-disable */
export type DeviceState = {
/**
* Device ID.
* The desired state for the device, as reported by the cloud/user.
*/
device_id?: string;
desired?: any;
/**
* Device status.
* State reported by the device, this cannot be changed from the cloud.
*/
status?: DeviceState.status;
/**
* Server-side timestamp of the last device information update.
*/
updated_ts?: string;
/**
* Server-side timestamp of the device creation.
*/
created_ts?: string;
reported?: any;
};
export namespace DeviceState {
/**
* Device status.
*/
export enum status {
CONNECTED = "connected",
DISCONNECTED = "disconnected",
UNKNOWN = "unknown",
}
}
3 changes: 1 addition & 2 deletions src/js/api/types/DeviceStateDeviceconnect.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

export type DeviceStateDeviceconnect = {
/**
* Device ID.
Expand All @@ -20,7 +20,6 @@ export type DeviceStateDeviceconnect = {
*/
created_ts?: string;
};

export namespace DeviceStateDeviceconnect {
/**
* Device status.
Expand Down
4 changes: 0 additions & 4 deletions src/js/api/types/Error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,4 @@ export type Error = {
* Description of the error.
*/
error?: string;
/**
* Request ID (same as in X-MEN-RequestID header).
*/
request_id?: string;
};
17 changes: 9 additions & 8 deletions src/js/api/types/MenderTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export type { ArtifactUploadLink } from "./ArtifactUploadLink";
export type { Attribute } from "./Attribute";
export type { AttributeInventory } from "./AttributeInventory";
export { AuditLog } from "./AuditLog";
export type { AuthSet } from "./AuthSet";
export { AuthSetDeviceauth } from "./AuthSetDeviceauth";
export { AuthSet } from "./AuthSet";
export type { AuthSetIot_manager } from "./AuthSetIot_manager";
export type { AutoAuthRequest } from "./AutoAuthRequest";
export type { AWSCredentials } from "./AWSCredentials";
export type { AzureSharedAccessSecret } from "./AzureSharedAccessSecret";
Expand All @@ -46,22 +46,22 @@ export { Credentials } from "./Credentials";
export type { DBusSubsystem } from "./DBusSubsystem";
export type { DeltaConfiguration } from "./DeltaConfiguration";
export type { DeltaConfigurationDeployments } from "./DeltaConfigurationDeployments";
export { Deployment } from "./Deployment";
export type { DeploymentAuditlogs } from "./DeploymentAuditlogs";
export type { Deployment } from "./Deployment";
export { DeploymentDeployments } from "./DeploymentDeployments";
export type { DeploymentIdentifier } from "./DeploymentIdentifier";
export type { DeploymentPhase } from "./DeploymentPhase";
export type { DeploymentStatistics } from "./DeploymentStatistics";
export type { DeploymentStatusStatistics } from "./DeploymentStatusStatistics";
export type { Device } from "./Device";
export { Device } from "./Device";
export type { DeviceAuditlogs } from "./DeviceAuditlogs";
export type { DeviceAuthEvent } from "./DeviceAuthEvent";
export type { DeviceConfiguration } from "./DeviceConfiguration";
export type { DeviceDeployment } from "./DeviceDeployment";
export { DeviceDeviceauth } from "./DeviceDeviceauth";
export type { DeviceDeployments } from "./DeviceDeployments";
export type { DeviceInventory } from "./DeviceInventory";
export type { DeviceInventoryInventory } from "./DeviceInventoryInventory";
export { DeviceState } from "./DeviceState";
export type { DeviceStateIot_manager } from "./DeviceStateIot_manager";
export type { DeviceState } from "./DeviceState";
export { DeviceStateDeviceconnect } from "./DeviceStateDeviceconnect";
export { DeviceStatus } from "./DeviceStatus";
export type { DeviceWithImage } from "./DeviceWithImage";
export type { DirectUploadMetadata } from "./DirectUploadMetadata";
Expand Down Expand Up @@ -167,6 +167,7 @@ export type { TenantShortInfo } from "./TenantShortInfo";
export type { TenantsIdName } from "./TenantsIdName";
export { TenantTenantadm } from "./TenantTenantadm";
export type { Update } from "./Update";
export type { UpdateChildTenant } from "./UpdateChildTenant";
export type { UpdateDeployments } from "./UpdateDeployments";
export type { UpdateFile } from "./UpdateFile";
export type { UpdateFileDeployments } from "./UpdateFileDeployments";
Expand Down
4 changes: 4 additions & 0 deletions src/js/api/types/NewTenant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ export type NewTenant = {
*/
addons?: Array<string>;
binary_delta?: DeltaConfiguration;
/**
* Enable SSO for the tenant.
*/
sso?: boolean;
};
Loading