@incomy/platform-sdk 0.6.1-beta.2464 → 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.
- package/dist/services/hub/index.d.ts +1 -0
- package/dist/services/hub/models/Accrual.d.ts +2 -0
- package/dist/services/hub/models/AccrualEdit.d.ts +2 -0
- package/dist/services/hub/models/AccrualInsert.d.ts +2 -0
- package/dist/services/hub/models/AppliedTemplate.d.ts +19 -0
- package/dist/services/hub/models/AppliedTemplate.js +1 -0
- package/dist/services/hub/models/LogAccrual.d.ts +2 -0
- package/dist/services/hub/models/LogOperation.d.ts +2 -0
- package/dist/services/hub/models/Operation.d.ts +2 -0
- package/dist/services/hub/models/OperationEdit.d.ts +2 -0
- package/dist/services/hub/models/OperationInsert.d.ts +2 -0
- package/dist/services/hub/models/TemplateDefinition.d.ts +7 -1
- package/dist/services/hub/services/TemplatesService.d.ts +13 -0
- package/dist/services/hub/services/TemplatesService.js +18 -0
- package/meta.json +5 -5
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ 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';
|
|
11
12
|
export type { BalanceTimeline } from './models/BalanceTimeline';
|
|
@@ -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;
|
|
@@ -37,6 +38,7 @@ export type Accrual = {
|
|
|
37
38
|
multiEventId?: string | null;
|
|
38
39
|
name: string;
|
|
39
40
|
occurredAt: string;
|
|
41
|
+
template?: TemplateInfo;
|
|
40
42
|
/**
|
|
41
43
|
* If null, the target is the project itself.
|
|
42
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
|
/**
|
|
@@ -24,6 +25,7 @@ export type AccrualEdit = {
|
|
|
24
25
|
multiEventId?: string | null;
|
|
25
26
|
name?: string | null;
|
|
26
27
|
occurredAt?: string | null;
|
|
28
|
+
template?: TemplateInfo;
|
|
27
29
|
/**
|
|
28
30
|
* If null, the target is the Project itself.
|
|
29
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;
|
|
@@ -30,6 +31,7 @@ export type AccrualInsert = {
|
|
|
30
31
|
* When left empty: if is linked to a multievent its time will be used, otherwise server time at creation
|
|
31
32
|
*/
|
|
32
33
|
occurredAt?: string | null;
|
|
34
|
+
template?: TemplateInfo;
|
|
33
35
|
/**
|
|
34
36
|
* If null, the target is the project itself.
|
|
35
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 {};
|
|
@@ -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;
|
|
@@ -39,6 +40,7 @@ export type LogAccrual = {
|
|
|
39
40
|
multiEventId?: string | null;
|
|
40
41
|
name: string;
|
|
41
42
|
occurredAt: string;
|
|
43
|
+
template?: TemplateInfo;
|
|
42
44
|
/**
|
|
43
45
|
* If null, the target is the project itself.
|
|
44
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;
|
|
@@ -36,6 +37,7 @@ export type LogOperation = {
|
|
|
36
37
|
originWalletId?: string | null;
|
|
37
38
|
targetCompanyId?: string | null;
|
|
38
39
|
targetWalletId?: string | null;
|
|
40
|
+
template?: TemplateInfo;
|
|
39
41
|
time: string;
|
|
40
42
|
type: 'in' | 'out' | 'transfer';
|
|
41
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
|
/**
|
|
@@ -34,6 +35,7 @@ export type Operation = {
|
|
|
34
35
|
originWalletId?: string | null;
|
|
35
36
|
targetCompanyId?: string | null;
|
|
36
37
|
targetWalletId?: string | null;
|
|
38
|
+
template?: TemplateInfo;
|
|
37
39
|
time: string;
|
|
38
40
|
type: 'in' | 'out' | 'transfer';
|
|
39
41
|
};
|
|
@@ -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 OperationEdit = {
|
|
4
5
|
bucketBreakdown?: Array<BucketBreakdown> | null;
|
|
5
6
|
/**
|
|
@@ -33,6 +34,7 @@ export type OperationEdit = {
|
|
|
33
34
|
* Set to "" in order to clear.
|
|
34
35
|
*/
|
|
35
36
|
targetWalletId?: string | null;
|
|
37
|
+
template?: TemplateInfo;
|
|
36
38
|
time?: string | null;
|
|
37
39
|
type?: 'in' | 'out' | 'transfer' | null;
|
|
38
40
|
};
|
|
@@ -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 OperationInsert = {
|
|
4
5
|
bucketBreakdown?: Array<BucketBreakdown> | null;
|
|
5
6
|
/**
|
|
@@ -24,6 +25,7 @@ export type OperationInsert = {
|
|
|
24
25
|
originWalletId?: string | null;
|
|
25
26
|
targetCompanyId?: string | null;
|
|
26
27
|
targetWalletId?: string | null;
|
|
28
|
+
template?: TemplateInfo;
|
|
27
29
|
/**
|
|
28
30
|
* MultiEvent time will be used if left empty
|
|
29
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
|
-
|
|
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
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { AppliedTemplate } from '../models/AppliedTemplate';
|
|
1
2
|
import type { Template } from '../models/Template';
|
|
2
3
|
import type { TemplateEdit } from '../models/TemplateEdit';
|
|
4
|
+
import type { TemplateInput } from '../models/TemplateInput';
|
|
3
5
|
import type { TemplateInsert } from '../models/TemplateInsert';
|
|
4
6
|
import type { TemplatePaginatedList } from '../models/TemplatePaginatedList';
|
|
5
7
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
@@ -48,4 +50,15 @@ export declare class TemplatesService {
|
|
|
48
50
|
templateId: string;
|
|
49
51
|
requestBody?: TemplateEdit;
|
|
50
52
|
}): CancelablePromise<Template>;
|
|
53
|
+
/**
|
|
54
|
+
* Applies a template with the given input values, creating the entity it describes — a standalone operation
|
|
55
|
+
* or accrual, or a multievent group — and returning the created entity discriminated by kind.
|
|
56
|
+
* @returns AppliedTemplate OK
|
|
57
|
+
* @throws ApiError
|
|
58
|
+
*/
|
|
59
|
+
static postProjectsTemplatesApply({ projectId, templateId, requestBody, }: {
|
|
60
|
+
projectId: string;
|
|
61
|
+
templateId: string;
|
|
62
|
+
requestBody?: TemplateInput;
|
|
63
|
+
}): CancelablePromise<AppliedTemplate>;
|
|
51
64
|
}
|
|
@@ -79,4 +79,22 @@ export class TemplatesService {
|
|
|
79
79
|
mediaType: 'application/json',
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Applies a template with the given input values, creating the entity it describes — a standalone operation
|
|
84
|
+
* or accrual, or a multievent group — and returning the created entity discriminated by kind.
|
|
85
|
+
* @returns AppliedTemplate OK
|
|
86
|
+
* @throws ApiError
|
|
87
|
+
*/
|
|
88
|
+
static postProjectsTemplatesApply({ projectId, templateId, requestBody, }) {
|
|
89
|
+
return __request(OpenAPI, {
|
|
90
|
+
method: 'POST',
|
|
91
|
+
url: '/projects/{projectId}/templates/{templateId}/apply',
|
|
92
|
+
path: {
|
|
93
|
+
'projectId': projectId,
|
|
94
|
+
'templateId': templateId,
|
|
95
|
+
},
|
|
96
|
+
body: requestBody,
|
|
97
|
+
mediaType: 'application/json',
|
|
98
|
+
});
|
|
99
|
+
}
|
|
82
100
|
}
|
package/meta.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"sdkVersion": "0.6.1-beta.
|
|
3
|
-
"generatedAt": "2026-07-
|
|
4
|
-
"apiCommit": "
|
|
5
|
-
"pipelineUrl": "https://gitlab.com/incomy/platform/-/pipelines/
|
|
2
|
+
"sdkVersion": "0.6.1-beta.2501",
|
|
3
|
+
"generatedAt": "2026-07-16T21:50:08.266Z",
|
|
4
|
+
"apiCommit": "1bd63c91",
|
|
5
|
+
"pipelineUrl": "https://gitlab.com/incomy/platform/-/pipelines/2683078023",
|
|
6
6
|
"sources": {
|
|
7
7
|
"hub": {
|
|
8
|
-
"sha256": "
|
|
8
|
+
"sha256": "c6182e4e8a190a63fe6f9427235c7b7704cd7fbbe28950285685a571dd0a018c"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
}
|