gopadjs 1.0.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 (53) hide show
  1. package/.codacy.yml +8 -0
  2. package/.editorconfig +24 -0
  3. package/.github/RELEASE +1 -0
  4. package/.github/issue_template.md +9 -0
  5. package/.github/pull_request_template.md +8 -0
  6. package/.github/renovate.json +6 -0
  7. package/.github/semantic.yml +23 -0
  8. package/.github/settings.yml +43 -0
  9. package/.github/workflows/automerge.yml +49 -0
  10. package/.github/workflows/flake.yml +56 -0
  11. package/.github/workflows/general.yml +45 -0
  12. package/.github/workflows/release.yml +49 -0
  13. package/.openapi-generator/FILES +25 -0
  14. package/.openapi-generator/VERSION +1 -0
  15. package/.openapi-generator-ignore +3 -0
  16. package/.releaserc +140 -0
  17. package/CHANGELOG.md +16 -0
  18. package/CONTRIBUTING.md +121 -0
  19. package/DCO +34 -0
  20. package/LICENSE +202 -0
  21. package/README.md +88 -0
  22. package/api/auth-api.ts +399 -0
  23. package/api/team-api.ts +1641 -0
  24. package/api/user-api.ts +1641 -0
  25. package/api.ts +17 -0
  26. package/base.ts +91 -0
  27. package/common.ts +203 -0
  28. package/configuration.ts +132 -0
  29. package/flake.lock +472 -0
  30. package/flake.nix +57 -0
  31. package/hack/generate-client.sh +65 -0
  32. package/hack/openapi/templates/README.mustache +93 -0
  33. package/hack/openapi/templates/gitignore +6 -0
  34. package/hack/semantic-version.sh +17 -0
  35. package/index.ts +17 -0
  36. package/model/index.ts +12 -0
  37. package/model/notification.ts +43 -0
  38. package/model/team-user-params.ts +42 -0
  39. package/model/team-users.ts +46 -0
  40. package/model/team.ts +61 -0
  41. package/model/teams.ts +37 -0
  42. package/model/user-auth.ts +45 -0
  43. package/model/user-team-params.ts +42 -0
  44. package/model/user-team.ts +79 -0
  45. package/model/user-teams.ts +46 -0
  46. package/model/user.ts +100 -0
  47. package/model/users.ts +37 -0
  48. package/model/validation.ts +33 -0
  49. package/openapi.yml +12 -0
  50. package/openapitools.json +7 -0
  51. package/package.json +41 -0
  52. package/tsconfig.esm.json +7 -0
  53. package/tsconfig.json +18 -0
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env bash
2
+ set -eo pipefail
3
+
4
+ if [ $# -ne 1 ]; then
5
+ echo "Usage: ${0} VERSION"
6
+ exit 1
7
+ fi
8
+
9
+ VERSION=${1}
10
+ shift
11
+
12
+ ROOT=$(cd "$(dirname "${0}")/.."; pwd)
13
+
14
+ sed \
15
+ -i \
16
+ "s|npmVersion: .*|npmVersion: ${VERSION}|" \
17
+ "${ROOT}/openapi.yml"
package/index.ts ADDED
@@ -0,0 +1,17 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ export * from "./api";
16
+ export * from "./configuration";
17
+ export * from "./model";
package/model/index.ts ADDED
@@ -0,0 +1,12 @@
1
+ export * from "./notification";
2
+ export * from "./team";
3
+ export * from "./team-user-params";
4
+ export * from "./team-users";
5
+ export * from "./teams";
6
+ export * from "./user";
7
+ export * from "./user-auth";
8
+ export * from "./user-team";
9
+ export * from "./user-team-params";
10
+ export * from "./user-teams";
11
+ export * from "./users";
12
+ export * from "./validation";
@@ -0,0 +1,43 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ // May contain unused imports in some cases
16
+ // @ts-ignore
17
+ import type { Validation } from "./validation";
18
+
19
+ /**
20
+ * Generic response for errors and validations
21
+ * @export
22
+ * @interface Notification
23
+ */
24
+ export interface Notification {
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof Notification
29
+ */
30
+ status?: number;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof Notification
35
+ */
36
+ message?: string;
37
+ /**
38
+ *
39
+ * @type {Array<Validation>}
40
+ * @memberof Notification
41
+ */
42
+ errors?: Array<Validation>;
43
+ }
@@ -0,0 +1,42 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ * Parameters to attach or remove team user
17
+ * @export
18
+ * @interface TeamUserParams
19
+ */
20
+ export interface TeamUserParams {
21
+ /**
22
+ *
23
+ * @type {string}
24
+ * @memberof TeamUserParams
25
+ */
26
+ user: string;
27
+ /**
28
+ *
29
+ * @type {string}
30
+ * @memberof TeamUserParams
31
+ */
32
+ perm?: TeamUserParamsPermEnum;
33
+ }
34
+
35
+ export const TeamUserParamsPermEnum = {
36
+ User: "user",
37
+ Admin: "admin",
38
+ Owner: "owner",
39
+ } as const;
40
+
41
+ export type TeamUserParamsPermEnum =
42
+ (typeof TeamUserParamsPermEnum)[keyof typeof TeamUserParamsPermEnum];
@@ -0,0 +1,46 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ // May contain unused imports in some cases
16
+ // @ts-ignore
17
+ import type { Team } from "./team";
18
+ // May contain unused imports in some cases
19
+ // @ts-ignore
20
+ import type { UserTeam } from "./user-team";
21
+
22
+ /**
23
+ * Model to represent team users
24
+ * @export
25
+ * @interface TeamUsers
26
+ */
27
+ export interface TeamUsers {
28
+ /**
29
+ *
30
+ * @type {Team}
31
+ * @memberof TeamUsers
32
+ */
33
+ team?: Team;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof TeamUsers
38
+ */
39
+ total?: number;
40
+ /**
41
+ *
42
+ * @type {Array<UserTeam>}
43
+ * @memberof TeamUsers
44
+ */
45
+ users?: Array<UserTeam>;
46
+ }
package/model/team.ts ADDED
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ // May contain unused imports in some cases
16
+ // @ts-ignore
17
+ import type { UserTeam } from "./user-team";
18
+
19
+ /**
20
+ * Model to represent team
21
+ * @export
22
+ * @interface Team
23
+ */
24
+ export interface Team {
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof Team
29
+ */
30
+ id?: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof Team
35
+ */
36
+ slug?: string | null;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof Team
41
+ */
42
+ name?: string | null;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof Team
47
+ */
48
+ created_at?: string;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof Team
53
+ */
54
+ updated_at?: string;
55
+ /**
56
+ *
57
+ * @type {Array<UserTeam>}
58
+ * @memberof Team
59
+ */
60
+ users?: Array<UserTeam> | null;
61
+ }
package/model/teams.ts ADDED
@@ -0,0 +1,37 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ // May contain unused imports in some cases
16
+ // @ts-ignore
17
+ import type { Team } from "./team";
18
+
19
+ /**
20
+ * Model to represent list of teams
21
+ * @export
22
+ * @interface Teams
23
+ */
24
+ export interface Teams {
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof Teams
29
+ */
30
+ total?: number;
31
+ /**
32
+ *
33
+ * @type {Array<Team>}
34
+ * @memberof Teams
35
+ */
36
+ teams?: Array<Team>;
37
+ }
@@ -0,0 +1,45 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ * Model to represent user auth
17
+ * @export
18
+ * @interface UserAuth
19
+ */
20
+ export interface UserAuth {
21
+ /**
22
+ *
23
+ * @type {string}
24
+ * @memberof UserAuth
25
+ */
26
+ provider?: string;
27
+ /**
28
+ *
29
+ * @type {string}
30
+ * @memberof UserAuth
31
+ */
32
+ ref?: string;
33
+ /**
34
+ *
35
+ * @type {string}
36
+ * @memberof UserAuth
37
+ */
38
+ created_at?: string;
39
+ /**
40
+ *
41
+ * @type {string}
42
+ * @memberof UserAuth
43
+ */
44
+ updated_at?: string;
45
+ }
@@ -0,0 +1,42 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ * Parameters to attach or remove user team
17
+ * @export
18
+ * @interface UserTeamParams
19
+ */
20
+ export interface UserTeamParams {
21
+ /**
22
+ *
23
+ * @type {string}
24
+ * @memberof UserTeamParams
25
+ */
26
+ team: string;
27
+ /**
28
+ *
29
+ * @type {string}
30
+ * @memberof UserTeamParams
31
+ */
32
+ perm?: UserTeamParamsPermEnum;
33
+ }
34
+
35
+ export const UserTeamParamsPermEnum = {
36
+ User: "user",
37
+ Admin: "admin",
38
+ Owner: "owner",
39
+ } as const;
40
+
41
+ export type UserTeamParamsPermEnum =
42
+ (typeof UserTeamParamsPermEnum)[keyof typeof UserTeamParamsPermEnum];
@@ -0,0 +1,79 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ // May contain unused imports in some cases
16
+ // @ts-ignore
17
+ import type { Team } from "./team";
18
+ // May contain unused imports in some cases
19
+ // @ts-ignore
20
+ import type { User } from "./user";
21
+
22
+ /**
23
+ * Model to represent user team
24
+ * @export
25
+ * @interface UserTeam
26
+ */
27
+ export interface UserTeam {
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof UserTeam
32
+ */
33
+ user_id: string;
34
+ /**
35
+ *
36
+ * @type {User}
37
+ * @memberof UserTeam
38
+ */
39
+ user?: User;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof UserTeam
44
+ */
45
+ team_id: string;
46
+ /**
47
+ *
48
+ * @type {Team}
49
+ * @memberof UserTeam
50
+ */
51
+ team?: Team;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof UserTeam
56
+ */
57
+ perm?: UserTeamPermEnum;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof UserTeam
62
+ */
63
+ created_at?: string;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof UserTeam
68
+ */
69
+ updated_at?: string;
70
+ }
71
+
72
+ export const UserTeamPermEnum = {
73
+ User: "user",
74
+ Admin: "admin",
75
+ Owner: "owner",
76
+ } as const;
77
+
78
+ export type UserTeamPermEnum =
79
+ (typeof UserTeamPermEnum)[keyof typeof UserTeamPermEnum];
@@ -0,0 +1,46 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ // May contain unused imports in some cases
16
+ // @ts-ignore
17
+ import type { User } from "./user";
18
+ // May contain unused imports in some cases
19
+ // @ts-ignore
20
+ import type { UserTeam } from "./user-team";
21
+
22
+ /**
23
+ * Model to represent user teams
24
+ * @export
25
+ * @interface UserTeams
26
+ */
27
+ export interface UserTeams {
28
+ /**
29
+ *
30
+ * @type {User}
31
+ * @memberof UserTeams
32
+ */
33
+ user?: User;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof UserTeams
38
+ */
39
+ total?: number;
40
+ /**
41
+ *
42
+ * @type {Array<UserTeam>}
43
+ * @memberof UserTeams
44
+ */
45
+ teams?: Array<UserTeam>;
46
+ }
package/model/user.ts ADDED
@@ -0,0 +1,100 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ // May contain unused imports in some cases
16
+ // @ts-ignore
17
+ import type { UserAuth } from "./user-auth";
18
+ // May contain unused imports in some cases
19
+ // @ts-ignore
20
+ import type { UserTeam } from "./user-team";
21
+
22
+ /**
23
+ * Model to represent user
24
+ * @export
25
+ * @interface User
26
+ */
27
+ export interface User {
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof User
32
+ */
33
+ id?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof User
38
+ */
39
+ username?: string | null;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof User
44
+ */
45
+ password?: string | null;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof User
50
+ */
51
+ email?: string | null;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof User
56
+ */
57
+ fullname?: string | null;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof User
62
+ */
63
+ profile?: string | null;
64
+ /**
65
+ *
66
+ * @type {boolean}
67
+ * @memberof User
68
+ */
69
+ admin?: boolean | null;
70
+ /**
71
+ *
72
+ * @type {boolean}
73
+ * @memberof User
74
+ */
75
+ active?: boolean | null;
76
+ /**
77
+ *
78
+ * @type {string}
79
+ * @memberof User
80
+ */
81
+ created_at?: string;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof User
86
+ */
87
+ updated_at?: string;
88
+ /**
89
+ *
90
+ * @type {Array<UserAuth>}
91
+ * @memberof User
92
+ */
93
+ auths?: Array<UserAuth> | null;
94
+ /**
95
+ *
96
+ * @type {Array<UserTeam>}
97
+ * @memberof User
98
+ */
99
+ teams?: Array<UserTeam> | null;
100
+ }
package/model/users.ts ADDED
@@ -0,0 +1,37 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ // May contain unused imports in some cases
16
+ // @ts-ignore
17
+ import type { User } from "./user";
18
+
19
+ /**
20
+ * Model to represent list of users
21
+ * @export
22
+ * @interface Users
23
+ */
24
+ export interface Users {
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof Users
29
+ */
30
+ total?: number;
31
+ /**
32
+ *
33
+ * @type {Array<User>}
34
+ * @memberof Users
35
+ */
36
+ users?: Array<User>;
37
+ }
@@ -0,0 +1,33 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Gopad OpenAPI
5
+ * API definition for Gopad, Etherpad for markdown with go
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0-alpha1
8
+ * Contact: gopad@webhippie.de
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
+ * General structure to show validation errors
17
+ * @export
18
+ * @interface Validation
19
+ */
20
+ export interface Validation {
21
+ /**
22
+ *
23
+ * @type {string}
24
+ * @memberof Validation
25
+ */
26
+ field?: string;
27
+ /**
28
+ *
29
+ * @type {string}
30
+ * @memberof Validation
31
+ */
32
+ message?: string;
33
+ }
package/openapi.yml ADDED
@@ -0,0 +1,12 @@
1
+ ---
2
+ npmName: gopadjs
3
+ npmVersion: 1.0.0
4
+ supportsES6: true
5
+ useSingleRequestParameter: true
6
+ withNodeImports: true
7
+ withSeparateModelsAndApi: true
8
+ apiPackage: api
9
+ modelPackage: model
10
+ enablePostProcessFile: true
11
+
12
+ ...
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3
+ "spaces": 2,
4
+ "generator-cli": {
5
+ "version": "7.6.0"
6
+ }
7
+ }