@unito/integration-api 0.42.17
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/LICENSE +3 -0
- package/README.md +10 -0
- package/dist/schemas/collection.json +24 -0
- package/dist/schemas/credentialAccount.json +25 -0
- package/dist/schemas/definitions.json +46 -0
- package/dist/schemas/error.json +22 -0
- package/dist/schemas/fieldSchema.json +103 -0
- package/dist/schemas/item.json +19 -0
- package/dist/schemas/itemSummary.json +21 -0
- package/dist/schemas/relation.json +35 -0
- package/dist/schemas/relationSchema.json +35 -0
- package/dist/schemas/relationSummary.json +24 -0
- package/dist/schemas/requestSchema.json +15 -0
- package/dist/schemas/statusCode.json +17 -0
- package/dist/schemas/webhookAcknowledgeResponsePayload.json +21 -0
- package/dist/schemas/webhookParseRequestPayload.json +24 -0
- package/dist/schemas/webhookParseResponsePayload.json +17 -0
- package/dist/schemas/webhookParsedItem.json +34 -0
- package/dist/schemas/webhookSubscriptionRequestPayload.json +23 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +17 -0
- package/dist/src/types.d.ts +423 -0
- package/dist/src/types.js +76 -0
- package/package.json +58 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Copyright (c) Unito, Inc.
|
|
2
|
+
|
|
3
|
+
This repository is a component of the Unito Software Development Kit (SDK). By downloading, installing, accessing, or using any part of the Unito SDK, including this repository, you signify your acceptance of and agree to be bound by the terms of the Unito Software Development Kit Agreement found at https://unito.io/sdk-agreement/. If you do not agree to the terms of the Unito Software Development Kit Agreement, you are not authorized to download, install, access, or use any part of the Unito SDK, including this repository.
|
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/collection.schema.json",
|
|
3
|
+
"title": "Collection",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["info", "data"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"info": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"properties": {
|
|
12
|
+
"nextPage": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"data": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"$ref": "https://unito.io/integration_api/itemSummary.schema.json"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/credentialAccount.schema.json",
|
|
3
|
+
"title": "CredentialAccount",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["id", "displayName", "emails"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"displayName": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"partition": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"emails": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "email"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/definitions.schema.json",
|
|
3
|
+
"$defs": {
|
|
4
|
+
"fieldValueType": {
|
|
5
|
+
"$id": "FieldValueType",
|
|
6
|
+
"type": "string",
|
|
7
|
+
"enum": [
|
|
8
|
+
"blob",
|
|
9
|
+
"boolean",
|
|
10
|
+
"date",
|
|
11
|
+
"dateRange",
|
|
12
|
+
"datetime",
|
|
13
|
+
"datetimeRange",
|
|
14
|
+
"duration",
|
|
15
|
+
"email",
|
|
16
|
+
"html",
|
|
17
|
+
"integer",
|
|
18
|
+
"markdown",
|
|
19
|
+
"number",
|
|
20
|
+
"object",
|
|
21
|
+
"reference",
|
|
22
|
+
"string",
|
|
23
|
+
"url"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"semantic": {
|
|
27
|
+
"$id": "Semantic",
|
|
28
|
+
"type": ["string", "null"],
|
|
29
|
+
"enum": [
|
|
30
|
+
"canonicalPath",
|
|
31
|
+
"createdAt",
|
|
32
|
+
"description",
|
|
33
|
+
"displayName",
|
|
34
|
+
"providerUrl",
|
|
35
|
+
"updatedAt",
|
|
36
|
+
"user",
|
|
37
|
+
null
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"operatorType": {
|
|
41
|
+
"$id": "OperatorType",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": ["=", "!=", ">", ">=", "<", "<=", "*=", "!*=", "^=", "$=", "!!", "!"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/error.schema.json",
|
|
3
|
+
"title": "Error",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["code", "message"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"code": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"message": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"details": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": true
|
|
17
|
+
},
|
|
18
|
+
"originalError": {
|
|
19
|
+
"$ref": "https://unito.io/integration_api/error.schema.json"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/fieldSchema.schema.json",
|
|
3
|
+
"title": "FieldSchema",
|
|
4
|
+
"allOf": [
|
|
5
|
+
{
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "type", "label"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[a-zA-Z0-9_-]*$",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 100
|
|
15
|
+
},
|
|
16
|
+
"type": {
|
|
17
|
+
"$ref": "https://unito.io/integration_api/definitions.schema.json#/$defs/fieldValueType"
|
|
18
|
+
},
|
|
19
|
+
"label": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"maxLength": 100
|
|
23
|
+
},
|
|
24
|
+
"category": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"maxLength": 100
|
|
28
|
+
},
|
|
29
|
+
"semantic": {
|
|
30
|
+
"$ref": "https://unito.io/integration_api/definitions.schema.json#/$defs/semantic"
|
|
31
|
+
},
|
|
32
|
+
"fields": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"$ref": "https://unito.io/integration_api/fieldSchema.schema.json"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"optionalValues": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"required": ["label", "value"],
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"properties": {
|
|
45
|
+
"label": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"minLength": 1,
|
|
48
|
+
"maxLength": 100
|
|
49
|
+
},
|
|
50
|
+
"value": {
|
|
51
|
+
"anyOf": [{ "type": ["string"] }, { "type": ["number"] }]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"referencePath": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"format": "uri-reference",
|
|
59
|
+
"pattern": "^\/.*$"
|
|
60
|
+
},
|
|
61
|
+
"info": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"readOnly": {
|
|
65
|
+
"type": "boolean"
|
|
66
|
+
},
|
|
67
|
+
"isArray": {
|
|
68
|
+
"type": "boolean"
|
|
69
|
+
},
|
|
70
|
+
"nullable": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"default": true
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"if": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"properties": {
|
|
80
|
+
"type": { "const": "reference" }
|
|
81
|
+
},
|
|
82
|
+
"required": ["type"]
|
|
83
|
+
},
|
|
84
|
+
"then": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"required": ["fields", "referencePath"]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"if": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"properties": {
|
|
93
|
+
"type": { "const": "object" }
|
|
94
|
+
},
|
|
95
|
+
"required": ["type"]
|
|
96
|
+
},
|
|
97
|
+
"then": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"required": ["fields"]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/item.schema.json",
|
|
3
|
+
"title": "Item",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["fields", "relations"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"fields": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": true
|
|
11
|
+
},
|
|
12
|
+
"relations": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"$ref": "https://unito.io/integration_api/relation.schema.json"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/itemSummary.schema.json",
|
|
3
|
+
"title": "ItemSummary",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["path"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"path": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"format": "uri-reference",
|
|
11
|
+
"pattern": "^\/.*$"
|
|
12
|
+
},
|
|
13
|
+
"fields": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": true
|
|
16
|
+
},
|
|
17
|
+
"requestSchema": {
|
|
18
|
+
"$ref": "https://unito.io/integration_api/requestSchema.schema.json"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/relation.schema.json",
|
|
3
|
+
"title": "Relation",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"unito": true,
|
|
7
|
+
"required": ["name", "path", "schema", "label"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"pattern": "^[a-zA-Z0-9_-]*$",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"maxLength": 100
|
|
14
|
+
},
|
|
15
|
+
"path": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "uri-reference",
|
|
18
|
+
"pattern": "^\/.*$"
|
|
19
|
+
},
|
|
20
|
+
"requestSchema": {
|
|
21
|
+
"$ref": "https://unito.io/integration_api/requestSchema.schema.json"
|
|
22
|
+
},
|
|
23
|
+
"label": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"maxLength": 100
|
|
27
|
+
},
|
|
28
|
+
"searchable": {
|
|
29
|
+
"type": "boolean"
|
|
30
|
+
},
|
|
31
|
+
"schema": {
|
|
32
|
+
"$ref": "https://unito.io/integration_api/relationSchema.schema.json"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/relationSchema.schema.json",
|
|
3
|
+
"title": "RelationSchema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["fields", "label"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"label": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"minLength": 1,
|
|
11
|
+
"maxLength": 100
|
|
12
|
+
},
|
|
13
|
+
"canCreateItem": {
|
|
14
|
+
"type": "boolean"
|
|
15
|
+
},
|
|
16
|
+
"canUpdateItem": {
|
|
17
|
+
"type": "boolean"
|
|
18
|
+
},
|
|
19
|
+
"canDeleteItem": {
|
|
20
|
+
"type": "boolean"
|
|
21
|
+
},
|
|
22
|
+
"fields": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"$ref": "https://unito.io/integration_api/fieldSchema.schema.json"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"relations": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"$ref": "https://unito.io/integration_api/relationSummary.schema.json"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/relationSummary.schema.json",
|
|
3
|
+
"title": "RelationSummary",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"unito": true,
|
|
7
|
+
"required": ["name", "schema", "label"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"pattern": "^[a-zA-Z0-9_-]*$",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"maxLength": 100
|
|
14
|
+
},
|
|
15
|
+
"label": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1,
|
|
18
|
+
"maxLength": 100
|
|
19
|
+
},
|
|
20
|
+
"schema": {
|
|
21
|
+
"$ref": "https://unito.io/integration_api/relationSchema.schema.json"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/requestSchema.schema.json",
|
|
3
|
+
"title": "RequestSchema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["parameters"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"$ref": "https://unito.io/integration_api/fieldSchema.schema.json"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/webhookAcknowledgeResponsePayload.schema.json",
|
|
3
|
+
"title": "WebhookAcknowledgeResponsePayload",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["statusCode"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"statusCode": {
|
|
9
|
+
"type": "number"
|
|
10
|
+
},
|
|
11
|
+
"headers": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"payload": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/webhookParseRequestPayload.schema.json",
|
|
3
|
+
"title": "WebhookParseRequestPayload",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["headers", "payload"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"partition": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"headers": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"payload": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"url": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/webhookParseResponsePayload.schema.json",
|
|
3
|
+
"title": "WebhookParseResponsePayload",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "https://unito.io/integration_api/webhookParsedItem.schema.json"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"$ref": "https://unito.io/integration_api/webhookParsedItem.schema.json"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/webhookParsedItem.schema.json",
|
|
3
|
+
"title": "WebhookParsedItem",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"properties": {
|
|
7
|
+
"itemPath": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"date": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"impactedRelations": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["name", "impactedItems"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"name": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"nullable": false
|
|
22
|
+
},
|
|
23
|
+
"impactedItems": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"nullable": false,
|
|
26
|
+
"items": {
|
|
27
|
+
"$ref": "https://unito.io/integration_api/webhookParsedItem.schema.json"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/webhookSubscriptionPayload.schema.json",
|
|
3
|
+
"title": "WebhookSubscriptionPayload",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["itemPath", "targetUrl", "action"],
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"itemPath": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"targetURL": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"format": "uri"
|
|
14
|
+
},
|
|
15
|
+
"action": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": [
|
|
18
|
+
"start",
|
|
19
|
+
"stop"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
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);
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Collection represents a paginated list of ItemSummary available through a Relation.
|
|
3
|
+
*/
|
|
4
|
+
export interface Collection {
|
|
5
|
+
/**
|
|
6
|
+
* Contextual information.
|
|
7
|
+
*/
|
|
8
|
+
info: {
|
|
9
|
+
/**
|
|
10
|
+
* Link to the next page.
|
|
11
|
+
*/
|
|
12
|
+
nextPage?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* List of item summaries.
|
|
16
|
+
*/
|
|
17
|
+
data: ItemSummary[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A CredentialAccount describes the provider account associated to a credential.
|
|
21
|
+
*/
|
|
22
|
+
export interface CredentialAccount {
|
|
23
|
+
/**
|
|
24
|
+
* The native id of the provider account.
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* The display name of the provider account.
|
|
29
|
+
*/
|
|
30
|
+
displayName: string;
|
|
31
|
+
/**
|
|
32
|
+
* The emails associated with the provider account.
|
|
33
|
+
*/
|
|
34
|
+
emails: string[];
|
|
35
|
+
/**
|
|
36
|
+
* Partition can be used to divide data into different buckets.
|
|
37
|
+
*/
|
|
38
|
+
partition?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* An error is used when an operation doesn't succeed.
|
|
42
|
+
*/
|
|
43
|
+
export interface Error {
|
|
44
|
+
/**
|
|
45
|
+
* Specific error code. Usually the HTTP response code.
|
|
46
|
+
*/
|
|
47
|
+
code: string;
|
|
48
|
+
/**
|
|
49
|
+
* Raw error message.
|
|
50
|
+
*/
|
|
51
|
+
message: string;
|
|
52
|
+
/**
|
|
53
|
+
* Free-form key-value store. For logging/debugging purposes.
|
|
54
|
+
*/
|
|
55
|
+
details?: {
|
|
56
|
+
[k: string]: unknown;
|
|
57
|
+
};
|
|
58
|
+
originalError?: Error;
|
|
59
|
+
}
|
|
60
|
+
interface AbstractFieldSchema {
|
|
61
|
+
/**
|
|
62
|
+
* The main identifier of the field.
|
|
63
|
+
*/
|
|
64
|
+
name: string;
|
|
65
|
+
/**
|
|
66
|
+
* The publicly visible label of the field.
|
|
67
|
+
*/
|
|
68
|
+
label: string;
|
|
69
|
+
/**
|
|
70
|
+
* The semantic of the field.
|
|
71
|
+
*/
|
|
72
|
+
semantic?: Semantic;
|
|
73
|
+
/**
|
|
74
|
+
* Description of the field. For information purposes only.
|
|
75
|
+
*/
|
|
76
|
+
info?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Category of the field. Used to group fields together when displayed.
|
|
79
|
+
*/
|
|
80
|
+
category?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Whether the field is read only.
|
|
83
|
+
*/
|
|
84
|
+
readOnly?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the field returns an array. Defaults to false.
|
|
87
|
+
* An array is a non-paginated list of same-type values.
|
|
88
|
+
* For pagination, use a relation instead.
|
|
89
|
+
*/
|
|
90
|
+
isArray?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Whether the field can be empty. Default to true.
|
|
93
|
+
*/
|
|
94
|
+
nullable?: boolean;
|
|
95
|
+
}
|
|
96
|
+
export interface BasicFieldSchema extends AbstractFieldSchema {
|
|
97
|
+
/**
|
|
98
|
+
* The type of the field.
|
|
99
|
+
*/
|
|
100
|
+
type: Exclude<FieldValueType, FieldValueType.REFERENCE | FieldValueType.OBJECT | FieldValueType.DATETIME_RANGE | FieldValueType.DATE_RANGE>;
|
|
101
|
+
}
|
|
102
|
+
export interface ReferenceFieldSchema extends AbstractFieldSchema {
|
|
103
|
+
/**
|
|
104
|
+
* The type of the field.
|
|
105
|
+
*/
|
|
106
|
+
type: FieldValueType.REFERENCE;
|
|
107
|
+
/**
|
|
108
|
+
* Specify the source collection.
|
|
109
|
+
*/
|
|
110
|
+
referencePath: string;
|
|
111
|
+
/**
|
|
112
|
+
* Describe the schema of the referenced collection.
|
|
113
|
+
*/
|
|
114
|
+
fields: FieldSchema[];
|
|
115
|
+
}
|
|
116
|
+
export interface DatetimeRangeFieldSchema extends AbstractFieldSchema {
|
|
117
|
+
/**
|
|
118
|
+
* The type of the field.
|
|
119
|
+
*/
|
|
120
|
+
type: FieldValueType.DATETIME_RANGE;
|
|
121
|
+
/**
|
|
122
|
+
* Optional values that can be used in lieu of actual dates. They should represent points in time relative to today.
|
|
123
|
+
* e.g. [{ label: 'Yesterday', value: 'yesterday' }, ...]
|
|
124
|
+
* These values become valid input for either end of the datetime range.
|
|
125
|
+
* e.g. "2023-11-01T08:15:30.000-05:00/yesterday"
|
|
126
|
+
*/
|
|
127
|
+
optionalValues?: {
|
|
128
|
+
label: string;
|
|
129
|
+
value: string;
|
|
130
|
+
}[];
|
|
131
|
+
}
|
|
132
|
+
export interface DateRangeFieldSchema extends AbstractFieldSchema {
|
|
133
|
+
/**
|
|
134
|
+
* The type of the field.
|
|
135
|
+
*/
|
|
136
|
+
type: FieldValueType.DATE_RANGE;
|
|
137
|
+
/**
|
|
138
|
+
* Optional values that can be used in lieu of actual dates. They should represent points in time relative to today.
|
|
139
|
+
* e.g. [{ label: 'Yesterday', value: 'yesterday' }, ...]
|
|
140
|
+
* When defined, the name of these fields becomes valid inputs for both startDatetime and endDatetime.
|
|
141
|
+
* e.g. "2023-11-01/yesterday"
|
|
142
|
+
*/
|
|
143
|
+
optionalValues?: {
|
|
144
|
+
label: string;
|
|
145
|
+
value: string;
|
|
146
|
+
}[];
|
|
147
|
+
}
|
|
148
|
+
export interface ObjectFieldSchema extends AbstractFieldSchema {
|
|
149
|
+
/**
|
|
150
|
+
* The type of the field.
|
|
151
|
+
*/
|
|
152
|
+
type: FieldValueType.OBJECT;
|
|
153
|
+
/**
|
|
154
|
+
* Describe the schema of the object.
|
|
155
|
+
*/
|
|
156
|
+
fields: FieldSchema[];
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* A FieldSchema describes the shape of a field.
|
|
160
|
+
*/
|
|
161
|
+
export type FieldSchema = BasicFieldSchema | ReferenceFieldSchema | ObjectFieldSchema | DateRangeFieldSchema | DatetimeRangeFieldSchema;
|
|
162
|
+
/**
|
|
163
|
+
* A FieldValueType determines the type of an item's value.
|
|
164
|
+
* The type represents a unique scalar value such as a string or an integer.
|
|
165
|
+
* For more complex types, use an Item instead.
|
|
166
|
+
*/
|
|
167
|
+
export declare enum FieldValueType {
|
|
168
|
+
BLOB = "blob",
|
|
169
|
+
BOOLEAN = "boolean",
|
|
170
|
+
DATE = "date",
|
|
171
|
+
DATE_RANGE = "dateRange",
|
|
172
|
+
DATETIME = "datetime",
|
|
173
|
+
DATETIME_RANGE = "datetimeRange",
|
|
174
|
+
DURATION = "duration",
|
|
175
|
+
EMAIL = "email",
|
|
176
|
+
RICH_TEXT_HTML = "html",
|
|
177
|
+
INTEGER = "integer",
|
|
178
|
+
RICH_TEXT_MARKDOWN = "markdown",
|
|
179
|
+
NUMBER = "number",
|
|
180
|
+
OBJECT = "object",
|
|
181
|
+
REFERENCE = "reference",
|
|
182
|
+
STRING = "string",
|
|
183
|
+
URL = "url"
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* A Semantic gives meaning to an Item or a Field in the Unito platform.
|
|
187
|
+
* An object with a specified semantic is expected to hold a certain type of value that can later be used
|
|
188
|
+
* by the consumers of the spec to better understand what that value means.
|
|
189
|
+
*/
|
|
190
|
+
export declare enum Semantic {
|
|
191
|
+
CANONICAL_PATH = "canonicalPath",
|
|
192
|
+
CREATED_AT = "createdAt",
|
|
193
|
+
DESCRIPTION = "description",
|
|
194
|
+
DISPLAY_NAME = "displayName",
|
|
195
|
+
PROVIDER_URL = "providerUrl",
|
|
196
|
+
UPDATED_AT = "updatedAt",
|
|
197
|
+
USER = "user"
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* An OperatorType represents an operator used in a filter.
|
|
201
|
+
*/
|
|
202
|
+
export declare enum OperatorType {
|
|
203
|
+
EQUAL = "=",
|
|
204
|
+
NOT_EQUAL = "!=",
|
|
205
|
+
GREATER_THAN = ">",
|
|
206
|
+
GREATER_THAN_OR_EQUAL = ">=",
|
|
207
|
+
LESSER_THAN = "<",
|
|
208
|
+
LESSER_THAN_OR_EQUAL = "<=",
|
|
209
|
+
INCLUDE = "*=",
|
|
210
|
+
EXCLUDE = "!*=",
|
|
211
|
+
START_WITH = "^=",
|
|
212
|
+
END_WITH = "$=",
|
|
213
|
+
IS_NULL = "!!",
|
|
214
|
+
IS_NOT_NULL = "!"
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* An Item represents a syncable entity. It has fields of its own as well as relations to other items.
|
|
218
|
+
*/
|
|
219
|
+
export interface Item {
|
|
220
|
+
/**
|
|
221
|
+
* The fields and values of the item.
|
|
222
|
+
*/
|
|
223
|
+
fields: {
|
|
224
|
+
[k: string]: unknown;
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* The relations of the item
|
|
228
|
+
*/
|
|
229
|
+
relations: Relation[];
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* An ItemSummary is a constituent of a collection.
|
|
233
|
+
* It links to an item, and can contain additional item information upon request.
|
|
234
|
+
*/
|
|
235
|
+
export interface ItemSummary {
|
|
236
|
+
/**
|
|
237
|
+
* Link to this specific item.
|
|
238
|
+
*/
|
|
239
|
+
path: string;
|
|
240
|
+
/**
|
|
241
|
+
* Optional list of requested fields and their values.
|
|
242
|
+
*/
|
|
243
|
+
fields?: {
|
|
244
|
+
[k: string]: unknown;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* The shape of the request parameters.
|
|
248
|
+
*/
|
|
249
|
+
requestSchema?: RequestSchema;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* A Relation points to a Collection and describes the shape of the items it contains.
|
|
253
|
+
*/
|
|
254
|
+
export interface Relation {
|
|
255
|
+
/**
|
|
256
|
+
* The main identifier of the relation.
|
|
257
|
+
*/
|
|
258
|
+
name: string;
|
|
259
|
+
/**
|
|
260
|
+
* The path at which the relation data is available.
|
|
261
|
+
*/
|
|
262
|
+
path: string;
|
|
263
|
+
/**
|
|
264
|
+
* The shape of the request parameters.
|
|
265
|
+
*/
|
|
266
|
+
requestSchema?: RequestSchema;
|
|
267
|
+
/**
|
|
268
|
+
* The publicly visible label of the relation.
|
|
269
|
+
*/
|
|
270
|
+
label: string;
|
|
271
|
+
/**
|
|
272
|
+
* Whether the relation is searchable.
|
|
273
|
+
*/
|
|
274
|
+
searchable?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* The shape of the relation.
|
|
277
|
+
*/
|
|
278
|
+
schema: RelationSchema;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* A summary of a relation.
|
|
282
|
+
*/
|
|
283
|
+
export type RelationSummary = Pick<Relation, 'name' | 'label' | 'schema'>;
|
|
284
|
+
/**
|
|
285
|
+
* A Relation Schema describes the shape of an item in a relation.
|
|
286
|
+
*/
|
|
287
|
+
export interface RelationSchema {
|
|
288
|
+
/**
|
|
289
|
+
* The publicly visible label of one item in this relation.
|
|
290
|
+
*/
|
|
291
|
+
label: string;
|
|
292
|
+
/**
|
|
293
|
+
* Can we create items?
|
|
294
|
+
*/
|
|
295
|
+
canCreateItem?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Can we update items?
|
|
298
|
+
*/
|
|
299
|
+
canUpdateItem?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Can we delete items?
|
|
302
|
+
*/
|
|
303
|
+
canDeleteItem?: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* The shape of the fields.
|
|
306
|
+
*/
|
|
307
|
+
fields: FieldSchema[];
|
|
308
|
+
/**
|
|
309
|
+
* Summaries of the relations expected to be found on these items.
|
|
310
|
+
*/
|
|
311
|
+
relations?: RelationSummary[];
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* A Request Schema describes how a path should be accessed.
|
|
315
|
+
*/
|
|
316
|
+
export interface RequestSchema {
|
|
317
|
+
/**
|
|
318
|
+
* The shape of the request parameters.
|
|
319
|
+
*/
|
|
320
|
+
parameters: FieldSchema[];
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* HTTP code returned by the integration
|
|
324
|
+
*/
|
|
325
|
+
export declare enum StatusCode {
|
|
326
|
+
OK = 200,
|
|
327
|
+
CREATED = 201,
|
|
328
|
+
NO_CONTENT = 204,
|
|
329
|
+
BAD_REQUEST = 400,
|
|
330
|
+
UNAUTHORIZED = 401,
|
|
331
|
+
NOT_FOUND = 404,
|
|
332
|
+
REQUEST_TIMEOUT = 408,
|
|
333
|
+
UNPROCESSABLE_CONTENT = 422,
|
|
334
|
+
TOO_MANY_REQUESTS = 429,
|
|
335
|
+
INTERNAL_SERVER_ERROR = 500
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* A WebhookSubscriptionPayload describes the shape of the request on the "webhook subscription" endpoint.
|
|
339
|
+
*/
|
|
340
|
+
export interface WebhookSubscriptionRequestPayload {
|
|
341
|
+
/**
|
|
342
|
+
* The path of the item to which the subscription belongs
|
|
343
|
+
*/
|
|
344
|
+
itemPath: string;
|
|
345
|
+
/**
|
|
346
|
+
* The target URL at which events should be sent
|
|
347
|
+
*/
|
|
348
|
+
targetUrl: string;
|
|
349
|
+
/**
|
|
350
|
+
* The desired action to be applied to the subscription
|
|
351
|
+
*/
|
|
352
|
+
action: 'start' | 'stop';
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* A WebhookParseRequestPayload describes the shape of the request on the "parse webhook" endpoint.
|
|
356
|
+
*/
|
|
357
|
+
export interface WebhookParseRequestPayload {
|
|
358
|
+
/**
|
|
359
|
+
* The partition data for which this webhook was received.
|
|
360
|
+
*/
|
|
361
|
+
partition?: string;
|
|
362
|
+
/**
|
|
363
|
+
* The raw headers sent by the provider.
|
|
364
|
+
*/
|
|
365
|
+
headers: Record<string, string | string[]>;
|
|
366
|
+
/**
|
|
367
|
+
* The raw payload sent by the provider.
|
|
368
|
+
*/
|
|
369
|
+
payload: string;
|
|
370
|
+
/**
|
|
371
|
+
* The full URL, including query params, as sent by the provider
|
|
372
|
+
*/
|
|
373
|
+
url: string;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* A WebhookAcknowledgeResponsePayload describes the shape of the request on the "acknowledge webhook" endpoint.
|
|
377
|
+
*/
|
|
378
|
+
export interface WebhookAcknowledgeResponsePayload {
|
|
379
|
+
/**
|
|
380
|
+
* The status code that should be returned to the provider.
|
|
381
|
+
*/
|
|
382
|
+
statusCode: number;
|
|
383
|
+
/**
|
|
384
|
+
* The headers that should be returned to the provider.
|
|
385
|
+
*/
|
|
386
|
+
headers?: Record<string, string | string[]>;
|
|
387
|
+
/**
|
|
388
|
+
* The payload that should be returned to the provider.
|
|
389
|
+
*/
|
|
390
|
+
payload?: string;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* A WebhookParsedItem describes the shape an item found within a webhook's parsed payload.
|
|
394
|
+
*/
|
|
395
|
+
export interface WebhookParsedItem {
|
|
396
|
+
/**
|
|
397
|
+
* The path of the item targetted by this event.
|
|
398
|
+
*/
|
|
399
|
+
itemPath: string;
|
|
400
|
+
/**
|
|
401
|
+
* The date at which the event took place, expressed as an ISO 8601 string.
|
|
402
|
+
* e.g "2023-11-05T08:15:30.000-05:00"
|
|
403
|
+
*/
|
|
404
|
+
date: string;
|
|
405
|
+
/**
|
|
406
|
+
* The item's relations impacted by this event.
|
|
407
|
+
*/
|
|
408
|
+
impactedRelations: {
|
|
409
|
+
/**
|
|
410
|
+
* The name of the relation.
|
|
411
|
+
*/
|
|
412
|
+
name: string;
|
|
413
|
+
/**
|
|
414
|
+
* The list of specific items impacted by this event.
|
|
415
|
+
*/
|
|
416
|
+
impactedItems: WebhookParsedItem[];
|
|
417
|
+
}[];
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* A WebhookParseResponsePayload describes the shape of the response on the "parse webhook" endpoint.
|
|
421
|
+
*/
|
|
422
|
+
export type WebhookParseResponsePayload = WebhookParsedItem | WebhookParsedItem[];
|
|
423
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusCode = exports.OperatorType = exports.Semantic = exports.FieldValueType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* A FieldValueType determines the type of an item's value.
|
|
6
|
+
* The type represents a unique scalar value such as a string or an integer.
|
|
7
|
+
* For more complex types, use an Item instead.
|
|
8
|
+
*/
|
|
9
|
+
var FieldValueType;
|
|
10
|
+
(function (FieldValueType) {
|
|
11
|
+
FieldValueType["BLOB"] = "blob";
|
|
12
|
+
FieldValueType["BOOLEAN"] = "boolean";
|
|
13
|
+
FieldValueType["DATE"] = "date";
|
|
14
|
+
FieldValueType["DATE_RANGE"] = "dateRange";
|
|
15
|
+
FieldValueType["DATETIME"] = "datetime";
|
|
16
|
+
FieldValueType["DATETIME_RANGE"] = "datetimeRange";
|
|
17
|
+
FieldValueType["DURATION"] = "duration";
|
|
18
|
+
FieldValueType["EMAIL"] = "email";
|
|
19
|
+
FieldValueType["RICH_TEXT_HTML"] = "html";
|
|
20
|
+
FieldValueType["INTEGER"] = "integer";
|
|
21
|
+
FieldValueType["RICH_TEXT_MARKDOWN"] = "markdown";
|
|
22
|
+
FieldValueType["NUMBER"] = "number";
|
|
23
|
+
FieldValueType["OBJECT"] = "object";
|
|
24
|
+
FieldValueType["REFERENCE"] = "reference";
|
|
25
|
+
FieldValueType["STRING"] = "string";
|
|
26
|
+
FieldValueType["URL"] = "url";
|
|
27
|
+
})(FieldValueType || (exports.FieldValueType = FieldValueType = {}));
|
|
28
|
+
/**
|
|
29
|
+
* A Semantic gives meaning to an Item or a Field in the Unito platform.
|
|
30
|
+
* An object with a specified semantic is expected to hold a certain type of value that can later be used
|
|
31
|
+
* by the consumers of the spec to better understand what that value means.
|
|
32
|
+
*/
|
|
33
|
+
var Semantic;
|
|
34
|
+
(function (Semantic) {
|
|
35
|
+
Semantic["CANONICAL_PATH"] = "canonicalPath";
|
|
36
|
+
Semantic["CREATED_AT"] = "createdAt";
|
|
37
|
+
Semantic["DESCRIPTION"] = "description";
|
|
38
|
+
Semantic["DISPLAY_NAME"] = "displayName";
|
|
39
|
+
Semantic["PROVIDER_URL"] = "providerUrl";
|
|
40
|
+
Semantic["UPDATED_AT"] = "updatedAt";
|
|
41
|
+
Semantic["USER"] = "user";
|
|
42
|
+
})(Semantic || (exports.Semantic = Semantic = {}));
|
|
43
|
+
/**
|
|
44
|
+
* An OperatorType represents an operator used in a filter.
|
|
45
|
+
*/
|
|
46
|
+
var OperatorType;
|
|
47
|
+
(function (OperatorType) {
|
|
48
|
+
OperatorType["EQUAL"] = "=";
|
|
49
|
+
OperatorType["NOT_EQUAL"] = "!=";
|
|
50
|
+
OperatorType["GREATER_THAN"] = ">";
|
|
51
|
+
OperatorType["GREATER_THAN_OR_EQUAL"] = ">=";
|
|
52
|
+
OperatorType["LESSER_THAN"] = "<";
|
|
53
|
+
OperatorType["LESSER_THAN_OR_EQUAL"] = "<=";
|
|
54
|
+
OperatorType["INCLUDE"] = "*=";
|
|
55
|
+
OperatorType["EXCLUDE"] = "!*=";
|
|
56
|
+
OperatorType["START_WITH"] = "^=";
|
|
57
|
+
OperatorType["END_WITH"] = "$=";
|
|
58
|
+
OperatorType["IS_NULL"] = "!!";
|
|
59
|
+
OperatorType["IS_NOT_NULL"] = "!";
|
|
60
|
+
})(OperatorType || (exports.OperatorType = OperatorType = {}));
|
|
61
|
+
/**
|
|
62
|
+
* HTTP code returned by the integration
|
|
63
|
+
*/
|
|
64
|
+
var StatusCode;
|
|
65
|
+
(function (StatusCode) {
|
|
66
|
+
StatusCode[StatusCode["OK"] = 200] = "OK";
|
|
67
|
+
StatusCode[StatusCode["CREATED"] = 201] = "CREATED";
|
|
68
|
+
StatusCode[StatusCode["NO_CONTENT"] = 204] = "NO_CONTENT";
|
|
69
|
+
StatusCode[StatusCode["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
|
70
|
+
StatusCode[StatusCode["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
|
|
71
|
+
StatusCode[StatusCode["NOT_FOUND"] = 404] = "NOT_FOUND";
|
|
72
|
+
StatusCode[StatusCode["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
|
|
73
|
+
StatusCode[StatusCode["UNPROCESSABLE_CONTENT"] = 422] = "UNPROCESSABLE_CONTENT";
|
|
74
|
+
StatusCode[StatusCode["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
|
75
|
+
StatusCode[StatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
|
76
|
+
})(StatusCode || (exports.StatusCode = StatusCode = {}));
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@unito/integration-api",
|
|
3
|
+
"version": "0.42.17",
|
|
4
|
+
"description": "The Unito Integration API",
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=18",
|
|
8
|
+
"npm": ">=9.5.0"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"prepublishOnly": "npm run lint && npm run test",
|
|
12
|
+
"prepare": "npm run compile",
|
|
13
|
+
"lint": "eslint --fix src test --ext .ts && prettier --write src test && npx markdownlint-cli --fix README.md",
|
|
14
|
+
"compile": "tsc && mkdir -p dist/schemas && cp schemas/*.json dist/schemas/",
|
|
15
|
+
"test": "NODE_ENV=test ts-mocha -p tsconfig.json \"test/**/*.test.ts\"",
|
|
16
|
+
"test:debug": "NODE_ENV=test ts-mocha -p tsconfig.json --inspect-brk \"test/**/*.test.ts\"",
|
|
17
|
+
"ci:test": "nyc npm run test",
|
|
18
|
+
"ci:lint": "npx markdownlint-cli README.md"
|
|
19
|
+
},
|
|
20
|
+
"author": {
|
|
21
|
+
"name": "Unito",
|
|
22
|
+
"email": "hello@unito.io"
|
|
23
|
+
},
|
|
24
|
+
"license": "LicenseRef-LICENSE",
|
|
25
|
+
"keywords": [
|
|
26
|
+
"typescript",
|
|
27
|
+
"unito",
|
|
28
|
+
"unitoio",
|
|
29
|
+
"unitoinc",
|
|
30
|
+
"sync",
|
|
31
|
+
"integrations",
|
|
32
|
+
"connectors"
|
|
33
|
+
],
|
|
34
|
+
"main": "dist/src/index.js",
|
|
35
|
+
"files": [
|
|
36
|
+
"dist/src/**/*",
|
|
37
|
+
"dist/schemas/**/*"
|
|
38
|
+
],
|
|
39
|
+
"dependencies": {},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/chai": "4.x",
|
|
42
|
+
"@types/sinon": "10.x",
|
|
43
|
+
"@types/mocha": "10.x",
|
|
44
|
+
"@types/node": "18.x",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "6.x",
|
|
46
|
+
"@typescript-eslint/parser": "6.x",
|
|
47
|
+
"chai": "4.x",
|
|
48
|
+
"sinon": "16.x",
|
|
49
|
+
"eslint": "8.x",
|
|
50
|
+
"markdownlint-cli": "0.x",
|
|
51
|
+
"mocha": "10.x",
|
|
52
|
+
"nyc": "15.x",
|
|
53
|
+
"prettier": "3.x",
|
|
54
|
+
"ts-mocha": "10.x",
|
|
55
|
+
"ts-node": "10.x",
|
|
56
|
+
"typescript": "5.x"
|
|
57
|
+
}
|
|
58
|
+
}
|