@envsync-cloud/envsync-ts-sdk 0.1.1 → 0.2.0
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/dist/index.d.mts +236 -41
- package/dist/index.d.ts +236 -41
- package/dist/index.global.js +333 -61
- package/dist/index.js +339 -61
- package/dist/index.mjs +336 -61
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -54,6 +54,147 @@ declare abstract class BaseHttpRequest {
|
|
|
54
54
|
abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
type CallbackResponse = {
|
|
58
|
+
message: string;
|
|
59
|
+
tokenData?: {
|
|
60
|
+
access_token: string;
|
|
61
|
+
id_token: string;
|
|
62
|
+
scope: string;
|
|
63
|
+
expires_in: number;
|
|
64
|
+
token_type: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
type LoginUrlResponse = {
|
|
69
|
+
message: string;
|
|
70
|
+
loginUrl: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare class AccessService {
|
|
74
|
+
readonly httpRequest: BaseHttpRequest;
|
|
75
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
76
|
+
/**
|
|
77
|
+
* Initiate CLI Login
|
|
78
|
+
* Generate authentication URL for CLI login
|
|
79
|
+
* @returns LoginUrlResponse CLI login initiated successfully.
|
|
80
|
+
* @throws ApiError
|
|
81
|
+
*/
|
|
82
|
+
createCliLogin(): CancelablePromise<LoginUrlResponse>;
|
|
83
|
+
/**
|
|
84
|
+
* Create Web Login URL
|
|
85
|
+
* Generate authentication URL for web login
|
|
86
|
+
* @returns LoginUrlResponse Web login URL created successfully
|
|
87
|
+
* @throws ApiError
|
|
88
|
+
*/
|
|
89
|
+
createWebLogin(): CancelablePromise<LoginUrlResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* Web Login Callback
|
|
92
|
+
* Handle web login callback from Auth0
|
|
93
|
+
* @param code
|
|
94
|
+
* @returns void
|
|
95
|
+
* @throws ApiError
|
|
96
|
+
*/
|
|
97
|
+
callbackWebLogin(code: string): CancelablePromise<void>;
|
|
98
|
+
/**
|
|
99
|
+
* Create API Login URL
|
|
100
|
+
* Generate authentication URL for API login
|
|
101
|
+
* @returns LoginUrlResponse API login URL created successfully
|
|
102
|
+
* @throws ApiError
|
|
103
|
+
*/
|
|
104
|
+
createApiLogin(): CancelablePromise<LoginUrlResponse>;
|
|
105
|
+
/**
|
|
106
|
+
* API Login Callback
|
|
107
|
+
* Handle API login callback from Auth0
|
|
108
|
+
* @param code
|
|
109
|
+
* @returns CallbackResponse API login callback successful
|
|
110
|
+
* @throws ApiError
|
|
111
|
+
*/
|
|
112
|
+
callbackApiLogin(code: string): CancelablePromise<CallbackResponse>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
type ApiKeyResponse = {
|
|
116
|
+
id: string;
|
|
117
|
+
user_id: string;
|
|
118
|
+
org_id: string;
|
|
119
|
+
description: string;
|
|
120
|
+
is_active: boolean;
|
|
121
|
+
key: string;
|
|
122
|
+
created_at: string;
|
|
123
|
+
updated_at: string;
|
|
124
|
+
last_used_at: string | null;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
type ApiKeysResponse = Array<ApiKeyResponse>;
|
|
128
|
+
|
|
129
|
+
type CreateApiKeyRequest = {
|
|
130
|
+
name: string;
|
|
131
|
+
description?: string;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
type RegenerateApiKeyResponse = {
|
|
135
|
+
newKey: string;
|
|
136
|
+
id: string;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
type UpdateApiKeyRequest = {
|
|
140
|
+
description?: string;
|
|
141
|
+
is_active?: boolean;
|
|
142
|
+
last_used_at?: string;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
declare class ApiKeysService {
|
|
146
|
+
readonly httpRequest: BaseHttpRequest;
|
|
147
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
148
|
+
/**
|
|
149
|
+
* Create API Key
|
|
150
|
+
* Create a new API key for the organization
|
|
151
|
+
* @param requestBody
|
|
152
|
+
* @returns ApiKeyResponse API key created successfully
|
|
153
|
+
* @throws ApiError
|
|
154
|
+
*/
|
|
155
|
+
createApiKey(requestBody?: CreateApiKeyRequest): CancelablePromise<ApiKeyResponse>;
|
|
156
|
+
/**
|
|
157
|
+
* Get All API Keys
|
|
158
|
+
* Retrieve all API keys for the organization
|
|
159
|
+
* @returns ApiKeysResponse API keys retrieved successfully
|
|
160
|
+
* @throws ApiError
|
|
161
|
+
*/
|
|
162
|
+
getAllApiKeys(): CancelablePromise<ApiKeysResponse>;
|
|
163
|
+
/**
|
|
164
|
+
* Get API Key
|
|
165
|
+
* Retrieve a specific API key
|
|
166
|
+
* @param id
|
|
167
|
+
* @returns ApiKeyResponse API key retrieved successfully
|
|
168
|
+
* @throws ApiError
|
|
169
|
+
*/
|
|
170
|
+
getApiKey(id: string): CancelablePromise<ApiKeyResponse>;
|
|
171
|
+
/**
|
|
172
|
+
* Update API Key
|
|
173
|
+
* Update an existing API key
|
|
174
|
+
* @param id
|
|
175
|
+
* @param requestBody
|
|
176
|
+
* @returns ApiKeyResponse API key updated successfully
|
|
177
|
+
* @throws ApiError
|
|
178
|
+
*/
|
|
179
|
+
updateApiKey(id: string, requestBody?: UpdateApiKeyRequest): CancelablePromise<ApiKeyResponse>;
|
|
180
|
+
/**
|
|
181
|
+
* Delete API Key
|
|
182
|
+
* Delete an existing API key
|
|
183
|
+
* @param id
|
|
184
|
+
* @returns ApiKeyResponse API key deleted successfully
|
|
185
|
+
* @throws ApiError
|
|
186
|
+
*/
|
|
187
|
+
deleteApiKey(id: string): CancelablePromise<ApiKeyResponse>;
|
|
188
|
+
/**
|
|
189
|
+
* Regenerate API Key
|
|
190
|
+
* Generate a new value for an existing API key
|
|
191
|
+
* @param id
|
|
192
|
+
* @returns RegenerateApiKeyResponse API key regenerated successfully
|
|
193
|
+
* @throws ApiError
|
|
194
|
+
*/
|
|
195
|
+
regenerateApiKey(id: string): CancelablePromise<RegenerateApiKeyResponse>;
|
|
196
|
+
}
|
|
197
|
+
|
|
57
198
|
type CreateAppRequest = {
|
|
58
199
|
name: string;
|
|
59
200
|
description: string;
|
|
@@ -209,14 +350,6 @@ declare class AuthenticationService {
|
|
|
209
350
|
whoami(): CancelablePromise<WhoAmIResponse>;
|
|
210
351
|
}
|
|
211
352
|
|
|
212
|
-
type CreateEnvTypeRequest = {
|
|
213
|
-
name: string;
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
type DeleteEnvTypeRequest = {
|
|
217
|
-
id: string;
|
|
218
|
-
};
|
|
219
|
-
|
|
220
353
|
type EnvTypeResponse = {
|
|
221
354
|
id: string;
|
|
222
355
|
name: string;
|
|
@@ -227,11 +360,6 @@ type EnvTypeResponse = {
|
|
|
227
360
|
|
|
228
361
|
type EnvTypesResponse = Array<EnvTypeResponse>;
|
|
229
362
|
|
|
230
|
-
type UpdateEnvTypeRequest = {
|
|
231
|
-
id: string;
|
|
232
|
-
name: string;
|
|
233
|
-
};
|
|
234
|
-
|
|
235
363
|
declare class EnvironmentTypesService {
|
|
236
364
|
readonly httpRequest: BaseHttpRequest;
|
|
237
365
|
constructor(httpRequest: BaseHttpRequest);
|
|
@@ -242,14 +370,6 @@ declare class EnvironmentTypesService {
|
|
|
242
370
|
* @throws ApiError
|
|
243
371
|
*/
|
|
244
372
|
getEnvTypes(): CancelablePromise<EnvTypesResponse>;
|
|
245
|
-
/**
|
|
246
|
-
* Create Environment Type
|
|
247
|
-
* Create a new environment type
|
|
248
|
-
* @param requestBody
|
|
249
|
-
* @returns EnvTypeResponse Environment type created successfully
|
|
250
|
-
* @throws ApiError
|
|
251
|
-
*/
|
|
252
|
-
createEnvType(requestBody?: CreateEnvTypeRequest): CancelablePromise<EnvTypeResponse>;
|
|
253
373
|
/**
|
|
254
374
|
* Get Environment Type
|
|
255
375
|
* Retrieve a specific environment type
|
|
@@ -258,23 +378,6 @@ declare class EnvironmentTypesService {
|
|
|
258
378
|
* @throws ApiError
|
|
259
379
|
*/
|
|
260
380
|
getEnvType(id: string): CancelablePromise<EnvTypeResponse>;
|
|
261
|
-
/**
|
|
262
|
-
* Update Environment Type
|
|
263
|
-
* Update an existing environment type
|
|
264
|
-
* @param id
|
|
265
|
-
* @param requestBody
|
|
266
|
-
* @returns EnvTypeResponse Environment type updated successfully
|
|
267
|
-
* @throws ApiError
|
|
268
|
-
*/
|
|
269
|
-
updateEnvType(id: string, requestBody?: UpdateEnvTypeRequest): CancelablePromise<EnvTypeResponse>;
|
|
270
|
-
/**
|
|
271
|
-
* Delete Environment Type
|
|
272
|
-
* Delete an existing environment type
|
|
273
|
-
* @param id
|
|
274
|
-
* @returns DeleteEnvTypeRequest Environment type deleted successfully
|
|
275
|
-
* @throws ApiError
|
|
276
|
-
*/
|
|
277
|
-
deleteEnvType(id: string): CancelablePromise<DeleteEnvTypeRequest>;
|
|
278
381
|
}
|
|
279
382
|
|
|
280
383
|
type BatchCreateEnvsRequest = {
|
|
@@ -580,14 +683,103 @@ declare class OrganizationsService {
|
|
|
580
683
|
checkIfSlugExists(slug: string): CancelablePromise<CheckSlugResponse>;
|
|
581
684
|
}
|
|
582
685
|
|
|
583
|
-
type
|
|
584
|
-
|
|
686
|
+
type CreateRoleRequest = {
|
|
687
|
+
name: string;
|
|
688
|
+
can_edit: boolean;
|
|
689
|
+
can_view: boolean;
|
|
690
|
+
have_api_access: boolean;
|
|
691
|
+
have_billing_options: boolean;
|
|
692
|
+
have_webhook_access: boolean;
|
|
693
|
+
is_admin: boolean;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
type RoleResponse = {
|
|
697
|
+
id: string;
|
|
698
|
+
name: string;
|
|
699
|
+
org_id: string;
|
|
700
|
+
can_edit: boolean;
|
|
701
|
+
can_view: boolean;
|
|
702
|
+
have_api_access: boolean;
|
|
703
|
+
have_billing_options: boolean;
|
|
704
|
+
have_webhook_access: boolean;
|
|
705
|
+
is_admin: boolean;
|
|
706
|
+
is_master: boolean;
|
|
707
|
+
created_at: string;
|
|
708
|
+
updated_at: string;
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
type RolesResponse = Array<RoleResponse>;
|
|
712
|
+
|
|
713
|
+
type RoleStatsResponse = {
|
|
714
|
+
admin_access_count: number;
|
|
715
|
+
billing_access_count: number;
|
|
716
|
+
api_access_count: number;
|
|
717
|
+
webhook_access_count: number;
|
|
718
|
+
view_access_count: number;
|
|
719
|
+
edit_access_count: number;
|
|
720
|
+
total_roles: number;
|
|
585
721
|
};
|
|
586
722
|
|
|
587
723
|
type UpdateRoleRequest = {
|
|
588
724
|
role_id: string;
|
|
589
725
|
};
|
|
590
726
|
|
|
727
|
+
declare class RolesService {
|
|
728
|
+
readonly httpRequest: BaseHttpRequest;
|
|
729
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
730
|
+
/**
|
|
731
|
+
* Get All Roles
|
|
732
|
+
* Retrieve all roles in the organization
|
|
733
|
+
* @returns RolesResponse Roles retrieved successfully
|
|
734
|
+
* @throws ApiError
|
|
735
|
+
*/
|
|
736
|
+
getAllRoles(): CancelablePromise<RolesResponse>;
|
|
737
|
+
/**
|
|
738
|
+
* Create Role
|
|
739
|
+
* Create a new role in the organization
|
|
740
|
+
* @param requestBody
|
|
741
|
+
* @returns RoleResponse Role created successfully
|
|
742
|
+
* @throws ApiError
|
|
743
|
+
*/
|
|
744
|
+
createRole(requestBody?: CreateRoleRequest): CancelablePromise<RoleResponse>;
|
|
745
|
+
/**
|
|
746
|
+
* Get Role Statistics
|
|
747
|
+
* Retrieve statistics about roles in the organization
|
|
748
|
+
* @returns RoleStatsResponse Role statistics retrieved successfully
|
|
749
|
+
* @throws ApiError
|
|
750
|
+
*/
|
|
751
|
+
getRoleStats(): CancelablePromise<RoleStatsResponse>;
|
|
752
|
+
/**
|
|
753
|
+
* Get Role
|
|
754
|
+
* Retrieve a specific role by ID
|
|
755
|
+
* @param id
|
|
756
|
+
* @returns RoleResponse Role retrieved successfully
|
|
757
|
+
* @throws ApiError
|
|
758
|
+
*/
|
|
759
|
+
getRole(id: string): CancelablePromise<RoleResponse>;
|
|
760
|
+
/**
|
|
761
|
+
* Update Role
|
|
762
|
+
* Update an existing role
|
|
763
|
+
* @param id
|
|
764
|
+
* @param requestBody
|
|
765
|
+
* @returns RoleResponse Role updated successfully
|
|
766
|
+
* @throws ApiError
|
|
767
|
+
*/
|
|
768
|
+
updateRole(id: string, requestBody?: UpdateRoleRequest): CancelablePromise<RoleResponse>;
|
|
769
|
+
/**
|
|
770
|
+
* Delete Role
|
|
771
|
+
* Delete an existing role (non-master roles only)
|
|
772
|
+
* @param id
|
|
773
|
+
* @returns RoleResponse Role deleted successfully
|
|
774
|
+
* @throws ApiError
|
|
775
|
+
*/
|
|
776
|
+
deleteRole(id: string): CancelablePromise<RoleResponse>;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
type UpdatePasswordRequest = {
|
|
780
|
+
password: string;
|
|
781
|
+
};
|
|
782
|
+
|
|
591
783
|
type UpdateUserRequest = {
|
|
592
784
|
full_name?: string;
|
|
593
785
|
profile_picture_url?: string;
|
|
@@ -666,6 +858,8 @@ declare class UsersService {
|
|
|
666
858
|
|
|
667
859
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
668
860
|
declare class EnvSyncAPISDK {
|
|
861
|
+
readonly access: AccessService;
|
|
862
|
+
readonly apiKeys: ApiKeysService;
|
|
669
863
|
readonly applications: ApplicationsService;
|
|
670
864
|
readonly auditLogs: AuditLogsService;
|
|
671
865
|
readonly authentication: AuthenticationService;
|
|
@@ -673,6 +867,7 @@ declare class EnvSyncAPISDK {
|
|
|
673
867
|
readonly environmentVariables: EnvironmentVariablesService;
|
|
674
868
|
readonly onboarding: OnboardingService;
|
|
675
869
|
readonly organizations: OrganizationsService;
|
|
870
|
+
readonly roles: RolesService;
|
|
676
871
|
readonly users: UsersService;
|
|
677
872
|
readonly request: BaseHttpRequest;
|
|
678
873
|
constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
|
|
@@ -699,4 +894,4 @@ type ErrorResponse = {
|
|
|
699
894
|
error: string;
|
|
700
895
|
};
|
|
701
896
|
|
|
702
|
-
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, ApiError, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, CancelError, CancelablePromise, type CheckSlugResponse, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type
|
|
897
|
+
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, type CallbackResponse, CancelError, CancelablePromise, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateUserInviteRequest, type CreateUserInviteResponse, type DeleteAppResponse, type DeleteEnvRequest, type DeleteUserInviteResponse, type EnvResponse, EnvSyncAPISDK, type EnvTypeResponse, type EnvTypesResponse, EnvironmentTypesService, EnvironmentVariablesService, type EnvsResponse, type ErrorResponse, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetUserInviteByTokenResponse, type LoginUrlResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgResponse, OrganizationsService, type RegenerateApiKeyResponse, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateOrgRequest, type UpdatePasswordRequest, type UpdateRoleRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, type UserResponse, type UsersResponse, UsersService, type WhoAmIResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,147 @@ declare abstract class BaseHttpRequest {
|
|
|
54
54
|
abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
type CallbackResponse = {
|
|
58
|
+
message: string;
|
|
59
|
+
tokenData?: {
|
|
60
|
+
access_token: string;
|
|
61
|
+
id_token: string;
|
|
62
|
+
scope: string;
|
|
63
|
+
expires_in: number;
|
|
64
|
+
token_type: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
type LoginUrlResponse = {
|
|
69
|
+
message: string;
|
|
70
|
+
loginUrl: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare class AccessService {
|
|
74
|
+
readonly httpRequest: BaseHttpRequest;
|
|
75
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
76
|
+
/**
|
|
77
|
+
* Initiate CLI Login
|
|
78
|
+
* Generate authentication URL for CLI login
|
|
79
|
+
* @returns LoginUrlResponse CLI login initiated successfully.
|
|
80
|
+
* @throws ApiError
|
|
81
|
+
*/
|
|
82
|
+
createCliLogin(): CancelablePromise<LoginUrlResponse>;
|
|
83
|
+
/**
|
|
84
|
+
* Create Web Login URL
|
|
85
|
+
* Generate authentication URL for web login
|
|
86
|
+
* @returns LoginUrlResponse Web login URL created successfully
|
|
87
|
+
* @throws ApiError
|
|
88
|
+
*/
|
|
89
|
+
createWebLogin(): CancelablePromise<LoginUrlResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* Web Login Callback
|
|
92
|
+
* Handle web login callback from Auth0
|
|
93
|
+
* @param code
|
|
94
|
+
* @returns void
|
|
95
|
+
* @throws ApiError
|
|
96
|
+
*/
|
|
97
|
+
callbackWebLogin(code: string): CancelablePromise<void>;
|
|
98
|
+
/**
|
|
99
|
+
* Create API Login URL
|
|
100
|
+
* Generate authentication URL for API login
|
|
101
|
+
* @returns LoginUrlResponse API login URL created successfully
|
|
102
|
+
* @throws ApiError
|
|
103
|
+
*/
|
|
104
|
+
createApiLogin(): CancelablePromise<LoginUrlResponse>;
|
|
105
|
+
/**
|
|
106
|
+
* API Login Callback
|
|
107
|
+
* Handle API login callback from Auth0
|
|
108
|
+
* @param code
|
|
109
|
+
* @returns CallbackResponse API login callback successful
|
|
110
|
+
* @throws ApiError
|
|
111
|
+
*/
|
|
112
|
+
callbackApiLogin(code: string): CancelablePromise<CallbackResponse>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
type ApiKeyResponse = {
|
|
116
|
+
id: string;
|
|
117
|
+
user_id: string;
|
|
118
|
+
org_id: string;
|
|
119
|
+
description: string;
|
|
120
|
+
is_active: boolean;
|
|
121
|
+
key: string;
|
|
122
|
+
created_at: string;
|
|
123
|
+
updated_at: string;
|
|
124
|
+
last_used_at: string | null;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
type ApiKeysResponse = Array<ApiKeyResponse>;
|
|
128
|
+
|
|
129
|
+
type CreateApiKeyRequest = {
|
|
130
|
+
name: string;
|
|
131
|
+
description?: string;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
type RegenerateApiKeyResponse = {
|
|
135
|
+
newKey: string;
|
|
136
|
+
id: string;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
type UpdateApiKeyRequest = {
|
|
140
|
+
description?: string;
|
|
141
|
+
is_active?: boolean;
|
|
142
|
+
last_used_at?: string;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
declare class ApiKeysService {
|
|
146
|
+
readonly httpRequest: BaseHttpRequest;
|
|
147
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
148
|
+
/**
|
|
149
|
+
* Create API Key
|
|
150
|
+
* Create a new API key for the organization
|
|
151
|
+
* @param requestBody
|
|
152
|
+
* @returns ApiKeyResponse API key created successfully
|
|
153
|
+
* @throws ApiError
|
|
154
|
+
*/
|
|
155
|
+
createApiKey(requestBody?: CreateApiKeyRequest): CancelablePromise<ApiKeyResponse>;
|
|
156
|
+
/**
|
|
157
|
+
* Get All API Keys
|
|
158
|
+
* Retrieve all API keys for the organization
|
|
159
|
+
* @returns ApiKeysResponse API keys retrieved successfully
|
|
160
|
+
* @throws ApiError
|
|
161
|
+
*/
|
|
162
|
+
getAllApiKeys(): CancelablePromise<ApiKeysResponse>;
|
|
163
|
+
/**
|
|
164
|
+
* Get API Key
|
|
165
|
+
* Retrieve a specific API key
|
|
166
|
+
* @param id
|
|
167
|
+
* @returns ApiKeyResponse API key retrieved successfully
|
|
168
|
+
* @throws ApiError
|
|
169
|
+
*/
|
|
170
|
+
getApiKey(id: string): CancelablePromise<ApiKeyResponse>;
|
|
171
|
+
/**
|
|
172
|
+
* Update API Key
|
|
173
|
+
* Update an existing API key
|
|
174
|
+
* @param id
|
|
175
|
+
* @param requestBody
|
|
176
|
+
* @returns ApiKeyResponse API key updated successfully
|
|
177
|
+
* @throws ApiError
|
|
178
|
+
*/
|
|
179
|
+
updateApiKey(id: string, requestBody?: UpdateApiKeyRequest): CancelablePromise<ApiKeyResponse>;
|
|
180
|
+
/**
|
|
181
|
+
* Delete API Key
|
|
182
|
+
* Delete an existing API key
|
|
183
|
+
* @param id
|
|
184
|
+
* @returns ApiKeyResponse API key deleted successfully
|
|
185
|
+
* @throws ApiError
|
|
186
|
+
*/
|
|
187
|
+
deleteApiKey(id: string): CancelablePromise<ApiKeyResponse>;
|
|
188
|
+
/**
|
|
189
|
+
* Regenerate API Key
|
|
190
|
+
* Generate a new value for an existing API key
|
|
191
|
+
* @param id
|
|
192
|
+
* @returns RegenerateApiKeyResponse API key regenerated successfully
|
|
193
|
+
* @throws ApiError
|
|
194
|
+
*/
|
|
195
|
+
regenerateApiKey(id: string): CancelablePromise<RegenerateApiKeyResponse>;
|
|
196
|
+
}
|
|
197
|
+
|
|
57
198
|
type CreateAppRequest = {
|
|
58
199
|
name: string;
|
|
59
200
|
description: string;
|
|
@@ -209,14 +350,6 @@ declare class AuthenticationService {
|
|
|
209
350
|
whoami(): CancelablePromise<WhoAmIResponse>;
|
|
210
351
|
}
|
|
211
352
|
|
|
212
|
-
type CreateEnvTypeRequest = {
|
|
213
|
-
name: string;
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
type DeleteEnvTypeRequest = {
|
|
217
|
-
id: string;
|
|
218
|
-
};
|
|
219
|
-
|
|
220
353
|
type EnvTypeResponse = {
|
|
221
354
|
id: string;
|
|
222
355
|
name: string;
|
|
@@ -227,11 +360,6 @@ type EnvTypeResponse = {
|
|
|
227
360
|
|
|
228
361
|
type EnvTypesResponse = Array<EnvTypeResponse>;
|
|
229
362
|
|
|
230
|
-
type UpdateEnvTypeRequest = {
|
|
231
|
-
id: string;
|
|
232
|
-
name: string;
|
|
233
|
-
};
|
|
234
|
-
|
|
235
363
|
declare class EnvironmentTypesService {
|
|
236
364
|
readonly httpRequest: BaseHttpRequest;
|
|
237
365
|
constructor(httpRequest: BaseHttpRequest);
|
|
@@ -242,14 +370,6 @@ declare class EnvironmentTypesService {
|
|
|
242
370
|
* @throws ApiError
|
|
243
371
|
*/
|
|
244
372
|
getEnvTypes(): CancelablePromise<EnvTypesResponse>;
|
|
245
|
-
/**
|
|
246
|
-
* Create Environment Type
|
|
247
|
-
* Create a new environment type
|
|
248
|
-
* @param requestBody
|
|
249
|
-
* @returns EnvTypeResponse Environment type created successfully
|
|
250
|
-
* @throws ApiError
|
|
251
|
-
*/
|
|
252
|
-
createEnvType(requestBody?: CreateEnvTypeRequest): CancelablePromise<EnvTypeResponse>;
|
|
253
373
|
/**
|
|
254
374
|
* Get Environment Type
|
|
255
375
|
* Retrieve a specific environment type
|
|
@@ -258,23 +378,6 @@ declare class EnvironmentTypesService {
|
|
|
258
378
|
* @throws ApiError
|
|
259
379
|
*/
|
|
260
380
|
getEnvType(id: string): CancelablePromise<EnvTypeResponse>;
|
|
261
|
-
/**
|
|
262
|
-
* Update Environment Type
|
|
263
|
-
* Update an existing environment type
|
|
264
|
-
* @param id
|
|
265
|
-
* @param requestBody
|
|
266
|
-
* @returns EnvTypeResponse Environment type updated successfully
|
|
267
|
-
* @throws ApiError
|
|
268
|
-
*/
|
|
269
|
-
updateEnvType(id: string, requestBody?: UpdateEnvTypeRequest): CancelablePromise<EnvTypeResponse>;
|
|
270
|
-
/**
|
|
271
|
-
* Delete Environment Type
|
|
272
|
-
* Delete an existing environment type
|
|
273
|
-
* @param id
|
|
274
|
-
* @returns DeleteEnvTypeRequest Environment type deleted successfully
|
|
275
|
-
* @throws ApiError
|
|
276
|
-
*/
|
|
277
|
-
deleteEnvType(id: string): CancelablePromise<DeleteEnvTypeRequest>;
|
|
278
381
|
}
|
|
279
382
|
|
|
280
383
|
type BatchCreateEnvsRequest = {
|
|
@@ -580,14 +683,103 @@ declare class OrganizationsService {
|
|
|
580
683
|
checkIfSlugExists(slug: string): CancelablePromise<CheckSlugResponse>;
|
|
581
684
|
}
|
|
582
685
|
|
|
583
|
-
type
|
|
584
|
-
|
|
686
|
+
type CreateRoleRequest = {
|
|
687
|
+
name: string;
|
|
688
|
+
can_edit: boolean;
|
|
689
|
+
can_view: boolean;
|
|
690
|
+
have_api_access: boolean;
|
|
691
|
+
have_billing_options: boolean;
|
|
692
|
+
have_webhook_access: boolean;
|
|
693
|
+
is_admin: boolean;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
type RoleResponse = {
|
|
697
|
+
id: string;
|
|
698
|
+
name: string;
|
|
699
|
+
org_id: string;
|
|
700
|
+
can_edit: boolean;
|
|
701
|
+
can_view: boolean;
|
|
702
|
+
have_api_access: boolean;
|
|
703
|
+
have_billing_options: boolean;
|
|
704
|
+
have_webhook_access: boolean;
|
|
705
|
+
is_admin: boolean;
|
|
706
|
+
is_master: boolean;
|
|
707
|
+
created_at: string;
|
|
708
|
+
updated_at: string;
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
type RolesResponse = Array<RoleResponse>;
|
|
712
|
+
|
|
713
|
+
type RoleStatsResponse = {
|
|
714
|
+
admin_access_count: number;
|
|
715
|
+
billing_access_count: number;
|
|
716
|
+
api_access_count: number;
|
|
717
|
+
webhook_access_count: number;
|
|
718
|
+
view_access_count: number;
|
|
719
|
+
edit_access_count: number;
|
|
720
|
+
total_roles: number;
|
|
585
721
|
};
|
|
586
722
|
|
|
587
723
|
type UpdateRoleRequest = {
|
|
588
724
|
role_id: string;
|
|
589
725
|
};
|
|
590
726
|
|
|
727
|
+
declare class RolesService {
|
|
728
|
+
readonly httpRequest: BaseHttpRequest;
|
|
729
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
730
|
+
/**
|
|
731
|
+
* Get All Roles
|
|
732
|
+
* Retrieve all roles in the organization
|
|
733
|
+
* @returns RolesResponse Roles retrieved successfully
|
|
734
|
+
* @throws ApiError
|
|
735
|
+
*/
|
|
736
|
+
getAllRoles(): CancelablePromise<RolesResponse>;
|
|
737
|
+
/**
|
|
738
|
+
* Create Role
|
|
739
|
+
* Create a new role in the organization
|
|
740
|
+
* @param requestBody
|
|
741
|
+
* @returns RoleResponse Role created successfully
|
|
742
|
+
* @throws ApiError
|
|
743
|
+
*/
|
|
744
|
+
createRole(requestBody?: CreateRoleRequest): CancelablePromise<RoleResponse>;
|
|
745
|
+
/**
|
|
746
|
+
* Get Role Statistics
|
|
747
|
+
* Retrieve statistics about roles in the organization
|
|
748
|
+
* @returns RoleStatsResponse Role statistics retrieved successfully
|
|
749
|
+
* @throws ApiError
|
|
750
|
+
*/
|
|
751
|
+
getRoleStats(): CancelablePromise<RoleStatsResponse>;
|
|
752
|
+
/**
|
|
753
|
+
* Get Role
|
|
754
|
+
* Retrieve a specific role by ID
|
|
755
|
+
* @param id
|
|
756
|
+
* @returns RoleResponse Role retrieved successfully
|
|
757
|
+
* @throws ApiError
|
|
758
|
+
*/
|
|
759
|
+
getRole(id: string): CancelablePromise<RoleResponse>;
|
|
760
|
+
/**
|
|
761
|
+
* Update Role
|
|
762
|
+
* Update an existing role
|
|
763
|
+
* @param id
|
|
764
|
+
* @param requestBody
|
|
765
|
+
* @returns RoleResponse Role updated successfully
|
|
766
|
+
* @throws ApiError
|
|
767
|
+
*/
|
|
768
|
+
updateRole(id: string, requestBody?: UpdateRoleRequest): CancelablePromise<RoleResponse>;
|
|
769
|
+
/**
|
|
770
|
+
* Delete Role
|
|
771
|
+
* Delete an existing role (non-master roles only)
|
|
772
|
+
* @param id
|
|
773
|
+
* @returns RoleResponse Role deleted successfully
|
|
774
|
+
* @throws ApiError
|
|
775
|
+
*/
|
|
776
|
+
deleteRole(id: string): CancelablePromise<RoleResponse>;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
type UpdatePasswordRequest = {
|
|
780
|
+
password: string;
|
|
781
|
+
};
|
|
782
|
+
|
|
591
783
|
type UpdateUserRequest = {
|
|
592
784
|
full_name?: string;
|
|
593
785
|
profile_picture_url?: string;
|
|
@@ -666,6 +858,8 @@ declare class UsersService {
|
|
|
666
858
|
|
|
667
859
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
668
860
|
declare class EnvSyncAPISDK {
|
|
861
|
+
readonly access: AccessService;
|
|
862
|
+
readonly apiKeys: ApiKeysService;
|
|
669
863
|
readonly applications: ApplicationsService;
|
|
670
864
|
readonly auditLogs: AuditLogsService;
|
|
671
865
|
readonly authentication: AuthenticationService;
|
|
@@ -673,6 +867,7 @@ declare class EnvSyncAPISDK {
|
|
|
673
867
|
readonly environmentVariables: EnvironmentVariablesService;
|
|
674
868
|
readonly onboarding: OnboardingService;
|
|
675
869
|
readonly organizations: OrganizationsService;
|
|
870
|
+
readonly roles: RolesService;
|
|
676
871
|
readonly users: UsersService;
|
|
677
872
|
readonly request: BaseHttpRequest;
|
|
678
873
|
constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
|
|
@@ -699,4 +894,4 @@ type ErrorResponse = {
|
|
|
699
894
|
error: string;
|
|
700
895
|
};
|
|
701
896
|
|
|
702
|
-
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, ApiError, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, CancelError, CancelablePromise, type CheckSlugResponse, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type
|
|
897
|
+
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, type CallbackResponse, CancelError, CancelablePromise, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateUserInviteRequest, type CreateUserInviteResponse, type DeleteAppResponse, type DeleteEnvRequest, type DeleteUserInviteResponse, type EnvResponse, EnvSyncAPISDK, type EnvTypeResponse, type EnvTypesResponse, EnvironmentTypesService, EnvironmentVariablesService, type EnvsResponse, type ErrorResponse, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetUserInviteByTokenResponse, type LoginUrlResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgResponse, OrganizationsService, type RegenerateApiKeyResponse, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateOrgRequest, type UpdatePasswordRequest, type UpdateRoleRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, type UserResponse, type UsersResponse, UsersService, type WhoAmIResponse };
|