@unito/integration-api 8.0.6 → 8.0.7
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,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/createItemResponsePayload.schema.json",
|
|
3
|
+
"title": "CreateItemResponsePayload",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["path", "canonicalPath"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"path": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"format": "uri-reference",
|
|
11
|
+
"pattern": "^\/.*$"
|
|
12
|
+
},
|
|
13
|
+
"fields": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": true
|
|
16
|
+
},
|
|
17
|
+
"relations": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "uri-reference",
|
|
22
|
+
"pattern": "^\/.*$"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"requestSchema": {
|
|
26
|
+
"$ref": "https://unito.io/integration_api/requestSchema.schema.json"
|
|
27
|
+
},
|
|
28
|
+
"canonicalPath": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"errors": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["source", "code", "message"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"source": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"code": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"message": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"details": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": true
|
|
50
|
+
},
|
|
51
|
+
"originalError": {
|
|
52
|
+
"$ref": "https://unito.io/integration_api/error.schema.json"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://unito.io/integration_api/updateItemResponsePayload.schema.json",
|
|
3
|
+
"title": "UpdateItemResponsePayload",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["fields", "relations", "canonicalPath"],
|
|
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
|
+
"canonicalPath": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"errors": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["source", "code", "message"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"source": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"code": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"message": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"details": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": true
|
|
40
|
+
},
|
|
41
|
+
"originalError": {
|
|
42
|
+
"$ref": "https://unito.io/integration_api/error.schema.json"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -407,7 +407,7 @@ export declare const fieldTypeCompatibilityMatrix: {
|
|
|
407
407
|
readonly richText: {};
|
|
408
408
|
readonly html: {};
|
|
409
409
|
readonly markdown: {};
|
|
410
|
-
readonly string:
|
|
410
|
+
readonly string: {};
|
|
411
411
|
readonly url: null;
|
|
412
412
|
};
|
|
413
413
|
readonly html: {
|
|
@@ -570,7 +570,7 @@ export declare const fieldTypeCompatibilityMatrix: {
|
|
|
570
570
|
readonly required: true;
|
|
571
571
|
};
|
|
572
572
|
};
|
|
573
|
-
readonly richText:
|
|
573
|
+
readonly richText: {};
|
|
574
574
|
readonly html: {};
|
|
575
575
|
readonly markdown: {};
|
|
576
576
|
readonly string: {};
|
|
@@ -349,7 +349,7 @@ export const fieldTypeCompatibilityMatrix = {
|
|
|
349
349
|
[Api.FieldValueTypes.RICH_TEXT]: {},
|
|
350
350
|
[Api.FieldValueTypes.RICH_TEXT_HTML]: {},
|
|
351
351
|
[Api.FieldValueTypes.RICH_TEXT_MARKDOWN]: {},
|
|
352
|
-
[Api.FieldValueTypes.STRING]:
|
|
352
|
+
[Api.FieldValueTypes.STRING]: {},
|
|
353
353
|
[Api.FieldValueTypes.URL]: null,
|
|
354
354
|
},
|
|
355
355
|
[Api.FieldValueTypes.RICH_TEXT_HTML]: {
|
|
@@ -403,7 +403,7 @@ export const fieldTypeCompatibilityMatrix = {
|
|
|
403
403
|
[Api.FieldValueTypes.NUMBER]: {},
|
|
404
404
|
[Api.FieldValueTypes.OBJECT]: null,
|
|
405
405
|
[Api.FieldValueTypes.REFERENCE]: stringLikeToReferenceConfiguration,
|
|
406
|
-
[Api.FieldValueTypes.RICH_TEXT]:
|
|
406
|
+
[Api.FieldValueTypes.RICH_TEXT]: {},
|
|
407
407
|
[Api.FieldValueTypes.RICH_TEXT_HTML]: {},
|
|
408
408
|
[Api.FieldValueTypes.RICH_TEXT_MARKDOWN]: {},
|
|
409
409
|
[Api.FieldValueTypes.STRING]: {},
|
package/dist/src/index.cjs
CHANGED
|
@@ -628,7 +628,7 @@ const fieldTypeCompatibilityMatrix = {
|
|
|
628
628
|
[FieldValueTypes.RICH_TEXT]: {},
|
|
629
629
|
[FieldValueTypes.RICH_TEXT_HTML]: {},
|
|
630
630
|
[FieldValueTypes.RICH_TEXT_MARKDOWN]: {},
|
|
631
|
-
[FieldValueTypes.STRING]:
|
|
631
|
+
[FieldValueTypes.STRING]: {},
|
|
632
632
|
[FieldValueTypes.URL]: null,
|
|
633
633
|
},
|
|
634
634
|
[FieldValueTypes.RICH_TEXT_HTML]: {
|
|
@@ -682,7 +682,7 @@ const fieldTypeCompatibilityMatrix = {
|
|
|
682
682
|
[FieldValueTypes.NUMBER]: {},
|
|
683
683
|
[FieldValueTypes.OBJECT]: null,
|
|
684
684
|
[FieldValueTypes.REFERENCE]: stringLikeToReferenceConfiguration,
|
|
685
|
-
[FieldValueTypes.RICH_TEXT]:
|
|
685
|
+
[FieldValueTypes.RICH_TEXT]: {},
|
|
686
686
|
[FieldValueTypes.RICH_TEXT_HTML]: {},
|
|
687
687
|
[FieldValueTypes.RICH_TEXT_MARKDOWN]: {},
|
|
688
688
|
[FieldValueTypes.STRING]: {},
|
package/dist/src/types.d.ts
CHANGED
|
@@ -536,6 +536,31 @@ export type UpdateItemRequestPayload = CreateItemRequestPayload & {
|
|
|
536
536
|
};
|
|
537
537
|
};
|
|
538
538
|
};
|
|
539
|
+
/**
|
|
540
|
+
* Describes a field the integration accepted in the request body but did not send to,
|
|
541
|
+
* or that was not successfully accepted by, the provider. Reported alongside a 2xx
|
|
542
|
+
* response so the caller knows the resource was created/updated but the listed
|
|
543
|
+
* locations were dropped.
|
|
544
|
+
*/
|
|
545
|
+
export type FieldError = Error & {
|
|
546
|
+
/**
|
|
547
|
+
* JSONPath query (dot/bracket notation) locating the problematic field on the request body.
|
|
548
|
+
* e.g. "name", "customFields.priority", "tags[0]"
|
|
549
|
+
*/
|
|
550
|
+
source: string;
|
|
551
|
+
};
|
|
552
|
+
/**
|
|
553
|
+
* A CreateItemResponsePayload describes the shape of a response from an item creation endpoint.
|
|
554
|
+
*/
|
|
555
|
+
export type CreateItemResponsePayload<T extends RelationSchema | undefined = undefined> = ItemSummary<T> & {
|
|
556
|
+
errors?: FieldError[];
|
|
557
|
+
};
|
|
558
|
+
/**
|
|
559
|
+
* An UpdateItemResponsePayload describes the shape of a response from an item update endpoint.
|
|
560
|
+
*/
|
|
561
|
+
export type UpdateItemResponsePayload<T extends RelationSchema | undefined = undefined> = Item<T> & {
|
|
562
|
+
errors?: FieldError[];
|
|
563
|
+
};
|
|
539
564
|
/**
|
|
540
565
|
* A Request Schema describes how a path should be accessed.
|
|
541
566
|
*/
|