@mittwald/api-models 4.62.0 → 4.64.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.
- package/dist/esm/article/Article/Article.js +79 -0
- package/dist/esm/article/Article/behaviors/api.js +22 -0
- package/dist/esm/article/Article/behaviors/index.js +2 -0
- package/dist/esm/article/Article/behaviors/types.js +1 -0
- package/dist/esm/article/Article/index.js +2 -0
- package/dist/esm/article/Article/types.js +1 -0
- package/dist/esm/article/index.js +1 -0
- package/dist/esm/base/ListQueryModel.js +4 -2
- package/dist/esm/base/Money.js +5 -0
- package/dist/esm/config/behaviors/api.js +2 -0
- package/dist/esm/config/config.js +1 -0
- package/dist/esm/lib/joinedId.js +1 -0
- package/dist/esm/react/provideReact.js +4 -7
- package/dist/types/app/AppInstallation/behaviors/types.d.ts +1 -1
- package/dist/types/article/Article/Article.d.ts +133 -0
- package/dist/types/article/Article/behaviors/api.d.ts +3 -0
- package/dist/types/article/Article/behaviors/index.d.ts +2 -0
- package/dist/types/article/Article/behaviors/types.d.ts +6 -0
- package/dist/types/article/Article/index.d.ts +2 -0
- package/dist/types/article/Article/types.d.ts +5 -0
- package/dist/types/article/index.d.ts +1 -0
- package/dist/types/base/ListQueryModel.d.ts +5 -1
- package/dist/types/base/Money.d.ts +3 -0
- package/dist/types/config/config.d.ts +2 -0
- package/dist/types/lib/joinedId.d.ts +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ReferenceModel } from "../../base/ReferenceModel.js";
|
|
2
|
+
import { config } from "../../config/config.js";
|
|
3
|
+
import { classes } from "polytype";
|
|
4
|
+
import { DataModel } from "../../base/DataModel.js";
|
|
5
|
+
import assertObjectFound from "../../base/assertObjectFound.js";
|
|
6
|
+
import { provideReact } from "../../react/provideReact.js";
|
|
7
|
+
import { ListQueryModel } from "../../base/ListQueryModel.js";
|
|
8
|
+
import { ListDataModel } from "../../base/ListDataModel.js";
|
|
9
|
+
import { Money } from "../../base/Money.js";
|
|
10
|
+
export class Article extends ReferenceModel {
|
|
11
|
+
static ofId(id) {
|
|
12
|
+
return new Article(id);
|
|
13
|
+
}
|
|
14
|
+
static find = provideReact(async (id) => {
|
|
15
|
+
const data = await config.behaviors.article.find(id);
|
|
16
|
+
if (data !== undefined) {
|
|
17
|
+
return new ArticleDetailed(data);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
static get = provideReact(async (id) => {
|
|
21
|
+
const article = await this.find(id);
|
|
22
|
+
assertObjectFound(article, this, id);
|
|
23
|
+
return article;
|
|
24
|
+
});
|
|
25
|
+
static query(query = {}) {
|
|
26
|
+
return new ArticleListQuery(query);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
class ArticleCommon extends classes((DataModel), Article) {
|
|
30
|
+
price;
|
|
31
|
+
constructor(data) {
|
|
32
|
+
super([data]);
|
|
33
|
+
this.price = Money({ amount: data.price, currency: "EUR" });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export class ArticleDetailed extends classes(ArticleCommon, (DataModel)) {
|
|
37
|
+
constructor(data) {
|
|
38
|
+
super([data], [data]);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export class ArticleListItem extends classes(ArticleCommon, (DataModel)) {
|
|
42
|
+
constructor(data) {
|
|
43
|
+
super([data]);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export class ArticleListQuery extends ListQueryModel {
|
|
47
|
+
constructor(query = {}) {
|
|
48
|
+
super(query);
|
|
49
|
+
}
|
|
50
|
+
refine(query) {
|
|
51
|
+
return new ArticleListQuery({
|
|
52
|
+
...this.query,
|
|
53
|
+
...query,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
execute = provideReact(async () => {
|
|
57
|
+
const { ...query } = this.query;
|
|
58
|
+
const { items, totalCount } = await config.behaviors.article.list({
|
|
59
|
+
limit: config.defaultPaginationLimit,
|
|
60
|
+
...query,
|
|
61
|
+
});
|
|
62
|
+
return new ArticleList(this.query, items.map((d) => new ArticleListItem(d)), totalCount);
|
|
63
|
+
}, [this.queryId]);
|
|
64
|
+
getTotalCount = provideReact(async () => {
|
|
65
|
+
const { totalCount } = await this.refine({ limit: 1 }).execute();
|
|
66
|
+
return totalCount;
|
|
67
|
+
}, [this.queryId]);
|
|
68
|
+
findOneAndOnly = provideReact(async () => {
|
|
69
|
+
const { items, totalCount } = await this.refine({ limit: 1 }).execute();
|
|
70
|
+
if (totalCount === 1) {
|
|
71
|
+
return items[0];
|
|
72
|
+
}
|
|
73
|
+
}, [this.queryId]);
|
|
74
|
+
}
|
|
75
|
+
export class ArticleList extends classes(ArticleListQuery, (ListDataModel)) {
|
|
76
|
+
constructor(query, articles, totalCount) {
|
|
77
|
+
super([query], [articles, totalCount]);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { assertStatus, extractTotalCountHeader, } from "@mittwald/api-client";
|
|
2
|
+
export const apiArticleBehaviors = (client) => ({
|
|
3
|
+
find: async (id) => {
|
|
4
|
+
const response = await client.article.getArticle({
|
|
5
|
+
articleId: id,
|
|
6
|
+
});
|
|
7
|
+
if (response.status === 200) {
|
|
8
|
+
return response.data;
|
|
9
|
+
}
|
|
10
|
+
assertStatus(response, 404);
|
|
11
|
+
},
|
|
12
|
+
list: async (query) => {
|
|
13
|
+
const response = await client.article.listArticles({
|
|
14
|
+
queryParameters: query,
|
|
15
|
+
});
|
|
16
|
+
assertStatus(response, 200);
|
|
17
|
+
return {
|
|
18
|
+
items: response.data,
|
|
19
|
+
totalCount: extractTotalCountHeader(response),
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Article/index.js";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { hash } from "object-code";
|
|
2
|
+
import { joinedId } from "../lib/joinedId.js";
|
|
2
3
|
export class ListQueryModel {
|
|
3
4
|
query;
|
|
4
5
|
queryId;
|
|
5
|
-
constructor(query) {
|
|
6
|
+
constructor(query, opts = {}) {
|
|
7
|
+
const { dependencies = [] } = opts;
|
|
6
8
|
this.query = query;
|
|
7
|
-
this.queryId = hash(query)
|
|
9
|
+
this.queryId = joinedId(hash(query), ...dependencies);
|
|
8
10
|
}
|
|
9
11
|
}
|
|
@@ -6,6 +6,7 @@ import { apiCustomerBehaviors } from "../../customer/Customer/behaviors/index.js
|
|
|
6
6
|
import { apiIngressBehaviors } from "../../domain/Ingress/behaviors/index.js";
|
|
7
7
|
import { apiAppInstallationBehaviors } from "../../app/AppInstallation/behaviors/index.js";
|
|
8
8
|
import { addUrlTagToProvideReactCache } from "../../react/asyncResourceInvalidation.js";
|
|
9
|
+
import { apiArticleBehaviors } from "../../article/Article/behaviors/index.js";
|
|
9
10
|
import { apiContractBehaviors } from "../../contract/Contract/behaviors/index.js";
|
|
10
11
|
import { apiContractItemBehaviors } from "../../contract/ContractItem/behaviors/index.js";
|
|
11
12
|
class ApiSetupState {
|
|
@@ -17,6 +18,7 @@ class ApiSetupState {
|
|
|
17
18
|
this._client = client;
|
|
18
19
|
this._client.defaultRequestOptions.onBeforeRequest =
|
|
19
20
|
addUrlTagToProvideReactCache;
|
|
21
|
+
config.behaviors.article = apiArticleBehaviors(client);
|
|
20
22
|
config.behaviors.project = apiProjectBehaviors(client);
|
|
21
23
|
config.behaviors.server = apiServerBehaviors(client);
|
|
22
24
|
config.behaviors.customer = apiCustomerBehaviors(client);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const joinedId = (...parts) => parts.join(" | ");
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { reactUsePromise } from "./reactUsePromise.js";
|
|
2
2
|
import { hash } from "object-code";
|
|
3
3
|
import { reactProvisionContext } from "./reactProvisionContext.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
dependencies,
|
|
8
|
-
}));
|
|
4
|
+
import { joinedId } from "../lib/joinedId.js";
|
|
5
|
+
export const provideReact = (loader, dependencies = []) => {
|
|
6
|
+
const provisionId = joinedId(hash(loader), ...dependencies);
|
|
9
7
|
const getAsyncResource = (params) => {
|
|
10
|
-
const
|
|
11
|
-
const contextId = provisionId + paramsHash;
|
|
8
|
+
const contextId = joinedId(provisionId, hash(params));
|
|
12
9
|
const loaderWithContext = reactProvisionContext.bind({
|
|
13
10
|
id: contextId,
|
|
14
11
|
}, loader);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AppInstallationData, AppInstallationListItemData, AppInstallationListQueryData } from "../types.js";
|
|
2
2
|
import { QueryResponseData } from "../../../base/index.js";
|
|
3
3
|
export interface AppInstallationBehaviors {
|
|
4
4
|
find: (id: string) => Promise<AppInstallationData | undefined>;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { ReferenceModel } from "../../base/ReferenceModel.js";
|
|
2
|
+
import { ArticleData, ArticleListItemData, ArticleListQueryData, ArticleListQueryModelData } from "./types.js";
|
|
3
|
+
import { DataModel } from "../../base/DataModel.js";
|
|
4
|
+
import { ListQueryModel } from "../../base/ListQueryModel.js";
|
|
5
|
+
import { ListDataModel } from "../../base/ListDataModel.js";
|
|
6
|
+
import { Money } from "../../base/Money.js";
|
|
7
|
+
export declare class Article extends ReferenceModel {
|
|
8
|
+
static ofId(id: string): Article;
|
|
9
|
+
static find: import("../../react/provideReact.js").AsyncResourceVariant<(id: string) => Promise<ArticleDetailed | undefined>>;
|
|
10
|
+
static get: import("../../react/provideReact.js").AsyncResourceVariant<(id: string) => Promise<ArticleDetailed>>;
|
|
11
|
+
static query(query?: ArticleListQueryModelData): ArticleListQuery;
|
|
12
|
+
}
|
|
13
|
+
declare const ArticleCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
|
|
14
|
+
new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableArticle | {
|
|
15
|
+
addons?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAddons[] | undefined;
|
|
16
|
+
articleId: string;
|
|
17
|
+
attributes?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAttributes[] | undefined;
|
|
18
|
+
balanceAddonKey?: string | undefined;
|
|
19
|
+
contractDurationInMonth: number;
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
forcedInvoicingPeriodInMonth?: number | undefined;
|
|
22
|
+
hasIndependentContractPeriod?: boolean | undefined;
|
|
23
|
+
hideOnInvoice?: boolean | undefined;
|
|
24
|
+
machineType?: {
|
|
25
|
+
cpu: string;
|
|
26
|
+
memory: string;
|
|
27
|
+
name: string;
|
|
28
|
+
} | undefined;
|
|
29
|
+
modifierArticles?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableModifierArticleOptions[] | undefined;
|
|
30
|
+
name: string;
|
|
31
|
+
orderable: "forbidden" | "internal" | "beta_testing" | "full" | "deprecated";
|
|
32
|
+
possibleArticleChanges?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableChangeArticleOptions[] | undefined;
|
|
33
|
+
price?: number | undefined;
|
|
34
|
+
tags?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTag[] | undefined;
|
|
35
|
+
template: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTemplate;
|
|
36
|
+
}): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableArticle | {
|
|
37
|
+
addons?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAddons[] | undefined;
|
|
38
|
+
articleId: string;
|
|
39
|
+
attributes?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAttributes[] | undefined;
|
|
40
|
+
balanceAddonKey?: string | undefined;
|
|
41
|
+
contractDurationInMonth: number;
|
|
42
|
+
description?: string | undefined;
|
|
43
|
+
forcedInvoicingPeriodInMonth?: number | undefined;
|
|
44
|
+
hasIndependentContractPeriod?: boolean | undefined;
|
|
45
|
+
hideOnInvoice?: boolean | undefined;
|
|
46
|
+
machineType?: {
|
|
47
|
+
cpu: string;
|
|
48
|
+
memory: string;
|
|
49
|
+
name: string;
|
|
50
|
+
} | undefined;
|
|
51
|
+
modifierArticles?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableModifierArticleOptions[] | undefined;
|
|
52
|
+
name: string;
|
|
53
|
+
orderable: "forbidden" | "internal" | "beta_testing" | "full" | "deprecated";
|
|
54
|
+
possibleArticleChanges?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableChangeArticleOptions[] | undefined;
|
|
55
|
+
price?: number | undefined;
|
|
56
|
+
tags?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTag[] | undefined;
|
|
57
|
+
template: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTemplate;
|
|
58
|
+
}>;
|
|
59
|
+
}, typeof Article]>;
|
|
60
|
+
declare class ArticleCommon extends ArticleCommon_base {
|
|
61
|
+
readonly price: Money;
|
|
62
|
+
constructor(data: ArticleListItemData | ArticleData);
|
|
63
|
+
}
|
|
64
|
+
declare const ArticleDetailed_base: import("polytype").Polytype.ClusteredConstructor<[typeof ArticleCommon, {
|
|
65
|
+
new (data: {
|
|
66
|
+
addons?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAddons[] | undefined;
|
|
67
|
+
articleId: string;
|
|
68
|
+
attributes?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAttributes[] | undefined;
|
|
69
|
+
balanceAddonKey?: string | undefined;
|
|
70
|
+
contractDurationInMonth: number;
|
|
71
|
+
description?: string | undefined;
|
|
72
|
+
forcedInvoicingPeriodInMonth?: number | undefined;
|
|
73
|
+
hasIndependentContractPeriod?: boolean | undefined;
|
|
74
|
+
hideOnInvoice?: boolean | undefined;
|
|
75
|
+
machineType?: {
|
|
76
|
+
cpu: string;
|
|
77
|
+
memory: string;
|
|
78
|
+
name: string;
|
|
79
|
+
} | undefined;
|
|
80
|
+
modifierArticles?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableModifierArticleOptions[] | undefined;
|
|
81
|
+
name: string;
|
|
82
|
+
orderable: "forbidden" | "internal" | "beta_testing" | "full" | "deprecated";
|
|
83
|
+
possibleArticleChanges?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableChangeArticleOptions[] | undefined;
|
|
84
|
+
price?: number | undefined;
|
|
85
|
+
tags?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTag[] | undefined;
|
|
86
|
+
template: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTemplate;
|
|
87
|
+
}): DataModel<{
|
|
88
|
+
addons?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAddons[] | undefined;
|
|
89
|
+
articleId: string;
|
|
90
|
+
attributes?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAttributes[] | undefined;
|
|
91
|
+
balanceAddonKey?: string | undefined;
|
|
92
|
+
contractDurationInMonth: number;
|
|
93
|
+
description?: string | undefined;
|
|
94
|
+
forcedInvoicingPeriodInMonth?: number | undefined;
|
|
95
|
+
hasIndependentContractPeriod?: boolean | undefined;
|
|
96
|
+
hideOnInvoice?: boolean | undefined;
|
|
97
|
+
machineType?: {
|
|
98
|
+
cpu: string;
|
|
99
|
+
memory: string;
|
|
100
|
+
name: string;
|
|
101
|
+
} | undefined;
|
|
102
|
+
modifierArticles?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableModifierArticleOptions[] | undefined;
|
|
103
|
+
name: string;
|
|
104
|
+
orderable: "forbidden" | "internal" | "beta_testing" | "full" | "deprecated";
|
|
105
|
+
possibleArticleChanges?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableChangeArticleOptions[] | undefined;
|
|
106
|
+
price?: number | undefined;
|
|
107
|
+
tags?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTag[] | undefined;
|
|
108
|
+
template: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTemplate;
|
|
109
|
+
}>;
|
|
110
|
+
}]>;
|
|
111
|
+
export declare class ArticleDetailed extends ArticleDetailed_base {
|
|
112
|
+
constructor(data: ArticleData);
|
|
113
|
+
}
|
|
114
|
+
declare const ArticleListItem_base: import("polytype").Polytype.ClusteredConstructor<[typeof ArticleCommon, {
|
|
115
|
+
new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableArticle): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableArticle>;
|
|
116
|
+
}]>;
|
|
117
|
+
export declare class ArticleListItem extends ArticleListItem_base {
|
|
118
|
+
constructor(data: ArticleListItemData);
|
|
119
|
+
}
|
|
120
|
+
export declare class ArticleListQuery extends ListQueryModel<ArticleListQueryModelData> {
|
|
121
|
+
constructor(query?: ArticleListQueryModelData);
|
|
122
|
+
refine(query: ArticleListQueryModelData): ArticleListQuery;
|
|
123
|
+
execute: import("../../react/provideReact.js").AsyncResourceVariant<() => Promise<ArticleList>>;
|
|
124
|
+
getTotalCount: import("../../react/provideReact.js").AsyncResourceVariant<() => Promise<number>>;
|
|
125
|
+
findOneAndOnly: import("../../react/provideReact.js").AsyncResourceVariant<() => Promise<ArticleListItem | undefined>>;
|
|
126
|
+
}
|
|
127
|
+
declare const ArticleList_base: import("polytype").Polytype.ClusteredConstructor<[typeof ArticleListQuery, {
|
|
128
|
+
new (items: ArticleListItem[], totalCount: number): ListDataModel<ArticleListItem>;
|
|
129
|
+
}]>;
|
|
130
|
+
export declare class ArticleList extends ArticleList_base {
|
|
131
|
+
constructor(query: ArticleListQueryData, articles: ArticleListItem[], totalCount: number);
|
|
132
|
+
}
|
|
133
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ArticleData, ArticleListItemData, ArticleListQueryData } from "../types.js";
|
|
2
|
+
import { QueryResponseData } from "../../../base/index.js";
|
|
3
|
+
export interface ArticleBehaviors {
|
|
4
|
+
find: (id: string) => Promise<ArticleData | undefined>;
|
|
5
|
+
list: (query?: ArticleListQueryData) => Promise<QueryResponseData<ArticleListItemData>>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MittwaldAPIV2 } from "@mittwald/api-client";
|
|
2
|
+
export type ArticleListQueryData = MittwaldAPIV2.Paths.V2Articles.Get.Parameters.Query;
|
|
3
|
+
export type ArticleData = MittwaldAPIV2.Operations.ArticleGetArticle.ResponseData;
|
|
4
|
+
export type ArticleListItemData = MittwaldAPIV2.Operations.ArticleListArticles.ResponseData[number];
|
|
5
|
+
export type ArticleListQueryModelData = ArticleListQueryData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Article/index.js";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
interface Options {
|
|
2
|
+
dependencies?: string[];
|
|
3
|
+
}
|
|
1
4
|
export declare abstract class ListQueryModel<TQuery> {
|
|
2
5
|
protected readonly query: TQuery;
|
|
3
6
|
readonly queryId: string;
|
|
4
|
-
constructor(query: TQuery);
|
|
7
|
+
constructor(query: TQuery, opts?: Options);
|
|
5
8
|
}
|
|
9
|
+
export {};
|
|
@@ -5,11 +5,13 @@ import { IngressBehaviors } from "../domain/Ingress/behaviors/index.js";
|
|
|
5
5
|
import { ContractBehaviors } from "../contract/Contract/behaviors/index.js";
|
|
6
6
|
import { AppInstallationBehaviors } from "../app/AppInstallation/behaviors/index.js";
|
|
7
7
|
import { ContractItemBehaviors } from "../contract/ContractItem/behaviors/index.js";
|
|
8
|
+
import { ArticleBehaviors } from "../article/Article/behaviors/index.js";
|
|
8
9
|
interface Config {
|
|
9
10
|
defaultPaginationLimit: number;
|
|
10
11
|
behaviors: {
|
|
11
12
|
contract: ContractBehaviors;
|
|
12
13
|
contractItem: ContractItemBehaviors;
|
|
14
|
+
article: ArticleBehaviors;
|
|
13
15
|
project: ProjectBehaviors;
|
|
14
16
|
server: ServerBehaviors;
|
|
15
17
|
customer: CustomerBehaviors;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const joinedId: (...parts: Array<number | string>) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/api-models",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.64.0",
|
|
4
4
|
"author": "Mittwald CM Service GmbH & Co. KG <opensource@mittwald.de>",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Collection of domain models for coherent interaction with the API",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@mittwald/api-client": "^4.61.1",
|
|
43
43
|
"another-deep-freeze": "^1.0.0",
|
|
44
44
|
"context": "^3.0.31",
|
|
45
|
+
"dinero.js": "^1.9.1",
|
|
45
46
|
"object-code": "^1.3.3",
|
|
46
47
|
"polytype": "^0.17.0",
|
|
47
48
|
"tsd": "^0.31.2",
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
"@testing-library/dom": "^10.4.0",
|
|
54
55
|
"@testing-library/jest-dom": "^6.5.0",
|
|
55
56
|
"@testing-library/react": "^16.0.1",
|
|
57
|
+
"@types/dinero.js": "^1",
|
|
56
58
|
"@types/jest": "^29.5.12",
|
|
57
59
|
"@types/react": "^18.3.3",
|
|
58
60
|
"@types/react-dom": "^18",
|
|
@@ -82,5 +84,5 @@
|
|
|
82
84
|
"optional": true
|
|
83
85
|
}
|
|
84
86
|
},
|
|
85
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "d8f0554d50dff2de81524e1c3749fa3499b4f888"
|
|
86
88
|
}
|