@levrbet/shared 0.1.102 → 0.1.103

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 (28) hide show
  1. package/dist/cjs/core/types/auth/auth.types.js.map +1 -0
  2. package/dist/cjs/core/types/auth/index.js +19 -0
  3. package/dist/cjs/core/types/auth/index.js.map +1 -0
  4. package/dist/cjs/core/types/auth/request.types.js +15 -0
  5. package/dist/cjs/core/types/auth/request.types.js.map +1 -0
  6. package/dist/cjs/core/types/index.js +1 -1
  7. package/dist/cjs/core/types/index.js.map +1 -1
  8. package/dist/esm/core/types/{auth.types.d.ts → auth/auth.types.d.ts} +1 -1
  9. package/dist/esm/core/types/auth/auth.types.d.ts.map +1 -0
  10. package/dist/esm/core/types/auth/auth.types.js.map +1 -0
  11. package/dist/esm/core/types/auth/index.d.ts +3 -0
  12. package/dist/esm/core/types/auth/index.d.ts.map +1 -0
  13. package/dist/esm/core/types/auth/index.js +3 -0
  14. package/dist/esm/core/types/auth/index.js.map +1 -0
  15. package/dist/esm/core/types/auth/request.types.d.ts +20 -0
  16. package/dist/esm/core/types/auth/request.types.d.ts.map +1 -0
  17. package/dist/esm/core/types/auth/request.types.js +9 -0
  18. package/dist/esm/core/types/auth/request.types.js.map +1 -0
  19. package/dist/esm/core/types/index.d.ts +1 -1
  20. package/dist/esm/core/types/index.d.ts.map +1 -1
  21. package/dist/esm/core/types/index.js +1 -1
  22. package/dist/esm/core/types/index.js.map +1 -1
  23. package/package.json +1 -1
  24. package/dist/cjs/core/types/auth.types.js.map +0 -1
  25. package/dist/esm/core/types/auth.types.d.ts.map +0 -1
  26. package/dist/esm/core/types/auth.types.js.map +0 -1
  27. /package/dist/cjs/core/types/{auth.types.js → auth/auth.types.js} +0 -0
  28. /package/dist/esm/core/types/{auth.types.js → auth/auth.types.js} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.types.js","sourceRoot":"","sources":["../../../../../src/core/types/auth/auth.types.ts"],"names":[],"mappings":";;;AAEA,IAAY,QAMX;AAND,WAAY,QAAQ;IAChB,oCAAwB,CAAA;IACxB,sCAA0B,CAAA;IAC1B,qCAAyB,CAAA;IACzB,yBAAa,CAAA;IACb,wCAA4B,CAAA;AAChC,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB;AAED,4EAA4E;AAC5E,qEAAqE;AACxD,QAAA,gBAAgB,GAAG,kBAAkB,CAAA"}
