@degenerate/endpoints 0.0.11 → 0.0.13
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/dist/cors/endpoints/helpers/validate-incoming-request-data.d.ts.map +1 -1
- package/dist/cors/endpoints/helpers/validate-incoming-request-data.js +1 -0
- package/dist/cors/index.d.ts +1 -2
- package/dist/cors/index.d.ts.map +1 -1
- package/dist/cors/index.js +2 -3
- package/dist/cors/logging/add-unique-tracking.js +2 -2
- package/dist/cors/routes/authorities/v1.routes.d.ts.map +1 -1
- package/dist/cors/routes/authorities/v1.routes.js +8 -8
- package/dist/cors/routes/rules/v1/rule-set.routes.d.ts.map +1 -1
- package/dist/cors/routes/rules/v1/rule-set.routes.js +4 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -0
- package/package.json +3 -3
- package/dist/cors/endpoints/authorities/validate-authorities-transaction.d.ts +0 -30
- package/dist/cors/endpoints/authorities/validate-authorities-transaction.d.ts.map +0 -1
- package/dist/cors/endpoints/authorities/validate-authorities-transaction.js +0 -155
- package/dist/schema/authorities-transactions.schema.d.ts +0 -306
- package/dist/schema/authorities-transactions.schema.d.ts.map +0 -1
- package/dist/schema/authorities-transactions.schema.js +0 -71
- package/dist/schema/rules/rules-conditions.schema.d.ts +0 -402
- package/dist/schema/rules/rules-conditions.schema.d.ts.map +0 -1
- package/dist/schema/rules/rules-conditions.schema.js +0 -99
- package/dist/schema/rules/rules-enums.schema.d.ts +0 -39
- package/dist/schema/rules/rules-enums.schema.d.ts.map +0 -1
- package/dist/schema/rules/rules-enums.schema.js +0 -90
- package/dist/schema/rules/rules.schema.d.ts +0 -2839
- package/dist/schema/rules/rules.schema.d.ts.map +0 -1
- package/dist/schema/rules/rules.schema.js +0 -76
- package/dist/schema/rules-transactions.schema.d.ts +0 -450
- package/dist/schema/rules-transactions.schema.d.ts.map +0 -1
- package/dist/schema/rules-transactions.schema.js +0 -63
- package/dist/schema/transactions.schema.d.ts +0 -45
- package/dist/schema/transactions.schema.d.ts.map +0 -1
- package/dist/schema/transactions.schema.js +0 -43
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ConditionTypeSchema = exports.ConditionTypeSpecialSchema = exports.ConditionTypeBooleanSchema = exports.ConditionTypeStartsEndsWithSchema = exports.ConditionTypeRangeSchema = exports.ConditionTypeSingleSchema = exports.ConditionTypeQualifierSchema = exports.LogicalOperatorSchema = exports.ConditionTypeOfSchema = void 0;
|
|
7
|
-
// This contains the schemas for the rules objects in the zod format.
|
|
8
|
-
const generic_1 = require("@degenerate/generic");
|
|
9
|
-
const zod_1 = __importDefault(require("zod"));
|
|
10
|
-
//#region Enums
|
|
11
|
-
/**
|
|
12
|
-
* These are the different choices for the types of data in a condition.
|
|
13
|
-
*/
|
|
14
|
-
exports.ConditionTypeOfSchema = zod_1.default.enum([
|
|
15
|
-
generic_1.ConditionTypeOf.STRING,
|
|
16
|
-
generic_1.ConditionTypeOf.NUMBER,
|
|
17
|
-
generic_1.ConditionTypeOf.INTEGER,
|
|
18
|
-
generic_1.ConditionTypeOf.BOOLEAN,
|
|
19
|
-
generic_1.ConditionTypeOf.OBJECT,
|
|
20
|
-
generic_1.ConditionTypeOf.ARRAY,
|
|
21
|
-
generic_1.ConditionTypeOf.NULL,
|
|
22
|
-
generic_1.ConditionTypeOf.UNDEFINED,
|
|
23
|
-
generic_1.ConditionTypeOf.FUNCTION,
|
|
24
|
-
generic_1.ConditionTypeOf.BIGINT,
|
|
25
|
-
]);
|
|
26
|
-
/**
|
|
27
|
-
* This contains the choices for the logical operators.
|
|
28
|
-
*/
|
|
29
|
-
exports.LogicalOperatorSchema = zod_1.default.enum([
|
|
30
|
-
generic_1.LogicalOperator.AND,
|
|
31
|
-
generic_1.LogicalOperator.OR,
|
|
32
|
-
]);
|
|
33
|
-
/**
|
|
34
|
-
* This contains the choices for the type of qualifier.
|
|
35
|
-
*/
|
|
36
|
-
exports.ConditionTypeQualifierSchema = zod_1.default.enum([
|
|
37
|
-
generic_1.ConditionTypeQualifier.IS,
|
|
38
|
-
generic_1.ConditionTypeQualifier.IS_NOT,
|
|
39
|
-
]);
|
|
40
|
-
/**
|
|
41
|
-
* This contains the choices for the type of condition.
|
|
42
|
-
*/
|
|
43
|
-
exports.ConditionTypeSingleSchema = zod_1.default.enum([
|
|
44
|
-
generic_1.ConditionTypeSingle.TYPEOF,
|
|
45
|
-
generic_1.ConditionTypeSingle.EQUAL,
|
|
46
|
-
generic_1.ConditionTypeSingle.CONTAINS,
|
|
47
|
-
generic_1.ConditionTypeSingle.NULL,
|
|
48
|
-
generic_1.ConditionTypeSingle.EMPTY,
|
|
49
|
-
generic_1.ConditionTypeSingle.SHARE_RULE,
|
|
50
|
-
]);
|
|
51
|
-
/**
|
|
52
|
-
* This contains the choices for the range conditions.
|
|
53
|
-
*/
|
|
54
|
-
exports.ConditionTypeRangeSchema = zod_1.default.enum([
|
|
55
|
-
generic_1.ConditionTypeRange.GREATER_THAN,
|
|
56
|
-
generic_1.ConditionTypeRange.LESS_THAN,
|
|
57
|
-
generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL,
|
|
58
|
-
generic_1.ConditionTypeRange.LESS_THAN_OR_EQUAL,
|
|
59
|
-
]);
|
|
60
|
-
/**
|
|
61
|
-
* This contains the choices for the starts with and ends with conditions.
|
|
62
|
-
*/
|
|
63
|
-
exports.ConditionTypeStartsEndsWithSchema = zod_1.default.enum([
|
|
64
|
-
generic_1.ConditionTypeStartsEndsWith.STARTS_WITH,
|
|
65
|
-
generic_1.ConditionTypeStartsEndsWith.ENDS_WITH,
|
|
66
|
-
]);
|
|
67
|
-
/**
|
|
68
|
-
* This contains the choices for the boolean conditions.
|
|
69
|
-
*/
|
|
70
|
-
exports.ConditionTypeBooleanSchema = zod_1.default.enum([
|
|
71
|
-
generic_1.ConditionTypeBoolean.TRUE,
|
|
72
|
-
generic_1.ConditionTypeBoolean.FALSE,
|
|
73
|
-
]);
|
|
74
|
-
/**
|
|
75
|
-
* This contains the choices for the special conditions.
|
|
76
|
-
*/
|
|
77
|
-
exports.ConditionTypeSpecialSchema = zod_1.default.enum([
|
|
78
|
-
generic_1.ConditionTypeSpecial.PATTERN,
|
|
79
|
-
]);
|
|
80
|
-
/**
|
|
81
|
-
* Create the union schema for ConditionType
|
|
82
|
-
*/
|
|
83
|
-
exports.ConditionTypeSchema = zod_1.default.union([
|
|
84
|
-
exports.ConditionTypeSingleSchema,
|
|
85
|
-
exports.ConditionTypeRangeSchema,
|
|
86
|
-
exports.ConditionTypeStartsEndsWithSchema,
|
|
87
|
-
exports.ConditionTypeBooleanSchema,
|
|
88
|
-
exports.ConditionTypeSpecialSchema,
|
|
89
|
-
]);
|
|
90
|
-
//#endregion Enums
|