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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions cli/src/declarations/console.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export interface AuthenticationConfigInternetIdentity {
}
export interface AuthenticationConfigOpenId {
observatory_id: [] | [Principal];
providers: Array<[OpenIdProvider, OpenIdProviderConfig]>;
providers: Array<[OpenIdDelegationProvider, OpenIdAuthProviderConfig]>;
}
export type AuthenticationError =
| {
Expand Down Expand Up @@ -99,10 +99,12 @@ export interface ConfigMaxMemorySize {
export interface Controller {
updated_at: bigint;
metadata: Array<[string, string]>;
kind: [] | [ControllerKind];
created_at: bigint;
scope: ControllerScope;
expires_at: [] | [bigint];
}
export type ControllerKind = {Emulator: null} | {Automation: null};
export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null};
export interface CreateMissionControlArgs {
subnet_id: [] | [Principal];
Expand Down Expand Up @@ -159,7 +161,8 @@ export type GetDelegationError =
| {NoSuchDelegation: null}
| {JwtVerify: JwtVerifyError}
| {GetOrFetchJwks: GetOrRefreshJwksError}
| {DeriveSeedFailed: string};
| {DeriveSeedFailed: string}
| {InvalidObservatoryId: string};
export type GetOrRefreshJwksError =
| {InvalidConfig: string}
| {MissingKid: null}
Expand Down Expand Up @@ -277,17 +280,27 @@ export interface ListSegmentsArgs {
}
export type Memory = {Heap: null} | {Stable: null};
export interface OpenId {
provider: OpenIdProvider;
provider: OpenIdDelegationProvider;
data: OpenIdData;
}
export interface OpenIdAuthProviderConfig {
delegation: [] | [OpenIdAuthProviderDelegationConfig];
client_id: string;
}
export interface OpenIdAuthProviderDelegationConfig {
targets: [] | [Array<Principal>];
max_time_to_live: [] | [bigint];
}
export interface OpenIdData {
name: [] | [string];
locale: [] | [string];
family_name: [] | [string];
email: [] | [string];
picture: [] | [string];
given_name: [] | [string];
preferred_username: [] | [string];
}
export type OpenIdDelegationProvider = {GitHub: null} | {Google: null};
export interface OpenIdGetDelegationArgs {
jwt: string;
session_key: Uint8Array;
Expand All @@ -299,15 +312,6 @@ export interface OpenIdPrepareDelegationArgs {
session_key: Uint8Array;
salt: Uint8Array;
}
export type OpenIdProvider = {Google: null};
export interface OpenIdProviderConfig {
delegation: [] | [OpenIdProviderDelegationConfig];
client_id: string;
}
export interface OpenIdProviderDelegationConfig {
targets: [] | [Array<Principal>];
max_time_to_live: [] | [bigint];
}
export type PaymentStatus = {Refunded: null} | {Acknowledged: null} | {Completed: null};
export type PrepareDelegationError =
| {
Expand All @@ -316,7 +320,8 @@ export type PrepareDelegationError =
| {GetCachedJwks: null}
| {JwtVerify: JwtVerifyError}
| {GetOrFetchJwks: GetOrRefreshJwksError}
| {DeriveSeedFailed: string};
| {DeriveSeedFailed: string}
| {InvalidObservatoryId: string};
export interface PreparedDelegation {
user_key: Uint8Array;
expiration: bigint;
Expand Down Expand Up @@ -376,6 +381,7 @@ export interface SetAuthenticationConfig {
}
export interface SetController {
metadata: Array<[string, string]>;
kind: [] | [ControllerKind];
scope: ControllerScope;
expires_at: [] | [bigint];
}
Expand Down
28 changes: 17 additions & 11 deletions cli/src/declarations/console.did
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type AuthenticationConfigInternetIdentity = record {
};
type AuthenticationConfigOpenId = record {
observatory_id : opt principal;
providers : vec record { OpenIdProvider; OpenIdProviderConfig };
providers : vec record { OpenIdDelegationProvider; OpenIdAuthProviderConfig };
};
type AuthenticationError = variant {
PrepareDelegation : PrepareDelegationError;
Expand All @@ -73,10 +73,12 @@ type ConfigMaxMemorySize = record { stable : opt nat64; heap : opt nat64 };
type Controller = record {
updated_at : nat64;
metadata : vec record { text; text };
kind : opt ControllerKind;
created_at : nat64;
scope : ControllerScope;
expires_at : opt nat64;
};
type ControllerKind = variant { Emulator; Automation };
type ControllerScope = variant { Write; Admin; Submit };
type CreateMissionControlArgs = record { subnet_id : opt principal };
type CreateOrbiterArgs = record {
Expand Down Expand Up @@ -121,6 +123,7 @@ type GetDelegationError = variant {
JwtVerify : JwtVerifyError;
GetOrFetchJwks : GetOrRefreshJwksError;
DeriveSeedFailed : text;
InvalidObservatoryId : text;
};
type GetOrRefreshJwksError = variant {
InvalidConfig : text;
Expand Down Expand Up @@ -223,15 +226,25 @@ type ListSegmentsArgs = record {
segment_kind : opt StorableSegmentKind;
};
type Memory = variant { Heap; Stable };
type OpenId = record { provider : OpenIdProvider; data : OpenIdData };
type OpenId = record { provider : OpenIdDelegationProvider; data : OpenIdData };
type OpenIdAuthProviderConfig = record {
delegation : opt OpenIdAuthProviderDelegationConfig;
client_id : text;
};
type OpenIdAuthProviderDelegationConfig = record {
targets : opt vec principal;
max_time_to_live : opt nat64;
};
type OpenIdData = record {
name : opt text;
locale : opt text;
family_name : opt text;
email : opt text;
picture : opt text;
given_name : opt text;
preferred_username : opt text;
};
type OpenIdDelegationProvider = variant { GitHub; Google };
type OpenIdGetDelegationArgs = record {
jwt : text;
session_key : blob;
Expand All @@ -243,22 +256,14 @@ type OpenIdPrepareDelegationArgs = record {
session_key : blob;
salt : blob;
};
type OpenIdProvider = variant { Google };
type OpenIdProviderConfig = record {
delegation : opt OpenIdProviderDelegationConfig;
client_id : text;
};
type OpenIdProviderDelegationConfig = record {
targets : opt vec principal;
max_time_to_live : opt nat64;
};
type PaymentStatus = variant { Refunded; Acknowledged; Completed };
type PrepareDelegationError = variant {
JwtFindProvider : JwtFindProviderError;
GetCachedJwks;
JwtVerify : JwtVerifyError;
GetOrFetchJwks : GetOrRefreshJwksError;
DeriveSeedFailed : text;
InvalidObservatoryId : text;
};
type PreparedDelegation = record { user_key : blob; expiration : nat64 };
type Proposal = record {
Expand Down Expand Up @@ -313,6 +318,7 @@ type SetAuthenticationConfig = record {
};
type SetController = record {
metadata : vec record { text; text };
kind : opt ControllerKind;
scope : ControllerScope;
expires_at : opt nat64;
};
Expand Down
30 changes: 21 additions & 9 deletions cli/src/declarations/console.idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,21 @@ export const idlFactory = ({IDL}) => {
user_key: IDL.Vec(IDL.Nat8),
expiration: IDL.Nat64
});
const OpenIdProvider = IDL.Variant({Google: IDL.Null});
const OpenIdDelegationProvider = IDL.Variant({
GitHub: IDL.Null,
Google: IDL.Null
});
const OpenIdData = IDL.Record({
name: IDL.Opt(IDL.Text),
locale: IDL.Opt(IDL.Text),
family_name: IDL.Opt(IDL.Text),
email: IDL.Opt(IDL.Text),
picture: IDL.Opt(IDL.Text),
given_name: IDL.Opt(IDL.Text)
given_name: IDL.Opt(IDL.Text),
preferred_username: IDL.Opt(IDL.Text)
});
const OpenId = IDL.Record({
provider: OpenIdProvider,
provider: OpenIdDelegationProvider,
data: OpenIdData
});
const Provider = IDL.Variant({
Expand Down Expand Up @@ -81,7 +85,8 @@ export const idlFactory = ({IDL}) => {
GetCachedJwks: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
DeriveSeedFailed: IDL.Text
DeriveSeedFailed: IDL.Text,
InvalidObservatoryId: IDL.Text
});
const AuthenticationError = IDL.Variant({
PrepareDelegation: PrepareDelegationError,
Expand Down Expand Up @@ -129,17 +134,17 @@ export const idlFactory = ({IDL}) => {
const DeleteProposalAssets = IDL.Record({
proposal_ids: IDL.Vec(IDL.Nat)
});
const OpenIdProviderDelegationConfig = IDL.Record({
const OpenIdAuthProviderDelegationConfig = IDL.Record({
targets: IDL.Opt(IDL.Vec(IDL.Principal)),
max_time_to_live: IDL.Opt(IDL.Nat64)
});
const OpenIdProviderConfig = IDL.Record({
delegation: IDL.Opt(OpenIdProviderDelegationConfig),
const OpenIdAuthProviderConfig = IDL.Record({
delegation: IDL.Opt(OpenIdAuthProviderDelegationConfig),
client_id: IDL.Text
});
const AuthenticationConfigOpenId = IDL.Record({
observatory_id: IDL.Opt(IDL.Principal),
providers: IDL.Vec(IDL.Tuple(OpenIdProvider, OpenIdProviderConfig))
providers: IDL.Vec(IDL.Tuple(OpenIdDelegationProvider, OpenIdAuthProviderConfig))
});
const AuthenticationConfigInternetIdentity = IDL.Record({
derivation_origin: IDL.Opt(IDL.Text),
Expand Down Expand Up @@ -211,7 +216,8 @@ export const idlFactory = ({IDL}) => {
NoSuchDelegation: IDL.Null,
JwtVerify: JwtVerifyError,
GetOrFetchJwks: GetOrRefreshJwksError,
DeriveSeedFailed: IDL.Text
DeriveSeedFailed: IDL.Text,
InvalidObservatoryId: IDL.Text
});
const Result_1 = IDL.Variant({
Ok: SignedDelegation,
Expand Down Expand Up @@ -360,6 +366,10 @@ export const idlFactory = ({IDL}) => {
items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
items_length: IDL.Nat64
});
const ControllerKind = IDL.Variant({
Emulator: IDL.Null,
Automation: IDL.Null
});
const ControllerScope = IDL.Variant({
Write: IDL.Null,
Admin: IDL.Null,
Expand All @@ -368,6 +378,7 @@ export const idlFactory = ({IDL}) => {
const Controller = IDL.Record({
updated_at: IDL.Nat64,
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
kind: IDL.Opt(ControllerKind),
created_at: IDL.Nat64,
scope: ControllerScope,
expires_at: IDL.Opt(IDL.Nat64)
Expand Down Expand Up @@ -448,6 +459,7 @@ export const idlFactory = ({IDL}) => {
});
const SetController = IDL.Record({
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
kind: IDL.Opt(ControllerKind),
scope: ControllerScope,
expires_at: IDL.Opt(IDL.Nat64)
});
Expand Down
Loading
Loading