@emilgroup/auth-sdk 1.0.0-beta.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.
Files changed (73) hide show
  1. package/.openapi-generator/FILES +29 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/authservice-api.ts +1032 -0
  6. package/api.ts +27 -0
  7. package/base.ts +248 -0
  8. package/common.ts +198 -0
  9. package/configuration.ts +101 -0
  10. package/dist/api/authservice-api.d.ts +566 -0
  11. package/dist/api/authservice-api.js +987 -0
  12. package/dist/api.d.ts +12 -0
  13. package/dist/api.js +30 -0
  14. package/dist/base.d.ts +73 -0
  15. package/dist/base.js +294 -0
  16. package/dist/common.d.ts +91 -0
  17. package/dist/common.js +276 -0
  18. package/dist/configuration.d.ts +83 -0
  19. package/dist/configuration.js +44 -0
  20. package/dist/index.d.ts +15 -0
  21. package/dist/index.js +36 -0
  22. package/dist/models/create-org-and-user-request-dto.d.ts +78 -0
  23. package/dist/models/create-org-and-user-request-dto.js +15 -0
  24. package/dist/models/create-org-and-user-response-class.d.ts +32 -0
  25. package/dist/models/create-org-and-user-response-class.js +15 -0
  26. package/dist/models/create-user-request-dto.d.ts +54 -0
  27. package/dist/models/create-user-request-dto.js +15 -0
  28. package/dist/models/create-user-response-class.d.ts +25 -0
  29. package/dist/models/create-user-response-class.js +15 -0
  30. package/dist/models/forgot-password-request-dto.d.ts +24 -0
  31. package/dist/models/forgot-password-request-dto.js +15 -0
  32. package/dist/models/get-samllogin-link-request-dto.d.ts +24 -0
  33. package/dist/models/get-samllogin-link-request-dto.js +15 -0
  34. package/dist/models/index.d.ts +15 -0
  35. package/dist/models/index.js +31 -0
  36. package/dist/models/login-by-samlrequest-dto.d.ts +30 -0
  37. package/dist/models/login-by-samlrequest-dto.js +15 -0
  38. package/dist/models/login-class.d.ts +30 -0
  39. package/dist/models/login-class.js +15 -0
  40. package/dist/models/login-request-dto.d.ts +30 -0
  41. package/dist/models/login-request-dto.js +15 -0
  42. package/dist/models/logout-request-dto.d.ts +24 -0
  43. package/dist/models/logout-request-dto.js +15 -0
  44. package/dist/models/organization-class.d.ts +102 -0
  45. package/dist/models/organization-class.js +15 -0
  46. package/dist/models/refresh-token-dto.d.ts +24 -0
  47. package/dist/models/refresh-token-dto.js +15 -0
  48. package/dist/models/reset-password-request-dto.d.ts +36 -0
  49. package/dist/models/reset-password-request-dto.js +15 -0
  50. package/dist/models/role-class.d.ts +54 -0
  51. package/dist/models/role-class.js +15 -0
  52. package/dist/models/user-class.d.ts +85 -0
  53. package/dist/models/user-class.js +15 -0
  54. package/git_push.sh +57 -0
  55. package/index.ts +19 -0
  56. package/models/create-org-and-user-request-dto.ts +84 -0
  57. package/models/create-org-and-user-response-class.ts +38 -0
  58. package/models/create-user-request-dto.ts +60 -0
  59. package/models/create-user-response-class.ts +31 -0
  60. package/models/forgot-password-request-dto.ts +30 -0
  61. package/models/get-samllogin-link-request-dto.ts +30 -0
  62. package/models/index.ts +15 -0
  63. package/models/login-by-samlrequest-dto.ts +36 -0
  64. package/models/login-class.ts +36 -0
  65. package/models/login-request-dto.ts +36 -0
  66. package/models/logout-request-dto.ts +30 -0
  67. package/models/organization-class.ts +108 -0
  68. package/models/refresh-token-dto.ts +30 -0
  69. package/models/reset-password-request-dto.ts +42 -0
  70. package/models/role-class.ts +60 -0
  71. package/models/user-class.ts +91 -0
  72. package/package.json +26 -0
  73. package/tsconfig.json +22 -0
