@@ -24,6 +24,9 @@ import {
24
24
} from './entities/environment-template'
25
25
import { RawAxiosRequestConfig } from 'axios'
26
26
27
+ /**
28
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
29
+ */
27
30
export type ClientAPI = ReturnType < typeof createClientApi >
28
31
type CreateSpaceProps = Omit < SpaceProps , 'sys' > & { defaultLocale ?: string }
29
32
@@ -58,6 +61,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
58
61
* .then((response) => console.log(response.items))
59
62
* .catch(console.error)
60
63
* ```
64
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
61
65
*/
62
66
getEnvironmentTemplates : function getEnvironmentTemplates (
63
67
organizationId : string ,
@@ -90,6 +94,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
90
94
* .then((space) => console.log(space))
91
95
* .catch(console.error)
92
96
* ```
97
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
93
98
*/
94
99
getEnvironmentTemplate : function getEnvironmentTemplate ( {
95
100
organizationId,
@@ -127,6 +132,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
127
132
* .then((environmentTemplate) => console.log(environmentTemplate))
128
133
* .catch(console.error)
129
134
* ```
135
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
130
136
*/
131
137
createEnvironmentTemplate : function createEnvironmentTemplate (
132
138
organizationId : string ,
@@ -153,6 +159,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
153
159
* .then((response) => console.log(response.items))
154
160
* .catch(console.error)
155
161
* ```
162
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
156
163
*/
157
164
getSpaces : function getSpaces (
158
165
query : QueryOptions = { }
@@ -179,6 +186,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
179
186
* .then((space) => console.log(space))
180
187
* .catch(console.error)
181
188
* ```
189
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
182
190
*/
183
191
getSpace : function getSpace ( spaceId : string ) : Promise < Space > {
184
192
return makeRequest ( {
@@ -206,6 +214,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
206
214
* .then((space) => console.log(space))
207
215
* .catch(console.error)
208
216
* ```
217
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
209
218
*/
210
219
createSpace : function createSpace (
211
220
spaceData : CreateSpaceProps ,
@@ -234,6 +243,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
234
243
* .then((org) => console.log(org))
235
244
* .catch(console.error)
236
245
* ```
246
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
237
247
*/
238
248
getOrganization : function getOrganization ( id : string ) : Promise < Organization > {
239
249
return makeRequest ( {
@@ -257,6 +267,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
257
267
* .then(result => console.log(result.items))
258
268
* .catch(console.error)
259
269
* ```
270
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
260
271
*/
261
272
getOrganizations : function getOrganizations (
262
273
query : PaginationQueryParams [ 'query' ] = { }
@@ -282,6 +293,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
282
293
* .then(user => console.log(user.firstName))
283
294
* .catch(console.error)
284
295
* ```
296
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
285
297
*/
286
298
getCurrentUser : function getCurrentUser < T = UserProps > ( params ?: QueryParams ) : Promise < T > {
287
299
return makeRequest ( {
@@ -307,8 +319,8 @@ export default function createClientApi(makeRequest: MakeRequest) {
307
319
* .then(appDefinition => console.log(appDefinition.name))
308
320
* .catch(console.error)
309
321
* ```
322
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
310
323
*/
311
-
312
324
getAppDefinition : function getAppDefinition (
313
325
params : GetAppDefinitionParams
314
326
) : Promise < AppDefinition > {
@@ -341,6 +353,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
341
353
* .then(personalAccessToken => console.log(personalAccessToken.token))
342
354
* .catch(console.error)
343
355
* ```
356
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
344
357
*/
345
358
createPersonalAccessToken : function createPersonalAccessToken (
346
359
data : CreatePersonalAccessTokenProps
@@ -374,6 +387,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
374
387
* .then(token => console.log(token.token))
375
388
* .catch(console.error)
376
389
* ```
390
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
377
391
*/
378
392
getPersonalAccessToken : function getPersonalAccessToken ( tokenId : string ) {
379
393
return makeRequest ( {
@@ -399,6 +413,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
399
413
* .then(response => console.log(reponse.items))
400
414
* .catch(console.error)
401
415
* ```
416
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
402
417
*/
403
418
getPersonalAccessTokens : function getPersonalAccessTokens ( ) {
404
419
return makeRequest ( {
@@ -423,6 +438,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
423
438
* .then(token => console.log(token.token))
424
439
* .catch(console.error)
425
440
* ```
441
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
426
442
*/
427
443
getAccessToken : function getAccessToken ( tokenId : string ) {
428
444
return makeRequest ( {
@@ -446,6 +462,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
446
462
* .then(response => console.log(reponse.items))
447
463
* .catch(console.error)
448
464
* ```
465
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
449
466
*/
450
467
getAccessTokens : function getAccessTokens ( ) {
451
468
return makeRequest ( {
@@ -470,6 +487,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
470
487
* .then(response => console.log(reponse.items))
471
488
* .catch(console.error)
472
489
* ```
490
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
473
491
*/
474
492
getOrganizationAccessTokens : function getOrganizationAccessTokens (
475
493
organizationId : string ,
@@ -505,6 +523,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
505
523
* .then(result => console.log(result.items))
506
524
* .catch(console.error)
507
525
* ```
526
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
508
527
*/
509
528
getOrganizationUsage : function getOrganizationUsage (
510
529
organizationId : string ,
@@ -541,6 +560,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
541
560
* .then(result => console.log(result.items))
542
561
* .catch(console.error)
543
562
* ```
563
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
544
564
*/
545
565
getSpaceUsage : function getSpaceUsage ( organizationId : string , query : UsageQuery = { } ) {
546
566
return makeRequest ( {
@@ -571,6 +591,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
571
591
* .then((responseData) => console.log(responseData))
572
592
* .catch(console.error)
573
593
* ```
594
+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
574
595
*/
575
596
rawRequest : function rawRequest ( { url, ...config } : RawAxiosRequestConfig & { url : string } ) {
576
597
return makeRequest ( {
0 commit comments