@mittwald/api-models 4.338.1 → 4.339.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 (195) hide show
  1. package/dist/esm/app/AppInstallation/AppInstallation.js +89 -0
  2. package/dist/esm/app/AppInstallation/behaviors/api.js +24 -0
  3. package/dist/esm/app/AppInstallation/behaviors/index.js +2 -0
  4. package/dist/esm/app/AppInstallation/behaviors/types.js +1 -0
  5. package/dist/esm/app/AppInstallation/index.js +2 -0
  6. package/dist/esm/app/AppInstallation/types.js +1 -0
  7. package/dist/esm/app/index.js +1 -0
  8. package/dist/esm/article/Article/Article.js +79 -0
  9. package/dist/esm/article/Article/behaviors/api.js +22 -0
  10. package/dist/esm/article/Article/behaviors/index.js +2 -0
  11. package/dist/esm/article/Article/behaviors/types.js +1 -0
  12. package/dist/esm/article/Article/index.js +2 -0
  13. package/dist/esm/article/Article/types.js +1 -0
  14. package/dist/esm/article/index.js +1 -0
  15. package/dist/esm/base/DataModel.js +7 -0
  16. package/dist/esm/base/ListDataModel.js +8 -0
  17. package/dist/esm/base/ListQueryModel.js +11 -0
  18. package/dist/esm/base/Money.js +5 -0
  19. package/dist/esm/base/ReferenceModel.js +9 -0
  20. package/dist/esm/base/assertObjectFound.js +9 -0
  21. package/dist/esm/base/index.js +6 -0
  22. package/dist/esm/base/types.js +1 -0
  23. package/dist/esm/config/behaviors/api.js +51 -0
  24. package/dist/esm/config/behaviors/index.js +1 -0
  25. package/dist/esm/config/config.js +14 -0
  26. package/dist/esm/config/index.js +1 -0
  27. package/dist/esm/contract/Contract/Contract.js +78 -0
  28. package/dist/esm/contract/Contract/behaviors/api.js +20 -0
  29. package/dist/esm/contract/Contract/behaviors/index.js +2 -0
  30. package/dist/esm/contract/Contract/behaviors/types.js +1 -0
  31. package/dist/esm/contract/Contract/index.js +2 -0
  32. package/dist/esm/contract/Contract/types.js +1 -0
  33. package/dist/esm/contract/ContractItem/ContractItem.js +31 -0
  34. package/dist/esm/contract/ContractItem/behaviors/api.js +13 -0
  35. package/dist/esm/contract/ContractItem/behaviors/index.js +2 -0
  36. package/dist/esm/contract/ContractItem/behaviors/types.js +1 -0
  37. package/dist/esm/contract/ContractItem/index.js +2 -0
  38. package/dist/esm/contract/ContractItem/types.js +1 -0
  39. package/dist/esm/contract/index.js +2 -0
  40. package/dist/esm/customer/Customer/Customer.js +96 -0
  41. package/dist/esm/customer/Customer/behaviors/api.js +30 -0
  42. package/dist/esm/customer/Customer/behaviors/index.js +2 -0
  43. package/dist/esm/customer/Customer/behaviors/types.js +1 -0
  44. package/dist/esm/customer/Customer/index.js +2 -0
  45. package/dist/esm/customer/Customer/types.js +1 -0
  46. package/dist/esm/customer/index.js +1 -0
  47. package/dist/esm/domain/Ingress/Ingress.js +106 -0
  48. package/dist/esm/domain/Ingress/behaviors/api.js +25 -0
  49. package/dist/esm/domain/Ingress/behaviors/index.js +2 -0
  50. package/dist/esm/domain/Ingress/behaviors/types.js +1 -0
  51. package/dist/esm/domain/Ingress/index.js +2 -0
  52. package/dist/esm/domain/Ingress/types.js +1 -0
  53. package/dist/esm/domain/IngressPath/IngressPath.js +15 -0
  54. package/dist/esm/domain/IngressPath/IngressPath.test.js +16 -0
  55. package/dist/esm/domain/IngressPath/index.js +2 -0
  56. package/dist/esm/domain/IngressPath/types.js +1 -0
  57. package/dist/esm/domain/IngressTarget/IngressTarget.js +40 -0
  58. package/dist/esm/domain/IngressTarget/IngressTarget.test-types.js +10 -0
  59. package/dist/esm/domain/IngressTarget/index.js +2 -0
  60. package/dist/esm/domain/IngressTarget/types.js +1 -0
  61. package/dist/esm/domain/index.js +1 -0
  62. package/dist/esm/errors/ObjectNotFoundError.js +7 -0
  63. package/dist/esm/index.js +7 -0
  64. package/dist/esm/lib/deepFreeze.js +4 -0
  65. package/dist/esm/lib/joinedId.js +1 -0
  66. package/dist/esm/lib/types.js +1 -0
  67. package/dist/esm/marketplace/Contributor/Contributor.js +83 -0
  68. package/dist/esm/marketplace/Contributor/ContributorIncomingInvoice.js +53 -0
  69. package/dist/esm/marketplace/Contributor/behaviors/api.js +39 -0
  70. package/dist/esm/marketplace/Contributor/behaviors/index.js +2 -0
  71. package/dist/esm/marketplace/Contributor/behaviors/types.js +1 -0
  72. package/dist/esm/marketplace/Contributor/index.js +3 -0
  73. package/dist/esm/marketplace/Contributor/types.js +1 -0
  74. package/dist/esm/marketplace/index.js +1 -0
  75. package/dist/esm/project/Project/Project.js +121 -0
  76. package/dist/esm/project/Project/behaviors/api.js +58 -0
  77. package/dist/esm/project/Project/behaviors/inMem.js +27 -0
  78. package/dist/esm/project/Project/behaviors/index.js +3 -0
  79. package/dist/esm/project/Project/behaviors/types.js +1 -0
  80. package/dist/esm/project/Project/index.js +2 -0
  81. package/dist/esm/project/Project/types.js +1 -0
  82. package/dist/esm/project/index.js +1 -0
  83. package/dist/esm/react/MittwaldApiModelProvider.js +12 -0
  84. package/dist/esm/react/asyncResourceInvalidation.js +29 -0
  85. package/dist/esm/react/index.js +4 -0
  86. package/dist/esm/react/provideReact.js +27 -0
  87. package/dist/esm/react/provideReact.test-types.js +21 -0
  88. package/dist/esm/react/reactProvisionContext.js +2 -0
  89. package/dist/esm/react/reactUsePromise.js +17 -0
  90. package/dist/esm/react.js +1 -0
  91. package/dist/esm/server/Server/Server.js +102 -0
  92. package/dist/esm/server/Server/behaviors/api.js +22 -0
  93. package/dist/esm/server/Server/behaviors/index.js +2 -0
  94. package/dist/esm/server/Server/behaviors/types.js +1 -0
  95. package/dist/esm/server/Server/index.js +1 -0
  96. package/dist/esm/server/Server/types.js +1 -0
  97. package/dist/esm/server/index.js +1 -0
  98. package/dist/types/app/AppInstallation/AppInstallation.d.ts +142 -0
  99. package/dist/types/app/AppInstallation/behaviors/api.d.ts +3 -0
  100. package/dist/types/app/AppInstallation/behaviors/index.d.ts +2 -0
  101. package/dist/types/app/AppInstallation/behaviors/types.d.ts +6 -0
  102. package/dist/types/app/AppInstallation/index.d.ts +2 -0
  103. package/dist/types/app/AppInstallation/types.d.ts +4 -0
  104. package/dist/types/app/index.d.ts +1 -0
  105. package/dist/types/article/Article/Article.d.ts +133 -0
  106. package/dist/types/article/Article/behaviors/api.d.ts +3 -0
  107. package/dist/types/article/Article/behaviors/index.d.ts +2 -0
  108. package/dist/types/article/Article/behaviors/types.d.ts +6 -0
  109. package/dist/types/article/Article/index.d.ts +2 -0
  110. package/dist/types/article/Article/types.d.ts +5 -0
  111. package/dist/types/article/index.d.ts +1 -0
  112. package/dist/types/base/DataModel.d.ts +5 -0
  113. package/dist/types/base/ListDataModel.d.ts +5 -0
  114. package/dist/types/base/ListQueryModel.d.ts +9 -0
  115. package/dist/types/base/Money.d.ts +3 -0
  116. package/dist/types/base/ReferenceModel.d.ts +5 -0
  117. package/dist/types/base/assertObjectFound.d.ts +3 -0
  118. package/dist/types/base/index.d.ts +6 -0
  119. package/dist/types/base/types.d.ts +6 -0
  120. package/dist/types/config/behaviors/api.d.ts +12 -0
  121. package/dist/types/config/behaviors/index.d.ts +1 -0
  122. package/dist/types/config/config.d.ts +25 -0
  123. package/dist/types/config/index.d.ts +1 -0
  124. package/dist/types/contract/Contract/Contract.d.ts +68 -0
  125. package/dist/types/contract/Contract/behaviors/api.d.ts +3 -0
  126. package/dist/types/contract/Contract/behaviors/index.d.ts +2 -0
  127. package/dist/types/contract/Contract/behaviors/types.d.ts +9 -0
  128. package/dist/types/contract/Contract/index.d.ts +2 -0
  129. package/dist/types/contract/Contract/types.d.ts +8 -0
  130. package/dist/types/contract/ContractItem/ContractItem.d.ts +64 -0
  131. package/dist/types/contract/ContractItem/behaviors/api.d.ts +3 -0
  132. package/dist/types/contract/ContractItem/behaviors/index.d.ts +2 -0
  133. package/dist/types/contract/ContractItem/behaviors/types.d.ts +4 -0
  134. package/dist/types/contract/ContractItem/index.d.ts +2 -0
  135. package/dist/types/contract/ContractItem/types.d.ts +2 -0
  136. package/dist/types/contract/index.d.ts +2 -0
  137. package/dist/types/customer/Customer/Customer.d.ts +146 -0
  138. package/dist/types/customer/Customer/behaviors/api.d.ts +3 -0
  139. package/dist/types/customer/Customer/behaviors/index.d.ts +2 -0
  140. package/dist/types/customer/Customer/behaviors/types.d.ts +7 -0
  141. package/dist/types/customer/Customer/index.d.ts +2 -0
  142. package/dist/types/customer/Customer/types.d.ts +5 -0
  143. package/dist/types/customer/index.d.ts +1 -0
  144. package/dist/types/domain/Ingress/Ingress.d.ts +109 -0
  145. package/dist/types/domain/Ingress/behaviors/api.d.ts +3 -0
  146. package/dist/types/domain/Ingress/behaviors/index.d.ts +2 -0
  147. package/dist/types/domain/Ingress/behaviors/types.d.ts +6 -0
  148. package/dist/types/domain/Ingress/index.d.ts +2 -0
  149. package/dist/types/domain/Ingress/types.d.ts +8 -0
  150. package/dist/types/domain/IngressPath/IngressPath.d.ts +11 -0
  151. package/dist/types/domain/IngressPath/IngressPath.test.d.ts +1 -0
  152. package/dist/types/domain/IngressPath/index.d.ts +2 -0
  153. package/dist/types/domain/IngressPath/types.d.ts +2 -0
  154. package/dist/types/domain/IngressTarget/IngressTarget.d.ts +24 -0
  155. package/dist/types/domain/IngressTarget/IngressTarget.test-types.d.ts +1 -0
  156. package/dist/types/domain/IngressTarget/index.d.ts +2 -0
  157. package/dist/types/domain/IngressTarget/types.d.ts +6 -0
  158. package/dist/types/domain/index.d.ts +1 -0
  159. package/dist/types/errors/ObjectNotFoundError.d.ts +3 -0
  160. package/dist/types/index.d.ts +7 -0
  161. package/dist/types/lib/deepFreeze.d.ts +5 -0
  162. package/dist/types/lib/joinedId.d.ts +1 -0
  163. package/dist/types/lib/types.d.ts +2 -0
  164. package/dist/types/marketplace/Contributor/Contributor.d.ts +49 -0
  165. package/dist/types/marketplace/Contributor/ContributorIncomingInvoice.d.ts +31 -0
  166. package/dist/types/marketplace/Contributor/behaviors/api.d.ts +3 -0
  167. package/dist/types/marketplace/Contributor/behaviors/index.d.ts +2 -0
  168. package/dist/types/marketplace/Contributor/behaviors/types.d.ts +10 -0
  169. package/dist/types/marketplace/Contributor/index.d.ts +3 -0
  170. package/dist/types/marketplace/Contributor/types.d.ts +6 -0
  171. package/dist/types/marketplace/index.d.ts +1 -0
  172. package/dist/types/project/Project/Project.d.ts +292 -0
  173. package/dist/types/project/Project/behaviors/api.d.ts +3 -0
  174. package/dist/types/project/Project/behaviors/inMem.d.ts +3 -0
  175. package/dist/types/project/Project/behaviors/index.d.ts +3 -0
  176. package/dist/types/project/Project/behaviors/types.d.ts +12 -0
  177. package/dist/types/project/Project/index.d.ts +2 -0
  178. package/dist/types/project/Project/types.d.ts +10 -0
  179. package/dist/types/project/index.d.ts +1 -0
  180. package/dist/types/react/MittwaldApiModelProvider.d.ts +6 -0
  181. package/dist/types/react/asyncResourceInvalidation.d.ts +4 -0
  182. package/dist/types/react/index.d.ts +5 -0
  183. package/dist/types/react/provideReact.d.ts +12 -0
  184. package/dist/types/react/provideReact.test-types.d.ts +1 -0
  185. package/dist/types/react/reactProvisionContext.d.ts +3 -0
  186. package/dist/types/react/reactUsePromise.d.ts +2 -0
  187. package/dist/types/react.d.ts +1 -0
  188. package/dist/types/server/Server/Server.d.ts +115 -0
  189. package/dist/types/server/Server/behaviors/api.d.ts +3 -0
  190. package/dist/types/server/Server/behaviors/index.d.ts +2 -0
  191. package/dist/types/server/Server/behaviors/types.d.ts +6 -0
  192. package/dist/types/server/Server/index.d.ts +1 -0
  193. package/dist/types/server/Server/types.d.ts +8 -0
  194. package/dist/types/server/index.d.ts +1 -0
  195. package/package.json +3 -3
