-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapps.ts
More file actions
108 lines (93 loc) · 2.8 KB
/
apps.ts
File metadata and controls
108 lines (93 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import * as DeploymentsAPI from './deployments';
import {
DeploymentCreateParams,
DeploymentCreateResponse,
DeploymentFollowResponse,
Deployments,
} from './deployments';
import * as InvocationsAPI from './invocations';
import {
InvocationCreateParams,
InvocationCreateResponse,
InvocationRetrieveResponse,
InvocationUpdateParams,
InvocationUpdateResponse,
Invocations,
} from './invocations';
import { APIPromise } from '../../core/api-promise';
import { RequestOptions } from '../../internal/request-options';
export class Apps extends APIResource {
deployments: DeploymentsAPI.Deployments = new DeploymentsAPI.Deployments(this._client);
invocations: InvocationsAPI.Invocations = new InvocationsAPI.Invocations(this._client);
/**
* List application versions for the authenticated user. Optionally filter by app
* name and/or version label.
*
* @example
* ```ts
* const apps = await client.apps.list();
* ```
*/
list(query: AppListParams | null | undefined = {}, options?: RequestOptions): APIPromise<AppListResponse> {
return this._client.get('/apps', { query, ...options });
}
}
export type AppListResponse = Array<AppListResponse.AppListResponseItem>;
export namespace AppListResponse {
/**
* Summary of an application version.
*/
export interface AppListResponseItem {
/**
* Unique identifier for the app version
*/
id: string;
/**
* Name of the application
*/
app_name: string;
/**
* Deployment region code
*/
region: string;
/**
* Version label for the application
*/
version: string;
/**
* Environment variables configured for this app version
*/
env_vars?: Record<string, string>;
}
}
export interface AppListParams {
/**
* Filter results by application name.
*/
app_name?: string;
/**
* Filter results by version label.
*/
version?: string;
}
Apps.Deployments = Deployments;
Apps.Invocations = Invocations;
export declare namespace Apps {
export { type AppListResponse as AppListResponse, type AppListParams as AppListParams };
export {
Deployments as Deployments,
type DeploymentCreateResponse as DeploymentCreateResponse,
type DeploymentFollowResponse as DeploymentFollowResponse,
type DeploymentCreateParams as DeploymentCreateParams,
};
export {
Invocations as Invocations,
type InvocationCreateResponse as InvocationCreateResponse,
type InvocationRetrieveResponse as InvocationRetrieveResponse,
type InvocationUpdateResponse as InvocationUpdateResponse,
type InvocationCreateParams as InvocationCreateParams,
type InvocationUpdateParams as InvocationUpdateParams,
};
}