@or-sdk/idw 7.3.3 → 7.4.0-beta.2761.0
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.
- package/CHANGELOG.md +0 -26
- package/dist/cjs/api/domainApi.js +1 -1
- package/dist/cjs/api/domainApi.js.map +1 -1
- package/dist/cjs/api/slugApi.js +6 -49
- package/dist/cjs/api/slugApi.js.map +1 -1
- package/dist/esm/api/domainApi.js +2 -2
- package/dist/esm/api/domainApi.js.map +1 -1
- package/dist/esm/api/slugApi.js +6 -17
- package/dist/esm/api/slugApi.js.map +1 -1
- package/dist/types/api/slugApi.d.ts +2 -2
- package/dist/types/api/slugApi.d.ts.map +1 -1
- package/package.json +2 -3
- package/src/api/domainApi.ts +2 -2
- package/src/api/slugApi.ts +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,32 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [7.3.3](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/idw@7.3.2...@or-sdk/idw@7.3.3) (2024-05-29)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @or-sdk/idw
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [7.3.2](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/idw@7.3.1...@or-sdk/idw@7.3.2) (2024-05-29)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### Bug Fixes
|
|
18
|
-
|
|
19
|
-
* **idw:** Set the proper response type for slug API ([9719e61](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/9719e61bda4c248d334a0481bb2fe72a9a9fe0d3))
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## [7.3.1](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/idw@7.3.0...@or-sdk/idw@7.3.1) (2024-05-29)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### Bug Fixes
|
|
27
|
-
|
|
28
|
-
* **idw:** Update domain slug query param to be 'id' ([ec2abf2](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/ec2abf2f7370053e4b7f09c721e8c1c2d03f7ddd))
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
6
|
## [7.3.0](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/idw@7.2.6...@or-sdk/idw@7.3.0) (2024-05-28)
|
|
33
7
|
|
|
34
8
|
|
|
@@ -179,7 +179,7 @@ var DomainApi = (function (_super) {
|
|
|
179
179
|
if (error instanceof base_1.AxiosError && ((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 404) {
|
|
180
180
|
return new errors_1.DomainNotFoundError(notFoundMessage, { cause: error });
|
|
181
181
|
}
|
|
182
|
-
if (error
|
|
182
|
+
if (error.cause instanceof base_1.AxiosError && ((_c = error.cause.response) === null || _c === void 0 ? void 0 : _c.status) === 404) {
|
|
183
183
|
return new errors_1.DomainNotFoundError(notFoundMessage, { cause: error.cause });
|
|
184
184
|
}
|
|
185
185
|
if (error instanceof base_1.AxiosError) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domainApi.js","sourceRoot":"","sources":["../../../src/api/domainApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"domainApi.js","sourceRoot":"","sources":["../../../src/api/domainApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAkE;AAQlE,qCAAoC;AACpC,mCAA4D;AAE5D;IAA+B,6BAAO;IACpC,mBAAY,MAAqB;QAC/B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A,MAAA,KAAK,CAAC,KAAK,CAAC,QAAQ,0CAAE,MAAM,MAAK,GAAG,EAAE,CAAC;YAC9E,OAAO,IAAI,4BAAmB,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1E,CAAC;QACD,IAAI,KAAK,YAAY,iBAAU,EAAE,CAAC;YAChC,OAAO,IAAI,oBAAW,CAAC,IAAA,6BAAsB,EAAC,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IACH,gBAAC;AAAD,CAAC,AAvHD,CAA+B,iBAAO,GAuHrC;AAvHY,8BAAS"}
|
package/dist/cjs/api/slugApi.js
CHANGED
|
@@ -14,42 +14,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
-
switch (op[0]) {
|
|
36
|
-
case 0: case 1: t = op; break;
|
|
37
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
-
default:
|
|
41
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
-
if (t[2]) _.ops.pop();
|
|
46
|
-
_.trys.pop(); continue;
|
|
47
|
-
}
|
|
48
|
-
op = body.call(thisArg, _);
|
|
49
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
18
|
exports.SlugApi = void 0;
|
|
55
19
|
var BaseApi_1 = require("./BaseApi");
|
|
@@ -59,19 +23,12 @@ var SlugApi = (function (_super) {
|
|
|
59
23
|
return _super.call(this, config) || this;
|
|
60
24
|
}
|
|
61
25
|
SlugApi.prototype.getSlug = function (string) {
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
params: {
|
|
69
|
-
string: string,
|
|
70
|
-
},
|
|
71
|
-
})];
|
|
72
|
-
case 1: return [2, _a.sent()];
|
|
73
|
-
}
|
|
74
|
-
});
|
|
26
|
+
return this.providers.makeRequest({
|
|
27
|
+
route: this.buildRoute('slug'),
|
|
28
|
+
method: 'GET',
|
|
29
|
+
params: {
|
|
30
|
+
string: string,
|
|
31
|
+
},
|
|
75
32
|
});
|
|
76
33
|
};
|
|
77
34
|
return SlugApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slugApi.js","sourceRoot":"","sources":["../../../src/api/slugApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slugApi.js","sourceRoot":"","sources":["../../../src/api/slugApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC;IAA6B,2BAAO;IAClC,iBAAY,MAAqB;QAC/B,OAAA,MAAK,YAAC,MAAM,CAAC,SAAC;IAChB,CAAC;IAKD,yBAAO,GAAP,UAAQ,MAAc;QACpB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YAC9B,MAAM,EAAE,KAAK;YACb,MAAM,EAAE;gBACN,MAAM,QAAA;aACP;SACF,CAAC,CAAC;IACL,CAAC;IACH,cAAC;AAAD,CAAC,AAjBD,CAA6B,iBAAO,GAiBnC;AAjBY,0BAAO"}
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { AxiosError,
|
|
10
|
+
import { AxiosError, parseAxiosErrorMessage } from '@or-sdk/base';
|
|
11
11
|
import { BaseApi } from './BaseApi';
|
|
12
12
|
import { DomainError, DomainNotFoundError } from './errors';
|
|
13
13
|
export class DomainApi extends BaseApi {
|
|
@@ -98,7 +98,7 @@ export class DomainApi extends BaseApi {
|
|
|
98
98
|
if (error instanceof AxiosError && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
|
|
99
99
|
return new DomainNotFoundError(notFoundMessage, { cause: error });
|
|
100
100
|
}
|
|
101
|
-
if (error
|
|
101
|
+
if (error.cause instanceof AxiosError && ((_b = error.cause.response) === null || _b === void 0 ? void 0 : _b.status) === 404) {
|
|
102
102
|
return new DomainNotFoundError(notFoundMessage, { cause: error.cause });
|
|
103
103
|
}
|
|
104
104
|
if (error instanceof AxiosError) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domainApi.js","sourceRoot":"","sources":["../../../src/api/domainApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"domainApi.js","sourceRoot":"","sources":["../../../src/api/domainApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAQlE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,OAAO,SAAU,SAAQ,OAAO;IACpC,YAAY,MAAqB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAMY,SAAS,CAAC,IAAY;;YACjC,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAqB;oBACpD,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;oBAChC,MAAM,EAAE;wBACN,EAAE,EAAE,IAAI;qBACT;iBACF,CAAC,CAAC;YACL,CAA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,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
package/dist/esm/api/slugApi.js
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { BaseApi } from './BaseApi';
|
|
11
2
|
export class SlugApi extends BaseApi {
|
|
12
3
|
constructor(config) {
|
|
13
4
|
super(config);
|
|
14
5
|
}
|
|
15
6
|
getSlug(string) {
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
});
|
|
7
|
+
return this.providers.makeRequest({
|
|
8
|
+
route: this.buildRoute('slug'),
|
|
9
|
+
method: 'GET',
|
|
10
|
+
params: {
|
|
11
|
+
string,
|
|
12
|
+
},
|
|
24
13
|
});
|
|
25
14
|
}
|
|
26
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slugApi.js","sourceRoot":"","sources":["../../../src/api/slugApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slugApi.js","sourceRoot":"","sources":["../../../src/api/slugApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,OAAO,OAAQ,SAAQ,OAAO;IAClC,YAAY,MAAqB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAKD,OAAO,CAAC,MAAc;QACpB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YAC9B,MAAM,EAAE,KAAK;YACb,MAAM,EAAE;gBACN,MAAM;aACP;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseApi } from './BaseApi';
|
|
2
|
-
import { IDWBaseConfig } from '../types';
|
|
2
|
+
import { IDWBaseConfig, IdwBaseInfo } from '../types';
|
|
3
3
|
export declare class SlugApi extends BaseApi {
|
|
4
4
|
constructor(config: IDWBaseConfig);
|
|
5
|
-
getSlug(string: string): Promise<
|
|
5
|
+
getSlug(string: string): Promise<IdwBaseInfo>;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=slugApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slugApi.d.ts","sourceRoot":"","sources":["../../../src/api/slugApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"slugApi.d.ts","sourceRoot":"","sources":["../../../src/api/slugApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEtD,qBAAa,OAAQ,SAAQ,OAAO;gBACtB,MAAM,EAAE,aAAa;IAOjC,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAS9C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/idw",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0-beta.2761.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -28,6 +28,5 @@
|
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
|
-
}
|
|
32
|
-
"gitHead": "e170bd26767961f7bafb2af84c022eb41acf4c00"
|
|
31
|
+
}
|
|
33
32
|
}
|
package/src/api/domainApi.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosError,
|
|
1
|
+
import { AxiosError, parseAxiosErrorMessage } from '@or-sdk/base';
|
|
2
2
|
import {
|
|
3
3
|
Domain,
|
|
4
4
|
ListDomains,
|
|
@@ -119,7 +119,7 @@ export class DomainApi extends BaseApi {
|
|
|
119
119
|
if (error instanceof AxiosError && error.response?.status === 404) {
|
|
120
120
|
return new DomainNotFoundError(notFoundMessage, { cause: error });
|
|
121
121
|
}
|
|
122
|
-
if (error
|
|
122
|
+
if (error.cause instanceof AxiosError && error.cause.response?.status === 404) {
|
|
123
123
|
return new DomainNotFoundError(notFoundMessage, { cause: error.cause });
|
|
124
124
|
}
|
|
125
125
|
if (error instanceof AxiosError) {
|
package/src/api/slugApi.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseApi } from './BaseApi';
|
|
2
|
-
import { IDWBaseConfig } from '../types';
|
|
2
|
+
import { IDWBaseConfig, IdwBaseInfo } from '../types';
|
|
3
3
|
|
|
4
4
|
export class SlugApi extends BaseApi {
|
|
5
5
|
constructor(config: IDWBaseConfig) {
|
|
@@ -9,8 +9,8 @@ export class SlugApi extends BaseApi {
|
|
|
9
9
|
/**
|
|
10
10
|
* Get slug for string
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
return
|
|
12
|
+
getSlug(string: string): Promise<IdwBaseInfo> {
|
|
13
|
+
return this.providers.makeRequest({
|
|
14
14
|
route: this.buildRoute('slug'),
|
|
15
15
|
method: 'GET',
|
|
16
16
|
params: {
|