@incomy/platform-sdk 0.6.0 → 0.6.1-beta.2501

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 (60) hide show
  1. package/dist/services/hub/index.d.ts +9 -0
  2. package/dist/services/hub/index.js +2 -0
  3. package/dist/services/hub/models/Accrual.d.ts +12 -0
  4. package/dist/services/hub/models/AccrualEdit.d.ts +6 -0
  5. package/dist/services/hub/models/AccrualInsert.d.ts +12 -0
  6. package/dist/services/hub/models/AppliedTemplate.d.ts +19 -0
  7. package/dist/services/hub/models/AppliedTemplate.js +1 -0
  8. package/dist/services/hub/models/BalanceTimeline.d.ts +17 -0
  9. package/dist/services/hub/models/BalanceTimeline.js +1 -0
  10. package/dist/services/hub/models/BalanceTimelinePoint.d.ts +19 -0
  11. package/dist/services/hub/models/BalanceTimelinePoint.js +1 -0
  12. package/dist/services/hub/models/Document.d.ts +30 -0
  13. package/dist/services/hub/models/Document.js +1 -0
  14. package/dist/services/hub/models/DocumentLinkRequest.d.ts +7 -0
  15. package/dist/services/hub/models/DocumentLinkRequest.js +1 -0
  16. package/dist/services/hub/models/DocumentUploadRequest.d.ts +8 -0
  17. package/dist/services/hub/models/DocumentUploadRequest.js +1 -0
  18. package/dist/services/hub/models/DocumentUploadTicket.d.ts +22 -0
  19. package/dist/services/hub/models/DocumentUploadTicket.js +1 -0
  20. package/dist/services/hub/models/LogAccrual.d.ts +12 -0
  21. package/dist/services/hub/models/LogOperation.d.ts +12 -0
  22. package/dist/services/hub/models/Operation.d.ts +12 -0
  23. package/dist/services/hub/models/OperationEdit.d.ts +6 -0
  24. package/dist/services/hub/models/OperationInsert.d.ts +12 -0
  25. package/dist/services/hub/models/TemplateDefinition.d.ts +7 -1
  26. package/dist/services/hub/models/TrashItem.d.ts +1 -1
  27. package/dist/services/hub/services/AccrualsService.d.ts +27 -22
  28. package/dist/services/hub/services/AccrualsService.js +5 -22
  29. package/dist/services/hub/services/AuthService.d.ts +12 -8
  30. package/dist/services/hub/services/AuthService.js +4 -8
  31. package/dist/services/hub/services/BucketsService.d.ts +24 -19
  32. package/dist/services/hub/services/BucketsService.js +5 -19
  33. package/dist/services/hub/services/CompaniesService.d.ts +24 -19
  34. package/dist/services/hub/services/CompaniesService.js +5 -19
  35. package/dist/services/hub/services/DeletedProjectsService.d.ts +10 -7
  36. package/dist/services/hub/services/DeletedProjectsService.js +3 -7
  37. package/dist/services/hub/services/LabelsService.d.ts +24 -19
  38. package/dist/services/hub/services/LabelsService.js +5 -19
  39. package/dist/services/hub/services/MembersService.d.ts +37 -25
  40. package/dist/services/hub/services/MembersService.js +12 -25
  41. package/dist/services/hub/services/MockStorageService.d.ts +17 -0
  42. package/dist/services/hub/services/MockStorageService.js +30 -0
  43. package/dist/services/hub/services/MultiEventsService.d.ts +28 -23
  44. package/dist/services/hub/services/MultiEventsService.js +5 -23
  45. package/dist/services/hub/services/OperationsService.d.ts +32 -27
  46. package/dist/services/hub/services/OperationsService.js +5 -27
  47. package/dist/services/hub/services/ProjectDocumentsService.d.ts +71 -0
  48. package/dist/services/hub/services/ProjectDocumentsService.js +116 -0
  49. package/dist/services/hub/services/ProjectWalletsService.d.ts +37 -25
  50. package/dist/services/hub/services/ProjectWalletsService.js +12 -25
  51. package/dist/services/hub/services/ProjectsService.d.ts +83 -43
  52. package/dist/services/hub/services/ProjectsService.js +49 -43
  53. package/dist/services/hub/services/TemplatesService.d.ts +37 -19
  54. package/dist/services/hub/services/TemplatesService.js +23 -19
  55. package/dist/services/hub/services/TrashService.d.ts +24 -17
  56. package/dist/services/hub/services/TrashService.js +4 -17
  57. package/dist/services/hub/services/UserSettingsService.d.ts +3 -2
  58. package/dist/services/hub/services/UserSettingsService.js +1 -2
  59. package/meta.json +5 -5
  60. package/package.json +1 -1