@@ -0,0 +1,19 @@
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
+ __exportStar(require("./auth.types"), exports);
18
+ __exportStar(require("./request.types"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/types/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,kDAA+B"}
@@ -0,0 +1,15 @@
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.createApiKeySchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const prisma_1 = require("../../prisma");
9
+ exports.createApiKeySchema = zod_1.default.object({
10
+ name: zod_1.default.string().min(1).max(100),
11
+ scopes: zod_1.default.array(zod_1.default.enum(prisma_1.ApiKeyScope)).min(1, "At least one scope is required."),
12
+ expiresAt: zod_1.default.coerce.date().optional(),
13
+ service: zod_1.default.enum(prisma_1.LevrService).optional(),
14
+ });
15
+ //# sourceMappingURL=request.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.types.js","sourceRoot":"","sources":["../../../../../src/core/types/auth/request.types.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAmB;AACnB,yCAAuD;AAE1C,QAAA,kBAAkB,GAAG,aAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,MAAM,EAAE,aAAC,CAAC,KAAK,CAAC,aAAC,CAAC,IAAI,CAAC,oBAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,iCAAiC,CAAC;IAC9E,SAAS,EAAE,aAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACrC,OAAO,EAAE,aAAC,CAAC,IAAI,CAAC,oBAAW,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAA"}
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./auth.types"), exports);
17
+ __exportStar(require("./auth"), exports);
18
18
  __exportStar(require("./blockchain"), exports);
19
19
  __exportStar(require("./indexers.types"), exports);
20
20
  __exportStar(require("./misc.types"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,+CAA4B;AAC5B,mDAAgC;AAChC,+CAA4B;AAC5B,2CAAwB;AACxB,gDAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,+CAA4B;AAC5B,mDAAgC;AAChC,+CAA4B;AAC5B,2CAAwB;AACxB,gDAA6B"}
@@ -1,4 +1,4 @@
1
- import { ApiKeyScope, LevrService } from "../prisma";
1
+ import { ApiKeyScope, LevrService } from "../../prisma";
2
2
  export declare enum LevrAuth {
3
3
  PRIVY_USER = "privyUser",
4
4
  PRIVY_ADMIN = "privyAdmin",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.types.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/auth/auth.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEvD,oBAAY,QAAQ;IAChB,UAAU,cAAc;IACxB,WAAW,eAAe;IAC1B,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,YAAY,gBAAgB;CAC/B;AAID,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAIlD,MAAM,WAAW,gBAAgB;IAC7B;;;OAGG;IACH,OAAO,EAAE,QAAQ,EAAE,CAAA;IAEnB;;;OAGG;IACH,cAAc,CAAC,EAAE,WAAW,EAAE,CAAA;IAE9B;;;OAGG;IACH,eAAe,CAAC,EAAE,WAAW,EAAE,CAAA;IAE/B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAClC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.types.js","sourceRoot":"","sources":["../../../../../src/core/types/auth/auth.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAChB,oCAAwB,CAAA;IACxB,sCAA0B,CAAA;IAC1B,qCAAyB,CAAA;IACzB,yBAAa,CAAA;IACb,wCAA4B,CAAA;AAChC,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AAED,4EAA4E;AAC5E,qEAAqE;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from "./auth.types";
2
+ export * from "./request.types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from "./auth.types";
2
+ export * from "./request.types";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/types/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,20 @@
1
+ import z from "zod";
2
+ export declare const createApiKeySchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ scopes: z.ZodArray<z.ZodEnum<{
5
+ Read: "Read";
6
+ Write: "Write";
7
+ }>>;
8
+ expiresAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
9
+ service: z.ZodOptional<z.ZodEnum<{
10
+ Auth: "Auth";
11
+ Orderbook: "Orderbook";
12
+ OracleCore: "OracleCore";
13
+ OraclePeriphery: "OraclePeriphery";
14
+ OracleProcessor: "OracleProcessor";
15
+ Leaderboard: "Leaderboard";
16
+ Lab: "Lab";
17
+ }>>;
18
+ }, z.core.$strip>;
19
+ export type CreateApiKeyInput = z.infer<typeof createApiKeySchema>;
20
+ //# sourceMappingURL=request.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.types.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/auth/request.types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAGnB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;iBAK7B,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import z from "zod";
2
+ import { ApiKeyScope, LevrService } from "../../prisma";
3
+ export const createApiKeySchema = z.object({
4
+ name: z.string().min(1).max(100),
5
+ scopes: z.array(z.enum(ApiKeyScope)).min(1, "At least one scope is required."),
6
+ expiresAt: z.coerce.date().optional(),
7
+ service: z.enum(LevrService).optional(),
8
+ });
9
+ //# sourceMappingURL=request.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.types.js","sourceRoot":"","sources":["../../../../../src/core/types/auth/request.types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,iCAAiC,CAAC;IAC9E,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACrC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- export * from "./auth.types";
1
+ export * from "./auth";
2
2
  export * from "./blockchain";
3
3
  export * from "./indexers.types";
4
4
  export * from "./misc.types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
@@ -1,4 +1,4 @@
1
- export * from "./auth.types";
1
+ export * from "./auth";
2
2
  export * from "./blockchain";
3
3
  export * from "./indexers.types";
4
4
  export * from "./misc.types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levrbet/shared",
3
- "version": "0.1.102",
3
+ "version": "0.1.103",
4
4
  "main": "./dist/cjs/index.js",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.types.js","sourceRoot":"","sources":["../../../../src/core/types/auth.types.ts"],"names":[],"mappings":";;;AAEA,IAAY,QAMX;AAND,WAAY,QAAQ;IAChB,oCAAwB,CAAA;IACxB,sCAA0B,CAAA;IAC1B,qCAAyB,CAAA;IACzB,yBAAa,CAAA;IACb,wCAA4B,CAAA;AAChC,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB;AAED,4EAA4E;AAC5E,qEAAqE;AACxD,QAAA,gBAAgB,GAAG,kBAAkB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.types.d.ts","sourceRoot":"","sources":["../../../../src/core/types/auth.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEpD,oBAAY,QAAQ;IAChB,UAAU,cAAc;IACxB,WAAW,eAAe;IAC1B,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,YAAY,gBAAgB;CAC/B;AAID,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAIlD,MAAM,WAAW,gBAAgB;IAC7B;;;OAGG;IACH,OAAO,EAAE,QAAQ,EAAE,CAAA;IAEnB;;;OAGG;IACH,cAAc,CAAC,EAAE,WAAW,EAAE,CAAA;IAE9B;;;OAGG;IACH,eAAe,CAAC,EAAE,WAAW,EAAE,CAAA;IAE/B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAClC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.types.js","sourceRoot":"","sources":["../../../../src/core/types/auth.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAChB,oCAAwB,CAAA;IACxB,sCAA0B,CAAA;IAC1B,qCAAyB,CAAA;IACzB,yBAAa,CAAA;IACb,wCAA4B,CAAA;AAChC,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AAED,4EAA4E;AAC5E,qEAAqE;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAA"}