@icepanel/sdk 0.1.0 → 0.1.6
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/README.md +1 -1
- package/dist/cjs/BaseClient.d.ts +7 -9
- package/dist/cjs/BaseClient.js +8 -3
- package/dist/cjs/Client.d.ts +2 -2
- package/dist/cjs/Client.js +1 -1
- package/dist/cjs/IcePanelClient.d.ts +7 -8
- package/dist/cjs/IcePanelClient.js +11 -11
- package/dist/cjs/api/requests/requests.d.ts +62 -142
- package/dist/cjs/api/resources/catalog/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/catalog/client/Client.js +1 -1
- package/dist/cjs/api/resources/catalog/resources/technologies/client/Client.d.ts +2 -71
- package/dist/cjs/api/resources/catalog/resources/technologies/client/Client.js +5 -262
- package/dist/cjs/api/resources/catalog/resources/technologies/types/types.d.ts +0 -12
- package/dist/cjs/api/resources/comments/client/Client.d.ts +7 -5
- package/dist/cjs/api/resources/comments/client/Client.js +25 -28
- package/dist/cjs/api/resources/comments/resources/replies/client/Client.d.ts +5 -3
- package/dist/cjs/api/resources/comments/resources/replies/client/Client.js +23 -26
- package/dist/cjs/api/resources/diagrams/client/Client.d.ts +4 -3
- package/dist/cjs/api/resources/diagrams/client/Client.js +31 -32
- package/dist/cjs/api/resources/diagrams/resources/content/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/diagrams/resources/content/client/Client.js +10 -7
- package/dist/cjs/api/resources/diagrams/resources/export/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/diagrams/resources/export/client/Client.js +7 -5
- package/dist/cjs/api/resources/diagrams/resources/groups/client/Client.d.ts +6 -4
- package/dist/cjs/api/resources/diagrams/resources/groups/client/Client.js +27 -29
- package/dist/cjs/api/resources/domains/client/Client.d.ts +5 -3
- package/dist/cjs/api/resources/domains/client/Client.js +26 -28
- package/dist/cjs/api/resources/drafts/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/drafts/client/Client.js +22 -15
- package/dist/cjs/api/resources/flows/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/flows/client/Client.js +28 -19
- package/dist/cjs/api/resources/flows/resources/export/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/flows/resources/export/client/Client.js +10 -7
- package/dist/cjs/api/resources/landscapes/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/landscapes/client/Client.js +19 -13
- package/dist/cjs/api/resources/landscapes/resources/export/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/landscapes/resources/export/client/Client.js +7 -5
- package/dist/cjs/api/resources/landscapes/resources/logs/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/landscapes/resources/logs/client/Client.js +10 -7
- package/dist/cjs/api/resources/landscapes/resources/logs/resources/stats/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/landscapes/resources/logs/resources/stats/client/Client.js +7 -5
- package/dist/cjs/api/resources/model/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/model/client/Client.js +1 -1
- package/dist/cjs/api/resources/model/resources/connections/client/Client.d.ts +28 -5
- package/dist/cjs/api/resources/model/resources/connections/client/Client.js +95 -17
- package/dist/cjs/api/resources/model/resources/connections/resources/export/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/model/resources/connections/resources/export/client/Client.js +6 -4
- package/dist/cjs/api/resources/model/resources/connections/types/types.d.ts +6 -0
- package/dist/cjs/api/resources/model/resources/objects/client/Client.d.ts +6 -4
- package/dist/cjs/api/resources/model/resources/objects/client/Client.js +24 -27
- package/dist/cjs/api/resources/model/resources/objects/resources/export/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/model/resources/objects/resources/export/client/Client.js +9 -6
- package/dist/cjs/api/resources/organizations/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/organizations/client/Client.js +16 -11
- package/dist/cjs/api/resources/organizations/resources/landscapes/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/organizations/resources/landscapes/client/Client.js +7 -5
- package/dist/cjs/api/resources/organizations/resources/logs/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/organizations/resources/logs/client/Client.js +7 -5
- package/dist/cjs/api/resources/organizations/resources/logs/resources/stats/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/organizations/resources/logs/resources/stats/client/Client.js +7 -5
- package/dist/cjs/api/resources/organizations/resources/technologies/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/organizations/resources/technologies/client/Client.js +16 -11
- package/dist/cjs/api/resources/organizations/resources/users/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/organizations/resources/users/client/Client.js +10 -7
- package/dist/cjs/api/resources/organizations/resources/users/resources/invites/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/organizations/resources/users/resources/invites/client/Client.js +10 -7
- package/dist/cjs/api/resources/shareLink/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/shareLink/client/Client.js +13 -9
- package/dist/cjs/api/resources/tags/client/Client.d.ts +8 -6
- package/dist/cjs/api/resources/tags/client/Client.js +26 -29
- package/dist/cjs/api/resources/tags/resources/groups/client/Client.d.ts +7 -5
- package/dist/cjs/api/resources/tags/resources/groups/client/Client.js +25 -28
- package/dist/cjs/api/resources/teams/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/teams/client/Client.js +22 -15
- package/dist/cjs/api/resources/versions/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/versions/client/Client.js +16 -11
- package/dist/cjs/api/resources/versions/resources/reverts/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/versions/resources/reverts/client/Client.js +13 -9
- package/dist/cjs/api/types/types.d.ts +187 -1487
- package/dist/cjs/api/types/types.js +14 -329
- package/dist/cjs/auth/AnyAuthProvider.d.ts +23 -0
- package/dist/cjs/auth/AnyAuthProvider.js +46 -0
- package/dist/cjs/auth/BearerAuthProvider.d.ts +23 -0
- package/dist/cjs/auth/BearerAuthProvider.js +82 -0
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +17 -10
- package/dist/cjs/auth/HeaderAuthProvider.js +22 -9
- package/dist/cjs/auth/index.d.ts +2 -0
- package/dist/cjs/auth/index.js +5 -1
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/environments.d.ts +2 -2
- package/dist/cjs/environments.js +1 -1
- package/dist/cjs/helpers/index.d.ts +1 -1
- package/dist/cjs/helpers/index.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +7 -9
- package/dist/esm/BaseClient.mjs +8 -3
- package/dist/esm/Client.d.mts +2 -2
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/IcePanelClient.d.mts +7 -8
- package/dist/esm/IcePanelClient.mjs +10 -10
- package/dist/esm/api/requests/requests.d.mts +62 -142
- package/dist/esm/api/resources/catalog/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/catalog/client/Client.mjs +2 -2
- package/dist/esm/api/resources/catalog/resources/technologies/client/Client.d.mts +2 -71
- package/dist/esm/api/resources/catalog/resources/technologies/client/Client.mjs +6 -263
- package/dist/esm/api/resources/catalog/resources/technologies/types/types.d.mts +0 -12
- package/dist/esm/api/resources/comments/client/Client.d.mts +7 -5
- package/dist/esm/api/resources/comments/client/Client.mjs +26 -29
- package/dist/esm/api/resources/comments/resources/replies/client/Client.d.mts +5 -3
- package/dist/esm/api/resources/comments/resources/replies/client/Client.mjs +24 -27
- package/dist/esm/api/resources/diagrams/client/Client.d.mts +4 -3
- package/dist/esm/api/resources/diagrams/client/Client.mjs +32 -33
- package/dist/esm/api/resources/diagrams/resources/content/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/diagrams/resources/content/client/Client.mjs +11 -8
- package/dist/esm/api/resources/diagrams/resources/export/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/diagrams/resources/export/client/Client.mjs +8 -6
- package/dist/esm/api/resources/diagrams/resources/groups/client/Client.d.mts +6 -4
- package/dist/esm/api/resources/diagrams/resources/groups/client/Client.mjs +28 -30
- package/dist/esm/api/resources/domains/client/Client.d.mts +5 -3
- package/dist/esm/api/resources/domains/client/Client.mjs +27 -29
- package/dist/esm/api/resources/drafts/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/drafts/client/Client.mjs +23 -16
- package/dist/esm/api/resources/flows/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/flows/client/Client.mjs +29 -20
- package/dist/esm/api/resources/flows/resources/export/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/flows/resources/export/client/Client.mjs +11 -8
- package/dist/esm/api/resources/landscapes/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/landscapes/client/Client.mjs +20 -14
- package/dist/esm/api/resources/landscapes/resources/export/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/landscapes/resources/export/client/Client.mjs +8 -6
- package/dist/esm/api/resources/landscapes/resources/logs/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/landscapes/resources/logs/client/Client.mjs +11 -8
- package/dist/esm/api/resources/landscapes/resources/logs/resources/stats/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/landscapes/resources/logs/resources/stats/client/Client.mjs +8 -6
- package/dist/esm/api/resources/model/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/model/client/Client.mjs +2 -2
- package/dist/esm/api/resources/model/resources/connections/client/Client.d.mts +28 -5
- package/dist/esm/api/resources/model/resources/connections/client/Client.mjs +96 -18
- package/dist/esm/api/resources/model/resources/connections/resources/export/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/model/resources/connections/resources/export/client/Client.mjs +7 -5
- package/dist/esm/api/resources/model/resources/connections/types/types.d.mts +6 -0
- package/dist/esm/api/resources/model/resources/objects/client/Client.d.mts +6 -4
- package/dist/esm/api/resources/model/resources/objects/client/Client.mjs +25 -28
- package/dist/esm/api/resources/model/resources/objects/resources/export/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/model/resources/objects/resources/export/client/Client.mjs +10 -7
- package/dist/esm/api/resources/organizations/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/organizations/client/Client.mjs +17 -12
- package/dist/esm/api/resources/organizations/resources/landscapes/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/organizations/resources/landscapes/client/Client.mjs +8 -6
- package/dist/esm/api/resources/organizations/resources/logs/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/organizations/resources/logs/client/Client.mjs +8 -6
- package/dist/esm/api/resources/organizations/resources/logs/resources/stats/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/organizations/resources/logs/resources/stats/client/Client.mjs +8 -6
- package/dist/esm/api/resources/organizations/resources/technologies/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/organizations/resources/technologies/client/Client.mjs +17 -12
- package/dist/esm/api/resources/organizations/resources/users/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/organizations/resources/users/client/Client.mjs +11 -8
- package/dist/esm/api/resources/organizations/resources/users/resources/invites/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/organizations/resources/users/resources/invites/client/Client.mjs +11 -8
- package/dist/esm/api/resources/shareLink/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/shareLink/client/Client.mjs +14 -10
- package/dist/esm/api/resources/tags/client/Client.d.mts +8 -6
- package/dist/esm/api/resources/tags/client/Client.mjs +27 -30
- package/dist/esm/api/resources/tags/resources/groups/client/Client.d.mts +7 -5
- package/dist/esm/api/resources/tags/resources/groups/client/Client.mjs +26 -29
- package/dist/esm/api/resources/teams/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/teams/client/Client.mjs +23 -16
- package/dist/esm/api/resources/versions/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/versions/client/Client.mjs +17 -12
- package/dist/esm/api/resources/versions/resources/reverts/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/versions/resources/reverts/client/Client.mjs +14 -10
- package/dist/esm/api/types/types.d.mts +187 -1487
- package/dist/esm/api/types/types.mjs +11 -325
- package/dist/esm/auth/AnyAuthProvider.d.mts +23 -0
- package/dist/esm/auth/AnyAuthProvider.mjs +42 -0
- package/dist/esm/auth/BearerAuthProvider.d.mts +23 -0
- package/dist/esm/auth/BearerAuthProvider.mjs +45 -0
- package/dist/esm/auth/HeaderAuthProvider.d.mts +17 -10
- package/dist/esm/auth/HeaderAuthProvider.mjs +22 -9
- package/dist/esm/auth/index.d.mts +2 -0
- package/dist/esm/auth/index.mjs +2 -0
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/environments.d.mts +2 -2
- package/dist/esm/environments.mjs +1 -1
- package/dist/esm/helpers/index.d.mts +1 -1
- package/dist/esm/helpers/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +6 -6
- package/reference.md +107 -280
|
@@ -53,202 +53,7 @@ const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
|
53
53
|
const IcePanel = __importStar(require("../../../../../index.js"));
|
|
54
54
|
class TechnologiesClient {
|
|
55
55
|
constructor(options = {}) {
|
|
56
|
-
this._options = (0, BaseClient_js_1.
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* List technologies
|
|
60
|
-
*
|
|
61
|
-
* @param {IcePanel.CatalogTechnologiesListRequest} request
|
|
62
|
-
* @param {TechnologiesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
-
*
|
|
64
|
-
* @throws {@link IcePanel.UnauthorizedError}
|
|
65
|
-
* @throws {@link IcePanel.ForbiddenError}
|
|
66
|
-
* @throws {@link IcePanel.NotFoundError}
|
|
67
|
-
* @throws {@link IcePanel.UnprocessableEntityError}
|
|
68
|
-
* @throws {@link IcePanel.InternalServerError}
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* await client.catalog.technologies.list()
|
|
72
|
-
*/
|
|
73
|
-
list(request = {}, requestOptions) {
|
|
74
|
-
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
75
|
-
}
|
|
76
|
-
__list() {
|
|
77
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
78
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
79
|
-
const { filter, admin } = request;
|
|
80
|
-
const _queryParams = {};
|
|
81
|
-
if (filter != null) {
|
|
82
|
-
_queryParams.filter = filter;
|
|
83
|
-
}
|
|
84
|
-
if (admin != null) {
|
|
85
|
-
_queryParams.admin = admin.toString();
|
|
86
|
-
}
|
|
87
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
88
|
-
const _response = yield core.fetcher({
|
|
89
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.V1, "catalog/technologies"),
|
|
90
|
-
method: "GET",
|
|
91
|
-
headers: _headers,
|
|
92
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
93
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
94
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
95
|
-
withCredentials: true,
|
|
96
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
97
|
-
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
98
|
-
logging: this._options.logging,
|
|
99
|
-
});
|
|
100
|
-
if (_response.ok) {
|
|
101
|
-
return {
|
|
102
|
-
data: _response.body,
|
|
103
|
-
rawResponse: _response.rawResponse,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
if (_response.error.reason === "status-code") {
|
|
107
|
-
switch (_response.error.statusCode) {
|
|
108
|
-
case 401:
|
|
109
|
-
throw new IcePanel.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
110
|
-
case 403:
|
|
111
|
-
throw new IcePanel.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
112
|
-
case 404:
|
|
113
|
-
throw new IcePanel.NotFoundError(_response.error.body, _response.rawResponse);
|
|
114
|
-
case 422:
|
|
115
|
-
throw new IcePanel.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
116
|
-
case 500:
|
|
117
|
-
throw new IcePanel.InternalServerError(_response.error.body, _response.rawResponse);
|
|
118
|
-
default:
|
|
119
|
-
throw new errors.IcePanelError({
|
|
120
|
-
statusCode: _response.error.statusCode,
|
|
121
|
-
body: _response.error.body,
|
|
122
|
-
rawResponse: _response.rawResponse,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catalog/technologies");
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Generate suggestions for a technologies information
|
|
131
|
-
*
|
|
132
|
-
* @param {IcePanel.CatalogSuggestionInformationGetRequest} request
|
|
133
|
-
* @param {TechnologiesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
134
|
-
*
|
|
135
|
-
* @throws {@link IcePanel.UnauthorizedError}
|
|
136
|
-
* @throws {@link IcePanel.InternalServerError}
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* await client.catalog.technologies.suggestInformation({
|
|
140
|
-
* url: "url"
|
|
141
|
-
* })
|
|
142
|
-
*/
|
|
143
|
-
suggestInformation(request, requestOptions) {
|
|
144
|
-
return core.HttpResponsePromise.fromPromise(this.__suggestInformation(request, requestOptions));
|
|
145
|
-
}
|
|
146
|
-
__suggestInformation(request, requestOptions) {
|
|
147
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
149
|
-
const { url } = request;
|
|
150
|
-
const _queryParams = {};
|
|
151
|
-
_queryParams.url = url;
|
|
152
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
153
|
-
const _response = yield core.fetcher({
|
|
154
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.V1, "catalog/suggestion/information"),
|
|
155
|
-
method: "GET",
|
|
156
|
-
headers: _headers,
|
|
157
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
158
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
159
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
160
|
-
withCredentials: true,
|
|
161
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
162
|
-
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
163
|
-
logging: this._options.logging,
|
|
164
|
-
});
|
|
165
|
-
if (_response.ok) {
|
|
166
|
-
return {
|
|
167
|
-
data: _response.body,
|
|
168
|
-
rawResponse: _response.rawResponse,
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
if (_response.error.reason === "status-code") {
|
|
172
|
-
switch (_response.error.statusCode) {
|
|
173
|
-
case 401:
|
|
174
|
-
throw new IcePanel.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
175
|
-
case 500:
|
|
176
|
-
throw new IcePanel.InternalServerError(_response.error.body, _response.rawResponse);
|
|
177
|
-
default:
|
|
178
|
-
throw new errors.IcePanelError({
|
|
179
|
-
statusCode: _response.error.statusCode,
|
|
180
|
-
body: _response.error.body,
|
|
181
|
-
rawResponse: _response.rawResponse,
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catalog/suggestion/information");
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Generate suggestions for a technologies branding
|
|
190
|
-
*
|
|
191
|
-
* @param {IcePanel.CatalogSuggestionBrandGetRequest} request
|
|
192
|
-
* @param {TechnologiesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
193
|
-
*
|
|
194
|
-
* @throws {@link IcePanel.UnauthorizedError}
|
|
195
|
-
* @throws {@link IcePanel.NotFoundError}
|
|
196
|
-
* @throws {@link IcePanel.UnprocessableEntityError}
|
|
197
|
-
* @throws {@link IcePanel.InternalServerError}
|
|
198
|
-
*
|
|
199
|
-
* @example
|
|
200
|
-
* await client.catalog.technologies.suggestBrand({
|
|
201
|
-
* url: "url"
|
|
202
|
-
* })
|
|
203
|
-
*/
|
|
204
|
-
suggestBrand(request, requestOptions) {
|
|
205
|
-
return core.HttpResponsePromise.fromPromise(this.__suggestBrand(request, requestOptions));
|
|
206
|
-
}
|
|
207
|
-
__suggestBrand(request, requestOptions) {
|
|
208
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
210
|
-
const { url } = request;
|
|
211
|
-
const _queryParams = {};
|
|
212
|
-
_queryParams.url = url;
|
|
213
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
214
|
-
const _response = yield core.fetcher({
|
|
215
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.V1, "catalog/suggestion/brand"),
|
|
216
|
-
method: "GET",
|
|
217
|
-
headers: _headers,
|
|
218
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
219
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
220
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
221
|
-
withCredentials: true,
|
|
222
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
223
|
-
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
224
|
-
logging: this._options.logging,
|
|
225
|
-
});
|
|
226
|
-
if (_response.ok) {
|
|
227
|
-
return {
|
|
228
|
-
data: _response.body,
|
|
229
|
-
rawResponse: _response.rawResponse,
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
if (_response.error.reason === "status-code") {
|
|
233
|
-
switch (_response.error.statusCode) {
|
|
234
|
-
case 401:
|
|
235
|
-
throw new IcePanel.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
236
|
-
case 404:
|
|
237
|
-
throw new IcePanel.NotFoundError(_response.error.body, _response.rawResponse);
|
|
238
|
-
case 422:
|
|
239
|
-
throw new IcePanel.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
240
|
-
case 500:
|
|
241
|
-
throw new IcePanel.InternalServerError(_response.error.body, _response.rawResponse);
|
|
242
|
-
default:
|
|
243
|
-
throw new errors.IcePanelError({
|
|
244
|
-
statusCode: _response.error.statusCode,
|
|
245
|
-
body: _response.error.body,
|
|
246
|
-
rawResponse: _response.rawResponse,
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catalog/suggestion/brand");
|
|
251
|
-
});
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
252
57
|
}
|
|
253
58
|
/**
|
|
254
59
|
* Create a signed URL prefix with access to all catalog icons
|
|
@@ -270,9 +75,10 @@ class TechnologiesClient {
|
|
|
270
75
|
__createSignedIconUrl(requestOptions) {
|
|
271
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
272
77
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
273
|
-
const
|
|
78
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
79
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
274
80
|
const _response = yield core.fetcher({
|
|
275
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
81
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, "catalog/icons/signed-url"),
|
|
276
82
|
method: "POST",
|
|
277
83
|
headers: _headers,
|
|
278
84
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -337,7 +143,7 @@ class TechnologiesClient {
|
|
|
337
143
|
const { catalogTechnologyId } = request;
|
|
338
144
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
339
145
|
const _response = yield core.fetcher({
|
|
340
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
146
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `catalog/technologies/${core.url.encodePathParam(catalogTechnologyId)}`),
|
|
341
147
|
method: "GET",
|
|
342
148
|
headers: _headers,
|
|
343
149
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -375,68 +181,5 @@ class TechnologiesClient {
|
|
|
375
181
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catalog/technologies/{catalogTechnologyId}");
|
|
376
182
|
});
|
|
377
183
|
}
|
|
378
|
-
/**
|
|
379
|
-
* Find a technology by the slug
|
|
380
|
-
*
|
|
381
|
-
* @param {IcePanel.CatalogTechnologySlugFindRequest} request
|
|
382
|
-
* @param {TechnologiesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
383
|
-
*
|
|
384
|
-
* @throws {@link IcePanel.UnauthorizedError}
|
|
385
|
-
* @throws {@link IcePanel.NotFoundError}
|
|
386
|
-
* @throws {@link IcePanel.UnprocessableEntityError}
|
|
387
|
-
* @throws {@link IcePanel.InternalServerError}
|
|
388
|
-
*
|
|
389
|
-
* @example
|
|
390
|
-
* await client.catalog.technologies.getSlug({
|
|
391
|
-
* catalogTechnologySlug: "catalogTechnologySlug"
|
|
392
|
-
* })
|
|
393
|
-
*/
|
|
394
|
-
getSlug(request, requestOptions) {
|
|
395
|
-
return core.HttpResponsePromise.fromPromise(this.__getSlug(request, requestOptions));
|
|
396
|
-
}
|
|
397
|
-
__getSlug(request, requestOptions) {
|
|
398
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
399
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
400
|
-
const { catalogTechnologySlug } = request;
|
|
401
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
402
|
-
const _response = yield core.fetcher({
|
|
403
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.V1, `catalog/technologies/slugs/${core.url.encodePathParam(catalogTechnologySlug)}`),
|
|
404
|
-
method: "GET",
|
|
405
|
-
headers: _headers,
|
|
406
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
407
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
408
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
409
|
-
withCredentials: true,
|
|
410
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
411
|
-
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
412
|
-
logging: this._options.logging,
|
|
413
|
-
});
|
|
414
|
-
if (_response.ok) {
|
|
415
|
-
return {
|
|
416
|
-
data: _response.body,
|
|
417
|
-
rawResponse: _response.rawResponse,
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
if (_response.error.reason === "status-code") {
|
|
421
|
-
switch (_response.error.statusCode) {
|
|
422
|
-
case 401:
|
|
423
|
-
throw new IcePanel.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
424
|
-
case 404:
|
|
425
|
-
throw new IcePanel.NotFoundError(_response.error.body, _response.rawResponse);
|
|
426
|
-
case 422:
|
|
427
|
-
throw new IcePanel.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
428
|
-
case 500:
|
|
429
|
-
throw new IcePanel.InternalServerError(_response.error.body, _response.rawResponse);
|
|
430
|
-
default:
|
|
431
|
-
throw new errors.IcePanelError({
|
|
432
|
-
statusCode: _response.error.statusCode,
|
|
433
|
-
body: _response.error.body,
|
|
434
|
-
rawResponse: _response.rawResponse,
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catalog/technologies/slugs/{catalogTechnologySlug}");
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
184
|
}
|
|
442
185
|
exports.TechnologiesClient = TechnologiesClient;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import type * as IcePanel from "../../../../../index.js";
|
|
2
|
-
export interface TechnologiesListResponse {
|
|
3
|
-
catalogTechnologies: IcePanel.CatalogTechnology[];
|
|
4
|
-
}
|
|
5
|
-
export interface TechnologiesSuggestInformationResponse {
|
|
6
|
-
catalogSuggestionInformation: IcePanel.CatalogSuggestionInformation;
|
|
7
|
-
}
|
|
8
|
-
export interface TechnologiesSuggestBrandResponse {
|
|
9
|
-
catalogSuggestionBrand: IcePanel.CatalogSuggestionBrand;
|
|
10
|
-
}
|
|
11
2
|
export interface TechnologiesCreateSignedIconUrlResponse {
|
|
12
3
|
/** Signed URL prefix for all catalog icons, you must append the exact icons path, extension supports .svg/.png/.webp/.jpeg, supports size/rounded as query strings, expires in 12 hours */
|
|
13
4
|
signedUrl: string;
|
|
@@ -15,6 +6,3 @@ export interface TechnologiesCreateSignedIconUrlResponse {
|
|
|
15
6
|
export interface TechnologiesGetResponse {
|
|
16
7
|
catalogTechnology: IcePanel.CatalogTechnology;
|
|
17
8
|
}
|
|
18
|
-
export interface TechnologiesGetSlugResponse {
|
|
19
|
-
catalogTechnology: IcePanel.CatalogTechnology;
|
|
20
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
4
|
import * as IcePanel from "../../../index.js";
|
|
5
5
|
import { RepliesClient } from "../resources/replies/client/Client.js";
|
|
@@ -9,7 +9,7 @@ export declare namespace CommentsClient {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
export declare class CommentsClient {
|
|
12
|
-
protected readonly _options:
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<CommentsClient.Options>;
|
|
13
13
|
protected _replies: RepliesClient | undefined;
|
|
14
14
|
constructor(options?: CommentsClient.Options);
|
|
15
15
|
get replies(): RepliesClient;
|
|
@@ -88,9 +88,11 @@ export declare class CommentsClient {
|
|
|
88
88
|
* versionId: "versionId",
|
|
89
89
|
* commentId: "commentId",
|
|
90
90
|
* body: {
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
91
|
+
* body: {
|
|
92
|
+
* content: "content",
|
|
93
|
+
* status: "open",
|
|
94
|
+
* type: "question"
|
|
95
|
+
* }
|
|
94
96
|
* }
|
|
95
97
|
* })
|
|
96
98
|
*/
|
|
@@ -42,17 +42,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
-
var t = {};
|
|
47
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
-
t[p] = s[p];
|
|
49
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
-
t[p[i]] = s[p[i]];
|
|
53
|
-
}
|
|
54
|
-
return t;
|
|
55
|
-
};
|
|
56
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
46
|
exports.CommentsClient = void 0;
|
|
58
47
|
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
@@ -65,7 +54,7 @@ const IcePanel = __importStar(require("../../../index.js"));
|
|
|
65
54
|
const Client_js_1 = require("../resources/replies/client/Client.js");
|
|
66
55
|
class CommentsClient {
|
|
67
56
|
constructor(options = {}) {
|
|
68
|
-
this._options = (0, BaseClient_js_1.
|
|
57
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
69
58
|
}
|
|
70
59
|
get replies() {
|
|
71
60
|
var _a;
|
|
@@ -102,9 +91,10 @@ class CommentsClient {
|
|
|
102
91
|
_queryParams.status = status;
|
|
103
92
|
}
|
|
104
93
|
}
|
|
105
|
-
const
|
|
94
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
95
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
106
96
|
const _response = yield core.fetcher({
|
|
107
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
97
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments`),
|
|
108
98
|
method: "GET",
|
|
109
99
|
headers: _headers,
|
|
110
100
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -168,9 +158,10 @@ class CommentsClient {
|
|
|
168
158
|
return __awaiter(this, void 0, void 0, function* () {
|
|
169
159
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
170
160
|
const { landscapeId, versionId, body: _body } = request;
|
|
171
|
-
const
|
|
161
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
162
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
172
163
|
const _response = yield core.fetcher({
|
|
173
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
164
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments`),
|
|
174
165
|
method: "POST",
|
|
175
166
|
headers: _headers,
|
|
176
167
|
contentType: "application/json",
|
|
@@ -231,9 +222,10 @@ class CommentsClient {
|
|
|
231
222
|
return __awaiter(this, void 0, void 0, function* () {
|
|
232
223
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
233
224
|
const { landscapeId, versionId, commentId } = request;
|
|
234
|
-
const
|
|
225
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
226
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
235
227
|
const _response = yield core.fetcher({
|
|
236
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
228
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments/${core.url.encodePathParam(commentId)}`),
|
|
237
229
|
method: "GET",
|
|
238
230
|
headers: _headers,
|
|
239
231
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -284,9 +276,11 @@ class CommentsClient {
|
|
|
284
276
|
* versionId: "versionId",
|
|
285
277
|
* commentId: "commentId",
|
|
286
278
|
* body: {
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
279
|
+
* body: {
|
|
280
|
+
* content: "content",
|
|
281
|
+
* status: "open",
|
|
282
|
+
* type: "question"
|
|
283
|
+
* }
|
|
290
284
|
* }
|
|
291
285
|
* })
|
|
292
286
|
*/
|
|
@@ -296,10 +290,11 @@ class CommentsClient {
|
|
|
296
290
|
__upsert(request, requestOptions) {
|
|
297
291
|
return __awaiter(this, void 0, void 0, function* () {
|
|
298
292
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
299
|
-
const { landscapeId, versionId, commentId
|
|
300
|
-
const
|
|
293
|
+
const { landscapeId, versionId, commentId, body: _body } = request;
|
|
294
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
295
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
301
296
|
const _response = yield core.fetcher({
|
|
302
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
297
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments/${core.url.encodePathParam(commentId)}`),
|
|
303
298
|
method: "PUT",
|
|
304
299
|
headers: _headers,
|
|
305
300
|
contentType: "application/json",
|
|
@@ -363,9 +358,10 @@ class CommentsClient {
|
|
|
363
358
|
return __awaiter(this, void 0, void 0, function* () {
|
|
364
359
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
365
360
|
const { landscapeId, versionId, commentId } = request;
|
|
366
|
-
const
|
|
361
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
362
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
367
363
|
const _response = yield core.fetcher({
|
|
368
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
364
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments/${core.url.encodePathParam(commentId)}`),
|
|
369
365
|
method: "DELETE",
|
|
370
366
|
headers: _headers,
|
|
371
367
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -427,9 +423,10 @@ class CommentsClient {
|
|
|
427
423
|
return __awaiter(this, void 0, void 0, function* () {
|
|
428
424
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
429
425
|
const { landscapeId, versionId, commentId, body: _body } = request;
|
|
430
|
-
const
|
|
426
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
427
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
431
428
|
const _response = yield core.fetcher({
|
|
432
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
429
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments/${core.url.encodePathParam(commentId)}`),
|
|
433
430
|
method: "PATCH",
|
|
434
431
|
headers: _headers,
|
|
435
432
|
contentType: "application/json",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../../../core/index.js";
|
|
4
4
|
import * as IcePanel from "../../../../../index.js";
|
|
5
5
|
export declare namespace RepliesClient {
|
|
@@ -8,7 +8,7 @@ export declare namespace RepliesClient {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export declare class RepliesClient {
|
|
11
|
-
protected readonly _options:
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<RepliesClient.Options>;
|
|
12
12
|
constructor(options?: RepliesClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* List comment replies
|
|
@@ -90,7 +90,9 @@ export declare class RepliesClient {
|
|
|
90
90
|
* versionId: "versionId",
|
|
91
91
|
* commentId: "commentId",
|
|
92
92
|
* commentReplyId: "commentReplyId",
|
|
93
|
-
*
|
|
93
|
+
* body: {
|
|
94
|
+
* content: "content"
|
|
95
|
+
* }
|
|
94
96
|
* })
|
|
95
97
|
*/
|
|
96
98
|
upsert(request: IcePanel.CommentReplyUpsertRequest, requestOptions?: RepliesClient.RequestOptions): core.HttpResponsePromise<IcePanel.comments.RepliesUpsertResponse>;
|
|
@@ -42,17 +42,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
-
var t = {};
|
|
47
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
-
t[p] = s[p];
|
|
49
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
-
t[p[i]] = s[p[i]];
|
|
53
|
-
}
|
|
54
|
-
return t;
|
|
55
|
-
};
|
|
56
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
46
|
exports.RepliesClient = void 0;
|
|
58
47
|
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
@@ -64,7 +53,7 @@ const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
|
64
53
|
const IcePanel = __importStar(require("../../../../../index.js"));
|
|
65
54
|
class RepliesClient {
|
|
66
55
|
constructor(options = {}) {
|
|
67
|
-
this._options = (0, BaseClient_js_1.
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
68
57
|
}
|
|
69
58
|
/**
|
|
70
59
|
* List comment replies
|
|
@@ -91,9 +80,10 @@ class RepliesClient {
|
|
|
91
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
92
81
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
93
82
|
const { landscapeId, versionId, commentId } = request;
|
|
94
|
-
const
|
|
83
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
95
85
|
const _response = yield core.fetcher({
|
|
96
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
86
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments/${core.url.encodePathParam(commentId)}/replies`),
|
|
97
87
|
method: "GET",
|
|
98
88
|
headers: _headers,
|
|
99
89
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -159,9 +149,10 @@ class RepliesClient {
|
|
|
159
149
|
return __awaiter(this, void 0, void 0, function* () {
|
|
160
150
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
161
151
|
const { landscapeId, versionId, commentId, body: _body } = request;
|
|
162
|
-
const
|
|
152
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
153
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
163
154
|
const _response = yield core.fetcher({
|
|
164
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
155
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments/${core.url.encodePathParam(commentId)}/replies`),
|
|
165
156
|
method: "POST",
|
|
166
157
|
headers: _headers,
|
|
167
158
|
contentType: "application/json",
|
|
@@ -228,9 +219,10 @@ class RepliesClient {
|
|
|
228
219
|
return __awaiter(this, void 0, void 0, function* () {
|
|
229
220
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
230
221
|
const { landscapeId, versionId, commentId, commentReplyId } = request;
|
|
231
|
-
const
|
|
222
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
223
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
232
224
|
const _response = yield core.fetcher({
|
|
233
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
225
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments/${core.url.encodePathParam(commentId)}/replies/${core.url.encodePathParam(commentReplyId)}`),
|
|
234
226
|
method: "GET",
|
|
235
227
|
headers: _headers,
|
|
236
228
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -281,7 +273,9 @@ class RepliesClient {
|
|
|
281
273
|
* versionId: "versionId",
|
|
282
274
|
* commentId: "commentId",
|
|
283
275
|
* commentReplyId: "commentReplyId",
|
|
284
|
-
*
|
|
276
|
+
* body: {
|
|
277
|
+
* content: "content"
|
|
278
|
+
* }
|
|
285
279
|
* })
|
|
286
280
|
*/
|
|
287
281
|
upsert(request, requestOptions) {
|
|
@@ -290,10 +284,11 @@ class RepliesClient {
|
|
|
290
284
|
__upsert(request, requestOptions) {
|
|
291
285
|
return __awaiter(this, void 0, void 0, function* () {
|
|
292
286
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
293
|
-
const { landscapeId, versionId, commentId, commentReplyId
|
|
294
|
-
const
|
|
287
|
+
const { landscapeId, versionId, commentId, commentReplyId, body: _body } = request;
|
|
288
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
289
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
295
290
|
const _response = yield core.fetcher({
|
|
296
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
291
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments/${core.url.encodePathParam(commentId)}/replies/${core.url.encodePathParam(commentReplyId)}`),
|
|
297
292
|
method: "PUT",
|
|
298
293
|
headers: _headers,
|
|
299
294
|
contentType: "application/json",
|
|
@@ -363,9 +358,10 @@ class RepliesClient {
|
|
|
363
358
|
return __awaiter(this, void 0, void 0, function* () {
|
|
364
359
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
365
360
|
const { landscapeId, versionId, commentId, commentReplyId } = request;
|
|
366
|
-
const
|
|
361
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
362
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
367
363
|
const _response = yield core.fetcher({
|
|
368
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
364
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments/${core.url.encodePathParam(commentId)}/replies/${core.url.encodePathParam(commentReplyId)}`),
|
|
369
365
|
method: "DELETE",
|
|
370
366
|
headers: _headers,
|
|
371
367
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -430,9 +426,10 @@ class RepliesClient {
|
|
|
430
426
|
return __awaiter(this, void 0, void 0, function* () {
|
|
431
427
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
432
428
|
const { landscapeId, versionId, commentId, commentReplyId, body: _body } = request;
|
|
433
|
-
const
|
|
429
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
430
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
434
431
|
const _response = yield core.fetcher({
|
|
435
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.
|
|
432
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.IcePanelEnvironment.ApiV1, `landscapes/${core.url.encodePathParam(landscapeId)}/versions/${core.url.encodePathParam(versionId)}/comments/${core.url.encodePathParam(commentId)}/replies/${core.url.encodePathParam(commentReplyId)}`),
|
|
436
433
|
method: "PATCH",
|
|
437
434
|
headers: _headers,
|
|
438
435
|
contentType: "application/json",
|