@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.
Files changed (35) hide show
  1. package/dist/cors/endpoints/helpers/validate-incoming-request-data.d.ts.map +1 -1
  2. package/dist/cors/endpoints/helpers/validate-incoming-request-data.js +1 -0
  3. package/dist/cors/index.d.ts +1 -2
  4. package/dist/cors/index.d.ts.map +1 -1
  5. package/dist/cors/index.js +2 -3
  6. package/dist/cors/logging/add-unique-tracking.js +2 -2
  7. package/dist/cors/routes/authorities/v1.routes.d.ts.map +1 -1
  8. package/dist/cors/routes/authorities/v1.routes.js +8 -8
  9. package/dist/cors/routes/rules/v1/rule-set.routes.d.ts.map +1 -1
  10. package/dist/cors/routes/rules/v1/rule-set.routes.js +4 -6
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +16 -0
  14. package/package.json +3 -3
  15. package/dist/cors/endpoints/authorities/validate-authorities-transaction.d.ts +0 -30
  16. package/dist/cors/endpoints/authorities/validate-authorities-transaction.d.ts.map +0 -1
  17. package/dist/cors/endpoints/authorities/validate-authorities-transaction.js +0 -155
  18. package/dist/schema/authorities-transactions.schema.d.ts +0 -306
  19. package/dist/schema/authorities-transactions.schema.d.ts.map +0 -1
  20. package/dist/schema/authorities-transactions.schema.js +0 -71
  21. package/dist/schema/rules/rules-conditions.schema.d.ts +0 -402
  22. package/dist/schema/rules/rules-conditions.schema.d.ts.map +0 -1
  23. package/dist/schema/rules/rules-conditions.schema.js +0 -99
  24. package/dist/schema/rules/rules-enums.schema.d.ts +0 -39
  25. package/dist/schema/rules/rules-enums.schema.d.ts.map +0 -1
  26. package/dist/schema/rules/rules-enums.schema.js +0 -90
  27. package/dist/schema/rules/rules.schema.d.ts +0 -2839
  28. package/dist/schema/rules/rules.schema.d.ts.map +0 -1
  29. package/dist/schema/rules/rules.schema.js +0 -76
  30. package/dist/schema/rules-transactions.schema.d.ts +0 -450
  31. package/dist/schema/rules-transactions.schema.d.ts.map +0 -1
  32. package/dist/schema/rules-transactions.schema.js +0 -63
  33. package/dist/schema/transactions.schema.d.ts +0 -45
  34. package/dist/schema/transactions.schema.d.ts.map +0 -1
  35. package/dist/schema/transactions.schema.js +0 -43
@@ -1,43 +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.ISAFETransactionBaseSchema = exports.SAFETransactionActionTypeSchema = exports.SAFETransactionTypeSchema = void 0;
7
- //This file contains the schema for the transaction data in the SAFE Ecosystem in zod format.
8
- const zod_1 = __importDefault(require("zod"));
9
- const generic_1 = require("@degenerate/generic");
10
- //#region Enums
11
- // This is the schema for the authority data.
12
- exports.SAFETransactionTypeSchema = zod_1.default.enum([
13
- generic_1.SAFETransactionType.AUTHORITY,
14
- generic_1.SAFETransactionType.SHAREDATA,
15
- generic_1.SAFETransactionType.FUNCTIONS,
16
- generic_1.SAFETransactionType.RULES,
17
- generic_1.SAFETransactionType.EVENTS,
18
- generic_1.SAFETransactionType.ENDPOINTS,
19
- ]);
20
- /**
21
- * This is the type of function that is being targetted in the transaction.
22
- */
23
- exports.SAFETransactionActionTypeSchema = zod_1.default.enum([
24
- generic_1.SAFETransactionActionType.ADD,
25
- generic_1.SAFETransactionActionType.REMOVE,
26
- generic_1.SAFETransactionActionType.UPDATE,
27
- ]);
28
- //#endregion Enums
29
- //#region Transaction
30
- /**
31
- * This is the schema for the SAFE transaction base.
32
- */
33
- exports.ISAFETransactionBaseSchema = zod_1.default.object({
34
- createdAt: zod_1.default.number(), // the javascript timestamp of when the transaction was created
35
- authority: zod_1.default.string(), // the public key of the authority that created the transaction
36
- authoritySignature: zod_1.default.string(), // the signature of the authority that created the transaction
37
- transaction: zod_1.default.object({
38
- type: exports.SAFETransactionTypeSchema, // the type of transaction
39
- action: exports.SAFETransactionActionTypeSchema, // the action to perform on the transaction
40
- }),
41
- version: zod_1.default.number(), // the version of the transaction
42
- });
43
- //#endregion Transaction