@elasticpath/component-test-framework 1.0.16 → 1.0.18

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.
@@ -18,9 +18,16 @@ export interface V3Response {
18
18
  relationships?: any;
19
19
  errors?: Array<Error>;
20
20
  }
21
+ export interface ApiLinks {
22
+ next: string | null;
23
+ prev: string | null;
24
+ first: string;
25
+ last: string | null;
26
+ }
21
27
  export interface ApiResponse {
22
28
  status: number;
23
29
  data: V2Response | V3Response;
30
+ links?: ApiLinks;
24
31
  }
25
32
  interface V2Payload {
26
33
  [key: string]: any;
@@ -1 +1 @@
1
- {"version":3,"file":"api.interfaces.js","sourceRoot":"","sources":["../src/api.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface Error {\n status: string\n title: string\n detail: string\n}\n\nexport interface V2Response {\n id: string\n type: string\n [key: string]: any\n errors?: Array<any> // V2 has inconsistant error responses\n}\n\nexport interface V3Response {\n id: string\n type: string\n attributes: {\n [key: string]: any\n }\n relationships?: any\n errors?: Array<Error>\n}\n\nexport interface ApiResponse {\n status: number\n data: V2Response | V3Response\n}\n\ninterface V2Payload {\n [key: string]: any\n}\n\ninterface V3Payload {\n id?: string\n type?: string\n attributes: {\n [key: string]: string\n }\n}\n\nexport interface ApiArrayResponse {\n status: number\n data: Array<V2Response> | Array<V3Response>\n}\n\nexport interface ApiPayload {\n data: V2Payload | V3Payload\n}\n"]}
1
+ {"version":3,"file":"api.interfaces.js","sourceRoot":"","sources":["../src/api.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface Error {\n status: string\n title: string\n detail: string\n}\n\nexport interface V2Response {\n id: string\n type: string\n [key: string]: any\n errors?: Array<any> // V2 has inconsistant error responses\n}\n\nexport interface V3Response {\n id: string\n type: string\n attributes: {\n [key: string]: any\n }\n relationships?: any\n errors?: Array<Error>\n}\n\nexport interface ApiLinks {\n next: string | null\n prev: string | null\n first: string\n last: string | null\n}\n\nexport interface ApiResponse {\n status: number\n data: V2Response | V3Response\n links?: ApiLinks\n}\n\ninterface V2Payload {\n [key: string]: any\n}\n\ninterface V3Payload {\n id?: string\n type?: string\n attributes: {\n [key: string]: string\n }\n}\n\nexport interface ApiArrayResponse {\n status: number\n data: Array<V2Response> | Array<V3Response>\n}\n\nexport interface ApiPayload {\n data: V2Payload | V3Payload\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -3,5 +3,5 @@ import MongoDB from './mongodb';
3
3
  import Payload from './payload';
4
4
  import ResourceStore from './resource_store';
5
5
  import { Resource } from './resource';
6
- import { V2Response, V3Response } from './api.interfaces';
7
- export { Api, MongoDB, Payload, Resource, ResourceStore, V2Response, V3Response };
6
+ import { ApiResponse, V2Response, V3Response } from './api.interfaces';
7
+ export { Api, ApiResponse, MongoDB, Payload, Resource, ResourceStore, V2Response, V3Response };
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAAuB;AAOd,cAPF,aAAG,CAOE;AANZ,uCAA+B;AAMjB,kBANP,iBAAO,CAMO;AALrB,uCAA+B;AAKR,kBALhB,iBAAO,CAKgB;AAJ9B,qDAA4C;AAIF,wBAJnC,wBAAa,CAImC;AAHvD,yCAAqC;AAGL,yFAHvB,mBAAQ,OAGuB","sourcesContent":["import Api from './api'\nimport MongoDB from './mongodb'\nimport Payload from './payload'\nimport ResourceStore from './resource_store'\nimport { Resource } from './resource'\nimport { V2Response, V3Response } from './api.interfaces'\n\nexport { Api, MongoDB, Payload, Resource, ResourceStore, V2Response, V3Response }\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAAuB;AAOd,cAPF,aAAG,CAOE;AANZ,uCAA+B;AAMJ,kBANpB,iBAAO,CAMoB;AALlC,uCAA+B;AAKK,kBAL7B,iBAAO,CAK6B;AAJ3C,qDAA4C;AAIW,wBAJhD,wBAAa,CAIgD;AAHpE,yCAAqC;AAGQ,yFAHpC,mBAAQ,OAGoC","sourcesContent":["import Api from './api'\nimport MongoDB from './mongodb'\nimport Payload from './payload'\nimport ResourceStore from './resource_store'\nimport { Resource } from './resource'\nimport { ApiResponse, V2Response, V3Response } from './api.interfaces'\n\nexport { Api, ApiResponse, MongoDB, Payload, Resource, ResourceStore, V2Response, V3Response }\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elasticpath/component-test-framework",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "A framework for component tests written using ts-flow",
5
5
  "main": "./lib/index.js",
6
6
  "directories": {