@triveria/wallet 0.0.2 → 0.0.5

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/api.js CHANGED
@@ -512,7 +512,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
512
512
  };
513
513
  }),
514
514
  /**
515
- * Configures and initiates a new wallet and creates a new key for the authenticated owner (if not already present).
515
+ * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
516
516
  * @param {WalletConfig} [walletConfig]
517
517
  * @param {*} [options] Override http request option.
518
518
  * @throws {RequiredError}
@@ -776,7 +776,7 @@ const DefaultApiFp = function (configuration) {
776
776
  });
777
777
  },
778
778
  /**
779
- * Configures and initiates a new wallet and creates a new key for the authenticated owner (if not already present).
779
+ * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
780
780
  * @param {WalletConfig} [walletConfig]
781
781
  * @param {*} [options] Override http request option.
782
782
  * @throws {RequiredError}
@@ -935,7 +935,7 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
935
935
  return localVarFp.oidcInitiatePreauth(initPreAuthOffer, options).then((request) => request(axios, basePath));
936
936
  },
937
937
  /**
938
- * Configures and initiates a new wallet and creates a new key for the authenticated owner (if not already present).
938
+ * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
939
939
  * @param {WalletConfig} [walletConfig]
940
940
  * @param {*} [options] Override http request option.
941
941
  * @throws {RequiredError}
@@ -1103,7 +1103,7 @@ class DefaultApi extends base_1.BaseAPI {
1103
1103
  return (0, exports.DefaultApiFp)(this.configuration).oidcInitiatePreauth(initPreAuthOffer, options).then((request) => request(this.axios, this.basePath));
1104
1104
  }
1105
1105
  /**
1106
- * Configures and initiates a new wallet and creates a new key for the authenticated owner (if not already present).
1106
+ * The first call will authenticate the client and create a new wallet that will be accessible only to the client. Any further calls are meant to update the wallet configuration. Be careful when changing the configuration as it may result in the wallet malfunction.
1107
1107
  * @param {WalletConfig} [walletConfig]
1108
1108
  * @param {*} [options] Override http request option.
1109
1109
  * @throws {RequiredError}
package/auth.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function RequestToken(clientId: string, clientSecret: string): Promise<string>;
package/base.d.ts ADDED
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Triveria Wallet API
3
+ * Triveria Wallet API allows to manage credentials inside a specific wallet and interactions between wallets as specified by the OIDC4VC specification.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const COLLECTION_FORMATS: {
20
+ csv: string;
21
+ ssv: string;
22
+ tsv: string;
23
+ pipes: string;
24
+ };
25
+ /**
26
+ *
27
+ * @export
28
+ * @interface RequestArgs
29
+ */
30
+ export interface RequestArgs {
31
+ url: string;
32
+ options: RawAxiosRequestConfig;
33
+ }
34
+ /**
35
+ *
36
+ * @export
37
+ * @class BaseAPI
38
+ */
39
+ export declare class BaseAPI {
40
+ protected basePath: string;
41
+ protected axios: AxiosInstance;
42
+ protected configuration: Configuration | undefined;
43
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @class RequiredError
49
+ * @extends {Error}
50
+ */
51
+ export declare class RequiredError extends Error {
52
+ field: string;
53
+ constructor(field: string, msg?: string);
54
+ }
55
+ interface ServerMap {
56
+ [key: string]: {
57
+ url: string;
58
+ description: string;
59
+ }[];
60
+ }
61
+ /**
62
+ *
63
+ * @export
64
+ */
65
+ export declare const operationServerMap: ServerMap;
66
+ export {};
package/client.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { AxiosInstance } from "axios";
2
+ import { DefaultApi } from "./api";
3
+ export type ClientConfiguration = {
4
+ clientId: string;
5
+ clientSecret: string;
6
+ };
7
+ /**
8
+ * DefaultApi - object-oriented interface
9
+ * @export
10
+ * @class DefaultApi
11
+ * @extends {DefaultApi}
12
+ */
13
+ export declare class Client extends DefaultApi {
14
+ protected baseURL: string;
15
+ protected axios: AxiosInstance;
16
+ constructor(clientId: string, clientSecret: string, baseURL?: string, axios?: AxiosInstance);
17
+ }
package/common.d.ts ADDED
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Triveria Wallet API
3
+ * Triveria Wallet API allows to manage credentials inside a specific wallet and interactions between wallets as specified by the OIDC4VC specification.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from "./configuration";
13
+ import type { RequestArgs } from "./base";
14
+ import type { AxiosInstance, AxiosResponse } from 'axios';
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const DUMMY_BASE_URL = "https://example.com";
20
+ /**
21
+ *
22
+ * @throws {RequiredError}
23
+ * @export
24
+ */
25
+ export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
26
+ /**
27
+ *
28
+ * @export
29
+ */
30
+ export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
31
+ /**
32
+ *
33
+ * @export
34
+ */
35
+ export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
36
+ /**
37
+ *
38
+ * @export
39
+ */
40
+ export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
41
+ /**
42
+ *
43
+ * @export
44
+ */
45
+ export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
46
+ /**
47
+ *
48
+ * @export
49
+ */
50
+ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
51
+ /**
52
+ *
53
+ * @export
54
+ */
55
+ export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
56
+ /**
57
+ *
58
+ * @export
59
+ */
60
+ export declare const toPathString: (url: URL) => string;
61
+ /**
62
+ *
63
+ * @export
64
+ */
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Triveria Wallet API
3
+ * Triveria Wallet API allows to manage credentials inside a specific wallet and interactions between wallets as specified by the OIDC4VC specification.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export interface ConfigurationParameters {
13
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
14
+ username?: string;
15
+ password?: string;
16
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
17
+ basePath?: string;
18
+ serverIndex?: number;
19
+ baseOptions?: any;
20
+ formDataCtor?: new () => any;
21
+ }
22
+ export declare class Configuration {
23
+ /**
24
+ * parameter for apiKey security
25
+ * @param name security name
26
+ * @memberof Configuration
27
+ */
28
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
29
+ /**
30
+ * parameter for basic security
31
+ *
32
+ * @type {string}
33
+ * @memberof Configuration
34
+ */
35
+ username?: string;
36
+ /**
37
+ * parameter for basic security
38
+ *
39
+ * @type {string}
40
+ * @memberof Configuration
41
+ */
42
+ password?: string;
43
+ /**
44
+ * parameter for oauth2 security
45
+ * @param name security name
46
+ * @param scopes oauth2 scope
47
+ * @memberof Configuration
48
+ */
49
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
50
+ /**
51
+ * override base path
52
+ *
53
+ * @type {string}
54
+ * @memberof Configuration
55
+ */
56
+ basePath?: string;
57
+ /**
58
+ * override server index
59
+ *
60
+ * @type {number}
61
+ * @memberof Configuration
62
+ */
63
+ serverIndex?: number;
64
+ /**
65
+ * base options for axios calls
66
+ *
67
+ * @type {any}
68
+ * @memberof Configuration
69
+ */
70
+ baseOptions?: any;
71
+ /**
72
+ * The FormData constructor that will be used to create multipart form data
73
+ * requests. You can inject this here so that execution environments that
74
+ * do not support the FormData class can still run the generated client.
75
+ *
76
+ * @type {new () => FormData}
77
+ */
78
+ formDataCtor?: new () => any;
79
+ constructor(param?: ConfigurationParameters);
80
+ /**
81
+ * Check if the given MIME is a JSON MIME.
82
+ * JSON MIME examples:
83
+ * application/json
84
+ * application/json; charset=UTF8
85
+ * APPLICATION/JSON
86
+ * application/vnd.company+json
87
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
88
+ * @return True if the given MIME is JSON, false otherwise.
89
+ */
90
+ isJsonMime(mime: string): boolean;
91
+ }
package/index.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Triveria Wallet API
3
+ * Triveria Wallet API allows to manage credentials inside a specific wallet and interactions between wallets as specified by the OIDC4VC specification.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export * from "./api";
13
+ export * from "./configuration";
14
+ export * from "./client";
15
+ export * from "./auth";
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@triveria/wallet",
3
3
  "private": false,
4
- "version": "0.0.2",
4
+ "version": "0.0.5",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1",
9
- "build": "tsc && cp package.json dist/"
9
+ "build": "tsc && cp package.json dist/",
10
+ "gen-docs": "typedoc --plugin typedoc-plugin-markdown --out docs ./index.ts"
10
11
  },
11
12
  "keywords": [],
12
13
  "author": "",
@@ -16,6 +17,8 @@
16
17
  },
17
18
  "devDependencies": {
18
19
  "@types/node": "^20.10.6",
20
+ "typedoc": "^0.25.7",
21
+ "typedoc-plugin-markdown": "^3.17.1",
19
22
  "typescript": "^5.3.3"
20
23
  }
21
24
  }