@affinidi/cli 1.59.5 → 1.59.7

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.
@@ -1,6 +1,6 @@
1
1
  import { Command } from '@oclif/core';
2
2
  import { CliError } from '../../errors';
3
- declare type ListProjectsOutputType = 'json' | 'table' | 'csv';
3
+ type ListProjectsOutputType = 'json' | 'table' | 'csv';
4
4
  export default class Projects extends Command {
5
5
  static command: string;
6
6
  static usage: string;
@@ -1,7 +1,7 @@
1
1
  import { Command, Interfaces } from '@oclif/core';
2
2
  import { CliError } from '../../errors';
3
3
  import { ScopeType } from '../../services/schema-manager';
4
- declare type OutputType = 'csv' | 'table' | 'json';
4
+ type OutputType = 'csv' | 'table' | 'json';
5
5
  export default class Schemas extends Command {
6
6
  static command: string;
7
7
  static usage: string;
@@ -1,7 +1,7 @@
1
1
  import { Command, Interfaces } from '@oclif/core';
2
2
  import { ViewFormat } from '../../constants';
3
3
  import { CliError } from '../../errors';
4
- export declare type ShowFieldType = 'info' | 'json' | 'jsonld';
4
+ export type ShowFieldType = 'info' | 'json' | 'jsonld';
5
5
  export default class Schema extends Command {
6
6
  static command: string;
7
7
  static usage: string;
@@ -1,6 +1,6 @@
1
1
  export declare const version = 1;
2
2
  export declare const anonymous = "anonymous";
3
- export declare type ViewFormat = 'plaintext' | 'json';
3
+ export type ViewFormat = 'plaintext' | 'json';
4
4
  export declare const exit = "exit";
5
5
  export declare const logout = "logout";
6
6
  export declare const backToMainMenu = "go back to main menu";
@@ -19,7 +19,7 @@ export declare enum UseCasesAppNames {
19
19
  certificationAndVerification = "certification-and-verification",
20
20
  kycKyb = "kyc-kyb"
21
21
  }
22
- declare type UseCaseType = `${UseCasesAppNames}`;
23
- declare type PlatformType = `${Platforms}`;
22
+ type UseCaseType = `${UseCasesAppNames}`;
23
+ type PlatformType = `${Platforms}`;
24
24
  export declare const generateApplication: (flags: FlagsInput, timeStamp?: number) => Promise<void>;
25
25
  export {};
@@ -4,8 +4,8 @@ export declare const CHECK_OPERATION: Readonly<{
4
4
  CONFIG: "check-config-version";
5
5
  CREDENTIALS: "check-credentials-version";
6
6
  }>;
7
- declare type CheckOperationKeys = keyof typeof CHECK_OPERATION;
8
- declare type CheckVersionHookOptionType = Hooks & {
7
+ type CheckOperationKeys = keyof typeof CHECK_OPERATION;
8
+ type CheckVersionHookOptionType = Hooks & {
9
9
  check: {
10
10
  options: {
11
11
  id: typeof CHECK_OPERATION[CheckOperationKeys];
@@ -1,9 +1,9 @@
1
- export declare type MessageBlock = {
1
+ export type MessageBlock = {
2
2
  text: string;
3
3
  styled: string;
4
4
  };
5
5
  export declare const welcomeMessageBlocks: MessageBlock[];
6
- declare type MessageKeyBlock = {
6
+ type MessageKeyBlock = {
7
7
  key: string;
8
8
  } & MessageBlock;
9
9
  export declare const defaultWizardMessages: MessageKeyBlock[];
@@ -10,7 +10,7 @@ export interface EventDTO {
10
10
  metadata?: object;
11
11
  }
12
12
  import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';
13
- export declare type QueryParamsType = Record<string | number, any>;
13
+ export type QueryParamsType = Record<string | number, any>;
14
14
  export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
15
15
  /** set parameter to `true` for call `securityWorker` for this request */
16
16
  secure?: boolean;
@@ -25,7 +25,7 @@ export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'pa
25
25
  /** request body */
26
26
  body?: unknown;
27
27
  }
28
- export declare type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
28
+ export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
29
29
  export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
30
30
  securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
31
31
  secure?: boolean;
@@ -1,12 +1,12 @@
1
1
  export declare const validVersions: number[];
2
2
  export declare const getMajorVersion: () => number;
3
- declare type UserId = string;
4
- declare type UserConfig = {
3
+ type UserId = string;
4
+ type UserConfig = {
5
5
  activeProjectId: string;
6
6
  outputFormat: string;
7
7
  analyticsOptIn?: boolean;
8
8
  };
9
- declare type ConfigStoreFormat = {
9
+ type ConfigStoreFormat = {
10
10
  username: string;
11
11
  version: number;
12
12
  currentUserId: string;
@@ -36,7 +36,7 @@ export interface ProjectList {
36
36
  projects: ProjectDto[];
37
37
  }
38
38
  import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';
39
- export declare type QueryParamsType = Record<string | number, any>;
39
+ export type QueryParamsType = Record<string | number, any>;
40
40
  export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
41
41
  /** set parameter to `true` for call `securityWorker` for this request */
42
42
  secure?: boolean;
@@ -51,7 +51,7 @@ export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'pa
51
51
  /** request body */
52
52
  body?: unknown;
53
53
  }
54
- export declare type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
54
+ export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
55
55
  export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
56
56
  securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
57
57
  secure?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { AxiosResponse } from 'axios';
2
2
  import FormData from 'form-data';
3
3
  import { Api, FullRequestParams, RequestParams } from './issuance.api';
4
- declare type SecurityDataType = unknown;
4
+ type SecurityDataType = unknown;
5
5
  export declare class BulkApi extends Api<SecurityDataType> {
6
6
  request: <T = any, _E = any>({ secure, path, type, query, format, body, ...params }: FullRequestParams) => Promise<AxiosResponse<T, any>>;
7
7
  bulkIssuances: {
@@ -30,7 +30,7 @@ export interface OfferDto {
30
30
  status: 'CREATED' | 'CLAIMED';
31
31
  id: string;
32
32
  }
33
- export declare type AnyObject = Record<string, any>;
33
+ export type AnyObject = Record<string, any>;
34
34
  export interface CreateIssuanceOfferInput {
35
35
  verification: {
36
36
  target: {
@@ -81,7 +81,7 @@ export interface AffinidiClaimInput {
81
81
  credentialOfferResponseToken: string;
82
82
  }
83
83
  import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';
84
- export declare type QueryParamsType = Record<string | number, any>;
84
+ export type QueryParamsType = Record<string | number, any>;
85
85
  export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
86
86
  /** set parameter to `true` for call `securityWorker` for this request */
87
87
  secure?: boolean;
@@ -96,7 +96,7 @@ export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'pa
96
96
  /** request body */
97
97
  body?: unknown;
98
98
  }
99
- export declare type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
99
+ export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
100
100
  export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
101
101
  securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
102
102
  secure?: boolean;
@@ -13,7 +13,7 @@ export declare enum SchemaFieldType {
13
13
  * e.g.: https://public.schemas.affinidi.com/${schema-slug}
14
14
  * so, when GET request is made to this path the service will return this schema
15
15
  */
16
- export declare type SchemaHeaderField = {
16
+ export type SchemaHeaderField = {
17
17
  discoverable?: boolean;
18
18
  type: string;
19
19
  description: string;
@@ -22,18 +22,18 @@ export declare type SchemaHeaderField = {
22
22
  jsonSchemaUrl: string;
23
23
  jsonLdContextUrl: string;
24
24
  };
25
- export declare type SchemaField = {
25
+ export type SchemaField = {
26
26
  name: string;
27
27
  type: SchemaFieldType;
28
28
  required: boolean;
29
29
  description?: string;
30
30
  nested?: SchemaField[];
31
31
  };
32
- export declare type GeneratorInputParams = {
32
+ export type GeneratorInputParams = {
33
33
  header: SchemaHeaderField;
34
34
  fields: SchemaField[];
35
35
  };
36
- export declare type VcJsonLdContextField = {
36
+ export type VcJsonLdContextField = {
37
37
  '@id': string;
38
38
  '@type': string;
39
39
  '@context'?: {
@@ -42,19 +42,19 @@ export declare type VcJsonLdContextField = {
42
42
  [k: string]: number | boolean | VcJsonLdContextField | undefined;
43
43
  };
44
44
  };
45
- export declare type VcJsonLdContext = {
45
+ export type VcJsonLdContext = {
46
46
  '@context': {
47
47
  [k: string]: VcJsonLdContextField;
48
48
  };
49
49
  };
50
- export declare type VcJsonSchemeCredentialSubject = {
50
+ export type VcJsonSchemeCredentialSubject = {
51
51
  required?: string[];
52
52
  properties: {
53
53
  [k: string]: VcJsonSchemaProperty;
54
54
  };
55
55
  [k: string]: any;
56
56
  };
57
- export declare type VcJsonSchemaProperty = {
57
+ export type VcJsonSchemaProperty = {
58
58
  title: string;
59
59
  type: string;
60
60
  format?: string;
@@ -64,7 +64,7 @@ export declare type VcJsonSchemaProperty = {
64
64
  [k: string]: VcJsonSchemaProperty;
65
65
  };
66
66
  };
67
- export declare type VcJsonSchema = {
67
+ export type VcJsonSchema = {
68
68
  title: string;
69
69
  description: string;
70
70
  $id: string;
@@ -1,6 +1,6 @@
1
1
  import { Api as SchemaManagerApi, CreateSchemaInputDto, SchemaDto } from './schema-manager.api';
2
2
  export declare const SCHEMA_MANAGER_URL: string;
3
- export declare type ScopeType = 'public' | 'unlisted' | 'default';
3
+ export type ScopeType = 'public' | 'unlisted' | 'default';
4
4
  declare class SchemaManagerService {
5
5
  private readonly client;
6
6
  constructor(client?: SchemaManagerApi<unknown>);
@@ -2,7 +2,7 @@
2
2
  * `DidAuthRequestToken` is the token that user should use to generate a `DidAuthResponseToken`.
3
3
  `DidAuthResponseToken` can then used to authenticate the subsequent calls to Schema Manager endpoints.
4
4
  */
5
- export declare type DidAuthRequestToken = string;
5
+ export type DidAuthRequestToken = string;
6
6
  export interface DidAuthRequestTokenInput {
7
7
  /** DID that user is trying to authenticate with */
8
8
  audienceDid: string;
@@ -157,7 +157,7 @@ export interface SearchSchemasOutputDto {
157
157
  count: number;
158
158
  }
159
159
  import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';
160
- export declare type QueryParamsType = Record<string | number, any>;
160
+ export type QueryParamsType = Record<string | number, any>;
161
161
  export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
162
162
  /** set parameter to `true` for call `securityWorker` for this request */
163
163
  secure?: boolean;
@@ -172,7 +172,7 @@ export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'pa
172
172
  /** request body */
173
173
  body?: unknown;
174
174
  }
175
- export declare type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
175
+ export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
176
176
  export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
177
177
  securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
178
178
  secure?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { Api as UserManagementApi } from './user-management.api';
2
2
  import { SessionType } from '../vault/typedVaultService';
3
- declare type SessionToken = string;
4
- declare type AuthFlow = 'login' | 'signup';
3
+ type SessionToken = string;
4
+ type AuthFlow = 'login' | 'signup';
5
5
  export declare const USER_MANAGEMENT_URL: string;
6
6
  export declare const parseJwt: (token: string) => any;
7
7
  export declare const getSession: () => SessionType;
@@ -9,7 +9,7 @@ export interface AuthLoginInput {
9
9
  username: string;
10
10
  }
11
11
  import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';
12
- export declare type QueryParamsType = Record<string | number, any>;
12
+ export type QueryParamsType = Record<string | number, any>;
13
13
  export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
14
14
  /** set parameter to `true` for call `securityWorker` for this request */
15
15
  secure?: boolean;
@@ -24,7 +24,7 @@ export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'pa
24
24
  /** request body */
25
25
  body?: unknown;
26
26
  }
27
- export declare type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
27
+ export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
28
28
  export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
29
29
  securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
30
30
  secure?: boolean;
@@ -6,7 +6,7 @@ export declare const VAULT_KEYS: {
6
6
  projectDID: string;
7
7
  session: string;
8
8
  };
9
- export declare type SessionType = {
9
+ export type SessionType = {
10
10
  sessionId: string;
11
11
  consoleAuthToken: string;
12
12
  account: {
@@ -15,14 +15,14 @@ export declare type SessionType = {
15
15
  };
16
16
  scopes: string[];
17
17
  };
18
- declare type CredentialsType = {
18
+ type CredentialsType = {
19
19
  version: number;
20
20
  session: SessionType;
21
21
  activeProjectSummary: ProjectSummary;
22
22
  timeStamp: number;
23
23
  };
24
- export declare type CredentialsTypeKeys = keyof CredentialsType;
25
- declare type CredentialsTypeValues = CredentialsType[CredentialsTypeKeys];
24
+ export type CredentialsTypeKeys = keyof CredentialsType;
25
+ type CredentialsTypeValues = CredentialsType[CredentialsTypeKeys];
26
26
  interface IVaultSetterGetter {
27
27
  clear: () => void;
28
28
  delete: (key: CredentialsTypeKeys) => void;
@@ -5,8 +5,8 @@ export interface ValidateJwtOutput {
5
5
  export interface ValidateJwtInput {
6
6
  token: string;
7
7
  }
8
- export declare type FreeFormObject = Record<string, any>;
9
- export declare type SignedCredential = FreeFormObject;
8
+ export type FreeFormObject = Record<string, any>;
9
+ export type SignedCredential = FreeFormObject;
10
10
  export interface VerifyCredentialShareResponseOutput {
11
11
  jti: string;
12
12
  errors: string[];
@@ -81,7 +81,7 @@ export interface BuildCredentialRequestOutput {
81
81
  /**
82
82
  * @pattern ^https?:\/\/.*$
83
83
  */
84
- export declare type UrlType = string;
84
+ export type UrlType = string;
85
85
  export interface CredentialRequirements {
86
86
  type: string[];
87
87
  constraints?: string[] | Record<string, any[]>[] | (string[] & Record<string, any[]>[]);
@@ -89,11 +89,11 @@ export interface CredentialRequirements {
89
89
  /**
90
90
  * @pattern did:.*
91
91
  */
92
- export declare type DidType = string;
92
+ export type DidType = string;
93
93
  /**
94
94
  * @pattern \d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)
95
95
  */
96
- export declare type DateISOType = string;
96
+ export type DateISOType = string;
97
97
  export interface BuildCredentialRequestInput {
98
98
  callbackUrl?: UrlType | null;
99
99
  credentialRequirements: CredentialRequirements[];
@@ -104,7 +104,7 @@ export interface BuildCredentialRequestInput {
104
104
  nonce?: string | null;
105
105
  }
106
106
  import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';
107
- export declare type QueryParamsType = Record<string | number, any>;
107
+ export type QueryParamsType = Record<string | number, any>;
108
108
  export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {
109
109
  /** set parameter to `true` for call `securityWorker` for this request */
110
110
  secure?: boolean;
@@ -119,7 +119,7 @@ export interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'pa
119
119
  /** request body */
120
120
  body?: unknown;
121
121
  }
122
- export declare type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
122
+ export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
123
123
  export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {
124
124
  securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
125
125
  secure?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@affinidi/cli",
3
- "version": "1.59.5",
3
+ "version": "1.59.7",
4
4
  "description": "Affinidi Elements command-line-interface",
5
5
  "author": "affinidi.com",
6
6
  "license": "Apache-2.0",
@@ -53,14 +53,14 @@
53
53
  "homepage": "https://github.com/affinidi/affinidi-cli#readme",
54
54
  "dependencies": {
55
55
  "@oclif/core": "^1.20.4",
56
- "@oclif/plugin-autocomplete": "^1.3.6",
57
- "@oclif/plugin-help": "^5.1.16",
58
- "@oclif/plugin-warn-if-update-available": "^2.0.15",
56
+ "@oclif/plugin-autocomplete": "^1.4.5",
57
+ "@oclif/plugin-help": "^5.2.4",
58
+ "@oclif/plugin-warn-if-update-available": "^2.0.26",
59
59
  "app-root-path": "^3.1.0",
60
- "axios": "^1.2.1",
60
+ "axios": "^1.3.2",
61
61
  "chalk": "^4.1.2",
62
62
  "conf": "^10.2.0",
63
- "csv-stringify": "^6.2.0",
63
+ "csv-stringify": "^6.2.3",
64
64
  "email-validator": "^2.0.4",
65
65
  "form-data": "^4.0.0",
66
66
  "http-status-codes": "^2.2.0",
@@ -71,39 +71,39 @@
71
71
  "devDependencies": {
72
72
  "@affinidi/eslint-config": "2.0.0-beta.0",
73
73
  "@affinidi/prettier-config": "2.0.0-beta.0",
74
- "@oclif/test": "^2.2.6",
74
+ "@oclif/test": "^2.3.5",
75
75
  "@semantic-release/exec": "^6.0.3",
76
76
  "@semantic-release/git": "^10.0.1",
77
- "@semantic-release/npm": "^9.0.1",
77
+ "@semantic-release/npm": "^9.0.2",
78
78
  "@types/chai": "4.3.4",
79
79
  "@types/inquirer": "^8.2.3",
80
80
  "@types/mocha": "10.0.1",
81
- "@types/node": "18.11.18",
82
- "@typescript-eslint/eslint-plugin": "^5.41.0",
83
- "@typescript-eslint/parser": "^5.41.0",
81
+ "@types/node": "^18.11.19",
82
+ "@typescript-eslint/eslint-plugin": "^5.50.0",
83
+ "@typescript-eslint/parser": "^5.50.0",
84
84
  "chai": "4.3.7",
85
- "eslint": "^8.26.0",
85
+ "eslint": "^8.33.0",
86
86
  "eslint-config-oclif": "^4",
87
87
  "eslint-config-oclif-typescript": "^1.0.3",
88
- "eslint-config-prettier": "^8.5.0",
88
+ "eslint-config-prettier": "^8.6.0",
89
89
  "eslint-plugin-mocha": "^10.1.0",
90
90
  "eslint-plugin-prettier": "^4.2.1",
91
- "fancy-test": "^2.0.5",
92
- "husky": "^8.0.1",
91
+ "fancy-test": "^2.0.12",
92
+ "husky": "^8.0.3",
93
93
  "is-ci": "^3.0.1",
94
94
  "license-checker": "25.0.1",
95
- "mocha": "^10.1.0",
95
+ "mocha": "^10.2.0",
96
96
  "nyc": "15.1.0",
97
- "oclif": "^3.2.22",
97
+ "oclif": "^3.6.3",
98
98
  "prettier": "^2.7.1",
99
99
  "semantic-release": "^19.0.5",
100
100
  "shx": "^0.3.4",
101
- "sinon": "^15.0.0",
101
+ "sinon": "^15.0.1",
102
102
  "swagger-typescript-api": "^10.0.3",
103
103
  "ts-mockito": "^2.6.1",
104
104
  "ts-node": "^10.9.1",
105
- "tslib": "^2.4.0",
106
- "typescript": "^4.8.4"
105
+ "tslib": "^2.5.0",
106
+ "typescript": "^4.9.5"
107
107
  },
108
108
  "oclif": {
109
109
  "bin": "affinidi",