@envsync-cloud/envsync-ts-sdk 0.2.0 → 0.2.3
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 +76 -46
- package/dist/index.d.ts +76 -46
- package/dist/index.global.js +68 -23
- package/dist/index.js +70 -23
- package/dist/index.mjs +69 -23
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -211,28 +211,24 @@ type DeleteAppResponse = {
|
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
type GetAppResponse = {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
updated_at: string;
|
|
222
|
-
};
|
|
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;
|
|
223
221
|
};
|
|
224
222
|
|
|
225
|
-
type GetAppsResponse = {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}>;
|
|
235
|
-
};
|
|
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
|
+
}>;
|
|
236
232
|
|
|
237
233
|
type UpdateAppRequest = {
|
|
238
234
|
name?: string;
|
|
@@ -310,9 +306,24 @@ declare class AuditLogsService {
|
|
|
310
306
|
* @returns GetAuditLogsResponse Audit logs retrieved successfully
|
|
311
307
|
* @throws ApiError
|
|
312
308
|
*/
|
|
313
|
-
getAuditLogs(page?:
|
|
309
|
+
getAuditLogs(page?: string, perPage?: string): CancelablePromise<GetAuditLogsResponse>;
|
|
314
310
|
}
|
|
315
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
|
+
|
|
316
327
|
type WhoAmIResponse = {
|
|
317
328
|
user: {
|
|
318
329
|
id: string;
|
|
@@ -336,6 +347,7 @@ type WhoAmIResponse = {
|
|
|
336
347
|
created_at: string;
|
|
337
348
|
updated_at: string;
|
|
338
349
|
};
|
|
350
|
+
role: RoleResponse;
|
|
339
351
|
};
|
|
340
352
|
|
|
341
353
|
declare class AuthenticationService {
|
|
@@ -454,15 +466,6 @@ declare class EnvironmentVariablesService {
|
|
|
454
466
|
* @throws ApiError
|
|
455
467
|
*/
|
|
456
468
|
getEnv(key: string, requestBody?: GetEnvRequest): CancelablePromise<EnvResponse>;
|
|
457
|
-
/**
|
|
458
|
-
* Update Environment Variable
|
|
459
|
-
* Update an existing environment variable
|
|
460
|
-
* @param key
|
|
461
|
-
* @param requestBody
|
|
462
|
-
* @returns EnvResponse Environment variable updated successfully
|
|
463
|
-
* @throws ApiError
|
|
464
|
-
*/
|
|
465
|
-
updateEnv(key: string, requestBody?: UpdateEnvRequest): CancelablePromise<EnvResponse>;
|
|
466
469
|
/**
|
|
467
470
|
* Create Environment Variable
|
|
468
471
|
* Create a new environment variable
|
|
@@ -479,6 +482,43 @@ declare class EnvironmentVariablesService {
|
|
|
479
482
|
* @throws ApiError
|
|
480
483
|
*/
|
|
481
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>;
|
|
482
522
|
}
|
|
483
523
|
|
|
484
524
|
type AcceptOrgInviteRequest = {
|
|
@@ -693,21 +733,6 @@ type CreateRoleRequest = {
|
|
|
693
733
|
is_admin: boolean;
|
|
694
734
|
};
|
|
695
735
|
|
|
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
736
|
type RolesResponse = Array<RoleResponse>;
|
|
712
737
|
|
|
713
738
|
type RoleStatsResponse = {
|
|
@@ -865,6 +890,7 @@ declare class EnvSyncAPISDK {
|
|
|
865
890
|
readonly authentication: AuthenticationService;
|
|
866
891
|
readonly environmentTypes: EnvironmentTypesService;
|
|
867
892
|
readonly environmentVariables: EnvironmentVariablesService;
|
|
893
|
+
readonly fileUpload: FileUploadService;
|
|
868
894
|
readonly onboarding: OnboardingService;
|
|
869
895
|
readonly organizations: OrganizationsService;
|
|
870
896
|
readonly roles: RolesService;
|
|
@@ -894,4 +920,8 @@ type ErrorResponse = {
|
|
|
894
920
|
error: string;
|
|
895
921
|
};
|
|
896
922
|
|
|
897
|
-
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -211,28 +211,24 @@ type DeleteAppResponse = {
|
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
type GetAppResponse = {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
updated_at: string;
|
|
222
|
-
};
|
|
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;
|
|
223
221
|
};
|
|
224
222
|
|
|
225
|
-
type GetAppsResponse = {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}>;
|
|
235
|
-
};
|
|
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
|
+
}>;
|
|
236
232
|
|
|
237
233
|
type UpdateAppRequest = {
|
|
238
234
|
name?: string;
|
|
@@ -310,9 +306,24 @@ declare class AuditLogsService {
|
|
|
310
306
|
* @returns GetAuditLogsResponse Audit logs retrieved successfully
|
|
311
307
|
* @throws ApiError
|
|
312
308
|
*/
|
|
313
|
-
getAuditLogs(page?:
|
|
309
|
+
getAuditLogs(page?: string, perPage?: string): CancelablePromise<GetAuditLogsResponse>;
|
|
314
310
|
}
|
|
315
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
|
+
|
|
316
327
|
type WhoAmIResponse = {
|
|
317
328
|
user: {
|
|
318
329
|
id: string;
|
|
@@ -336,6 +347,7 @@ type WhoAmIResponse = {
|
|
|
336
347
|
created_at: string;
|
|
337
348
|
updated_at: string;
|
|
338
349
|
};
|
|
350
|
+
role: RoleResponse;
|
|
339
351
|
};
|
|
340
352
|
|
|
341
353
|
declare class AuthenticationService {
|
|
@@ -454,15 +466,6 @@ declare class EnvironmentVariablesService {
|
|
|
454
466
|
* @throws ApiError
|
|
455
467
|
*/
|
|
456
468
|
getEnv(key: string, requestBody?: GetEnvRequest): CancelablePromise<EnvResponse>;
|
|
457
|
-
/**
|
|
458
|
-
* Update Environment Variable
|
|
459
|
-
* Update an existing environment variable
|
|
460
|
-
* @param key
|
|
461
|
-
* @param requestBody
|
|
462
|
-
* @returns EnvResponse Environment variable updated successfully
|
|
463
|
-
* @throws ApiError
|
|
464
|
-
*/
|
|
465
|
-
updateEnv(key: string, requestBody?: UpdateEnvRequest): CancelablePromise<EnvResponse>;
|
|
466
469
|
/**
|
|
467
470
|
* Create Environment Variable
|
|
468
471
|
* Create a new environment variable
|
|
@@ -479,6 +482,43 @@ declare class EnvironmentVariablesService {
|
|
|
479
482
|
* @throws ApiError
|
|
480
483
|
*/
|
|
481
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>;
|
|
482
522
|
}
|
|
483
523
|
|
|
484
524
|
type AcceptOrgInviteRequest = {
|
|
@@ -693,21 +733,6 @@ type CreateRoleRequest = {
|
|
|
693
733
|
is_admin: boolean;
|
|
694
734
|
};
|
|
695
735
|
|
|
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
736
|
type RolesResponse = Array<RoleResponse>;
|
|
712
737
|
|
|
713
738
|
type RoleStatsResponse = {
|
|
@@ -865,6 +890,7 @@ declare class EnvSyncAPISDK {
|
|
|
865
890
|
readonly authentication: AuthenticationService;
|
|
866
891
|
readonly environmentTypes: EnvironmentTypesService;
|
|
867
892
|
readonly environmentVariables: EnvironmentVariablesService;
|
|
893
|
+
readonly fileUpload: FileUploadService;
|
|
868
894
|
readonly onboarding: OnboardingService;
|
|
869
895
|
readonly organizations: OrganizationsService;
|
|
870
896
|
readonly roles: RolesService;
|
|
@@ -894,4 +920,8 @@ type ErrorResponse = {
|
|
|
894
920
|
error: string;
|
|
895
921
|
};
|
|
896
922
|
|
|
897
|
-
|
|
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 };
|
package/dist/index.global.js
CHANGED
|
@@ -697,7 +697,7 @@
|
|
|
697
697
|
* @returns GetAuditLogsResponse Audit logs retrieved successfully
|
|
698
698
|
* @throws ApiError
|
|
699
699
|
*/
|
|
700
|
-
getAuditLogs(page = 1, perPage = 20) {
|
|
700
|
+
getAuditLogs(page = "1", perPage = "20") {
|
|
701
701
|
return this.httpRequest.request({
|
|
702
702
|
method: "GET",
|
|
703
703
|
url: "/api/audit_log",
|
|
@@ -839,20 +839,16 @@
|
|
|
839
839
|
});
|
|
840
840
|
}
|
|
841
841
|
/**
|
|
842
|
-
*
|
|
843
|
-
*
|
|
844
|
-
* @param key
|
|
842
|
+
* Create Environment Variable
|
|
843
|
+
* Create a new environment variable
|
|
845
844
|
* @param requestBody
|
|
846
|
-
* @returns EnvResponse Environment variable
|
|
845
|
+
* @returns EnvResponse Environment variable created successfully
|
|
847
846
|
* @throws ApiError
|
|
848
847
|
*/
|
|
849
|
-
|
|
848
|
+
createEnv(requestBody) {
|
|
850
849
|
return this.httpRequest.request({
|
|
851
|
-
method: "
|
|
852
|
-
url: "/api/env/
|
|
853
|
-
path: {
|
|
854
|
-
"key": key
|
|
855
|
-
},
|
|
850
|
+
method: "PUT",
|
|
851
|
+
url: "/api/env/single",
|
|
856
852
|
body: requestBody,
|
|
857
853
|
mediaType: "application/json",
|
|
858
854
|
errors: {
|
|
@@ -861,16 +857,16 @@
|
|
|
861
857
|
});
|
|
862
858
|
}
|
|
863
859
|
/**
|
|
864
|
-
* Create Environment
|
|
865
|
-
* Create a
|
|
860
|
+
* Batch Create Environment Variables
|
|
861
|
+
* Create multiple environment variables in a single request
|
|
866
862
|
* @param requestBody
|
|
867
|
-
* @returns
|
|
863
|
+
* @returns EnvsResponse Environment variables created successfully
|
|
868
864
|
* @throws ApiError
|
|
869
865
|
*/
|
|
870
|
-
|
|
866
|
+
batchCreateEnvs(requestBody) {
|
|
871
867
|
return this.httpRequest.request({
|
|
872
868
|
method: "PUT",
|
|
873
|
-
url: "/api/env/
|
|
869
|
+
url: "/api/env/batch",
|
|
874
870
|
body: requestBody,
|
|
875
871
|
mediaType: "application/json",
|
|
876
872
|
errors: {
|
|
@@ -879,15 +875,15 @@
|
|
|
879
875
|
});
|
|
880
876
|
}
|
|
881
877
|
/**
|
|
882
|
-
* Batch
|
|
883
|
-
*
|
|
878
|
+
* Batch Update Environment Variables
|
|
879
|
+
* Update multiple environment variables in a single request
|
|
884
880
|
* @param requestBody
|
|
885
|
-
* @returns EnvsResponse Environment variables
|
|
881
|
+
* @returns EnvsResponse Environment variables updated successfully
|
|
886
882
|
* @throws ApiError
|
|
887
883
|
*/
|
|
888
|
-
|
|
884
|
+
batchUpdateEnvs(requestBody) {
|
|
889
885
|
return this.httpRequest.request({
|
|
890
|
-
method: "
|
|
886
|
+
method: "PATCH",
|
|
891
887
|
url: "/api/env/batch",
|
|
892
888
|
body: requestBody,
|
|
893
889
|
mediaType: "application/json",
|
|
@@ -896,6 +892,53 @@
|
|
|
896
892
|
}
|
|
897
893
|
});
|
|
898
894
|
}
|
|
895
|
+
/**
|
|
896
|
+
* Update Environment Variable
|
|
897
|
+
* Update an existing environment variable
|
|
898
|
+
* @param key
|
|
899
|
+
* @param requestBody
|
|
900
|
+
* @returns EnvResponse Environment variable updated successfully
|
|
901
|
+
* @throws ApiError
|
|
902
|
+
*/
|
|
903
|
+
updateEnv(key, requestBody) {
|
|
904
|
+
return this.httpRequest.request({
|
|
905
|
+
method: "PATCH",
|
|
906
|
+
url: "/api/env/i/{key}",
|
|
907
|
+
path: {
|
|
908
|
+
"key": key
|
|
909
|
+
},
|
|
910
|
+
body: requestBody,
|
|
911
|
+
mediaType: "application/json",
|
|
912
|
+
errors: {
|
|
913
|
+
500: `Internal server error`
|
|
914
|
+
}
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
// src/services/FileUploadService.ts
|
|
920
|
+
var FileUploadService = class {
|
|
921
|
+
constructor(httpRequest) {
|
|
922
|
+
this.httpRequest = httpRequest;
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Upload File
|
|
926
|
+
* Upload a file to the server. The file should be less than 5MB in size.
|
|
927
|
+
* @param formData
|
|
928
|
+
* @returns UploadFileResponse File uploaded successfully
|
|
929
|
+
* @throws ApiError
|
|
930
|
+
*/
|
|
931
|
+
uploadFile(formData) {
|
|
932
|
+
return this.httpRequest.request({
|
|
933
|
+
method: "POST",
|
|
934
|
+
url: "/api/upload/file",
|
|
935
|
+
formData,
|
|
936
|
+
mediaType: "multipart/form-data",
|
|
937
|
+
errors: {
|
|
938
|
+
500: `Internal server error`
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
}
|
|
899
942
|
};
|
|
900
943
|
|
|
901
944
|
// src/services/OnboardingService.ts
|
|
@@ -1376,6 +1419,7 @@
|
|
|
1376
1419
|
authentication;
|
|
1377
1420
|
environmentTypes;
|
|
1378
1421
|
environmentVariables;
|
|
1422
|
+
fileUpload;
|
|
1379
1423
|
onboarding;
|
|
1380
1424
|
organizations;
|
|
1381
1425
|
roles;
|
|
@@ -1384,7 +1428,7 @@
|
|
|
1384
1428
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
1385
1429
|
this.request = new HttpRequest({
|
|
1386
1430
|
BASE: config?.BASE ?? "http://localhost:8600",
|
|
1387
|
-
VERSION: config?.VERSION ?? "0.2.
|
|
1431
|
+
VERSION: config?.VERSION ?? "0.2.2",
|
|
1388
1432
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
1389
1433
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
1390
1434
|
TOKEN: config?.TOKEN,
|
|
@@ -1400,6 +1444,7 @@
|
|
|
1400
1444
|
this.authentication = new AuthenticationService(this.request);
|
|
1401
1445
|
this.environmentTypes = new EnvironmentTypesService(this.request);
|
|
1402
1446
|
this.environmentVariables = new EnvironmentVariablesService(this.request);
|
|
1447
|
+
this.fileUpload = new FileUploadService(this.request);
|
|
1403
1448
|
this.onboarding = new OnboardingService(this.request);
|
|
1404
1449
|
this.organizations = new OrganizationsService(this.request);
|
|
1405
1450
|
this.roles = new RolesService(this.request);
|
|
@@ -1410,7 +1455,7 @@
|
|
|
1410
1455
|
// src/core/OpenAPI.ts
|
|
1411
1456
|
var OpenAPI = {
|
|
1412
1457
|
BASE: "http://localhost:8600",
|
|
1413
|
-
VERSION: "0.2.
|
|
1458
|
+
VERSION: "0.2.2",
|
|
1414
1459
|
WITH_CREDENTIALS: false,
|
|
1415
1460
|
CREDENTIALS: "include",
|
|
1416
1461
|
TOKEN: void 0,
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ __export(src_exports, {
|
|
|
32
32
|
EnvSyncAPISDK: () => EnvSyncAPISDK,
|
|
33
33
|
EnvironmentTypesService: () => EnvironmentTypesService,
|
|
34
34
|
EnvironmentVariablesService: () => EnvironmentVariablesService,
|
|
35
|
+
FileUploadService: () => FileUploadService,
|
|
35
36
|
OnboardingService: () => OnboardingService,
|
|
36
37
|
OpenAPI: () => OpenAPI,
|
|
37
38
|
OrganizationsService: () => OrganizationsService,
|
|
@@ -737,7 +738,7 @@ var AuditLogsService = class {
|
|
|
737
738
|
* @returns GetAuditLogsResponse Audit logs retrieved successfully
|
|
738
739
|
* @throws ApiError
|
|
739
740
|
*/
|
|
740
|
-
getAuditLogs(page = 1, perPage = 20) {
|
|
741
|
+
getAuditLogs(page = "1", perPage = "20") {
|
|
741
742
|
return this.httpRequest.request({
|
|
742
743
|
method: "GET",
|
|
743
744
|
url: "/api/audit_log",
|
|
@@ -879,20 +880,16 @@ var EnvironmentVariablesService = class {
|
|
|
879
880
|
});
|
|
880
881
|
}
|
|
881
882
|
/**
|
|
882
|
-
*
|
|
883
|
-
*
|
|
884
|
-
* @param key
|
|
883
|
+
* Create Environment Variable
|
|
884
|
+
* Create a new environment variable
|
|
885
885
|
* @param requestBody
|
|
886
|
-
* @returns EnvResponse Environment variable
|
|
886
|
+
* @returns EnvResponse Environment variable created successfully
|
|
887
887
|
* @throws ApiError
|
|
888
888
|
*/
|
|
889
|
-
|
|
889
|
+
createEnv(requestBody) {
|
|
890
890
|
return this.httpRequest.request({
|
|
891
|
-
method: "
|
|
892
|
-
url: "/api/env/
|
|
893
|
-
path: {
|
|
894
|
-
"key": key
|
|
895
|
-
},
|
|
891
|
+
method: "PUT",
|
|
892
|
+
url: "/api/env/single",
|
|
896
893
|
body: requestBody,
|
|
897
894
|
mediaType: "application/json",
|
|
898
895
|
errors: {
|
|
@@ -901,16 +898,16 @@ var EnvironmentVariablesService = class {
|
|
|
901
898
|
});
|
|
902
899
|
}
|
|
903
900
|
/**
|
|
904
|
-
* Create Environment
|
|
905
|
-
* Create a
|
|
901
|
+
* Batch Create Environment Variables
|
|
902
|
+
* Create multiple environment variables in a single request
|
|
906
903
|
* @param requestBody
|
|
907
|
-
* @returns
|
|
904
|
+
* @returns EnvsResponse Environment variables created successfully
|
|
908
905
|
* @throws ApiError
|
|
909
906
|
*/
|
|
910
|
-
|
|
907
|
+
batchCreateEnvs(requestBody) {
|
|
911
908
|
return this.httpRequest.request({
|
|
912
909
|
method: "PUT",
|
|
913
|
-
url: "/api/env/
|
|
910
|
+
url: "/api/env/batch",
|
|
914
911
|
body: requestBody,
|
|
915
912
|
mediaType: "application/json",
|
|
916
913
|
errors: {
|
|
@@ -919,15 +916,15 @@ var EnvironmentVariablesService = class {
|
|
|
919
916
|
});
|
|
920
917
|
}
|
|
921
918
|
/**
|
|
922
|
-
* Batch
|
|
923
|
-
*
|
|
919
|
+
* Batch Update Environment Variables
|
|
920
|
+
* Update multiple environment variables in a single request
|
|
924
921
|
* @param requestBody
|
|
925
|
-
* @returns EnvsResponse Environment variables
|
|
922
|
+
* @returns EnvsResponse Environment variables updated successfully
|
|
926
923
|
* @throws ApiError
|
|
927
924
|
*/
|
|
928
|
-
|
|
925
|
+
batchUpdateEnvs(requestBody) {
|
|
929
926
|
return this.httpRequest.request({
|
|
930
|
-
method: "
|
|
927
|
+
method: "PATCH",
|
|
931
928
|
url: "/api/env/batch",
|
|
932
929
|
body: requestBody,
|
|
933
930
|
mediaType: "application/json",
|
|
@@ -936,6 +933,53 @@ var EnvironmentVariablesService = class {
|
|
|
936
933
|
}
|
|
937
934
|
});
|
|
938
935
|
}
|
|
936
|
+
/**
|
|
937
|
+
* Update Environment Variable
|
|
938
|
+
* Update an existing environment variable
|
|
939
|
+
* @param key
|
|
940
|
+
* @param requestBody
|
|
941
|
+
* @returns EnvResponse Environment variable updated successfully
|
|
942
|
+
* @throws ApiError
|
|
943
|
+
*/
|
|
944
|
+
updateEnv(key, requestBody) {
|
|
945
|
+
return this.httpRequest.request({
|
|
946
|
+
method: "PATCH",
|
|
947
|
+
url: "/api/env/i/{key}",
|
|
948
|
+
path: {
|
|
949
|
+
"key": key
|
|
950
|
+
},
|
|
951
|
+
body: requestBody,
|
|
952
|
+
mediaType: "application/json",
|
|
953
|
+
errors: {
|
|
954
|
+
500: `Internal server error`
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
// src/services/FileUploadService.ts
|
|
961
|
+
var FileUploadService = class {
|
|
962
|
+
constructor(httpRequest) {
|
|
963
|
+
this.httpRequest = httpRequest;
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* Upload File
|
|
967
|
+
* Upload a file to the server. The file should be less than 5MB in size.
|
|
968
|
+
* @param formData
|
|
969
|
+
* @returns UploadFileResponse File uploaded successfully
|
|
970
|
+
* @throws ApiError
|
|
971
|
+
*/
|
|
972
|
+
uploadFile(formData) {
|
|
973
|
+
return this.httpRequest.request({
|
|
974
|
+
method: "POST",
|
|
975
|
+
url: "/api/upload/file",
|
|
976
|
+
formData,
|
|
977
|
+
mediaType: "multipart/form-data",
|
|
978
|
+
errors: {
|
|
979
|
+
500: `Internal server error`
|
|
980
|
+
}
|
|
981
|
+
});
|
|
982
|
+
}
|
|
939
983
|
};
|
|
940
984
|
|
|
941
985
|
// src/services/OnboardingService.ts
|
|
@@ -1416,6 +1460,7 @@ var EnvSyncAPISDK = class {
|
|
|
1416
1460
|
authentication;
|
|
1417
1461
|
environmentTypes;
|
|
1418
1462
|
environmentVariables;
|
|
1463
|
+
fileUpload;
|
|
1419
1464
|
onboarding;
|
|
1420
1465
|
organizations;
|
|
1421
1466
|
roles;
|
|
@@ -1424,7 +1469,7 @@ var EnvSyncAPISDK = class {
|
|
|
1424
1469
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
1425
1470
|
this.request = new HttpRequest({
|
|
1426
1471
|
BASE: config?.BASE ?? "http://localhost:8600",
|
|
1427
|
-
VERSION: config?.VERSION ?? "0.2.
|
|
1472
|
+
VERSION: config?.VERSION ?? "0.2.2",
|
|
1428
1473
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
1429
1474
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
1430
1475
|
TOKEN: config?.TOKEN,
|
|
@@ -1440,6 +1485,7 @@ var EnvSyncAPISDK = class {
|
|
|
1440
1485
|
this.authentication = new AuthenticationService(this.request);
|
|
1441
1486
|
this.environmentTypes = new EnvironmentTypesService(this.request);
|
|
1442
1487
|
this.environmentVariables = new EnvironmentVariablesService(this.request);
|
|
1488
|
+
this.fileUpload = new FileUploadService(this.request);
|
|
1443
1489
|
this.onboarding = new OnboardingService(this.request);
|
|
1444
1490
|
this.organizations = new OrganizationsService(this.request);
|
|
1445
1491
|
this.roles = new RolesService(this.request);
|
|
@@ -1450,7 +1496,7 @@ var EnvSyncAPISDK = class {
|
|
|
1450
1496
|
// src/core/OpenAPI.ts
|
|
1451
1497
|
var OpenAPI = {
|
|
1452
1498
|
BASE: "http://localhost:8600",
|
|
1453
|
-
VERSION: "0.2.
|
|
1499
|
+
VERSION: "0.2.2",
|
|
1454
1500
|
WITH_CREDENTIALS: false,
|
|
1455
1501
|
CREDENTIALS: "include",
|
|
1456
1502
|
TOKEN: void 0,
|
|
@@ -1473,6 +1519,7 @@ var OpenAPI = {
|
|
|
1473
1519
|
EnvSyncAPISDK,
|
|
1474
1520
|
EnvironmentTypesService,
|
|
1475
1521
|
EnvironmentVariablesService,
|
|
1522
|
+
FileUploadService,
|
|
1476
1523
|
OnboardingService,
|
|
1477
1524
|
OpenAPI,
|
|
1478
1525
|
OrganizationsService,
|
package/dist/index.mjs
CHANGED
|
@@ -695,7 +695,7 @@ var AuditLogsService = class {
|
|
|
695
695
|
* @returns GetAuditLogsResponse Audit logs retrieved successfully
|
|
696
696
|
* @throws ApiError
|
|
697
697
|
*/
|
|
698
|
-
getAuditLogs(page = 1, perPage = 20) {
|
|
698
|
+
getAuditLogs(page = "1", perPage = "20") {
|
|
699
699
|
return this.httpRequest.request({
|
|
700
700
|
method: "GET",
|
|
701
701
|
url: "/api/audit_log",
|
|
@@ -837,20 +837,16 @@ var EnvironmentVariablesService = class {
|
|
|
837
837
|
});
|
|
838
838
|
}
|
|
839
839
|
/**
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
* @param key
|
|
840
|
+
* Create Environment Variable
|
|
841
|
+
* Create a new environment variable
|
|
843
842
|
* @param requestBody
|
|
844
|
-
* @returns EnvResponse Environment variable
|
|
843
|
+
* @returns EnvResponse Environment variable created successfully
|
|
845
844
|
* @throws ApiError
|
|
846
845
|
*/
|
|
847
|
-
|
|
846
|
+
createEnv(requestBody) {
|
|
848
847
|
return this.httpRequest.request({
|
|
849
|
-
method: "
|
|
850
|
-
url: "/api/env/
|
|
851
|
-
path: {
|
|
852
|
-
"key": key
|
|
853
|
-
},
|
|
848
|
+
method: "PUT",
|
|
849
|
+
url: "/api/env/single",
|
|
854
850
|
body: requestBody,
|
|
855
851
|
mediaType: "application/json",
|
|
856
852
|
errors: {
|
|
@@ -859,16 +855,16 @@ var EnvironmentVariablesService = class {
|
|
|
859
855
|
});
|
|
860
856
|
}
|
|
861
857
|
/**
|
|
862
|
-
* Create Environment
|
|
863
|
-
* Create a
|
|
858
|
+
* Batch Create Environment Variables
|
|
859
|
+
* Create multiple environment variables in a single request
|
|
864
860
|
* @param requestBody
|
|
865
|
-
* @returns
|
|
861
|
+
* @returns EnvsResponse Environment variables created successfully
|
|
866
862
|
* @throws ApiError
|
|
867
863
|
*/
|
|
868
|
-
|
|
864
|
+
batchCreateEnvs(requestBody) {
|
|
869
865
|
return this.httpRequest.request({
|
|
870
866
|
method: "PUT",
|
|
871
|
-
url: "/api/env/
|
|
867
|
+
url: "/api/env/batch",
|
|
872
868
|
body: requestBody,
|
|
873
869
|
mediaType: "application/json",
|
|
874
870
|
errors: {
|
|
@@ -877,15 +873,15 @@ var EnvironmentVariablesService = class {
|
|
|
877
873
|
});
|
|
878
874
|
}
|
|
879
875
|
/**
|
|
880
|
-
* Batch
|
|
881
|
-
*
|
|
876
|
+
* Batch Update Environment Variables
|
|
877
|
+
* Update multiple environment variables in a single request
|
|
882
878
|
* @param requestBody
|
|
883
|
-
* @returns EnvsResponse Environment variables
|
|
879
|
+
* @returns EnvsResponse Environment variables updated successfully
|
|
884
880
|
* @throws ApiError
|
|
885
881
|
*/
|
|
886
|
-
|
|
882
|
+
batchUpdateEnvs(requestBody) {
|
|
887
883
|
return this.httpRequest.request({
|
|
888
|
-
method: "
|
|
884
|
+
method: "PATCH",
|
|
889
885
|
url: "/api/env/batch",
|
|
890
886
|
body: requestBody,
|
|
891
887
|
mediaType: "application/json",
|
|
@@ -894,6 +890,53 @@ var EnvironmentVariablesService = class {
|
|
|
894
890
|
}
|
|
895
891
|
});
|
|
896
892
|
}
|
|
893
|
+
/**
|
|
894
|
+
* Update Environment Variable
|
|
895
|
+
* Update an existing environment variable
|
|
896
|
+
* @param key
|
|
897
|
+
* @param requestBody
|
|
898
|
+
* @returns EnvResponse Environment variable updated successfully
|
|
899
|
+
* @throws ApiError
|
|
900
|
+
*/
|
|
901
|
+
updateEnv(key, requestBody) {
|
|
902
|
+
return this.httpRequest.request({
|
|
903
|
+
method: "PATCH",
|
|
904
|
+
url: "/api/env/i/{key}",
|
|
905
|
+
path: {
|
|
906
|
+
"key": key
|
|
907
|
+
},
|
|
908
|
+
body: requestBody,
|
|
909
|
+
mediaType: "application/json",
|
|
910
|
+
errors: {
|
|
911
|
+
500: `Internal server error`
|
|
912
|
+
}
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
// src/services/FileUploadService.ts
|
|
918
|
+
var FileUploadService = class {
|
|
919
|
+
constructor(httpRequest) {
|
|
920
|
+
this.httpRequest = httpRequest;
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* Upload File
|
|
924
|
+
* Upload a file to the server. The file should be less than 5MB in size.
|
|
925
|
+
* @param formData
|
|
926
|
+
* @returns UploadFileResponse File uploaded successfully
|
|
927
|
+
* @throws ApiError
|
|
928
|
+
*/
|
|
929
|
+
uploadFile(formData) {
|
|
930
|
+
return this.httpRequest.request({
|
|
931
|
+
method: "POST",
|
|
932
|
+
url: "/api/upload/file",
|
|
933
|
+
formData,
|
|
934
|
+
mediaType: "multipart/form-data",
|
|
935
|
+
errors: {
|
|
936
|
+
500: `Internal server error`
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
}
|
|
897
940
|
};
|
|
898
941
|
|
|
899
942
|
// src/services/OnboardingService.ts
|
|
@@ -1374,6 +1417,7 @@ var EnvSyncAPISDK = class {
|
|
|
1374
1417
|
authentication;
|
|
1375
1418
|
environmentTypes;
|
|
1376
1419
|
environmentVariables;
|
|
1420
|
+
fileUpload;
|
|
1377
1421
|
onboarding;
|
|
1378
1422
|
organizations;
|
|
1379
1423
|
roles;
|
|
@@ -1382,7 +1426,7 @@ var EnvSyncAPISDK = class {
|
|
|
1382
1426
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
1383
1427
|
this.request = new HttpRequest({
|
|
1384
1428
|
BASE: config?.BASE ?? "http://localhost:8600",
|
|
1385
|
-
VERSION: config?.VERSION ?? "0.2.
|
|
1429
|
+
VERSION: config?.VERSION ?? "0.2.2",
|
|
1386
1430
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
1387
1431
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
1388
1432
|
TOKEN: config?.TOKEN,
|
|
@@ -1398,6 +1442,7 @@ var EnvSyncAPISDK = class {
|
|
|
1398
1442
|
this.authentication = new AuthenticationService(this.request);
|
|
1399
1443
|
this.environmentTypes = new EnvironmentTypesService(this.request);
|
|
1400
1444
|
this.environmentVariables = new EnvironmentVariablesService(this.request);
|
|
1445
|
+
this.fileUpload = new FileUploadService(this.request);
|
|
1401
1446
|
this.onboarding = new OnboardingService(this.request);
|
|
1402
1447
|
this.organizations = new OrganizationsService(this.request);
|
|
1403
1448
|
this.roles = new RolesService(this.request);
|
|
@@ -1408,7 +1453,7 @@ var EnvSyncAPISDK = class {
|
|
|
1408
1453
|
// src/core/OpenAPI.ts
|
|
1409
1454
|
var OpenAPI = {
|
|
1410
1455
|
BASE: "http://localhost:8600",
|
|
1411
|
-
VERSION: "0.2.
|
|
1456
|
+
VERSION: "0.2.2",
|
|
1412
1457
|
WITH_CREDENTIALS: false,
|
|
1413
1458
|
CREDENTIALS: "include",
|
|
1414
1459
|
TOKEN: void 0,
|
|
@@ -1430,6 +1475,7 @@ export {
|
|
|
1430
1475
|
EnvSyncAPISDK,
|
|
1431
1476
|
EnvironmentTypesService,
|
|
1432
1477
|
EnvironmentVariablesService,
|
|
1478
|
+
FileUploadService,
|
|
1433
1479
|
OnboardingService,
|
|
1434
1480
|
OpenAPI,
|
|
1435
1481
|
OrganizationsService,
|