gap-nodejs-sdk 1.0.585 → 1.0.587

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,5 +1,5 @@
1
1
  import { DataWithMetaResponse, MetaResponse } from "../types";
2
2
  export declare function MetaModel(data: any): MetaResponse;
3
3
  export declare function DataWithMetaModel<T>(response: any, modelFn: Function): DataWithMetaResponse<T>;
4
- export declare function DataAppointmentWithMetaModel<T>(response: any): DataWithMetaResponse<T>;
4
+ export declare function DataAppointmentWithMetaModel<T>(response: any, modelFn: Function): DataWithMetaResponse<T>;
5
5
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../src/models/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAE,YAAY,EAAC,MAAM,UAAU,CAAC;AAE5D,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,GAAG,YAAY,CAOjD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAK9F;AAED,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAKtF"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../src/models/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAE,YAAY,EAAC,MAAM,UAAU,CAAC;AAE5D,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,GAAG,YAAY,CAOjD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAK9F;AAED,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAKzG"}
@@ -14,10 +14,10 @@ export function DataWithMetaModel(response, modelFn) {
14
14
  _meta: MetaModel((_d = (_c = response === null || response === void 0 ? void 0 : response.result) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d._meta)
15
15
  };
16
16
  }
17
- export function DataAppointmentWithMetaModel(response) {
18
- var _a, _b, _c, _d;
17
+ export function DataAppointmentWithMetaModel(response, modelFn) {
18
+ var _a, _b, _c, _d, _e, _f, _g;
19
19
  return {
20
- data: (_b = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.items,
21
- _meta: MetaModel((_d = (_c = response === null || response === void 0 ? void 0 : response.result) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d._meta)
20
+ data: ((_b = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b._meta) ? (((_d = (_c = response === null || response === void 0 ? void 0 : response.result) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.items) || []).map((item) => modelFn(item)) : (_e = response === null || response === void 0 ? void 0 : response.result) === null || _e === void 0 ? void 0 : _e.data,
21
+ _meta: MetaModel((_g = (_f = response === null || response === void 0 ? void 0 : response.result) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g._meta)
22
22
  };
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gap-nodejs-sdk",
3
- "version": "1.0.585",
3
+ "version": "1.0.587",
4
4
  "description": "GCI App Platform Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",