@mittwald/api-client 3.1.22 → 3.1.23

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 (46) hide show
  1. package/dist/index.d.mts +16 -0
  2. package/dist/index.d.ts +16 -0
  3. package/dist/index.mjs +1164 -0
  4. package/dist/{cjs/generated/v2/client-react.d.ts → react.d.mts} +270 -265
  5. package/dist/{esm/generated/v2/client-react.d.ts → react.d.ts} +270 -265
  6. package/dist/react.mjs +744 -0
  7. package/dist/shared/api-client.f3482d23.d.mts +25479 -0
  8. package/dist/shared/api-client.f3482d23.d.ts +25479 -0
  9. package/dist/shared/api-client.f512b243.mjs +1467 -0
  10. package/dist/version.d.ts +1 -1
  11. package/dist/version.js +1 -1
  12. package/package.json +93 -54
  13. package/dist/cjs/generated/v2/client-react.js +0 -347
  14. package/dist/cjs/generated/v2/client.d.ts +0 -9982
  15. package/dist/cjs/generated/v2/client.js +0 -678
  16. package/dist/cjs/generated/v2/descriptors.d.ts +0 -593
  17. package/dist/cjs/generated/v2/descriptors.js +0 -1772
  18. package/dist/cjs/generated/v2/types.d.ts +0 -14896
  19. package/dist/cjs/generated/v2/types.js +0 -2
  20. package/dist/cjs/index.d.ts +0 -3
  21. package/dist/cjs/index.js +0 -7
  22. package/dist/cjs/react.d.ts +0 -1
  23. package/dist/cjs/react.js +0 -5
  24. package/dist/cjs/v2/default.d.ts +0 -12
  25. package/dist/cjs/v2/default.js +0 -70
  26. package/dist/cjs/v2/react.d.ts +0 -3
  27. package/dist/cjs/v2/react.js +0 -7
  28. package/dist/cjs/version.d.ts +0 -1
  29. package/dist/cjs/version.js +0 -4
  30. package/dist/esm/generated/v2/client-react.js +0 -351
  31. package/dist/esm/generated/v2/client.d.ts +0 -9982
  32. package/dist/esm/generated/v2/client.js +0 -648
  33. package/dist/esm/generated/v2/descriptors.d.ts +0 -593
  34. package/dist/esm/generated/v2/descriptors.js +0 -1764
  35. package/dist/esm/generated/v2/types.d.ts +0 -14896
  36. package/dist/esm/generated/v2/types.js +0 -1
  37. package/dist/esm/index.d.ts +0 -3
  38. package/dist/esm/index.js +0 -2
  39. package/dist/esm/react.d.ts +0 -1
  40. package/dist/esm/react.js +0 -1
  41. package/dist/esm/v2/default.d.ts +0 -12
  42. package/dist/esm/v2/default.js +0 -53
  43. package/dist/esm/v2/react.d.ts +0 -3
  44. package/dist/esm/v2/react.js +0 -3
  45. package/dist/esm/version.d.ts +0 -1
  46. package/dist/esm/version.js +0 -1
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const MittwaldAPIClientVersion = '3.1.22';
1
+ export declare const MittwaldAPIClientVersion = '3.1.23';
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const MittwaldAPIClientVersion = '3.1.22';
1
+ export const MittwaldAPIClientVersion = '3.1.23';
package/package.json CHANGED
@@ -1,60 +1,63 @@
1
1
  {
2
2
  "name": "@mittwald/api-client",
3
- "version": "3.1.22",
3
+ "version": "3.1.23",
4
+ "author": "Mittwald CM Service GmbH & Co. KG <opensource@mittwald.de>",
5
+ "type": "module",
4
6
  "description": "Auto-generated client for the mittwald API",
5
- "license": "MIT",
6
- "repository": "github:mittwald/api-client-js",
7
- "author": {
8
- "name": "Mittwald CM Service GmbH & Co. KG",
9
- "email": "opensource@mittwald.de"
10
- },
7
+ "keywords": [
8
+ "api",
9
+ "client",
10
+ "mittwald",
11
+ "rest",
12
+ "sdk"
13
+ ],
11
14
  "homepage": "https://developer.mittwald.de",
15
+ "repository": "github:mittwald/api-client-js",
12
16
  "bugs": {
13
17
  "url": "https://github.com/mittwald/api-client-js/issues"
14
18
  },
15
- "main": "dist/cjs/index.js",
16
- "type": "module",
19
+ "license": "MIT",
17
20
  "exports": {
18
- ".": {
19
- "types": {
20
- "import": "./dist/esm/index.d.ts",
21
- "require": "./dist/cjs/index.d.ts",
22
- "default": "./dist/esm/index.d.ts"
23
- },
24
- "default": {
25
- "import": "./dist/esm/index.js",
26
- "require": "./dist/cjs/index.js",
27
- "default": "./dist/esm/index.js"
28
- }
29
- },
30
- "./react": {
31
- "types": {
32
- "require": "./dist/cjs/react.d.ts",
33
- "default": "./dist/esm/react.d.ts"
34
- },
35
- "default": {
36
- "require": "./dist/cjs/react.js",
37
- "default": "./dist/esm/react.js"
38
- }
39
- }
40
- },
41
- "scripts": {
42
- "generate:client": "yarn generate:client:v2 && yarn post:generate",
43
- "generate:client-dev": "yarn generate:client-dev:v2 && yarn post:generate",
44
- "generate:client-dev:v2": "curl --silent https://api-public.dev.mittwald.systems/openapi | ./transform-openapi.sh | yarn acg generate --name MittwaldAPIV2 - src/generated/v2 --optionalHeader x-access-token",
45
- "generate:client:v2": "curl --silent https://api.mittwald.de/openapi | ./transform-openapi.sh | yarn acg generate --name MittwaldAPIV2 - src/generated/v2 --optionalHeader x-access-token",
46
- "post:generate": "yarn run -T compile && yarn run -T compile:cjs"
21
+ ".": "./dist/index.mjs",
22
+ "./react": "./dist/react.mjs"
47
23
  },
48
24
  "files": [
49
- "dist/**/*.{js,d.ts}"
50
- ],
51
- "keywords": [
52
- "mittwald",
53
- "api",
54
- "client",
55
- "sdk",
56
- "rest"
25
+ "dist"
57
26
  ],
27
+ "scripts": {
28
+ "build": "yarn unbuild",
29
+ "build-dev": "yarn build",
30
+ "format": "prettier --write '**/*.{ts,tsx,yaml,yml,json,md,mdx,js}'",
31
+ "generate:client": "yarn acg generate --name MittwaldAPIV2 spec/openapi.json src/generated/v2 --optionalHeader x-access-token",
32
+ "generate:client-dev": "yarn acg generate --name MittwaldAPIV2 spec/openapi-dev.json src/generated/v2 --optionalHeader x-access-token",
33
+ "lint": "eslint .",
34
+ "spec:refresh": "concurrently yarn:spec:refresh:v2 yarn:spec:refresh-dev:v2",
35
+ "spec:refresh:v2": "curl --silent https://api.mittwald.de/openapi | spec/transform-openapi.sh > spec/openapi.json",
36
+ "spec:refresh-dev:v2": "curl --silent https://api-public.dev.mittwald.systems/openapi | spec/transform-openapi.sh > spec/openapi-dev.json"
37
+ },
38
+ "dependencies": {
39
+ "@mittwald/api-client-commons": "4.1.0",
40
+ "browser-or-node": "^3.0.0-pre.0"
41
+ },
42
+ "devDependencies": {
43
+ "@mittwald/api-code-generator": "1.0.0",
44
+ "@mittwald/react-use-promise": "^2.1.0",
45
+ "@types/react": "^18",
46
+ "@typescript-eslint/eslint-plugin": "^6.12.0",
47
+ "@typescript-eslint/parser": "^6.12.0",
48
+ "concurrently": "^8.2.2",
49
+ "eslint": "^8.54.0",
50
+ "eslint-config-prettier": "^9.0.0",
51
+ "eslint-plugin-json": "^3.1.0",
52
+ "eslint-plugin-prettier": "^5.0.1",
53
+ "has-flag": "^5.0.1",
54
+ "prettier": "^3.1.0",
55
+ "prettier-plugin-jsdoc": "^1.1.1",
56
+ "prettier-plugin-pkgsort": "^0.2.1",
57
+ "prettier-plugin-sort-json": "^3.1.0",
58
+ "react": "^18.2.0",
59
+ "unbuild": "^2.0.0"
60
+ },
58
61
  "peerDependencies": {
59
62
  "@mittwald/react-use-promise": "^1.3.2"
60
63
  },
@@ -63,13 +66,49 @@
63
66
  "optional": true
64
67
  }
