@weslink/n8n-nodes-kibi-connect 0.1.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.
Files changed (53) hide show
  1. package/LICENSE.md +22 -0
  2. package/README.md +38 -0
  3. package/dist/credentials/KibiConnectApi.credentials.d.ts +10 -0
  4. package/dist/credentials/KibiConnectApi.credentials.js +85 -0
  5. package/dist/credentials/KibiConnectApi.credentials.js.map +1 -0
  6. package/dist/icons/kibiConnect.dark.svg +37 -0
  7. package/dist/icons/kibiConnect.svg +37 -0
  8. package/dist/nodes/KibiConnect/KibiConnect.node.d.ts +12 -0
  9. package/dist/nodes/KibiConnect/KibiConnect.node.js +109 -0
  10. package/dist/nodes/KibiConnect/KibiConnect.node.js.map +1 -0
  11. package/dist/nodes/KibiConnect/KibiConnect.node.json +18 -0
  12. package/dist/nodes/KibiConnect/listSearch/getConversations.d.ts +2 -0
  13. package/dist/nodes/KibiConnect/listSearch/getConversations.js +33 -0
  14. package/dist/nodes/KibiConnect/listSearch/getConversations.js.map +1 -0
  15. package/dist/nodes/KibiConnect/listSearch/getUsers.d.ts +2 -0
  16. package/dist/nodes/KibiConnect/listSearch/getUsers.js +26 -0
  17. package/dist/nodes/KibiConnect/listSearch/getUsers.js.map +1 -0
  18. package/dist/nodes/KibiConnect/resources/calendarEvent/index.d.ts +2 -0
  19. package/dist/nodes/KibiConnect/resources/calendarEvent/index.js +236 -0
  20. package/dist/nodes/KibiConnect/resources/calendarEvent/index.js.map +1 -0
  21. package/dist/nodes/KibiConnect/resources/chat/index.d.ts +2 -0
  22. package/dist/nodes/KibiConnect/resources/chat/index.js +221 -0
  23. package/dist/nodes/KibiConnect/resources/chat/index.js.map +1 -0
  24. package/dist/nodes/KibiConnect/resources/notification/index.d.ts +2 -0
  25. package/dist/nodes/KibiConnect/resources/notification/index.js +131 -0
  26. package/dist/nodes/KibiConnect/resources/notification/index.js.map +1 -0
  27. package/dist/nodes/KibiConnect/resources/post/index.d.ts +2 -0
  28. package/dist/nodes/KibiConnect/resources/post/index.js +176 -0
  29. package/dist/nodes/KibiConnect/resources/post/index.js.map +1 -0
  30. package/dist/nodes/KibiConnect/resources/task/index.d.ts +2 -0
  31. package/dist/nodes/KibiConnect/resources/task/index.js +229 -0
  32. package/dist/nodes/KibiConnect/resources/task/index.js.map +1 -0
  33. package/dist/nodes/KibiConnect/resources/user/index.d.ts +2 -0
  34. package/dist/nodes/KibiConnect/resources/user/index.js +91 -0
  35. package/dist/nodes/KibiConnect/resources/user/index.js.map +1 -0
  36. package/dist/nodes/KibiConnect/resources/wiki/index.d.ts +2 -0
  37. package/dist/nodes/KibiConnect/resources/wiki/index.js +167 -0
  38. package/dist/nodes/KibiConnect/resources/wiki/index.js.map +1 -0
  39. package/dist/nodes/KibiConnect/shared/descriptions.d.ts +3 -0
  40. package/dist/nodes/KibiConnect/shared/descriptions.js +52 -0
  41. package/dist/nodes/KibiConnect/shared/descriptions.js.map +1 -0
  42. package/dist/nodes/KibiConnect/shared/errors.d.ts +6 -0
  43. package/dist/nodes/KibiConnect/shared/errors.js +42 -0
  44. package/dist/nodes/KibiConnect/shared/errors.js.map +1 -0
  45. package/dist/nodes/KibiConnect/shared/fields.d.ts +7 -0
  46. package/dist/nodes/KibiConnect/shared/fields.js +120 -0
  47. package/dist/nodes/KibiConnect/shared/fields.js.map +1 -0
  48. package/dist/nodes/KibiConnect/shared/transport.d.ts +13 -0
  49. package/dist/nodes/KibiConnect/shared/transport.js +39 -0
  50. package/dist/nodes/KibiConnect/shared/transport.js.map +1 -0
  51. package/dist/package.json +66 -0
  52. package/dist/tsconfig.tsbuildinfo +1 -0
  53. package/package.json +66 -0
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.wikiDescription = void 0;
4
+ const descriptions_1 = require("../../shared/descriptions");
5
+ const fields_1 = require("../../shared/fields");
6
+ const R = 'wiki';
7
+ const show = { resource: [R] };
8
+ const writeOps = ['create', 'update', 'upsertByExternalId'];
9
+ exports.wikiDescription = [
10
+ {
11
+ displayName: 'Operation',
12
+ name: 'operation',
13
+ type: 'options',
14
+ noDataExpression: true,
15
+ displayOptions: { show },
16
+ options: [
17
+ {
18
+ name: 'Create',
19
+ value: 'create',
20
+ action: 'Create a wiki page',
21
+ description: 'Add a page. Calling this twice creates two pages.',
22
+ routing: {
23
+ request: { method: 'POST', url: '/wiki' },
24
+ output: { postReceive: descriptions_1.unwrapData },
25
+ },
26
+ },
27
+ {
28
+ name: 'Delete',
29
+ value: 'delete',
30
+ action: 'Delete a wiki page',
31
+ description: 'Move a page to the bin',
32
+ routing: {
33
+ request: { method: 'DELETE', url: '=/wiki/{{$parameter.pageId}}' },
34
+ output: { postReceive: descriptions_1.unwrapData },
35
+ },
36
+ },
37
+ {
38
+ name: 'Delete External Ref',
39
+ value: 'deleteExternalRef',
40
+ action: 'Unlink a wiki page from its external ID',
41
+ description: 'Release the external ID without touching the page itself',
42
+ routing: {
43
+ request: { method: 'DELETE', url: '=/wiki/{{$parameter.pageId}}/external-ref' },
44
+ output: { postReceive: descriptions_1.unwrapData },
45
+ },
46
+ },
47
+ {
48
+ name: 'Get',
49
+ value: 'get',
50
+ action: 'Get a wiki page',
51
+ description: 'Read one page',
52
+ routing: {
53
+ request: { method: 'GET', url: '=/wiki/{{$parameter.pageId}}' },
54
+ output: { postReceive: descriptions_1.unwrapData },
55
+ },
56
+ },
57
+ {
58
+ name: 'Get Many',
59
+ value: 'getAll',
60
+ action: 'Get many wiki pages',
61
+ description: 'Read the pages visible to the token owner',
62
+ routing: {
63
+ request: { method: 'GET', url: '/wiki' },
64
+ output: { postReceive: descriptions_1.unwrapData },
65
+ },
66
+ },
67
+ {
68
+ name: 'Update',
69
+ value: 'update',
70
+ action: 'Update a wiki page',
71
+ description: 'Change an existing page',
72
+ routing: {
73
+ request: { method: 'PUT', url: '=/wiki/{{$parameter.pageId}}' },
74
+ output: { postReceive: descriptions_1.unwrapData },
75
+ },
76
+ },
77
+ {
78
+ name: 'Upsert by External ID',
79
+ value: 'upsertByExternalId',
80
+ action: 'Create or update a wiki page by external ID',
81
+ description: 'Create the page, or update the one already mapped to this ID',
82
+ routing: {
83
+ request: { method: 'PUT', url: '/wiki/by-external-id' },
84
+ output: { postReceive: descriptions_1.unwrapData },
85
+ },
86
+ },
87
+ ],
88
+ default: 'upsertByExternalId',
89
+ },
90
+ {
91
+ displayName: 'Use Upsert by External ID for anything that runs repeatedly — mirroring a docs folder, say. Create has no memory: run it twice and the wiki carries the same page twice.',
92
+ name: 'upsertNotice',
93
+ type: 'notice',
94
+ default: '',
95
+ displayOptions: { show: { ...show, operation: ['create'] } },
96
+ },
97
+ (0, fields_1.ulidField)('Page ID', 'pageId', R, ['get', 'update', 'delete', 'deleteExternalRef'], 'The wiki page to act on.'),
98
+ (0, fields_1.externalIdField)(R, ['upsertByExternalId']),
99
+ {
100
+ displayName: 'Title',
101
+ name: 'title',
102
+ type: 'string',
103
+ required: true,
104
+ default: '',
105
+ placeholder: 'Onboarding checklist',
106
+ description: 'The page title',
107
+ displayOptions: { show: { ...show, operation: writeOps } },
108
+ routing: { request: { body: { title: '={{ $value }}' } } },
109
+ },
110
+ {
111
+ displayName: 'Content',
112
+ name: 'content',
113
+ type: 'string',
114
+ typeOptions: { rows: 8 },
115
+ default: '',
116
+ description: 'The page content. Rich text — set Content Format to say how it is written. On an upsert, leaving this empty keeps the existing content.',
117
+ displayOptions: { show: { ...show, operation: writeOps } },
118
+ routing: { request: { body: { content: '={{ $value || undefined }}' } } },
119
+ },
120
+ {
121
+ displayName: 'Status',
122
+ name: 'status',
123
+ type: 'options',
124
+ default: 'published',
125
+ description: 'Whether the page is visible or still a draft',
126
+ options: [
127
+ { name: 'Draft', value: 'draft' },
128
+ { name: 'Published', value: 'published' },
129
+ ],
130
+ displayOptions: { show: { ...show, operation: writeOps } },
131
+ routing: { request: { body: { status: '={{ $value }}' } } },
132
+ },
133
+ {
134
+ displayName: 'Parent Page ID',
135
+ name: 'parentId',
136
+ type: 'string',
137
+ default: '',
138
+ placeholder: '01J8ZP9K7QW3X2YB5M4N6R8TVC',
139
+ description: 'Nest this page under another one. Only read when the page is created.',
140
+ displayOptions: { show: { ...show, operation: ['create'] } },
141
+ routing: { request: { body: { parent_id: '={{ $value || undefined }}' } } },
142
+ },
143
+ {
144
+ displayName: 'Search',
145
+ name: 'search',
146
+ type: 'string',
147
+ default: '',
148
+ description: 'Filter pages by title or content, case-insensitively',
149
+ displayOptions: { show: { ...show, operation: ['getAll'] } },
150
+ routing: { request: { qs: { search: '={{ $value || undefined }}' } } },
151
+ },
152
+ {
153
+ displayName: 'Filter by External ID',
154
+ name: 'filterExternalId',
155
+ type: 'string',
156
+ default: '',
157
+ description: 'Return only the page mapped to this external ID. The answer stays a list holding one entry or none — an unknown ID is an empty list, not an error.',
158
+ displayOptions: { show: { ...show, operation: ['getAll'] } },
159
+ routing: { request: { qs: { external_id: '={{ $value || undefined }}' } } },
160
+ },
161
+ (0, fields_1.contentFormatField)(R, writeOps),
162
+ (0, fields_1.readFormatField)(R, ['get', 'getAll']),
163
+ (0, fields_1.conditionalWriteField)(R, ['update', 'upsertByExternalId']),
164
+ ...(0, fields_1.changeScanFields)(R, 'getAll'),
165
+ ...(0, descriptions_1.returnAll)(R, 'getAll'),
166
+ ];
167
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/KibiConnect/resources/wiki/index.ts"],"names":[],"mappings":";;;AAEA,4DAAkE;AAClE,gDAO6B;AAE7B,MAAM,CAAC,GAAG,MAAM,CAAC;AACjB,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAE/B,MAAM,QAAQ,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,CAAC,CAAC;AAE/C,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACx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,yBAAgB,EAAC,CAAC,EAAE,QAAQ,CAAC;IAChC,GAAG,IAAA,wBAAS,EAAC,CAAC,EAAE,QAAQ,CAAC;CACzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties, PostReceiveAction } from 'n8n-workflow';
2
+ export declare const unwrapData: PostReceiveAction[];
3
+ export declare function returnAll(resource: string, operation: string): INodeProperties[];
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unwrapData = void 0;
4
+ exports.returnAll = returnAll;
5
+ exports.unwrapData = [
6
+ {
7
+ type: 'rootProperty',
8
+ properties: { property: 'data' },
9
+ },
10
+ ];
11
+ function returnAll(resource, operation) {
12
+ const show = { resource: [resource], operation: [operation] };
13
+ return [
14
+ {
15
+ displayName: 'Return All',
16
+ name: 'returnAll',
17
+ type: 'boolean',
18
+ default: false,
19
+ description: 'Whether to return all results or only up to a given limit',
20
+ displayOptions: { show },
21
+ routing: {
22
+ operations: {
23
+ pagination: {
24
+ type: 'generic',
25
+ properties: {
26
+ continue: '={{ $response.body.meta.current_page < $response.body.meta.last_page }}',
27
+ request: {
28
+ qs: {
29
+ page: '={{ $pageCount + 1 }}',
30
+ limit: 50,
31
+ },
32
+ },
33
+ },
34
+ },
35
+ },
36
+ },
37
+ },
38
+ {
39
+ displayName: 'Limit',
40
+ name: 'limit',
41
+ type: 'number',
42
+ typeOptions: { minValue: 1, maxValue: 50 },
43
+ default: 50,
44
+ description: 'Max number of results to return',
45
+ displayOptions: { show: { ...show, returnAll: [false] } },
46
+ routing: {
47
+ request: { qs: { limit: '={{ $value }}' } },
48
+ },
49
+ },
50
+ ];
51
+ }
52
+ //# sourceMappingURL=descriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptions.js","sourceRoot":"","sources":["../../../../nodes/KibiConnect/shared/descriptions.ts"],"names":[],"mappings":";;;AAyBA,8BA0CC;AAzDY,QAAA,UAAU,GAAwB;IAC9C;QACC,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;KAChC;CACD,CAAC;AAUF,SAAgB,SAAS,CAAC,QAAgB,EAAE,SAAiB;IAC5D,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;IAE9D,OAAO;QACN;YACC,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,2DAA2D;YACxE,cAAc,EAAE,EAAE,IAAI,EAAE;YACxB,OAAO,EAAE;gBACR,UAAU,EAAE;oBACX,UAAU,EAAE;wBACX,IAAI,EAAE,SAAS;wBACf,UAAU,EAAE;4BACX,QAAQ,EACP,yEAAyE;4BAC1E,OAAO,EAAE;gCACR,EAAE,EAAE;oCACH,IAAI,EAAE,uBAAuB;oCAC7B,KAAK,EAAE,EAAE;iCACT;6BACD;yBACD;qBACD;iBACD;aACD;SACD;QACD;YACC,WAAW,EAAE,OAAO;YACpB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC1C,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,iCAAiC;YAC9C,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE;YACzD,OAAO,EAAE;gBACR,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE;aAC3C;SACD;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ export interface KibiErrorBody {
2
+ error?: string;
3
+ message?: string;
4
+ code?: string;
5
+ }
6
+ export declare function describeApiError(statusCode: number, body: KibiErrorBody, resource: string): string;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.describeApiError = describeApiError;
4
+ const MODULE_GATED = {
5
+ timeTracking: 'Time Tracking',
6
+ document: 'Document Management',
7
+ };
8
+ function describeApiError(statusCode, body, resource) {
9
+ var _a, _b, _c, _d, _e;
10
+ if (statusCode === 404) {
11
+ const moduleName = MODULE_GATED[resource];
12
+ if (moduleName !== undefined) {
13
+ return `Not found. If the ID is correct, the ${moduleName} module is probably not installed in this tenant — Kibi deliberately answers 404 for both cases so that the set of installed modules is not visible from outside. A system administrator can check under Administration > Modules.`;
14
+ }
15
+ }
16
+ if (statusCode === 403) {
17
+ if (body.code === 'webhooks_disabled') {
18
+ return 'Webhooks are not enabled for this tenant. A system administrator switches them on under Administration > Webhook endpoints. This is separate from the REST API toggle.';
19
+ }
20
+ if (body.error === 'API disabled') {
21
+ return 'The REST API is switched off for this tenant. A system administrator turns it on under Administration > API.';
22
+ }
23
+ if (body.error === 'IP not allowed') {
24
+ return "This n8n instance's IP address is not on the tenant's allow list. A system administrator maintains it under Administration > API.";
25
+ }
26
+ if (body.error === 'Insufficient scope') {
27
+ return `${(_a = body.message) !== null && _a !== void 0 ? _a : 'The token is missing a scope.'} Tokens cannot be edited after they are created — issue a new one with the scope under My Profile > Integrations.`;
28
+ }
29
+ return ((_b = body.message) !== null && _b !== void 0 ? _b : 'Refused. On the webhook endpoints this usually means the token is fine but the person it belongs to is not a system administrator — the scope alone is not enough there.');
30
+ }
31
+ if (statusCode === 422 && body.code === 'integration_slug_missing') {
32
+ return 'This token has no integration slug. The slug is chosen when the token is created and cannot be added later — ask a system administrator for a token that has one.';
33
+ }
34
+ if (statusCode === 409 && body.code === 'external_id_taken') {
35
+ return `${(_c = body.message) !== null && _c !== void 0 ? _c : 'That external ID is already in use.'} An external ID is unique per integration across the whole tenant, including across resource types — a wiki page and a task cannot share one.`;
36
+ }
37
+ if (statusCode === 412) {
38
+ return 'The record changed in Kibi after the moment you sent as "Only If Unchanged Since". Read it again and decide what to do with the newer version — overwriting it would discard somebody else\'s edit.';
39
+ }
40
+ return (_e = (_d = body.message) !== null && _d !== void 0 ? _d : body.error) !== null && _e !== void 0 ? _e : `Kibi Connect returned HTTP ${statusCode}.`;
41
+ }
42
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../nodes/KibiConnect/shared/errors.ts"],"names":[],"mappings":";;AA8BA,4CAqDC;AAhED,MAAM,YAAY,GAA2B;IAC5C,YAAY,EAAE,eAAe;IAC7B,QAAQ,EAAE,qBAAqB;CAC/B,CAAC;AAQF,SAAgB,gBAAgB,CAC/B,UAAkB,EAClB,IAAmB,EACnB,QAAgB;;IAEhB,IAAI,UAAU,KAAK,GAAG,EAAE,CAAC;QACxB,MAAM,UAAU,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;QAE1C,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,wCAAwC,UAAU,oOAAoO,CAAC;QAC/R,CAAC;IACF,CAAC;IAED,IAAI,UAAU,KAAK,GAAG,EAAE,CAAC;QACxB,IAAI,IAAI,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;YACvC,OAAO,wKAAwK,CAAC;QACjL,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,cAAc,EAAE,CAAC;YACnC,OAAO,8GAA8G,CAAC;QACvH,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,gBAAgB,EAAE,CAAC;YACrC,OAAO,mIAAmI,CAAC;QAC5I,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,oBAAoB,EAAE,CAAC;YACzC,OAAO,GAAG,MAAA,IAAI,CAAC,OAAO,mCAAI,+BAA+B,mHAAmH,CAAC;QAC9K,CAAC;QAMD,OAAO,CACN,MAAA,IAAI,CAAC,OAAO,mCACZ,0KAA0K,CAC1K,CAAC;IACH,CAAC;IAED,IAAI,UAAU,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,KAAK,0BAA0B,EAAE,CAAC;QACpE,OAAO,mKAAmK,CAAC;IAC5K,CAAC;IAED,IAAI,UAAU,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;QAC7D,OAAO,GAAG,MAAA,IAAI,CAAC,OAAO,mCAAI,qCAAqC,+IAA+I,CAAC;IAChN,CAAC;IAED,IAAI,UAAU,KAAK,GAAG,EAAE,CAAC;QACxB,OAAO,qMAAqM,CAAC;IAC9M,CAAC;IAED,OAAO,MAAA,MAAA,IAAI,CAAC,OAAO,mCAAI,IAAI,CAAC,KAAK,mCAAI,8BAA8B,UAAU,GAAG,CAAC;AAClF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare function ulidField(displayName: string, name: string, resource: string, operations: string[], description: string): INodeProperties;
3
+ export declare function externalIdField(resource: string, operations: string[]): INodeProperties;
4
+ export declare function contentFormatField(resource: string, operations: string[]): INodeProperties;
5
+ export declare function readFormatField(resource: string, operations: string[]): INodeProperties;
6
+ export declare function changeScanFields(resource: string, operation: string): INodeProperties[];
7
+ export declare function conditionalWriteField(resource: string, operations: string[]): INodeProperties;
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ulidField = ulidField;
4
+ exports.externalIdField = externalIdField;
5
+ exports.contentFormatField = contentFormatField;
6
+ exports.readFormatField = readFormatField;
7
+ exports.changeScanFields = changeScanFields;
8
+ exports.conditionalWriteField = conditionalWriteField;
9
+ const ULID_PATTERN = '^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$';
10
+ const ULID_EXAMPLE = '01J8ZP9K7QW3X2YB5M4N6R8TVC';
11
+ function ulidField(displayName, name, resource, operations, description) {
12
+ return {
13
+ displayName,
14
+ name,
15
+ type: 'string',
16
+ required: true,
17
+ default: '',
18
+ description,
19
+ hint: 'A Kibi ID is 26 characters — copy it from a previous step rather than typing it.',
20
+ placeholder: ULID_EXAMPLE,
21
+ displayOptions: { show: { resource: [resource], operation: operations } },
22
+ typeOptions: {
23
+ regex: ULID_PATTERN,
24
+ },
25
+ };
26
+ }
27
+ function externalIdField(resource, operations) {
28
+ return {
29
+ displayName: 'External ID',
30
+ name: 'externalId',
31
+ type: 'string',
32
+ required: true,
33
+ default: '',
34
+ placeholder: 'P-2026-0815',
35
+ description: 'Your own stable identifier for this record in the source system. Unique per integration across the whole tenant and across resource types — a wiki page and a task cannot share one.',
36
+ hint: 'Reusing an ID that belongs to another record answers 409, even if that record is invisible to this token.',
37
+ displayOptions: { show: { resource: [resource], operation: operations } },
38
+ routing: { request: { body: { external_id: '={{ $value }}' } } },
39
+ };
40
+ }
41
+ function contentFormatField(resource, operations) {
42
+ return {
43
+ displayName: 'Content Format',
44
+ name: 'contentFormat',
45
+ type: 'options',
46
+ default: 'json',
47
+ description: 'How the rich-text field in this request is written. Kibi stores a document tree; HTML and Markdown are parsed into one on the way in, and anything it has no node for is lost at that point.',
48
+ options: [
49
+ { name: 'HTML', value: 'html' },
50
+ { name: 'JSON (Document Tree)', value: 'json' },
51
+ { name: 'Markdown', value: 'markdown' },
52
+ ],
53
+ displayOptions: { show: { resource: [resource], operation: operations } },
54
+ routing: { request: { body: { content_format: '={{ $value }}' } } },
55
+ };
56
+ }
57
+ function readFormatField(resource, operations) {
58
+ return {
59
+ displayName: 'Read Format',
60
+ name: 'format',
61
+ type: 'options',
62
+ default: 'json',
63
+ description: 'Which shape rich text comes back in. Converting to Markdown or plain text discards formatting Kibi can represent but those cannot.',
64
+ options: [
65
+ { name: 'HTML', value: 'html' },
66
+ { name: 'JSON (Document Tree)', value: 'json' },
67
+ { name: 'Markdown', value: 'markdown' },
68
+ { name: 'Plain Text', value: 'text' },
69
+ ],
70
+ displayOptions: { show: { resource: [resource], operation: operations } },
71
+ routing: { request: { qs: { format: '={{ $value }}' } } },
72
+ };
73
+ }
74
+ function changeScanFields(resource, operation) {
75
+ const show = { resource: [resource], operation: [operation] };
76
+ return [
77
+ {
78
+ displayName: 'Changed Since',
79
+ name: 'updatedSince',
80
+ type: 'dateTime',
81
+ default: '',
82
+ description: 'Return only records changed after this moment. Combine with sorting by Updated At and move the watermark forward after each run.',
83
+ displayOptions: { show },
84
+ routing: { request: { qs: { updated_since: '={{ $value }}' } } },
85
+ },
86
+ {
87
+ displayName: 'Sort By',
88
+ name: 'sort',
89
+ type: 'options',
90
+ default: '',
91
+ description: 'The order results come back in. Sorting by Updated At is what makes paging through a change feed safe.',
92
+ options: [
93
+ { name: 'Default', value: '' },
94
+ { name: 'Updated At (Ascending)', value: 'updated_at' },
95
+ { name: 'Updated At (Descending)', value: '-updated_at' },
96
+ ],
97
+ displayOptions: { show },
98
+ routing: { request: { qs: { sort: '={{ $value || undefined }}' } } },
99
+ },
100
+ ];
101
+ }
102
+ function conditionalWriteField(resource, operations) {
103
+ return {
104
+ displayName: 'Only If Unchanged Since',
105
+ name: 'ifUnmodifiedSince',
106
+ type: 'dateTime',
107
+ default: '',
108
+ description: 'Refuse the write if the record changed in Kibi after this moment. Send the Updated At you last read. Leave empty to overwrite whatever is there.',
109
+ hint: 'Answers 412 instead of overwriting — which is what you want in a sync, because the alternative is a colleague\'s edit disappearing silently.',
110
+ displayOptions: { show: { resource: [resource], operation: operations } },
111
+ routing: {
112
+ request: {
113
+ headers: {
114
+ 'If-Unmodified-Since': '={{ $value ? new Date($value).toUTCString() : undefined }}',
115
+ },
116
+ },
117
+ },
118
+ };
119
+ }
120
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../nodes/KibiConnect/shared/fields.ts"],"names":[],"mappings":";;AAcA,8BAuBC;AAWD,0CAcC;AAUD,gDAgBC;AAGD,0CAiBC;AASD,4CA8BC;AAUD,sDAkBC;AA5KD,MAAM,YAAY,GAAG,uCAAuC,CAAC;AAC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uteFunctions, IExecuteSingleFunctions, IHookFunctions, IHttpRequestMethods, ILoadOptionsFunctions } from 'n8n-workflow';
3
+ export interface ListResponse<T> {
4
+ data: T[];
5
+ meta?: {
6
+ current_page: number;
7
+ last_page: number;
8
+ total: number;
9
+ };
10
+ }
11
+ export type KibiRequestContext = IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions;
12
+ export declare function kibiApiRequest<T>(this: KibiRequestContext, method: IHttpRequestMethods, path: string, body?: IDataObject, qs?: IDataObject): Promise<T>;
13
+ export declare function asReadableError(this: KibiRequestContext, error: unknown, path: string): NodeApiError;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.kibiApiRequest = kibiApiRequest;
4
+ exports.asReadableError = asReadableError;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const errors_1 = require("./errors");
7
+ async function kibiApiRequest(method, path, body, qs) {
8
+ var _a;
9
+ const credentials = await this.getCredentials('kibiConnectApi');
10
+ const baseUrl = String((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : '').replace(/\/+$/, '');
11
+ const options = {
12
+ method,
13
+ url: `${baseUrl}/api/v1${path}`,
14
+ body,
15
+ qs,
16
+ json: true,
17
+ };
18
+ try {
19
+ return (await this.helpers.httpRequestWithAuthentication.call(this, 'kibiConnectApi', options));
20
+ }
21
+ catch (error) {
22
+ throw asReadableError.call(this, error, path);
23
+ }
24
+ }
25
+ function asReadableError(error, path) {
26
+ var _a, _b, _c, _d, _e, _f, _g;
27
+ const status = (_a = error.statusCode) !== null && _a !== void 0 ? _a : Number((_b = error.httpCode) !== null && _b !== void 0 ? _b : 0);
28
+ const body = (_f = (_d = (_c = error.cause) === null || _c === void 0 ? void 0 : _c.error) !== null && _d !== void 0 ? _d : (_e = error.response) === null || _e === void 0 ? void 0 : _e.body) !== null && _f !== void 0 ? _f : {};
29
+ const resource = path.startsWith('/time-tracking')
30
+ ? 'timeTracking'
31
+ : path.startsWith('/dms')
32
+ ? 'document'
33
+ : 'other';
34
+ return new n8n_workflow_1.NodeApiError(this.getNode(), (_g = error) !== null && _g !== void 0 ? _g : {}, {
35
+ message: (0, errors_1.describeApiError)(status, body, resource),
36
+ httpCode: status ? String(status) : undefined,
37
+ });
38
+ }
39
+ //# sourceMappingURL=transport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../../nodes/KibiConnect/shared/transport.ts"],"names":[],"mappings":";;AA2CA,wCA2BC;AASD,0CA6BC;AA5GD,+CAA4C;AAY5C,qCAAgE;AA+BzD,KAAK,UAAU,cAAc,CAEnC,MAA2B,EAC3B,IAAY,EACZ,IAAkB,EAClB,EAAgB;;IAEhB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAChE,MAAM,OAAO,GAAG,MAAM,CAAC,MAAA,WAAW,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAEtE,MAAM,OAAO,GAAwB;QACpC,MAAM;QACN,GAAG,EAAE,GAAG,OAAO,UAAU,IAAI,EAAE;QAC/B,IAAI;QACJ,EAAE;QACF,IAAI,EAAE,IAAI;KACV,CAAC;IAEF,IAAI,CAAC;QACJ,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CAC5D,IAAI,EACJ,gBAAgB,EAChB,OAAO,CACP,CAAM,CAAC;IACT,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;AACF,CAAC;AASD,SAAgB,eAAe,CAE9B,KAAc,EACd,IAAY;;IAEZ,MAAM,MAAM,GACX,MAAC,KAAiC,CAAC,UAAU,mCAC7C,MAAM,CAAC,MAAC,KAA+B,CAAC,QAAQ,mCAAI,CAAC,CAAC,CAAC;IAExD,MAAM,IAAI,GACT,MAAA,MAAC,MAAC,KAA+C,CAAC,KAAK,0CAAE,KAAmC,mCAC3F,MAAC,KAAiD,CAAC,QAAQ,0CAAE,IAEjD,mCACb,EAAE,CAAC;IAKJ,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACjD,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YACxB,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,OAAO,CAAC;IAEZ,OAAO,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,MAAC,KAAoB,mCAAI,EAAE,EAAE;QACpE,OAAO,EAAE,IAAA,yBAAgB,EAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC;QACjD,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;KAC7C,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@weslink/n8n-nodes-kibi-connect",
3
+ "version": "0.1.0",
4
+ "description": "Automate Kibi Connect \u2014 chat, feed, wiki, tasks, calendar events, notifications and users",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/weslinkde/n8n-nodes-kibi-connect",
7
+ "keywords": [
8
+ "n8n-community-node-package",
9
+ "kibi",
10
+ "kibi-connect",
11
+ "weslink",
12
+ "collaboration",
13
+ "intranet"
14
+ ],
15
+ "author": {
16
+ "name": "Weslink GmbH",
17
+ "email": "dev@weslink.eu",
18
+ "url": "https://weslink.de"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/weslinkde/n8n-nodes-kibi-connect.git"
23
+ },
24
+ "bugs": {
25
+ "url": "https://github.com/weslinkde/n8n-nodes-kibi-connect/issues"
26
+ },
27
+ "engines": {
28
+ "node": ">=20.19"
29
+ },
30
+ "scripts": {
31
+ "build": "n8n-node build",
32
+ "dev": "n8n-node dev",
33
+ "lint": "n8n-node lint",
34
+ "lint:fix": "n8n-node lint --fix",
35
+ "release": "n8n-node release",
36
+ "prepublishOnly": "n8n-node prerelease",
37
+ "test": "vitest run",
38
+ "test:watch": "vitest"
39
+ },
40
+ "files": [
41
+ "dist"
42
+ ],
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "n8n": {
47
+ "n8nNodesApiVersion": 1,
48
+ "strict": true,
49
+ "credentials": [
50
+ "dist/credentials/KibiConnectApi.credentials.js"
51
+ ],
52
+ "nodes": [
53
+ "dist/nodes/KibiConnect/KibiConnect.node.js"
54
+ ]
55
+ },
56
+ "devDependencies": {
57
+ "@n8n/node-cli": "^0.48.3",
58
+ "eslint": "^9.29.0",
59
+ "prettier": "^3.6.0",
60
+ "typescript": "^5.9.0",
61
+ "vitest": "^3.2.0"
62
+ },
63
+ "peerDependencies": {
64
+ "n8n-workflow": "*"
65
+ }
66
+ }