@aeriajs/types 0.0.135 → 0.0.136

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.
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ACError = void 0;
4
- exports.ACError = {
1
+ export const ACError = {
5
2
  AuthenticationError: 'AUTHENTICATION_ERROR',
6
3
  AuthorizationError: 'AUTHORIZATION_ERROR',
7
4
  FunctionNotFound: 'FUNCTION_NOT_FOUND',
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/dist/condition.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/dist/config.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/dist/context.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/dist/contract.js CHANGED
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defineContract = void 0;
4
- const defineContract = (contract) => {
1
+ export const defineContract = (contract) => {
5
2
  return contract;
6
3
  };
7
- exports.defineContract = defineContract;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LAYOUT_NAMES = exports.DESCRIPTION_PRESETS = void 0;
4
- exports.DESCRIPTION_PRESETS = [
1
+ export const DESCRIPTION_PRESETS = [
5
2
  'add',
6
3
  'crud',
7
4
  'duplicate',
@@ -11,7 +8,7 @@ exports.DESCRIPTION_PRESETS = [
11
8
  'timestamped',
12
9
  'view',
13
10
  ];
14
- exports.LAYOUT_NAMES = [
11
+ export const LAYOUT_NAMES = [
15
12
  'tabular',
16
13
  'grid',
17
14
  'list',
@@ -1,5 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ERROR_SYMBOL = exports.ERROR_SYMBOL_DESCRIPTION = void 0;
4
- exports.ERROR_SYMBOL_DESCRIPTION = '#__ERROR_SYMBOL__';
5
- exports.ERROR_SYMBOL = Symbol(exports.ERROR_SYMBOL_DESCRIPTION);
1
+ export const ERROR_SYMBOL_DESCRIPTION = '#__ERROR_SYMBOL__';
2
+ export const ERROR_SYMBOL = Symbol(ERROR_SYMBOL_DESCRIPTION);
@@ -1,61 +1,54 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.countError = exports.getAllError = exports.getError = exports.insertError = void 0;
4
- const accessControl_js_1 = require("./accessControl.js");
5
- const http_js_1 = require("./http.js");
6
- const resultSchemas_js_1 = require("./resultSchemas.js");
7
- const validation_js_1 = require("./validation.js");
8
- const insertError = () => (0, resultSchemas_js_1.endpointErrorSchema)({
1
+ import { ACError } from './accessControl.js';
2
+ import { HTTPStatus } from './http.js';
3
+ import { endpointErrorSchema } from './resultSchemas.js';
4
+ import { ValidationErrorCode, TraverseError } from './validation.js';
5
+ export const insertError = () => endpointErrorSchema({
9
6
  httpStatus: [
10
- http_js_1.HTTPStatus.Forbidden,
11
- http_js_1.HTTPStatus.NotFound,
12
- http_js_1.HTTPStatus.UnprocessableContent,
13
- http_js_1.HTTPStatus.BadRequest,
14
- http_js_1.HTTPStatus.InternalServerError,
7
+ HTTPStatus.Forbidden,
8
+ HTTPStatus.NotFound,
9
+ HTTPStatus.UnprocessableContent,
10
+ HTTPStatus.BadRequest,
11
+ HTTPStatus.InternalServerError,
15
12
  ],
16
13
  code: [
17
- accessControl_js_1.ACError.InsecureOperator,
18
- accessControl_js_1.ACError.OwnershipError,
19
- accessControl_js_1.ACError.ResourceNotFound,
20
- accessControl_js_1.ACError.TargetImmutable,
21
- accessControl_js_1.ACError.MalformedInput,
22
- accessControl_js_1.ACError.UniquenessViolated,
23
- validation_js_1.ValidationErrorCode.EmptyTarget,
24
- validation_js_1.ValidationErrorCode.InvalidProperties,
25
- validation_js_1.ValidationErrorCode.MissingProperties,
26
- validation_js_1.TraverseError.InvalidDocumentId,
27
- validation_js_1.TraverseError.InvalidTempfile,
14
+ ACError.InsecureOperator,
15
+ ACError.OwnershipError,
16
+ ACError.ResourceNotFound,
17
+ ACError.TargetImmutable,
18
+ ACError.MalformedInput,
19
+ ACError.UniquenessViolated,
20
+ ValidationErrorCode.EmptyTarget,
21
+ ValidationErrorCode.InvalidProperties,
22
+ ValidationErrorCode.MissingProperties,
23
+ TraverseError.InvalidDocumentId,
24
+ TraverseError.InvalidTempfile,
28
25
  ],
29
26
  });
30
- exports.insertError = insertError;
31
- const getError = () => (0, resultSchemas_js_1.endpointErrorSchema)({
27
+ export const getError = () => endpointErrorSchema({
32
28
  httpStatus: [
33
- http_js_1.HTTPStatus.Forbidden,
34
- http_js_1.HTTPStatus.NotFound,
35
- http_js_1.HTTPStatus.BadRequest,
29
+ HTTPStatus.Forbidden,
30
+ HTTPStatus.NotFound,
31
+ HTTPStatus.BadRequest,
36
32
  ],
37
33
  code: [
38
- accessControl_js_1.ACError.ResourceNotFound,
39
- accessControl_js_1.ACError.OwnershipError,
40
- accessControl_js_1.ACError.InsecureOperator,
41
- accessControl_js_1.ACError.MalformedInput,
34
+ ACError.ResourceNotFound,
35
+ ACError.OwnershipError,
36
+ ACError.InsecureOperator,
37
+ ACError.MalformedInput,
42
38
  ],
43
39
  });
44
- exports.getError = getError;
45
- const getAllError = () => (0, resultSchemas_js_1.endpointErrorSchema)({
46
- httpStatus: [http_js_1.HTTPStatus.Forbidden],
40
+ export const getAllError = () => endpointErrorSchema({
41
+ httpStatus: [HTTPStatus.Forbidden],
47
42
  code: [
48
- accessControl_js_1.ACError.OwnershipError,
49
- accessControl_js_1.ACError.InsecureOperator,
50
- accessControl_js_1.ACError.InvalidLimit,
43
+ ACError.OwnershipError,
44
+ ACError.InsecureOperator,
45
+ ACError.InvalidLimit,
51
46
  ],
52
47
  });
53
- exports.getAllError = getAllError;
54
- const countError = () => (0, resultSchemas_js_1.endpointErrorSchema)({
55
- httpStatus: [http_js_1.HTTPStatus.Forbidden],
48
+ export const countError = () => endpointErrorSchema({
49
+ httpStatus: [HTTPStatus.Forbidden],
56
50
  code: [
57
- accessControl_js_1.ACError.OwnershipError,
58
- accessControl_js_1.ACError.InvalidLimit,
51
+ ACError.OwnershipError,
52
+ ACError.InvalidLimit,
59
53
  ],
60
54
  });
61
- exports.countError = countError;
package/dist/functions.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/dist/http.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.STREAMED_RESPONSE = exports.HTTPStatus = exports.METHOD_COLORS = exports.REQUEST_METHODS = void 0;
4
- exports.REQUEST_METHODS = [
1
+ export const REQUEST_METHODS = [
5
2
  'GET',
6
3
  'HEAD',
7
4
  'POST',
@@ -12,13 +9,13 @@ exports.REQUEST_METHODS = [
12
9
  'TRACE',
13
10
  'SEARCH',
14
11
  ];
15
- exports.METHOD_COLORS = {
12
+ export const METHOD_COLORS = {
16
13
  GET: 'green',
17
14
  PUT: 'blue',
18
15
  POST: 'white',
19
16
  DELETE: 'red',
20
17
  };
21
- exports.HTTPStatus = {
18
+ export const HTTPStatus = {
22
19
  Ok: 200,
23
20
  NoContent: 204,
24
21
  BadRequest: 400,
@@ -30,4 +27,4 @@ exports.HTTPStatus = {
30
27
  TooManyRequests: 429,
31
28
  InternalServerError: 500,
32
29
  };
33
- exports.STREAMED_RESPONSE = Symbol('StreamedResponse');
30
+ export const STREAMED_RESPONSE = Symbol('StreamedResponse');
package/dist/index.js CHANGED
@@ -1,35 +1,18 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
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);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.functionSchemas = void 0;
18
- exports.functionSchemas = require("./functionSchemas.js");
19
- __exportStar(require("./accessControl.js"), exports);
20
- __exportStar(require("./collection.js"), exports);
21
- __exportStar(require("./condition.js"), exports);
22
- __exportStar(require("./config.js"), exports);
23
- __exportStar(require("./context.js"), exports);
24
- __exportStar(require("./contract.js"), exports);
25
- __exportStar(require("./description.js"), exports);
26
- __exportStar(require("./endpointError.js"), exports);
27
- __exportStar(require("./functions.js"), exports);
28
- __exportStar(require("./http.js"), exports);
29
- __exportStar(require("./property.js"), exports);
30
- __exportStar(require("./result.js"), exports);
31
- __exportStar(require("./resultSchemas.js"), exports);
32
- __exportStar(require("./schema.js"), exports);
33
- __exportStar(require("./security.js"), exports);
34
- __exportStar(require("./token.js"), exports);
35
- __exportStar(require("./validation.js"), exports);
1
+ export * as functionSchemas from './functionSchemas.js';
2
+ export * from './accessControl.js';
3
+ export * from './collection.js';
4
+ export * from './condition.js';
5
+ export * from './config.js';
6
+ export * from './context.js';
7
+ export * from './contract.js';
8
+ export * from './description.js';
9
+ export * from './endpointError.js';
10
+ export * from './functions.js';
11
+ export * from './http.js';
12
+ export * from './property.js';
13
+ export * from './result.js';
14
+ export * from './resultSchemas.js';
15
+ export * from './schema.js';
16
+ export * from './security.js';
17
+ export * from './token.js';
18
+ export * from './validation.js';
package/dist/property.js CHANGED
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PROPERTY_FORMATS = exports.PROPERTY_INPUT_ELEMENTS = exports.PROPERTY_INPUT_TYPES = exports.PROPERTY_ARRAY_ELEMENTS = void 0;
4
- exports.PROPERTY_ARRAY_ELEMENTS = [
1
+ export const PROPERTY_ARRAY_ELEMENTS = [
5
2
  'checkbox',
6
3
  'radio',
7
4
  'select',
8
5
  ];
9
- exports.PROPERTY_INPUT_TYPES = [
6
+ export const PROPERTY_INPUT_TYPES = [
10
7
  'text',
11
8
  'email',
12
9
  'password',
@@ -14,11 +11,11 @@ exports.PROPERTY_INPUT_TYPES = [
14
11
  'time',
15
12
  'month',
16
13
  ];
17
- exports.PROPERTY_INPUT_ELEMENTS = [
14
+ export const PROPERTY_INPUT_ELEMENTS = [
18
15
  'input',
19
16
  'textarea',
20
17
  ];
21
- exports.PROPERTY_FORMATS = [
18
+ export const PROPERTY_FORMATS = [
22
19
  'date',
23
20
  'date-time',
24
21
  'objectid',
package/dist/result.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Result = void 0;
4
- var Result;
1
+ export var Result;
5
2
  (function (Result) {
6
3
  Result.error = (value) => ({
7
4
  _tag: 'Error',
@@ -13,4 +10,4 @@ var Result;
13
10
  error: undefined,
14
11
  result: value,
15
12
  });
16
- })(Result || (exports.Result = Result = {}));
13
+ })(Result || (Result = {}));
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.genericEndpointErrorSchema = exports.endpointErrorSchema = exports.resultSchema = exports.errorSchema = void 0;
4
- const errorSchema = (error) => {
1
+ export const errorSchema = (error) => {
5
2
  const schema = {
6
3
  type: 'object',
7
4
  properties: {
@@ -17,8 +14,7 @@ const errorSchema = (error) => {
17
14
  };
18
15
  return schema;
19
16
  };
20
- exports.errorSchema = errorSchema;
21
- const resultSchema = (result) => {
17
+ export const resultSchema = (result) => {
22
18
  const schema = {
23
19
  type: 'object',
24
20
  properties: {
@@ -34,8 +30,7 @@ const resultSchema = (result) => {
34
30
  };
35
31
  return schema;
36
32
  };
37
- exports.resultSchema = resultSchema;
38
- const endpointErrorSchema = (error) => {
33
+ export const endpointErrorSchema = (error) => {
39
34
  return {
40
35
  type: 'object',
41
36
  properties: {
@@ -71,8 +66,7 @@ const endpointErrorSchema = (error) => {
71
66
  },
72
67
  };
73
68
  };
74
- exports.endpointErrorSchema = endpointErrorSchema;
75
- const genericEndpointErrorSchema = () => {
69
+ export const genericEndpointErrorSchema = () => {
76
70
  return {
77
71
  type: 'object',
78
72
  properties: {
@@ -108,4 +102,3 @@ const genericEndpointErrorSchema = () => {
108
102
  },
109
103
  };
110
104
  };
111
- exports.genericEndpointErrorSchema = genericEndpointErrorSchema;
package/dist/schema.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/dist/security.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RateLimitingError = void 0;
4
- exports.RateLimitingError = {
1
+ export const RateLimitingError = {
5
2
  Unauthenticated: 'UNAUTHENTICATED',
6
3
  LimitReached: 'LIMIT_REACHED',
7
4
  };
package/dist/token.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TraverseError = exports.PropertyValidationErrorCode = exports.ValidationErrorCode = void 0;
4
- exports.ValidationErrorCode = {
1
+ export const ValidationErrorCode = {
5
2
  InvalidProperties: 'INVALID_PROPERTIES',
6
3
  MissingProperties: 'MISSING_PROPERTIES',
7
4
  EmptyTarget: 'EMPTY_TARGET',
8
5
  };
9
- exports.PropertyValidationErrorCode = {
6
+ export const PropertyValidationErrorCode = {
10
7
  Missing: 'MISSING_PROPERTY',
11
8
  Extraneous: 'EXTRANEOUS_PROPERTY',
12
9
  Unmatching: 'UNMATCHING_PROPERTIES',
@@ -17,7 +14,7 @@ exports.PropertyValidationErrorCode = {
17
14
  StringConstraint: 'STRING_CONSTRAINT',
18
15
  ReferenceConstraint: 'REFERENCE_CONSTRAINT',
19
16
  };
20
- exports.TraverseError = {
17
+ export const TraverseError = {
21
18
  InvalidDocumentId: 'INVALID_DOCUMENT_ID',
22
19
  InvalidTempfile: 'INVALID_TEMPFILE',
23
20
  };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.135",
3
+ "type": "module",
4
+ "version": "0.0.136",
4
5
  "description": "",
5
6
  "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "publishConfig": {
9
9
  "access": "public"
@@ -11,8 +11,7 @@
11
11
  "exports": {
12
12
  ".": {
13
13
  "types": "./dist/index.d.ts",
14
- "import": "./dist/index.mjs",
15
- "require": "./dist/index.js"
14
+ "default": "./dist/index.js"
16
15
  }
17
16
  },
18
17
  "keywords": [],
@@ -28,9 +27,6 @@
28
27
  "test": "echo skipping",
29
28
  "lint": "eslint .",
30
29
  "lint:fix": "eslint . --fix",
31
- "build": "pnpm build:cjs && pnpm build:esm",
32
- "build:cjs": "tsc",
33
- "build:esm": "esbuild './src/**/*.ts' --outdir=dist --out-extension:.js=.mjs && pnpm build:esm-transform",
34
- "build:esm-transform": "pnpm -w esm-transform $PWD/dist"
30
+ "build": "tsc"
35
31
  }
36
32
  }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- export const ACError = {
3
- AuthenticationError: "AUTHENTICATION_ERROR",
4
- AuthorizationError: "AUTHORIZATION_ERROR",
5
- FunctionNotFound: "FUNCTION_NOT_FOUND",
6
- FunctionNotExposed: "FUNCTION_NOT_EXPOSED",
7
- TargetImmutable: "TARGET_IMMUTABLE",
8
- InvalidLimit: "INVALID_LIMIT",
9
- InvalidToken: "INVALID_TOKEN",
10
- OwnershipError: "OWNERSHIP_ERROR",
11
- ResourceNotFound: "RESOURCE_NOT_FOUND",
12
- InsecureOperator: "INSECURE_OPERATOR",
13
- MalformedInput: "MALFORMED_INPUT",
14
- UniquenessViolated: "UNIQUENESS_VIOLATED",
15
- UnknownError: "UNKNOWN_ERROR"
16
- };
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";
package/dist/config.mjs DELETED
@@ -1 +0,0 @@
1
- "use strict";
package/dist/context.mjs DELETED
@@ -1 +0,0 @@
1
- "use strict";
package/dist/contract.mjs DELETED
@@ -1,4 +0,0 @@
1
- "use strict";
2
- export const defineContract = (contract) => {
3
- return contract;
4
- };
@@ -1,16 +0,0 @@
1
- "use strict";
2
- export const DESCRIPTION_PRESETS = [
3
- "add",
4
- "crud",
5
- "duplicate",
6
- "remove",
7
- "removeAll",
8
- "owned",
9
- "timestamped",
10
- "view"
11
- ];
12
- export const LAYOUT_NAMES = [
13
- "tabular",
14
- "grid",
15
- "list"
16
- ];
@@ -1,3 +0,0 @@
1
- "use strict";
2
- export const ERROR_SYMBOL_DESCRIPTION = "#__ERROR_SYMBOL__";
3
- export const ERROR_SYMBOL = Symbol(ERROR_SYMBOL_DESCRIPTION);
@@ -1,55 +0,0 @@
1
- "use strict";
2
- import { ACError } from "./accessControl.mjs";
3
- import { HTTPStatus } from "./http.mjs";
4
- import { endpointErrorSchema } from "./resultSchemas.mjs";
5
- import { ValidationErrorCode, TraverseError } from "./validation.mjs";
6
- export const insertError = () => endpointErrorSchema({
7
- httpStatus: [
8
- HTTPStatus.Forbidden,
9
- HTTPStatus.NotFound,
10
- HTTPStatus.UnprocessableContent,
11
- HTTPStatus.BadRequest,
12
- HTTPStatus.InternalServerError
13
- ],
14
- code: [
15
- ACError.InsecureOperator,
16
- ACError.OwnershipError,
17
- ACError.ResourceNotFound,
18
- ACError.TargetImmutable,
19
- ACError.MalformedInput,
20
- ACError.UniquenessViolated,
21
- ValidationErrorCode.EmptyTarget,
22
- ValidationErrorCode.InvalidProperties,
23
- ValidationErrorCode.MissingProperties,
24
- TraverseError.InvalidDocumentId,
25
- TraverseError.InvalidTempfile
26
- ]
27
- });
28
- export const getError = () => endpointErrorSchema({
29
- httpStatus: [
30
- HTTPStatus.Forbidden,
31
- HTTPStatus.NotFound,
32
- HTTPStatus.BadRequest
33
- ],
34
- code: [
35
- ACError.ResourceNotFound,
36
- ACError.OwnershipError,
37
- ACError.InsecureOperator,
38
- ACError.MalformedInput
39
- ]
40
- });
41
- export const getAllError = () => endpointErrorSchema({
42
- httpStatus: [HTTPStatus.Forbidden],
43
- code: [
44
- ACError.OwnershipError,
45
- ACError.InsecureOperator,
46
- ACError.InvalidLimit
47
- ]
48
- });
49
- export const countError = () => endpointErrorSchema({
50
- httpStatus: [HTTPStatus.Forbidden],
51
- code: [
52
- ACError.OwnershipError,
53
- ACError.InvalidLimit
54
- ]
55
- });
@@ -1 +0,0 @@
1
- "use strict";
package/dist/http.mjs DELETED
@@ -1,31 +0,0 @@
1
- "use strict";
2
- export const REQUEST_METHODS = [
3
- "GET",
4
- "HEAD",
5
- "POST",
6
- "PUT",
7
- "DELETE",
8
- "OPTIONS",
9
- "PATCH",
10
- "TRACE",
11
- "SEARCH"
12
- ];
13
- export const METHOD_COLORS = {
14
- GET: "green",
15
- PUT: "blue",
16
- POST: "white",
17
- DELETE: "red"
18
- };
19
- export const HTTPStatus = {
20
- Ok: 200,
21
- NoContent: 204,
22
- BadRequest: 400,
23
- Unauthorized: 401,
24
- Forbidden: 403,
25
- NotFound: 404,
26
- RangeNotSatisfiable: 416,
27
- UnprocessableContent: 422,
28
- TooManyRequests: 429,
29
- InternalServerError: 500
30
- };
31
- export const STREAMED_RESPONSE = Symbol("StreamedResponse");
package/dist/index.mjs DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- export * as functionSchemas from "./functionSchemas.mjs";
3
- export * from "./accessControl.mjs";
4
- export * from "./collection.mjs";
5
- export * from "./condition.mjs";
6
- export * from "./config.mjs";
7
- export * from "./context.mjs";
8
- export * from "./contract.mjs";
9
- export * from "./description.mjs";
10
- export * from "./endpointError.mjs";
11
- export * from "./functions.mjs";
12
- export * from "./http.mjs";
13
- export * from "./property.mjs";
14
- export * from "./result.mjs";
15
- export * from "./resultSchemas.mjs";
16
- export * from "./schema.mjs";
17
- export * from "./security.mjs";
18
- export * from "./token.mjs";
19
- export * from "./validation.mjs";
package/dist/property.mjs DELETED
@@ -1,23 +0,0 @@
1
- "use strict";
2
- export const PROPERTY_ARRAY_ELEMENTS = [
3
- "checkbox",
4
- "radio",
5
- "select"
6
- ];
7
- export const PROPERTY_INPUT_TYPES = [
8
- "text",
9
- "email",
10
- "password",
11
- "search",
12
- "time",
13
- "month"
14
- ];
15
- export const PROPERTY_INPUT_ELEMENTS = [
16
- "input",
17
- "textarea"
18
- ];
19
- export const PROPERTY_FORMATS = [
20
- "date",
21
- "date-time",
22
- "objectid"
23
- ];
package/dist/result.mjs DELETED
@@ -1,14 +0,0 @@
1
- "use strict";
2
- export var Result;
3
- ((Result2) => {
4
- Result2.error = (value) => ({
5
- _tag: "Error",
6
- error: value,
7
- result: void 0
8
- });
9
- Result2.result = (value) => ({
10
- _tag: "Result",
11
- error: void 0,
12
- result: value
13
- });
14
- })(Result || (Result = {}));
@@ -1,105 +0,0 @@
1
- "use strict";
2
- export const errorSchema = (error) => {
3
- const schema = {
4
- type: "object",
5
- properties: {
6
- _tag: {
7
- const: "Error"
8
- },
9
- error,
10
- result: {
11
- const: void 0,
12
- isConstUndefined: true
13
- }
14
- }
15
- };
16
- return schema;
17
- };
18
- export const resultSchema = (result) => {
19
- const schema = {
20
- type: "object",
21
- properties: {
22
- _tag: {
23
- const: "Result"
24
- },
25
- error: {
26
- const: void 0,
27
- isConstUndefined: true
28
- },
29
- result
30
- }
31
- };
32
- return schema;
33
- };
34
- export const endpointErrorSchema = (error) => {
35
- return {
36
- type: "object",
37
- properties: {
38
- _tag: {
39
- const: "Error"
40
- },
41
- result: {
42
- const: void 0,
43
- isConstUndefined: true
44
- },
45
- error: {
46
- type: "object",
47
- required: [
48
- "httpStatus",
49
- "code"
50
- ],
51
- properties: {
52
- httpStatus: {
53
- enum: error.httpStatus
54
- },
55
- code: {
56
- enum: error.code
57
- },
58
- message: {
59
- type: "string"
60
- },
61
- details: {
62
- type: "object",
63
- additionalProperties: true
64
- }
65
- }
66
- }
67
- }
68
- };
69
- };
70
- export const genericEndpointErrorSchema = () => {
71
- return {
72
- type: "object",
73
- properties: {
74
- _tag: {
75
- const: "Error"
76
- },
77
- result: {
78
- const: void 0,
79
- isConstUndefined: true
80
- },
81
- error: {
82
- type: "object",
83
- required: [
84
- "httpStatus",
85
- "code"
86
- ],
87
- properties: {
88
- httpStatus: {
89
- type: "number"
90
- },
91
- code: {
92
- type: "string"
93
- },
94
- message: {
95
- type: "string"
96
- },
97
- details: {
98
- type: "object",
99
- additionalProperties: true
100
- }
101
- }
102
- }
103
- }
104
- };
105
- };
package/dist/schema.mjs DELETED
@@ -1 +0,0 @@
1
- "use strict";
package/dist/security.mjs DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- export const RateLimitingError = {
3
- Unauthenticated: "UNAUTHENTICATED",
4
- LimitReached: "LIMIT_REACHED"
5
- };
package/dist/token.mjs DELETED
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,21 +0,0 @@
1
- "use strict";
2
- export const ValidationErrorCode = {
3
- InvalidProperties: "INVALID_PROPERTIES",
4
- MissingProperties: "MISSING_PROPERTIES",
5
- EmptyTarget: "EMPTY_TARGET"
6
- };
7
- export const PropertyValidationErrorCode = {
8
- Missing: "MISSING_PROPERTY",
9
- Extraneous: "EXTRANEOUS_PROPERTY",
10
- Unmatching: "UNMATCHING_PROPERTIES",
11
- ExtraneousElement: "EXTRANEOUS_ELEMENT",
12
- MoreItemsExpected: "MORE_ITEMS_EXPECTED",
13
- LessItemsExpected: "LESS_ITEMS_EXPECTED",
14
- NumericConstraint: "NUMERIC_CONSTRAINT",
15
- StringConstraint: "STRING_CONSTRAINT",
16
- ReferenceConstraint: "REFERENCE_CONSTRAINT"
17
- };
18
- export const TraverseError = {
19
- InvalidDocumentId: "INVALID_DOCUMENT_ID",
20
- InvalidTempfile: "INVALID_TEMPFILE"
21
- };