@incomy/platform-sdk 0.6.0-beta.2343 → 0.6.0-beta.2408

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.
@@ -20,6 +20,10 @@ export type { CompanyEdit } from './models/CompanyEdit';
20
20
  export type { CompanyInsert } from './models/CompanyInsert';
21
21
  export type { CompanyPaginatedList } from './models/CompanyPaginatedList';
22
22
  export type { CurrencyInfo } from './models/CurrencyInfo';
23
+ export type { Document } from './models/Document';
24
+ export type { DocumentLinkRequest } from './models/DocumentLinkRequest';
25
+ export type { DocumentUploadRequest } from './models/DocumentUploadRequest';
26
+ export type { DocumentUploadTicket } from './models/DocumentUploadTicket';
23
27
  export type { Icon } from './models/Icon';
24
28
  export type { InputFieldDefinition } from './models/InputFieldDefinition';
25
29
  export type { Label } from './models/Label';
@@ -94,8 +98,10 @@ export { CurrenciesService } from './services/CurrenciesService';
94
98
  export { DeletedProjectsService } from './services/DeletedProjectsService';
95
99
  export { LabelsService } from './services/LabelsService';
96
100
  export { MembersService } from './services/MembersService';
101
+ export { MockStorageService } from './services/MockStorageService';
97
102
  export { MultiEventsService } from './services/MultiEventsService';
98
103
  export { OperationsService } from './services/OperationsService';
104
+ export { ProjectDocumentsService } from './services/ProjectDocumentsService';
99
105
  export { ProjectsService } from './services/ProjectsService';
100
106
  export { ProjectWalletsService } from './services/ProjectWalletsService';
101
107
  export { TemplatesService } from './services/TemplatesService';
@@ -13,8 +13,10 @@ export { CurrenciesService } from './services/CurrenciesService';
13
13
  export { DeletedProjectsService } from './services/DeletedProjectsService';
14
14
  export { LabelsService } from './services/LabelsService';
15
15
  export { MembersService } from './services/MembersService';
16
+ export { MockStorageService } from './services/MockStorageService';
16
17
  export { MultiEventsService } from './services/MultiEventsService';
17
18
  export { OperationsService } from './services/OperationsService';
19
+ export { ProjectDocumentsService } from './services/ProjectDocumentsService';
18
20
  export { ProjectsService } from './services/ProjectsService';
19
21
  export { ProjectWalletsService } from './services/ProjectWalletsService';
20
22
  export { TemplatesService } from './services/TemplatesService';