@@ -0,0 +1,85 @@
1
+ /**
2
+ * EMIL AuthService
3
+ * The EMIL AuthService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.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 { RoleClass } from './role-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UserClass
17
+ */
18
+ export interface UserClass {
19
+ /**
20
+ * user id
21
+ * @type {number}
22
+ * @memberof UserClass
23
+ */
24
+ 'id': number;
25
+ /**
26
+ * unique user code
27
+ * @type {string}
28
+ * @memberof UserClass
29
+ */
30
+ 'code': string;
31
+ /**
32
+ * email address of the user
33
+ * @type {string}
34
+ * @memberof UserClass
35
+ */
36
+ 'email': string;
37
+ /**
38
+ * first name of the user
39
+ * @type {string}
40
+ * @memberof UserClass
41
+ */
42
+ 'firstName': string;
43
+ /**
44
+ * first name of the user
45
+ * @type {string}
46
+ * @memberof UserClass
47
+ */
48
+ 'lastName': string;
49
+ /**
50
+ * status of the of the user
51
+ * @type {string}
52
+ * @memberof UserClass
53
+ */
54
+ 'status': string;
55
+ /**
56
+ * cognito sub of the user
57
+ * @type {string}
58
+ * @memberof UserClass
59
+ */
60
+ 'sub': string;
61
+ /**
62
+ * tenant id
63
+ * @type {number}
64
+ * @memberof UserClass
65
+ */
66
+ 'tenantId': number;
67
+ /**
68
+ * permissions associated with the user
69
+ * @type {Array<RoleClass>}
70
+ * @memberof UserClass
71
+ */
72
+ 'roles': Array<RoleClass>;
73
+ /**
74
+ * Date created
75
+ * @type {string}
76
+ * @memberof UserClass
77
+ */
78
+ 'createdAt': string;
79
+ /**
80
+ * Date updated
81
+ * @type {string}
82
+ * @memberof UserClass
83
+ */
84
+ 'updatedAt': string;
85
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL AuthService
6
+ * The EMIL AuthService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
package/git_push.sh ADDED
@@ -0,0 +1,57 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="Emil"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="auth-sdk"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=$(git remote)
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'
package/index.ts ADDED
@@ -0,0 +1,19 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ export { Environment, BaseAPI } from "./base";
17
+ export * from "./api";
18
+ export * from "./configuration";
19
+ export * from "./models";
@@ -0,0 +1,84 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface CreateOrgAndUserRequestDto
21
+ */
22
+ export interface CreateOrgAndUserRequestDto {
23
+ /**
24
+ *
25
+ * @type {string}
26
+ * @memberof CreateOrgAndUserRequestDto
27
+ */
28
+ 'address': string;
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof CreateOrgAndUserRequestDto
33
+ */
34
+ 'city': string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof CreateOrgAndUserRequestDto
39
+ */
40
+ 'country': string;
41
+ /**
42
+ *
43
+ * @type {object}
44
+ * @memberof CreateOrgAndUserRequestDto
45
+ */
46
+ 'customFields'?: object;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof CreateOrgAndUserRequestDto
51
+ */
52
+ 'firstName': string;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof CreateOrgAndUserRequestDto
57
+ */
58
+ 'invitationToken': string;
59
+ /**
60
+ *
61
+ * @type {boolean}
62
+ * @memberof CreateOrgAndUserRequestDto
63
+ */
64
+ 'isEulaAccepted': boolean;
65
+ /**
66
+ *
67
+ * @type {string}
68
+ * @memberof CreateOrgAndUserRequestDto
69
+ */
70
+ 'lastName': string;
71
+ /**
72
+ *
73
+ * @type {string}
74
+ * @memberof CreateOrgAndUserRequestDto
75
+ */
76
+ 'password': string;
77
+ /**
78
+ *
79
+ * @type {string}
80
+ * @memberof CreateOrgAndUserRequestDto
81
+ */
82
+ 'zipCode': string;
83
+ }
84
+
@@ -0,0 +1,38 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { OrganizationClass } from './organization-class';
17
+ import { UserClass } from './user-class';
18
+
19
+ /**
20
+ *
21
+ * @export
22
+ * @interface CreateOrgAndUserResponseClass
23
+ */
24
+ export interface CreateOrgAndUserResponseClass {
25
+ /**
26
+ * Organization
27
+ * @type {OrganizationClass}
28
+ * @memberof CreateOrgAndUserResponseClass
29
+ */
30
+ 'organization': OrganizationClass;
31
+ /**
32
+ * User
33
+ * @type {UserClass}
34
+ * @memberof CreateOrgAndUserResponseClass
35
+ */
36
+ 'user': UserClass;
37
+ }
38
+
@@ -0,0 +1,60 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface CreateUserRequestDto
21
+ */
22
+ export interface CreateUserRequestDto {
23
+ /**
24
+ * User\'s email address.
25
+ * @type {string}
26
+ * @memberof CreateUserRequestDto
27
+ */
28
+ 'email': string;
29
+ /**
30
+ * User\'s invite token.
31
+ * @type {string}
32
+ * @memberof CreateUserRequestDto
33
+ */
34
+ 'inviteToken': string;
35
+ /**
36
+ * User\'s first name.
37
+ * @type {string}
38
+ * @memberof CreateUserRequestDto
39
+ */
40
+ 'firstName': string;
41
+ /**
42
+ * User\'s last name.
43
+ * @type {string}
44
+ * @memberof CreateUserRequestDto
45
+ */
46
+ 'lastName': string;
47
+ /**
48
+ * User\'s password.
49
+ * @type {string}
50
+ * @memberof CreateUserRequestDto
51
+ */
52
+ 'password': string;
53
+ /**
54
+ * True if user accepts end user license agreement.
55
+ * @type {boolean}
56
+ * @memberof CreateUserRequestDto
57
+ */
58
+ 'isEulaAccepted': boolean;
59
+ }
60
+
@@ -0,0 +1,31 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { UserClass } from './user-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface CreateUserResponseClass
22
+ */
23
+ export interface CreateUserResponseClass {
24
+ /**
25
+ * user
26
+ * @type {UserClass}
27
+ * @memberof CreateUserResponseClass
28
+ */
29
+ 'user': UserClass;
30
+ }
31
+
@@ -0,0 +1,30 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface ForgotPasswordRequestDto
21
+ */
22
+ export interface ForgotPasswordRequestDto {
23
+ /**
24
+ * Tenant user\'s email address
25
+ * @type {string}
26
+ * @memberof ForgotPasswordRequestDto
27
+ */
28
+ 'email': string;
29
+ }
30
+
@@ -0,0 +1,30 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface GetSAMLLoginLinkRequestDto
21
+ */
22
+ export interface GetSAMLLoginLinkRequestDto {
23
+ /**
24
+ *
25
+ * @type {string}
26
+ * @memberof GetSAMLLoginLinkRequestDto
27
+ */
28
+ 'tenantSlug': string;
29
+ }
30
+
@@ -0,0 +1,15 @@
1
+ export * from './create-org-and-user-request-dto';
2
+ export * from './create-org-and-user-response-class';
3
+ export * from './create-user-request-dto';
4
+ export * from './create-user-response-class';
5
+ export * from './forgot-password-request-dto';
6
+ export * from './get-samllogin-link-request-dto';
7
+ export * from './login-by-samlrequest-dto';
8
+ export * from './login-class';
9
+ export * from './login-request-dto';
10
+ export * from './logout-request-dto';
11
+ export * from './organization-class';
12
+ export * from './refresh-token-dto';
13
+ export * from './reset-password-request-dto';
14
+ export * from './role-class';
15
+ export * from './user-class';
@@ -0,0 +1,36 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface LoginBySAMLRequestDto
21
+ */
22
+ export interface LoginBySAMLRequestDto {
23
+ /**
24
+ * code for grant type authorization code
25
+ * @type {string}
26
+ * @memberof LoginBySAMLRequestDto
27
+ */
28
+ 'code': string;
29
+ /**
30
+ * Tenant slug
31
+ * @type {string}
32
+ * @memberof LoginBySAMLRequestDto
33
+ */
34
+ 'tenantSlug': string;
35
+ }
36
+
@@ -0,0 +1,36 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface LoginClass
21
+ */
22
+ export interface LoginClass {
23
+ /**
24
+ * Access token, used to identify user requests
25
+ * @type {string}
26
+ * @memberof LoginClass
27
+ */
28
+ 'accessToken': string;
29
+ /**
30
+ * States all user\'s permission
31
+ * @type {string}
32
+ * @memberof LoginClass
33
+ */
34
+ 'permissions': string;
35
+ }
36
+
@@ -0,0 +1,36 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface LoginRequestDto
21
+ */
22
+ export interface LoginRequestDto {
23
+ /**
24
+ * Tenant user\'s username. Usually an email.
25
+ * @type {string}
26
+ * @memberof LoginRequestDto
27
+ */
28
+ 'username': string;
29
+ /**
30
+ * Tenant user\'s password.
31
+ * @type {string}
32
+ * @memberof LoginRequestDto
33
+ */
34
+ 'password': string;
35
+ }
36
+
@@ -0,0 +1,30 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL AuthService
5
+ * The EMIL AuthService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface LogoutRequestDto
21
+ */
22
+ export interface LogoutRequestDto {
23
+ /**
24
+ * Tenant user\'s username. Usually an email.
25
+ * @type {string}
26
+ * @memberof LogoutRequestDto
27
+ */
28
+ 'username': string;
29
+ }
30
+