@@ -0,0 +1,7 @@
1
+ import { CustomerListItemData, CustomerData, CustomerListQueryData, CustomerUpdateRequestData } from "../types.js";
2
+ import { QueryResponseData } from "../../../base/index.js";
3
+ export interface CustomerBehaviors {
4
+ find: (id: string) => Promise<CustomerData | undefined>;
5
+ list: (query?: CustomerListQueryData) => Promise<QueryResponseData<CustomerListItemData>>;
6
+ update: (id: string, data: CustomerUpdateRequestData) => Promise<void>;
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./Customer.js";
2
+ export * from "./types.js";
@@ -0,0 +1,5 @@
1
+ import { MittwaldAPIV2 } from "@mittwald/api-client";
2
+ export type CustomerListQueryData = MittwaldAPIV2.Paths.V2Customers.Get.Parameters.Query;
3
+ export type CustomerData = MittwaldAPIV2.Operations.CustomerGetCustomer.ResponseData;
4
+ export type CustomerListItemData = MittwaldAPIV2.Operations.CustomerListCustomers.ResponseData[number];
5
+ export type CustomerUpdateRequestData = MittwaldAPIV2.Paths.V2CustomersCustomerId.Put.Parameters.RequestBody;
@@ -0,0 +1 @@
1
+ export * from "./Customer/index.js";
@@ -0,0 +1,109 @@
1
+ import { DataModel } from "../../base/DataModel.js";
2
+ import { ReferenceModel } from "../../base/ReferenceModel.js";
3
+ import { AsyncResourceVariant } from "../../react/provideReact.js";
4
+ import { IngressData, IngressListItemData, IngressListQueryData, IngressListQueryModelData } from "./types.js";
5
+ import { IngressPath } from "../IngressPath/IngressPath.js";
6
+ import { ListQueryModel } from "../../base/ListQueryModel.js";
7
+ import { ListDataModel } from "../../base/ListDataModel.js";
8
+ export declare class Ingress extends ReferenceModel {
9
+ static ofId(id: string): Ingress;
10
+ static ofHostname(hostname: string): Ingress;
11
+ /** @deprecated: use query() or project.ingresses */
12
+ static list: AsyncResourceVariant<(query?: IngressListQueryData) => Promise<Readonly<Array<IngressListItem>>>>;
13
+ static find: AsyncResourceVariant<(id: string) => Promise<IngressDetailed | undefined>>;
14
+ static get: AsyncResourceVariant<(id: string) => Promise<IngressDetailed>>;
15
+ getDetailed: AsyncResourceVariant<() => Promise<IngressDetailed>>;
16
+ findDetailed: AsyncResourceVariant<() => Promise<IngressDetailed | undefined>>;
17
+ }
18
+ declare const IngressCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
19
+ new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressIngress | {
20
+ dnsValidationErrors: ("ERROR_UNSPECIFIED" | "ERROR_QUAD_A" | "ERROR_NO_A_RECORD" | "ERROR_ACME_CERTIFICATE_REQUEST_DEADLINE_EXCEEDED")[];
21
+ hostname: string;
22
+ id: string;
23
+ ips: {
24
+ v4: string[];
25
+ };
26
+ isDefault: boolean;
27
+ isDomain?: boolean | undefined;
28
+ isEnabled: boolean;
29
+ ownership: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressOwnership;
30
+ paths: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressPath[];
31
+ projectId: string;
32
+ tls: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressTlsAcme | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressTlsCertificate;
33
+ }): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressIngress | {
34
+ dnsValidationErrors: ("ERROR_UNSPECIFIED" | "ERROR_QUAD_A" | "ERROR_NO_A_RECORD" | "ERROR_ACME_CERTIFICATE_REQUEST_DEADLINE_EXCEEDED")[];
35
+ hostname: string;
36
+ id: string;
37
+ ips: {
38
+ v4: string[];
39
+ };
40
+ isDefault: boolean;
41
+ isDomain?: boolean | undefined;
42
+ isEnabled: boolean;
43
+ ownership: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressOwnership;
44
+ paths: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressPath[];
45
+ projectId: string;
46
+ tls: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressTlsAcme | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressTlsCertificate;
47
+ }>;
48
+ }, typeof Ingress]>;
49
+ export declare class IngressCommon extends IngressCommon_base {
50
+ readonly baseUrl: string;
51
+ readonly paths: ReadonlyArray<IngressPath>;
52
+ readonly defaultPath: IngressPath;
53
+ constructor(data: IngressListItemData | IngressData);
54
+ }
55
+ declare const IngressDetailed_base: import("polytype").Polytype.ClusteredConstructor<[typeof IngressCommon, {
56
+ new (data: {
57
+ dnsValidationErrors: ("ERROR_UNSPECIFIED" | "ERROR_QUAD_A" | "ERROR_NO_A_RECORD" | "ERROR_ACME_CERTIFICATE_REQUEST_DEADLINE_EXCEEDED")[];
58
+ hostname: string;
59
+ id: string;
60
+ ips: {
61
+ v4: string[];
62
+ };
63
+ isDefault: boolean;
64
+ isDomain?: boolean | undefined;
65
+ isEnabled: boolean;
66
+ ownership: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressOwnership;
67
+ paths: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressPath[];
68
+ projectId: string;
69
+ tls: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressTlsAcme | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressTlsCertificate;
70
+ }): DataModel<{
71
+ dnsValidationErrors: ("ERROR_UNSPECIFIED" | "ERROR_QUAD_A" | "ERROR_NO_A_RECORD" | "ERROR_ACME_CERTIFICATE_REQUEST_DEADLINE_EXCEEDED")[];
72
+ hostname: string;
73
+ id: string;
74
+ ips: {
75
+ v4: string[];
76
+ };
77
+ isDefault: boolean;
78
+ isDomain?: boolean | undefined;
79
+ isEnabled: boolean;
80
+ ownership: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressOwnership;
81
+ paths: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressPath[];
82
+ projectId: string;
83
+ tls: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressTlsAcme | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressTlsCertificate;
84
+ }>;
85
+ }]>;
86
+ export declare class IngressDetailed extends IngressDetailed_base {
87
+ constructor(data: IngressData);
88
+ }
89
+ declare const IngressListItem_base: import("polytype").Polytype.ClusteredConstructor<[typeof IngressCommon, {
90
+ new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressIngress): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressIngress>;
91
+ }]>;
92
+ export declare class IngressListItem extends IngressListItem_base {
93
+ constructor(data: IngressListItemData);
94
+ }
95
+ export declare class IngressListQuery extends ListQueryModel<IngressListQueryModelData> {
96
+ constructor(query?: IngressListQueryModelData);
97
+ refine(query?: IngressListQueryModelData): IngressListQuery;
98
+ execute: AsyncResourceVariant<() => Promise<IngressList>>;
99
+ getTotalCount: AsyncResourceVariant<() => Promise<number>>;
100
+ findOneAndOnly: AsyncResourceVariant<() => Promise<IngressListItem | undefined>>;
101
+ }
102
+ declare const IngressList_base: import("polytype").Polytype.ClusteredConstructor<[typeof IngressListQuery, {
103
+ new (items: IngressListItem[], totalCount: number): ListDataModel<IngressListItem>;
104
+ }]>;
105
+ export declare class IngressList extends IngressList_base {
106
+ constructor(query: IngressListQueryModelData, ingresses: IngressListItem[], totalCount: number);
107
+ getDefault(): IngressListItem;
108
+ }
109
+ export {};
@@ -0,0 +1,3 @@
1
+ import { MittwaldAPIV2Client } from "@mittwald/api-client";
2
+ import { IngressBehaviors } from "./types.js";
3
+ export declare const apiIngressBehaviors: (client: MittwaldAPIV2Client) => IngressBehaviors;
@@ -0,0 +1,2 @@
1
+ export * from "./api.js";
2
+ export * from "./types.js";
@@ -0,0 +1,6 @@
1
+ import { IngressListItemData, IngressData, IngressListQueryData } from "../types.js";
2
+ import { QueryResponseData } from "../../../base/index.js";
3
+ export interface IngressBehaviors {
4
+ find: (id: string) => Promise<IngressData | undefined>;
5
+ list: (query?: IngressListQueryData) => Promise<QueryResponseData<IngressListItemData>>;
6
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./Ingress.js";
2
+ export * from "./types.js";
@@ -0,0 +1,8 @@
1
+ import { MittwaldAPIV2 } from "@mittwald/api-client";
2
+ import { Project } from "../../project/index.js";
3
+ export type IngressListQueryData = MittwaldAPIV2.Paths.V2Ingresses.Get.Parameters.Query;
4
+ export type IngressListQueryModelData = Omit<IngressListQueryData, "projectId"> & {
5
+ project?: Project;
6
+ };
7
+ export type IngressData = MittwaldAPIV2.Operations.IngressGetIngress.ResponseData;
8
+ export type IngressListItemData = MittwaldAPIV2.Operations.IngressListIngresses.ResponseData[number];
@@ -0,0 +1,11 @@
1
+ import { DataModel } from "../../base/DataModel.js";
2
+ import { IngressPathData } from "./types.js";
3
+ import { IngressCommon, Ingress } from "../Ingress/index.js";
4
+ import { IngressTarget } from "../IngressTarget/IngressTarget.js";
5
+ export declare class IngressPath extends DataModel<IngressPathData> {
6
+ readonly ingress: Ingress;
7
+ readonly path: string;
8
+ readonly url: URL;
9
+ readonly target: IngressTarget;
10
+ constructor(ingress: IngressCommon, data: IngressPathData);
11
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./IngressPath.js";
2
+ export * from "./types.js";
@@ -0,0 +1,2 @@
1
+ import { MittwaldAPIV2 } from "@mittwald/api-client";
2
+ export type IngressPathData = MittwaldAPIV2.Components.Schemas.IngressPath;
@@ -0,0 +1,24 @@
1
+ import { DataModel } from "../../base/DataModel.js";
2
+ import { IngressUndefinedTargetData, IngressAppInstallationTargetData, IngressRedirectTargetData, IngressTargetData } from "./types.js";
3
+ import { IngressPath } from "../IngressPath/IngressPath.js";
4
+ import { AppInstallation } from "../../app/AppInstallation/index.js";
5
+ declare abstract class IngressTargetBase<T extends IngressTargetData> extends DataModel<T> {
6
+ readonly path: IngressPath;
7
+ constructor(path: IngressPath, data: T);
8
+ }
9
+ export declare class IngressRedirectTarget extends IngressTargetBase<IngressRedirectTargetData> {
10
+ readonly type = "redirect";
11
+ readonly url: URL;
12
+ constructor(path: IngressPath, data: IngressRedirectTargetData);
13
+ }
14
+ export declare class IngressAppInstallationTarget extends IngressTargetBase<IngressAppInstallationTargetData> {
15
+ readonly type = "appInstallation";
16
+ readonly appInstallation: AppInstallation;
17
+ constructor(path: IngressPath, data: IngressAppInstallationTargetData);
18
+ }
19
+ export declare class IngressUndefinedTarget extends IngressTargetBase<IngressUndefinedTargetData> {
20
+ readonly type = "undefined";
21
+ }
22
+ export type IngressTarget = IngressRedirectTarget | IngressAppInstallationTarget | IngressUndefinedTarget;
23
+ export declare const ingressTargetFactory: (path: IngressPath, data: IngressTargetData) => IngressTarget;
24
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./IngressTarget.js";
2
+ export * from "./types.js";
@@ -0,0 +1,6 @@
1
+ import { MittwaldAPIV2 } from "@mittwald/api-client";
2
+ export type IngressRedirectTargetData = MittwaldAPIV2.Components.Schemas.IngressTargetUrl;
3
+ export type IngressAppInstallationTargetData = MittwaldAPIV2.Components.Schemas.IngressTargetInstallation;
4
+ export type IngressContainerTargetData = MittwaldAPIV2.Components.Schemas.IngressTargetContainer;
5
+ export type IngressUndefinedTargetData = MittwaldAPIV2.Components.Schemas.IngressTargetUseDefaultPage;
6
+ export type IngressTargetData = IngressRedirectTargetData | IngressAppInstallationTargetData | IngressUndefinedTargetData | IngressContainerTargetData;
@@ -0,0 +1 @@
1
+ export * from "./Ingress/index.js";
@@ -0,0 +1,3 @@
1
+ export default class ObjectNotFoundError extends Error {
2
+ constructor(type: string, refName: string);
3
+ }
@@ -0,0 +1,7 @@
1
+ export { MittwaldAPIV2Client } from "@mittwald/api-client";
2
+ export * from "./config/index.js";
3
+ export * from "./project/index.js";
4
+ export * from "./server/index.js";
5
+ export * from "./domain/index.js";
6
+ export * from "./customer/index.js";
7
+ export * from "./base/index.js";
@@ -0,0 +1,5 @@
1
+ import type { ReadonlyDeep } from "type-fest";
2
+ export type { ReadonlyDeep } from "type-fest";
3
+ type DeepFreeze = <T>(subject: T) => ReadonlyDeep<T>;
4
+ declare const deepFreeze: DeepFreeze;
5
+ export default deepFreeze;
@@ -0,0 +1 @@
1
+ export declare const joinedId: (...parts: Array<number | string>) => string;
@@ -0,0 +1,2 @@
1
+ export type ParamsExceptFirst<T extends (...args: any[]) => unknown> = T extends (ignoredFirst: never, ...args: infer P) => unknown ? P : never;
2
+ export type FirstParameter<T extends (...args: any[]) => unknown> = T extends (first: infer P, ...args: any[]) => unknown ? P : never;
@@ -0,0 +1,49 @@
1
+ import { DataModel } from "../../base/DataModel.js";
2
+ import { ReferenceModel } from "../../base/ReferenceModel.js";
3
+ import { AsyncResourceVariant } from "../../react/provideReact.js";
4
+ import { ListQueryModel } from "../../base/ListQueryModel.js";
5
+ import { ListDataModel } from "../../base/ListDataModel.js";
6
+ import { ContributorIncomingInvoiceListQuery } from "./ContributorIncomingInvoice.js";
7
+ import type { ContributorData, ContributorListItemData, ContributorListQueryData } from "./types.js";
8
+ export declare class Contributor extends ReferenceModel {
9
+ readonly incomingInvoices: ContributorIncomingInvoiceListQuery;
10
+ constructor(id: string);
11
+ static ofId(id: string): Contributor;
12
+ static find: AsyncResourceVariant<(id: string) => Promise<ContributorDetailed | undefined>>;
13
+ static query(query?: ContributorListQueryData): ContributorListQuery;
14
+ static get: AsyncResourceVariant<(id: string) => Promise<ContributorDetailed>>;
15
+ getDetailed: AsyncResourceVariant<() => Promise<ContributorDetailed>>;
16
+ findDetailed: AsyncResourceVariant<() => Promise<ContributorDetailed | undefined>>;
17
+ }
18
+ declare const ContributorCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
19
+ new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.MarketplaceContributor): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.MarketplaceContributor>;
20
+ }, typeof Contributor]>;
21
+ declare class ContributorCommon extends ContributorCommon_base {
22
+ constructor(data: ContributorListItemData | ContributorData);
23
+ }
24
+ declare const ContributorDetailed_base: import("polytype").Polytype.ClusteredConstructor<[typeof ContributorCommon, {
25
+ new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.MarketplaceContributor): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.MarketplaceContributor>;
26
+ }]>;
27
+ export declare class ContributorDetailed extends ContributorDetailed_base {
28
+ constructor(data: ContributorData);
29
+ }
30
+ declare const ContributorListItem_base: import("polytype").Polytype.ClusteredConstructor<[typeof ContributorCommon, {
31
+ new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.MarketplaceContributor): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.MarketplaceContributor>;
32
+ }]>;
33
+ export declare class ContributorListItem extends ContributorListItem_base {
34
+ constructor(data: ContributorListItemData);
35
+ }
36
+ export declare class ContributorListQuery extends ListQueryModel<ContributorListQueryData> {
37
+ constructor(query?: ContributorListQueryData);
38
+ refine(query: ContributorListQueryData): ContributorListQuery;
39
+ execute: AsyncResourceVariant<() => Promise<ContributorList>>;
40
+ getTotalCount: AsyncResourceVariant<() => Promise<number>>;
41
+ findOneAndOnly: AsyncResourceVariant<() => Promise<ContributorListItem | undefined>>;
42
+ }
43
+ declare const ContributorList_base: import("polytype").Polytype.ClusteredConstructor<[typeof ContributorListQuery, {
44
+ new (items: ContributorListItem[], totalCount: number): ListDataModel<ContributorListItem>;
45
+ }]>;
46
+ export declare class ContributorList extends ContributorList_base {
47
+ constructor(query: ContributorListQueryData, contributors: ContributorListItem[], totalCount: number);
48
+ }
49
+ export {};
@@ -0,0 +1,31 @@
1
+ import { ListQueryModel } from "../../base/ListQueryModel.js";
2
+ import { Money } from "../../base/Money.js";
3
+ import { DateTime } from "luxon";
4
+ import type { Contributor } from "./Contributor.js";
5
+ import type { ContributorIncomingInvoiceData, ContributorListIncomingInvoiceQueryData } from "./types.js";
6
+ import { ListDataModel } from "../../base/ListDataModel.js";
7
+ import { DataModel } from "../../base/DataModel.js";
8
+ export declare class ContributorIncomingInvoice extends DataModel<ContributorIncomingInvoiceData> {
9
+ readonly contributor: Contributor;
10
+ readonly id: string;
11
+ readonly pdfId: string;
12
+ readonly invoiceNumber: string;
13
+ readonly date: DateTime;
14
+ readonly totalNet: Money;
15
+ readonly totalGross: Money;
16
+ constructor(contributor: Contributor, data: ContributorIncomingInvoiceData);
17
+ }
18
+ export declare class ContributorIncomingInvoiceListQuery extends ListQueryModel<ContributorListIncomingInvoiceQueryData> {
19
+ readonly contributor: Contributor;
20
+ constructor(contributor: Contributor, query?: ContributorListIncomingInvoiceQueryData);
21
+ refine(query: ContributorListIncomingInvoiceQueryData): ContributorIncomingInvoiceListQuery;
22
+ execute: import("../../react.js").AsyncResourceVariant<() => Promise<ContributorIncomingInvoicesList>>;
23
+ getTotalCount: import("../../react.js").AsyncResourceVariant<() => Promise<number>>;
24
+ }
25
+ declare const ContributorIncomingInvoicesList_base: import("polytype").Polytype.ClusteredConstructor<[typeof ContributorIncomingInvoiceListQuery, {
26
+ new (items: ContributorIncomingInvoice[], totalCount: number): ListDataModel<ContributorIncomingInvoice>;
27
+ }]>;
28
+ export declare class ContributorIncomingInvoicesList extends ContributorIncomingInvoicesList_base {
29
+ constructor(contributor: Contributor, query: ContributorListIncomingInvoiceQueryData, invoices: ContributorIncomingInvoice[], totalCount: number);
30
+ }
31
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ContributorBehaviors } from "./types.js";
2
+ import { MittwaldAPIV2Client } from "@mittwald/api-client";
3
+ export declare const apiContributorBehaviors: (client: MittwaldAPIV2Client) => ContributorBehaviors;
@@ -0,0 +1,2 @@
1
+ export * from "./api.js";
2
+ export * from "./types.js";
@@ -0,0 +1,10 @@
1
+ import type { QueryResponseData } from "../../../base/types.js";
2
+ import type { ContributorData, ContributorIncomingInvoiceData, ContributorListIncomingInvoiceQueryData, ContributorListItemData, ContributorListQueryData } from "../types.js";
3
+ export interface ContributorBehaviors {
4
+ find: (contributorId: string) => Promise<ContributorData | undefined>;
5
+ list: (query?: ContributorListQueryData) => Promise<QueryResponseData<ContributorListItemData>>;
6
+ listIncomingInvoices: (contributorId: string, queryParameters?: ContributorListIncomingInvoiceQueryData) => Promise<{
7
+ items: ContributorIncomingInvoiceData[];
8
+ totalCount: number;
9
+ }>;
10
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./Contributor.js";
2
+ export * from "./ContributorIncomingInvoice.js";
3
+ export * from "./types.js";
@@ -0,0 +1,6 @@
1
+ import type { MittwaldAPIV2 } from "@mittwald/api-client";
2
+ export type ContributorData = MittwaldAPIV2.Components.Schemas.MarketplaceContributor;
3
+ export type ContributorListItemData = MittwaldAPIV2.Operations.ExtensionListContributors.ResponseData[number];
4
+ export type ContributorListQueryData = MittwaldAPIV2.Paths.V2Contributors.Get.Parameters.Query;
5
+ export type ContributorIncomingInvoiceData = MittwaldAPIV2.Operations.ContributorListIncomingInvoices.ResponseData[number];
6
+ export type ContributorListIncomingInvoiceQueryData = MittwaldAPIV2.Paths.V2ContributorsContributorIdInvoicesIncoming.Get.Parameters.Query;
@@ -0,0 +1 @@
1
+ export * from "./Contributor/index.js";