65
68
  },
66
- "dependencies": {
67
- "@mittwald/api-client-commons": "^4.1.0",
68
- "browser-or-node": "^2.1.1"
69
- },
70
- "devDependencies": {
71
- "@mittwald/api-code-generator": "^1.0.0",
72
- "@mittwald/react-use-promise": "^1.3.2"
69
+ "nx": {
70
+ "targets": {
71
+ "build": {
72
+ "cache": true,
73
+ "dependsOn": [
74
+ "^build",
75
+ "generate:client"
76
+ ]
77
+ },
78
+ "build-dev": {
79
+ "cache": true,
80
+ "dependsOn": [
81
+ "^build",
82
+ "generate:client-dev"
83
+ ]
84
+ },
85
+ "generate:client": {
86
+ "cache": true,
87
+ "dependsOn": [
88
+ "^build"
89
+ ],
90
+ "inputs": [
91
+ "{projectRoot}/spec/*"
92
+ ],
93
+ "outputs": [
94
+ "{projectRoot}/src/generated/**/*"
95
+ ]
96
+ },
97
+ "generate:client-dev": {
98
+ "cache": true,
99
+ "dependsOn": [
100
+ "^build"
101
+ ],
102
+ "inputs": [
103
+ "{projectRoot}/spec/*"
104
+ ],
105
+ "outputs": [
106
+ "{projectRoot}/src/generated/**/*"
107
+ ]
108
+ }
109
+ }
73
110
  },
74
- "types": "dist/cjs/index.d.ts"
111
+ "unbuild": {
112
+ "declaration": true
113
+ }
75
114
  }