@@ -17,6 +17,16 @@ export type Accrual = {
17
17
  */
18
18
  deleteWithMultiEventRemoval?: boolean;
19
19
  description?: string | null;
20
+ /**
21
+ * Number of documents attached to this accrual (live, Ready only); 0 when none. Read-only,
22
+ * server-populated on read — see the document-attachments roadmap.
23
+ */
24
+ documentCount?: number;
25
+ /**
26
+ * If true, this accrual is expected to have at least one attached document. Advisory only — the UI warns
27
+ * when none is attached and never blocks saving. The UI auto-sets it when a company is selected.
28
+ */
29
+ documentRequired?: boolean;
20
30
  /**
21
31
  * If null, the source is the project itself.
22
32
  */
@@ -11,6 +11,10 @@ export type AccrualEdit = {
11
11
  */
12
12
  deleteWithMultiEventRemoval?: boolean | null;
13
13
  description?: string | null;
14
+ /**
15
+ * If provided, sets whether this accrual is expected to have an attached document (advisory). Null leaves it unchanged.
16
+ */
17
+ documentRequired?: boolean | null;
14
18
  /**
15
19
  * If null, the source is the Project itself.
16
20
  */
@@ -8,6 +8,16 @@ export type AccrualInsert = {
8
8
  */
9
9
  deleteWithMultiEventRemoval?: boolean;
10
10
  description?: string | null;
11
+ /**
12
+ * Ids of already-uploaded, still-unlinked project documents to attach to this accrual on create — the
13
+ * upload-first-then-link flow, so a new accrual's documents upload (with real progress) before the accrual
14
+ * exists and are linked here. Each must belong to the project and be unlinked; the per-item document limit applies.
15
+ */
16
+ documentIds?: Array<string> | null;
17
+ /**
18
+ * If true, this accrual is expected to have at least one attached document (advisory). Defaults to false.
19
+ */
20
+ documentRequired?: boolean;
11
21
  /**
12
22
  * If null, the source is the project itself.
13
23
  */
@@ -0,0 +1,30 @@
1
+ /**
2
+ * A document (file) attached to a project and linked to any number of money items — operations and/or accruals
3
+ * (many-to-many; never a multievent directly). The binary lives in object storage; this is the metadata plus a
4
+ * freshly-minted, short-lived presigned Incomy.Platform.Hub.Models.Document.DownloadUrl (populated per read, never persisted).
5
+ * See docs/roadmap/document-attachments-and-object-storage.md.
6
+ */
7
+ export type Document = {
8
+ contentType: string;
9
+ /**
10
+ * Server-assigned creation time. Read-only.
11
+ */
12
+ dateCreated: string;
13
+ /**
14
+ * A freshly-generated, short-lived presigned URL to download the binary directly from object storage.
15
+ * Populated on read; null on a document that is still Incomy.Platform.Hub.Models.DocumentStatus.Pending.
16
+ */
17
+ downloadUrl?: string | null;
18
+ fileName: string;
19
+ id: string;
20
+ /**
21
+ * Size of the binary in bytes.
22
+ */
23
+ sizeBytes?: number;
24
+ /**
25
+ * Lifecycle of a document's binary in object storage. A document row is created Incomy.Platform.Hub.Models.DocumentStatus.Pending when an
26
+ * upload is initiated (the presigned URL is handed out); it flips to Incomy.Platform.Hub.Models.DocumentStatus.Ready once the client confirms
27
+ * the direct upload completed. See docs/roadmap/document-attachments-and-object-storage.md.
28
+ */
29
+ status: 'pending' | 'ready';
30
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The event to link a document to: exactly one of the two ids is set (operation OR accrual).
3
+ */
4
+ export type DocumentLinkRequest = {
5
+ accrualId?: string | null;
6
+ operationId?: string | null;
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The client's request to attach a document: the file metadata needed to mint an upload ticket.
3
+ */
4
+ export type DocumentUploadRequest = {
5
+ contentType: string;
6
+ fileName: string;
7
+ sizeBytes?: number;
8
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ import type { Document } from './Document';
2
+ /**
3
+ * The result of initiating an upload: the created (Incomy.Platform.Hub.Models.DocumentStatus.Pending) document plus a
4
+ * presigned Incomy.Platform.Hub.Models.DocumentUploadTicket.UploadUrl the client PUTs the file to directly. After the direct upload succeeds the
5
+ * client calls the complete endpoint to flip the document to Incomy.Platform.Hub.Models.DocumentStatus.Ready.
6
+ */
7
+ export type DocumentUploadTicket = {
8
+ document: Document;
9
+ /**
10
+ * When the presigned Incomy.Platform.Hub.Models.DocumentUploadTicket.UploadUrl expires.
11
+ */
12
+ expiresAt: string;
13
+ /**
14
+ * Headers the client must send with the direct upload (e.g. Content-Type).
15
+ */
16
+ headers?: Record<string, string | null> | null;
17
+ /**
18
+ * HTTP method to use for the direct upload (e.g. "PUT").
19
+ */
20
+ method: string;
21
+ uploadUrl: string;
22
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -19,6 +19,16 @@ export type LogAccrual = {
19
19
  */
20
20
  deleteWithMultiEventRemoval?: boolean;
21
21
  description?: string | null;
22
+ /**
23
+ * Number of documents attached to this accrual (live, Ready only); 0 when none. Read-only,
24
+ * server-populated on read — see the document-attachments roadmap.
25
+ */
26
+ documentCount?: number;
27
+ /**
28
+ * If true, this accrual is expected to have at least one attached document. Advisory only — the UI warns
29
+ * when none is attached and never blocks saving. The UI auto-sets it when a company is selected.
30
+ */
31
+ documentRequired?: boolean;
22
32
  /**
23
33
  * If null, the source is the project itself.
24
34
  */
@@ -17,6 +17,16 @@ export type LogOperation = {
17
17
  * If set, operation will be deleted when unlined from a multievent or when linked multievent is deleted.
18
18
  */
19
19
  deleteWithMultiEventRemoval?: boolean;
20
+ /**
21
+ * Number of documents attached to this operation (live, Ready only); 0 when none. Read-only,
22
+ * server-populated on read — see the document-attachments roadmap.
23
+ */
24
+ documentCount?: number;
25
+ /**
26
+ * If true, this operation is expected to have at least one attached document. Advisory only — the UI warns
27
+ * when none is attached and never blocks saving. The UI auto-sets it when a company is selected.
28
+ */
29
+ documentRequired?: boolean;
20
30
  id: string;
21
31
  labelIds: Array<string>;
22
32
  money: Money;
@@ -15,6 +15,16 @@ export type Operation = {
15
15
  * If set, operation will be deleted when unlined from a multievent or when linked multievent is deleted.
16
16
  */
17
17
  deleteWithMultiEventRemoval?: boolean;
18
+ /**
19
+ * Number of documents attached to this operation (live, Ready only); 0 when none. Read-only,
20
+ * server-populated on read — see the document-attachments roadmap.
21
+ */
22
+ documentCount?: number;
23
+ /**
24
+ * If true, this operation is expected to have at least one attached document. Advisory only — the UI warns
25
+ * when none is attached and never blocks saving. The UI auto-sets it when a company is selected.
26
+ */
27
+ documentRequired?: boolean;
18
28
  id: string;
19
29
  labelIds: Array<string>;
20
30
  money: Money;
@@ -6,6 +6,10 @@ export type OperationEdit = {
6
6
  * If set, operation will be deleted when unlined from a multievent or when linked multievent is deleted.
7
7
  */
8
8
  deleteWithMultiEventRemoval?: boolean | null;
9
+ /**
10
+ * If provided, sets whether this operation is expected to have an attached document (advisory). Null leaves it unchanged.
11
+ */
12
+ documentRequired?: boolean | null;
9
13
  labelIds?: Array<string> | null;
10
14
  money?: Money;
11
15
  /**
@@ -6,6 +6,16 @@ export type OperationInsert = {
6
6
  * If set, operation will be deleted when unlined from a multievent or when linked multievent is deleted.
7
7
  */
8
8
  deleteWithMultiEventRemoval?: boolean;
9
+ /**
10
+ * Ids of already-uploaded, still-unlinked project documents to attach to this operation on create — the
11
+ * upload-first-then-link flow, so a new operation's documents upload (with real progress) before the operation
12
+ * exists and are linked here. Each must belong to the project and be unlinked; the per-item document limit applies.
13
+ */
14
+ documentIds?: Array<string> | null;
15
+ /**
16
+ * If true, this operation is expected to have at least one attached document (advisory). Defaults to false.
17
+ */
18
+ documentRequired?: boolean;
9
19
  labelIds?: Array<string> | null;
10
20
  money: Money;
11
21
  multiEventId?: string | null;
@@ -26,5 +26,5 @@ export type TrashItem = {
26
26
  /**
27
27
  * Entity type of the trashed item.
28
28
  */
29
- type?: 'Project' | 'MultiEvent' | 'Operation' | 'Accrual' | 'Wallet' | 'Member' | 'Bucket' | 'Company' | 'Template' | 'Label';
29
+ type?: 'Project' | 'MultiEvent' | 'Operation' | 'Accrual' | 'Wallet' | 'Member' | 'Bucket' | 'Company' | 'Template' | 'Label' | 'Document';
30
30
  };
@@ -0,0 +1,17 @@
1
+ import type { CancelablePromise } from '../core/CancelablePromise';
2
+ export declare class MockStorageService {
3
+ /**
4
+ * @returns any OK
5
+ * @throws ApiError
6
+ */
7
+ static getMockStorage({ key, }: {
8
+ key: string;
9
+ }): CancelablePromise<any>;
10
+ /**
11
+ * @returns any OK
12
+ * @throws ApiError
13
+ */
14
+ static putMockStorage({ key, }: {
15
+ key: string;
16
+ }): CancelablePromise<any>;
17
+ }
@@ -0,0 +1,30 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class MockStorageService {
4
+ /**
5
+ * @returns any OK
6
+ * @throws ApiError
7
+ */
8
+ static getMockStorage({ key, }) {
9
+ return __request(OpenAPI, {
10
+ method: 'GET',
11
+ url: '/mock-storage/{key}',
12
+ path: {
13
+ 'key': key,
14
+ },
15
+ });
16
+ }
17
+ /**
18
+ * @returns any OK
19
+ * @throws ApiError
20
+ */
21
+ static putMockStorage({ key, }) {
22
+ return __request(OpenAPI, {
23
+ method: 'PUT',
24
+ url: '/mock-storage/{key}',
25
+ path: {
26
+ 'key': key,
27
+ },
28
+ });
29
+ }
30
+ }
@@ -0,0 +1,71 @@
1
+ import type { Document } from '../models/Document';
2
+ import type { DocumentLinkRequest } from '../models/DocumentLinkRequest';
3
+ import type { DocumentUploadRequest } from '../models/DocumentUploadRequest';
4
+ import type { DocumentUploadTicket } from '../models/DocumentUploadTicket';
5
+ import type { CancelablePromise } from '../core/CancelablePromise';
6
+ export declare class ProjectDocumentsService {
7
+ /**
8
+ * Documents attached to an event — supply exactly one of `operationId`/`accrualId`.
9
+ * @returns Document OK
10
+ * @throws ApiError
11
+ */
12
+ static getProjectsDocuments({ projectId, operationId, accrualId, }: {
13
+ projectId: string;
14
+ operationId?: string;
15
+ accrualId?: string;
16
+ }): CancelablePromise<Array<Document>>;
17
+ /**
18
+ * @returns DocumentUploadTicket OK
19
+ * @throws ApiError
20
+ */
21
+ static postProjectsDocuments({ projectId, requestBody, }: {
22
+ projectId: string;
23
+ requestBody?: DocumentUploadRequest;
24
+ }): CancelablePromise<DocumentUploadTicket>;
25
+ /**
26
+ * Delete the whole document (from every event). Unlinked/Pending → hard-delete; linked, Ready → Trash.
27
+ * @returns any OK
28
+ * @throws ApiError
29
+ */
30
+ static deleteProjectsDocuments({ projectId, documentId, }: {
31
+ projectId: string;
32
+ documentId: string;
33
+ }): CancelablePromise<any>;
34
+ /**
35
+ * @returns Document OK
36
+ * @throws ApiError
37
+ */
38
+ static getProjectsDocuments1({ projectId, documentId, }: {
39
+ projectId: string;
40
+ documentId: string;
41
+ }): CancelablePromise<Document>;
42
+ /**
43
+ * @returns Document OK
44
+ * @throws ApiError
45
+ */
46
+ static postProjectsDocumentsComplete({ projectId, documentId, }: {
47
+ projectId: string;
48
+ documentId: string;
49
+ }): CancelablePromise<Document>;
50
+ /**
51
+ * Detach a document from one event — supply exactly one of `operationId`/`accrualId`.
52
+ * @returns any OK
53
+ * @throws ApiError
54
+ */
55
+ static deleteProjectsDocumentsLinks({ projectId, documentId, operationId, accrualId, }: {
56
+ projectId: string;
57
+ documentId: string;
58
+ operationId?: string;
59
+ accrualId?: string;
60
+ }): CancelablePromise<any>;
61
+ /**
62
+ * Attach a document to an event (many-to-many) — the body sets exactly one of the two event ids.
63
+ * @returns any OK
64
+ * @throws ApiError
65
+ */
66
+ static postProjectsDocumentsLinks({ projectId, documentId, requestBody, }: {
67
+ projectId: string;
68
+ documentId: string;
69
+ requestBody?: DocumentLinkRequest;
70
+ }): CancelablePromise<any>;
71
+ }
@@ -0,0 +1,116 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class ProjectDocumentsService {
4
+ /**
5
+ * Documents attached to an event — supply exactly one of `operationId`/`accrualId`.
6
+ * @returns Document OK
7
+ * @throws ApiError
8
+ */
9
+ static getProjectsDocuments({ projectId, operationId, accrualId, }) {
10
+ return __request(OpenAPI, {
11
+ method: 'GET',
12
+ url: '/projects/{projectId}/documents',
13
+ path: {
14
+ 'projectId': projectId,
15
+ },
16
+ query: {
17
+ 'operationId': operationId,
18
+ 'accrualId': accrualId,
19
+ },
20
+ });
21
+ }
22
+ /**
23
+ * @returns DocumentUploadTicket OK
24
+ * @throws ApiError
25
+ */
26
+ static postProjectsDocuments({ projectId, requestBody, }) {
27
+ return __request(OpenAPI, {
28
+ method: 'POST',
29
+ url: '/projects/{projectId}/documents',
30
+ path: {
31
+ 'projectId': projectId,
32
+ },
33
+ body: requestBody,
34
+ mediaType: 'application/json',
35
+ });
36
+ }
37
+ /**
38
+ * Delete the whole document (from every event). Unlinked/Pending → hard-delete; linked, Ready → Trash.
39
+ * @returns any OK
40
+ * @throws ApiError
41
+ */
42
+ static deleteProjectsDocuments({ projectId, documentId, }) {
43
+ return __request(OpenAPI, {
44
+ method: 'DELETE',
45
+ url: '/projects/{projectId}/documents/{documentId}',
46
+ path: {
47
+ 'projectId': projectId,
48
+ 'documentId': documentId,
49
+ },
50
+ });
51
+ }
52
+ /**
53
+ * @returns Document OK
54
+ * @throws ApiError
55
+ */
56
+ static getProjectsDocuments1({ projectId, documentId, }) {
57
+ return __request(OpenAPI, {
58
+ method: 'GET',
59
+ url: '/projects/{projectId}/documents/{documentId}',
60
+ path: {
61
+ 'projectId': projectId,
62
+ 'documentId': documentId,
63
+ },
64
+ });
65
+ }
66
+ /**
67
+ * @returns Document OK
68
+ * @throws ApiError
69
+ */
70
+ static postProjectsDocumentsComplete({ projectId, documentId, }) {
71
+ return __request(OpenAPI, {
72
+ method: 'POST',
73
+ url: '/projects/{projectId}/documents/{documentId}/complete',
74
+ path: {
75
+ 'projectId': projectId,
76
+ 'documentId': documentId,
77
+ },
78
+ });
79
+ }
80
+ /**
81
+ * Detach a document from one event — supply exactly one of `operationId`/`accrualId`.
82
+ * @returns any OK
83
+ * @throws ApiError
84
+ */
85
+ static deleteProjectsDocumentsLinks({ projectId, documentId, operationId, accrualId, }) {
86
+ return __request(OpenAPI, {
87
+ method: 'DELETE',
88
+ url: '/projects/{projectId}/documents/{documentId}/links',
89
+ path: {
90
+ 'projectId': projectId,
91
+ 'documentId': documentId,
92
+ },
93
+ query: {
94
+ 'operationId': operationId,
95
+ 'accrualId': accrualId,
96
+ },
97
+ });
98
+ }
99
+ /**
100
+ * Attach a document to an event (many-to-many) — the body sets exactly one of the two event ids.
101
+ * @returns any OK
102
+ * @throws ApiError
103
+ */
104
+ static postProjectsDocumentsLinks({ projectId, documentId, requestBody, }) {
105
+ return __request(OpenAPI, {
106
+ method: 'POST',
107
+ url: '/projects/{projectId}/documents/{documentId}/links',
108
+ path: {
109
+ 'projectId': projectId,
110
+ 'documentId': documentId,
111
+ },
112
+ body: requestBody,
113
+ mediaType: 'application/json',
114
+ });
115
+ }
116
+ }
@@ -44,7 +44,7 @@ export declare class TrashService {
44
44
  * type list — used for the route type segment, the Trash service dispatch, and Incomy.Platform.Hub.Models.TrashItem.Type.
45
45
  * Serializes PascalCase ("Project", "MultiEvent", …); route binding is case-insensitive.
46
46
  */
47
- type: 'Project' | 'MultiEvent' | 'Operation' | 'Accrual' | 'Wallet' | 'Member' | 'Bucket' | 'Company' | 'Template' | 'Label';
47
+ type: 'Project' | 'MultiEvent' | 'Operation' | 'Accrual' | 'Wallet' | 'Member' | 'Bucket' | 'Company' | 'Template' | 'Label' | 'Document';
48
48
  id: string;
49
49
  restoreOwners?: boolean;
50
50
  }): CancelablePromise<TrashTask>;
package/meta.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
- "sdkVersion": "0.6.0-beta.2343",
3
- "generatedAt": "2026-07-08T21:14:28.072Z",
4
- "apiCommit": "2d32f927",
5
- "pipelineUrl": "https://gitlab.com/incomy/platform/-/pipelines/2662928133",
2
+ "sdkVersion": "0.6.0-beta.2408",
3
+ "generatedAt": "2026-07-12T19:32:41.308Z",
4
+ "apiCommit": "8fffd1d9",
5
+ "pipelineUrl": "https://gitlab.com/incomy/platform/-/pipelines/2671011355",
6
6
  "sources": {
7
7
  "hub": {
8
- "sha256": "38cdf76b0972a6a7a814d7815254a3078e393abca5ed066251588c4900f21ae0"
8
+ "sha256": "30dae3f929ec253bba0b94e1276e72296b00952c293445bdc0347a56c4811d75"
9
9
  }
10
10
  }
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incomy/platform-sdk",
3
- "version": "0.6.0-beta.2343",
3
+ "version": "0.6.0-beta.2408",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [