Skip to content

Commit

Permalink
Merge pull request #122 from huwshimi/fix-required-params
Browse files Browse the repository at this point in the history
Fix required params
  • Loading branch information
huwshimi authored Feb 1, 2024
2 parents 3c0e170 + 067b321 commit c240f77
Show file tree
Hide file tree
Showing 197 changed files with 2,421 additions and 2,235 deletions.
2 changes: 1 addition & 1 deletion api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ class Connection {
};

// Handle facades.
const loginSupportedFacades: FacadeVersions[] = loginResult.facades;
const loginSupportedFacades: FacadeVersions[] = loginResult.facades ?? [];
const clientRequestedFacades = facades.reduce(
(facadeVersions: { [k: string]: FacadeClassList }, current) => {
if ("versions" in current) {
Expand Down
2 changes: 1 addition & 1 deletion api/facades/action-pruner/ActionPrunerV1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Models
NOTE: This file was generated using the Juju schema
from Juju 3.2.1 at the git SHA 06eb3f6c7c.
from Juju 3.3 at the git SHA 65fa4c1ee5.
Do not manually edit this file.
*/

Expand Down
68 changes: 34 additions & 34 deletions api/facades/action/ActionV6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ export interface ActionMessage {
}

export interface ActionResult {
action: Action;
completed: string;
enqueued: string;
error: Error;
log: ActionMessage[];
message: string;
output: AdditionalProperties;
started: string;
status: string;
action?: Action;
completed?: string;
enqueued?: string;
error?: Error;
log?: ActionMessage[];
message?: string;
output?: AdditionalProperties;
started?: string;
status?: string;
}

export interface ActionResults {
results: ActionResult[];
results?: ActionResult[];
}

export interface ActionSpec {
Expand All @@ -47,37 +47,37 @@ export interface ActionSpec {
}

export interface Actions {
actions: Action[];
actions?: Action[];
}

export interface ActionsByName {
actions: ActionResult[];
error: Error;
name: string;
actions?: ActionResult[];
error?: Error;
name?: string;
}

export interface ActionsByNames {
actions: ActionsByName[];
actions?: ActionsByName[];
}

export interface ActionsByReceiver {
actions: ActionResult[];
error: Error;
receiver: string;
actions?: ActionResult[];
error?: Error;
receiver?: string;
}

export interface ActionsByReceivers {
actions: ActionsByReceiver[];
actions?: ActionsByReceiver[];
}

export interface ApplicationCharmActionsResult {
actions: AdditionalProperties;
"application-tag": string;
error: Error;
actions?: Record<string, ActionSpec>;
"application-tag"?: string;
error?: Error;
}

export interface ApplicationsCharmActionsResults {
results: ApplicationCharmActionsResult[];
results?: ApplicationCharmActionsResult[];
}

export interface EnqueuedActions {
Expand All @@ -100,25 +100,25 @@ export interface Error {
}

export interface FindActionsByNames {
names: string[];
names?: string[];
}

export interface FindTags {
prefixes: string[];
}

export interface FindTagsResults {
matches: AdditionalProperties;
matches: Record<string, Entity[]>;
}

export interface OperationQueryArgs {
actions: string[];
applications: string[];
limit: number;
machines: string[];
offset: number;
status: string[];
units: string[];
actions?: string[];
applications?: string[];
limit?: number;
machines?: string[];
offset?: number;
status?: string[];
units?: string[];
}

export interface OperationResult {
Expand All @@ -133,8 +133,8 @@ export interface OperationResult {
}

export interface OperationResults {
results: OperationResult[];
truncated: boolean;
results?: OperationResult[];
truncated?: boolean;
}

export interface RunParams {
Expand Down
50 changes: 25 additions & 25 deletions api/facades/action/ActionV7.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Models
NOTE: This file was generated using the Juju schema
from Juju 3.2.1 at the git SHA 06eb3f6c7c.
from Juju 3.3 at the git SHA 65fa4c1ee5.
Do not manually edit this file.
*/

Expand All @@ -28,19 +28,19 @@ export interface ActionMessage {
}

export interface ActionResult {
action: Action;
completed: string;
enqueued: string;
error: Error;
log: ActionMessage[];
message: string;
output: AdditionalProperties;
started: string;
status: string;
action?: Action;
completed?: string;
enqueued?: string;
error?: Error;
log?: ActionMessage[];
message?: string;
output?: AdditionalProperties;
started?: string;
status?: string;
}

export interface ActionResults {
results: ActionResult[];
results?: ActionResult[];
}

export interface ActionSpec {
Expand All @@ -49,17 +49,17 @@ export interface ActionSpec {
}

export interface Actions {
actions: Action[];
actions?: Action[];
}

export interface ApplicationCharmActionsResult {
actions: Record<string, ActionSpec>;
"application-tag": string;
error: Error;
actions?: Record<string, ActionSpec>;
"application-tag"?: string;
error?: Error;
}

export interface ApplicationsCharmActionsResults {
results: ApplicationCharmActionsResult[];
results?: ApplicationCharmActionsResult[];
}

export interface EnqueuedActions {
Expand All @@ -82,13 +82,13 @@ export interface Error {
}

export interface OperationQueryArgs {
actions: string[];
applications: string[];
limit: number;
machines: string[];
offset: number;
status: string[];
units: string[];
actions?: string[];
applications?: string[];
limit?: number;
machines?: string[];
offset?: number;
status?: string[];
units?: string[];
}

export interface OperationResult {
Expand All @@ -104,8 +104,8 @@ export interface OperationResult {
}

export interface OperationResults {
results: OperationResult[];
truncated: boolean;
results?: OperationResult[];
truncated?: boolean;
}

export interface RunParams {
Expand Down
22 changes: 11 additions & 11 deletions api/facades/admin/AdminV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Models
NOTE: This file was generated using the Juju schema
from Juju 3.2.1 at the git SHA 06eb3f6c7c.
from Juju 3.3 at the git SHA 65fa4c1ee5.
Do not manually edit this file.
*/

Expand Down Expand Up @@ -68,16 +68,16 @@ export interface LoginRequest {
}

export interface LoginResult {
"bakery-discharge-required": Macaroon;
"controller-tag": string;
"discharge-required": Macaroon;
"discharge-required-error": string;
facades: FacadeVersions[];
"model-tag": string;
"public-dns-name": string;
"server-version": string;
servers: HostPort[][];
"user-info": AuthUserInfo;
"bakery-discharge-required"?: Macaroon;
"controller-tag"?: string;
"discharge-required"?: Macaroon;
"discharge-required-error"?: string;
facades?: FacadeVersions[];
"model-tag"?: string;
"public-dns-name"?: string;
"server-version"?: string;
servers?: HostPort[][];
"user-info"?: AuthUserInfo;
}

export interface Macaroon {
Expand Down
2 changes: 1 addition & 1 deletion api/facades/agent-life-flag/AgentLifeFlagV1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Models
NOTE: This file was generated using the Juju schema
from Juju 3.2.1 at the git SHA 06eb3f6c7c.
from Juju 3.3 at the git SHA 65fa4c1ee5.
Do not manually edit this file.
*/

Expand Down
2 changes: 1 addition & 1 deletion api/facades/agent-tools/AgentToolsV1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Models
NOTE: This file was generated using the Juju schema
from Juju 3.2.1 at the git SHA 06eb3f6c7c.
from Juju 3.3 at the git SHA 65fa4c1ee5.
Do not manually edit this file.
*/

Expand Down
10 changes: 5 additions & 5 deletions api/facades/agent/AgentV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface AgentGetEntitiesResults {
}

export interface CloudCredential {
attrs?: AdditionalProperties;
attrs?: Record<string, string>;
"auth-type": string;
redacted?: string[];
}
Expand All @@ -44,12 +44,12 @@ export interface CloudSpec {
}

export interface CloudSpecResult {
error: Error;
result: CloudSpec;
error?: Error;
result?: CloudSpec;
}

export interface CloudSpecResults {
results: CloudSpecResult[];
results?: CloudSpecResult[];
}

export interface ControllerAPIInfoResult {
Expand Down Expand Up @@ -90,7 +90,7 @@ export interface Error {
}

export interface ErrorResult {
error: Error;
error?: Error;
}

export interface ErrorResults {
Expand Down
10 changes: 5 additions & 5 deletions api/facades/agent/AgentV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Unit-agent
NOTE: This file was generated using the Juju schema
from Juju 3.2.1 at the git SHA 06eb3f6c7c.
from Juju 3.3 at the git SHA 65fa4c1ee5.
Do not manually edit this file.
*/

Expand Down Expand Up @@ -46,12 +46,12 @@ export interface CloudSpec {
}

export interface CloudSpecResult {
error: Error;
result: CloudSpec;
error?: Error;
result?: CloudSpec;
}

export interface CloudSpecResults {
results: CloudSpecResult[];
results?: CloudSpecResult[];
}

export interface ControllerAPIInfoResult {
Expand Down Expand Up @@ -92,7 +92,7 @@ export interface Error {
}

export interface ErrorResult {
error: Error;
error?: Error;
}

export interface ErrorResults {
Expand Down
Loading

0 comments on commit c240f77

Please sign in to comment.