@spotto/contract 0.2.5-alpha.0 → 0.2.5-alpha.1

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,3 +1,4 @@
1
1
  export * from './constants';
2
2
  export * from './download';
3
3
  export * from './get';
4
+ export * from './post';
@@ -13,4 +13,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./constants"), exports);
14
14
  __exportStar(require("./download"), exports);
15
15
  __exportStar(require("./get"), exports);
16
+ __exportStar(require("./post"), exports);
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAC5B,6CAA2B;AAC3B,wCAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAC5B,6CAA2B;AAC3B,wCAAsB;AACtB,yCAAuB"}
@@ -0,0 +1,13 @@
1
+ declare type SearchEntity = 'assets' | 'locations' | 'readers';
2
+ export interface PostSearchEventRequest {
3
+ term: string;
4
+ entity: SearchEntity;
5
+ }
6
+ export declare const postSearchEventRequestSchema: import("joi").ObjectSchema<PostSearchEventRequest>;
7
+ export declare const validatePostSearchEventRequest: (payload: any) => PostSearchEventRequest;
8
+ export interface PostSearchEventResponse {
9
+ success: boolean;
10
+ }
11
+ export declare const postSearchEventResponseSchema: import("joi").ObjectSchema<PostSearchEventResponse>;
12
+ export declare const validatePostSearchEventResponse: (payload: any) => PostSearchEventResponse;
13
+ export {};
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validatePostSearchEventResponse = exports.postSearchEventResponseSchema = exports.validatePostSearchEventRequest = exports.postSearchEventRequestSchema = void 0;
4
+ const joi_1 = require("joi");
5
+ const shared_1 = require("../shared");
6
+ exports.postSearchEventRequestSchema = joi_1.object({
7
+ term: shared_1.xString,
8
+ entity: shared_1.xStringIsOneOf('assets', 'locations', 'readers'),
9
+ });
10
+ const validatePostSearchEventRequest = (payload) => shared_1.validateJoiSchema(exports.postSearchEventRequestSchema, payload);
11
+ exports.validatePostSearchEventRequest = validatePostSearchEventRequest;
12
+ exports.postSearchEventResponseSchema = joi_1.object({
13
+ success: shared_1.xBool,
14
+ });
15
+ const validatePostSearchEventResponse = (payload) => shared_1.validateJoiSchema(exports.postSearchEventResponseSchema, payload);
16
+ exports.validatePostSearchEventResponse = validatePostSearchEventResponse;
17
+ //# sourceMappingURL=post.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"post.js","sourceRoot":"","sources":["../../../src/types/events/post.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,sCAA8E;AAYjE,QAAA,4BAA4B,GAAG,YAAM,CAAyB;IACzE,IAAI,EAAE,gBAAO;IACb,MAAM,EAAE,uBAAc,CAAC,QAAQ,EAAE,WAAW,EAAE,SAAS,CAAC;CACzD,CAAC,CAAC;AAEI,MAAM,8BAA8B,GAAG,CAAC,OAAY,EAAE,EAAE,CAC7D,0BAAiB,CACf,oCAA4B,EAC5B,OAAO,CACR,CAAC;AAJS,QAAA,8BAA8B,kCAIvC;AAMS,QAAA,6BAA6B,GAAG,YAAM,CAA0B;IAC3E,OAAO,EAAE,cAAK;CACf,CAAC,CAAC;AAEI,MAAM,+BAA+B,GAAG,CAAC,OAAY,EAAE,EAAE,CAC9D,0BAAiB,CACf,qCAA6B,EAC7B,OAAO,CACR,CAAC;AAJS,QAAA,+BAA+B,mCAIxC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotto/contract",
3
3
  "license": "ISC",
4
- "version": "0.2.5-alpha.0",
4
+ "version": "0.2.5-alpha.1",
5
5
  "description": "Spotto's API Contract",
6
6
  "main": "./dist/index.js",
7
7
  "files": [
@@ -26,5 +26,5 @@
26
26
  "jest": "^26.6.3",
27
27
  "ts-jest": "^26.5.3"
28
28
  },
29
- "gitHead": "f20e4c17e8ac1df0045f734302c91a99983f50c3"
29
+ "gitHead": "8757600c362138ef64e76655e293b114972a8954"
30
30
  }