@@ -6,8 +6,11 @@ export type { Accrual } from './models/Accrual';
6
6
  export type { AccrualEdit } from './models/AccrualEdit';
7
7
  export type { AccrualInsert } from './models/AccrualInsert';
8
8
  export type { AccrualPaginatedList } from './models/AccrualPaginatedList';
9
+ export type { AppliedTemplate } from './models/AppliedTemplate';
9
10
  export type { Balance } from './models/Balance';
10
11
  export type { BalanceReport } from './models/BalanceReport';
12
+ export type { BalanceTimeline } from './models/BalanceTimeline';
13
+ export type { BalanceTimelinePoint } from './models/BalanceTimelinePoint';
11
14
  export type { Bucket } from './models/Bucket';
12
15
  export type { BucketableBalance } from './models/BucketableBalance';
13
16
  export type { BucketBalance } from './models/BucketBalance';
@@ -20,6 +23,10 @@ export type { CompanyEdit } from './models/CompanyEdit';
20
23
  export type { CompanyInsert } from './models/CompanyInsert';
21
24
  export type { CompanyPaginatedList } from './models/CompanyPaginatedList';
22
25
  export type { CurrencyInfo } from './models/CurrencyInfo';
26
+ export type { Document } from './models/Document';
27
+ export type { DocumentLinkRequest } from './models/DocumentLinkRequest';
28
+ export type { DocumentUploadRequest } from './models/DocumentUploadRequest';
29
+ export type { DocumentUploadTicket } from './models/DocumentUploadTicket';
23
30
  export type { Icon } from './models/Icon';
24
31
  export type { InputFieldDefinition } from './models/InputFieldDefinition';
25
32
  export type { Label } from './models/Label';
@@ -94,8 +101,10 @@ export { CurrenciesService } from './services/CurrenciesService';
94
101
  export { DeletedProjectsService } from './services/DeletedProjectsService';
95
102
  export { LabelsService } from './services/LabelsService';
96
103
  export { MembersService } from './services/MembersService';
104
+ export { MockStorageService } from './services/MockStorageService';
97
105
  export { MultiEventsService } from './services/MultiEventsService';
98
106
  export { OperationsService } from './services/OperationsService';
107
+ export { ProjectDocumentsService } from './services/ProjectDocumentsService';
99
108
  export { ProjectsService } from './services/ProjectsService';
100
109
  export { ProjectWalletsService } from './services/ProjectWalletsService';
101
110
  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';
@@ -1,5 +1,6 @@
1
1
  import type { BucketBreakdown } from './BucketBreakdown';
2
2
  import type { Money } from './Money';
