Skip to content

Commit

Permalink
🤖 npm run generate auto-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 18, 2023
1 parent 7f7e2a7 commit cc164b7
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 44 deletions.
55 changes: 31 additions & 24 deletions src/frontend/generated/internet_identity_idl.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ export const idlFactory = ({ IDL }) => {
});
const IdentityNumber = IDL.Nat64;
const AuthnMethodProtection = IDL.Variant({
'unprotected' : IDL.Null,
'protected' : IDL.Null,
'Protected' : IDL.Null,
'Unprotected' : IDL.Null,
});
const PublicKeyAuthn = IDL.Record({ 'pubkey' : PublicKey });
const WebAuthn = IDL.Record({
'pubkey' : PublicKey,
'credential_id' : CredentialId,
});
const PublicKeyAuthn = IDL.Record({ 'pubkey' : PublicKey });
const AuthnMethod = IDL.Variant({
'webauthn' : WebAuthn,
'pubkey' : PublicKeyAuthn,
'Puubkey' : PublicKeyAuthn,
'WebAuthn' : WebAuthn,
});
const AuthnMethodData = IDL.Record({
'metadata' : MetadataMap,
Expand All @@ -89,17 +89,12 @@ export const idlFactory = ({ IDL }) => {
'authn_method' : AuthnMethod,
'purpose' : Purpose,
});
const AuthnMethodAddResponse = IDL.Variant({
'ok' : IDL.Null,
'invalid_metadata' : IDL.Text,
});
const AuthnMethodRemoveResponse = IDL.Variant({ 'ok' : IDL.Null });
const AuthnMethodAddError = IDL.Variant({ 'InvalidMetadata' : IDL.Text });
const ChallengeKey = IDL.Text;
const Challenge = IDL.Record({
'png_base64' : IDL.Text,
'challenge_key' : ChallengeKey,
});
const CaptchaCreateResponse = IDL.Variant({ 'ok' : Challenge });
const DeployArchiveResult = IDL.Variant({
'creation_in_progress' : IDL.Null,
'success' : IDL.Principal,
Expand Down Expand Up @@ -213,18 +208,15 @@ export const idlFactory = ({ IDL }) => {
'metadata' : MetadataMap,
'authn_method_registration' : IDL.Opt(AuthnMethodRegistrationInfo),
});
const IdentityInfoResponse = IDL.Variant({ 'ok' : IdentityInfo });
const IdentityMetadataReplaceResponse = IDL.Variant({ 'ok' : IDL.Null });
const ChallengeResult = IDL.Record({
'key' : ChallengeKey,
'chars' : IDL.Text,
});
const CaptchaResult = ChallengeResult;
const IdentityRegisterResponse = IDL.Variant({
'ok' : IdentityNumber,
'invalid_metadata' : IDL.Text,
'bad_captcha' : IDL.Null,
'canister_full' : IDL.Null,
const IdentityRegisterError = IDL.Variant({
'BadCaptcha' : IDL.Null,
'CanisterFull' : IDL.Null,
'InvalidMetadata' : IDL.Text,
});
const UserKey = PublicKey;
const PrepareIdAliasRequest = IDL.Record({
Expand Down Expand Up @@ -274,15 +266,23 @@ export const idlFactory = ({ IDL }) => {
),
'authn_method_add' : IDL.Func(
[IdentityNumber, AuthnMethodData],
[IDL.Opt(AuthnMethodAddResponse)],
[
IDL.Opt(
IDL.Variant({ 'Ok' : IDL.Null, 'Err' : AuthnMethodAddError })
),
],
[],
),
'authn_method_remove' : IDL.Func(
[IdentityNumber, PublicKey],
[IDL.Opt(AuthnMethodRemoveResponse)],
[IDL.Opt(IDL.Variant({ 'Ok' : IDL.Null, 'Err' : IDL.Null }))],
[],
),
'captcha_create' : IDL.Func(
[],
[IDL.Opt(IDL.Variant({ 'Ok' : Challenge, 'Err' : IDL.Null }))],
[],
),
'captcha_create' : IDL.Func([], [IDL.Opt(CaptchaCreateResponse)], []),
'create_challenge' : IDL.Func([], [Challenge], []),
'deploy_archive' : IDL.Func([IDL.Vec(IDL.Nat8)], [DeployArchiveResult], []),
'enter_device_registration_mode' : IDL.Func([UserNumber], [Timestamp], []),
Expand Down Expand Up @@ -313,17 +313,24 @@ export const idlFactory = ({ IDL }) => {
'http_request_update' : IDL.Func([HttpRequest], [HttpResponse], []),
'identity_info' : IDL.Func(
[IdentityNumber],
[IDL.Opt(IdentityInfoResponse)],
[IDL.Opt(IDL.Variant({ 'Ok' : IdentityInfo, 'Err' : IDL.Null }))],
[],
),
'identity_metadata_replace' : IDL.Func(
[IdentityNumber, MetadataMap],
[IDL.Opt(IdentityMetadataReplaceResponse)],
[IDL.Opt(IDL.Variant({ 'Ok' : IDL.Null, 'Err' : IDL.Null }))],
[],
),
'identity_register' : IDL.Func(
[AuthnMethodData, CaptchaResult, IDL.Opt(IDL.Principal)],
[IDL.Opt(IdentityRegisterResponse)],
[
IDL.Opt(
IDL.Variant({
'Ok' : IdentityNumber,
'Err' : IdentityRegisterError,
})
),
],
[],
),
'init_salt' : IDL.Func([], [], []),
Expand Down
40 changes: 20 additions & 20 deletions src/frontend/generated/internet_identity_types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,28 @@ export interface ArchiveInfo {
'archive_config' : [] | [ArchiveConfig],
'archive_canister' : [] | [Principal],
}
export type AuthnMethod = { 'webauthn' : WebAuthn } |
{ 'pubkey' : PublicKeyAuthn };
export type AuthnMethodAddResponse = { 'ok' : null } |
{ 'invalid_metadata' : string };
export type AuthnMethod = { 'Puubkey' : PublicKeyAuthn } |
{ 'WebAuthn' : WebAuthn };
export type AuthnMethodAddError = { 'InvalidMetadata' : string };
export interface AuthnMethodData {
'metadata' : MetadataMap,
'protection' : AuthnMethodProtection,
'last_authentication' : [] | [Timestamp],
'authn_method' : AuthnMethod,
'purpose' : Purpose,
}
export type AuthnMethodProtection = { 'unprotected' : null } |
{ 'protected' : null };
export type AuthnMethodProtection = { 'Protected' : null } |
{ 'Unprotected' : null };
export interface AuthnMethodRegistrationInfo {
'expiration' : Timestamp,
'authn_method' : [] | [AuthnMethodData],
}
export type AuthnMethodRemoveResponse = { 'ok' : null };
export interface BufferedArchiveEntry {
'sequence_number' : bigint,
'entry' : Uint8Array | number[],
'anchor_number' : UserNumber,
'timestamp' : Timestamp,
}
export type CaptchaCreateResponse = { 'ok' : Challenge };
export type CaptchaResult = ChallengeResult;
export interface Challenge {
'png_base64' : string,
Expand Down Expand Up @@ -136,13 +133,10 @@ export interface IdentityInfo {
'metadata' : MetadataMap,
'authn_method_registration' : [] | [AuthnMethodRegistrationInfo],
}
export type IdentityInfoResponse = { 'ok' : IdentityInfo };
export type IdentityMetadataReplaceResponse = { 'ok' : null };
export type IdentityNumber = bigint;
export type IdentityRegisterResponse = { 'ok' : IdentityNumber } |
{ 'invalid_metadata' : string } |
{ 'bad_captcha' : null } |
{ 'canister_full' : null };
export type IdentityRegisterError = { 'BadCaptcha' : null } |
{ 'CanisterFull' : null } |
{ 'InvalidMetadata' : string };
export interface InternetIdentityInit {
'max_num_latest_delegation_origins' : [] | [bigint],
'assigned_user_number_range' : [] | [[bigint, bigint]],
Expand Down Expand Up @@ -239,13 +233,16 @@ export interface _SERVICE {
>,
'authn_method_add' : ActorMethod<
[IdentityNumber, AuthnMethodData],
[] | [AuthnMethodAddResponse]
[] | [{ 'Ok' : null } | { 'Err' : AuthnMethodAddError }]
>,
'authn_method_remove' : ActorMethod<
[IdentityNumber, PublicKey],
[] | [AuthnMethodRemoveResponse]
[] | [{ 'Ok' : null } | { 'Err' : null }]
>,
'captcha_create' : ActorMethod<
[],
[] | [{ 'Ok' : Challenge } | { 'Err' : null }]
>,
'captcha_create' : ActorMethod<[], [] | [CaptchaCreateResponse]>,
'create_challenge' : ActorMethod<[], Challenge>,
'deploy_archive' : ActorMethod<[Uint8Array | number[]], DeployArchiveResult>,
'enter_device_registration_mode' : ActorMethod<[UserNumber], Timestamp>,
Expand All @@ -265,14 +262,17 @@ export interface _SERVICE {
'get_principal' : ActorMethod<[UserNumber, FrontendHostname], Principal>,
'http_request' : ActorMethod<[HttpRequest], HttpResponse>,
'http_request_update' : ActorMethod<[HttpRequest], HttpResponse>,
'identity_info' : ActorMethod<[IdentityNumber], [] | [IdentityInfoResponse]>,
'identity_info' : ActorMethod<
[IdentityNumber],
[] | [{ 'Ok' : IdentityInfo } | { 'Err' : null }]
>,
'identity_metadata_replace' : ActorMethod<
[IdentityNumber, MetadataMap],
[] | [IdentityMetadataReplaceResponse]
[] | [{ 'Ok' : null } | { 'Err' : null }]
>,
'identity_register' : ActorMethod<
[AuthnMethodData, CaptchaResult, [] | [Principal]],
[] | [IdentityRegisterResponse]
[] | [{ 'Ok' : IdentityNumber } | { 'Err' : IdentityRegisterError }]
>,
'init_salt' : ActorMethod<[], undefined>,
'lookup' : ActorMethod<[UserNumber], Array<DeviceData>>,
Expand Down

0 comments on commit cc164b7

Please sign in to comment.