@envsync-cloud/envsync-ts-sdk 0.1.0 → 0.1.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 +68 -1
- package/dist/index.d.ts +68 -1
- package/dist/index.global.js +115 -2
- package/dist/index.js +117 -2
- package/dist/index.mjs +116 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -54,6 +54,72 @@ 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
|
+
* Create CLI Login URL
|
|
78
|
+
* Generate authentication URL for CLI login
|
|
79
|
+
* @returns LoginUrlResponse CLI login URL created successfully
|
|
80
|
+
* @throws ApiError
|
|
81
|
+
*/
|
|
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
|
+
/**
|
|
92
|
+
* Create Web Login URL
|
|
93
|
+
* Generate authentication URL for web login
|
|
94
|
+
* @returns LoginUrlResponse Web login URL created successfully
|
|
95
|
+
* @throws ApiError
|
|
96
|
+
*/
|
|
97
|
+
createWebLogin(): CancelablePromise<LoginUrlResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* Web Login Callback
|
|
100
|
+
* Handle web login callback from Auth0
|
|
101
|
+
* @param code
|
|
102
|
+
* @returns void
|
|
103
|
+
* @throws ApiError
|
|
104
|
+
*/
|
|
105
|
+
callbackWebLogin(code: string): CancelablePromise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Create API Login URL
|
|
108
|
+
* Generate authentication URL for API login
|
|
109
|
+
* @returns LoginUrlResponse API login URL created successfully
|
|
110
|
+
* @throws ApiError
|
|
111
|
+
*/
|
|
112
|
+
createApiLogin(): CancelablePromise<LoginUrlResponse>;
|
|
113
|
+
/**
|
|
114
|
+
* API Login Callback
|
|
115
|
+
* Handle API login callback from Auth0
|
|
116
|
+
* @param code
|
|
117
|
+
* @returns CallbackResponse API login callback successful
|
|
118
|
+
* @throws ApiError
|
|
119
|
+
*/
|
|
120
|
+
callbackApiLogin(code: string): CancelablePromise<CallbackResponse>;
|
|
121
|
+
}
|
|
122
|
+
|
|
57
123
|
type CreateAppRequest = {
|
|
58
124
|
name: string;
|
|
59
125
|
description: string;
|
|
@@ -666,6 +732,7 @@ declare class UsersService {
|
|
|
666
732
|
|
|
667
733
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
668
734
|
declare class EnvSyncAPISDK {
|
|
735
|
+
readonly access: AccessService;
|
|
669
736
|
readonly applications: ApplicationsService;
|
|
670
737
|
readonly auditLogs: AuditLogsService;
|
|
671
738
|
readonly authentication: AuthenticationService;
|
|
@@ -699,4 +766,4 @@ type ErrorResponse = {
|
|
|
699
766
|
error: string;
|
|
700
767
|
};
|
|
701
768
|
|
|
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 CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateUserInviteRequest, type CreateUserInviteResponse, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, 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, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgResponse, OrganizationsService, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdatePasswordRequest, type UpdateRoleRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, type UserResponse, type UsersResponse, UsersService, type WhoAmIResponse };
|
|
769
|
+
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, ApiError, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, type CallbackResponse, CancelError, CancelablePromise, type CheckSlugResponse, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateUserInviteRequest, type CreateUserInviteResponse, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, 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 UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, 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,72 @@ 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
|
+
* Create CLI Login URL
|
|
78
|
+
* Generate authentication URL for CLI login
|
|
79
|
+
* @returns LoginUrlResponse CLI login URL created successfully
|
|
80
|
+
* @throws ApiError
|
|
81
|
+
*/
|
|
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
|
+
/**
|
|
92
|
+
* Create Web Login URL
|
|
93
|
+
* Generate authentication URL for web login
|
|
94
|
+
* @returns LoginUrlResponse Web login URL created successfully
|
|
95
|
+
* @throws ApiError
|
|
96
|
+
*/
|
|
97
|
+
createWebLogin(): CancelablePromise<LoginUrlResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* Web Login Callback
|
|
100
|
+
* Handle web login callback from Auth0
|
|
101
|
+
* @param code
|
|
102
|
+
* @returns void
|
|
103
|
+
* @throws ApiError
|
|
104
|
+
*/
|
|
105
|
+
callbackWebLogin(code: string): CancelablePromise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Create API Login URL
|
|
108
|
+
* Generate authentication URL for API login
|
|
109
|
+
* @returns LoginUrlResponse API login URL created successfully
|
|
110
|
+
* @throws ApiError
|
|
111
|
+
*/
|
|
112
|
+
createApiLogin(): CancelablePromise<LoginUrlResponse>;
|
|
113
|
+
/**
|
|
114
|
+
* API Login Callback
|
|
115
|
+
* Handle API login callback from Auth0
|
|
116
|
+
* @param code
|
|
117
|
+
* @returns CallbackResponse API login callback successful
|
|
118
|
+
* @throws ApiError
|
|
119
|
+
*/
|
|
120
|
+
callbackApiLogin(code: string): CancelablePromise<CallbackResponse>;
|
|
121
|
+
}
|
|
122
|
+
|
|
57
123
|
type CreateAppRequest = {
|
|
58
124
|
name: string;
|
|
59
125
|
description: string;
|
|
@@ -666,6 +732,7 @@ declare class UsersService {
|
|
|
666
732
|
|
|
667
733
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
668
734
|
declare class EnvSyncAPISDK {
|
|
735
|
+
readonly access: AccessService;
|
|
669
736
|
readonly applications: ApplicationsService;
|
|
670
737
|
readonly auditLogs: AuditLogsService;
|
|
671
738
|
readonly authentication: AuthenticationService;
|
|
@@ -699,4 +766,4 @@ type ErrorResponse = {
|
|
|
699
766
|
error: string;
|
|
700
767
|
};
|
|
701
768
|
|
|
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 CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateUserInviteRequest, type CreateUserInviteResponse, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, 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, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgResponse, OrganizationsService, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdatePasswordRequest, type UpdateRoleRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, type UserResponse, type UsersResponse, UsersService, type WhoAmIResponse };
|
|
769
|
+
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, ApiError, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, type CallbackResponse, CancelError, CancelablePromise, type CheckSlugResponse, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateUserInviteRequest, type CreateUserInviteResponse, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, 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 UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdatePasswordRequest, type UpdateRoleRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, type UserResponse, type UsersResponse, UsersService, type WhoAmIResponse };
|
package/dist/index.global.js
CHANGED
|
@@ -374,6 +374,117 @@
|
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
376
|
|
|
377
|
+
// src/services/AccessService.ts
|
|
378
|
+
var AccessService = class {
|
|
379
|
+
constructor(httpRequest) {
|
|
380
|
+
this.httpRequest = httpRequest;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Create CLI Login URL
|
|
384
|
+
* Generate authentication URL for CLI login
|
|
385
|
+
* @returns LoginUrlResponse CLI login URL created successfully
|
|
386
|
+
* @throws ApiError
|
|
387
|
+
*/
|
|
388
|
+
createCliLogin() {
|
|
389
|
+
return this.httpRequest.request({
|
|
390
|
+
method: "GET",
|
|
391
|
+
url: "/api/access/cli",
|
|
392
|
+
errors: {
|
|
393
|
+
500: `Internal server error`
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* CLI Login Callback
|
|
399
|
+
* Handle CLI login callback from Auth0
|
|
400
|
+
* @param code
|
|
401
|
+
* @returns void
|
|
402
|
+
* @throws ApiError
|
|
403
|
+
*/
|
|
404
|
+
callbackCliLogin(code) {
|
|
405
|
+
return this.httpRequest.request({
|
|
406
|
+
method: "GET",
|
|
407
|
+
url: "/api/access/cli/callback",
|
|
408
|
+
query: {
|
|
409
|
+
"code": code
|
|
410
|
+
},
|
|
411
|
+
errors: {
|
|
412
|
+
302: `Redirect with authentication token`,
|
|
413
|
+
500: `Internal server error`
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Create Web Login URL
|
|
419
|
+
* Generate authentication URL for web login
|
|
420
|
+
* @returns LoginUrlResponse Web login URL created successfully
|
|
421
|
+
* @throws ApiError
|
|
422
|
+
*/
|
|
423
|
+
createWebLogin() {
|
|
424
|
+
return this.httpRequest.request({
|
|
425
|
+
method: "GET",
|
|
426
|
+
url: "/api/access/web",
|
|
427
|
+
errors: {
|
|
428
|
+
500: `Internal server error`
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Web Login Callback
|
|
434
|
+
* Handle web login callback from Auth0
|
|
435
|
+
* @param code
|
|
436
|
+
* @returns void
|
|
437
|
+
* @throws ApiError
|
|
438
|
+
*/
|
|
439
|
+
callbackWebLogin(code) {
|
|
440
|
+
return this.httpRequest.request({
|
|
441
|
+
method: "GET",
|
|
442
|
+
url: "/api/access/web/callback",
|
|
443
|
+
query: {
|
|
444
|
+
"code": code
|
|
445
|
+
},
|
|
446
|
+
errors: {
|
|
447
|
+
302: `Redirect with authentication token`,
|
|
448
|
+
500: `Internal server error`
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Create API Login URL
|
|
454
|
+
* Generate authentication URL for API login
|
|
455
|
+
* @returns LoginUrlResponse API login URL created successfully
|
|
456
|
+
* @throws ApiError
|
|
457
|
+
*/
|
|
458
|
+
createApiLogin() {
|
|
459
|
+
return this.httpRequest.request({
|
|
460
|
+
method: "GET",
|
|
461
|
+
url: "/api/access/api",
|
|
462
|
+
errors: {
|
|
463
|
+
500: `Internal server error`
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* API Login Callback
|
|
469
|
+
* Handle API login callback from Auth0
|
|
470
|
+
* @param code
|
|
471
|
+
* @returns CallbackResponse API login callback successful
|
|
472
|
+
* @throws ApiError
|
|
473
|
+
*/
|
|
474
|
+
callbackApiLogin(code) {
|
|
475
|
+
return this.httpRequest.request({
|
|
476
|
+
method: "GET",
|
|
477
|
+
url: "/api/access/api/callback",
|
|
478
|
+
query: {
|
|
479
|
+
"code": code
|
|
480
|
+
},
|
|
481
|
+
errors: {
|
|
482
|
+
500: `Internal server error`
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
|
|
377
488
|
// src/services/ApplicationsService.ts
|
|
378
489
|
var ApplicationsService = class {
|
|
379
490
|
constructor(httpRequest) {
|
|
@@ -1103,6 +1214,7 @@
|
|
|
1103
1214
|
|
|
1104
1215
|
// src/EnvSyncAPISDK.ts
|
|
1105
1216
|
var EnvSyncAPISDK = class {
|
|
1217
|
+
access;
|
|
1106
1218
|
applications;
|
|
1107
1219
|
auditLogs;
|
|
1108
1220
|
authentication;
|
|
@@ -1115,7 +1227,7 @@
|
|
|
1115
1227
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
1116
1228
|
this.request = new HttpRequest({
|
|
1117
1229
|
BASE: config?.BASE ?? "http://localhost:8600",
|
|
1118
|
-
VERSION: config?.VERSION ?? "0.
|
|
1230
|
+
VERSION: config?.VERSION ?? "0.1.1",
|
|
1119
1231
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
1120
1232
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
1121
1233
|
TOKEN: config?.TOKEN,
|
|
@@ -1124,6 +1236,7 @@
|
|
|
1124
1236
|
HEADERS: config?.HEADERS,
|
|
1125
1237
|
ENCODE_PATH: config?.ENCODE_PATH
|
|
1126
1238
|
});
|
|
1239
|
+
this.access = new AccessService(this.request);
|
|
1127
1240
|
this.applications = new ApplicationsService(this.request);
|
|
1128
1241
|
this.auditLogs = new AuditLogsService(this.request);
|
|
1129
1242
|
this.authentication = new AuthenticationService(this.request);
|
|
@@ -1138,7 +1251,7 @@
|
|
|
1138
1251
|
// src/core/OpenAPI.ts
|
|
1139
1252
|
var OpenAPI = {
|
|
1140
1253
|
BASE: "http://localhost:8600",
|
|
1141
|
-
VERSION: "0.
|
|
1254
|
+
VERSION: "0.1.1",
|
|
1142
1255
|
WITH_CREDENTIALS: false,
|
|
1143
1256
|
CREDENTIALS: "include",
|
|
1144
1257
|
TOKEN: void 0,
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
|
+
AccessService: () => AccessService,
|
|
23
24
|
ApiError: () => ApiError,
|
|
24
25
|
ApplicationsService: () => ApplicationsService,
|
|
25
26
|
AuditLogsService: () => AuditLogsService,
|
|
@@ -411,6 +412,117 @@ var FetchHttpRequest = class extends BaseHttpRequest {
|
|
|
411
412
|
}
|
|
412
413
|
};
|
|
413
414
|
|
|
415
|
+
// src/services/AccessService.ts
|
|
416
|
+
var AccessService = class {
|
|
417
|
+
constructor(httpRequest) {
|
|
418
|
+
this.httpRequest = httpRequest;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Create CLI Login URL
|
|
422
|
+
* Generate authentication URL for CLI login
|
|
423
|
+
* @returns LoginUrlResponse CLI login URL created successfully
|
|
424
|
+
* @throws ApiError
|
|
425
|
+
*/
|
|
426
|
+
createCliLogin() {
|
|
427
|
+
return this.httpRequest.request({
|
|
428
|
+
method: "GET",
|
|
429
|
+
url: "/api/access/cli",
|
|
430
|
+
errors: {
|
|
431
|
+
500: `Internal server error`
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* CLI Login Callback
|
|
437
|
+
* Handle CLI login callback from Auth0
|
|
438
|
+
* @param code
|
|
439
|
+
* @returns void
|
|
440
|
+
* @throws ApiError
|
|
441
|
+
*/
|
|
442
|
+
callbackCliLogin(code) {
|
|
443
|
+
return this.httpRequest.request({
|
|
444
|
+
method: "GET",
|
|
445
|
+
url: "/api/access/cli/callback",
|
|
446
|
+
query: {
|
|
447
|
+
"code": code
|
|
448
|
+
},
|
|
449
|
+
errors: {
|
|
450
|
+
302: `Redirect with authentication token`,
|
|
451
|
+
500: `Internal server error`
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Create Web Login URL
|
|
457
|
+
* Generate authentication URL for web login
|
|
458
|
+
* @returns LoginUrlResponse Web login URL created successfully
|
|
459
|
+
* @throws ApiError
|
|
460
|
+
*/
|
|
461
|
+
createWebLogin() {
|
|
462
|
+
return this.httpRequest.request({
|
|
463
|
+
method: "GET",
|
|
464
|
+
url: "/api/access/web",
|
|
465
|
+
errors: {
|
|
466
|
+
500: `Internal server error`
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Web Login Callback
|
|
472
|
+
* Handle web login callback from Auth0
|
|
473
|
+
* @param code
|
|
474
|
+
* @returns void
|
|
475
|
+
* @throws ApiError
|
|
476
|
+
*/
|
|
477
|
+
callbackWebLogin(code) {
|
|
478
|
+
return this.httpRequest.request({
|
|
479
|
+
method: "GET",
|
|
480
|
+
url: "/api/access/web/callback",
|
|
481
|
+
query: {
|
|
482
|
+
"code": code
|
|
483
|
+
},
|
|
484
|
+
errors: {
|
|
485
|
+
302: `Redirect with authentication token`,
|
|
486
|
+
500: `Internal server error`
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Create API Login URL
|
|
492
|
+
* Generate authentication URL for API login
|
|
493
|
+
* @returns LoginUrlResponse API login URL created successfully
|
|
494
|
+
* @throws ApiError
|
|
495
|
+
*/
|
|
496
|
+
createApiLogin() {
|
|
497
|
+
return this.httpRequest.request({
|
|
498
|
+
method: "GET",
|
|
499
|
+
url: "/api/access/api",
|
|
500
|
+
errors: {
|
|
501
|
+
500: `Internal server error`
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* API Login Callback
|
|
507
|
+
* Handle API login callback from Auth0
|
|
508
|
+
* @param code
|
|
509
|
+
* @returns CallbackResponse API login callback successful
|
|
510
|
+
* @throws ApiError
|
|
511
|
+
*/
|
|
512
|
+
callbackApiLogin(code) {
|
|
513
|
+
return this.httpRequest.request({
|
|
514
|
+
method: "GET",
|
|
515
|
+
url: "/api/access/api/callback",
|
|
516
|
+
query: {
|
|
517
|
+
"code": code
|
|
518
|
+
},
|
|
519
|
+
errors: {
|
|
520
|
+
500: `Internal server error`
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
|
|
414
526
|
// src/services/ApplicationsService.ts
|
|
415
527
|
var ApplicationsService = class {
|
|
416
528
|
constructor(httpRequest) {
|
|
@@ -1140,6 +1252,7 @@ var UsersService = class {
|
|
|
1140
1252
|
|
|
1141
1253
|
// src/EnvSyncAPISDK.ts
|
|
1142
1254
|
var EnvSyncAPISDK = class {
|
|
1255
|
+
access;
|
|
1143
1256
|
applications;
|
|
1144
1257
|
auditLogs;
|
|
1145
1258
|
authentication;
|
|
@@ -1152,7 +1265,7 @@ var EnvSyncAPISDK = class {
|
|
|
1152
1265
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
1153
1266
|
this.request = new HttpRequest({
|
|
1154
1267
|
BASE: config?.BASE ?? "http://localhost:8600",
|
|
1155
|
-
VERSION: config?.VERSION ?? "0.
|
|
1268
|
+
VERSION: config?.VERSION ?? "0.1.1",
|
|
1156
1269
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
1157
1270
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
1158
1271
|
TOKEN: config?.TOKEN,
|
|
@@ -1161,6 +1274,7 @@ var EnvSyncAPISDK = class {
|
|
|
1161
1274
|
HEADERS: config?.HEADERS,
|
|
1162
1275
|
ENCODE_PATH: config?.ENCODE_PATH
|
|
1163
1276
|
});
|
|
1277
|
+
this.access = new AccessService(this.request);
|
|
1164
1278
|
this.applications = new ApplicationsService(this.request);
|
|
1165
1279
|
this.auditLogs = new AuditLogsService(this.request);
|
|
1166
1280
|
this.authentication = new AuthenticationService(this.request);
|
|
@@ -1175,7 +1289,7 @@ var EnvSyncAPISDK = class {
|
|
|
1175
1289
|
// src/core/OpenAPI.ts
|
|
1176
1290
|
var OpenAPI = {
|
|
1177
1291
|
BASE: "http://localhost:8600",
|
|
1178
|
-
VERSION: "0.
|
|
1292
|
+
VERSION: "0.1.1",
|
|
1179
1293
|
WITH_CREDENTIALS: false,
|
|
1180
1294
|
CREDENTIALS: "include",
|
|
1181
1295
|
TOKEN: void 0,
|
|
@@ -1186,6 +1300,7 @@ var OpenAPI = {
|
|
|
1186
1300
|
};
|
|
1187
1301
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1188
1302
|
0 && (module.exports = {
|
|
1303
|
+
AccessService,
|
|
1189
1304
|
ApiError,
|
|
1190
1305
|
ApplicationsService,
|
|
1191
1306
|
AuditLogsService,
|
package/dist/index.mjs
CHANGED
|
@@ -372,6 +372,117 @@ var FetchHttpRequest = class extends BaseHttpRequest {
|
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
|
|
375
|
+
// src/services/AccessService.ts
|
|
376
|
+
var AccessService = class {
|
|
377
|
+
constructor(httpRequest) {
|
|
378
|
+
this.httpRequest = httpRequest;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Create CLI Login URL
|
|
382
|
+
* Generate authentication URL for CLI login
|
|
383
|
+
* @returns LoginUrlResponse CLI login URL created successfully
|
|
384
|
+
* @throws ApiError
|
|
385
|
+
*/
|
|
386
|
+
createCliLogin() {
|
|
387
|
+
return this.httpRequest.request({
|
|
388
|
+
method: "GET",
|
|
389
|
+
url: "/api/access/cli",
|
|
390
|
+
errors: {
|
|
391
|
+
500: `Internal server error`
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* CLI Login Callback
|
|
397
|
+
* Handle CLI login callback from Auth0
|
|
398
|
+
* @param code
|
|
399
|
+
* @returns void
|
|
400
|
+
* @throws ApiError
|
|
401
|
+
*/
|
|
402
|
+
callbackCliLogin(code) {
|
|
403
|
+
return this.httpRequest.request({
|
|
404
|
+
method: "GET",
|
|
405
|
+
url: "/api/access/cli/callback",
|
|
406
|
+
query: {
|
|
407
|
+
"code": code
|
|
408
|
+
},
|
|
409
|
+
errors: {
|
|
410
|
+
302: `Redirect with authentication token`,
|
|
411
|
+
500: `Internal server error`
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Create Web Login URL
|
|
417
|
+
* Generate authentication URL for web login
|
|
418
|
+
* @returns LoginUrlResponse Web login URL created successfully
|
|
419
|
+
* @throws ApiError
|
|
420
|
+
*/
|
|
421
|
+
createWebLogin() {
|
|
422
|
+
return this.httpRequest.request({
|
|
423
|
+
method: "GET",
|
|
424
|
+
url: "/api/access/web",
|
|
425
|
+
errors: {
|
|
426
|
+
500: `Internal server error`
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Web Login Callback
|
|
432
|
+
* Handle web login callback from Auth0
|
|
433
|
+
* @param code
|
|
434
|
+
* @returns void
|
|
435
|
+
* @throws ApiError
|
|
436
|
+
*/
|
|
437
|
+
callbackWebLogin(code) {
|
|
438
|
+
return this.httpRequest.request({
|
|
439
|
+
method: "GET",
|
|
440
|
+
url: "/api/access/web/callback",
|
|
441
|
+
query: {
|
|
442
|
+
"code": code
|
|
443
|
+
},
|
|
444
|
+
errors: {
|
|
445
|
+
302: `Redirect with authentication token`,
|
|
446
|
+
500: `Internal server error`
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Create API Login URL
|
|
452
|
+
* Generate authentication URL for API login
|
|
453
|
+
* @returns LoginUrlResponse API login URL created successfully
|
|
454
|
+
* @throws ApiError
|
|
455
|
+
*/
|
|
456
|
+
createApiLogin() {
|
|
457
|
+
return this.httpRequest.request({
|
|
458
|
+
method: "GET",
|
|
459
|
+
url: "/api/access/api",
|
|
460
|
+
errors: {
|
|
461
|
+
500: `Internal server error`
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* API Login Callback
|
|
467
|
+
* Handle API login callback from Auth0
|
|
468
|
+
* @param code
|
|
469
|
+
* @returns CallbackResponse API login callback successful
|
|
470
|
+
* @throws ApiError
|
|
471
|
+
*/
|
|
472
|
+
callbackApiLogin(code) {
|
|
473
|
+
return this.httpRequest.request({
|
|
474
|
+
method: "GET",
|
|
475
|
+
url: "/api/access/api/callback",
|
|
476
|
+
query: {
|
|
477
|
+
"code": code
|
|
478
|
+
},
|
|
479
|
+
errors: {
|
|
480
|
+
500: `Internal server error`
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
|
|
375
486
|
// src/services/ApplicationsService.ts
|
|
376
487
|
var ApplicationsService = class {
|
|
377
488
|
constructor(httpRequest) {
|
|
@@ -1101,6 +1212,7 @@ var UsersService = class {
|
|
|
1101
1212
|
|
|
1102
1213
|
// src/EnvSyncAPISDK.ts
|
|
1103
1214
|
var EnvSyncAPISDK = class {
|
|
1215
|
+
access;
|
|
1104
1216
|
applications;
|
|
1105
1217
|
auditLogs;
|
|
1106
1218
|
authentication;
|
|
@@ -1113,7 +1225,7 @@ var EnvSyncAPISDK = class {
|
|
|
1113
1225
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
1114
1226
|
this.request = new HttpRequest({
|
|
1115
1227
|
BASE: config?.BASE ?? "http://localhost:8600",
|
|
1116
|
-
VERSION: config?.VERSION ?? "0.
|
|
1228
|
+
VERSION: config?.VERSION ?? "0.1.1",
|
|
1117
1229
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
1118
1230
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
1119
1231
|
TOKEN: config?.TOKEN,
|
|
@@ -1122,6 +1234,7 @@ var EnvSyncAPISDK = class {
|
|
|
1122
1234
|
HEADERS: config?.HEADERS,
|
|
1123
1235
|
ENCODE_PATH: config?.ENCODE_PATH
|
|
1124
1236
|
});
|
|
1237
|
+
this.access = new AccessService(this.request);
|
|
1125
1238
|
this.applications = new ApplicationsService(this.request);
|
|
1126
1239
|
this.auditLogs = new AuditLogsService(this.request);
|
|
1127
1240
|
this.authentication = new AuthenticationService(this.request);
|
|
@@ -1136,7 +1249,7 @@ var EnvSyncAPISDK = class {
|
|
|
1136
1249
|
// src/core/OpenAPI.ts
|
|
1137
1250
|
var OpenAPI = {
|
|
1138
1251
|
BASE: "http://localhost:8600",
|
|
1139
|
-
VERSION: "0.
|
|
1252
|
+
VERSION: "0.1.1",
|
|
1140
1253
|
WITH_CREDENTIALS: false,
|
|
1141
1254
|
CREDENTIALS: "include",
|
|
1142
1255
|
TOKEN: void 0,
|
|
@@ -1146,6 +1259,7 @@ var OpenAPI = {
|
|
|
1146
1259
|
ENCODE_PATH: void 0
|
|
1147
1260
|
};
|
|
1148
1261
|
export {
|
|
1262
|
+
AccessService,
|
|
1149
1263
|
ApiError,
|
|
1150
1264
|
ApplicationsService,
|
|
1151
1265
|
AuditLogsService,
|