@arv-bedrock/auth-sso 0.4.2 → 1.0.0-dev.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.
@@ -8,6 +8,12 @@ export function setGlobalFetchOptions(options) {
8
8
  RECONNECTION.TIMEOUT = options.timeout;
9
9
  }
10
10
  async function customFetch(url, options = {}) {
11
+ const maxRetries = options.retryCount ?? RECONNECTION.RETRY_COUNT;
12
+ const retryDelay = options.retryDelay ?? RECONNECTION.RETRY_DELAY;
13
+ const timeout = options.timeout ?? RECONNECTION.TIMEOUT;
14
+ delete options.retryCount;
15
+ delete options.retryDelay;
16
+ delete options.timeout;
11
17
  const headers = {
12
18
  ...defaultHeaders,
13
19
  ...options.headers,
@@ -17,9 +23,6 @@ async function customFetch(url, options = {}) {
17
23
  credentials: "include",
18
24
  mode: "cors",
19
25
  };
20
- const maxRetries = options.retryCount ?? RECONNECTION.RETRY_COUNT;
21
- const retryDelay = options.retryDelay ?? RECONNECTION.RETRY_DELAY;
22
- const timeout = options.timeout ?? RECONNECTION.TIMEOUT;
23
26
  let attempt = 0;
24
27
  requestOptions.headers = headers;
25
28
  while (attempt < maxRetries) {
@@ -1 +1,36 @@
1
- export {};
1
+ export var CreateLogUserImportUserReasonEnum;
2
+ (function (CreateLogUserImportUserReasonEnum) {
3
+ CreateLogUserImportUserReasonEnum["DUPLICATE_EMAIL"] = "DUPLICATE_EMAIL";
4
+ CreateLogUserImportUserReasonEnum["DUPLICATE_PHONE_NUMBER"] = "DUPLICATE_PHONE_NUMBER";
5
+ CreateLogUserImportUserReasonEnum["EXISTS_EMAIL"] = "EXISTS_EMAIL";
6
+ CreateLogUserImportUserReasonEnum["EXISTS_PHONE_NUMBER"] = "EXISTS_PHONE_NUMBER";
7
+ CreateLogUserImportUserReasonEnum["PENDING_REGISTER"] = "PENDING_REGISTER";
8
+ CreateLogUserImportUserReasonEnum["LEGACY_EMAIL"] = "LEGACY_EMAIL";
9
+ CreateLogUserImportUserReasonEnum["LEGACY_PHONE_NUMBER"] = "LEGACY_PHONE_NUMBER";
10
+ CreateLogUserImportUserReasonEnum["MISSING_EMAIL"] = "MISSING_EMAIL";
11
+ CreateLogUserImportUserReasonEnum["INVALID_EMAIL"] = "INVALID_EMAIL";
12
+ CreateLogUserImportUserReasonEnum["INVALID_PHONE_NUMBER"] = "INVALID_PHONE_NUMBER";
13
+ CreateLogUserImportUserReasonEnum["INVALID_TITLE"] = "INVALID_TITLE";
14
+ CreateLogUserImportUserReasonEnum["INVALID_FIRST_NAME"] = "INVALID_FIRST_NAME";
15
+ CreateLogUserImportUserReasonEnum["INVALID_LAST_NAME"] = "INVALID_LAST_NAME";
16
+ CreateLogUserImportUserReasonEnum["PENDING_INVITE"] = "PENDING_INVITE";
17
+ })(CreateLogUserImportUserReasonEnum || (CreateLogUserImportUserReasonEnum = {}));
18
+ export var UpdateLogUserImportUserReasonEnum;
19
+ (function (UpdateLogUserImportUserReasonEnum) {
20
+ UpdateLogUserImportUserReasonEnum["INVALID_EMAIL"] = "INVALID_EMAIL";
21
+ UpdateLogUserImportUserReasonEnum["EXISTS_EMAIL"] = "EXISTS_EMAIL";
22
+ UpdateLogUserImportUserReasonEnum["EXISTS_PHONE_NUMBER"] = "EXISTS_PHONE_NUMBER";
23
+ UpdateLogUserImportUserReasonEnum["PENDING_REGISTER"] = "PENDING_REGISTER";
24
+ UpdateLogUserImportUserReasonEnum["LEGACY_EMAIL"] = "LEGACY_EMAIL";
25
+ UpdateLogUserImportUserReasonEnum["LEGACY_PHONE_NUMBER"] = "LEGACY_PHONE_NUMBER";
26
+ UpdateLogUserImportUserReasonEnum["NOT_FOUND"] = "NOT_FOUND";
27
+ UpdateLogUserImportUserReasonEnum["INVALID_PHONE_NUMBER"] = "INVALID_PHONE_NUMBER";
28
+ UpdateLogUserImportUserReasonEnum["INVALID_TITLE"] = "INVALID_TITLE";
29
+ UpdateLogUserImportUserReasonEnum["INVALID_FIRST_NAME"] = "INVALID_FIRST_NAME";
30
+ UpdateLogUserImportUserReasonEnum["INVALID_LAST_NAME"] = "INVALID_LAST_NAME";
31
+ UpdateLogUserImportUserReasonEnum["INTERNAL_ERROR"] = "INTERNAL_ERROR";
32
+ })(UpdateLogUserImportUserReasonEnum || (UpdateLogUserImportUserReasonEnum = {}));
33
+ export var DeleteLogUserImportResultReasonEnum;
34
+ (function (DeleteLogUserImportResultReasonEnum) {
35
+ DeleteLogUserImportResultReasonEnum["NOT_FOUND"] = "NOT_FOUND";
36
+ })(DeleteLogUserImportResultReasonEnum || (DeleteLogUserImportResultReasonEnum = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arv-bedrock/auth-sso",
3
- "version": "0.4.2",
3
+ "version": "1.0.0-dev.1",
4
4
  "main": "./dist/cjs/index.js",
5
5
  "types": "./dist/cjs/types/index.d.ts",
6
6
  "scripts": {
@@ -11,14 +11,12 @@
11
11
  "prepack": "npm run build",
12
12
  "prepublish": "npm run build",
13
13
  "test": "echo \"Error: no test specified\" && exit 1",
14
- "semantic-release": "semantic-release"
14
+ "semantic-release": "semantic-release",
15
+ "test:local": "jest --runInBand --detectOpenHandles"
15
16
  },
16
17
  "keywords": [],
17
18
  "author": "",
18
19
  "license": "ISC",
19
- "dependencies": {
20
- "typescript": "4.9.4"
21
- },
22
20
  "exports": {
23
21
  ".": {
24
22
  "import": {
@@ -36,14 +34,40 @@
36
34
  ],
37
35
  "devDependencies": {
38
36
  "@semantic-release/changelog": "^6.0.3",
39
- "@semantic-release/commit-analyzer": "^13.0.1",
40
37
  "@semantic-release/git": "^10.0.1",
41
38
  "@semantic-release/gitlab": "^9.5.1",
42
39
  "@semantic-release/npm": "^9.0.2",
40
+ "@types/jest": "^30.0.0",
43
41
  "@types/node": "^18.11.9",
44
- "conventional-changelog-conventionalcommits": "^9.1.0",
42
+ "cross-fetch": "^4.1.0",
45
43
  "cz-conventional-changelog": "^3.3.0",
44
+ "jest": "^30.2.0",
45
+ "jest-environment-jsdom": "^30.2.0",
46
+ "jsdom": "^27.0.0",
46
47
  "semantic-release": "^20.0.2",
47
- "tcs": "^10.0.2"
48
+ "ts-jest": "^29.4.4",
49
+ "typescript": "^4.9.4"
50
+ },
51
+ "jest": {
52
+ "testTimeout": 15000,
53
+ "moduleFileExtensions": [
54
+ "js",
55
+ "json",
56
+ "ts"
57
+ ],
58
+ "testRegex": ".*\\.spec\\.ts$",
59
+ "transform": {
60
+ "^.+\\.(t|j)s$": "ts-jest"
61
+ },
62
+ "testEnvironment": "jsdom",
63
+ "testEnvironmentOptions": {
64
+ "html": "<html lang=\"th\"></html>",
65
+ "url": "http://localhost",
66
+ "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
67
+ },
68
+ "rootDir": ".",
69
+ "setupFilesAfterEnv": [
70
+ "<rootDir>/jest.setup.ts"
71
+ ]
48
72
  }
49
73
  }