1
+ // this file is @generated (with the exception of getOrCreate)
1
2
import {
3
+ Configuration ,
2
4
ApplicationApi ,
3
5
ApplicationIn ,
4
6
ApplicationOut ,
5
7
ApplicationPatch ,
6
- Configuration ,
7
8
ListResponseApplicationOut ,
8
9
Ordering ,
9
10
} from "../openapi" ;
@@ -25,18 +26,26 @@ export class Application {
25
26
this . api = new ApplicationApi ( config ) ;
26
27
}
27
28
29
+ /// List of all the organization's applications.
28
30
public list ( options ?: ApplicationListOptions ) : Promise < ListResponseApplicationOut > {
29
- const iterator = options ?. iterator ?? undefined ;
30
- return this . api . v1ApplicationList ( { ...options , iterator } ) ;
31
+ return this . api . v1ApplicationList ( {
32
+ ...options ,
33
+ iterator : options ?. iterator ?? undefined ,
34
+ } ) ;
31
35
}
32
36
37
+ /// Create a new application.
33
38
public create (
34
39
applicationIn : ApplicationIn ,
35
40
options ?: PostOptions
36
41
) : Promise < ApplicationOut > {
37
- return this . api . v1ApplicationCreate ( { applicationIn, ...options } ) ;
42
+ return this . api . v1ApplicationCreate ( {
43
+ applicationIn,
44
+ ...options ,
45
+ } ) ;
38
46
}
39
47
48
+ /// Get the application with the UID from `applicationIn`, or create it if it doesn't exist yet.
40
49
public getOrCreate (
41
50
applicationIn : ApplicationIn ,
42
51
options ?: PostOptions
@@ -48,22 +57,36 @@ export class Application {
48
57
} ) ;
49
58
}
50
59
60
+ /// Get an application.
51
61
public get ( appId : string ) : Promise < ApplicationOut > {
52
- return this . api . v1ApplicationGet ( { appId } ) ;
62
+ return this . api . v1ApplicationGet ( {
63
+ appId,
64
+ } ) ;
53
65
}
54
66
67
+ /// Update an application.
55
68
public update ( appId : string , applicationIn : ApplicationIn ) : Promise < ApplicationOut > {
56
- return this . api . v1ApplicationUpdate ( { appId, applicationIn } ) ;
69
+ return this . api . v1ApplicationUpdate ( {
70
+ appId,
71
+ applicationIn,
72
+ } ) ;
73
+ }
74
+
75
+ /// Delete an application.
76
+ public delete ( appId : string ) : Promise < void > {
77
+ return this . api . v1ApplicationDelete ( {
78
+ appId,
79
+ } ) ;
57
80
}
58
81
82
+ /// Partially update an application.
59
83
public patch (
60
84
appId : string ,
61
85
applicationPatch : ApplicationPatch
62
86
) : Promise < ApplicationOut > {
63
- return this . api . v1ApplicationPatch ( { appId, applicationPatch } ) ;
64
- }
65
-
66
- public delete ( appId : string ) : Promise < void > {
67
- return this . api . v1ApplicationDelete ( { appId } ) ;
87
+ return this . api . v1ApplicationPatch ( {
88
+ appId,
89
+ applicationPatch,
90
+ } ) ;
68
91
}
69
92
}
0 commit comments