@@ -24,6 +24,9 @@ import {
2424} from './entities/environment-template'
2525import { RawAxiosRequestConfig } from 'axios'
2626
27+ /**
28+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
29+ */
2730export type ClientAPI = ReturnType < typeof createClientApi >
2831type CreateSpaceProps = Omit < SpaceProps , 'sys' > & { defaultLocale ?: string }
2932
@@ -58,6 +61,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
5861 * .then((response) => console.log(response.items))
5962 * .catch(console.error)
6063 * ```
64+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
6165 */
6266 getEnvironmentTemplates : function getEnvironmentTemplates (
6367 organizationId : string ,
@@ -90,6 +94,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
9094 * .then((space) => console.log(space))
9195 * .catch(console.error)
9296 * ```
97+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
9398 */
9499 getEnvironmentTemplate : function getEnvironmentTemplate ( {
95100 organizationId,
@@ -127,6 +132,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
127132 * .then((environmentTemplate) => console.log(environmentTemplate))
128133 * .catch(console.error)
129134 * ```
135+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
130136 */
131137 createEnvironmentTemplate : function createEnvironmentTemplate (
132138 organizationId : string ,
@@ -153,6 +159,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
153159 * .then((response) => console.log(response.items))
154160 * .catch(console.error)
155161 * ```
162+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
156163 */
157164 getSpaces : function getSpaces (
158165 query : QueryOptions = { }
@@ -179,6 +186,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
179186 * .then((space) => console.log(space))
180187 * .catch(console.error)
181188 * ```
189+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
182190 */
183191 getSpace : function getSpace ( spaceId : string ) : Promise < Space > {
184192 return makeRequest ( {
@@ -206,6 +214,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
206214 * .then((space) => console.log(space))
207215 * .catch(console.error)
208216 * ```
217+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
209218 */
210219 createSpace : function createSpace (
211220 spaceData : CreateSpaceProps ,
@@ -234,6 +243,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
234243 * .then((org) => console.log(org))
235244 * .catch(console.error)
236245 * ```
246+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
237247 */
238248 getOrganization : function getOrganization ( id : string ) : Promise < Organization > {
239249 return makeRequest ( {
@@ -257,6 +267,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
257267 * .then(result => console.log(result.items))
258268 * .catch(console.error)
259269 * ```
270+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
260271 */
261272 getOrganizations : function getOrganizations (
262273 query : PaginationQueryParams [ 'query' ] = { }
@@ -282,6 +293,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
282293 * .then(user => console.log(user.firstName))
283294 * .catch(console.error)
284295 * ```
296+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
285297 */
286298 getCurrentUser : function getCurrentUser < T = UserProps > ( params ?: QueryParams ) : Promise < T > {
287299 return makeRequest ( {
@@ -307,8 +319,8 @@ export default function createClientApi(makeRequest: MakeRequest) {
307319 * .then(appDefinition => console.log(appDefinition.name))
308320 * .catch(console.error)
309321 * ```
322+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
310323 */
311-
312324 getAppDefinition : function getAppDefinition (
313325 params : GetAppDefinitionParams
314326 ) : Promise < AppDefinition > {
@@ -341,6 +353,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
341353 * .then(personalAccessToken => console.log(personalAccessToken.token))
342354 * .catch(console.error)
343355 * ```
356+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
344357 */
345358 createPersonalAccessToken : function createPersonalAccessToken (
346359 data : CreatePersonalAccessTokenProps
@@ -374,6 +387,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
374387 * .then(token => console.log(token.token))
375388 * .catch(console.error)
376389 * ```
390+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
377391 */
378392 getPersonalAccessToken : function getPersonalAccessToken ( tokenId : string ) {
379393 return makeRequest ( {
@@ -399,6 +413,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
399413 * .then(response => console.log(reponse.items))
400414 * .catch(console.error)
401415 * ```
416+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
402417 */
403418 getPersonalAccessTokens : function getPersonalAccessTokens ( ) {
404419 return makeRequest ( {
@@ -423,6 +438,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
423438 * .then(token => console.log(token.token))
424439 * .catch(console.error)
425440 * ```
441+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
426442 */
427443 getAccessToken : function getAccessToken ( tokenId : string ) {
428444 return makeRequest ( {
@@ -446,6 +462,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
446462 * .then(response => console.log(reponse.items))
447463 * .catch(console.error)
448464 * ```
465+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
449466 */
450467 getAccessTokens : function getAccessTokens ( ) {
451468 return makeRequest ( {
@@ -470,6 +487,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
470487 * .then(response => console.log(reponse.items))
471488 * .catch(console.error)
472489 * ```
490+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
473491 */
474492 getOrganizationAccessTokens : function getOrganizationAccessTokens (
475493 organizationId : string ,
@@ -505,6 +523,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
505523 * .then(result => console.log(result.items))
506524 * .catch(console.error)
507525 * ```
526+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
508527 */
509528 getOrganizationUsage : function getOrganizationUsage (
510529 organizationId : string ,
@@ -541,6 +560,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
541560 * .then(result => console.log(result.items))
542561 * .catch(console.error)
543562 * ```
563+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
544564 */
545565 getSpaceUsage : function getSpaceUsage ( organizationId : string , query : UsageQuery = { } ) {
546566 return makeRequest ( {
@@ -571,6 +591,7 @@ export default function createClientApi(makeRequest: MakeRequest) {
571591 * .then((responseData) => console.log(responseData))
572592 * .catch(console.error)
573593 * ```
594+ * @deprecated The `old` client is deprecated in favor of the `plain` client since version 12.0.0.
574595 */
575596 rawRequest : function rawRequest ( { url, ...config } : RawAxiosRequestConfig & { url : string } ) {
576597 return makeRequest ( {
0 commit comments