@affinidi/cli 1.66.0 → 2.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +810 -662
- package/dist/commands/generate/app.d.ts +17 -0
- package/dist/commands/generate/app.js +149 -0
- package/dist/commands/generate/app.js.map +1 -0
- package/dist/commands/iam/add-principal.d.ts +11 -0
- package/dist/commands/iam/add-principal.js +63 -0
- package/dist/commands/iam/add-principal.js.map +1 -0
- package/dist/commands/iam/get-policies.d.ts +12 -0
- package/dist/commands/iam/get-policies.js +64 -0
- package/dist/commands/iam/get-policies.js.map +1 -0
- package/dist/commands/iam/list-principals.d.ts +8 -0
- package/dist/commands/iam/list-principals.js +23 -0
- package/dist/commands/iam/list-principals.js.map +1 -0
- package/dist/commands/iam/remove-principal.d.ts +14 -0
- package/dist/commands/iam/remove-principal.js +63 -0
- package/dist/commands/iam/remove-principal.js.map +1 -0
- package/dist/commands/iam/update-policies.d.ts +13 -0
- package/dist/commands/iam/update-policies.js +127 -0
- package/dist/commands/iam/update-policies.js.map +1 -0
- package/dist/commands/login/add-user-to-group.d.ts +11 -0
- package/dist/commands/login/add-user-to-group.js +39 -0
- package/dist/commands/login/add-user-to-group.js.map +1 -0
- package/dist/commands/login/create-config.d.ts +17 -0
- package/dist/commands/login/create-config.js +142 -0
- package/dist/commands/login/create-config.js.map +1 -0
- package/dist/commands/login/create-group.d.ts +10 -0
- package/dist/commands/login/create-group.js +40 -0
- package/dist/commands/login/create-group.js.map +1 -0
- package/dist/commands/login/delete-config.d.ts +11 -0
- package/dist/commands/login/delete-config.js +39 -0
- package/dist/commands/login/delete-config.js.map +1 -0
- package/dist/commands/login/delete-group.d.ts +11 -0
- package/dist/commands/login/delete-group.js +39 -0
- package/dist/commands/login/delete-group.js.map +1 -0
- package/dist/commands/login/get-config.d.ts +10 -0
- package/dist/commands/login/get-config.js +39 -0
- package/dist/commands/login/get-config.js.map +1 -0
- package/dist/commands/login/get-group.d.ts +10 -0
- package/dist/commands/login/get-group.js +39 -0
- package/dist/commands/login/get-group.js.map +1 -0
- package/dist/commands/login/list-configs.d.ts +7 -0
- package/dist/commands/login/list-configs.js +20 -0
- package/dist/commands/login/list-configs.js.map +1 -0
- package/dist/commands/login/list-groups.d.ts +7 -0
- package/dist/commands/login/list-groups.js +20 -0
- package/dist/commands/login/list-groups.js.map +1 -0
- package/dist/commands/login/list-users-in-group.d.ts +10 -0
- package/dist/commands/login/list-users-in-group.js +35 -0
- package/dist/commands/login/list-users-in-group.js.map +1 -0
- package/dist/commands/login/remove-user-from-group.d.ts +13 -0
- package/dist/commands/login/remove-user-from-group.js +40 -0
- package/dist/commands/login/remove-user-from-group.js.map +1 -0
- package/dist/commands/login/update-config.d.ts +17 -0
- package/dist/commands/login/update-config.js +123 -0
- package/dist/commands/login/update-config.js.map +1 -0
- package/dist/commands/project/create-project.d.ts +11 -0
- package/dist/commands/project/create-project.js +47 -0
- package/dist/commands/project/create-project.js.map +1 -0
- package/dist/commands/project/get-active-project.d.ts +7 -0
- package/dist/commands/project/get-active-project.js +20 -0
- package/dist/commands/project/get-active-project.js.map +1 -0
- package/dist/commands/project/list-projects.d.ts +7 -0
- package/dist/commands/project/list-projects.js +20 -0
- package/dist/commands/project/list-projects.js.map +1 -0
- package/dist/commands/project/select-project.d.ts +10 -0
- package/dist/commands/project/select-project.js +69 -0
- package/dist/commands/project/select-project.js.map +1 -0
- package/dist/commands/start.d.ts +3 -36
- package/dist/commands/start.js +19 -412
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/stop.d.ts +6 -0
- package/dist/commands/stop.js +34 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/commands/token/create-token.d.ts +13 -0
- package/dist/commands/token/create-token.js +78 -0
- package/dist/commands/token/create-token.js.map +1 -0
- package/dist/commands/token/delete-token.d.ts +11 -0
- package/dist/commands/token/delete-token.js +36 -0
- package/dist/commands/token/delete-token.js.map +1 -0
- package/dist/commands/token/get-token.d.ts +10 -0
- package/dist/commands/token/get-token.js +36 -0
- package/dist/commands/token/get-token.js.map +1 -0
- package/dist/commands/token/list-tokens.d.ts +7 -0
- package/dist/commands/token/list-tokens.js +20 -0
- package/dist/commands/token/list-tokens.js.map +1 -0
- package/dist/commands/token/update-token.d.ts +14 -0
- package/dist/commands/token/update-token.js +83 -0
- package/dist/commands/token/update-token.js.map +1 -0
- package/dist/commands/whoami.d.ts +6 -0
- package/dist/commands/whoami.js +20 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/common/base-command.d.ts +29 -0
- package/dist/common/base-command.js +65 -0
- package/dist/common/base-command.js.map +1 -0
- package/dist/common/constants.d.ts +27 -0
- package/dist/common/constants.js +31 -0
- package/dist/common/constants.js.map +1 -0
- package/dist/common/error-messages.d.ts +1 -0
- package/dist/common/error-messages.js +8 -0
- package/dist/common/error-messages.js.map +1 -0
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.js +8 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/prompts.d.ts +1 -0
- package/dist/common/prompts.js +21 -0
- package/dist/common/prompts.js.map +1 -0
- package/dist/common/validators.d.ts +4 -0
- package/dist/common/validators.js +15 -0
- package/dist/common/validators.js.map +1 -0
- package/dist/helpers/app.d.ts +11 -0
- package/dist/helpers/app.js +92 -0
- package/dist/helpers/app.js.map +1 -0
- package/dist/helpers/degit.d.ts +1 -0
- package/dist/helpers/degit.js +26 -0
- package/dist/helpers/degit.js.map +1 -0
- package/dist/helpers/jwk.d.ts +4 -0
- package/dist/helpers/jwk.js +29 -0
- package/dist/helpers/jwk.js.map +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/services/affinidi/auth/auth-result-page.d.ts +1 -0
- package/dist/services/affinidi/auth/auth-result-page.js +110 -0
- package/dist/services/affinidi/auth/auth-result-page.js.map +1 -0
- package/dist/services/affinidi/auth/bff-auth-provider.d.ts +26 -0
- package/dist/services/affinidi/auth/bff-auth-provider.js +124 -0
- package/dist/services/affinidi/auth/bff-auth-provider.js.map +1 -0
- package/dist/services/affinidi/auth/types.d.ts +7 -0
- package/dist/services/affinidi/auth/types.js +3 -0
- package/dist/services/affinidi/auth/types.js.map +1 -0
- package/dist/services/affinidi/bff-service.d.ts +20 -0
- package/dist/services/affinidi/bff-service.js +88 -0
- package/dist/services/affinidi/bff-service.js.map +1 -0
- package/dist/services/affinidi/errors.d.ts +3 -0
- package/dist/services/affinidi/errors.js +75 -0
- package/dist/services/affinidi/errors.js.map +1 -0
- package/dist/services/affinidi/iam/iam.api.d.ts +455 -0
- package/dist/services/affinidi/iam/iam.api.js +421 -0
- package/dist/services/affinidi/iam/iam.api.js.map +1 -0
- package/dist/services/affinidi/iam/index.d.ts +21 -0
- package/dist/services/affinidi/iam/index.js +148 -0
- package/dist/services/affinidi/iam/index.js.map +1 -0
- package/dist/services/affinidi/logger/console-logger-adapter.d.ts +12 -0
- package/dist/services/affinidi/logger/console-logger-adapter.js +56 -0
- package/dist/services/affinidi/logger/console-logger-adapter.js.map +1 -0
- package/dist/services/affinidi/logger/index.d.ts +2 -0
- package/dist/services/affinidi/logger/index.js +6 -0
- package/dist/services/affinidi/logger/index.js.map +1 -0
- package/dist/services/affinidi/logger/logger-adapter.d.ts +10 -0
- package/dist/services/affinidi/logger/logger-adapter.js +3 -0
- package/dist/services/affinidi/logger/logger-adapter.js.map +1 -0
- package/dist/services/affinidi/vp-adapter/index.d.ts +20 -0
- package/dist/services/affinidi/vp-adapter/index.js +145 -0
- package/dist/services/affinidi/vp-adapter/index.js.map +1 -0
- package/dist/services/affinidi/vp-adapter/vp-adapter.api.d.ts +602 -0
- package/dist/services/affinidi/vp-adapter/vp-adapter.api.js +484 -0
- package/dist/services/affinidi/vp-adapter/vp-adapter.api.js.map +1 -0
- package/dist/services/credentials-vault.d.ts +19 -0
- package/dist/services/credentials-vault.js +33 -0
- package/dist/services/credentials-vault.js.map +1 -0
- package/dist/services/env-config.d.ts +35 -0
- package/dist/services/env-config.js +39 -0
- package/dist/services/env-config.js.map +1 -0
- package/dist/services/generator/auth0.d.ts +6 -0
- package/dist/services/generator/auth0.js +79 -0
- package/dist/services/generator/auth0.js.map +1 -0
- package/dist/services/generator/env-configurer.d.ts +1 -0
- package/dist/services/generator/env-configurer.js +22 -0
- package/dist/services/generator/env-configurer.js.map +1 -0
- package/package.json +64 -77
- package/bin/inject-secrets.js +0 -30
- package/bin/postinstall.js +0 -31
- package/dist/commands/analytics.d.ts +0 -21
- package/dist/commands/analytics.js +0 -74
- package/dist/commands/analytics.js.map +0 -1
- package/dist/commands/config/index.d.ts +0 -15
- package/dist/commands/config/index.js +0 -71
- package/dist/commands/config/index.js.map +0 -1
- package/dist/commands/config/username.d.ts +0 -17
- package/dist/commands/config/username.js +0 -87
- package/dist/commands/config/username.js.map +0 -1
- package/dist/commands/config/view.d.ts +0 -16
- package/dist/commands/config/view.js +0 -59
- package/dist/commands/config/view.js.map +0 -1
- package/dist/commands/create/project.d.ts +0 -16
- package/dist/commands/create/project.js +0 -82
- package/dist/commands/create/project.js.map +0 -1
- package/dist/commands/create/schema.d.ts +0 -18
- package/dist/commands/create/schema.js +0 -149
- package/dist/commands/create/schema.js.map +0 -1
- package/dist/commands/generate-application/index.d.ts +0 -28
- package/dist/commands/generate-application/index.js +0 -94
- package/dist/commands/generate-application/index.js.map +0 -1
- package/dist/commands/issue-vc.d.ts +0 -21
- package/dist/commands/issue-vc.js +0 -159
- package/dist/commands/issue-vc.js.map +0 -1
- package/dist/commands/list/projects.d.ts +0 -17
- package/dist/commands/list/projects.js +0 -110
- package/dist/commands/list/projects.js.map +0 -1
- package/dist/commands/list/schemas.d.ts +0 -26
- package/dist/commands/list/schemas.js +0 -164
- package/dist/commands/list/schemas.js.map +0 -1
- package/dist/commands/login/index.d.ts +0 -17
- package/dist/commands/login/index.js +0 -142
- package/dist/commands/login/index.js.map +0 -1
- package/dist/commands/logout/index.d.ts +0 -13
- package/dist/commands/logout/index.js +0 -72
- package/dist/commands/logout/index.js.map +0 -1
- package/dist/commands/rename/project.d.ts +0 -17
- package/dist/commands/rename/project.js +0 -100
- package/dist/commands/rename/project.js.map +0 -1
- package/dist/commands/show/project.d.ts +0 -16
- package/dist/commands/show/project.js +0 -121
- package/dist/commands/show/project.js.map +0 -1
- package/dist/commands/show/schema.d.ts +0 -17
- package/dist/commands/show/schema.js +0 -111
- package/dist/commands/show/schema.js.map +0 -1
- package/dist/commands/show/user.d.ts +0 -14
- package/dist/commands/show/user.js +0 -61
- package/dist/commands/show/user.js.map +0 -1
- package/dist/commands/sign-up/index.d.ts +0 -13
- package/dist/commands/sign-up/index.js +0 -83
- package/dist/commands/sign-up/index.js.map +0 -1
- package/dist/commands/use/project.d.ts +0 -15
- package/dist/commands/use/project.js +0 -103
- package/dist/commands/use/project.js.map +0 -1
- package/dist/commands/verify-vc.d.ts +0 -15
- package/dist/commands/verify-vc.js +0 -88
- package/dist/commands/verify-vc.js.map +0 -1
- package/dist/constants.d.ts +0 -44
- package/dist/constants.js +0 -78
- package/dist/constants.js.map +0 -1
- package/dist/customFlags/outputFlag.d.ts +0 -2
- package/dist/customFlags/outputFlag.js +0 -10
- package/dist/customFlags/outputFlag.js.map +0 -1
- package/dist/errors/index.d.ts +0 -37
- package/dist/errors/index.js +0 -118
- package/dist/errors/index.js.map +0 -1
- package/dist/exposedFunctions/genApp.d.ts +0 -27
- package/dist/exposedFunctions/genApp.js +0 -186
- package/dist/exposedFunctions/genApp.js.map +0 -1
- package/dist/fixtures/mock-projects.d.ts +0 -8
- package/dist/fixtures/mock-projects.js +0 -65
- package/dist/fixtures/mock-projects.js.map +0 -1
- package/dist/fixtures/mock-schemas.d.ts +0 -5
- package/dist/fixtures/mock-schemas.js +0 -47
- package/dist/fixtures/mock-schemas.js.map +0 -1
- package/dist/fixtures/mock-status.d.ts +0 -7
- package/dist/fixtures/mock-status.js +0 -88
- package/dist/fixtures/mock-status.js.map +0 -1
- package/dist/hooks/check/checkVersion.d.ts +0 -16
- package/dist/hooks/check/checkVersion.js +0 -23
- package/dist/hooks/check/checkVersion.js.map +0 -1
- package/dist/middleware/authentication.d.ts +0 -2
- package/dist/middleware/authentication.js +0 -24
- package/dist/middleware/authentication.js.map +0 -1
- package/dist/middleware/display.d.ts +0 -7
- package/dist/middleware/display.js +0 -72
- package/dist/middleware/display.js.map +0 -1
- package/dist/render/functions.d.ts +0 -30
- package/dist/render/functions.js +0 -138
- package/dist/render/functions.js.map +0 -1
- package/dist/render/texts.d.ts +0 -19
- package/dist/render/texts.js +0 -102
- package/dist/render/texts.js.map +0 -1
- package/dist/services/analytics/analytics.api.d.ts +0 -79
- package/dist/services/analytics/analytics.api.js +0 -134
- package/dist/services/analytics/analytics.api.js.map +0 -1
- package/dist/services/analytics/index.d.ts +0 -21
- package/dist/services/analytics/index.js +0 -80
- package/dist/services/analytics/index.js.map +0 -1
- package/dist/services/config/index.d.ts +0 -56
- package/dist/services/config/index.js +0 -294
- package/dist/services/config/index.js.map +0 -1
- package/dist/services/git/index.d.ts +0 -5
- package/dist/services/git/index.js +0 -32
- package/dist/services/git/index.js.map +0 -1
- package/dist/services/iam/iam.api.d.ts +0 -158
- package/dist/services/iam/iam.api.js +0 -219
- package/dist/services/iam/iam.api.js.map +0 -1
- package/dist/services/iam/index.d.ts +0 -12
- package/dist/services/iam/index.js +0 -77
- package/dist/services/iam/index.js.map +0 -1
- package/dist/services/index.d.ts +0 -7
- package/dist/services/index.js +0 -19
- package/dist/services/index.js.map +0 -1
- package/dist/services/issuance/bulkIssuance.api.d.ts +0 -23
- package/dist/services/issuance/bulkIssuance.api.js +0 -43
- package/dist/services/issuance/bulkIssuance.api.js.map +0 -1
- package/dist/services/issuance/index.d.ts +0 -14
- package/dist/services/issuance/index.js +0 -63
- package/dist/services/issuance/index.js.map +0 -1
- package/dist/services/issuance/issuance.api.d.ts +0 -226
- package/dist/services/issuance/issuance.api.js +0 -247
- package/dist/services/issuance/issuance.api.js.map +0 -1
- package/dist/services/issuance/parse.schema.url.d.ts +0 -5
- package/dist/services/issuance/parse.schema.url.js +0 -73
- package/dist/services/issuance/parse.schema.url.js.map +0 -1
- package/dist/services/schema-manager/generator/context-generator.d.ts +0 -2
- package/dist/services/schema-manager/generator/context-generator.js +0 -42
- package/dist/services/schema-manager/generator/context-generator.js.map +0 -1
- package/dist/services/schema-manager/generator/helpers.d.ts +0 -22
- package/dist/services/schema-manager/generator/helpers.js +0 -29
- package/dist/services/schema-manager/generator/helpers.js.map +0 -1
- package/dist/services/schema-manager/generator/mapping.d.ts +0 -6
- package/dist/services/schema-manager/generator/mapping.js +0 -22
- package/dist/services/schema-manager/generator/mapping.js.map +0 -1
- package/dist/services/schema-manager/generator/schema-generator.d.ts +0 -2
- package/dist/services/schema-manager/generator/schema-generator.js +0 -103
- package/dist/services/schema-manager/generator/schema-generator.js.map +0 -1
- package/dist/services/schema-manager/generator/types.d.ts +0 -87
- package/dist/services/schema-manager/generator/types.js +0 -15
- package/dist/services/schema-manager/generator/types.js.map +0 -1
- package/dist/services/schema-manager/index.d.ts +0 -29
- package/dist/services/schema-manager/index.js +0 -68
- package/dist/services/schema-manager/index.js.map +0 -1
- package/dist/services/schema-manager/schema-manager.api.d.ts +0 -279
- package/dist/services/schema-manager/schema-manager.api.js +0 -171
- package/dist/services/schema-manager/schema-manager.api.js.map +0 -1
- package/dist/services/schema-manager/schemaParser/schema-parser.d.ts +0 -5
- package/dist/services/schema-manager/schemaParser/schema-parser.js +0 -35
- package/dist/services/schema-manager/schemaParser/schema-parser.js.map +0 -1
- package/dist/services/user-management/index.d.ts +0 -38
- package/dist/services/user-management/index.js +0 -126
- package/dist/services/user-management/index.js.map +0 -1
- package/dist/services/user-management/user-management.api.d.ts +0 -110
- package/dist/services/user-management/user-management.api.js +0 -185
- package/dist/services/user-management/user-management.api.js.map +0 -1
- package/dist/services/vault/index.d.ts +0 -23
- package/dist/services/vault/index.js +0 -69
- package/dist/services/vault/index.js.map +0 -1
- package/dist/services/vault/typedVaultService.d.ts +0 -54
- package/dist/services/vault/typedVaultService.js +0 -136
- package/dist/services/vault/typedVaultService.js.map +0 -1
- package/dist/services/verification/index.d.ts +0 -9
- package/dist/services/verification/index.js +0 -32
- package/dist/services/verification/index.js.map +0 -1
- package/dist/services/verification/verifier.api.d.ts +0 -202
- package/dist/services/verification/verifier.api.js +0 -187
- package/dist/services/verification/verifier.api.js.map +0 -1
- package/dist/services/writer/index.d.ts +0 -3
- package/dist/services/writer/index.js +0 -17
- package/dist/services/writer/index.js.map +0 -1
- package/dist/user-actions/index.d.ts +0 -2
- package/dist/user-actions/index.js +0 -27
- package/dist/user-actions/index.js.map +0 -1
- package/dist/user-actions/inquirer.d.ts +0 -9
- package/dist/user-actions/inquirer.js +0 -131
- package/dist/user-actions/inquirer.js.map +0 -1
- package/dist/user-actions/prompts.d.ts +0 -20
- package/dist/user-actions/prompts.js +0 -94
- package/dist/user-actions/prompts.js.map +0 -1
- package/dist/wizard/helpers.d.ts +0 -8
- package/dist/wizard/helpers.js +0 -59
- package/dist/wizard/helpers.js.map +0 -1
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
export interface ServiceErrorResponse {
|
|
2
|
+
/**
|
|
3
|
+
* unique id for correlating this specific error to logs
|
|
4
|
+
* @format uuid
|
|
5
|
+
*/
|
|
6
|
+
debugId: string;
|
|
7
|
+
/** name of the error */
|
|
8
|
+
name: string;
|
|
9
|
+
/** backwards compatible Affinidi error code */
|
|
10
|
+
code: string;
|
|
11
|
+
details?: {
|
|
12
|
+
issue: string;
|
|
13
|
+
field?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
location?: string;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
18
|
+
export interface UserDto {
|
|
19
|
+
principalId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface TypedPricipalId {
|
|
22
|
+
principalId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface AddUserToProjectInput {
|
|
25
|
+
principalId: string;
|
|
26
|
+
principalType: string;
|
|
27
|
+
}
|
|
28
|
+
export interface CreateProjectScopedTokenInput {
|
|
29
|
+
projectId: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CreateProjectScopedTokenOutput {
|
|
32
|
+
accessToken: string;
|
|
33
|
+
expiresIn: number;
|
|
34
|
+
scope: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ProjectDto {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
/** creation date and time in ISO-8601 format, e.g. 2023-09-20T07:12:13 */
|
|
41
|
+
createdAt?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface CreateProjectInput {
|
|
44
|
+
name: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ProjectList {
|
|
48
|
+
projects: ProjectDto[];
|
|
49
|
+
}
|
|
50
|
+
export interface UserList {
|
|
51
|
+
records: UserDto[];
|
|
52
|
+
}
|
|
53
|
+
export interface PolicyStatementDto {
|
|
54
|
+
action: string[];
|
|
55
|
+
effect: string;
|
|
56
|
+
principal: string[];
|
|
57
|
+
resource: string[];
|
|
58
|
+
}
|
|
59
|
+
export interface WhoamiDto {
|
|
60
|
+
principalId: string;
|
|
61
|
+
principalType: string;
|
|
62
|
+
}
|
|
63
|
+
export interface PolicyDto {
|
|
64
|
+
principalId?: string;
|
|
65
|
+
projectId?: string;
|
|
66
|
+
version: string;
|
|
67
|
+
statement: PolicyStatementDto[];
|
|
68
|
+
}
|
|
69
|
+
export interface JsonWebKeyDto {
|
|
70
|
+
kid: string;
|
|
71
|
+
kty: string;
|
|
72
|
+
n?: string;
|
|
73
|
+
e?: string;
|
|
74
|
+
alg: string;
|
|
75
|
+
use: string;
|
|
76
|
+
}
|
|
77
|
+
export interface JsonWebKeySetDto {
|
|
78
|
+
/** @minItems 1 */
|
|
79
|
+
keys: JsonWebKeyDto[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Private Key JWT Authentication of Client with `private_key_jwt` oAuth Method
|
|
83
|
+
* @example "{"type": "PRIVATE_KEY", "signingAlgorithm": "RS256", "publicKeyInfo": { "jwks": {"keys":[{"use":"sig","kty":"RSA","kid":"some-kid","alg":"RS256","n":"some-n-value","e":"some-e-value"}]} }}"
|
|
84
|
+
*/
|
|
85
|
+
export interface MachineUserPrivateKeyAuthenticationMethodDto {
|
|
86
|
+
type: 'PRIVATE_KEY';
|
|
87
|
+
signingAlgorithm: 'RS256' | 'RS512' | 'ES256' | 'ES512';
|
|
88
|
+
/** Corresponding Public Key Info provided either as a URL or a Hardcoded Object */
|
|
89
|
+
publicKeyInfo: {
|
|
90
|
+
jwks: JsonWebKeySetDto;
|
|
91
|
+
} | {
|
|
92
|
+
/** @format url */
|
|
93
|
+
jwksUri: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/** How the Machine User will be authenticate against our Authorization Server */
|
|
97
|
+
export type MachineUserAuthenticationMethodDto = MachineUserPrivateKeyAuthenticationMethodDto;
|
|
98
|
+
export interface MachineUserDto {
|
|
99
|
+
/**
|
|
100
|
+
* MachineUser Id
|
|
101
|
+
* @format uuid
|
|
102
|
+
* @example "c5817ea6-8367-4458-9131-54cd2c5b9b48"
|
|
103
|
+
*/
|
|
104
|
+
id: string;
|
|
105
|
+
/**
|
|
106
|
+
* MachineUser ARI
|
|
107
|
+
* @example "machine/c5817ea6-8367-4458-9131-54cd2c5b9b48"
|
|
108
|
+
*/
|
|
109
|
+
ari: string;
|
|
110
|
+
/**
|
|
111
|
+
* The MachineUser owner's ARI
|
|
112
|
+
* @example "ari:iam:::user/2f4b3468-516f-4af3-87db-8816b0d320cc"
|
|
113
|
+
*/
|
|
114
|
+
ownerAri: string;
|
|
115
|
+
/**
|
|
116
|
+
* Owner defined MachineUser display name
|
|
117
|
+
* @example "AIV/Concierge API - affinidi-elements-iam-dev"
|
|
118
|
+
*/
|
|
119
|
+
name: string;
|
|
120
|
+
/** How the Machine User will be authenticate against our Authorization Server */
|
|
121
|
+
authenticationMethod: MachineUserAuthenticationMethodDto;
|
|
122
|
+
/** Scopes that will be assigned to the MachineUser on authentication */
|
|
123
|
+
scopes: string[];
|
|
124
|
+
}
|
|
125
|
+
export interface MachineUserList {
|
|
126
|
+
machineUsers: MachineUserDto[];
|
|
127
|
+
}
|
|
128
|
+
export interface CreateMachineUserInput {
|
|
129
|
+
/** @example "AIV/Concierge API - affinidi-elements-iam-dev" */
|
|
130
|
+
name: string;
|
|
131
|
+
/** How the Machine User will be authenticate against our Authorization Server */
|
|
132
|
+
authenticationMethod: MachineUserAuthenticationMethodDto;
|
|
133
|
+
}
|
|
134
|
+
export interface UpdateMachineUserInput {
|
|
135
|
+
/** @example "AIV/Concierge API - affinidi-elements-iam-dev" */
|
|
136
|
+
name: string;
|
|
137
|
+
/** How the Machine User will be authenticate against our Authorization Server */
|
|
138
|
+
authenticationMethod: MachineUserAuthenticationMethodDto;
|
|
139
|
+
}
|
|
140
|
+
export interface UnexpectedError {
|
|
141
|
+
name: 'UnexpectedError';
|
|
142
|
+
message: 'Unexpected Error Occurred.';
|
|
143
|
+
httpStatusCode: 500;
|
|
144
|
+
traceId: string;
|
|
145
|
+
details?: {
|
|
146
|
+
issue: string;
|
|
147
|
+
field?: string;
|
|
148
|
+
value?: string;
|
|
149
|
+
location?: string;
|
|
150
|
+
}[];
|
|
151
|
+
}
|
|
152
|
+
export interface InvalidParameterError {
|
|
153
|
+
name: 'InvalidParameterError';
|
|
154
|
+
message: 'Invalid parameter: ${param}.';
|
|
155
|
+
httpStatusCode: 400;
|
|
156
|
+
traceId: string;
|
|
157
|
+
details?: {
|
|
158
|
+
issue: string;
|
|
159
|
+
field?: string;
|
|
160
|
+
value?: string;
|
|
161
|
+
location?: string;
|
|
162
|
+
}[];
|
|
163
|
+
}
|
|
164
|
+
export interface NotFoundError {
|
|
165
|
+
name: 'NotFoundError';
|
|
166
|
+
message: 'Not found: ${param}.';
|
|
167
|
+
httpStatusCode: 404;
|
|
168
|
+
traceId: string;
|
|
169
|
+
details?: {
|
|
170
|
+
issue: string;
|
|
171
|
+
field?: string;
|
|
172
|
+
value?: string;
|
|
173
|
+
location?: string;
|
|
174
|
+
}[];
|
|
175
|
+
}
|
|
176
|
+
export interface PrincipalDoesNotBelongToProjectError {
|
|
177
|
+
name: 'PrincipalDoesNotBelongToProjectError';
|
|
178
|
+
message: 'Principal does not belong to the given project';
|
|
179
|
+
httpStatusCode: 403;
|
|
180
|
+
traceId: string;
|
|
181
|
+
details?: {
|
|
182
|
+
issue: string;
|
|
183
|
+
field?: string;
|
|
184
|
+
value?: string;
|
|
185
|
+
location?: string;
|
|
186
|
+
}[];
|
|
187
|
+
}
|
|
188
|
+
export interface ActionForbiddenError {
|
|
189
|
+
name: 'ActionForbiddenError';
|
|
190
|
+
message: 'Principal can not execute action on given resource';
|
|
191
|
+
httpStatusCode: 403;
|
|
192
|
+
traceId: string;
|
|
193
|
+
details?: {
|
|
194
|
+
issue: string;
|
|
195
|
+
field?: string;
|
|
196
|
+
value?: string;
|
|
197
|
+
location?: string;
|
|
198
|
+
}[];
|
|
199
|
+
}
|
|
200
|
+
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';
|
|
201
|
+
export type QueryParamsType = Record<string | number, any>;
|
|
202
|
+
export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
|
|
203
|
+
/** set parameter to `true` for call `securityWorker` for this request */
|
|
204
|
+
secure?: boolean;
|
|
205
|
+
/** request path */
|
|
206
|
+
path: string;
|
|
207
|
+
/** content type of request body */
|
|
208
|
+
type?: ContentType;
|
|
209
|
+
/** query params */
|
|
210
|
+
query?: QueryParamsType;
|
|
211
|
+
/** format of response (i.e. response.json() -> format: "json") */
|
|
212
|
+
format?: ResponseType;
|
|
213
|
+
/** request body */
|
|
214
|
+
body?: unknown;
|
|
215
|
+
}
|
|
216
|
+
export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
|
|
217
|
+
export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
|
|
218
|
+
securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
|
|
219
|
+
secure?: boolean;
|
|
220
|
+
format?: ResponseType;
|
|
221
|
+
}
|
|
222
|
+
export declare enum ContentType {
|
|
223
|
+
Json = "application/json",
|
|
224
|
+
FormData = "multipart/form-data",
|
|
225
|
+
UrlEncoded = "application/x-www-form-urlencoded",
|
|
226
|
+
Text = "text/plain"
|
|
227
|
+
}
|
|
228
|
+
export declare class HttpClient<SecurityDataType = unknown> {
|
|
229
|
+
instance: AxiosInstance;
|
|
230
|
+
private securityData;
|
|
231
|
+
private securityWorker?;
|
|
232
|
+
private secure?;
|
|
233
|
+
private format?;
|
|
234
|
+
constructor({ securityWorker, secure, format, ...axiosConfig }?: ApiConfig<SecurityDataType>);
|
|
235
|
+
setSecurityData: (data: SecurityDataType | null) => void;
|
|
236
|
+
protected mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig;
|
|
237
|
+
protected stringifyFormItem(formItem: unknown): string;
|
|
238
|
+
protected createFormData(input: Record<string, unknown>): FormData;
|
|
239
|
+
request: <T = any, _E = any>({ secure, path, type, query, format, body, ...params }: FullRequestParams) => Promise<axios.AxiosResponse<T, any>>;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* @title Iam
|
|
243
|
+
* @version 1.0.0
|
|
244
|
+
* @baseUrl /
|
|
245
|
+
* @contact nucleus <nucleus.team@affinidi.com>
|
|
246
|
+
*
|
|
247
|
+
* Affinidi IAM
|
|
248
|
+
*/
|
|
249
|
+
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
250
|
+
wellKnown: {
|
|
251
|
+
/**
|
|
252
|
+
* No description
|
|
253
|
+
*
|
|
254
|
+
* @tags well-known
|
|
255
|
+
* @name GetWellKnownJwks
|
|
256
|
+
* @request GET:/.well-known/jwks.json
|
|
257
|
+
*/
|
|
258
|
+
getWellKnownJwks: (params?: RequestParams) => Promise<axios.AxiosResponse<JsonWebKeySetDto, any>>;
|
|
259
|
+
};
|
|
260
|
+
v1: {
|
|
261
|
+
/**
|
|
262
|
+
* @description This is deprecated endpoint, please use /v1/sts/create-project-scoped-token
|
|
263
|
+
*
|
|
264
|
+
* @tags sts
|
|
265
|
+
* @name DeprecatedCreateProjectScopedToken
|
|
266
|
+
* @request POST:/v1/create-project-scoped-token
|
|
267
|
+
* @deprecated
|
|
268
|
+
* @secure
|
|
269
|
+
*/
|
|
270
|
+
deprecatedCreateProjectScopedToken: (data: CreateProjectScopedTokenInput, params?: RequestParams) => Promise<axios.AxiosResponse<CreateProjectScopedTokenOutput, any>>;
|
|
271
|
+
/**
|
|
272
|
+
* No description
|
|
273
|
+
*
|
|
274
|
+
* @tags sts
|
|
275
|
+
* @name CreateProjectScopedToken
|
|
276
|
+
* @request POST:/v1/sts/create-project-scoped-token
|
|
277
|
+
* @secure
|
|
278
|
+
*/
|
|
279
|
+
createProjectScopedToken: (data: CreateProjectScopedTokenInput, params?: RequestParams) => Promise<axios.AxiosResponse<CreateProjectScopedTokenOutput, any>>;
|
|
280
|
+
/**
|
|
281
|
+
* No description
|
|
282
|
+
*
|
|
283
|
+
* @tags sts
|
|
284
|
+
* @name Whoami
|
|
285
|
+
* @request GET:/v1/sts/whoami
|
|
286
|
+
* @secure
|
|
287
|
+
*/
|
|
288
|
+
whoami: (params?: RequestParams) => Promise<axios.AxiosResponse<WhoamiDto, any>>;
|
|
289
|
+
/**
|
|
290
|
+
* No description
|
|
291
|
+
*
|
|
292
|
+
* @tags projects
|
|
293
|
+
* @name CreateProject
|
|
294
|
+
* @request POST:/v1/projects
|
|
295
|
+
* @secure
|
|
296
|
+
*/
|
|
297
|
+
createProject: (data: CreateProjectInput, params?: RequestParams) => Promise<axios.AxiosResponse<ProjectDto, any>>;
|
|
298
|
+
/**
|
|
299
|
+
* No description
|
|
300
|
+
*
|
|
301
|
+
* @tags projects
|
|
302
|
+
* @name ListProject
|
|
303
|
+
* @request GET:/v1/projects
|
|
304
|
+
* @secure
|
|
305
|
+
*/
|
|
306
|
+
listProject: (params?: RequestParams) => Promise<axios.AxiosResponse<ProjectList, any>>;
|
|
307
|
+
/**
|
|
308
|
+
* No description
|
|
309
|
+
*
|
|
310
|
+
* @tags projects
|
|
311
|
+
* @name AddUserToProject
|
|
312
|
+
* @request POST:/v1/projects/users
|
|
313
|
+
* @deprecated
|
|
314
|
+
* @secure
|
|
315
|
+
*/
|
|
316
|
+
addUserToProject: (data: AddUserToProjectInput, params?: RequestParams) => Promise<axios.AxiosResponse<void, any>>;
|
|
317
|
+
/**
|
|
318
|
+
* No description
|
|
319
|
+
*
|
|
320
|
+
* @tags projects
|
|
321
|
+
* @name ListUsersOfProject
|
|
322
|
+
* @request GET:/v1/projects/users
|
|
323
|
+
* @deprecated
|
|
324
|
+
* @secure
|
|
325
|
+
*/
|
|
326
|
+
listUsersOfProject: (params?: RequestParams) => Promise<axios.AxiosResponse<UserList, any>>;
|
|
327
|
+
/**
|
|
328
|
+
* No description
|
|
329
|
+
*
|
|
330
|
+
* @tags projects
|
|
331
|
+
* @name DeleteUserFromProject
|
|
332
|
+
* @request DELETE:/v1/projects/users/{userId}
|
|
333
|
+
* @deprecated
|
|
334
|
+
* @secure
|
|
335
|
+
*/
|
|
336
|
+
deleteUserFromProject: (userId: string, params?: RequestParams) => Promise<axios.AxiosResponse<void, any>>;
|
|
337
|
+
/**
|
|
338
|
+
* No description
|
|
339
|
+
*
|
|
340
|
+
* @tags projects
|
|
341
|
+
* @name ListPrincipalsOfProject
|
|
342
|
+
* @request GET:/v1/projects/principals
|
|
343
|
+
* @secure
|
|
344
|
+
*/
|
|
345
|
+
listPrincipalsOfProject: (params?: RequestParams) => Promise<axios.AxiosResponse<UserList, any>>;
|
|
346
|
+
/**
|
|
347
|
+
* No description
|
|
348
|
+
*
|
|
349
|
+
* @tags projects
|
|
350
|
+
* @name AddPrincipalToProject
|
|
351
|
+
* @request POST:/v1/projects/principals
|
|
352
|
+
* @secure
|
|
353
|
+
*/
|
|
354
|
+
addPrincipalToProject: (data: AddUserToProjectInput, params?: RequestParams) => Promise<axios.AxiosResponse<void, any>>;
|
|
355
|
+
/**
|
|
356
|
+
* No description
|
|
357
|
+
*
|
|
358
|
+
* @tags projects
|
|
359
|
+
* @name DeletePrincipalFromProject
|
|
360
|
+
* @request DELETE:/v1/projects/principals/{principalId}
|
|
361
|
+
* @secure
|
|
362
|
+
*/
|
|
363
|
+
deletePrincipalFromProject: (principalId: string, query: {
|
|
364
|
+
/** type of principal */
|
|
365
|
+
principalType: 'user' | 'machine_user';
|
|
366
|
+
}, params?: RequestParams) => Promise<axios.AxiosResponse<void, any>>;
|
|
367
|
+
/**
|
|
368
|
+
* No description
|
|
369
|
+
*
|
|
370
|
+
* @tags policies
|
|
371
|
+
* @name DeprecatedGetPolicies
|
|
372
|
+
* @request GET:/v1/policies/users/{userId}
|
|
373
|
+
* @deprecated
|
|
374
|
+
* @secure
|
|
375
|
+
*/
|
|
376
|
+
deprecatedGetPolicies: (userId: string, params?: RequestParams) => Promise<axios.AxiosResponse<PolicyDto, any>>;
|
|
377
|
+
/**
|
|
378
|
+
* No description
|
|
379
|
+
*
|
|
380
|
+
* @tags policies
|
|
381
|
+
* @name DeprecatedUpdatePolicies
|
|
382
|
+
* @request PUT:/v1/policies/users/{userId}
|
|
383
|
+
* @deprecated
|
|
384
|
+
* @secure
|
|
385
|
+
*/
|
|
386
|
+
deprecatedUpdatePolicies: (userId: string, data: PolicyDto, params?: RequestParams) => Promise<axios.AxiosResponse<PolicyDto, any>>;
|
|
387
|
+
/**
|
|
388
|
+
* No description
|
|
389
|
+
*
|
|
390
|
+
* @tags policies
|
|
391
|
+
* @name GetPolicies
|
|
392
|
+
* @request GET:/v1/policies/principals/{principalId}
|
|
393
|
+
* @secure
|
|
394
|
+
*/
|
|
395
|
+
getPolicies: (principalId: string, query: {
|
|
396
|
+
principalType: 'user' | 'machine_user';
|
|
397
|
+
}, params?: RequestParams) => Promise<axios.AxiosResponse<PolicyDto, any>>;
|
|
398
|
+
/**
|
|
399
|
+
* No description
|
|
400
|
+
*
|
|
401
|
+
* @tags policies
|
|
402
|
+
* @name UpdatePolicies
|
|
403
|
+
* @request PUT:/v1/policies/principals/{principalId}
|
|
404
|
+
* @secure
|
|
405
|
+
*/
|
|
406
|
+
updatePolicies: (principalId: string, query: {
|
|
407
|
+
principalType: 'user' | 'machine_user';
|
|
408
|
+
}, data: PolicyDto, params?: RequestParams) => Promise<axios.AxiosResponse<PolicyDto, any>>;
|
|
409
|
+
/**
|
|
410
|
+
* No description
|
|
411
|
+
*
|
|
412
|
+
* @tags machine-users
|
|
413
|
+
* @name CreateMachineUser
|
|
414
|
+
* @request POST:/v1/machine-users
|
|
415
|
+
* @secure
|
|
416
|
+
*/
|
|
417
|
+
createMachineUser: (data: CreateMachineUserInput, params?: RequestParams) => Promise<axios.AxiosResponse<MachineUserDto, any>>;
|
|
418
|
+
/**
|
|
419
|
+
* No description
|
|
420
|
+
*
|
|
421
|
+
* @tags machine-users
|
|
422
|
+
* @name ListMachineUser
|
|
423
|
+
* @request GET:/v1/machine-users
|
|
424
|
+
* @secure
|
|
425
|
+
*/
|
|
426
|
+
listMachineUser: (params?: RequestParams) => Promise<axios.AxiosResponse<MachineUserList, any>>;
|
|
427
|
+
/**
|
|
428
|
+
* No description
|
|
429
|
+
*
|
|
430
|
+
* @tags machine-users
|
|
431
|
+
* @name GetMachineUser
|
|
432
|
+
* @request GET:/v1/machine-users/{machineUserId}
|
|
433
|
+
* @secure
|
|
434
|
+
*/
|
|
435
|
+
getMachineUser: (machineUserId: string, params?: RequestParams) => Promise<axios.AxiosResponse<MachineUserDto, any>>;
|
|
436
|
+
/**
|
|
437
|
+
* No description
|
|
438
|
+
*
|
|
439
|
+
* @tags machine-users
|
|
440
|
+
* @name UpdateMachineUser
|
|
441
|
+
* @request PATCH:/v1/machine-users/{machineUserId}
|
|
442
|
+
* @secure
|
|
443
|
+
*/
|
|
444
|
+
updateMachineUser: (machineUserId: string, data: UpdateMachineUserInput, params?: RequestParams) => Promise<axios.AxiosResponse<MachineUserDto, any>>;
|
|
445
|
+
/**
|
|
446
|
+
* No description
|
|
447
|
+
*
|
|
448
|
+
* @tags machine-users
|
|
449
|
+
* @name DeleteMachineUser
|
|
450
|
+
* @request DELETE:/v1/machine-users/{machineUserId}
|
|
451
|
+
* @secure
|
|
452
|
+
*/
|
|
453
|
+
deleteMachineUser: (machineUserId: string, params?: RequestParams) => Promise<axios.AxiosResponse<void, any>>;
|
|
454
|
+
};
|
|
455
|
+
}
|