@unito/integration-api 1.0.2 → 1.0.4

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.
@@ -21,11 +21,6 @@
21
21
  "minLength": 1,
22
22
  "maxLength": 100
23
23
  },
24
- "category": {
25
- "type": "string",
26
- "minLength": 1,
27
- "maxLength": 100
28
- },
29
24
  "semantic": {
30
25
  "$ref": "https://unito.io/integration_api/definitions.schema.json#/$defs/semantic"
31
26
  },
@@ -5,87 +5,88 @@
5
5
  * The type represents a unique scalar value such as a string or an integer.
6
6
  * For more complex types, use an Item instead.
7
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 = {}));
8
+ const FieldValueType = {
9
+ BLOB: 'blob',
10
+ BOOLEAN: 'boolean',
11
+ DATE: 'date',
12
+ DATE_RANGE: 'dateRange',
13
+ DATETIME: 'datetime',
14
+ DATETIME_RANGE: 'datetimeRange',
15
+ DURATION: 'duration',
16
+ EMAIL: 'email',
17
+ RICH_TEXT_HTML: 'html',
18
+ INTEGER: 'integer',
19
+ RICH_TEXT_MARKDOWN: 'markdown',
20
+ NUMBER: 'number',
21
+ OBJECT: 'object',
22
+ REFERENCE: 'reference',
23
+ STRING: 'string',
24
+ URL: 'url',
25
+ };
27
26
  /**
28
27
  * A Semantic gives meaning to an Item or a Field in the Unito platform.
29
28
  * An object with a specified semantic is expected to hold a certain type of value that can later be used
30
29
  * by the consumers of the spec to better understand what that value means.
31
30
  */
32
- exports.Semantic = void 0;
33
- (function (Semantic) {
34
- Semantic["CREATED_AT"] = "createdAt";
35
- Semantic["DESCRIPTION"] = "description";
36
- Semantic["DISPLAY_NAME"] = "displayName";
37
- Semantic["PROVIDER_URL"] = "providerUrl";
38
- Semantic["UPDATED_AT"] = "updatedAt";
39
- Semantic["USER"] = "user";
40
- Semantic["PARENT"] = "parent";
41
- })(exports.Semantic || (exports.Semantic = {}));
31
+ const Semantic = {
32
+ CREATED_AT: 'createdAt',
33
+ DESCRIPTION: 'description',
34
+ DISPLAY_NAME: 'displayName',
35
+ PROVIDER_URL: 'providerUrl',
36
+ UPDATED_AT: 'updatedAt',
37
+ USER: 'user',
38
+ PARENT: 'parent',
39
+ };
42
40
  /**
43
41
  * A Relation Semantic gives meaning to a Relation in the Unito platform. A relation with a
44
42
  * specified semantic is expected to hold a certain type of item that can later be used by
45
43
  * the consumers of the spec for specific usage.
46
44
  */
47
- exports.RelationSemantic = void 0;
48
- (function (RelationSemantic) {
49
- RelationSemantic["COMMENTS"] = "comments";
50
- RelationSemantic["SUBTASKS"] = "subtasks";
51
- RelationSemantic["USERS"] = "users";
52
- RelationSemantic["ATTACHMENTS"] = "attachments";
53
- })(exports.RelationSemantic || (exports.RelationSemantic = {}));
45
+ const RelationSemantic = {
46
+ COMMENTS: 'comments',
47
+ SUBTASKS: 'subtasks',
48
+ USERS: 'users',
49
+ ATTACHMENTS: 'attachments',
50
+ };
54
51
  /**
55
52
  * An OperatorType represents an operator used in a filter.
56
53
  */
57
- exports.OperatorType = void 0;
58
- (function (OperatorType) {
59
- OperatorType["EQUAL"] = "=";
60
- OperatorType["NOT_EQUAL"] = "!=";
61
- OperatorType["GREATER_THAN"] = ">";
62
- OperatorType["GREATER_THAN_OR_EQUAL"] = ">=";
63
- OperatorType["LESSER_THAN"] = "<";
64
- OperatorType["LESSER_THAN_OR_EQUAL"] = "<=";
65
- OperatorType["INCLUDE"] = "*=";
66
- OperatorType["EXCLUDE"] = "!*=";
67
- OperatorType["START_WITH"] = "^=";
68
- OperatorType["END_WITH"] = "$=";
69
- OperatorType["IS_NULL"] = "!!";
70
- OperatorType["IS_NOT_NULL"] = "!";
71
- })(exports.OperatorType || (exports.OperatorType = {}));
54
+ const OperatorType = {
55
+ EQUAL: '=',
56
+ NOT_EQUAL: '!=',
57
+ GREATER_THAN: '>',
58
+ GREATER_THAN_OR_EQUAL: '>=',
59
+ LESSER_THAN: '<',
60
+ LESSER_THAN_OR_EQUAL: '<=',
61
+ INCLUDE: '*=',
62
+ EXCLUDE: '!*=',
63
+ START_WITH: '^=',
64
+ END_WITH: '$=',
65
+ IS_NULL: '!!',
66
+ IS_NOT_NULL: '!',
67
+ };
72
68
  /**
73
69
  * HTTP code returned by the integration
74
70
  */
