@metriport/api-sdk 6.1.3-alpha.0 → 6.1.3-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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=metriport.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metriport.test.d.ts","sourceRoot":"","sources":["../../../../src/devices/client/__tests__/metriport.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
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
+ const jest_mock_1 = require("jest-mock");
7
+ const axios_1 = __importDefault(require("axios"));
8
+ const metriport_1 = require("../metriport");
9
+ const faker_1 = require("@faker-js/faker");
10
+ jest.mock("axios");
11
+ describe("getMetriportUserId", () => {
12
+ const userId = faker_1.faker.string.uuid();
13
+ const apiKey = faker_1.faker.string.uuid();
14
+ const mockedAxios = (0, jest_mock_1.mocked)(axios_1.default);
15
+ it("returns the userId", async () => {
16
+ const metriportClient = new metriport_1.MetriportDevicesApi(apiKey);
17
+ metriportClient["api"] = mockedAxios;
18
+ jest.spyOn(metriportClient, "getMetriportUserId");
19
+ mockedAxios.post.mockResolvedValueOnce({ data: { userId } });
20
+ const result = await metriportClient.getMetriportUserId(userId);
21
+ expect(mockedAxios.post).toHaveBeenCalledTimes(1);
22
+ expect(axios_1.default.post).toHaveBeenCalledWith(`/user`, null, { params: { appUserId: userId } });
23
+ expect(result).toEqual(userId);
24
+ });
25
+ });
26
+ //# sourceMappingURL=metriport.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metriport.test.js","sourceRoot":"","sources":["../../../../src/devices/client/__tests__/metriport.test.ts"],"names":[],"mappings":";;;;;AAAA,yCAAmC;AACnC,kDAA0B;AAC1B,4CAAmD;AACnD,2CAAwC;AAExC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAEnB,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,MAAM,MAAM,GAAG,aAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,aAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,WAAW,GAAG,IAAA,kBAAM,EAAC,eAAK,CAAC,CAAC;IAElC,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;QAClC,MAAM,eAAe,GAAG,IAAI,+BAAmB,CAAC,MAAM,CAAC,CAAC;QAExD,eAAe,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC;QAErC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC;QAElD,WAAW,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAE7D,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAEhE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAClD,MAAM,CAAC,eAAK,CAAC,IAAI,CAAC,CAAC,oBAAoB,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAC1F,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metriport/api-sdk",
3
- "version": "6.1.3-alpha.0",
3
+ "version": "6.1.3-alpha.1",
4
4
  "description": "Metriport helps you access and manage health and medical data, through a single open source API.",
5
5
  "author": "Metriport Inc. <contact@metriport.com>",
6
6
  "homepage": "https://metriport.com/",
@@ -44,7 +44,7 @@
44
44
  "lint": "npx eslint . --ext .ts",
45
45
  "lint-fix": "npm run lint --fix",
46
46
  "prettier-fix": "npx prettier '**/*.ts' --write",
47
- "test": "echo \"No test specified yet\""
47
+ "test": "jest --runInBand --detectOpenHandles --passWithNoTests"
48
48
  },
49
49
  "repository": {
50
50
  "url": "https://github.com/metriport/metriport.git",
@@ -55,20 +55,22 @@
55
55
  "url": "https://github.com/metriport/metriport/issues"
56
56
  },
57
57
  "dependencies": {
58
- "@metriport/commonwell-sdk": "^4.5.3-alpha.0",
58
+ "@metriport/commonwell-sdk": "^4.5.3-alpha.1",
59
59
  "axios": "^1.3.4",
60
60
  "dayjs": "^1.11.7",
61
- "zod": "^3.20.2"
61
+ "zod": "^3.22.1"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@tsconfig/recommended": "^1.0.2",
65
+ "@types/jest": "29.5.3",
65
66
  "@typescript-eslint/eslint-plugin": "^5.48.2",
66
67
  "@typescript-eslint/parser": "^5.48.2",
67
68
  "eslint": "^8.32.0",
68
69
  "eslint-config-prettier": "^8.6.0",
69
70
  "prettier": "^2.8.3",
70
71
  "ts-essentials": "^9.3.1",
72
+ "ts-jest": "29.1.1",
71
73
  "typescript": "^4.9.5"
72
74
  },
73
- "gitHead": "f9ae43459b1d2384aa0bf0f371785a4c597905eb"
75
+ "gitHead": "0d37e2320cb8a8e1872c8884771d979ead58774d"
74
76
  }