3
+ import type { TemplateInfo } from './TemplateInfo';
3
4
  export type Accrual = {
4
5
  bucketBreakdown?: Array<BucketBreakdown> | null;
5
6
  companyId?: string | null;
@@ -17,6 +18,16 @@ export type Accrual = {
17
18
  */
18
19
  deleteWithMultiEventRemoval?: boolean;
19
20
  description?: string | null;
21
+ /**
22
+ * Number of documents attached to this accrual (live, Ready only); 0 when none. Read-only,
23
+ * server-populated on read — see the document-attachments roadmap.
24
+ */
25
+ documentCount?: number;
26
+ /**
27
+ * If true, this accrual is expected to have at least one attached document. Advisory only — the UI warns
28
+ * when none is attached and never blocks saving. The UI auto-sets it when a company is selected.
29
+ */
30
+ documentRequired?: boolean;
20
31
  /**
21
32
  * If null, the source is the project itself.
22
33
  */
@@ -27,6 +38,7 @@ export type Accrual = {
27
38
  multiEventId?: string | null;
28
39
  name: string;
29
40
  occurredAt: string;
41
+ template?: TemplateInfo;
30
42
  /**
31
43
  * If null, the target is the project itself.
32
44
  */
@@ -1,5 +1,6 @@
1
1
  import type { BucketBreakdown } from './BucketBreakdown';
2
2
  import type { Money } from './Money';
3
+ import type { TemplateInfo } from './TemplateInfo';
3
4
  export type AccrualEdit = {
4
5
  bucketBreakdown?: Array<BucketBreakdown> | null;
5
6
  /**
@@ -11,6 +12,10 @@ export type AccrualEdit = {
11
12
  */
12
13
  deleteWithMultiEventRemoval?: boolean | null;
13
14
  description?: string | null;
15
+ /**
16
+ * If provided, sets whether this accrual is expected to have an attached document (advisory). Null leaves it unchanged.
17
+ */
18
+ documentRequired?: boolean | null;
14
19
  /**
15
20
  * If null, the source is the Project itself.
16
21
  */
@@ -20,6 +25,7 @@ export type AccrualEdit = {
20
25
  multiEventId?: string | null;
21
26
  name?: string | null;
22
27
  occurredAt?: string | null;
28
+ template?: TemplateInfo;
23
29
  /**
24
30
  * If null, the target is the Project itself.
25
31
  */
@@ -1,5 +1,6 @@
1
1
  import type { BucketBreakdown } from './BucketBreakdown';
2
2
  import type { Money } from './Money';
3
+ import type { TemplateInfo } from './TemplateInfo';
3
4
  export type AccrualInsert = {
4
5
  bucketBreakdown?: Array<BucketBreakdown> | null;
5
6
  companyId?: string | null;
@@ -8,6 +9,16 @@ export type AccrualInsert = {
8
9
  */
9
10
  deleteWithMultiEventRemoval?: boolean;
10
11
  description?: string | null;
12
+ /**
13
+ * Ids of already-uploaded, still-unlinked project documents to attach to this accrual on create — the
14
+ * upload-first-then-link flow, so a new accrual's documents upload (with real progress) before the accrual
15
+ * exists and are linked here. Each must belong to the project and be unlinked; the per-item document limit applies.
16
+ */
17
+ documentIds?: Array<string> | null;
18
+ /**
19
+ * If true, this accrual is expected to have at least one attached document (advisory). Defaults to false.
20
+ */
21
+ documentRequired?: boolean;
11
22
  /**
12
23
  * If null, the source is the project itself.
13
24
  */
@@ -20,6 +31,7 @@ export type AccrualInsert = {
20
31
  * When left empty: if is linked to a multievent its time will be used, otherwise server time at creation
21
32
  */
22
33
  occurredAt?: string | null;
34
+ template?: TemplateInfo;
23
35
  /**
24
36
  * If null, the target is the project itself.
25
37
  */
@@ -0,0 +1,19 @@
1
+ import type { Accrual } from './Accrual';
2
+ import type { MultiEvent } from './MultiEvent';
3
+ import type { Operation } from './Operation';
4
+ /**
5
+ * Result of applying a template (POST projects/{id}/templates/{templateId}/apply). Exactly one of
6
+ * Incomy.Platform.Hub.Models.AppliedTemplate.MultiEvent / Incomy.Platform.Hub.Models.AppliedTemplate.Operation / Incomy.Platform.Hub.Models.AppliedTemplate.Accrual is populated, selected by
7
+ * Incomy.Platform.Hub.Models.AppliedTemplate.Kind — the same kinds offered in the "Add Event" menu.
8
+ */
9
+ export type AppliedTemplate = {
10
+ accrual?: Accrual;
11
+ /**
12
+ * What a template produces when applied. A single-event template (Incomy.Platform.Hub.Models.TemplateTargetKind.Operation /
13
+ * Incomy.Platform.Hub.Models.TemplateTargetKind.Accrual) yields a standalone log entry; Incomy.Platform.Hub.Models.TemplateTargetKind.MultiEvent yields a group.
14
+ * Incomy.Platform.Hub.Models.TemplateTargetKind.MultiEvent is first so legacy stored definitions (no `kind`) deserialize to it.
15
+ */
16
+ kind: 'multiEvent' | 'operation' | 'accrual';
17
+ multiEvent?: MultiEvent;
18
+ operation?: Operation;
19
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { BalanceTimelinePoint } from './BalanceTimelinePoint';
2
+ /**
3
+ * A balance-over-time series for a project, sampled at a fixed Incomy.Platform.Hub.Models.BalanceTimeline.Interval. Each point carries two
4
+ * per-currency figures: Incomy.Platform.Hub.Models.BalanceTimelinePoint.Actual (wallet state derived from operations —
5
+ * historical only, so it is empty for points after Incomy.Platform.Hub.Models.BalanceTimeline.Now) and
6
+ * Incomy.Platform.Hub.Models.BalanceTimelinePoint.Effective (actual combined with accruals — it may extend past
7
+ * Incomy.Platform.Hub.Models.BalanceTimeline.Now as a prediction driven by future-dated accruals). No FX conversion is applied: every
8
+ * figure is a list with one entry per currency.
9
+ */
10
+ export type BalanceTimeline = {
11
+ interval: 'day' | 'week' | 'month';
12
+ /**
13
+ * Server "now": the boundary between realized history and prediction. Points dated after this are projections.
14
+ */
15
+ now: string;
16
+ points: Array<BalanceTimelinePoint>;
17
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { Money } from './Money';
2
+ export type BalanceTimelinePoint = {
3
+ /**
4
+ * Wallet state from operations, per currency. Empty for projection points (dated after Incomy.Platform.Hub.Models.BalanceTimeline.Now).
5
+ */
6
+ actual: Array<Money>;
7
+ /**
8
+ * Bucket start, aligned to Incomy.Platform.Hub.Models.BalanceTimeline.Interval. The values are the closing balance of the bucket.
9
+ */
10
+ date: string;
11
+ /**
12
+ * Actual balance combined with accruals, per currency. Spans the whole horizon, including the prediction tail.
13
+ */
14
+ effective: Array<Money>;
15
+ /**
16
+ * True when Incomy.Platform.Hub.Models.BalanceTimelinePoint.Date is after Incomy.Platform.Hub.Models.BalanceTimeline.Now — a predicted point rather than realized history.
17
+ */
18
+ isProjection: boolean;
19
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -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 {};
@@ -1,6 +1,7 @@
1
1
  import type { BalanceReport } from './BalanceReport';
2
2
  import type { BucketBreakdown } from './BucketBreakdown';
3
3
  import type { Money } from './Money';
4
+ import type { TemplateInfo } from './TemplateInfo';
4
5
  export type LogAccrual = {
5
6
  balance?: BalanceReport;
6
7
  bucketBreakdown?: Array<BucketBreakdown> | null;
@@ -19,6 +20,16 @@ export type LogAccrual = {
19
20
  */
20
21
  deleteWithMultiEventRemoval?: boolean;
21
22
  description?: string | null;
23
+ /**
24
+ * Number of documents attached to this accrual (live, Ready only); 0 when none. Read-only,
25
+ * server-populated on read — see the document-attachments roadmap.
26
+ */
27
+ documentCount?: number;
28
+ /**
29
+ * If true, this accrual is expected to have at least one attached document. Advisory only — the UI warns
30
+ * when none is attached and never blocks saving. The UI auto-sets it when a company is selected.
31
+ */
32
+ documentRequired?: boolean;
22
33
  /**
23
34
  * If null, the source is the project itself.
24
35
  */
@@ -29,6 +40,7 @@ export type LogAccrual = {
29
40
  multiEventId?: string | null;
30
41
  name: string;
31
42
  occurredAt: string;
43
+ template?: TemplateInfo;
32
44
  /**
33
45
  * If null, the target is the project itself.
34
46
  */
@@ -1,6 +1,7 @@
1
1
  import type { BalanceReport } from './BalanceReport';
2
2
  import type { BucketBreakdown } from './BucketBreakdown';
3
3
  import type { Money } from './Money';
4
+ import type { TemplateInfo } from './TemplateInfo';
4
5
  export type LogOperation = {
5
6
  balance?: BalanceReport;
6
7
  bucketBreakdown?: Array<BucketBreakdown> | null;
@@ -17,6 +18,16 @@ export type LogOperation = {
17
18
  * If set, operation will be deleted when unlined from a multievent or when linked multievent is deleted.
18
19
  */
19
20
  deleteWithMultiEventRemoval?: boolean;
21
+ /**
22
+ * Number of documents attached to this operation (live, Ready only); 0 when none. Read-only,
23
+ * server-populated on read — see the document-attachments roadmap.
24
+ */
25
+ documentCount?: number;
26
+ /**
27
+ * If true, this operation is expected to have at least one attached document. Advisory only — the UI warns
28
+ * when none is attached and never blocks saving. The UI auto-sets it when a company is selected.
29
+ */
30
+ documentRequired?: boolean;
20
31
  id: string;
21
32
  labelIds: Array<string>;
22
33
  money: Money;
@@ -26,6 +37,7 @@ export type LogOperation = {
26
37
  originWalletId?: string | null;
27
38
  targetCompanyId?: string | null;
28
39
  targetWalletId?: string | null;
40
+ template?: TemplateInfo;
29
41
  time: string;
30
42
  type: 'in' | 'out' | 'transfer';
31
43
  };
@@ -1,5 +1,6 @@
1
1
  import type { BucketBreakdown } from './BucketBreakdown';
2
2
  import type { Money } from './Money';
3
+ import type { TemplateInfo } from './TemplateInfo';
3
4
  export type Operation = {
4
5
  bucketBreakdown?: Array<BucketBreakdown> | null;
5
6
  /**
@@ -15,6 +16,16 @@ export type Operation = {
15
16
  * If set, operation will be deleted when unlined from a multievent or when linked multievent is deleted.
16
17
  */
17
18
  deleteWithMultiEventRemoval?: boolean;
19
+ /**
20
+ * Number of documents attached to this operation (live, Ready only); 0 when none. Read-only,
21
+ * server-populated on read — see the document-attachments roadmap.
22
+ */
23
+ documentCount?: number;
24
+ /**
25
+ * If true, this operation is expected to have at least one attached document. Advisory only — the UI warns
26
+ * when none is attached and never blocks saving. The UI auto-sets it when a company is selected.
27
+ */
28
+ documentRequired?: boolean;
18
29
  id: string;
19
30
  labelIds: Array<string>;
20
31
  money: Money;
@@ -24,6 +35,7 @@ export type Operation = {
24
35
  originWalletId?: string | null;
25
36
  targetCompanyId?: string | null;
26
37
  targetWalletId?: string | null;
38
+ template?: TemplateInfo;
27
39
  time: string;
28
40
  type: 'in' | 'out' | 'transfer';
29
41
  };
@@ -1,11 +1,16 @@
1
1
  import type { BucketBreakdown } from './BucketBreakdown';
2
2
  import type { Money } from './Money';
3
+ import type { TemplateInfo } from './TemplateInfo';
3
4
  export type OperationEdit = {
4
5
  bucketBreakdown?: Array<BucketBreakdown> | null;
5
6
  /**
6
7
  * If set, operation will be deleted when unlined from a multievent or when linked multievent is deleted.
7
8
  */
8
9
  deleteWithMultiEventRemoval?: boolean | null;
10
+ /**
11
+ * If provided, sets whether this operation is expected to have an attached document (advisory). Null leaves it unchanged.
12
+ */
13
+ documentRequired?: boolean | null;
9
14
  labelIds?: Array<string> | null;
10
15
  money?: Money;
11
16
  /**
@@ -29,6 +34,7 @@ export type OperationEdit = {
29
34
  * Set to "" in order to clear.
30
35
  */
31
36
  targetWalletId?: string | null;
37
+ template?: TemplateInfo;
32
38
  time?: string | null;
33
39
  type?: 'in' | 'out' | 'transfer' | null;
34
40
  };
@@ -1,11 +1,22 @@
1
1
  import type { BucketBreakdown } from './BucketBreakdown';
2
2
  import type { Money } from './Money';
3
+ import type { TemplateInfo } from './TemplateInfo';
3
4
  export type OperationInsert = {
4
5
  bucketBreakdown?: Array<BucketBreakdown> | null;
5
6
  /**
6
7
  * If set, operation will be deleted when unlined from a multievent or when linked multievent is deleted.
7
8
  */
8
9
  deleteWithMultiEventRemoval?: boolean;
10
+ /**
11
+ * Ids of already-uploaded, still-unlinked project documents to attach to this operation on create — the
12
+ * upload-first-then-link flow, so a new operation's documents upload (with real progress) before the operation
13
+ * exists and are linked here. Each must belong to the project and be unlinked; the per-item document limit applies.
14
+ */
15
+ documentIds?: Array<string> | null;
16
+ /**
17
+ * If true, this operation is expected to have at least one attached document (advisory). Defaults to false.
18
+ */
19
+ documentRequired?: boolean;
9
20
  labelIds?: Array<string> | null;
10
21
  money: Money;
11
22
  multiEventId?: string | null;
@@ -14,6 +25,7 @@ export type OperationInsert = {
14
25
  originWalletId?: string | null;
15
26
  targetCompanyId?: string | null;
16
27
  targetWalletId?: string | null;
28
+ template?: TemplateInfo;
17
29
  /**
18
30
  * MultiEvent time will be used if left empty
19
31
  */
@@ -5,6 +5,12 @@ import type { TemplateOperationDefinition } from './TemplateOperationDefinition'
5
5
  export type TemplateDefinition = {
6
6
  accrualDefinitions: Array<TemplateAccrualDefinition>;
7
7
  inputDefinition: TemplateInputDefinition;
8
- multiEventDefinition: TemplateMultiEventDefinition;
8
+ /**
9
+ * What a template produces when applied. A single-event template (Incomy.Platform.Hub.Models.TemplateTargetKind.Operation /
10
+ * Incomy.Platform.Hub.Models.TemplateTargetKind.Accrual) yields a standalone log entry; Incomy.Platform.Hub.Models.TemplateTargetKind.MultiEvent yields a group.
11
+ * Incomy.Platform.Hub.Models.TemplateTargetKind.MultiEvent is first so legacy stored definitions (no `kind`) deserialize to it.
12
+ */
13
+ kind?: 'multiEvent' | 'operation' | 'accrual';
14
+ multiEventDefinition?: TemplateMultiEventDefinition;
9
15
  operationDefinitions: Array<TemplateOperationDefinition>;
10
16
  };
@@ -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
  };
@@ -5,45 +5,50 @@ import type { AccrualPaginatedList } from '../models/AccrualPaginatedList';
5
5
  import type { CancelablePromise } from '../core/CancelablePromise';
6
6
  export declare class AccrualsService {
7
7
  /**
8
- * @param projectId
9
- * @param memberId
10
- * @param query
11
- * @param standaloneOnly
12
- * @param orderByName
13
- * @param orderByTime
14
- * @param limit
15
- * @param next
16
8
  * @returns AccrualPaginatedList OK
17
9
  * @throws ApiError
18
10
  */
19
- static getProjectsAccruals(projectId: string, memberId?: string, query?: string, standaloneOnly?: boolean, orderByName?: 'Desc' | 'Asc', orderByTime?: 'Desc' | 'Asc', limit?: number, next?: string): CancelablePromise<AccrualPaginatedList>;
11
+ static getProjectsAccruals({ projectId, memberId, query, standaloneOnly, orderByName, orderByTime, limit, next, }: {
12
+ projectId: string;
13
+ memberId?: string;
14
+ query?: string;
15
+ standaloneOnly?: boolean;
16
+ orderByName?: 'Desc' | 'Asc';
17
+ orderByTime?: 'Desc' | 'Asc';
18
+ limit?: number;
19
+ next?: string;
20
+ }): CancelablePromise<AccrualPaginatedList>;
20
21
  /**
21
- * @param projectId
22
- * @param requestBody
23
22
  * @returns Accrual OK
24
23
  * @throws ApiError
25
24
  */
26
- static postProjectsAccruals(projectId: string, requestBody?: AccrualInsert): CancelablePromise<Accrual>;
25
+ static postProjectsAccruals({ projectId, requestBody, }: {
26
+ projectId: string;
27
+ requestBody?: AccrualInsert;
28
+ }): CancelablePromise<Accrual>;
27
29
  /**
28
- * @param projectId
29
- * @param accrualId
30
30
  * @returns any OK
31
31
  * @throws ApiError
32
32
  */
33
- static deleteProjectsAccruals(projectId: string, accrualId: string): CancelablePromise<any>;
33
+ static deleteProjectsAccruals({ projectId, accrualId, }: {
34
+ projectId: string;
35
+ accrualId: string;
36
+ }): CancelablePromise<any>;
34
37
  /**
35
- * @param projectId
36
- * @param accrualId
37
38
  * @returns Accrual OK
38
39
  * @throws ApiError
39
40
  */
40
- static getProjectsAccruals1(projectId: string, accrualId: string): CancelablePromise<Accrual>;
41
+ static getProjectsAccruals1({ projectId, accrualId, }: {
42
+ projectId: string;
43
+ accrualId: string;
44
+ }): CancelablePromise<Accrual>;
41
45
  /**
42
- * @param projectId
43
- * @param accrualId
44
- * @param requestBody
45
46
  * @returns Accrual OK
46
47
  * @throws ApiError
47
48
  */
48
- static patchProjectsAccruals(projectId: string, accrualId: string, requestBody?: AccrualEdit): CancelablePromise<Accrual>;
49
+ static patchProjectsAccruals({ projectId, accrualId, requestBody, }: {
50
+ projectId: string;
51
+ accrualId: string;
52
+ requestBody?: AccrualEdit;
53
+ }): CancelablePromise<Accrual>;
49
54
  }
@@ -2,18 +2,10 @@ import { OpenAPI } from '../core/OpenAPI';
2
2
  import { request as __request } from '../core/request';
3
3
  export class AccrualsService {
4
4
  /**
5
- * @param projectId
6
- * @param memberId
7
- * @param query
8
- * @param standaloneOnly
9
- * @param orderByName
10
- * @param orderByTime
11
- * @param limit
12
- * @param next
13
5
  * @returns AccrualPaginatedList OK
14
6
  * @throws ApiError
15
7
  */
16
- static getProjectsAccruals(projectId, memberId, query, standaloneOnly = false, orderByName, orderByTime, limit = 100, next) {
8
+ static getProjectsAccruals({ projectId, memberId, query, standaloneOnly = false, orderByName, orderByTime, limit = 100, next, }) {
17
9
  return __request(OpenAPI, {
18
10
  method: 'GET',
19
11
  url: '/projects/{projectId}/accruals',
@@ -32,12 +24,10 @@ export class AccrualsService {
32
24
  });
33
25
  }
34
26
  /**
35
- * @param projectId
36
- * @param requestBody
37
27
  * @returns Accrual OK
38
28
  * @throws ApiError
39
29
  */
40
- static postProjectsAccruals(projectId, requestBody) {
30
+ static postProjectsAccruals({ projectId, requestBody, }) {
41
31
  return __request(OpenAPI, {
42
32
  method: 'POST',
43
33
  url: '/projects/{projectId}/accruals',
@@ -49,12 +39,10 @@ export class AccrualsService {
49
39
  });
50
40
  }
51
41
  /**
52
- * @param projectId
53
- * @param accrualId
54
42
  * @returns any OK
55
43
  * @throws ApiError
56
44
  */
57
- static deleteProjectsAccruals(projectId, accrualId) {
45
+ static deleteProjectsAccruals({ projectId, accrualId, }) {
58
46
  return __request(OpenAPI, {
59
47
  method: 'DELETE',
60
48
  url: '/projects/{projectId}/accruals/{accrualId}',
@@ -65,12 +53,10 @@ export class AccrualsService {
65
53
  });
66
54
  }
67
55
  /**
68
- * @param projectId
69
- * @param accrualId
70
56
  * @returns Accrual OK
71
57
  * @throws ApiError
72
58
  */
73
- static getProjectsAccruals1(projectId, accrualId) {
59
+ static getProjectsAccruals1({ projectId, accrualId, }) {
74
60
  return __request(OpenAPI, {
75
61
  method: 'GET',
76
62
  url: '/projects/{projectId}/accruals/{accrualId}',
@@ -81,13 +67,10 @@ export class AccrualsService {
81
67
  });
82
68
  }
83
69
  /**
84
- * @param projectId
85
- * @param accrualId
86
- * @param requestBody
87
70
  * @returns Accrual OK
88
71
  * @throws ApiError
89
72
  */
90
- static patchProjectsAccruals(projectId, accrualId, requestBody) {
73
+ static patchProjectsAccruals({ projectId, accrualId, requestBody, }) {
91
74
  return __request(OpenAPI, {
92
75
  method: 'PATCH',
93
76
  url: '/projects/{projectId}/accruals/{accrualId}',