kodzero-front-sdk-alfa 0.0.2

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 (91) hide show
  1. package/.eslintrc.cjs +13 -0
  2. package/.eslintrc.json +16 -0
  3. package/README.md +313 -0
  4. package/dist/Kodzero.d.ts +33 -0
  5. package/dist/Kodzero.js +22 -0
  6. package/dist/auth/base.d.ts +15 -0
  7. package/dist/auth/base.js +18 -0
  8. package/dist/auth/email.d.ts +23 -0
  9. package/dist/auth/email.js +70 -0
  10. package/dist/auth/index.d.ts +13 -0
  11. package/dist/auth/index.js +21 -0
  12. package/dist/auth/tokens.d.ts +10 -0
  13. package/dist/auth/tokens.js +22 -0
  14. package/dist/errors/KodzeroApiError.d.ts +7 -0
  15. package/dist/errors/KodzeroApiError.js +10 -0
  16. package/dist/errors/KodzeroValidationError.d.ts +5 -0
  17. package/dist/errors/KodzeroValidationError.js +8 -0
  18. package/dist/fetcher/InterceptorManager.d.ts +9 -0
  19. package/dist/fetcher/InterceptorManager.js +42 -0
  20. package/dist/fetcher/MiddlewareManager.d.ts +9 -0
  21. package/dist/fetcher/MiddlewareManager.js +42 -0
  22. package/dist/fetcher/index.d.ts +77 -0
  23. package/dist/fetcher/index.js +194 -0
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +49 -0
  26. package/dist/model/BaseModel.d.ts +38 -0
  27. package/dist/model/BaseModel.js +119 -0
  28. package/dist/model/baseModelOptionsSchema.d.ts +2 -0
  29. package/dist/model/baseModelOptionsSchema.js +10 -0
  30. package/dist/model/configSchema.d.ts +0 -0
  31. package/dist/model/configSchema.js +1 -0
  32. package/dist/model/constants.d.ts +8 -0
  33. package/dist/model/constants.js +7 -0
  34. package/dist/model/createModel.d.ts +28 -0
  35. package/dist/model/createModel.js +159 -0
  36. package/dist/model/errors/KodzeroApiError.d.ts +7 -0
  37. package/dist/model/errors/KodzeroApiError.js +10 -0
  38. package/dist/model/index.d.ts +4 -0
  39. package/dist/model/index.js +4 -0
  40. package/dist/model/modelFactory.d.ts +50 -0
  41. package/dist/model/modelFactory.js +41 -0
  42. package/dist/model/modelSchema.d.ts +0 -0
  43. package/dist/model/modelSchema.js +1 -0
  44. package/dist/model/schemas/baseModel.d.ts +6 -0
  45. package/dist/model/schemas/baseModel.js +25 -0
  46. package/dist/model/schemas/baseModelOptionsSchema.d.ts +2 -0
  47. package/dist/model/schemas/baseModelOptionsSchema.js +10 -0
  48. package/dist/model/statics/getAll.d.ts +2 -0
  49. package/dist/model/statics/getAll.js +4 -0
  50. package/dist/model/utils/processUrl.d.ts +2 -0
  51. package/dist/model/utils/processUrl.js +7 -0
  52. package/dist/model/utils/validateApiResponse.d.ts +2 -0
  53. package/dist/model/utils/validateApiResponse.js +14 -0
  54. package/dist/schemas/baseAuth.d.ts +6 -0
  55. package/dist/schemas/baseAuth.js +18 -0
  56. package/dist/schemas/baseModel copy.d.ts +6 -0
  57. package/dist/schemas/baseModel copy.js +25 -0
  58. package/dist/schemas/baseModel.d.ts +6 -0
  59. package/dist/schemas/baseModel.js +25 -0
  60. package/dist/tsconfig.tsbuildinfo +1 -0
  61. package/dist/types/responses.d.ts +14 -0
  62. package/dist/types/responses.js +1 -0
  63. package/dist/utils/buildURL.d.ts +2 -0
  64. package/dist/utils/buildURL.js +7 -0
  65. package/dist/utils/buildURL_rename.d.ts +2 -0
  66. package/dist/utils/buildURL_rename.js +7 -0
  67. package/dist/utils/processUrl.d.ts +2 -0
  68. package/dist/utils/processUrl.js +7 -0
  69. package/dist/utils/validateApiResponse.d.ts +2 -0
  70. package/dist/utils/validateApiResponse.js +14 -0
  71. package/jest.config.ts +190 -0
  72. package/nodemon.json +4 -0
  73. package/package.json +29 -0
  74. package/src/Kodzero.ts +35 -0
  75. package/src/auth/base.ts +37 -0
  76. package/src/auth/email.ts +123 -0
  77. package/src/auth/index.ts +43 -0
  78. package/src/auth/tokens.ts +49 -0
  79. package/src/errors/KodzeroApiError.ts +17 -0
  80. package/src/errors/KodzeroValidationError.ts +12 -0
  81. package/src/model/BaseModel.ts +210 -0
  82. package/src/model/constants.ts +7 -0
  83. package/src/model/createModel.ts +237 -0
  84. package/src/model/index.ts +12 -0
  85. package/src/schemas/baseAuth.ts +28 -0
  86. package/src/schemas/baseModel.ts +35 -0
  87. package/src/tsconfig.json +103 -0
  88. package/src/types/module.d.ts +2 -0
  89. package/src/types/responses.ts +14 -0
  90. package/src/utils/buildURL_rename.ts +8 -0
  91. package/src/utils/validateApiResponse.ts +17 -0
package/jest.config.ts ADDED
@@ -0,0 +1,190 @@
1
+ /**
2
+ * For a detailed explanation regarding each configuration property, visit:
3
+ * https://jestjs.io/docs/configuration
4
+ */
5
+
6
+ import type {Config} from 'jest';
7
+
8
+ const config: Config = {
9
+ // Automatically clear mock calls, instances, contexts and results before every test
10
+ clearMocks: true,
11
+
12
+ // Indicates whether the coverage information should be collected while executing the test
13
+ collectCoverage: false,
14
+
15
+ // An array of glob patterns indicating a set of files for which coverage information should be collected
16
+ // collectCoverageFrom: undefined,
17
+
18
+ // The directory where Jest should output its coverage files
19
+ coverageDirectory: "coverage",
20
+
21
+ // An array of regexp pattern strings used to skip coverage collection
22
+ // coveragePathIgnorePatterns: [
23
+ // "\\\\node_modules\\\\"
24
+ // ],
25
+
26
+ // Indicates which provider should be used to instrument code for coverage
27
+ coverageProvider: "v8",
28
+
29
+ // A list of reporter names that Jest uses when writing coverage reports
30
+ // coverageReporters: [
31
+ // "json",
32
+ // "text",
33
+ // "lcov",
34
+ // "clover"
35
+ // ],
36
+
37
+ // An object that configures minimum threshold enforcement for coverage results
38
+ // coverageThreshold: undefined,
39
+
40
+ // A path to a custom dependency extractor
41
+ // dependencyExtractor: undefined,
42
+
43
+ // Make calling deprecated APIs throw helpful error messages
44
+ // errorOnDeprecated: false,
45
+
46
+ // The default configuration for fake timers
47
+ // fakeTimers: {
48
+ // "enableGlobally": false
49
+ // },
50
+
51
+ // Force coverage collection from ignored files using an array of glob patterns
52
+ // forceCoverageMatch: [],
53
+
54
+ // A path to a module which exports an async function that is triggered once before all test suites
55
+ // globalSetup: undefined,
56
+
57
+ // A path to a module which exports an async function that is triggered once after all test suites
58
+ // globalTeardown: undefined,
59
+
60
+ // A set of global variables that need to be available in all test environments
61
+ // globals: {},
62
+
63
+ // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
64
+ // maxWorkers: "50%",
65
+
66
+ // An array of directory names to be searched recursively up from the requiring module's location
67
+ // moduleDirectories: [
68
+ // "node_modules"
69
+ // ],
70
+
71
+ // An array of file extensions your modules use
72
+ // moduleFileExtensions: [
73
+ // "js",
74
+ // "mjs",
75
+ // "cjs",
76
+ // "jsx",
77
+ // "ts",
78
+ // "tsx",
79
+ // "json",
80
+ // "node"
81
+ // ],
82
+
83
+ // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
84
+ // moduleNameMapper: {},
85
+
86
+ // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
87
+ // modulePathIgnorePatterns: [],
88
+
89
+ // Activates notifications for test results
90
+ // notify: false,
91
+
92
+ // An enum that specifies notification mode. Requires { notify: true }
93
+ // notifyMode: "failure-change",
94
+
95
+ // A preset that is used as a base for Jest's configuration
96
+ // preset: undefined,
97
+
98
+ // Run tests from one or more projects
99
+ // projects: undefined,
100
+
101
+ // Use this configuration option to add custom reporters to Jest
102
+ // reporters: undefined,
103
+
104
+ // Automatically reset mock state before every test
105
+ // resetMocks: false,
106
+
107
+ // Reset the module registry before running each individual test
108
+ // resetModules: false,
109
+
110
+ // A path to a custom resolver
111
+ // resolver: undefined,
112
+
113
+ // Automatically restore mock state and implementation before every test
114
+ // restoreMocks: false,
115
+
116
+ // The root directory that Jest should scan for tests and modules within
117
+ // rootDir: undefined,
118
+
119
+ // A list of paths to directories that Jest should use to search for files in
120
+ // roots: [
121
+ // "<rootDir>"
122
+ // ],
123
+
124
+ // Allows you to use a custom runner instead of Jest's default test runner
125
+ // runner: "jest-runner",
126
+
127
+ // The paths to modules that run some code to configure or set up the testing environment before each test
128
+ // setupFiles: [],
129
+
130
+ // A list of paths to modules that run some code to configure or set up the testing framework before each test
131
+ // setupFilesAfterEnv: [],
132
+
133
+ // The number of seconds after which a test is considered as slow and reported as such in the results.
134
+ // slowTestThreshold: 5,
135
+
136
+ // A list of paths to snapshot serializer modules Jest should use for snapshot testing
137
+ // snapshotSerializers: [],
138
+
139
+ // The test environment that will be used for testing
140
+ // testEnvironment: "jest-environment-node",
141
+
142
+ // Options that will be passed to the testEnvironment
143
+ // testEnvironmentOptions: {},
144
+
145
+ // Adds a location field to test results
146
+ // testLocationInResults: false,
147
+
148
+ // The glob patterns Jest uses to detect test files
149
+ // testMatch: [
150
+ // "**/__tests__/**/*.[jt]s?(x)",
151
+ // "**/?(*.)+(spec|test).[tj]s?(x)"
152
+ // ],
153
+
154
+ // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
155
+ // testPathIgnorePatterns: [
156
+ // "\\\\node_modules\\\\"
157
+ // ],
158
+
159
+ // The regexp pattern or array of patterns that Jest uses to detect test files
160
+ // testRegex: [],
161
+
162
+ // This option allows the use of a custom results processor
163
+ // testResultsProcessor: undefined,
164
+
165
+ // This option allows use of a custom test runner
166
+ // testRunner: "jest-circus/runner",
167
+
168
+ // A map from regular expressions to paths to transformers
169
+ // transform: undefined,
170
+
171
+ // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
172
+ // transformIgnorePatterns: [
173
+ // "\\\\node_modules\\\\",
174
+ // "\\.pnp\\.[^\\\\]+$"
175
+ // ],
176
+
177
+ // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
178
+ // unmockedModulePathPatterns: undefined,
179
+
180
+ // Indicates whether each individual test should be reported during the run
181
+ // verbose: undefined,
182
+
183
+ // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
184
+ // watchPathIgnorePatterns: [],
185
+
186
+ // Whether to use watchman for file crawling
187
+ // watchman: true,
188
+ };
189
+
190
+ export default config;
package/nodemon.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "ignore": [""],
3
+ "delay": "1000"
4
+ }
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "kodzero-front-sdk-alfa",
3
+ "version": "0.0.2",
4
+ "main": "dist/index.js",
5
+ "scripts": {
6
+ "tsc": "tsc -b src/",
7
+ "tsc-watch": "tsc --b --watch src/",
8
+ "tscw": "tsc --b --watch src/",
9
+ "dev": "nodemon dist/index.js",
10
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
11
+ "prepare": "npm version patch && npm run tsc"
12
+ },
13
+ "type": "module",
14
+ "author": "lesha2r",
15
+ "license": "ISC",
16
+ "description": "",
17
+ "dependencies": {
18
+ "fluid-fetch": "^0.0.2",
19
+ "validno": "^0.3.5"
20
+ },
21
+ "devDependencies": {
22
+ "@jest/globals": "^29.7.0",
23
+ "@types/express": "^5.0.1",
24
+ "@types/jest": "^29.5.14",
25
+ "@types/node": "^22.14.0",
26
+ "eslint": "^9.24.0",
27
+ "jest": "^29.7.0"
28
+ }
29
+ }
package/src/Kodzero.ts ADDED
@@ -0,0 +1,35 @@
1
+ import FluidFetch from "fluid-fetch"
2
+ import { KodzeroAuth } from "./auth/index.js"
3
+ import createModel from "./model/createModel.js"
4
+ import { ModelOptions } from "./model/BaseModel.js"
5
+ import { TokensManagerClass } from "./auth/tokens.js"
6
+
7
+ interface Options {
8
+ host: string
9
+ }
10
+
11
+ class Kodzero {
12
+ host: string
13
+ auth: KodzeroAuth
14
+ tokensManager: TokensManagerClass
15
+ api: typeof FluidFetch
16
+
17
+ constructor (options: Options) {
18
+ this.tokensManager = new TokensManagerClass('', '')
19
+ this.host = options.host
20
+ this.api = new FluidFetch()
21
+ this.auth = new KodzeroAuth({host: options.host}, this.api, this.tokensManager)
22
+
23
+ this.api.middlewares.request.use((req: any) => {
24
+ const accessToken = this.tokensManager.access
25
+ if (accessToken) req.headers['Authorization'] = accessToken
26
+ return req
27
+ })
28
+ }
29
+
30
+ createModel = <T extends { _id?: string }, M = {}>(options: Omit<ModelOptions, 'host'>) => {
31
+ return createModel<T, M>({...options, host: this.host}, this.api)
32
+ }
33
+ }
34
+
35
+ export default Kodzero
@@ -0,0 +1,37 @@
1
+ import FluidFetch from "fluid-fetch";
2
+ import { AuthOptions } from "./index.js";
3
+ import { TokensManagerClass } from "./tokens.js";
4
+ import BaseAuthSchema from "../schemas/baseAuth.js";
5
+ import validateApiResponse from "../utils/validateApiResponse.js";
6
+
7
+ export class KodzeroAuthBase {
8
+ host: string;
9
+ api: typeof FluidFetch
10
+ tokensManager: TokensManagerClass
11
+
12
+ constructor(options: AuthOptions, api: typeof FluidFetch, tokensManager: TokensManagerClass) {
13
+ BaseAuthSchema.validateOrThrow(options);
14
+
15
+ this.host = options.host
16
+ this.api = api
17
+ this.tokensManager = tokensManager
18
+ }
19
+
20
+ /**
21
+ * Private.
22
+ * Links to API error handler
23
+ */
24
+ _handleApiError(response: Response) {
25
+ return validateApiResponse(response)
26
+ }
27
+
28
+ /**
29
+ * Base auth methods.
30
+ * These will be overridden by specific strategies (e.g. email, social, etc.)
31
+ */
32
+ signin = (...args: any[]): Promise<any> | void => {}
33
+ signup = (...args: any[]): Promise<any> | void => {}
34
+ refresh = (...args: any[]): Promise<any> | void => {}
35
+ signout = (...args: any[]): Promise<any> | void => {}
36
+ verify = (...args: any[]): Promise<any> | void => {}
37
+ }
@@ -0,0 +1,123 @@
1
+ import FluidFetch from "fluid-fetch"
2
+ import { AuthOptions } from "./index.js"
3
+ import { KodzeroAuthBase } from "./base.js"
4
+ import { TokensManagerClass } from "./tokens.js"
5
+ import buildURL from "../utils/buildURL_rename.js"
6
+
7
+ interface KodzeroAuthEmailSignin {
8
+ email: string
9
+ password: string
10
+ }
11
+
12
+ class KodzeroAuthEmail extends KodzeroAuthBase {
13
+ tokensManager: TokensManagerClass
14
+ collection: "auth/password"
15
+
16
+ constructor(options: AuthOptions, api: typeof FluidFetch, tokensManager: TokensManagerClass) {
17
+ super(options, api, tokensManager)
18
+
19
+ this.tokensManager = tokensManager
20
+ this.collection = "auth/password"
21
+ }
22
+
23
+ /**
24
+ * Private.
25
+ * Setter for tokens in TokensManager
26
+ */
27
+ _setTokens = (access: string, refresh?: string) => {
28
+ this.tokensManager.setAccess(access)
29
+ if (refresh) this.tokensManager.setRefresh(refresh)
30
+ }
31
+
32
+ /**
33
+ * Sign in with email and password. On success, sets tokens in TokensManager automatically
34
+ */
35
+ signin = async (input: KodzeroAuthEmailSignin): Promise<{access: string, refresh: string}> => {
36
+ const url = buildURL(this.host, this.collection + '/signin')
37
+
38
+ const response = await this.api.post(url, input)
39
+ .headers({ 'Content-Type': 'application/json' });
40
+
41
+ await this._handleApiError(response);
42
+ const json = await response.json();
43
+
44
+ if (json.ok && json.tokens && json.tokens.access && json.tokens.refresh) {
45
+ this._setTokens(json.tokens.access, json.tokens.refresh);
46
+ }
47
+
48
+ return json.tokens
49
+ }
50
+
51
+ /**
52
+ * Sign up with email and password. On success, sets tokens in TokensManager automatically
53
+ */
54
+ signup = async (userData: Record<string, string>): Promise<Record<string, any>> => {
55
+ const url = buildURL(this.host, this.collection + '/signup')
56
+ const response = await this.api.post(url, userData)
57
+ .headers({ 'Content-Type': 'application/json' });
58
+
59
+ await this._handleApiError(response);
60
+ const json = await response.json();
61
+
62
+ if (json.ok && json.result && json.result.tokens.access && json.result.tokens.refresh) {
63
+ this._setTokens(json.result.tokens.access, json.result.tokens.refresh);
64
+ }
65
+
66
+ return json.result.user
67
+ }
68
+
69
+ /**
70
+ * Verify current access token
71
+ */
72
+ verify = async (): Promise<any> => {
73
+ try {
74
+ const url = buildURL(this.host, this.collection + '/verify')
75
+ const response = await this.api.get(url)
76
+ const json = await response.json();
77
+
78
+ return json.ok ? true : false
79
+ } catch (error) {
80
+ console.warn("Token verification error:", error);
81
+ return false
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Refresh access token using refresh token
87
+ * If success, updates access token in TokensManager automatically
88
+ */
89
+ refresh = async (): Promise<any> => {
90
+ const url = buildURL(this.host, this.collection + '/refresh')
91
+ const response = await this.api.post(url, { refresh: this.tokensManager.refresh })
92
+ .headers({ 'Content-Type': 'application/json' });
93
+
94
+ await this._handleApiError(response);
95
+ const json = await response.json();
96
+
97
+ if (json.ok && json.tokens && json.tokens.access) {
98
+ this.tokensManager.setAccess(json.tokens.access)
99
+ }
100
+
101
+ return json.ok ? true : false
102
+ }
103
+
104
+ /**
105
+ * Sign out the user
106
+ * If success, clears tokens in TokensManager automatically
107
+ */
108
+ signout = async (): Promise<any> => {
109
+ const url = buildURL(this.host, this.collection + '/signout')
110
+ const response = await this.api.post(url, {})
111
+ .headers({ 'Content-Type': 'application/json' });
112
+
113
+ await this._handleApiError(response);
114
+ const json = await response.json();
115
+
116
+ if (json.ok) this.tokensManager.clear()
117
+
118
+ return json.ok ? true : false
119
+ }
120
+
121
+ }
122
+
123
+ export default KodzeroAuthEmail
@@ -0,0 +1,43 @@
1
+ import FluidFetch from "fluid-fetch";
2
+ import { KodzeroAuthBase } from "./base.js";
3
+ import KodzeroAuthEmail from "./email.js";
4
+ import { TokensManagerClass } from "./tokens.js";
5
+
6
+ export interface AuthOptions {
7
+ host: string
8
+ }
9
+
10
+ export class KodzeroAuth extends KodzeroAuthBase {
11
+ email: KodzeroAuthEmail
12
+ setTokens: (access: string, refresh?: string) => void
13
+ clearTokens: () => void;
14
+
15
+ constructor(options: AuthOptions, api: typeof FluidFetch, tokensManager: TokensManagerClass) {
16
+ super(options, api, tokensManager)
17
+
18
+ // Email Strategy
19
+ this.email = new KodzeroAuthEmail(options, api, tokensManager)
20
+
21
+ // Default methods set to email strategy methods
22
+ this.signin = this.email.signin
23
+ this.signup = this.email.signup
24
+ this.signout = this.email.signout
25
+ this.verify = this.email.verify
26
+ this.refresh = this.email.refresh
27
+
28
+ /**
29
+ * Set tokens in TokensManager. Used for manual token setting on startup.
30
+ */
31
+ this.setTokens = (access: string, refresh?: string) => {
32
+ tokensManager.setAccess(access)
33
+ if (refresh) tokensManager.setRefresh(refresh)
34
+ }
35
+
36
+ /**
37
+ * Clear tokens in TokensManager. Used for manual token clearing on necessary.
38
+ */
39
+ this.clearTokens = () => {
40
+ tokensManager.clear()
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * TokensManagerClass is responsible for managing access and refresh tokens.
3
+ * It provides methods to set, get, check existence, and clear tokens.
4
+ */
5
+ export class TokensManagerClass {
6
+ access: string
7
+ refresh: string
8
+
9
+ constructor(access: string = '', refresh: string = '') {
10
+ this.access = access
11
+ this.refresh = refresh
12
+ }
13
+
14
+ /**
15
+ * Checks if access token exists
16
+ */
17
+ hasAccess() {
18
+ return this.access && this.access !== ''
19
+ }
20
+
21
+ /**
22
+ * Checks if refresh token exists
23
+ */
24
+ hasRefresh() {
25
+ return this.refresh && this.refresh !== ''
26
+ }
27
+
28
+ /**
29
+ * Sets the access token
30
+ */
31
+ setAccess(token: string) {
32
+ this.access = token
33
+ }
34
+
35
+ /**
36
+ * Sets the refresh token
37
+ */
38
+ setRefresh(token: string) {
39
+ this.refresh = token
40
+ }
41
+
42
+ /**
43
+ * Clears both access and refresh tokens
44
+ */
45
+ clear() {
46
+ this.access = ''
47
+ this.refresh = ''
48
+ }
49
+ }
@@ -0,0 +1,17 @@
1
+ class KodzeroApiError extends Error {
2
+ url: string;
3
+ statusCode: number;
4
+ details: string;
5
+
6
+ constructor(url: string, statusCode: number, message: string, details?: string) {
7
+
8
+ super(message);
9
+
10
+ this.name = "KodzeroApiError";
11
+ this.url = url;
12
+ this.statusCode = statusCode;
13
+ this.details = details || '';
14
+ }
15
+ }
16
+
17
+ export default KodzeroApiError
@@ -0,0 +1,12 @@
1
+ class KodzeroValidationError extends Error {
2
+ errors: string[]
3
+
4
+ constructor(message: string, errors: string[] = []) {
5
+ super(message);
6
+
7
+ this.name = "KodzeroValidationError";
8
+ this.errors = errors;
9
+ }
10
+ }
11
+
12
+ export default KodzeroValidationError