simplelogin-client 0.1.7 → 0.2.3
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 +16 -13
- package/docs/development.md +1 -1
- package/docs/faq.md +10 -11
- package/package.json +17 -20
- 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/AliasOptionsRecommendation.d.ts +26 -0
- package/tscBuild/sdk/models/AliasOptionsRecommendation.js +41 -0
- package/tscBuild/sdk/models/AliasOptionsRecommendation.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 +190 -0
- package/tscBuild/sdk/runtime.js +338 -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
|
|
|
@@ -21,18 +21,17 @@
|
|
|
21
21
|
- [x] Contacts and activities
|
|
22
22
|
- [x] Mailbox Management
|
|
23
23
|
- [x] Get, Create, Update, Delete
|
|
24
|
-
- [ ] Custom Domain Management
|
|
24
|
+
- [ ] [Custom Domain Management](https://github.com/KennethWussmann/simplelogin-client/issues/7)
|
|
25
25
|
- [x] Get
|
|
26
26
|
- [ ] Update, Delete
|
|
27
|
-
- [ ] Contact Management
|
|
27
|
+
- [ ] [Contact Management](https://github.com/KennethWussmann/simplelogin-client/issues/8)
|
|
28
28
|
- [x] Get, Create
|
|
29
29
|
- [ ] Delete
|
|
30
30
|
- [ ] Block & unblock
|
|
31
|
-
- [ ] Notifications
|
|
32
|
-
- [ ] Settings
|
|
33
|
-
- [ ] Import & Export
|
|
34
|
-
- [ ] Misc
|
|
35
|
-
- [ ] Phone
|
|
31
|
+
- [ ] [Notifications](https://github.com/KennethWussmann/simplelogin-client/issues/9)
|
|
32
|
+
- [ ] [Settings](https://github.com/KennethWussmann/simplelogin-client/issues/10)
|
|
33
|
+
- [ ] [Import & Export](https://github.com/KennethWussmann/simplelogin-client/issues/11)
|
|
34
|
+
- [ ] [Phone & Misc](https://github.com/KennethWussmann/simplelogin-client/issues/12)
|
|
36
35
|
|
|
37
36
|
## Getting started
|
|
38
37
|
|
|
@@ -46,11 +45,13 @@ npm install --save simplelogin-client
|
|
|
46
45
|
```
|
|
47
46
|
|
|
48
47
|
```typescript
|
|
49
|
-
import {
|
|
48
|
+
import { AliasApi, SimpleLoginConfig } from 'simplelogin-client';
|
|
50
49
|
|
|
51
|
-
const alias = new
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
const alias = new AliasApi(
|
|
51
|
+
new SimpleLoginConfig({
|
|
52
|
+
apiKey: process.env.API_KEY,
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
54
55
|
|
|
55
56
|
const createdAlias = await alias.createRandomAlias({
|
|
56
57
|
note: 'This alias was created with simplelogin-client!',
|
|
@@ -71,7 +72,9 @@ console.log(createdAlias);
|
|
|
71
72
|
*/
|
|
72
73
|
```
|
|
73
74
|
|
|
74
|
-
Check the [documentation](https://kennethwussmann.github.io/simplelogin-client/typedoc/
|
|
75
|
+
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.
|
|
76
|
+
|
|
77
|
+
> :bangbang: Please don't contact the SimpleLogin team with issues regarding this client. Instead open an issue in this repository.
|
|
75
78
|
|
|
76
79
|
## Development
|
|
77
80
|
|
package/docs/development.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
It's basically writing OpenAPI spec, to contribute code to this client.
|
|
4
4
|
|
|
5
|
-
The client is generated using [
|
|
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
6
|
|
|
7
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
8
|
|
package/docs/faq.md
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
Yes, the used API url can be adjusted when constructing the client:
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
|
-
import {
|
|
8
|
+
import { AliasApi, SimpleLoginConfig } from 'simplelogin-client';
|
|
9
9
|
|
|
10
|
-
const alias = new
|
|
11
|
-
{
|
|
10
|
+
const alias = new AliasApi(
|
|
11
|
+
new SimpleLoginConfig({
|
|
12
12
|
apiKey: process.env.API_KEY,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
basePath: 'https://app.my-selfhosted-simplelogin.io/api', // <-- change me
|
|
14
|
+
}),
|
|
15
15
|
);
|
|
16
16
|
```
|
|
17
17
|
|
|
@@ -27,15 +27,14 @@ It does not require any dependencies by default when used in enviroments where a
|
|
|
27
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
28
|
|
|
29
29
|
```typescript
|
|
30
|
-
import {
|
|
30
|
+
import { AliasApi } from 'simplelogin-client';
|
|
31
31
|
import fetch from 'node-fetch'; // v2
|
|
32
32
|
|
|
33
|
-
const alias = new
|
|
34
|
-
{
|
|
33
|
+
const alias = new AliasApi(
|
|
34
|
+
new SimpleLoginConfig({
|
|
35
35
|
apiKey: process.env.API_KEY,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
fetch, // <-- insert fetch API
|
|
36
|
+
fetchApi: fetch, // <-- insert fetch API
|
|
37
|
+
}),
|
|
39
38
|
);
|
|
40
39
|
```
|
|
41
40
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simplelogin-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.3",
|
|
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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"check-codegen": "tsx scripts/index.ts checkCodegen",
|
|
29
29
|
"lint": "tsx scripts/index.ts lint",
|
|
30
30
|
"format": "tsx scripts/index.ts format",
|
|
31
|
-
"dependency-update": "
|
|
31
|
+
"dependency-update": "tsx scripts/index.ts dependencyUpdate",
|
|
32
32
|
"prepare": "husky install"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
@@ -52,31 +52,28 @@
|
|
|
52
52
|
"npm": "9"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@moia-oss/eslint-prettier-typescript-config": "
|
|
56
|
-
"@types/jest": "^29.
|
|
55
|
+
"@moia-oss/eslint-prettier-typescript-config": "0.11.48",
|
|
56
|
+
"@types/jest": "^29.5.0",
|
|
57
57
|
"@types/node": "18.*",
|
|
58
|
-
"@types/node-fetch": "^2.6.
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
60
|
-
"@typescript-eslint/parser": "^5.
|
|
58
|
+
"@types/node-fetch": "^2.6.3",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
|
60
|
+
"@typescript-eslint/parser": "^5.58.0",
|
|
61
61
|
"boats": "^3.4.0",
|
|
62
|
-
"chalk": "^5.2.0",
|
|
63
62
|
"dotenv": "^16.0.3",
|
|
64
|
-
"eslint": "^8.
|
|
63
|
+
"eslint": "^8.38.0",
|
|
65
64
|
"eslint-plugin-jest": "^27.2.1",
|
|
66
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
67
|
-
"globby": "^13.1.3",
|
|
68
65
|
"husky": "^8.0.3",
|
|
69
|
-
"jest": "^29.
|
|
66
|
+
"jest": "^29.5.0",
|
|
70
67
|
"lint-staged": "^13",
|
|
71
|
-
"npm-check-updates": "^16.
|
|
68
|
+
"npm-check-updates": "^16.10.8",
|
|
72
69
|
"npm-watch": "^0.11.0",
|
|
73
|
-
"prettier": "^2.8.
|
|
74
|
-
"redoc-cli": "^0.13.
|
|
75
|
-
"ts-jest": "^29.0
|
|
70
|
+
"prettier": "^2.8.7",
|
|
71
|
+
"redoc-cli": "^0.13.21",
|
|
72
|
+
"ts-jest": "^29.1.0",
|
|
76
73
|
"ts-node": "^10.9.1",
|
|
77
|
-
"tsx": "^3.12.
|
|
78
|
-
"typedoc": "^0.
|
|
79
|
-
"typescript": "
|
|
80
|
-
"zx": "^7.
|
|
74
|
+
"tsx": "^3.12.6",
|
|
75
|
+
"typedoc": "^0.24.1",
|
|
76
|
+
"typescript": "4.9.5",
|
|
77
|
+
"zx": "^7.2.1"
|
|
81
78
|
}
|
|
82
79
|
}
|
|
@@ -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 {};
|