@envsync-cloud/envsync-ts-sdk 0.1.2 → 0.2.2
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 +239 -81
- package/dist/index.d.ts +239 -81
- package/dist/index.global.js +308 -104
- package/dist/index.js +314 -104
- package/dist/index.mjs +311 -104
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -74,20 +74,12 @@ declare class AccessService {
|
|
|
74
74
|
readonly httpRequest: BaseHttpRequest;
|
|
75
75
|
constructor(httpRequest: BaseHttpRequest);
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Initiate CLI Login
|
|
78
78
|
* Generate authentication URL for CLI login
|
|
79
|
-
* @returns LoginUrlResponse CLI login
|
|
79
|
+
* @returns LoginUrlResponse CLI login initiated successfully.
|
|
80
80
|
* @throws ApiError
|
|
81
81
|
*/
|
|
82
82
|
createCliLogin(): CancelablePromise<LoginUrlResponse>;
|
|
83
|
-
/**
|
|
84
|
-
* CLI Login Callback
|
|
85
|
-
* Handle CLI login callback from Auth0
|
|
86
|
-
* @param code
|
|
87
|
-
* @returns void
|
|
88
|
-
* @throws ApiError
|
|
89
|
-
*/
|
|
90
|
-
callbackCliLogin(code: string): CancelablePromise<void>;
|
|
91
83
|
/**
|
|
92
84
|
* Create Web Login URL
|
|
93
85
|
* Generate authentication URL for web login
|
|
@@ -120,6 +112,89 @@ declare class AccessService {
|
|
|
120
112
|
callbackApiLogin(code: string): CancelablePromise<CallbackResponse>;
|
|
121
113
|
}
|
|
122
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
|
+
|
|
123
198
|
type CreateAppRequest = {
|
|
124
199
|
name: string;
|
|
125
200
|
description: string;
|
|
@@ -136,28 +211,24 @@ type DeleteAppResponse = {
|
|
|
136
211
|
};
|
|
137
212
|
|
|
138
213
|
type GetAppResponse = {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
updated_at: string;
|
|
147
|
-
};
|
|
214
|
+
id: string;
|
|
215
|
+
name: string;
|
|
216
|
+
description: string;
|
|
217
|
+
metadata: Record<string, any>;
|
|
218
|
+
org_id: string;
|
|
219
|
+
created_at: string;
|
|
220
|
+
updated_at: string;
|
|
148
221
|
};
|
|
149
222
|
|
|
150
|
-
type GetAppsResponse = {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}>;
|
|
160
|
-
};
|
|
223
|
+
type GetAppsResponse = Array<{
|
|
224
|
+
id: string;
|
|
225
|
+
name: string;
|
|
226
|
+
description: string;
|
|
227
|
+
metadata: Record<string, any>;
|
|
228
|
+
org_id: string;
|
|
229
|
+
created_at: string;
|
|
230
|
+
updated_at: string;
|
|
231
|
+
}>;
|
|
161
232
|
|
|
162
233
|
type UpdateAppRequest = {
|
|
163
234
|
name?: string;
|
|
@@ -235,9 +306,24 @@ declare class AuditLogsService {
|
|
|
235
306
|
* @returns GetAuditLogsResponse Audit logs retrieved successfully
|
|
236
307
|
* @throws ApiError
|
|
237
308
|
*/
|
|
238
|
-
getAuditLogs(page?:
|
|
309
|
+
getAuditLogs(page?: string, perPage?: string): CancelablePromise<GetAuditLogsResponse>;
|
|
239
310
|
}
|
|
240
311
|
|
|
312
|
+
type RoleResponse = {
|
|
313
|
+
id: string;
|
|
314
|
+
name: string;
|
|
315
|
+
org_id: string;
|
|
316
|
+
can_edit: boolean;
|
|
317
|
+
can_view: boolean;
|
|
318
|
+
have_api_access: boolean;
|
|
319
|
+
have_billing_options: boolean;
|
|
320
|
+
have_webhook_access: boolean;
|
|
321
|
+
is_admin: boolean;
|
|
322
|
+
is_master: boolean;
|
|
323
|
+
created_at: string;
|
|
324
|
+
updated_at: string;
|
|
325
|
+
};
|
|
326
|
+
|
|
241
327
|
type WhoAmIResponse = {
|
|
242
328
|
user: {
|
|
243
329
|
id: string;
|
|
@@ -261,6 +347,7 @@ type WhoAmIResponse = {
|
|
|
261
347
|
created_at: string;
|
|
262
348
|
updated_at: string;
|
|
263
349
|
};
|
|
350
|
+
role: RoleResponse;
|
|
264
351
|
};
|
|
265
352
|
|
|
266
353
|
declare class AuthenticationService {
|
|
@@ -275,14 +362,6 @@ declare class AuthenticationService {
|
|
|
275
362
|
whoami(): CancelablePromise<WhoAmIResponse>;
|
|
276
363
|
}
|
|
277
364
|
|
|
278
|
-
type CreateEnvTypeRequest = {
|
|
279
|
-
name: string;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
type DeleteEnvTypeRequest = {
|
|
283
|
-
id: string;
|
|
284
|
-
};
|
|
285
|
-
|
|
286
365
|
type EnvTypeResponse = {
|
|
287
366
|
id: string;
|
|
288
367
|
name: string;
|
|
@@ -293,11 +372,6 @@ type EnvTypeResponse = {
|
|
|
293
372
|
|
|
294
373
|
type EnvTypesResponse = Array<EnvTypeResponse>;
|
|
295
374
|
|
|
296
|
-
type UpdateEnvTypeRequest = {
|
|
297
|
-
id: string;
|
|
298
|
-
name: string;
|
|
299
|
-
};
|
|
300
|
-
|
|
301
375
|
declare class EnvironmentTypesService {
|
|
302
376
|
readonly httpRequest: BaseHttpRequest;
|
|
303
377
|
constructor(httpRequest: BaseHttpRequest);
|
|
@@ -308,14 +382,6 @@ declare class EnvironmentTypesService {
|
|
|
308
382
|
* @throws ApiError
|
|
309
383
|
*/
|
|
310
384
|
getEnvTypes(): CancelablePromise<EnvTypesResponse>;
|
|
311
|
-
/**
|
|
312
|
-
* Create Environment Type
|
|
313
|
-
* Create a new environment type
|
|
314
|
-
* @param requestBody
|
|
315
|
-
* @returns EnvTypeResponse Environment type created successfully
|
|
316
|
-
* @throws ApiError
|
|
317
|
-
*/
|
|
318
|
-
createEnvType(requestBody?: CreateEnvTypeRequest): CancelablePromise<EnvTypeResponse>;
|
|
319
385
|
/**
|
|
320
386
|
* Get Environment Type
|
|
321
387
|
* Retrieve a specific environment type
|
|
@@ -324,23 +390,6 @@ declare class EnvironmentTypesService {
|
|
|
324
390
|
* @throws ApiError
|
|
325
391
|
*/
|
|
326
392
|
getEnvType(id: string): CancelablePromise<EnvTypeResponse>;
|
|
327
|
-
/**
|
|
328
|
-
* Update Environment Type
|
|
329
|
-
* Update an existing environment type
|
|
330
|
-
* @param id
|
|
331
|
-
* @param requestBody
|
|
332
|
-
* @returns EnvTypeResponse Environment type updated successfully
|
|
333
|
-
* @throws ApiError
|
|
334
|
-
*/
|
|
335
|
-
updateEnvType(id: string, requestBody?: UpdateEnvTypeRequest): CancelablePromise<EnvTypeResponse>;
|
|
336
|
-
/**
|
|
337
|
-
* Delete Environment Type
|
|
338
|
-
* Delete an existing environment type
|
|
339
|
-
* @param id
|
|
340
|
-
* @returns DeleteEnvTypeRequest Environment type deleted successfully
|
|
341
|
-
* @throws ApiError
|
|
342
|
-
*/
|
|
343
|
-
deleteEnvType(id: string): CancelablePromise<DeleteEnvTypeRequest>;
|
|
344
393
|
}
|
|
345
394
|
|
|
346
395
|
type BatchCreateEnvsRequest = {
|
|
@@ -417,15 +466,6 @@ declare class EnvironmentVariablesService {
|
|
|
417
466
|
* @throws ApiError
|
|
418
467
|
*/
|
|
419
468
|
getEnv(key: string, requestBody?: GetEnvRequest): CancelablePromise<EnvResponse>;
|
|
420
|
-
/**
|
|
421
|
-
* Update Environment Variable
|
|
422
|
-
* Update an existing environment variable
|
|
423
|
-
* @param key
|
|
424
|
-
* @param requestBody
|
|
425
|
-
* @returns EnvResponse Environment variable updated successfully
|
|
426
|
-
* @throws ApiError
|
|
427
|
-
*/
|
|
428
|
-
updateEnv(key: string, requestBody?: UpdateEnvRequest): CancelablePromise<EnvResponse>;
|
|
429
469
|
/**
|
|
430
470
|
* Create Environment Variable
|
|
431
471
|
* Create a new environment variable
|
|
@@ -442,6 +482,43 @@ declare class EnvironmentVariablesService {
|
|
|
442
482
|
* @throws ApiError
|
|
443
483
|
*/
|
|
444
484
|
batchCreateEnvs(requestBody?: BatchCreateEnvsRequest): CancelablePromise<EnvsResponse>;
|
|
485
|
+
/**
|
|
486
|
+
* Batch Update Environment Variables
|
|
487
|
+
* Update multiple environment variables in a single request
|
|
488
|
+
* @param requestBody
|
|
489
|
+
* @returns EnvsResponse Environment variables updated successfully
|
|
490
|
+
* @throws ApiError
|
|
491
|
+
*/
|
|
492
|
+
batchUpdateEnvs(requestBody?: BatchCreateEnvsRequest): CancelablePromise<EnvsResponse>;
|
|
493
|
+
/**
|
|
494
|
+
* Update Environment Variable
|
|
495
|
+
* Update an existing environment variable
|
|
496
|
+
* @param key
|
|
497
|
+
* @param requestBody
|
|
498
|
+
* @returns EnvResponse Environment variable updated successfully
|
|
499
|
+
* @throws ApiError
|
|
500
|
+
*/
|
|
501
|
+
updateEnv(key: string, requestBody?: UpdateEnvRequest): CancelablePromise<EnvResponse>;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
type UploadFileResponse = {
|
|
505
|
+
message: string;
|
|
506
|
+
s3_url: string;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
declare class FileUploadService {
|
|
510
|
+
readonly httpRequest: BaseHttpRequest;
|
|
511
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
512
|
+
/**
|
|
513
|
+
* Upload File
|
|
514
|
+
* Upload a file to the server. The file should be less than 5MB in size.
|
|
515
|
+
* @param formData
|
|
516
|
+
* @returns UploadFileResponse File uploaded successfully
|
|
517
|
+
* @throws ApiError
|
|
518
|
+
*/
|
|
519
|
+
uploadFile(formData?: {
|
|
520
|
+
file: any;
|
|
521
|
+
}): CancelablePromise<UploadFileResponse>;
|
|
445
522
|
}
|
|
446
523
|
|
|
447
524
|
type AcceptOrgInviteRequest = {
|
|
@@ -646,14 +723,88 @@ declare class OrganizationsService {
|
|
|
646
723
|
checkIfSlugExists(slug: string): CancelablePromise<CheckSlugResponse>;
|
|
647
724
|
}
|
|
648
725
|
|
|
649
|
-
type
|
|
650
|
-
|
|
726
|
+
type CreateRoleRequest = {
|
|
727
|
+
name: string;
|
|
728
|
+
can_edit: boolean;
|
|
729
|
+
can_view: boolean;
|
|
730
|
+
have_api_access: boolean;
|
|
731
|
+
have_billing_options: boolean;
|
|
732
|
+
have_webhook_access: boolean;
|
|
733
|
+
is_admin: boolean;
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
type RolesResponse = Array<RoleResponse>;
|
|
737
|
+
|
|
738
|
+
type RoleStatsResponse = {
|
|
739
|
+
admin_access_count: number;
|
|
740
|
+
billing_access_count: number;
|
|
741
|
+
api_access_count: number;
|
|
742
|
+
webhook_access_count: number;
|
|
743
|
+
view_access_count: number;
|
|
744
|
+
edit_access_count: number;
|
|
745
|
+
total_roles: number;
|
|
651
746
|
};
|
|
652
747
|
|
|
653
748
|
type UpdateRoleRequest = {
|
|
654
749
|
role_id: string;
|
|
655
750
|
};
|
|
656
751
|
|
|
752
|
+
declare class RolesService {
|
|
753
|
+
readonly httpRequest: BaseHttpRequest;
|
|
754
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
755
|
+
/**
|
|
756
|
+
* Get All Roles
|
|
757
|
+
* Retrieve all roles in the organization
|
|
758
|
+
* @returns RolesResponse Roles retrieved successfully
|
|
759
|
+
* @throws ApiError
|
|
760
|
+
*/
|
|
761
|
+
getAllRoles(): CancelablePromise<RolesResponse>;
|
|
762
|
+
/**
|
|
763
|
+
* Create Role
|
|
764
|
+
* Create a new role in the organization
|
|
765
|
+
* @param requestBody
|
|
766
|
+
* @returns RoleResponse Role created successfully
|
|
767
|
+
* @throws ApiError
|
|
768
|
+
*/
|
|
769
|
+
createRole(requestBody?: CreateRoleRequest): CancelablePromise<RoleResponse>;
|
|
770
|
+
/**
|
|
771
|
+
* Get Role Statistics
|
|
772
|
+
* Retrieve statistics about roles in the organization
|
|
773
|
+
* @returns RoleStatsResponse Role statistics retrieved successfully
|
|
774
|
+
* @throws ApiError
|
|
775
|
+
*/
|
|
776
|
+
getRoleStats(): CancelablePromise<RoleStatsResponse>;
|
|
777
|
+
/**
|
|
778
|
+
* Get Role
|
|
779
|
+
* Retrieve a specific role by ID
|
|
780
|
+
* @param id
|
|
781
|
+
* @returns RoleResponse Role retrieved successfully
|
|
782
|
+
* @throws ApiError
|
|
783
|
+
*/
|
|
784
|
+
getRole(id: string): CancelablePromise<RoleResponse>;
|
|
785
|
+
/**
|
|
786
|
+
* Update Role
|
|
787
|
+
* Update an existing role
|
|
788
|
+
* @param id
|
|
789
|
+
* @param requestBody
|
|
790
|
+
* @returns RoleResponse Role updated successfully
|
|
791
|
+
* @throws ApiError
|
|
792
|
+
*/
|
|
793
|
+
updateRole(id: string, requestBody?: UpdateRoleRequest): CancelablePromise<RoleResponse>;
|
|
794
|
+
/**
|
|
795
|
+
* Delete Role
|
|
796
|
+
* Delete an existing role (non-master roles only)
|
|
797
|
+
* @param id
|
|
798
|
+
* @returns RoleResponse Role deleted successfully
|
|
799
|
+
* @throws ApiError
|
|
800
|
+
*/
|
|
801
|
+
deleteRole(id: string): CancelablePromise<RoleResponse>;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
type UpdatePasswordRequest = {
|
|
805
|
+
password: string;
|
|
806
|
+
};
|
|
807
|
+
|
|
657
808
|
type UpdateUserRequest = {
|
|
658
809
|
full_name?: string;
|
|
659
810
|
profile_picture_url?: string;
|
|
@@ -733,13 +884,16 @@ declare class UsersService {
|
|
|
733
884
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
734
885
|
declare class EnvSyncAPISDK {
|
|
735
886
|
readonly access: AccessService;
|
|
887
|
+
readonly apiKeys: ApiKeysService;
|
|
736
888
|
readonly applications: ApplicationsService;
|
|
737
889
|
readonly auditLogs: AuditLogsService;
|
|
738
890
|
readonly authentication: AuthenticationService;
|
|
739
891
|
readonly environmentTypes: EnvironmentTypesService;
|
|
740
892
|
readonly environmentVariables: EnvironmentVariablesService;
|
|
893
|
+
readonly fileUpload: FileUploadService;
|
|
741
894
|
readonly onboarding: OnboardingService;
|
|
742
895
|
readonly organizations: OrganizationsService;
|
|
896
|
+
readonly roles: RolesService;
|
|
743
897
|
readonly users: UsersService;
|
|
744
898
|
readonly request: BaseHttpRequest;
|
|
745
899
|
constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
|
|
@@ -766,4 +920,8 @@ type ErrorResponse = {
|
|
|
766
920
|
error: string;
|
|
767
921
|
};
|
|
768
922
|
|
|
769
|
-
|
|
923
|
+
type UploadFileError = {
|
|
924
|
+
error: string;
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
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, FileUploadService, 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 UploadFileError, type UploadFileResponse, type UserResponse, type UsersResponse, UsersService, type WhoAmIResponse };
|