@unito/integration-api 0.42.18 → 0.43.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/dist/src/index.cjs +75 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -17
- package/dist/src/types.js +8 -11
- package/package.json +21 -18
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A FieldValueType determines the type of an item's value.
|
|
5
|
+
* The type represents a unique scalar value such as a string or an integer.
|
|
6
|
+
* For more complex types, use an Item instead.
|
|
7
|
+
*/
|
|
8
|
+
exports.FieldValueType = void 0;
|
|
9
|
+
(function (FieldValueType) {
|
|
10
|
+
FieldValueType["BLOB"] = "blob";
|
|
11
|
+
FieldValueType["BOOLEAN"] = "boolean";
|
|
12
|
+
FieldValueType["DATE"] = "date";
|
|
13
|
+
FieldValueType["DATE_RANGE"] = "dateRange";
|
|
14
|
+
FieldValueType["DATETIME"] = "datetime";
|
|
15
|
+
FieldValueType["DATETIME_RANGE"] = "datetimeRange";
|
|
16
|
+
FieldValueType["DURATION"] = "duration";
|
|
17
|
+
FieldValueType["EMAIL"] = "email";
|
|
18
|
+
FieldValueType["RICH_TEXT_HTML"] = "html";
|
|
19
|
+
FieldValueType["INTEGER"] = "integer";
|
|
20
|
+
FieldValueType["RICH_TEXT_MARKDOWN"] = "markdown";
|
|
21
|
+
FieldValueType["NUMBER"] = "number";
|
|
22
|
+
FieldValueType["OBJECT"] = "object";
|
|
23
|
+
FieldValueType["REFERENCE"] = "reference";
|
|
24
|
+
FieldValueType["STRING"] = "string";
|
|
25
|
+
FieldValueType["URL"] = "url";
|
|
26
|
+
})(exports.FieldValueType || (exports.FieldValueType = {}));
|
|
27
|
+
/**
|
|
28
|
+
* A Semantic gives meaning to an Item or a Field in the Unito platform.
|
|
29
|
+
* An object with a specified semantic is expected to hold a certain type of value that can later be used
|
|
30
|
+
* by the consumers of the spec to better understand what that value means.
|
|
31
|
+
*/
|
|
32
|
+
exports.Semantic = void 0;
|
|
33
|
+
(function (Semantic) {
|
|
34
|
+
Semantic["CANONICAL_PATH"] = "canonicalPath";
|
|
35
|
+
Semantic["CREATED_AT"] = "createdAt";
|
|
36
|
+
Semantic["DESCRIPTION"] = "description";
|
|
37
|
+
Semantic["DISPLAY_NAME"] = "displayName";
|
|
38
|
+
Semantic["PROVIDER_URL"] = "providerUrl";
|
|
39
|
+
Semantic["UPDATED_AT"] = "updatedAt";
|
|
40
|
+
Semantic["USER"] = "user";
|
|
41
|
+
})(exports.Semantic || (exports.Semantic = {}));
|
|
42
|
+
/**
|
|
43
|
+
* An OperatorType represents an operator used in a filter.
|
|
44
|
+
*/
|
|
45
|
+
exports.OperatorType = void 0;
|
|
46
|
+
(function (OperatorType) {
|
|
47
|
+
OperatorType["EQUAL"] = "=";
|
|
48
|
+
OperatorType["NOT_EQUAL"] = "!=";
|
|
49
|
+
OperatorType["GREATER_THAN"] = ">";
|
|
50
|
+
OperatorType["GREATER_THAN_OR_EQUAL"] = ">=";
|
|
51
|
+
OperatorType["LESSER_THAN"] = "<";
|
|
52
|
+
OperatorType["LESSER_THAN_OR_EQUAL"] = "<=";
|
|
53
|
+
OperatorType["INCLUDE"] = "*=";
|
|
54
|
+
OperatorType["EXCLUDE"] = "!*=";
|
|
55
|
+
OperatorType["START_WITH"] = "^=";
|
|
56
|
+
OperatorType["END_WITH"] = "$=";
|
|
57
|
+
OperatorType["IS_NULL"] = "!!";
|
|
58
|
+
OperatorType["IS_NOT_NULL"] = "!";
|
|
59
|
+
})(exports.OperatorType || (exports.OperatorType = {}));
|
|
60
|
+
/**
|
|
61
|
+
* HTTP code returned by the integration
|
|
62
|
+
*/
|
|
63
|
+
exports.StatusCode = void 0;
|
|
64
|
+
(function (StatusCode) {
|
|
65
|
+
StatusCode[StatusCode["OK"] = 200] = "OK";
|
|
66
|
+
StatusCode[StatusCode["CREATED"] = 201] = "CREATED";
|
|
67
|
+
StatusCode[StatusCode["NO_CONTENT"] = 204] = "NO_CONTENT";
|
|
68
|
+
StatusCode[StatusCode["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
|
69
|
+
StatusCode[StatusCode["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
|
|
70
|
+
StatusCode[StatusCode["NOT_FOUND"] = 404] = "NOT_FOUND";
|
|
71
|
+
StatusCode[StatusCode["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
|
|
72
|
+
StatusCode[StatusCode["UNPROCESSABLE_CONTENT"] = 422] = "UNPROCESSABLE_CONTENT";
|
|
73
|
+
StatusCode[StatusCode["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
|
74
|
+
StatusCode[StatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
|
75
|
+
})(exports.StatusCode || (exports.StatusCode = {}));
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './types';
|
|
1
|
+
export * from './types.js';
|
package/dist/src/index.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
1
|
+
export * from './types.js';
|
package/dist/src/types.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StatusCode = exports.OperatorType = exports.Semantic = exports.FieldValueType = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* A FieldValueType determines the type of an item's value.
|
|
6
3
|
* The type represents a unique scalar value such as a string or an integer.
|
|
7
4
|
* For more complex types, use an Item instead.
|
|
8
5
|
*/
|
|
9
|
-
var FieldValueType;
|
|
6
|
+
export var FieldValueType;
|
|
10
7
|
(function (FieldValueType) {
|
|
11
8
|
FieldValueType["BLOB"] = "blob";
|
|
12
9
|
FieldValueType["BOOLEAN"] = "boolean";
|
|
@@ -24,13 +21,13 @@ var FieldValueType;
|
|
|
24
21
|
FieldValueType["REFERENCE"] = "reference";
|
|
25
22
|
FieldValueType["STRING"] = "string";
|
|
26
23
|
FieldValueType["URL"] = "url";
|
|
27
|
-
})(FieldValueType || (
|
|
24
|
+
})(FieldValueType || (FieldValueType = {}));
|
|
28
25
|
/**
|
|
29
26
|
* A Semantic gives meaning to an Item or a Field in the Unito platform.
|
|
30
27
|
* An object with a specified semantic is expected to hold a certain type of value that can later be used
|
|
31
28
|
* by the consumers of the spec to better understand what that value means.
|
|
32
29
|
*/
|
|
33
|
-
var Semantic;
|
|
30
|
+
export var Semantic;
|
|
34
31
|
(function (Semantic) {
|
|
35
32
|
Semantic["CANONICAL_PATH"] = "canonicalPath";
|
|
36
33
|
Semantic["CREATED_AT"] = "createdAt";
|
|
@@ -39,11 +36,11 @@ var Semantic;
|
|
|
39
36
|
Semantic["PROVIDER_URL"] = "providerUrl";
|
|
40
37
|
Semantic["UPDATED_AT"] = "updatedAt";
|
|
41
38
|
Semantic["USER"] = "user";
|
|
42
|
-
})(Semantic || (
|
|
39
|
+
})(Semantic || (Semantic = {}));
|
|
43
40
|
/**
|
|
44
41
|
* An OperatorType represents an operator used in a filter.
|
|
45
42
|
*/
|
|
46
|
-
var OperatorType;
|
|
43
|
+
export var OperatorType;
|
|
47
44
|
(function (OperatorType) {
|
|
48
45
|
OperatorType["EQUAL"] = "=";
|
|
49
46
|
OperatorType["NOT_EQUAL"] = "!=";
|
|
@@ -57,11 +54,11 @@ var OperatorType;
|
|
|
57
54
|
OperatorType["END_WITH"] = "$=";
|
|
58
55
|
OperatorType["IS_NULL"] = "!!";
|
|
59
56
|
OperatorType["IS_NOT_NULL"] = "!";
|
|
60
|
-
})(OperatorType || (
|
|
57
|
+
})(OperatorType || (OperatorType = {}));
|
|
61
58
|
/**
|
|
62
59
|
* HTTP code returned by the integration
|
|
63
60
|
*/
|
|
64
|
-
var StatusCode;
|
|
61
|
+
export var StatusCode;
|
|
65
62
|
(function (StatusCode) {
|
|
66
63
|
StatusCode[StatusCode["OK"] = 200] = "OK";
|
|
67
64
|
StatusCode[StatusCode["CREATED"] = 201] = "CREATED";
|
|
@@ -73,4 +70,4 @@ var StatusCode;
|
|
|
73
70
|
StatusCode[StatusCode["UNPROCESSABLE_CONTENT"] = 422] = "UNPROCESSABLE_CONTENT";
|
|
74
71
|
StatusCode[StatusCode["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
|
75
72
|
StatusCode[StatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
|
76
|
-
})(StatusCode || (
|
|
73
|
+
})(StatusCode || (StatusCode = {}));
|
package/package.json
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unito/integration-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "The Unito Integration API",
|
|
5
|
-
"type": "
|
|
5
|
+
"type": "module",
|
|
6
|
+
"types": "./dist/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
"./package.json": "./package.json",
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/src/index.js",
|
|
11
|
+
"require": "./dist/src/index.cjs"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/src/**/*",
|
|
16
|
+
"dist/schemas/**/*"
|
|
17
|
+
],
|
|
6
18
|
"engines": {
|
|
7
19
|
"node": ">=18",
|
|
8
20
|
"npm": ">=9.5.0"
|
|
@@ -11,9 +23,12 @@
|
|
|
11
23
|
"prepublishOnly": "npm run lint && npm run test",
|
|
12
24
|
"prepare": "npm run compile",
|
|
13
25
|
"lint": "eslint --fix src test --ext .ts && prettier --write src test && npx markdownlint-cli --fix README.md",
|
|
14
|
-
"compile": "tsc
|
|
15
|
-
"
|
|
16
|
-
"
|
|
26
|
+
"compile:esm": "tsc",
|
|
27
|
+
"compile:cjs": "rollup dist/src/index.js --file dist/src/index.cjs --format cjs",
|
|
28
|
+
"compile:schemas": "mkdir -p dist/schemas && cp schemas/*.json dist/schemas/",
|
|
29
|
+
"compile": "rm -rf dist && npm run compile:esm && npm run compile:cjs && npm run compile:schemas",
|
|
30
|
+
"test": "NODE_ENV=test node --loader ts-node/esm --test ./test/*.test.ts",
|
|
31
|
+
"test:debug": "NODE_ENV=test node --loader ts-node/esm --inspect-brk --test ./test/*.test.ts",
|
|
17
32
|
"ci:test": "nyc npm run test",
|
|
18
33
|
"ci:lint": "npx markdownlint-cli README.md"
|
|
19
34
|
},
|
|
@@ -31,27 +46,15 @@
|
|
|
31
46
|
"integrations",
|
|
32
47
|
"connectors"
|
|
33
48
|
],
|
|
34
|
-
"main": "dist/src/index.js",
|
|
35
|
-
"files": [
|
|
36
|
-
"dist/src/**/*",
|
|
37
|
-
"dist/schemas/**/*"
|
|
38
|
-
],
|
|
39
|
-
"dependencies": {},
|
|
40
49
|
"devDependencies": {
|
|
41
|
-
"@types/chai": "4.x",
|
|
42
|
-
"@types/sinon": "10.x",
|
|
43
|
-
"@types/mocha": "10.x",
|
|
44
50
|
"@types/node": "18.x",
|
|
45
51
|
"@typescript-eslint/eslint-plugin": "6.x",
|
|
46
52
|
"@typescript-eslint/parser": "6.x",
|
|
47
|
-
"chai": "4.x",
|
|
48
|
-
"sinon": "16.x",
|
|
49
53
|
"eslint": "8.x",
|
|
50
54
|
"markdownlint-cli": "0.x",
|
|
51
|
-
"mocha": "10.x",
|
|
52
55
|
"nyc": "15.x",
|
|
53
56
|
"prettier": "3.x",
|
|
54
|
-
"
|
|
57
|
+
"rollup": "4.x",
|
|
55
58
|
"ts-node": "10.x",
|
|
56
59
|
"typescript": "5.x"
|
|
57
60
|
}
|