simplelogin-client 0.1.6 → 0.2.0
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 +8 -6
- package/docs/development.md +30 -0
- package/docs/faq.md +53 -0
- package/package.json +8 -7
- package/tscBuild/config.d.ts +26 -0
- package/tscBuild/config.js +22 -0
- package/tscBuild/config.js.map +1 -0
- package/tscBuild/index.d.ts +2 -1
- package/tscBuild/index.js +4 -13
- package/tscBuild/index.js.map +1 -1
- package/tscBuild/sdk/apis/AccountApi.d.ts +177 -0
- package/tscBuild/sdk/apis/AccountApi.js +409 -0
- package/tscBuild/sdk/apis/AccountApi.js.map +1 -0
- package/tscBuild/sdk/apis/AliasApi.d.ts +181 -0
- package/tscBuild/sdk/apis/AliasApi.js +421 -0
- package/tscBuild/sdk/apis/AliasApi.js.map +1 -0
- package/tscBuild/sdk/apis/CustomDomainApi.d.ts +33 -0
- package/tscBuild/sdk/apis/CustomDomainApi.js +77 -0
- package/tscBuild/sdk/apis/CustomDomainApi.js.map +1 -0
- package/tscBuild/sdk/apis/MailboxApi.d.ts +70 -0
- package/tscBuild/sdk/apis/MailboxApi.js +166 -0
- package/tscBuild/sdk/apis/MailboxApi.js.map +1 -0
- package/tscBuild/sdk/apis/index.d.ts +4 -0
- package/tscBuild/sdk/apis/index.js +23 -0
- package/tscBuild/sdk/apis/index.js.map +1 -0
- package/tscBuild/sdk/index.d.ts +3 -13
- package/tscBuild/sdk/index.js +5 -13
- package/tscBuild/sdk/index.js.map +1 -1
- package/tscBuild/sdk/models/Alias.d.ts +112 -0
- package/tscBuild/sdk/models/Alias.js +85 -0
- package/tscBuild/sdk/models/Alias.js.map +1 -0
- package/tscBuild/sdk/models/AliasAliasIdActivities.d.ts +50 -0
- package/tscBuild/sdk/models/AliasAliasIdActivities.js +53 -0
- package/tscBuild/sdk/models/AliasAliasIdActivities.js.map +1 -0
- package/tscBuild/sdk/models/AliasAliasIdActivitiesModelArray.d.ts +21 -0
- package/tscBuild/sdk/models/AliasAliasIdActivitiesModelArray.js +52 -0
- package/tscBuild/sdk/models/AliasAliasIdActivitiesModelArray.js.map +1 -0
- package/tscBuild/sdk/models/AliasAliasIdContacts.d.ts +68 -0
- package/tscBuild/sdk/models/AliasAliasIdContacts.js +72 -0
- package/tscBuild/sdk/models/AliasAliasIdContacts.js.map +1 -0
- package/tscBuild/sdk/models/AliasAliasIdContactsModelArray.d.ts +21 -0
- package/tscBuild/sdk/models/AliasAliasIdContactsModelArray.js +52 -0
- package/tscBuild/sdk/models/AliasAliasIdContactsModelArray.js.map +1 -0
- package/tscBuild/sdk/models/AliasAliasIdContactsPost.d.ts +20 -0
- package/tscBuild/sdk/models/AliasAliasIdContactsPost.js +38 -0
- package/tscBuild/sdk/models/AliasAliasIdContactsPost.js.map +1 -0
- package/tscBuild/sdk/models/AliasAliasIdDelete.d.ts +20 -0
- package/tscBuild/sdk/models/AliasAliasIdDelete.js +51 -0
- package/tscBuild/sdk/models/AliasAliasIdDelete.js.map +1 -0
- package/tscBuild/sdk/models/AliasAliasIdPatch.d.ts +50 -0
- package/tscBuild/sdk/models/AliasAliasIdPatch.js +61 -0
- package/tscBuild/sdk/models/AliasAliasIdPatch.js.map +1 -0
- package/tscBuild/sdk/models/AliasAliasIdTogglePost.d.ts +20 -0
- package/tscBuild/sdk/models/AliasAliasIdTogglePost.js +51 -0
- package/tscBuild/sdk/models/AliasAliasIdTogglePost.js.map +1 -0
- package/tscBuild/sdk/models/AliasCustomNewPost.d.ts +44 -0
- package/tscBuild/sdk/models/AliasCustomNewPost.js +62 -0
- package/tscBuild/sdk/models/AliasCustomNewPost.js.map +1 -0
- package/tscBuild/sdk/models/AliasLatestActivity.d.ts +33 -0
- package/tscBuild/sdk/models/AliasLatestActivity.js +45 -0
- package/tscBuild/sdk/models/AliasLatestActivity.js.map +1 -0
- package/tscBuild/sdk/models/AliasLatestActivityContact.d.ts +32 -0
- package/tscBuild/sdk/models/AliasLatestActivityContact.js +44 -0
- package/tscBuild/sdk/models/AliasLatestActivityContact.js.map +1 -0
- package/tscBuild/sdk/models/AliasModelArray.d.ts +21 -0
- package/tscBuild/sdk/models/AliasModelArray.js +52 -0
- package/tscBuild/sdk/models/AliasModelArray.js.map +1 -0
- package/tscBuild/sdk/models/AliasOptions.d.ts +40 -0
- package/tscBuild/sdk/models/AliasOptions.js +62 -0
- package/tscBuild/sdk/models/AliasOptions.js.map +1 -0
- package/tscBuild/sdk/models/AliasOptionsRecommendationInner.d.ts +26 -0
- package/tscBuild/sdk/models/AliasOptionsRecommendationInner.js +41 -0
- package/tscBuild/sdk/models/AliasOptionsRecommendationInner.js.map +1 -0
- package/tscBuild/sdk/models/AliasOptionsSuffixesInner.d.ts +38 -0
- package/tscBuild/sdk/models/AliasOptionsSuffixesInner.js +47 -0
- package/tscBuild/sdk/models/AliasOptionsSuffixesInner.js.map +1 -0
- package/tscBuild/sdk/models/AliasRandomNewPost.d.ts +20 -0
- package/tscBuild/sdk/models/AliasRandomNewPost.js +51 -0
- package/tscBuild/sdk/models/AliasRandomNewPost.js.map +1 -0
- package/tscBuild/sdk/models/AuthActivatePost.d.ts +26 -0
- package/tscBuild/sdk/models/AuthActivatePost.js +41 -0
- package/tscBuild/sdk/models/AuthActivatePost.js.map +1 -0
- package/tscBuild/sdk/models/AuthForgotPasswordPost.d.ts +20 -0
- package/tscBuild/sdk/models/AuthForgotPasswordPost.js +38 -0
- package/tscBuild/sdk/models/AuthForgotPasswordPost.js.map +1 -0
- package/tscBuild/sdk/models/AuthLogin.d.ts +44 -0
- package/tscBuild/sdk/models/AuthLogin.js +50 -0
- package/tscBuild/sdk/models/AuthLogin.js.map +1 -0
- package/tscBuild/sdk/models/AuthLoginPost.d.ts +32 -0
- package/tscBuild/sdk/models/AuthLoginPost.js +44 -0
- package/tscBuild/sdk/models/AuthLoginPost.js.map +1 -0
- package/tscBuild/sdk/models/AuthMfa.d.ts +32 -0
- package/tscBuild/sdk/models/AuthMfa.js +44 -0
- package/tscBuild/sdk/models/AuthMfa.js.map +1 -0
- package/tscBuild/sdk/models/AuthMfaPost.d.ts +32 -0
- package/tscBuild/sdk/models/AuthMfaPost.js +44 -0
- package/tscBuild/sdk/models/AuthMfaPost.js.map +1 -0
- package/tscBuild/sdk/models/AuthReactivatePost.d.ts +20 -0
- package/tscBuild/sdk/models/AuthReactivatePost.js +38 -0
- package/tscBuild/sdk/models/AuthReactivatePost.js.map +1 -0
- package/tscBuild/sdk/models/AuthRegisterPost.d.ts +26 -0
- package/tscBuild/sdk/models/AuthRegisterPost.js +41 -0
- package/tscBuild/sdk/models/AuthRegisterPost.js.map +1 -0
- package/tscBuild/sdk/models/CustomDomain.d.ts +75 -0
- package/tscBuild/sdk/models/CustomDomain.js +66 -0
- package/tscBuild/sdk/models/CustomDomain.js.map +1 -0
- package/tscBuild/sdk/models/Mailbox.d.ts +50 -0
- package/tscBuild/sdk/models/Mailbox.js +53 -0
- package/tscBuild/sdk/models/Mailbox.js.map +1 -0
- package/tscBuild/sdk/models/MailboxMailboxIdPut.d.ts +32 -0
- package/tscBuild/sdk/models/MailboxMailboxIdPut.js +55 -0
- package/tscBuild/sdk/models/MailboxMailboxIdPut.js.map +1 -0
- package/tscBuild/sdk/models/MailboxModelArray.d.ts +21 -0
- package/tscBuild/sdk/models/MailboxModelArray.js +52 -0
- package/tscBuild/sdk/models/MailboxModelArray.js.map +1 -0
- package/tscBuild/sdk/models/MailboxModelRef.d.ts +26 -0
- package/tscBuild/sdk/models/MailboxModelRef.js +41 -0
- package/tscBuild/sdk/models/MailboxModelRef.js.map +1 -0
- package/tscBuild/sdk/models/MailboxPost.d.ts +20 -0
- package/tscBuild/sdk/models/MailboxPost.js +51 -0
- package/tscBuild/sdk/models/MailboxPost.js.map +1 -0
- package/tscBuild/sdk/models/ModelError.d.ts +20 -0
- package/tscBuild/sdk/models/ModelError.js +51 -0
- package/tscBuild/sdk/models/ModelError.js.map +1 -0
- package/tscBuild/sdk/models/Success.d.ts +20 -0
- package/tscBuild/sdk/models/Success.js +38 -0
- package/tscBuild/sdk/models/Success.js.map +1 -0
- package/tscBuild/sdk/models/SudoPatch.d.ts +20 -0
- package/tscBuild/sdk/models/SudoPatch.js +51 -0
- package/tscBuild/sdk/models/SudoPatch.js.map +1 -0
- package/tscBuild/sdk/models/UserApiKey.d.ts +20 -0
- package/tscBuild/sdk/models/UserApiKey.js +38 -0
- package/tscBuild/sdk/models/UserApiKey.js.map +1 -0
- package/tscBuild/sdk/models/UserApiKeyPost.d.ts +20 -0
- package/tscBuild/sdk/models/UserApiKeyPost.js +38 -0
- package/tscBuild/sdk/models/UserApiKeyPost.js.map +1 -0
- package/tscBuild/sdk/models/UserCookieToken.d.ts +20 -0
- package/tscBuild/sdk/models/UserCookieToken.js +38 -0
- package/tscBuild/sdk/models/UserCookieToken.js.map +1 -0
- package/tscBuild/sdk/models/UserInfo.d.ts +50 -0
- package/tscBuild/sdk/models/UserInfo.js +53 -0
- package/tscBuild/sdk/models/UserInfo.js.map +1 -0
- package/tscBuild/sdk/models/UserInfoPatch.d.ts +26 -0
- package/tscBuild/sdk/models/UserInfoPatch.js +53 -0
- package/tscBuild/sdk/models/UserInfoPatch.js.map +1 -0
- package/tscBuild/sdk/models/index.d.ts +39 -0
- package/tscBuild/sdk/models/index.js +58 -0
- package/tscBuild/sdk/models/index.js.map +1 -0
- package/tscBuild/sdk/runtime.d.ts +178 -0
- package/tscBuild/sdk/runtime.js +321 -0
- package/tscBuild/sdk/runtime.js.map +1 -0
- package/tscBuild/tsconfig.build.tsbuildinfo +1 -1
- package/tscBuild/sdk/api.d.ts +0 -2173
- package/tscBuild/sdk/api.js +0 -2441
- package/tscBuild/sdk/api.js.map +0 -1
- package/tscBuild/sdk/configuration.d.ts +0 -55
- package/tscBuild/sdk/configuration.js +0 -59
- package/tscBuild/sdk/configuration.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<strong>Zero-dependency TypeScript client for the <a href="https://simplelogin.io">SimpleLogin.io</a> API. Compatible with NodeJS and browsers.</strong>
|
|
5
5
|
</p>
|
|
6
6
|
<p>
|
|
7
|
-
<a href="https://kennethwussmann.github.io/simplelogin-client/typedoc/
|
|
7
|
+
<a href="https://kennethwussmann.github.io/simplelogin-client/typedoc/index.html">Documentation</a> • <a href="https://kennethwussmann.github.io/simplelogin-client/redoc/index.html">API Spec</a>
|
|
8
8
|
</p>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
@@ -46,11 +46,13 @@ npm install --save simplelogin-client
|
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
```typescript
|
|
49
|
-
import {
|
|
49
|
+
import { AliasApi, SimpleLoginConfig } from 'simplelogin-client';
|
|
50
50
|
|
|
51
|
-
const alias = new
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
const alias = new AliasApi(
|
|
52
|
+
new SimpleLoginConfig({
|
|
53
|
+
apiKey: process.env.API_KEY,
|
|
54
|
+
}),
|
|
55
|
+
);
|
|
54
56
|
|
|
55
57
|
const createdAlias = await alias.createRandomAlias({
|
|
56
58
|
note: 'This alias was created with simplelogin-client!',
|
|
@@ -71,7 +73,7 @@ console.log(createdAlias);
|
|
|
71
73
|
*/
|
|
72
74
|
```
|
|
73
75
|
|
|
74
|
-
Check the [documentation](https://kennethwussmann.github.io/simplelogin-client/typedoc/
|
|
76
|
+
Check the [documentation](https://kennethwussmann.github.io/simplelogin-client/typedoc/index.html) for all available methods and the [FAQ](./docs/faq.md) in case of questions.
|
|
75
77
|
|
|
76
78
|
## Development
|
|
77
79
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
It's basically writing OpenAPI spec, to contribute code to this client.
|
|
4
|
+
|
|
5
|
+
The client is generated using [openapi-generator](https://openapi-generator.tech) and the OpenAPI spec is written with [boats](https://github.com/j-d-carmichael/boats).
|
|
6
|
+
|
|
7
|
+
Everything in `./dist` & `./src/sdk` is generated and should not be modified manually. To adjust the API client, docs or the built OpenAPI spec, adjust the YAML files in `./oas` to document the API. Check the [boats documentation](https://j-d-carmichael.github.io/boats/#/) and the [OpenAPI v3 spec](https://swagger.io/specification/) for further guidance.
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
> Requires Docker & NodeJS 18+
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
# Install dependencies
|
|
15
|
+
npm install
|
|
16
|
+
|
|
17
|
+
# Start build of ./dist & ./src/sdk
|
|
18
|
+
npm run build
|
|
19
|
+
|
|
20
|
+
# During development the build can run when a source file was changed using
|
|
21
|
+
npm run dev
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Build process
|
|
25
|
+
|
|
26
|
+
The build process is configured in `scripts/build.ts` and `scripts/rebuild.ts`. These scripts combine all the different CLI tools for the build process and ensures everthing fits together. They also modify some generated files to make them compatible.
|
|
27
|
+
|
|
28
|
+
## Contribute
|
|
29
|
+
|
|
30
|
+
PRs are highly welcome. Remember to run the build and commit the generated files.
|
package/docs/faq.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# FAQ
|
|
2
|
+
|
|
3
|
+
## Can the client be used for selfhosted installations of SimpleLogin?
|
|
4
|
+
|
|
5
|
+
Yes, the used API url can be adjusted when constructing the client:
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { AliasApi, SimpleLoginConfig } from 'simplelogin-client';
|
|
9
|
+
|
|
10
|
+
const alias = new AliasApi(
|
|
11
|
+
new SimpleLoginConfig({
|
|
12
|
+
apiKey: process.env.API_KEY,
|
|
13
|
+
basePath: 'https://app.my-selfhosted-simplelogin.io/api', // <-- change me
|
|
14
|
+
}),
|
|
15
|
+
);
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
> Check the [docs](https://kennethwussmann.github.io/simplelogin-client/typedoc/classes/SimpleLogin.BaseAPI.html#constructor) for more information.
|
|
19
|
+
|
|
20
|
+
## What NodeJS version and browsers are supported?
|
|
21
|
+
|
|
22
|
+
This client is developed for NodeJS 18 and modern browsers.
|
|
23
|
+
It can run in most NodeJS versions and most browsers as well with a third-party `fetch` API.
|
|
24
|
+
|
|
25
|
+
It does not require any dependencies by default when used in enviroments where a global `fetch` API is available. This is the case for NodeJS 18 and modern browsers.
|
|
26
|
+
|
|
27
|
+
In case you want to use the client with older versions of NodeJS you may need to install a third-party `fetch` compliant library like [`node-fetch`](https://www.npmjs.com/package/node-fetch). You then just pass the `fetch` HTTP client into the API client:
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { AliasApi } from 'simplelogin-client';
|
|
31
|
+
import fetch from 'node-fetch'; // v2
|
|
32
|
+
|
|
33
|
+
const alias = new AliasApi(
|
|
34
|
+
new SimpleLoginConfig({
|
|
35
|
+
apiKey: process.env.API_KEY,
|
|
36
|
+
fetchApi: fetch, // <-- insert fetch API
|
|
37
|
+
}),
|
|
38
|
+
);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Same for [outdated browsers that do not support `fetch`](https://caniuse.com/fetch) with alternatives like [`whatwg-fetch`](https://github.com/github/fetch).
|
|
42
|
+
|
|
43
|
+
## Can I use the OpenAPI Spec to generate clients for other languages?
|
|
44
|
+
|
|
45
|
+
Yes of course! Check the [license](../LICENSE) for conditions under which this code can be used.
|
|
46
|
+
|
|
47
|
+
## What's the current project state?
|
|
48
|
+
|
|
49
|
+
The client is still under heavy development. But that shouldn't scare you from already using it. It's just a dumb REST client and the alias management through the client already works very well.
|
|
50
|
+
|
|
51
|
+
Still you may stumble upon bugs, wrongly configured requests, etc. The development mainly affects missing functionality to be support everything the upstream API can do. During the v0.\* versions you may even expect breaking changes in the client's API.
|
|
52
|
+
|
|
53
|
+
Please be so kind to [report any issues](https://github.com/KennethWussmann/simplelogin-client/issues) or even [contribute fixes](./development.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simplelogin-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Zero-dependency TypeScript client for the SimpleLogin.io API",
|
|
5
5
|
"main": "tscBuild/index.js",
|
|
6
6
|
"types": "tscBuild/index.d.ts",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"files": [
|
|
35
35
|
"README.md",
|
|
36
36
|
"LICENSE",
|
|
37
|
+
"./docs",
|
|
37
38
|
"./tscBuild"
|
|
38
39
|
],
|
|
39
40
|
"watch": {
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@moia-oss/eslint-prettier-typescript-config": "^0.11.46",
|
|
55
|
-
"@types/jest": "^29.
|
|
56
|
+
"@types/jest": "^29.4.0",
|
|
56
57
|
"@types/node": "18.*",
|
|
57
58
|
"@types/node-fetch": "^2.6.2",
|
|
58
59
|
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
|
@@ -60,21 +61,21 @@
|
|
|
60
61
|
"boats": "^3.4.0",
|
|
61
62
|
"chalk": "^5.2.0",
|
|
62
63
|
"dotenv": "^16.0.3",
|
|
63
|
-
"eslint": "^8.
|
|
64
|
+
"eslint": "^8.34.0",
|
|
64
65
|
"eslint-plugin-jest": "^27.2.1",
|
|
65
66
|
"eslint-plugin-prettier": "^4.2.1",
|
|
66
67
|
"globby": "^13.1.3",
|
|
67
68
|
"husky": "^8.0.3",
|
|
68
|
-
"jest": "^29.
|
|
69
|
+
"jest": "^29.4.2",
|
|
69
70
|
"lint-staged": "^13",
|
|
70
|
-
"npm-check-updates": "^16.
|
|
71
|
+
"npm-check-updates": "^16.7.4",
|
|
71
72
|
"npm-watch": "^0.11.0",
|
|
72
73
|
"prettier": "^2.8.4",
|
|
73
74
|
"redoc-cli": "^0.13.20",
|
|
74
|
-
"ts-jest": "^29.0.
|
|
75
|
+
"ts-jest": "^29.0.5",
|
|
75
76
|
"ts-node": "^10.9.1",
|
|
76
77
|
"tsx": "^3.12.3",
|
|
77
|
-
"typedoc": "^0.23.
|
|
78
|
+
"typedoc": "^0.23.25",
|
|
78
79
|
"typescript": "^4.9.5",
|
|
79
80
|
"zx": "^7.1.1"
|
|
80
81
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Configuration, FetchAPI } from './sdk';
|
|
2
|
+
export type SimpleLoginProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Most API endpoints require an API key to be passed in the header.
|
|
5
|
+
* @default undefined
|
|
6
|
+
*/
|
|
7
|
+
apiKey: string;
|
|
8
|
+
/**
|
|
9
|
+
* Override the default base path. This is useful for testing, or for selfhosted instances.
|
|
10
|
+
* @default https://app.simplelogin.io/api
|
|
11
|
+
*/
|
|
12
|
+
basePath?: string;
|
|
13
|
+
/**
|
|
14
|
+
* In case you want to use the client with older versions of NodeJS you may need to install a third-party `fetch` compliant library like `node-fetch`.
|
|
15
|
+
* You then just pass the `fetch` HTTP client here.
|
|
16
|
+
* @default fetch provided by platform
|
|
17
|
+
*/
|
|
18
|
+
fetchApi?: FetchAPI;
|
|
19
|
+
};
|
|
20
|
+
export declare class SimpleLoginConfig extends Configuration {
|
|
21
|
+
private props;
|
|
22
|
+
constructor(props: SimpleLoginProps);
|
|
23
|
+
get apiKey(): () => string;
|
|
24
|
+
get basePath(): string;
|
|
25
|
+
get fetchApi(): any;
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimpleLoginConfig = void 0;
|
|
4
|
+
const sdk_1 = require("./sdk");
|
|
5
|
+
class SimpleLoginConfig extends sdk_1.Configuration {
|
|
6
|
+
props;
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super();
|
|
9
|
+
this.props = props;
|
|
10
|
+
}
|
|
11
|
+
get apiKey() {
|
|
12
|
+
return () => this.props.apiKey;
|
|
13
|
+
}
|
|
14
|
+
get basePath() {
|
|
15
|
+
return this.props.basePath || super.basePath;
|
|
16
|
+
}
|
|
17
|
+
get fetchApi() {
|
|
18
|
+
return this.props.fetchApi || super.fetchApi;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.SimpleLoginConfig = SimpleLoginConfig;
|
|
22
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AAAA,+BAAgD;AAqBhD,MAAa,iBAAkB,SAAQ,mBAAa;IAC9B;IAApB,YAAoB,KAAuB;QACzC,KAAK,EAAE,CAAC;QADU,UAAK,GAAL,KAAK,CAAkB;IAE3C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IACjC,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC;IAC/C,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC;IAC/C,CAAC;CACF;AAhBD,8CAgBC"}
|
package/tscBuild/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export *
|
|
1
|
+
export * from './sdk';
|
|
2
|
+
export * from './config';
|
package/tscBuild/index.js
CHANGED
|
@@ -10,19 +10,10 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
24
15
|
};
|
|
25
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports
|
|
27
|
-
|
|
17
|
+
__exportStar(require("./sdk"), exports);
|
|
18
|
+
__exportStar(require("./config"), exports);
|
|
28
19
|
//# sourceMappingURL=index.js.map
|
package/tscBuild/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2CAAyB"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
type RequestInit = any;
|
|
2
|
+
/**
|
|
3
|
+
* SimpleLogin (unofficial)
|
|
4
|
+
* The unofficial SimpleLogin API docs as OpenAPI 3.0.0 spec. This is based on the official markdown based docs, but written in OpenAPI to allow for easier integration with other tools and generation of client SDKs. Please do not contact the SimpleLogin team for support or issues with this API documentation.
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 4.22.0
|
|
7
|
+
* Contact: contact@ketrwu.de
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
import * as runtime from '../runtime';
|
|
14
|
+
import type { AuthActivatePost, AuthForgotPasswordPost, AuthLogin, AuthLoginPost, AuthMfa, AuthMfaPost, AuthReactivatePost, AuthRegisterPost, Success, SudoPatch, UserApiKey, UserApiKeyPost, UserCookieToken, UserInfo, UserInfoPatch } from '../models';
|
|
15
|
+
export interface ActivateAccountRequest {
|
|
16
|
+
authActivatePost: AuthActivatePost;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateApiKeyRequest {
|
|
19
|
+
userApiKeyPost: UserApiKeyPost;
|
|
20
|
+
}
|
|
21
|
+
export interface EnableSudoModeRequest {
|
|
22
|
+
sudoPatch: SudoPatch;
|
|
23
|
+
}
|
|
24
|
+
export interface ForgotPasswordRequest {
|
|
25
|
+
authForgotPasswordPost: AuthForgotPasswordPost;
|
|
26
|
+
}
|
|
27
|
+
export interface LoginRequest {
|
|
28
|
+
authLoginPost: AuthLoginPost;
|
|
29
|
+
}
|
|
30
|
+
export interface MfaRequest {
|
|
31
|
+
authMfaPost: AuthMfaPost;
|
|
32
|
+
}
|
|
33
|
+
export interface ReactivateAccountRequest {
|
|
34
|
+
authReactivatePost: AuthReactivatePost;
|
|
35
|
+
}
|
|
36
|
+
export interface RegisterAccountRequest {
|
|
37
|
+
authRegisterPost: AuthRegisterPost;
|
|
38
|
+
}
|
|
39
|
+
export interface UpdateUserInfoRequest {
|
|
40
|
+
userInfoPatch: UserInfoPatch;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
export declare class AccountApi extends runtime.BaseAPI {
|
|
46
|
+
/**
|
|
47
|
+
* Activate a new account with the activation code that was sent to the user\'s email.
|
|
48
|
+
* Activate account
|
|
49
|
+
*/
|
|
50
|
+
activateAccountRaw(requestParameters: ActivateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
51
|
+
/**
|
|
52
|
+
* Activate a new account with the activation code that was sent to the user\'s email.
|
|
53
|
+
* Activate account
|
|
54
|
+
*/
|
|
55
|
+
activateAccount(requestParameters: ActivateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Create a new API key
|
|
58
|
+
* Create API key
|
|
59
|
+
*/
|
|
60
|
+
createApiKeyRaw(requestParameters: CreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserApiKey>>;
|
|
61
|
+
/**
|
|
62
|
+
* Create a new API key
|
|
63
|
+
* Create API key
|
|
64
|
+
*/
|
|
65
|
+
createApiKey(requestParameters: CreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserApiKey>;
|
|
66
|
+
/**
|
|
67
|
+
* Delete user (requires sudo mode)
|
|
68
|
+
* Delete user
|
|
69
|
+
*/
|
|
70
|
+
deleteUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Success>>;
|
|
71
|
+
/**
|
|
72
|
+
* Delete user (requires sudo mode)
|
|
73
|
+
* Delete user
|
|
74
|
+
*/
|
|
75
|
+
deleteUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Success>;
|
|
76
|
+
/**
|
|
77
|
+
* Enable sudo mode
|
|
78
|
+
* Enable sudo mode
|
|
79
|
+
*/
|
|
80
|
+
enableSudoModeRaw(requestParameters: EnableSudoModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Success>>;
|
|
81
|
+
/**
|
|
82
|
+
* Enable sudo mode
|
|
83
|
+
* Enable sudo mode
|
|
84
|
+
*/
|
|
85
|
+
enableSudoMode(requestParameters: EnableSudoModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Success>;
|
|
86
|
+
/**
|
|
87
|
+
* Request a link to reset the password for a registered account.
|
|
88
|
+
* Forgot password
|
|
89
|
+
*/
|
|
90
|
+
forgotPasswordRaw(requestParameters: ForgotPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
91
|
+
/**
|
|
92
|
+
* Request a link to reset the password for a registered account.
|
|
93
|
+
* Forgot password
|
|
94
|
+
*/
|
|
95
|
+
forgotPassword(requestParameters: ForgotPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Get a one time use cookie to exchange it for a valid cookie in the web app
|
|
98
|
+
* Get cookie token
|
|
99
|
+
*/
|
|
100
|
+
getCookieTokenRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserCookieToken>>;
|
|
101
|
+
/**
|
|
102
|
+
* Get a one time use cookie to exchange it for a valid cookie in the web app
|
|
103
|
+
* Get cookie token
|
|
104
|
+
*/
|
|
105
|
+
getCookieToken(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserCookieToken>;
|
|
106
|
+
/**
|
|
107
|
+
* Get user info
|
|
108
|
+
* Get user info
|
|
109
|
+
*/
|
|
110
|
+
getUserInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserInfo>>;
|
|
111
|
+
/**
|
|
112
|
+
* Get user info
|
|
113
|
+
* Get user info
|
|
114
|
+
*/
|
|
115
|
+
getUserInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserInfo>;
|
|
116
|
+
/**
|
|
117
|
+
* Login using email and password to get an access token.
|
|
118
|
+
* Login
|
|
119
|
+
*/
|
|
120
|
+
loginRaw(requestParameters: LoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthLogin>>;
|
|
121
|
+
/**
|
|
122
|
+
* Login using email and password to get an access token.
|
|
123
|
+
* Login
|
|
124
|
+
*/
|
|
125
|
+
login(requestParameters: LoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthLogin>;
|
|
126
|
+
/**
|
|
127
|
+
* Log out user
|
|
128
|
+
* Logout
|
|
129
|
+
*/
|
|
130
|
+
logoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserInfo>>;
|
|
131
|
+
/**
|
|
132
|
+
* Log out user
|
|
133
|
+
* Logout
|
|
134
|
+
*/
|
|
135
|
+
logout(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserInfo>;
|
|
136
|
+
/**
|
|
137
|
+
* Authenticate using MFA
|
|
138
|
+
* MFA authentication
|
|
139
|
+
*/
|
|
140
|
+
mfaRaw(requestParameters: MfaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthMfa>>;
|
|
141
|
+
/**
|
|
142
|
+
* Authenticate using MFA
|
|
143
|
+
* MFA authentication
|
|
144
|
+
*/
|
|
145
|
+
mfa(requestParameters: MfaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthMfa>;
|
|
146
|
+
/**
|
|
147
|
+
* Request a new activation code for an account that was already registered, but not activated yet.
|
|
148
|
+
* Reactivate account
|
|
149
|
+
*/
|
|
150
|
+
reactivateAccountRaw(requestParameters: ReactivateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
151
|
+
/**
|
|
152
|
+
* Request a new activation code for an account that was already registered, but not activated yet.
|
|
153
|
+
* Reactivate account
|
|
154
|
+
*/
|
|
155
|
+
reactivateAccount(requestParameters: ReactivateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Register a new account
|
|
158
|
+
* Register account
|
|
159
|
+
*/
|
|
160
|
+
registerAccountRaw(requestParameters: RegisterAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
161
|
+
/**
|
|
162
|
+
* Register a new account
|
|
163
|
+
* Register account
|
|
164
|
+
*/
|
|
165
|
+
registerAccount(requestParameters: RegisterAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
166
|
+
/**
|
|
167
|
+
* Update user info
|
|
168
|
+
* Update user info
|
|
169
|
+
*/
|
|
170
|
+
updateUserInfoRaw(requestParameters: UpdateUserInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserInfo>>;
|
|
171
|
+
/**
|
|
172
|
+
* Update user info
|
|
173
|
+
* Update user info
|
|
174
|
+
*/
|
|
175
|
+
updateUserInfo(requestParameters: UpdateUserInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserInfo>;
|
|
176
|
+
}
|
|
177
|
+
export {};
|