75
- exports.StatusCode = void 0;
76
- (function (StatusCode) {
77
- StatusCode[StatusCode["OK"] = 200] = "OK";
78
- StatusCode[StatusCode["CREATED"] = 201] = "CREATED";
79
- StatusCode[StatusCode["ACCEPTED"] = 202] = "ACCEPTED";
80
- StatusCode[StatusCode["NO_CONTENT"] = 204] = "NO_CONTENT";
81
- StatusCode[StatusCode["BAD_REQUEST"] = 400] = "BAD_REQUEST";
82
- StatusCode[StatusCode["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
83
- StatusCode[StatusCode["FORBIDDEN"] = 403] = "FORBIDDEN";
84
- StatusCode[StatusCode["NOT_FOUND"] = 404] = "NOT_FOUND";
85
- StatusCode[StatusCode["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
86
- StatusCode[StatusCode["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
87
- StatusCode[StatusCode["UNPROCESSABLE_CONTENT"] = 422] = "UNPROCESSABLE_CONTENT";
88
- StatusCode[StatusCode["LOCKED"] = 423] = "LOCKED";
89
- StatusCode[StatusCode["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
90
- StatusCode[StatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
91
- })(exports.StatusCode || (exports.StatusCode = {}));
71
+ const StatusCode = {
72
+ OK: 200,
73
+ CREATED: 201,
74
+ ACCEPTED: 202,
75
+ NO_CONTENT: 204,
76
+ BAD_REQUEST: 400,
77
+ UNAUTHORIZED: 401,
78
+ FORBIDDEN: 403,
79
+ NOT_FOUND: 404,
80
+ NOT_ACCEPTABLE: 406,
81
+ REQUEST_TIMEOUT: 408,
82
+ UNPROCESSABLE_CONTENT: 422,
83
+ LOCKED: 423,
84
+ TOO_MANY_REQUESTS: 429,
85
+ INTERNAL_SERVER_ERROR: 500,
86
+ };
87
+
88
+ exports.FieldValueType = FieldValueType;
89
+ exports.OperatorType = OperatorType;
90
+ exports.RelationSemantic = RelationSemantic;
91
+ exports.Semantic = Semantic;
92
+ exports.StatusCode = StatusCode;
@@ -70,15 +70,11 @@ interface AbstractFieldSchema {
70
70
  /**
71
71
  * The semantic of the field.
72
72
  */
73
- semantic?: Semantic;
73
+ semantic?: (typeof Semantic)[keyof typeof Semantic];
74
74
  /**
75
75
  * Description of the field. For information purposes only.
76
76
  */
77
77
  info?: string;
78
- /**
79
- * Category of the field. Used to group fields together when displayed.
80
- */
81
- category?: string;
82
78
  /**
83
79
  * Whether the field is read only.
84
80
  */
@@ -98,19 +94,19 @@ export interface BasicFieldSchema extends AbstractFieldSchema {
98
94
  /**
99
95
  * The type of the field.
100
96
  */
101
- type: Exclude<FieldValueType, FieldValueType.BLOB | FieldValueType.REFERENCE | FieldValueType.OBJECT | FieldValueType.DATETIME_RANGE | FieldValueType.DATE_RANGE>;
97
+ type: Exclude<(typeof FieldValueType)[keyof typeof FieldValueType], typeof FieldValueType.BLOB | typeof FieldValueType.REFERENCE | typeof FieldValueType.OBJECT | typeof FieldValueType.DATETIME_RANGE | typeof FieldValueType.DATE_RANGE>;
102
98
  }
103
99
  export interface BlobFieldSchema extends AbstractFieldSchema {
104
100
  /**
105
101
  * The type of the field.
106
102
  */
107
- type: FieldValueType.BLOB;
103
+ type: typeof FieldValueType.BLOB;
108
104
  }
109
105
  export interface ReferenceFieldSchema extends AbstractFieldSchema {
110
106
  /**
111
107
  * The type of the field.
112
108
  */
113
- type: FieldValueType.REFERENCE;
109
+ type: typeof FieldValueType.REFERENCE;
114
110
  /**
115
111
  * Describe the referenced collection.
116
112
  */
@@ -120,7 +116,7 @@ export interface DatetimeRangeFieldSchema extends AbstractFieldSchema {
120
116
  /**
121
117
  * The type of the field.
122
118
  */
123
- type: FieldValueType.DATETIME_RANGE;
119
+ type: typeof FieldValueType.DATETIME_RANGE;
124
120
  /**
125
121
  * Optional values that can be used in lieu of actual dates. They should represent points in time relative to today.
126
122
  * e.g. [{ label: 'Yesterday', value: 'yesterday' }, ...]
@@ -136,7 +132,7 @@ export interface DateRangeFieldSchema extends AbstractFieldSchema {
136
132
  /**
137
133
  * The type of the field.
138
134
  */
139
- type: FieldValueType.DATE_RANGE;
135
+ type: typeof FieldValueType.DATE_RANGE;
140
136
  /**
141
137
  * Optional values that can be used in lieu of actual dates. They should represent points in time relative to today.
142
138
  * e.g. [{ label: 'Yesterday', value: 'yesterday' }, ...]
@@ -152,7 +148,7 @@ export interface ObjectFieldSchema extends AbstractFieldSchema {
152
148
  /**
153
149
  * The type of the field.
154
150
  */
155
- type: FieldValueType.OBJECT;
151
+ type: typeof FieldValueType.OBJECT;
156
152
  /**
157
153
  * Describe the schema of the object.
158
154
  */
@@ -167,66 +163,66 @@ export type FieldSchema = BasicFieldSchema | BlobFieldSchema | ReferenceFieldSch
167
163
  * The type represents a unique scalar value such as a string or an integer.
168
164
  * For more complex types, use an Item instead.
169
165
  */
170
- export declare enum FieldValueType {
171
- BLOB = "blob",
172
- BOOLEAN = "boolean",
173
- DATE = "date",
174
- DATE_RANGE = "dateRange",
175
- DATETIME = "datetime",
176
- DATETIME_RANGE = "datetimeRange",
177
- DURATION = "duration",
178
- EMAIL = "email",
179
- RICH_TEXT_HTML = "html",
180
- INTEGER = "integer",
181
- RICH_TEXT_MARKDOWN = "markdown",
182
- NUMBER = "number",
183
- OBJECT = "object",
184
- REFERENCE = "reference",
185
- STRING = "string",
186
- URL = "url"
187
- }
166
+ export declare const FieldValueType: {
167
+ readonly BLOB: "blob";
168
+ readonly BOOLEAN: "boolean";
169
+ readonly DATE: "date";
170
+ readonly DATE_RANGE: "dateRange";
171
+ readonly DATETIME: "datetime";
172
+ readonly DATETIME_RANGE: "datetimeRange";
173
+ readonly DURATION: "duration";
174
+ readonly EMAIL: "email";
175
+ readonly RICH_TEXT_HTML: "html";
176
+ readonly INTEGER: "integer";
177
+ readonly RICH_TEXT_MARKDOWN: "markdown";
178
+ readonly NUMBER: "number";
179
+ readonly OBJECT: "object";
180
+ readonly REFERENCE: "reference";
181
+ readonly STRING: "string";
182
+ readonly URL: "url";
183
+ };
188
184
  /**
189
185
  * A Semantic gives meaning to an Item or a Field in the Unito platform.
190
186
  * An object with a specified semantic is expected to hold a certain type of value that can later be used
191
187
  * by the consumers of the spec to better understand what that value means.
192
188
  */
193
- export declare enum Semantic {
194
- CREATED_AT = "createdAt",
195
- DESCRIPTION = "description",
196
- DISPLAY_NAME = "displayName",
197
- PROVIDER_URL = "providerUrl",
198
- UPDATED_AT = "updatedAt",
199
- USER = "user",
200
- PARENT = "parent"
201
- }
189
+ export declare const Semantic: {
190
+ readonly CREATED_AT: "createdAt";
191
+ readonly DESCRIPTION: "description";
192
+ readonly DISPLAY_NAME: "displayName";
193
+ readonly PROVIDER_URL: "providerUrl";
194
+ readonly UPDATED_AT: "updatedAt";
195
+ readonly USER: "user";
196
+ readonly PARENT: "parent";
197
+ };
202
198
  /**
203
199
  * A Relation Semantic gives meaning to a Relation in the Unito platform. A relation with a
204
200
  * specified semantic is expected to hold a certain type of item that can later be used by
205
201
  * the consumers of the spec for specific usage.
206
202
  */
207
- export declare enum RelationSemantic {
208
- COMMENTS = "comments",
209
- SUBTASKS = "subtasks",
210
- USERS = "users",
211
- ATTACHMENTS = "attachments"
212
- }
203
+ export declare const RelationSemantic: {
204
+ readonly COMMENTS: "comments";
205
+ readonly SUBTASKS: "subtasks";
206
+ readonly USERS: "users";
207
+ readonly ATTACHMENTS: "attachments";
208
+ };
213
209
  /**
214
210
  * An OperatorType represents an operator used in a filter.
215
211
  */
216
- export declare enum OperatorType {
217
- EQUAL = "=",
218
- NOT_EQUAL = "!=",
219
- GREATER_THAN = ">",
220
- GREATER_THAN_OR_EQUAL = ">=",
221
- LESSER_THAN = "<",
222
- LESSER_THAN_OR_EQUAL = "<=",
223
- INCLUDE = "*=",
224
- EXCLUDE = "!*=",
225
- START_WITH = "^=",
226
- END_WITH = "$=",
227
- IS_NULL = "!!",
228
- IS_NOT_NULL = "!"
229
- }
212
+ export declare const OperatorType: {
213
+ readonly EQUAL: "=";
214
+ readonly NOT_EQUAL: "!=";
215
+ readonly GREATER_THAN: ">";
216
+ readonly GREATER_THAN_OR_EQUAL: ">=";
217
+ readonly LESSER_THAN: "<";
218
+ readonly LESSER_THAN_OR_EQUAL: "<=";
219
+ readonly INCLUDE: "*=";
220
+ readonly EXCLUDE: "!*=";
221
+ readonly START_WITH: "^=";
222
+ readonly END_WITH: "$=";
223
+ readonly IS_NULL: "!!";
224
+ readonly IS_NOT_NULL: "!";
225
+ };
230
226
  /**
231
227
  * An Item represents a syncable entity. It has fields of its own as well as relations to other items.
232
228
  */
@@ -314,7 +310,7 @@ export interface Relation {
314
310
  /**
315
311
  * The semantic of the relation.
316
312
  */
317
- semantic?: RelationSemantic;
313
+ semantic?: (typeof RelationSemantic)[keyof typeof RelationSemantic];
318
314
  /**
319
315
  * The shape of the relation.
320
316
  */
@@ -340,7 +336,7 @@ export type RelationSummary = {
340
336
  /**
341
337
  * The semantic of the relation.
342
338
  */
343
- semantic?: RelationSemantic;
339
+ semantic?: (typeof RelationSemantic)[keyof typeof RelationSemantic];
344
340
  /**
345
341
  * The shape of the relation.
346
342
  */
@@ -415,22 +411,22 @@ export interface RequestSchema {
415
411
  /**
416
412
  * HTTP code returned by the integration
417
413
  */
418
- export declare enum StatusCode {
419
- OK = 200,
420
- CREATED = 201,
421
- ACCEPTED = 202,
422
- NO_CONTENT = 204,
423
- BAD_REQUEST = 400,
424
- UNAUTHORIZED = 401,
425
- FORBIDDEN = 403,
426
- NOT_FOUND = 404,
427
- NOT_ACCEPTABLE = 406,
428
- REQUEST_TIMEOUT = 408,
429
- UNPROCESSABLE_CONTENT = 422,
430
- LOCKED = 423,
431
- TOO_MANY_REQUESTS = 429,
432
- INTERNAL_SERVER_ERROR = 500
433
- }
414
+ export declare const StatusCode: {
415
+ readonly OK: 200;
416
+ readonly CREATED: 201;
417
+ readonly ACCEPTED: 202;
418
+ readonly NO_CONTENT: 204;
419
+ readonly BAD_REQUEST: 400;
420
+ readonly UNAUTHORIZED: 401;
421
+ readonly FORBIDDEN: 403;
422
+ readonly NOT_FOUND: 404;
423
+ readonly NOT_ACCEPTABLE: 406;
424
+ readonly REQUEST_TIMEOUT: 408;
425
+ readonly UNPROCESSABLE_CONTENT: 422;
426
+ readonly LOCKED: 423;
427
+ readonly TOO_MANY_REQUESTS: 429;
428
+ readonly INTERNAL_SERVER_ERROR: 500;
429
+ };
434
430
  /**
435
431
  * A WebhookSubscriptionPayload describes the shape of the request on the "webhook subscription" endpoint.
436
432
  */
package/dist/src/types.js CHANGED
@@ -3,87 +3,82 @@
3
3
  * The type represents a unique scalar value such as a string or an integer.
4
4
  * For more complex types, use an Item instead.
5
5
  */
6
- export var FieldValueType;
7
- (function (FieldValueType) {
8
- FieldValueType["BLOB"] = "blob";
9
- FieldValueType["BOOLEAN"] = "boolean";
10
- FieldValueType["DATE"] = "date";
11
- FieldValueType["DATE_RANGE"] = "dateRange";
12
- FieldValueType["DATETIME"] = "datetime";
13
- FieldValueType["DATETIME_RANGE"] = "datetimeRange";
14
- FieldValueType["DURATION"] = "duration";
15
- FieldValueType["EMAIL"] = "email";
16
- FieldValueType["RICH_TEXT_HTML"] = "html";
17
- FieldValueType["INTEGER"] = "integer";
18
- FieldValueType["RICH_TEXT_MARKDOWN"] = "markdown";
19
- FieldValueType["NUMBER"] = "number";
20
- FieldValueType["OBJECT"] = "object";
21
- FieldValueType["REFERENCE"] = "reference";
22
- FieldValueType["STRING"] = "string";
23
- FieldValueType["URL"] = "url";
24
- })(FieldValueType || (FieldValueType = {}));
6
+ export const FieldValueType = {
7
+ BLOB: 'blob',
8
+ BOOLEAN: 'boolean',
9
+ DATE: 'date',
10
+ DATE_RANGE: 'dateRange',
11
+ DATETIME: 'datetime',
12
+ DATETIME_RANGE: 'datetimeRange',
13
+ DURATION: 'duration',
14
+ EMAIL: 'email',
15
+ RICH_TEXT_HTML: 'html',
16
+ INTEGER: 'integer',
17
+ RICH_TEXT_MARKDOWN: 'markdown',
18
+ NUMBER: 'number',
19
+ OBJECT: 'object',
20
+ REFERENCE: 'reference',
21
+ STRING: 'string',
22
+ URL: 'url',
23
+ };
25
24
  /**
26
25
  * A Semantic gives meaning to an Item or a Field in the Unito platform.
27
26
  * An object with a specified semantic is expected to hold a certain type of value that can later be used
28
27
  * by the consumers of the spec to better understand what that value means.
29
28
  */
30
- export var Semantic;
31
- (function (Semantic) {
32
- Semantic["CREATED_AT"] = "createdAt";
33
- Semantic["DESCRIPTION"] = "description";
34
- Semantic["DISPLAY_NAME"] = "displayName";
35
- Semantic["PROVIDER_URL"] = "providerUrl";
36
- Semantic["UPDATED_AT"] = "updatedAt";
37
- Semantic["USER"] = "user";
38
- Semantic["PARENT"] = "parent";
39
- })(Semantic || (Semantic = {}));
29
+ export const Semantic = {
30
+ CREATED_AT: 'createdAt',
31
+ DESCRIPTION: 'description',
32
+ DISPLAY_NAME: 'displayName',
33
+ PROVIDER_URL: 'providerUrl',
34
+ UPDATED_AT: 'updatedAt',
35
+ USER: 'user',
36
+ PARENT: 'parent',
37
+ };
40
38
  /**
41
39
  * A Relation Semantic gives meaning to a Relation in the Unito platform. A relation with a
42
40
  * specified semantic is expected to hold a certain type of item that can later be used by
43
41
  * the consumers of the spec for specific usage.
44
42
  */
45
- export var RelationSemantic;
46
- (function (RelationSemantic) {
47
- RelationSemantic["COMMENTS"] = "comments";
48
- RelationSemantic["SUBTASKS"] = "subtasks";
49
- RelationSemantic["USERS"] = "users";
50
- RelationSemantic["ATTACHMENTS"] = "attachments";
51
- })(RelationSemantic || (RelationSemantic = {}));
43
+ export const RelationSemantic = {
44
+ COMMENTS: 'comments',
45
+ SUBTASKS: 'subtasks',
46
+ USERS: 'users',
47
+ ATTACHMENTS: 'attachments',
48
+ };
52
49
  /**
53
50
  * An OperatorType represents an operator used in a filter.
54
51
  */
55
- export var OperatorType;
56
- (function (OperatorType) {
57
- OperatorType["EQUAL"] = "=";
58
- OperatorType["NOT_EQUAL"] = "!=";
59
- OperatorType["GREATER_THAN"] = ">";
60
- OperatorType["GREATER_THAN_OR_EQUAL"] = ">=";
61
- OperatorType["LESSER_THAN"] = "<";
62
- OperatorType["LESSER_THAN_OR_EQUAL"] = "<=";
63
- OperatorType["INCLUDE"] = "*=";
64
- OperatorType["EXCLUDE"] = "!*=";
65
- OperatorType["START_WITH"] = "^=";
66
- OperatorType["END_WITH"] = "$=";
67
- OperatorType["IS_NULL"] = "!!";
68
- OperatorType["IS_NOT_NULL"] = "!";
69
- })(OperatorType || (OperatorType = {}));
52
+ export const OperatorType = {
53
+ EQUAL: '=',
54
+ NOT_EQUAL: '!=',
55
+ GREATER_THAN: '>',
56
+ GREATER_THAN_OR_EQUAL: '>=',
57
+ LESSER_THAN: '<',
58
+ LESSER_THAN_OR_EQUAL: '<=',
59
+ INCLUDE: '*=',
60
+ EXCLUDE: '!*=',
61
+ START_WITH: '^=',
62
+ END_WITH: '$=',
63
+ IS_NULL: '!!',
64
+ IS_NOT_NULL: '!',
65
+ };
70
66
  /**
71
67
  * HTTP code returned by the integration
72
68
  */
73
- export var StatusCode;
74
- (function (StatusCode) {
75
- StatusCode[StatusCode["OK"] = 200] = "OK";
76
- StatusCode[StatusCode["CREATED"] = 201] = "CREATED";
77
- StatusCode[StatusCode["ACCEPTED"] = 202] = "ACCEPTED";
78
- StatusCode[StatusCode["NO_CONTENT"] = 204] = "NO_CONTENT";
79
- StatusCode[StatusCode["BAD_REQUEST"] = 400] = "BAD_REQUEST";
80
- StatusCode[StatusCode["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
81
- StatusCode[StatusCode["FORBIDDEN"] = 403] = "FORBIDDEN";
82
- StatusCode[StatusCode["NOT_FOUND"] = 404] = "NOT_FOUND";
83
- StatusCode[StatusCode["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
84
- StatusCode[StatusCode["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
85
- StatusCode[StatusCode["UNPROCESSABLE_CONTENT"] = 422] = "UNPROCESSABLE_CONTENT";
86
- StatusCode[StatusCode["LOCKED"] = 423] = "LOCKED";
87
- StatusCode[StatusCode["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
88
- StatusCode[StatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
89
- })(StatusCode || (StatusCode = {}));
69
+ export const StatusCode = {
70
+ OK: 200,
71
+ CREATED: 201,
72
+ ACCEPTED: 202,
73
+ NO_CONTENT: 204,
74
+ BAD_REQUEST: 400,
75
+ UNAUTHORIZED: 401,
76
+ FORBIDDEN: 403,
77
+ NOT_FOUND: 404,
78
+ NOT_ACCEPTABLE: 406,
79
+ REQUEST_TIMEOUT: 408,
80
+ UNPROCESSABLE_CONTENT: 422,
81
+ LOCKED: 423,
82
+ TOO_MANY_REQUESTS: 429,
83
+ INTERNAL_SERVER_ERROR: 500,
84
+ };
package/package.json CHANGED
@@ -1,14 +1,20 @@
1
1
  {
2
2
  "name": "@unito/integration-api",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "The Unito Integration API",
5
5
  "type": "module",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
8
8
  "./package.json": "./package.json",
9
9
  ".": {
10
- "import": "./dist/src/index.js",
11
- "require": "./dist/src/index.cjs"
10
+ "import": {
11
+ "types": "./dist/src/index.d.ts",
12
+ "default": "./dist/src/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/src/index.d.ts",
16
+ "default": "./dist/src/index.cjs"
17
+ }
12
18
  }
13
19
  },
14
20
  "files": [