@@ -1,347 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.MittwaldAPIV2ClientReact = void 0;
30
- const react_1 = require("@mittwald/api-client-commons/react");
31
- const descriptors = __importStar(require("./descriptors.js"));
32
- __exportStar(require("@mittwald/react-use-promise/types"), exports);
33
- const buildAppApi = (baseClient) => ({
34
- /** Get a specific `App`. */
35
- getApp: new react_1.ApiCallAsyncResourceFactory(descriptors.appGetApp, baseClient.app.getApp).getApiResource,
36
- /** Get a specific `AppInstallation`. */
37
- getAppinstallation: new react_1.ApiCallAsyncResourceFactory(descriptors.appGetAppinstallation, baseClient.app.getAppinstallation).getApiResource,
38
- /** Get a specific `AppVersion`. */
39
- getAppversion: new react_1.ApiCallAsyncResourceFactory(descriptors.appGetAppversion, baseClient.app.getAppversion).getApiResource,
40
- /** Get the missing requirements of an appInstallation for a specific target AppVersion. */
41
- getMissingDependenciesForAppinstallation: new react_1.ApiCallAsyncResourceFactory(descriptors.appGetMissingDependenciesForAppinstallation, baseClient.app.getMissingDependenciesForAppinstallation).getApiResource,
42
- /** Get a specific `SystemSoftware`. */
43
- getSystemsoftware: new react_1.ApiCallAsyncResourceFactory(descriptors.appGetSystemsoftware, baseClient.app.getSystemsoftware).getApiResource,
44
- /** Get a specific `SystemSoftwareVersion`. */
45
- getSystemsoftwareversion: new react_1.ApiCallAsyncResourceFactory(descriptors.appGetSystemsoftwareversion, baseClient.app.getSystemsoftwareversion).getApiResource,
46
- /** Get all `AppInstallations` inside a specific `Project`. */
47
- listAppinstallations: new react_1.ApiCallAsyncResourceFactory(descriptors.appListAppinstallations, baseClient.app.listAppinstallations).getApiResource,
48
- /** Get all available `Apps`. */
49
- listApps: new react_1.ApiCallAsyncResourceFactory(descriptors.appListApps, baseClient.app.listApps).getApiResource,
50
- /** Get all `AppVersions` of a specific `App`. */
51
- listAppversions: new react_1.ApiCallAsyncResourceFactory(descriptors.appListAppversions, baseClient.app.listAppversions).getApiResource,
52
- /** Get all available `SystemSoftware`. */
53
- listSystemsoftwares: new react_1.ApiCallAsyncResourceFactory(descriptors.appListSystemsoftwares, baseClient.app.listSystemsoftwares).getApiResource,
54
- /** Get all available `SystemSoftwareVersions` of a specific `SystemSoftware`. */
55
- listSystemsoftwareversions: new react_1.ApiCallAsyncResourceFactory(descriptors.appListSystemsoftwareversions, baseClient.app.listSystemsoftwareversions).getApiResource,
56
- /** Get all update candidates for a specific `AppVersion`. */
57
- listUpdateCandidatesForAppversion: new react_1.ApiCallAsyncResourceFactory(descriptors.appListUpdateCandidatesForAppversion, baseClient.app.listUpdateCandidatesForAppversion).getApiResource,
58
- /** Get runtime status of a specific `AppInstallation`. */
59
- retrieveStatus: new react_1.ApiCallAsyncResourceFactory(descriptors.appRetrieveStatus, baseClient.app.retrieveStatus).getApiResource,
60
- });
61
- const buildArticleApi = (baseClient) => ({
62
- /** Get an Article. */
63
- getArticle: new react_1.ApiCallAsyncResourceFactory(descriptors.articleGetArticle, baseClient.article.getArticle).getApiResource,
64
- /** List Articles. */
65
- listArticles: new react_1.ApiCallAsyncResourceFactory(descriptors.articleListArticles, baseClient.article.listArticles).getApiResource,
66
- });
67
- const buildBackupApi = (baseClient) => ({
68
- /** List BackupSchedules belonging to a Project. */
69
- listProjectBackupSchedules: new react_1.ApiCallAsyncResourceFactory(descriptors.backupListProjectBackupSchedules, baseClient.backup.listProjectBackupSchedules).getApiResource,
70
- /** List Backups belonging to a Project. */
71
- listProjectBackups: new react_1.ApiCallAsyncResourceFactory(descriptors.backupListProjectBackups, baseClient.backup.listProjectBackups).getApiResource,
72
- /** Get a ProjectBackupSchedule. */
73
- getProjectBackupSchedule: new react_1.ApiCallAsyncResourceFactory(descriptors.backupGetProjectBackupSchedule, baseClient.backup.getProjectBackupSchedule).getApiResource,
74
- /** Get a ProjectBackup. */
75
- getProjectBackup: new react_1.ApiCallAsyncResourceFactory(descriptors.backupGetProjectBackup, baseClient.backup.getProjectBackup).getApiResource,
76
- });
77
- const buildContractApi = (baseClient) => ({
78
- /** Return the BaseItem of the Contract with the given ID. */
79
- getBaseItemOfContract: new react_1.ApiCallAsyncResourceFactory(descriptors.contractGetBaseItemOfContract, baseClient.contract.getBaseItemOfContract).getApiResource,
80
- /** Return the Contract for the given Domain. */
81
- getDetailOfContractByDomain: new react_1.ApiCallAsyncResourceFactory(descriptors.contractGetDetailOfContractByDomain, baseClient.contract.getDetailOfContractByDomain).getApiResource,
82
- /** Return the Contract for the given Project. */
83
- getDetailOfContractByProject: new react_1.ApiCallAsyncResourceFactory(descriptors.contractGetDetailOfContractByProject, baseClient.contract.getDetailOfContractByProject).getApiResource,
84
- /** Return the Contract for the given Server. */
85
- getDetailOfContractByServer: new react_1.ApiCallAsyncResourceFactory(descriptors.contractGetDetailOfContractByServer, baseClient.contract.getDetailOfContractByServer).getApiResource,
86
- /** Get the ContractItem with the given ID. */
87
- getDetailOfContractItem: new react_1.ApiCallAsyncResourceFactory(descriptors.contractGetDetailOfContractItem, baseClient.contract.getDetailOfContractItem).getApiResource,
88
- /** Returns the Contract with the given ID. */
89
- getDetailOfContract: new react_1.ApiCallAsyncResourceFactory(descriptors.contractGetDetailOfContract, baseClient.contract.getDetailOfContract).getApiResource,
90
- /** Return the next TerminationDate for the ContractItem with the given ID. */
91
- getNextTerminationDateForItem: new react_1.ApiCallAsyncResourceFactory(descriptors.contractGetNextTerminationDateForItem, baseClient.contract.getNextTerminationDateForItem).getApiResource,
92
- /** Return a list of Contracts for the given Customer. */
93
- listContracts: new react_1.ApiCallAsyncResourceFactory(descriptors.contractListContracts, baseClient.contract.listContracts).getApiResource,
94
- /** Get details of an Invoice. */
95
- invoiceDetailOfInvoice: new react_1.ApiCallAsyncResourceFactory(descriptors.invoiceDetailOfInvoice, baseClient.contract.invoiceDetailOfInvoice).getApiResource,
96
- /** Get InvoiceSettings of a Customer. */
97
- invoiceGetDetailOfInvoiceSettings: new react_1.ApiCallAsyncResourceFactory(descriptors.invoiceGetDetailOfInvoiceSettings, baseClient.contract.invoiceGetDetailOfInvoiceSettings).getApiResource,
98
- /** Request an Access Token for the Invoice file. */
99
- invoiceGetFileAccessToken: new react_1.ApiCallAsyncResourceFactory(descriptors.invoiceGetFileAccessToken, baseClient.contract.invoiceGetFileAccessToken).getApiResource,
100
- /** List Invoices of a Customer. */
101
- invoiceListCustomerInvoices: new react_1.ApiCallAsyncResourceFactory(descriptors.invoiceListCustomerInvoices, baseClient.contract.invoiceListCustomerInvoices).getApiResource,
102
- /** Get Order for Customer. */
103
- orderGetOrder: new react_1.ApiCallAsyncResourceFactory(descriptors.orderGetOrder, baseClient.contract.orderGetOrder).getApiResource,
104
- /** Get list of Orders of a Customer. */
105
- orderListCustomerOrders: new react_1.ApiCallAsyncResourceFactory(descriptors.orderListCustomerOrders, baseClient.contract.orderListCustomerOrders).getApiResource,
106
- /** Get list of Orders of a Project. */
107
- orderListProjectOrders: new react_1.ApiCallAsyncResourceFactory(descriptors.orderListProjectOrders, baseClient.contract.orderListProjectOrders).getApiResource,
108
- });
109
- const buildConversationApi = (baseClient) => ({
110
- /** Get all conversation the authenticated user has created or has access to. */
111
- listConversations: new react_1.ApiCallAsyncResourceFactory(descriptors.conversationListConversations, baseClient.conversation.listConversations).getApiResource,
112
- /** Get all message of the conversation. */
113
- listMessagesByConversation: new react_1.ApiCallAsyncResourceFactory(descriptors.conversationListMessagesByConversation, baseClient.conversation.listMessagesByConversation).getApiResource,
114
- /** Get a specific conversation category. */
115
- getCategory: new react_1.ApiCallAsyncResourceFactory(descriptors.conversationGetCategory, baseClient.conversation.getCategory).getApiResource,
116
- /** Get members of a support conversation. */
117
- getConversationMembers: new react_1.ApiCallAsyncResourceFactory(descriptors.conversationGetConversationMembers, baseClient.conversation.getConversationMembers).getApiResource,
118
- /** Get a support conversation. */
119
- getConversation: new react_1.ApiCallAsyncResourceFactory(descriptors.conversationGetConversation, baseClient.conversation.getConversation).getApiResource,
120
- /** Request an access token for the File belonging to the Conversation. */
121
- getFileAccessToken: new react_1.ApiCallAsyncResourceFactory(descriptors.conversationGetFileAccessToken, baseClient.conversation.getFileAccessToken).getApiResource,
122
- /** Get all conversation categories. */
123
- listCategories: new react_1.ApiCallAsyncResourceFactory(descriptors.conversationListCategories, baseClient.conversation.listCategories).getApiResource,
124
- });
125
- const buildCronjobApi = (baseClient) => ({
126
- /** List Cronjobs belonging to a Project. */
127
- listCronjobs: new react_1.ApiCallAsyncResourceFactory(descriptors.cronjobListCronjobs, baseClient.cronjob.listCronjobs).getApiResource,
128
- /** List CronjobExecutions belonging to a Cronjob. */
129
- listExecutions: new react_1.ApiCallAsyncResourceFactory(descriptors.cronjobListExecutions, baseClient.cronjob.listExecutions).getApiResource,
130
- /** Get a Cronjob. */
131
- getCronjob: new react_1.ApiCallAsyncResourceFactory(descriptors.cronjobGetCronjob, baseClient.cronjob.getCronjob).getApiResource,
132
- /** Get a CronjobExecution. */
133
- getExecution: new react_1.ApiCallAsyncResourceFactory(descriptors.cronjobGetExecution, baseClient.cronjob.getExecution).getApiResource,
134
- });
135
- const buildCustomerApi = (baseClient) => ({
136
- /** Get all customer categories. */
137
- listOfCustomerCategories: new react_1.ApiCallAsyncResourceFactory(descriptors.customerListOfCustomerCategories, baseClient.customer.listOfCustomerCategories).getApiResource,
138
- /** Get all customer profiles the authenticated user has access to. */
139
- listCustomers: new react_1.ApiCallAsyncResourceFactory(descriptors.customerListCustomers, baseClient.customer.listCustomers).getApiResource,
140
- /** Get a customer category. */
141
- getCustomerCategory: new react_1.ApiCallAsyncResourceFactory(descriptors.customerGetCustomerCategory, baseClient.customer.getCustomerCategory).getApiResource,
142
- /** Get a CustomerInvite. */
143
- getCustomerInvite: new react_1.ApiCallAsyncResourceFactory(descriptors.customerGetCustomerInvite, baseClient.customer.getCustomerInvite).getApiResource,
144
- /** Get a CustomerMembership. */
145
- getCustomerMembership: new react_1.ApiCallAsyncResourceFactory(descriptors.customerGetCustomerMembership, baseClient.customer.getCustomerMembership).getApiResource,
146
- /** Get a customer profile. */
147
- getCustomer: new react_1.ApiCallAsyncResourceFactory(descriptors.customerGetCustomer, baseClient.customer.getCustomer).getApiResource,
148
- /** Get a CustomerInvite by token. */
149
- getCustomerTokenInvite: new react_1.ApiCallAsyncResourceFactory(descriptors.customerGetCustomerTokenInvite, baseClient.customer.getCustomerTokenInvite).getApiResource,
150
- /** Check if the customer profile has a valid contract partner configured. */
151
- isCustomerLegallyCompetent: new react_1.ApiCallAsyncResourceFactory(descriptors.customerIsCustomerLegallyCompetent, baseClient.customer.isCustomerLegallyCompetent).getApiResource,
152
- /** List CustomerInvites belonging to the executing user. */
153
- listCustomerInvites: new react_1.ApiCallAsyncResourceFactory(descriptors.customerListCustomerInvites, baseClient.customer.listCustomerInvites).getApiResource,
154
- /** List CustomerMemberships belonging to the executing user. */
155
- listCustomerMemberships: new react_1.ApiCallAsyncResourceFactory(descriptors.customerListCustomerMemberships, baseClient.customer.listCustomerMemberships).getApiResource,
156
- /** List Invites belonging to a Customer. */
157
- listInvitesForCustomer: new react_1.ApiCallAsyncResourceFactory(descriptors.customerListInvitesForCustomer, baseClient.customer.listInvitesForCustomer).getApiResource,
158
- /** List Memberships belonging to a Customer. */
159
- listMembershipsForCustomer: new react_1.ApiCallAsyncResourceFactory(descriptors.customerListMembershipsForCustomer, baseClient.customer.listMembershipsForCustomer).getApiResource,
160
- });
161
- const buildDatabaseApi = (baseClient) => ({
162
- /** List MySQLDatabases belonging to a Project. */
163
- listMysqlDatabases: new react_1.ApiCallAsyncResourceFactory(descriptors.databaseListMysqlDatabases, baseClient.database.listMysqlDatabases).getApiResource,
164
- /** List MySQLUsers belonging to a Database. */
165
- listMysqlUsers: new react_1.ApiCallAsyncResourceFactory(descriptors.databaseListMysqlUsers, baseClient.database.listMysqlUsers).getApiResource,
166
- /** List RedisDatabases belonging to a Project. */
167
- listRedisDatabases: new react_1.ApiCallAsyncResourceFactory(descriptors.databaseListRedisDatabases, baseClient.database.listRedisDatabases).getApiResource,
168
- /** Get a MySQLDatabase. */
169
- getMysqlDatabase: new react_1.ApiCallAsyncResourceFactory(descriptors.databaseGetMysqlDatabase, baseClient.database.getMysqlDatabase).getApiResource,
170
- /** Get a MySQLUser. */
171
- getMysqlUser: new react_1.ApiCallAsyncResourceFactory(descriptors.databaseGetMysqlUser, baseClient.database.getMysqlUser).getApiResource,
172
- /** Get a RedisDatabase. */
173
- getRedisDatabase: new react_1.ApiCallAsyncResourceFactory(descriptors.databaseGetRedisDatabase, baseClient.database.getRedisDatabase).getApiResource,
174
- /** Get a MySQLUser's PhpMyAdmin-URL. */
175
- getMysqlUserPhpMyAdminUrl: new react_1.ApiCallAsyncResourceFactory(descriptors.databaseGetMysqlUserPhpMyAdminUrl, baseClient.database.getMysqlUserPhpMyAdminUrl).getApiResource,
176
- /** List available MySQL character sets and collations, optionally filtered by a MySQLVersion. */
177
- listMysqlCharsets: new react_1.ApiCallAsyncResourceFactory(descriptors.databaseListMysqlCharsets, baseClient.database.listMysqlCharsets).getApiResource,
178
- /** List MySQLVersions. */
179
- listMysqlVersions: new react_1.ApiCallAsyncResourceFactory(descriptors.databaseListMysqlVersions, baseClient.database.listMysqlVersions).getApiResource,
180
- /** List RedisVersions. */
181
- listRedisVersions: new react_1.ApiCallAsyncResourceFactory(descriptors.databaseListRedisVersions, baseClient.database.listRedisVersions).getApiResource,
182
- });
183
- const buildDomainApi = (baseClient) => ({
184
- /** Get a DNSZone. */
185
- dnsGetDnsZone: new react_1.ApiCallAsyncResourceFactory(descriptors.dnsGetDnsZone, baseClient.domain.dnsGetDnsZone).getApiResource,
186
- /** List DNSZones belonging to a Project. */
187
- dnsListDnsZones: new react_1.ApiCallAsyncResourceFactory(descriptors.dnsListDnsZones, baseClient.domain.dnsListDnsZones).getApiResource,
188
- /** Get a Domain. */
189
- getDomain: new react_1.ApiCallAsyncResourceFactory(descriptors.domainGetDomain, baseClient.domain.getDomain).getApiResource,
190
- /** Get a DomainOwnership. */
191
- getDomainOwnership: new react_1.ApiCallAsyncResourceFactory(descriptors.domainGetDomainOwnership, baseClient.domain.getDomainOwnership).getApiResource,
192
- /** Get the latest screenshot's FileReference belonging to a Domain. */
193
- getLatestScreenshot: new react_1.ApiCallAsyncResourceFactory(descriptors.domainGetLatestScreenshot, baseClient.domain.getLatestScreenshot).getApiResource,
194
- /** List the DomainOwnerships of a project. */
195
- listDomainOwnerships: new react_1.ApiCallAsyncResourceFactory(descriptors.domainListDomainOwnerships, baseClient.domain.listDomainOwnerships).getApiResource,
196
- /** List Domains belonging to a Project. */
197
- listDomains: new react_1.ApiCallAsyncResourceFactory(descriptors.domainListDomains, baseClient.domain.listDomains).getApiResource,
198
- /** List the contact schemas for a TLD. */
199
- listTldContactSchemas: new react_1.ApiCallAsyncResourceFactory(descriptors.domainListTldContactSchemas, baseClient.domain.listTldContactSchemas).getApiResource,
200
- /** List TLDs. */
201
- listTlds: new react_1.ApiCallAsyncResourceFactory(descriptors.domainListTlds, baseClient.domain.listTlds).getApiResource,
202
- /** List Ingresses. */
203
- ingressListIngresses: new react_1.ApiCallAsyncResourceFactory(descriptors.ingressListIngresses, baseClient.domain.ingressListIngresses).getApiResource,
204
- /** Get an Ingress. */
205
- ingressGetIngress: new react_1.ApiCallAsyncResourceFactory(descriptors.ingressGetIngress, baseClient.domain.ingressGetIngress).getApiResource,
206
- });
207
- const buildFileApi = (baseClient) => ({
208
- /** Get a File's meta. */
209
- getFileMeta: new react_1.ApiCallAsyncResourceFactory(descriptors.fileGetFileMeta, baseClient.file.getFileMeta).getApiResource,
210
- /** Get a FileUploadToken's rules. */
211
- getFileUploadTokenRules: new react_1.ApiCallAsyncResourceFactory(descriptors.fileGetFileUploadTokenRules, baseClient.file.getFileUploadTokenRules).getApiResource,
212
- /** Get a FileUploadType's rules. */
213
- getFileUploadTypeRules: new react_1.ApiCallAsyncResourceFactory(descriptors.fileGetFileUploadTypeRules, baseClient.file.getFileUploadTypeRules).getApiResource,
214
- /** Get a File. */
215
- getFile: new react_1.ApiCallAsyncResourceFactory(descriptors.fileGetFile, baseClient.file.getFile).getApiResource,
216
- });
217
- const buildMailApi = (baseClient) => ({
218
- /** List DeliveryBoxes belonging to a Project. */
219
- listDeliveryBoxes: new react_1.ApiCallAsyncResourceFactory(descriptors.mailListDeliveryBoxes, baseClient.mail.listDeliveryBoxes).getApiResource,
220
- /** List MailAddresses belonging to a Project. */
221
- listMailAddresses: new react_1.ApiCallAsyncResourceFactory(descriptors.mailListMailAddresses, baseClient.mail.listMailAddresses).getApiResource,
222
- /** Get a DeliveryBox. */
223
- getDeliveryBox: new react_1.ApiCallAsyncResourceFactory(descriptors.mailGetDeliveryBox, baseClient.mail.getDeliveryBox).getApiResource,
224
- /** Get a MailAddress. */
225
- getMailAddress: new react_1.ApiCallAsyncResourceFactory(descriptors.mailGetMailAddress, baseClient.mail.getMailAddress).getApiResource,
226
- /** List mail settings of a Project. */
227
- listProjectMailSettings: new react_1.ApiCallAsyncResourceFactory(descriptors.mailListProjectMailSettings, baseClient.mail.listProjectMailSettings).getApiResource,
228
- });
229
- const buildNotificationApi = (baseClient) => ({
230
- /** Getting the subscription status of the subscription. */
231
- newsletterGetInfo: new react_1.ApiCallAsyncResourceFactory(descriptors.newsletterGetInfo, baseClient.notification.newsletterGetInfo).getApiResource,
232
- /** Get the counts for unread notifications of the user. */
233
- scountUnreadNotifications: new react_1.ApiCallAsyncResourceFactory(descriptors.notificationsCountUnreadNotifications, baseClient.notification.scountUnreadNotifications).getApiResource,
234
- /** List all unread notifications. */
235
- slistNotifications: new react_1.ApiCallAsyncResourceFactory(descriptors.notificationsListNotifications, baseClient.notification.slistNotifications).getApiResource,
236
- });
237
- const buildPageInsightsApi = (baseClient) => ({
238
- /** Get detailed performance data for a given domain and path. */
239
- pageinsightsGetPerformanceData: new react_1.ApiCallAsyncResourceFactory(descriptors.pageinsightsGetPerformanceData, baseClient.pageInsights.pageinsightsGetPerformanceData).getApiResource,
240
- /** List websites (specified as domain and path) from a project where performance data is available. */
241
- pageinsightsListPerformanceDataForProject: new react_1.ApiCallAsyncResourceFactory(descriptors.pageinsightsListPerformanceDataForProject, baseClient.pageInsights.pageinsightsListPerformanceDataForProject).getApiResource,
242
- });
243
- const buildUserApi = (baseClient) => ({
244
- /** Get a PasswordPolicy. */
245
- passwordValidationGetPasswordPolicy: new react_1.ApiCallAsyncResourceFactory(descriptors.passwordValidationGetPasswordPolicy, baseClient.user.passwordValidationGetPasswordPolicy).getApiResource,
246
- /** Get your verified Email-Address. */
247
- getOwnEmail: new react_1.ApiCallAsyncResourceFactory(descriptors.userGetOwnEmail, baseClient.user.getOwnEmail).getApiResource,
248
- /** Get your current multi factor auth status. */
249
- getMfaStatus: new react_1.ApiCallAsyncResourceFactory(descriptors.userGetMfaStatus, baseClient.user.getMfaStatus).getApiResource,
250
- /** List all of your ApiTokens. */
251
- listApiTokens: new react_1.ApiCallAsyncResourceFactory(descriptors.userListApiTokens, baseClient.user.listApiTokens).getApiResource,
252
- /** Get your stored ssh-keys. */
253
- listSshKeys: new react_1.ApiCallAsyncResourceFactory(descriptors.userListSshKeys, baseClient.user.listSshKeys).getApiResource,
254
- /** Get a specific ApiToken. */
255
- getApiToken: new react_1.ApiCallAsyncResourceFactory(descriptors.userGetApiToken, baseClient.user.getApiToken).getApiResource,
256
- /** Get a specific stored ssh-key. */
257
- getSshKey: new react_1.ApiCallAsyncResourceFactory(descriptors.userGetSshKey, baseClient.user.getSshKey).getApiResource,
258
- /** Get your account information. */
259
- getOwnAccount: new react_1.ApiCallAsyncResourceFactory(descriptors.userGetOwnAccount, baseClient.user.getOwnAccount).getApiResource,
260
- /** The timestamp of your latest password change. */
261
- getPasswordUpdatedAt: new react_1.ApiCallAsyncResourceFactory(descriptors.userGetPasswordUpdatedAt, baseClient.user.getPasswordUpdatedAt).getApiResource,
262
- /** Get personalized settings. */
263
- getPersonalizedSettings: new react_1.ApiCallAsyncResourceFactory(descriptors.userGetPersonalizedSettings, baseClient.user.getPersonalizedSettings).getApiResource,
264
- /** Get a specific session. */
265
- getSession: new react_1.ApiCallAsyncResourceFactory(descriptors.userGetSession, baseClient.user.getSession).getApiResource,
266
- /** Get profile information for a user. */
267
- getUser: new react_1.ApiCallAsyncResourceFactory(descriptors.userGetUser, baseClient.user.getUser).getApiResource,
268
- /** Submitted feedback of the given user. */
269
- listFeedback: new react_1.ApiCallAsyncResourceFactory(descriptors.userListFeedback, baseClient.user.listFeedback).getApiResource,
270
- /** List all sessions. */
271
- listSessions: new react_1.ApiCallAsyncResourceFactory(descriptors.userListSessions, baseClient.user.listSessions).getApiResource,
272
- /** Request a support code. */
273
- supportCodeRequest: new react_1.ApiCallAsyncResourceFactory(descriptors.userSupportCodeRequest, baseClient.user.supportCodeRequest).getApiResource,
274
- });
275
- const buildProjectApi = (baseClient) => ({
276
- /** Get a ProjectInvite. */
277
- getProjectInvite: new react_1.ApiCallAsyncResourceFactory(descriptors.projectGetProjectInvite, baseClient.project.getProjectInvite).getApiResource,
278
- /** Get a ProjectMembership */
279
- getProjectMembership: new react_1.ApiCallAsyncResourceFactory(descriptors.projectGetProjectMembership, baseClient.project.getProjectMembership).getApiResource,
280
- /** Get a Project. */
281
- getProject: new react_1.ApiCallAsyncResourceFactory(descriptors.projectGetProject, baseClient.project.getProject).getApiResource,
282
- /** Get a ProjectInvite by token. */
283
- getProjectTokenInvite: new react_1.ApiCallAsyncResourceFactory(descriptors.projectGetProjectTokenInvite, baseClient.project.getProjectTokenInvite).getApiResource,
284
- /** Get the executing user's membership in a Project. */
285
- getSelfMembershipForProject: new react_1.ApiCallAsyncResourceFactory(descriptors.projectGetSelfMembershipForProject, baseClient.project.getSelfMembershipForProject).getApiResource,
286
- /** Get a Server. */
287
- getServer: new react_1.ApiCallAsyncResourceFactory(descriptors.projectGetServer, baseClient.project.getServer).getApiResource,
288
- /** List Invites belonging to a Project. */
289
- listInvitesForProject: new react_1.ApiCallAsyncResourceFactory(descriptors.projectListInvitesForProject, baseClient.project.listInvitesForProject).getApiResource,
290
- /** List Memberships belonging to a Project. */
291
- listMembershipsForProject: new react_1.ApiCallAsyncResourceFactory(descriptors.projectListMembershipsForProject, baseClient.project.listMembershipsForProject).getApiResource,
292
- /** List ProjectInvites belonging to the executing user. */
293
- listProjectInvites: new react_1.ApiCallAsyncResourceFactory(descriptors.projectListProjectInvites, baseClient.project.listProjectInvites).getApiResource,
294
- /** List ProjectMemberships belonging to the executing user. */
295
- listProjectMemberships: new react_1.ApiCallAsyncResourceFactory(descriptors.projectListProjectMemberships, baseClient.project.listProjectMemberships).getApiResource,
296
- /** List Projects belonging to the executing user. */
297
- listProjects: new react_1.ApiCallAsyncResourceFactory(descriptors.projectListProjects, baseClient.project.listProjects).getApiResource,
298
- /** List Servers belonging to the executing user. */
299
- listServers: new react_1.ApiCallAsyncResourceFactory(descriptors.projectListServers, baseClient.project.listServers).getApiResource,
300
- });
301
- const buildProjectFileSystemApi = (baseClient) => ({
302
- /** List directories belonging to a Project. */
303
- getDirectories: new react_1.ApiCallAsyncResourceFactory(descriptors.projectFileSystemGetDirectories, baseClient.projectFileSystem.getDirectories).getApiResource,
304
- /** Get a Project directory filesystem usage. */
305
- getDiskUsage: new react_1.ApiCallAsyncResourceFactory(descriptors.projectFileSystemGetDiskUsage, baseClient.projectFileSystem.getDiskUsage).getApiResource,
306
- /** Get a Project file's content. */
307
- getFileContent: new react_1.ApiCallAsyncResourceFactory(descriptors.projectFileSystemGetFileContent, baseClient.projectFileSystem.getFileContent).getApiResource,
308
- /** Get a Project's file/filesystem authorization token. */
309
- getJwt: new react_1.ApiCallAsyncResourceFactory(descriptors.projectFileSystemGetJwt, baseClient.projectFileSystem.getJwt).getApiResource,
310
- /** Get a Project file's information. */
311
- listFiles: new react_1.ApiCallAsyncResourceFactory(descriptors.projectFileSystemListFiles, baseClient.projectFileSystem.listFiles).getApiResource,
312
- });
313
- const buildSshsftpUserApi = (baseClient) => ({
314
- /** Get all SFTPUsers for a Project. */
315
- sftpUserListSftpUsers: new react_1.ApiCallAsyncResourceFactory(descriptors.sftpUserListSftpUsers, baseClient.sshsftpUser.sftpUserListSftpUsers).getApiResource,
316
- /** Get an SFTPUser. */
317
- sftpUserGetSftpUser: new react_1.ApiCallAsyncResourceFactory(descriptors.sftpUserGetSftpUser, baseClient.sshsftpUser.sftpUserGetSftpUser).getApiResource,
318
- /** Get all SSHUsers for a Project. */
319
- sshUserListSshUsers: new react_1.ApiCallAsyncResourceFactory(descriptors.sshUserListSshUsers, baseClient.sshsftpUser.sshUserListSshUsers).getApiResource,
320
- /** Get an SSHUser. */
321
- sshUserGetSshUser: new react_1.ApiCallAsyncResourceFactory(descriptors.sshUserGetSshUser, baseClient.sshsftpUser.sshUserGetSshUser).getApiResource,
322
- });
323
- class MittwaldAPIV2ClientReact {
324
- constructor(baseClient) {
325
- this.app = buildAppApi(baseClient);
326
- this.article = buildArticleApi(baseClient);
327
- this.backup = buildBackupApi(baseClient);
328
- this.contract = buildContractApi(baseClient);
329
- this.conversation = buildConversationApi(baseClient);
330
- this.cronjob = buildCronjobApi(baseClient);
331
- this.customer = buildCustomerApi(baseClient);
332
- this.database = buildDatabaseApi(baseClient);
333
- this.domain = buildDomainApi(baseClient);
334
- this.file = buildFileApi(baseClient);
335
- this.mail = buildMailApi(baseClient);
336
- this.notification = buildNotificationApi(baseClient);
337
- this.pageInsights = buildPageInsightsApi(baseClient);
338
- this.user = buildUserApi(baseClient);
339
- this.project = buildProjectApi(baseClient);
340
- this.projectFileSystem = buildProjectFileSystemApi(baseClient);
341
- this.sshsftpUser = buildSshsftpUserApi(baseClient);
342
- }
343
- static fromBaseClient(baseClient) {
344
- return new MittwaldAPIV2ClientReact(baseClient);
345
- }
346
- }
347
- exports.MittwaldAPIV2ClientReact = MittwaldAPIV2ClientReact;