@envsync-cloud/envsync-ts-sdk 0.3.1 → 0.3.6
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 +118 -1
- package/dist/index.d.ts +118 -1
- package/dist/index.global.js +152 -2
- package/dist/index.js +162 -4
- package/dist/index.mjs +157 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -658,6 +658,7 @@ type EnvPitStateResponse = Array<{
|
|
|
658
658
|
key: string;
|
|
659
659
|
value: string;
|
|
660
660
|
last_updated: string;
|
|
661
|
+
operation: 'CREATE' | 'UPDATE' | 'DELETE';
|
|
661
662
|
}>;
|
|
662
663
|
|
|
663
664
|
type EnvTimestampRequest = {
|
|
@@ -1575,6 +1576,121 @@ declare class UsersService {
|
|
|
1575
1576
|
updatePassword(id: string): CancelablePromise<UserResponse>;
|
|
1576
1577
|
}
|
|
1577
1578
|
|
|
1579
|
+
type CreateWebhookRequest = {
|
|
1580
|
+
name: string;
|
|
1581
|
+
url: string;
|
|
1582
|
+
event_types: Array<string>;
|
|
1583
|
+
webhook_type: CreateWebhookRequest.webhook_type;
|
|
1584
|
+
linked_to?: CreateWebhookRequest.linked_to;
|
|
1585
|
+
app_id?: string;
|
|
1586
|
+
};
|
|
1587
|
+
declare namespace CreateWebhookRequest {
|
|
1588
|
+
enum webhook_type {
|
|
1589
|
+
DISCORD = "DISCORD",
|
|
1590
|
+
SLACK = "SLACK",
|
|
1591
|
+
CUSTOM = "CUSTOM"
|
|
1592
|
+
}
|
|
1593
|
+
enum linked_to {
|
|
1594
|
+
ORG = "org",
|
|
1595
|
+
APP = "app"
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
type UpdateWebhookRequest = {
|
|
1600
|
+
name?: string;
|
|
1601
|
+
url?: string;
|
|
1602
|
+
event_types?: Array<string>;
|
|
1603
|
+
is_active?: boolean;
|
|
1604
|
+
webhook_type?: UpdateWebhookRequest.webhook_type;
|
|
1605
|
+
app_id?: string;
|
|
1606
|
+
linked_to?: UpdateWebhookRequest.linked_to;
|
|
1607
|
+
};
|
|
1608
|
+
declare namespace UpdateWebhookRequest {
|
|
1609
|
+
enum webhook_type {
|
|
1610
|
+
DISCORD = "DISCORD",
|
|
1611
|
+
SLACK = "SLACK",
|
|
1612
|
+
CUSTOM = "CUSTOM"
|
|
1613
|
+
}
|
|
1614
|
+
enum linked_to {
|
|
1615
|
+
ORG = "org",
|
|
1616
|
+
APP = "app"
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
type WebhookResponse = {
|
|
1621
|
+
id: string;
|
|
1622
|
+
name: string;
|
|
1623
|
+
org_id: string;
|
|
1624
|
+
user_id: string;
|
|
1625
|
+
url: string;
|
|
1626
|
+
event_types: Array<string>;
|
|
1627
|
+
is_active: boolean;
|
|
1628
|
+
webhook_type: WebhookResponse.webhook_type;
|
|
1629
|
+
app_id: string | null;
|
|
1630
|
+
linked_to: WebhookResponse.linked_to;
|
|
1631
|
+
created_at: string;
|
|
1632
|
+
updated_at: string;
|
|
1633
|
+
last_triggered_at: string | null;
|
|
1634
|
+
};
|
|
1635
|
+
declare namespace WebhookResponse {
|
|
1636
|
+
enum webhook_type {
|
|
1637
|
+
DISCORD = "DISCORD",
|
|
1638
|
+
SLACK = "SLACK",
|
|
1639
|
+
CUSTOM = "CUSTOM"
|
|
1640
|
+
}
|
|
1641
|
+
enum linked_to {
|
|
1642
|
+
ORG = "org",
|
|
1643
|
+
APP = "app"
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
type WebhooksResponse = Array<WebhookResponse>;
|
|
1648
|
+
|
|
1649
|
+
declare class WebhooksService {
|
|
1650
|
+
readonly httpRequest: BaseHttpRequest;
|
|
1651
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
1652
|
+
/**
|
|
1653
|
+
* Create Webhook
|
|
1654
|
+
* Create a new webhook for the organization
|
|
1655
|
+
* @param requestBody
|
|
1656
|
+
* @returns WebhookResponse Webhook created successfully
|
|
1657
|
+
* @throws ApiError
|
|
1658
|
+
*/
|
|
1659
|
+
createWebhook(requestBody?: CreateWebhookRequest): CancelablePromise<WebhookResponse>;
|
|
1660
|
+
/**
|
|
1661
|
+
* Get All Webhooks
|
|
1662
|
+
* Retrieve all webhooks for the organization
|
|
1663
|
+
* @returns WebhooksResponse Webhooks retrieved successfully
|
|
1664
|
+
* @throws ApiError
|
|
1665
|
+
*/
|
|
1666
|
+
getWebhooks(): CancelablePromise<WebhooksResponse>;
|
|
1667
|
+
/**
|
|
1668
|
+
* Get Webhook
|
|
1669
|
+
* Retrieve a specific webhook
|
|
1670
|
+
* @param id
|
|
1671
|
+
* @returns WebhookResponse Webhook retrieved successfully
|
|
1672
|
+
* @throws ApiError
|
|
1673
|
+
*/
|
|
1674
|
+
getWebhook(id: string): CancelablePromise<WebhookResponse>;
|
|
1675
|
+
/**
|
|
1676
|
+
* Update Webhook
|
|
1677
|
+
* Update an existing webhook
|
|
1678
|
+
* @param id
|
|
1679
|
+
* @param requestBody
|
|
1680
|
+
* @returns WebhookResponse Webhook updated successfully
|
|
1681
|
+
* @throws ApiError
|
|
1682
|
+
*/
|
|
1683
|
+
updateWebhook(id: string, requestBody?: UpdateWebhookRequest): CancelablePromise<WebhookResponse>;
|
|
1684
|
+
/**
|
|
1685
|
+
* Delete Webhook
|
|
1686
|
+
* Delete an existing webhook
|
|
1687
|
+
* @param id
|
|
1688
|
+
* @returns WebhookResponse Webhook deleted successfully
|
|
1689
|
+
* @throws ApiError
|
|
1690
|
+
*/
|
|
1691
|
+
deleteWebhook(id: string): CancelablePromise<WebhookResponse>;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1578
1694
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
1579
1695
|
declare class EnvSyncAPISDK {
|
|
1580
1696
|
readonly access: AccessService;
|
|
@@ -1594,6 +1710,7 @@ declare class EnvSyncAPISDK {
|
|
|
1594
1710
|
readonly secretsPointInTime: SecretsPointInTimeService;
|
|
1595
1711
|
readonly secretsRollback: SecretsRollbackService;
|
|
1596
1712
|
readonly users: UsersService;
|
|
1713
|
+
readonly webhooks: WebhooksService;
|
|
1597
1714
|
readonly request: BaseHttpRequest;
|
|
1598
1715
|
constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
|
|
1599
1716
|
}
|
|
@@ -1623,4 +1740,4 @@ type UploadFileError = {
|
|
|
1623
1740
|
error: string;
|
|
1624
1741
|
};
|
|
1625
1742
|
|
|
1626
|
-
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, type BatchCreateSecretsRequest, type BatchDeleteEnvsRequest, type BatchDeleteSecretsRequest, type BatchEnvsResponse, type BatchSecretsResponse, type CallbackResponse, CancelError, CancelablePromise, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateSecretRequest, type CreateUserInviteRequest, type CreateUserInviteResponse, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, type DeleteSecretRequest, type DeleteUserInviteResponse, type EnvDiffRequest, type EnvDiffResponse, type EnvHistoryRequest, type EnvHistoryResponse, type EnvPitRequest, type EnvPitStateResponse, type EnvResponse, EnvSyncAPISDK, type EnvTimestampRequest, type EnvTypeResponse, type EnvTypesResponse, EnvironmentTypesService, EnvironmentVariablesPointInTimeService, EnvironmentVariablesRollbackService, EnvironmentVariablesService, type EnvsResponse, type ErrorResponse, FileUploadService, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetAuditLogsResponseWrapper, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetSecretRequest, type GetUserInviteByTokenResponse, type LoginUrlResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgResponse, OrganizationsService, type RegenerateApiKeyResponse, type RevealSecretsRequest, type RevealSecretsResponse, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type RollbackResponse, type RollbackSecretsResponse, type RollbackSecretsToPitRequest, type RollbackSecretsToTimestampRequest, type RollbackToPitRequest, type RollbackToTimestampRequest, type SecretDiffRequest, type SecretDiffResponse, type SecretHistoryRequest, type SecretHistoryResponse, type SecretPitRequest, type SecretPitStateResponse, type SecretResponse, type SecretTimestampRequest, SecretVariableRollbackResponse, type SecretVariableRollbackToPitRequest, type SecretVariableRollbackToTimestampRequest, type SecretVariableTimelineRequest, type SecretVariableTimelineResponse, SecretsPointInTimeService, type SecretsResponse, SecretsRollbackService, SecretsService, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdateRoleRequest, type UpdateSecretRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, type UploadFileError, type UploadFileResponse, type UserResponse, type UsersResponse, UsersService, VariableRollbackResponse, type VariableRollbackToPitRequest, type VariableRollbackToTimestampRequest, type VariableTimelineRequest, type VariableTimelineResponse, type WhoAmIResponse };
|
|
1743
|
+
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, type BatchCreateSecretsRequest, type BatchDeleteEnvsRequest, type BatchDeleteSecretsRequest, type BatchEnvsResponse, type BatchSecretsResponse, type CallbackResponse, CancelError, CancelablePromise, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateSecretRequest, type CreateUserInviteRequest, type CreateUserInviteResponse, CreateWebhookRequest, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, type DeleteSecretRequest, type DeleteUserInviteResponse, type EnvDiffRequest, type EnvDiffResponse, type EnvHistoryRequest, type EnvHistoryResponse, type EnvPitRequest, type EnvPitStateResponse, type EnvResponse, EnvSyncAPISDK, type EnvTimestampRequest, type EnvTypeResponse, type EnvTypesResponse, EnvironmentTypesService, EnvironmentVariablesPointInTimeService, EnvironmentVariablesRollbackService, EnvironmentVariablesService, type EnvsResponse, type ErrorResponse, FileUploadService, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetAuditLogsResponseWrapper, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetSecretRequest, type GetUserInviteByTokenResponse, type LoginUrlResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgResponse, OrganizationsService, type RegenerateApiKeyResponse, type RevealSecretsRequest, type RevealSecretsResponse, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type RollbackResponse, type RollbackSecretsResponse, type RollbackSecretsToPitRequest, type RollbackSecretsToTimestampRequest, type RollbackToPitRequest, type RollbackToTimestampRequest, type SecretDiffRequest, type SecretDiffResponse, type SecretHistoryRequest, type SecretHistoryResponse, type SecretPitRequest, type SecretPitStateResponse, type SecretResponse, type SecretTimestampRequest, SecretVariableRollbackResponse, type SecretVariableRollbackToPitRequest, type SecretVariableRollbackToTimestampRequest, type SecretVariableTimelineRequest, type SecretVariableTimelineResponse, SecretsPointInTimeService, type SecretsResponse, SecretsRollbackService, SecretsService, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdateRoleRequest, type UpdateSecretRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, UpdateWebhookRequest, type UploadFileError, type UploadFileResponse, type UserResponse, type UsersResponse, UsersService, VariableRollbackResponse, type VariableRollbackToPitRequest, type VariableRollbackToTimestampRequest, type VariableTimelineRequest, type VariableTimelineResponse, WebhookResponse, type WebhooksResponse, WebhooksService, type WhoAmIResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -658,6 +658,7 @@ type EnvPitStateResponse = Array<{
|
|
|
658
658
|
key: string;
|
|
659
659
|
value: string;
|
|
660
660
|
last_updated: string;
|
|
661
|
+
operation: 'CREATE' | 'UPDATE' | 'DELETE';
|
|
661
662
|
}>;
|
|
662
663
|
|
|
663
664
|
type EnvTimestampRequest = {
|
|
@@ -1575,6 +1576,121 @@ declare class UsersService {
|
|
|
1575
1576
|
updatePassword(id: string): CancelablePromise<UserResponse>;
|
|
1576
1577
|
}
|
|
1577
1578
|
|
|
1579
|
+
type CreateWebhookRequest = {
|
|
1580
|
+
name: string;
|
|
1581
|
+
url: string;
|
|
1582
|
+
event_types: Array<string>;
|
|
1583
|
+
webhook_type: CreateWebhookRequest.webhook_type;
|
|
1584
|
+
linked_to?: CreateWebhookRequest.linked_to;
|
|
1585
|
+
app_id?: string;
|
|
1586
|
+
};
|
|
1587
|
+
declare namespace CreateWebhookRequest {
|
|
1588
|
+
enum webhook_type {
|
|
1589
|
+
DISCORD = "DISCORD",
|
|
1590
|
+
SLACK = "SLACK",
|
|
1591
|
+
CUSTOM = "CUSTOM"
|
|
1592
|
+
}
|
|
1593
|
+
enum linked_to {
|
|
1594
|
+
ORG = "org",
|
|
1595
|
+
APP = "app"
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
type UpdateWebhookRequest = {
|
|
1600
|
+
name?: string;
|
|
1601
|
+
url?: string;
|
|
1602
|
+
event_types?: Array<string>;
|
|
1603
|
+
is_active?: boolean;
|
|
1604
|
+
webhook_type?: UpdateWebhookRequest.webhook_type;
|
|
1605
|
+
app_id?: string;
|
|
1606
|
+
linked_to?: UpdateWebhookRequest.linked_to;
|
|
1607
|
+
};
|
|
1608
|
+
declare namespace UpdateWebhookRequest {
|
|
1609
|
+
enum webhook_type {
|
|
1610
|
+
DISCORD = "DISCORD",
|
|
1611
|
+
SLACK = "SLACK",
|
|
1612
|
+
CUSTOM = "CUSTOM"
|
|
1613
|
+
}
|
|
1614
|
+
enum linked_to {
|
|
1615
|
+
ORG = "org",
|
|
1616
|
+
APP = "app"
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
type WebhookResponse = {
|
|
1621
|
+
id: string;
|
|
1622
|
+
name: string;
|
|
1623
|
+
org_id: string;
|
|
1624
|
+
user_id: string;
|
|
1625
|
+
url: string;
|
|
1626
|
+
event_types: Array<string>;
|
|
1627
|
+
is_active: boolean;
|
|
1628
|
+
webhook_type: WebhookResponse.webhook_type;
|
|
1629
|
+
app_id: string | null;
|
|
1630
|
+
linked_to: WebhookResponse.linked_to;
|
|
1631
|
+
created_at: string;
|
|
1632
|
+
updated_at: string;
|
|
1633
|
+
last_triggered_at: string | null;
|
|
1634
|
+
};
|
|
1635
|
+
declare namespace WebhookResponse {
|
|
1636
|
+
enum webhook_type {
|
|
1637
|
+
DISCORD = "DISCORD",
|
|
1638
|
+
SLACK = "SLACK",
|
|
1639
|
+
CUSTOM = "CUSTOM"
|
|
1640
|
+
}
|
|
1641
|
+
enum linked_to {
|
|
1642
|
+
ORG = "org",
|
|
1643
|
+
APP = "app"
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
type WebhooksResponse = Array<WebhookResponse>;
|
|
1648
|
+
|
|
1649
|
+
declare class WebhooksService {
|
|
1650
|
+
readonly httpRequest: BaseHttpRequest;
|
|
1651
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
1652
|
+
/**
|
|
1653
|
+
* Create Webhook
|
|
1654
|
+
* Create a new webhook for the organization
|
|
1655
|
+
* @param requestBody
|
|
1656
|
+
* @returns WebhookResponse Webhook created successfully
|
|
1657
|
+
* @throws ApiError
|
|
1658
|
+
*/
|
|
1659
|
+
createWebhook(requestBody?: CreateWebhookRequest): CancelablePromise<WebhookResponse>;
|
|
1660
|
+
/**
|
|
1661
|
+
* Get All Webhooks
|
|
1662
|
+
* Retrieve all webhooks for the organization
|
|
1663
|
+
* @returns WebhooksResponse Webhooks retrieved successfully
|
|
1664
|
+
* @throws ApiError
|
|
1665
|
+
*/
|
|
1666
|
+
getWebhooks(): CancelablePromise<WebhooksResponse>;
|
|
1667
|
+
/**
|
|
1668
|
+
* Get Webhook
|
|
1669
|
+
* Retrieve a specific webhook
|
|
1670
|
+
* @param id
|
|
1671
|
+
* @returns WebhookResponse Webhook retrieved successfully
|
|
1672
|
+
* @throws ApiError
|
|
1673
|
+
*/
|
|
1674
|
+
getWebhook(id: string): CancelablePromise<WebhookResponse>;
|
|
1675
|
+
/**
|
|
1676
|
+
* Update Webhook
|
|
1677
|
+
* Update an existing webhook
|
|
1678
|
+
* @param id
|
|
1679
|
+
* @param requestBody
|
|
1680
|
+
* @returns WebhookResponse Webhook updated successfully
|
|
1681
|
+
* @throws ApiError
|
|
1682
|
+
*/
|
|
1683
|
+
updateWebhook(id: string, requestBody?: UpdateWebhookRequest): CancelablePromise<WebhookResponse>;
|
|
1684
|
+
/**
|
|
1685
|
+
* Delete Webhook
|
|
1686
|
+
* Delete an existing webhook
|
|
1687
|
+
* @param id
|
|
1688
|
+
* @returns WebhookResponse Webhook deleted successfully
|
|
1689
|
+
* @throws ApiError
|
|
1690
|
+
*/
|
|
1691
|
+
deleteWebhook(id: string): CancelablePromise<WebhookResponse>;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1578
1694
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
1579
1695
|
declare class EnvSyncAPISDK {
|
|
1580
1696
|
readonly access: AccessService;
|
|
@@ -1594,6 +1710,7 @@ declare class EnvSyncAPISDK {
|
|
|
1594
1710
|
readonly secretsPointInTime: SecretsPointInTimeService;
|
|
1595
1711
|
readonly secretsRollback: SecretsRollbackService;
|
|
1596
1712
|
readonly users: UsersService;
|
|
1713
|
+
readonly webhooks: WebhooksService;
|
|
1597
1714
|
readonly request: BaseHttpRequest;
|
|
1598
1715
|
constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
|
|
1599
1716
|
}
|
|
@@ -1623,4 +1740,4 @@ type UploadFileError = {
|
|
|
1623
1740
|
error: string;
|
|
1624
1741
|
};
|
|
1625
1742
|
|
|
1626
|
-
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, type BatchCreateSecretsRequest, type BatchDeleteEnvsRequest, type BatchDeleteSecretsRequest, type BatchEnvsResponse, type BatchSecretsResponse, type CallbackResponse, CancelError, CancelablePromise, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateSecretRequest, type CreateUserInviteRequest, type CreateUserInviteResponse, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, type DeleteSecretRequest, type DeleteUserInviteResponse, type EnvDiffRequest, type EnvDiffResponse, type EnvHistoryRequest, type EnvHistoryResponse, type EnvPitRequest, type EnvPitStateResponse, type EnvResponse, EnvSyncAPISDK, type EnvTimestampRequest, type EnvTypeResponse, type EnvTypesResponse, EnvironmentTypesService, EnvironmentVariablesPointInTimeService, EnvironmentVariablesRollbackService, EnvironmentVariablesService, type EnvsResponse, type ErrorResponse, FileUploadService, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetAuditLogsResponseWrapper, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetSecretRequest, type GetUserInviteByTokenResponse, type LoginUrlResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgResponse, OrganizationsService, type RegenerateApiKeyResponse, type RevealSecretsRequest, type RevealSecretsResponse, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type RollbackResponse, type RollbackSecretsResponse, type RollbackSecretsToPitRequest, type RollbackSecretsToTimestampRequest, type RollbackToPitRequest, type RollbackToTimestampRequest, type SecretDiffRequest, type SecretDiffResponse, type SecretHistoryRequest, type SecretHistoryResponse, type SecretPitRequest, type SecretPitStateResponse, type SecretResponse, type SecretTimestampRequest, SecretVariableRollbackResponse, type SecretVariableRollbackToPitRequest, type SecretVariableRollbackToTimestampRequest, type SecretVariableTimelineRequest, type SecretVariableTimelineResponse, SecretsPointInTimeService, type SecretsResponse, SecretsRollbackService, SecretsService, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdateRoleRequest, type UpdateSecretRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, type UploadFileError, type UploadFileResponse, type UserResponse, type UsersResponse, UsersService, VariableRollbackResponse, type VariableRollbackToPitRequest, type VariableRollbackToTimestampRequest, type VariableTimelineRequest, type VariableTimelineResponse, type WhoAmIResponse };
|
|
1743
|
+
export { type AcceptOrgInviteRequest, type AcceptOrgInviteResponse, type AcceptUserInviteRequest, type AcceptUserInviteResponse, AccessService, ApiError, type ApiKeyResponse, type ApiKeysResponse, ApiKeysService, ApplicationsService, AuditLogsService, AuthenticationService, BaseHttpRequest, type BatchCreateEnvsRequest, type BatchCreateSecretsRequest, type BatchDeleteEnvsRequest, type BatchDeleteSecretsRequest, type BatchEnvsResponse, type BatchSecretsResponse, type CallbackResponse, CancelError, CancelablePromise, type CheckSlugResponse, type CreateApiKeyRequest, type CreateAppRequest, type CreateAppResponse, type CreateEnvRequest, type CreateEnvTypeRequest, type CreateOrgInviteRequest, type CreateOrgInviteResponse, type CreateRoleRequest, type CreateSecretRequest, type CreateUserInviteRequest, type CreateUserInviteResponse, CreateWebhookRequest, type DeleteAppResponse, type DeleteEnvRequest, type DeleteEnvTypeRequest, type DeleteSecretRequest, type DeleteUserInviteResponse, type EnvDiffRequest, type EnvDiffResponse, type EnvHistoryRequest, type EnvHistoryResponse, type EnvPitRequest, type EnvPitStateResponse, type EnvResponse, EnvSyncAPISDK, type EnvTimestampRequest, type EnvTypeResponse, type EnvTypesResponse, EnvironmentTypesService, EnvironmentVariablesPointInTimeService, EnvironmentVariablesRollbackService, EnvironmentVariablesService, type EnvsResponse, type ErrorResponse, FileUploadService, type GetAppResponse, type GetAppsResponse, type GetAuditLogsResponse, type GetAuditLogsResponseWrapper, type GetEnvRequest, type GetOrgInviteByCodeResponse, type GetSecretRequest, type GetUserInviteByTokenResponse, type LoginUrlResponse, OnboardingService, OpenAPI, type OpenAPIConfig, type OrgResponse, OrganizationsService, type RegenerateApiKeyResponse, type RevealSecretsRequest, type RevealSecretsResponse, type RoleResponse, type RoleStatsResponse, type RolesResponse, RolesService, type RollbackResponse, type RollbackSecretsResponse, type RollbackSecretsToPitRequest, type RollbackSecretsToTimestampRequest, type RollbackToPitRequest, type RollbackToTimestampRequest, type SecretDiffRequest, type SecretDiffResponse, type SecretHistoryRequest, type SecretHistoryResponse, type SecretPitRequest, type SecretPitStateResponse, type SecretResponse, type SecretTimestampRequest, SecretVariableRollbackResponse, type SecretVariableRollbackToPitRequest, type SecretVariableRollbackToTimestampRequest, type SecretVariableTimelineRequest, type SecretVariableTimelineResponse, SecretsPointInTimeService, type SecretsResponse, SecretsRollbackService, SecretsService, type UpdateApiKeyRequest, type UpdateAppRequest, type UpdateAppResponse, type UpdateEnvRequest, type UpdateEnvTypeRequest, type UpdateOrgRequest, type UpdateRoleRequest, type UpdateSecretRequest, type UpdateUserInviteRequest, type UpdateUserInviteResponse, type UpdateUserRequest, UpdateWebhookRequest, type UploadFileError, type UploadFileResponse, type UserResponse, type UsersResponse, UsersService, VariableRollbackResponse, type VariableRollbackToPitRequest, type VariableRollbackToTimestampRequest, type VariableTimelineRequest, type VariableTimelineResponse, WebhookResponse, type WebhooksResponse, WebhooksService, type WhoAmIResponse };
|
package/dist/index.global.js
CHANGED
|
@@ -2052,6 +2052,106 @@
|
|
|
2052
2052
|
}
|
|
2053
2053
|
};
|
|
2054
2054
|
|
|
2055
|
+
// src/services/WebhooksService.ts
|
|
2056
|
+
var WebhooksService = class {
|
|
2057
|
+
constructor(httpRequest) {
|
|
2058
|
+
this.httpRequest = httpRequest;
|
|
2059
|
+
}
|
|
2060
|
+
/**
|
|
2061
|
+
* Create Webhook
|
|
2062
|
+
* Create a new webhook for the organization
|
|
2063
|
+
* @param requestBody
|
|
2064
|
+
* @returns WebhookResponse Webhook created successfully
|
|
2065
|
+
* @throws ApiError
|
|
2066
|
+
*/
|
|
2067
|
+
createWebhook(requestBody) {
|
|
2068
|
+
return this.httpRequest.request({
|
|
2069
|
+
method: "POST",
|
|
2070
|
+
url: "/api/webhook",
|
|
2071
|
+
body: requestBody,
|
|
2072
|
+
mediaType: "application/json",
|
|
2073
|
+
errors: {
|
|
2074
|
+
500: `Internal server error`
|
|
2075
|
+
}
|
|
2076
|
+
});
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* Get All Webhooks
|
|
2080
|
+
* Retrieve all webhooks for the organization
|
|
2081
|
+
* @returns WebhooksResponse Webhooks retrieved successfully
|
|
2082
|
+
* @throws ApiError
|
|
2083
|
+
*/
|
|
2084
|
+
getWebhooks() {
|
|
2085
|
+
return this.httpRequest.request({
|
|
2086
|
+
method: "GET",
|
|
2087
|
+
url: "/api/webhook",
|
|
2088
|
+
errors: {
|
|
2089
|
+
500: `Internal server error`
|
|
2090
|
+
}
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* Get Webhook
|
|
2095
|
+
* Retrieve a specific webhook
|
|
2096
|
+
* @param id
|
|
2097
|
+
* @returns WebhookResponse Webhook retrieved successfully
|
|
2098
|
+
* @throws ApiError
|
|
2099
|
+
*/
|
|
2100
|
+
getWebhook(id) {
|
|
2101
|
+
return this.httpRequest.request({
|
|
2102
|
+
method: "GET",
|
|
2103
|
+
url: "/api/webhook/{id}",
|
|
2104
|
+
path: {
|
|
2105
|
+
"id": id
|
|
2106
|
+
},
|
|
2107
|
+
errors: {
|
|
2108
|
+
500: `Internal server error`
|
|
2109
|
+
}
|
|
2110
|
+
});
|
|
2111
|
+
}
|
|
2112
|
+
/**
|
|
2113
|
+
* Update Webhook
|
|
2114
|
+
* Update an existing webhook
|
|
2115
|
+
* @param id
|
|
2116
|
+
* @param requestBody
|
|
2117
|
+
* @returns WebhookResponse Webhook updated successfully
|
|
2118
|
+
* @throws ApiError
|
|
2119
|
+
*/
|
|
2120
|
+
updateWebhook(id, requestBody) {
|
|
2121
|
+
return this.httpRequest.request({
|
|
2122
|
+
method: "PUT",
|
|
2123
|
+
url: "/api/webhook/{id}",
|
|
2124
|
+
path: {
|
|
2125
|
+
"id": id
|
|
2126
|
+
},
|
|
2127
|
+
body: requestBody,
|
|
2128
|
+
mediaType: "application/json",
|
|
2129
|
+
errors: {
|
|
2130
|
+
500: `Internal server error`
|
|
2131
|
+
}
|
|
2132
|
+
});
|
|
2133
|
+
}
|
|
2134
|
+
/**
|
|
2135
|
+
* Delete Webhook
|
|
2136
|
+
* Delete an existing webhook
|
|
2137
|
+
* @param id
|
|
2138
|
+
* @returns WebhookResponse Webhook deleted successfully
|
|
2139
|
+
* @throws ApiError
|
|
2140
|
+
*/
|
|
2141
|
+
deleteWebhook(id) {
|
|
2142
|
+
return this.httpRequest.request({
|
|
2143
|
+
method: "DELETE",
|
|
2144
|
+
url: "/api/webhook/{id}",
|
|
2145
|
+
path: {
|
|
2146
|
+
"id": id
|
|
2147
|
+
},
|
|
2148
|
+
errors: {
|
|
2149
|
+
500: `Internal server error`
|
|
2150
|
+
}
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2153
|
+
};
|
|
2154
|
+
|
|
2055
2155
|
// src/EnvSyncAPISDK.ts
|
|
2056
2156
|
var EnvSyncAPISDK = class {
|
|
2057
2157
|
access;
|
|
@@ -2071,11 +2171,12 @@
|
|
|
2071
2171
|
secretsPointInTime;
|
|
2072
2172
|
secretsRollback;
|
|
2073
2173
|
users;
|
|
2174
|
+
webhooks;
|
|
2074
2175
|
request;
|
|
2075
2176
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
2076
2177
|
this.request = new HttpRequest({
|
|
2077
2178
|
BASE: config?.BASE ?? "http://localhost:8600",
|
|
2078
|
-
VERSION: config?.VERSION ?? "0.3.
|
|
2179
|
+
VERSION: config?.VERSION ?? "0.3.6",
|
|
2079
2180
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
2080
2181
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
2081
2182
|
TOKEN: config?.TOKEN,
|
|
@@ -2101,13 +2202,14 @@
|
|
|
2101
2202
|
this.secretsPointInTime = new SecretsPointInTimeService(this.request);
|
|
2102
2203
|
this.secretsRollback = new SecretsRollbackService(this.request);
|
|
2103
2204
|
this.users = new UsersService(this.request);
|
|
2205
|
+
this.webhooks = new WebhooksService(this.request);
|
|
2104
2206
|
}
|
|
2105
2207
|
};
|
|
2106
2208
|
|
|
2107
2209
|
// src/core/OpenAPI.ts
|
|
2108
2210
|
var OpenAPI = {
|
|
2109
2211
|
BASE: "http://localhost:8600",
|
|
2110
|
-
VERSION: "0.3.
|
|
2212
|
+
VERSION: "0.3.6",
|
|
2111
2213
|
WITH_CREDENTIALS: false,
|
|
2112
2214
|
CREDENTIALS: "include",
|
|
2113
2215
|
TOKEN: void 0,
|
|
@@ -2117,6 +2219,22 @@
|
|
|
2117
2219
|
ENCODE_PATH: void 0
|
|
2118
2220
|
};
|
|
2119
2221
|
|
|
2222
|
+
// src/models/CreateWebhookRequest.ts
|
|
2223
|
+
var CreateWebhookRequest;
|
|
2224
|
+
((CreateWebhookRequest2) => {
|
|
2225
|
+
let webhook_type;
|
|
2226
|
+
((webhook_type2) => {
|
|
2227
|
+
webhook_type2["DISCORD"] = "DISCORD";
|
|
2228
|
+
webhook_type2["SLACK"] = "SLACK";
|
|
2229
|
+
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2230
|
+
})(webhook_type = CreateWebhookRequest2.webhook_type || (CreateWebhookRequest2.webhook_type = {}));
|
|
2231
|
+
let linked_to;
|
|
2232
|
+
((linked_to2) => {
|
|
2233
|
+
linked_to2["ORG"] = "org";
|
|
2234
|
+
linked_to2["APP"] = "app";
|
|
2235
|
+
})(linked_to = CreateWebhookRequest2.linked_to || (CreateWebhookRequest2.linked_to = {}));
|
|
2236
|
+
})(CreateWebhookRequest || (CreateWebhookRequest = {}));
|
|
2237
|
+
|
|
2120
2238
|
// src/models/SecretVariableRollbackResponse.ts
|
|
2121
2239
|
var SecretVariableRollbackResponse;
|
|
2122
2240
|
((SecretVariableRollbackResponse2) => {
|
|
@@ -2128,6 +2246,22 @@
|
|
|
2128
2246
|
})(operation = SecretVariableRollbackResponse2.operation || (SecretVariableRollbackResponse2.operation = {}));
|
|
2129
2247
|
})(SecretVariableRollbackResponse || (SecretVariableRollbackResponse = {}));
|
|
2130
2248
|
|
|
2249
|
+
// src/models/UpdateWebhookRequest.ts
|
|
2250
|
+
var UpdateWebhookRequest;
|
|
2251
|
+
((UpdateWebhookRequest2) => {
|
|
2252
|
+
let webhook_type;
|
|
2253
|
+
((webhook_type2) => {
|
|
2254
|
+
webhook_type2["DISCORD"] = "DISCORD";
|
|
2255
|
+
webhook_type2["SLACK"] = "SLACK";
|
|
2256
|
+
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2257
|
+
})(webhook_type = UpdateWebhookRequest2.webhook_type || (UpdateWebhookRequest2.webhook_type = {}));
|
|
2258
|
+
let linked_to;
|
|
2259
|
+
((linked_to2) => {
|
|
2260
|
+
linked_to2["ORG"] = "org";
|
|
2261
|
+
linked_to2["APP"] = "app";
|
|
2262
|
+
})(linked_to = UpdateWebhookRequest2.linked_to || (UpdateWebhookRequest2.linked_to = {}));
|
|
2263
|
+
})(UpdateWebhookRequest || (UpdateWebhookRequest = {}));
|
|
2264
|
+
|
|
2131
2265
|
// src/models/VariableRollbackResponse.ts
|
|
2132
2266
|
var VariableRollbackResponse;
|
|
2133
2267
|
((VariableRollbackResponse2) => {
|
|
@@ -2138,4 +2272,20 @@
|
|
|
2138
2272
|
operation2["DELETE"] = "DELETE";
|
|
2139
2273
|
})(operation = VariableRollbackResponse2.operation || (VariableRollbackResponse2.operation = {}));
|
|
2140
2274
|
})(VariableRollbackResponse || (VariableRollbackResponse = {}));
|
|
2275
|
+
|
|
2276
|
+
// src/models/WebhookResponse.ts
|
|
2277
|
+
var WebhookResponse;
|
|
2278
|
+
((WebhookResponse2) => {
|
|
2279
|
+
let webhook_type;
|
|
2280
|
+
((webhook_type2) => {
|
|
2281
|
+
webhook_type2["DISCORD"] = "DISCORD";
|
|
2282
|
+
webhook_type2["SLACK"] = "SLACK";
|
|
2283
|
+
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2284
|
+
})(webhook_type = WebhookResponse2.webhook_type || (WebhookResponse2.webhook_type = {}));
|
|
2285
|
+
let linked_to;
|
|
2286
|
+
((linked_to2) => {
|
|
2287
|
+
linked_to2["ORG"] = "org";
|
|
2288
|
+
linked_to2["APP"] = "app";
|
|
2289
|
+
})(linked_to = WebhookResponse2.linked_to || (WebhookResponse2.linked_to = {}));
|
|
2290
|
+
})(WebhookResponse || (WebhookResponse = {}));
|
|
2141
2291
|
})();
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ __export(src_exports, {
|
|
|
29
29
|
BaseHttpRequest: () => BaseHttpRequest,
|
|
30
30
|
CancelError: () => CancelError,
|
|
31
31
|
CancelablePromise: () => CancelablePromise,
|
|
32
|
+
CreateWebhookRequest: () => CreateWebhookRequest,
|
|
32
33
|
EnvSyncAPISDK: () => EnvSyncAPISDK,
|
|
33
34
|
EnvironmentTypesService: () => EnvironmentTypesService,
|
|
34
35
|
EnvironmentVariablesPointInTimeService: () => EnvironmentVariablesPointInTimeService,
|
|
@@ -43,8 +44,11 @@ __export(src_exports, {
|
|
|
43
44
|
SecretsPointInTimeService: () => SecretsPointInTimeService,
|
|
44
45
|
SecretsRollbackService: () => SecretsRollbackService,
|
|
45
46
|
SecretsService: () => SecretsService,
|
|
47
|
+
UpdateWebhookRequest: () => UpdateWebhookRequest,
|
|
46
48
|
UsersService: () => UsersService,
|
|
47
|
-
VariableRollbackResponse: () => VariableRollbackResponse
|
|
49
|
+
VariableRollbackResponse: () => VariableRollbackResponse,
|
|
50
|
+
WebhookResponse: () => WebhookResponse,
|
|
51
|
+
WebhooksService: () => WebhooksService
|
|
48
52
|
});
|
|
49
53
|
module.exports = __toCommonJS(src_exports);
|
|
50
54
|
|
|
@@ -2100,6 +2104,106 @@ var UsersService = class {
|
|
|
2100
2104
|
}
|
|
2101
2105
|
};
|
|
2102
2106
|
|
|
2107
|
+
// src/services/WebhooksService.ts
|
|
2108
|
+
var WebhooksService = class {
|
|
2109
|
+
constructor(httpRequest) {
|
|
2110
|
+
this.httpRequest = httpRequest;
|
|
2111
|
+
}
|
|
2112
|
+
/**
|
|
2113
|
+
* Create Webhook
|
|
2114
|
+
* Create a new webhook for the organization
|
|
2115
|
+
* @param requestBody
|
|
2116
|
+
* @returns WebhookResponse Webhook created successfully
|
|
2117
|
+
* @throws ApiError
|
|
2118
|
+
*/
|
|
2119
|
+
createWebhook(requestBody) {
|
|
2120
|
+
return this.httpRequest.request({
|
|
2121
|
+
method: "POST",
|
|
2122
|
+
url: "/api/webhook",
|
|
2123
|
+
body: requestBody,
|
|
2124
|
+
mediaType: "application/json",
|
|
2125
|
+
errors: {
|
|
2126
|
+
500: `Internal server error`
|
|
2127
|
+
}
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
2130
|
+
/**
|
|
2131
|
+
* Get All Webhooks
|
|
2132
|
+
* Retrieve all webhooks for the organization
|
|
2133
|
+
* @returns WebhooksResponse Webhooks retrieved successfully
|
|
2134
|
+
* @throws ApiError
|
|
2135
|
+
*/
|
|
2136
|
+
getWebhooks() {
|
|
2137
|
+
return this.httpRequest.request({
|
|
2138
|
+
method: "GET",
|
|
2139
|
+
url: "/api/webhook",
|
|
2140
|
+
errors: {
|
|
2141
|
+
500: `Internal server error`
|
|
2142
|
+
}
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
/**
|
|
2146
|
+
* Get Webhook
|
|
2147
|
+
* Retrieve a specific webhook
|
|
2148
|
+
* @param id
|
|
2149
|
+
* @returns WebhookResponse Webhook retrieved successfully
|
|
2150
|
+
* @throws ApiError
|
|
2151
|
+
*/
|
|
2152
|
+
getWebhook(id) {
|
|
2153
|
+
return this.httpRequest.request({
|
|
2154
|
+
method: "GET",
|
|
2155
|
+
url: "/api/webhook/{id}",
|
|
2156
|
+
path: {
|
|
2157
|
+
"id": id
|
|
2158
|
+
},
|
|
2159
|
+
errors: {
|
|
2160
|
+
500: `Internal server error`
|
|
2161
|
+
}
|
|
2162
|
+
});
|
|
2163
|
+
}
|
|
2164
|
+
/**
|
|
2165
|
+
* Update Webhook
|
|
2166
|
+
* Update an existing webhook
|
|
2167
|
+
* @param id
|
|
2168
|
+
* @param requestBody
|
|
2169
|
+
* @returns WebhookResponse Webhook updated successfully
|
|
2170
|
+
* @throws ApiError
|
|
2171
|
+
*/
|
|
2172
|
+
updateWebhook(id, requestBody) {
|
|
2173
|
+
return this.httpRequest.request({
|
|
2174
|
+
method: "PUT",
|
|
2175
|
+
url: "/api/webhook/{id}",
|
|
2176
|
+
path: {
|
|
2177
|
+
"id": id
|
|
2178
|
+
},
|
|
2179
|
+
body: requestBody,
|
|
2180
|
+
mediaType: "application/json",
|
|
2181
|
+
errors: {
|
|
2182
|
+
500: `Internal server error`
|
|
2183
|
+
}
|
|
2184
|
+
});
|
|
2185
|
+
}
|
|
2186
|
+
/**
|
|
2187
|
+
* Delete Webhook
|
|
2188
|
+
* Delete an existing webhook
|
|
2189
|
+
* @param id
|
|
2190
|
+
* @returns WebhookResponse Webhook deleted successfully
|
|
2191
|
+
* @throws ApiError
|
|
2192
|
+
*/
|
|
2193
|
+
deleteWebhook(id) {
|
|
2194
|
+
return this.httpRequest.request({
|
|
2195
|
+
method: "DELETE",
|
|
2196
|
+
url: "/api/webhook/{id}",
|
|
2197
|
+
path: {
|
|
2198
|
+
"id": id
|
|
2199
|
+
},
|
|
2200
|
+
errors: {
|
|
2201
|
+
500: `Internal server error`
|
|
2202
|
+
}
|
|
2203
|
+
});
|
|
2204
|
+
}
|
|
2205
|
+
};
|
|
2206
|
+
|
|
2103
2207
|
// src/EnvSyncAPISDK.ts
|
|
2104
2208
|
var EnvSyncAPISDK = class {
|
|
2105
2209
|
access;
|
|
@@ -2119,11 +2223,12 @@ var EnvSyncAPISDK = class {
|
|
|
2119
2223
|
secretsPointInTime;
|
|
2120
2224
|
secretsRollback;
|
|
2121
2225
|
users;
|
|
2226
|
+
webhooks;
|
|
2122
2227
|
request;
|
|
2123
2228
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
2124
2229
|
this.request = new HttpRequest({
|
|
2125
2230
|
BASE: config?.BASE ?? "http://localhost:8600",
|
|
2126
|
-
VERSION: config?.VERSION ?? "0.3.
|
|
2231
|
+
VERSION: config?.VERSION ?? "0.3.6",
|
|
2127
2232
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
2128
2233
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
2129
2234
|
TOKEN: config?.TOKEN,
|
|
@@ -2149,13 +2254,14 @@ var EnvSyncAPISDK = class {
|
|
|
2149
2254
|
this.secretsPointInTime = new SecretsPointInTimeService(this.request);
|
|
2150
2255
|
this.secretsRollback = new SecretsRollbackService(this.request);
|
|
2151
2256
|
this.users = new UsersService(this.request);
|
|
2257
|
+
this.webhooks = new WebhooksService(this.request);
|
|
2152
2258
|
}
|
|
2153
2259
|
};
|
|
2154
2260
|
|
|
2155
2261
|
// src/core/OpenAPI.ts
|
|
2156
2262
|
var OpenAPI = {
|
|
2157
2263
|
BASE: "http://localhost:8600",
|
|
2158
|
-
VERSION: "0.3.
|
|
2264
|
+
VERSION: "0.3.6",
|
|
2159
2265
|
WITH_CREDENTIALS: false,
|
|
2160
2266
|
CREDENTIALS: "include",
|
|
2161
2267
|
TOKEN: void 0,
|
|
@@ -2165,6 +2271,22 @@ var OpenAPI = {
|
|
|
2165
2271
|
ENCODE_PATH: void 0
|
|
2166
2272
|
};
|
|
2167
2273
|
|
|
2274
|
+
// src/models/CreateWebhookRequest.ts
|
|
2275
|
+
var CreateWebhookRequest;
|
|
2276
|
+
((CreateWebhookRequest2) => {
|
|
2277
|
+
let webhook_type;
|
|
2278
|
+
((webhook_type2) => {
|
|
2279
|
+
webhook_type2["DISCORD"] = "DISCORD";
|
|
2280
|
+
webhook_type2["SLACK"] = "SLACK";
|
|
2281
|
+
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2282
|
+
})(webhook_type = CreateWebhookRequest2.webhook_type || (CreateWebhookRequest2.webhook_type = {}));
|
|
2283
|
+
let linked_to;
|
|
2284
|
+
((linked_to2) => {
|
|
2285
|
+
linked_to2["ORG"] = "org";
|
|
2286
|
+
linked_to2["APP"] = "app";
|
|
2287
|
+
})(linked_to = CreateWebhookRequest2.linked_to || (CreateWebhookRequest2.linked_to = {}));
|
|
2288
|
+
})(CreateWebhookRequest || (CreateWebhookRequest = {}));
|
|
2289
|
+
|
|
2168
2290
|
// src/models/SecretVariableRollbackResponse.ts
|
|
2169
2291
|
var SecretVariableRollbackResponse;
|
|
2170
2292
|
((SecretVariableRollbackResponse2) => {
|
|
@@ -2176,6 +2298,22 @@ var SecretVariableRollbackResponse;
|
|
|
2176
2298
|
})(operation = SecretVariableRollbackResponse2.operation || (SecretVariableRollbackResponse2.operation = {}));
|
|
2177
2299
|
})(SecretVariableRollbackResponse || (SecretVariableRollbackResponse = {}));
|
|
2178
2300
|
|
|
2301
|
+
// src/models/UpdateWebhookRequest.ts
|
|
2302
|
+
var UpdateWebhookRequest;
|
|
2303
|
+
((UpdateWebhookRequest2) => {
|
|
2304
|
+
let webhook_type;
|
|
2305
|
+
((webhook_type2) => {
|
|
2306
|
+
webhook_type2["DISCORD"] = "DISCORD";
|
|
2307
|
+
webhook_type2["SLACK"] = "SLACK";
|
|
2308
|
+
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2309
|
+
})(webhook_type = UpdateWebhookRequest2.webhook_type || (UpdateWebhookRequest2.webhook_type = {}));
|
|
2310
|
+
let linked_to;
|
|
2311
|
+
((linked_to2) => {
|
|
2312
|
+
linked_to2["ORG"] = "org";
|
|
2313
|
+
linked_to2["APP"] = "app";
|
|
2314
|
+
})(linked_to = UpdateWebhookRequest2.linked_to || (UpdateWebhookRequest2.linked_to = {}));
|
|
2315
|
+
})(UpdateWebhookRequest || (UpdateWebhookRequest = {}));
|
|
2316
|
+
|
|
2179
2317
|
// src/models/VariableRollbackResponse.ts
|
|
2180
2318
|
var VariableRollbackResponse;
|
|
2181
2319
|
((VariableRollbackResponse2) => {
|
|
@@ -2186,6 +2324,22 @@ var VariableRollbackResponse;
|
|
|
2186
2324
|
operation2["DELETE"] = "DELETE";
|
|
2187
2325
|
})(operation = VariableRollbackResponse2.operation || (VariableRollbackResponse2.operation = {}));
|
|
2188
2326
|
})(VariableRollbackResponse || (VariableRollbackResponse = {}));
|
|
2327
|
+
|
|
2328
|
+
// src/models/WebhookResponse.ts
|
|
2329
|
+
var WebhookResponse;
|
|
2330
|
+
((WebhookResponse2) => {
|
|
2331
|
+
let webhook_type;
|
|
2332
|
+
((webhook_type2) => {
|
|
2333
|
+
webhook_type2["DISCORD"] = "DISCORD";
|
|
2334
|
+
webhook_type2["SLACK"] = "SLACK";
|
|
2335
|
+
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2336
|
+
})(webhook_type = WebhookResponse2.webhook_type || (WebhookResponse2.webhook_type = {}));
|
|
2337
|
+
let linked_to;
|
|
2338
|
+
((linked_to2) => {
|
|
2339
|
+
linked_to2["ORG"] = "org";
|
|
2340
|
+
linked_to2["APP"] = "app";
|
|
2341
|
+
})(linked_to = WebhookResponse2.linked_to || (WebhookResponse2.linked_to = {}));
|
|
2342
|
+
})(WebhookResponse || (WebhookResponse = {}));
|
|
2189
2343
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2190
2344
|
0 && (module.exports = {
|
|
2191
2345
|
AccessService,
|
|
@@ -2197,6 +2351,7 @@ var VariableRollbackResponse;
|
|
|
2197
2351
|
BaseHttpRequest,
|
|
2198
2352
|
CancelError,
|
|
2199
2353
|
CancelablePromise,
|
|
2354
|
+
CreateWebhookRequest,
|
|
2200
2355
|
EnvSyncAPISDK,
|
|
2201
2356
|
EnvironmentTypesService,
|
|
2202
2357
|
EnvironmentVariablesPointInTimeService,
|
|
@@ -2211,6 +2366,9 @@ var VariableRollbackResponse;
|
|
|
2211
2366
|
SecretsPointInTimeService,
|
|
2212
2367
|
SecretsRollbackService,
|
|
2213
2368
|
SecretsService,
|
|
2369
|
+
UpdateWebhookRequest,
|
|
2214
2370
|
UsersService,
|
|
2215
|
-
VariableRollbackResponse
|
|
2371
|
+
VariableRollbackResponse,
|
|
2372
|
+
WebhookResponse,
|
|
2373
|
+
WebhooksService
|
|
2216
2374
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -2050,6 +2050,106 @@ var UsersService = class {
|
|
|
2050
2050
|
}
|
|
2051
2051
|
};
|
|
2052
2052
|
|
|
2053
|
+
// src/services/WebhooksService.ts
|
|
2054
|
+
var WebhooksService = class {
|
|
2055
|
+
constructor(httpRequest) {
|
|
2056
|
+
this.httpRequest = httpRequest;
|
|
2057
|
+
}
|
|
2058
|
+
/**
|
|
2059
|
+
* Create Webhook
|
|
2060
|
+
* Create a new webhook for the organization
|
|
2061
|
+
* @param requestBody
|
|
2062
|
+
* @returns WebhookResponse Webhook created successfully
|
|
2063
|
+
* @throws ApiError
|
|
2064
|
+
*/
|
|
2065
|
+
createWebhook(requestBody) {
|
|
2066
|
+
return this.httpRequest.request({
|
|
2067
|
+
method: "POST",
|
|
2068
|
+
url: "/api/webhook",
|
|
2069
|
+
body: requestBody,
|
|
2070
|
+
mediaType: "application/json",
|
|
2071
|
+
errors: {
|
|
2072
|
+
500: `Internal server error`
|
|
2073
|
+
}
|
|
2074
|
+
});
|
|
2075
|
+
}
|
|
2076
|
+
/**
|
|
2077
|
+
* Get All Webhooks
|
|
2078
|
+
* Retrieve all webhooks for the organization
|
|
2079
|
+
* @returns WebhooksResponse Webhooks retrieved successfully
|
|
2080
|
+
* @throws ApiError
|
|
2081
|
+
*/
|
|
2082
|
+
getWebhooks() {
|
|
2083
|
+
return this.httpRequest.request({
|
|
2084
|
+
method: "GET",
|
|
2085
|
+
url: "/api/webhook",
|
|
2086
|
+
errors: {
|
|
2087
|
+
500: `Internal server error`
|
|
2088
|
+
}
|
|
2089
|
+
});
|
|
2090
|
+
}
|
|
2091
|
+
/**
|
|
2092
|
+
* Get Webhook
|
|
2093
|
+
* Retrieve a specific webhook
|
|
2094
|
+
* @param id
|
|
2095
|
+
* @returns WebhookResponse Webhook retrieved successfully
|
|
2096
|
+
* @throws ApiError
|
|
2097
|
+
*/
|
|
2098
|
+
getWebhook(id) {
|
|
2099
|
+
return this.httpRequest.request({
|
|
2100
|
+
method: "GET",
|
|
2101
|
+
url: "/api/webhook/{id}",
|
|
2102
|
+
path: {
|
|
2103
|
+
"id": id
|
|
2104
|
+
},
|
|
2105
|
+
errors: {
|
|
2106
|
+
500: `Internal server error`
|
|
2107
|
+
}
|
|
2108
|
+
});
|
|
2109
|
+
}
|
|
2110
|
+
/**
|
|
2111
|
+
* Update Webhook
|
|
2112
|
+
* Update an existing webhook
|
|
2113
|
+
* @param id
|
|
2114
|
+
* @param requestBody
|
|
2115
|
+
* @returns WebhookResponse Webhook updated successfully
|
|
2116
|
+
* @throws ApiError
|
|
2117
|
+
*/
|
|
2118
|
+
updateWebhook(id, requestBody) {
|
|
2119
|
+
return this.httpRequest.request({
|
|
2120
|
+
method: "PUT",
|
|
2121
|
+
url: "/api/webhook/{id}",
|
|
2122
|
+
path: {
|
|
2123
|
+
"id": id
|
|
2124
|
+
},
|
|
2125
|
+
body: requestBody,
|
|
2126
|
+
mediaType: "application/json",
|
|
2127
|
+
errors: {
|
|
2128
|
+
500: `Internal server error`
|
|
2129
|
+
}
|
|
2130
|
+
});
|
|
2131
|
+
}
|
|
2132
|
+
/**
|
|
2133
|
+
* Delete Webhook
|
|
2134
|
+
* Delete an existing webhook
|
|
2135
|
+
* @param id
|
|
2136
|
+
* @returns WebhookResponse Webhook deleted successfully
|
|
2137
|
+
* @throws ApiError
|
|
2138
|
+
*/
|
|
2139
|
+
deleteWebhook(id) {
|
|
2140
|
+
return this.httpRequest.request({
|
|
2141
|
+
method: "DELETE",
|
|
2142
|
+
url: "/api/webhook/{id}",
|
|
2143
|
+
path: {
|
|
2144
|
+
"id": id
|
|
2145
|
+
},
|
|
2146
|
+
errors: {
|
|
2147
|
+
500: `Internal server error`
|
|
2148
|
+
}
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
};
|
|
2152
|
+
|
|
2053
2153
|
// src/EnvSyncAPISDK.ts
|
|
2054
2154
|
var EnvSyncAPISDK = class {
|
|
2055
2155
|
access;
|
|
@@ -2069,11 +2169,12 @@ var EnvSyncAPISDK = class {
|
|
|
2069
2169
|
secretsPointInTime;
|
|
2070
2170
|
secretsRollback;
|
|
2071
2171
|
users;
|
|
2172
|
+
webhooks;
|
|
2072
2173
|
request;
|
|
2073
2174
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
2074
2175
|
this.request = new HttpRequest({
|
|
2075
2176
|
BASE: config?.BASE ?? "http://localhost:8600",
|
|
2076
|
-
VERSION: config?.VERSION ?? "0.3.
|
|
2177
|
+
VERSION: config?.VERSION ?? "0.3.6",
|
|
2077
2178
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
2078
2179
|
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
2079
2180
|
TOKEN: config?.TOKEN,
|
|
@@ -2099,13 +2200,14 @@ var EnvSyncAPISDK = class {
|
|
|
2099
2200
|
this.secretsPointInTime = new SecretsPointInTimeService(this.request);
|
|
2100
2201
|
this.secretsRollback = new SecretsRollbackService(this.request);
|
|
2101
2202
|
this.users = new UsersService(this.request);
|
|
2203
|
+
this.webhooks = new WebhooksService(this.request);
|
|
2102
2204
|
}
|
|
2103
2205
|
};
|
|
2104
2206
|
|
|
2105
2207
|
// src/core/OpenAPI.ts
|
|
2106
2208
|
var OpenAPI = {
|
|
2107
2209
|
BASE: "http://localhost:8600",
|
|
2108
|
-
VERSION: "0.3.
|
|
2210
|
+
VERSION: "0.3.6",
|
|
2109
2211
|
WITH_CREDENTIALS: false,
|
|
2110
2212
|
CREDENTIALS: "include",
|
|
2111
2213
|
TOKEN: void 0,
|
|
@@ -2115,6 +2217,22 @@ var OpenAPI = {
|
|
|
2115
2217
|
ENCODE_PATH: void 0
|
|
2116
2218
|
};
|
|
2117
2219
|
|
|
2220
|
+
// src/models/CreateWebhookRequest.ts
|
|
2221
|
+
var CreateWebhookRequest;
|
|
2222
|
+
((CreateWebhookRequest2) => {
|
|
2223
|
+
let webhook_type;
|
|
2224
|
+
((webhook_type2) => {
|
|
2225
|
+
webhook_type2["DISCORD"] = "DISCORD";
|
|
2226
|
+
webhook_type2["SLACK"] = "SLACK";
|
|
2227
|
+
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2228
|
+
})(webhook_type = CreateWebhookRequest2.webhook_type || (CreateWebhookRequest2.webhook_type = {}));
|
|
2229
|
+
let linked_to;
|
|
2230
|
+
((linked_to2) => {
|
|
2231
|
+
linked_to2["ORG"] = "org";
|
|
2232
|
+
linked_to2["APP"] = "app";
|
|
2233
|
+
})(linked_to = CreateWebhookRequest2.linked_to || (CreateWebhookRequest2.linked_to = {}));
|
|
2234
|
+
})(CreateWebhookRequest || (CreateWebhookRequest = {}));
|
|
2235
|
+
|
|
2118
2236
|
// src/models/SecretVariableRollbackResponse.ts
|
|
2119
2237
|
var SecretVariableRollbackResponse;
|
|
2120
2238
|
((SecretVariableRollbackResponse2) => {
|
|
@@ -2126,6 +2244,22 @@ var SecretVariableRollbackResponse;
|
|
|
2126
2244
|
})(operation = SecretVariableRollbackResponse2.operation || (SecretVariableRollbackResponse2.operation = {}));
|
|
2127
2245
|
})(SecretVariableRollbackResponse || (SecretVariableRollbackResponse = {}));
|
|
2128
2246
|
|
|
2247
|
+
// src/models/UpdateWebhookRequest.ts
|
|
2248
|
+
var UpdateWebhookRequest;
|
|
2249
|
+
((UpdateWebhookRequest2) => {
|
|
2250
|
+
let webhook_type;
|
|
2251
|
+
((webhook_type2) => {
|
|
2252
|
+
webhook_type2["DISCORD"] = "DISCORD";
|
|
2253
|
+
webhook_type2["SLACK"] = "SLACK";
|
|
2254
|
+
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2255
|
+
})(webhook_type = UpdateWebhookRequest2.webhook_type || (UpdateWebhookRequest2.webhook_type = {}));
|
|
2256
|
+
let linked_to;
|
|
2257
|
+
((linked_to2) => {
|
|
2258
|
+
linked_to2["ORG"] = "org";
|
|
2259
|
+
linked_to2["APP"] = "app";
|
|
2260
|
+
})(linked_to = UpdateWebhookRequest2.linked_to || (UpdateWebhookRequest2.linked_to = {}));
|
|
2261
|
+
})(UpdateWebhookRequest || (UpdateWebhookRequest = {}));
|
|
2262
|
+
|
|
2129
2263
|
// src/models/VariableRollbackResponse.ts
|
|
2130
2264
|
var VariableRollbackResponse;
|
|
2131
2265
|
((VariableRollbackResponse2) => {
|
|
@@ -2136,6 +2270,22 @@ var VariableRollbackResponse;
|
|
|
2136
2270
|
operation2["DELETE"] = "DELETE";
|
|
2137
2271
|
})(operation = VariableRollbackResponse2.operation || (VariableRollbackResponse2.operation = {}));
|
|
2138
2272
|
})(VariableRollbackResponse || (VariableRollbackResponse = {}));
|
|
2273
|
+
|
|
2274
|
+
// src/models/WebhookResponse.ts
|
|
2275
|
+
var WebhookResponse;
|
|
2276
|
+
((WebhookResponse2) => {
|
|
2277
|
+
let webhook_type;
|
|
2278
|
+
((webhook_type2) => {
|
|
2279
|
+
webhook_type2["DISCORD"] = "DISCORD";
|
|
2280
|
+
webhook_type2["SLACK"] = "SLACK";
|
|
2281
|
+
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2282
|
+
})(webhook_type = WebhookResponse2.webhook_type || (WebhookResponse2.webhook_type = {}));
|
|
2283
|
+
let linked_to;
|
|
2284
|
+
((linked_to2) => {
|
|
2285
|
+
linked_to2["ORG"] = "org";
|
|
2286
|
+
linked_to2["APP"] = "app";
|
|
2287
|
+
})(linked_to = WebhookResponse2.linked_to || (WebhookResponse2.linked_to = {}));
|
|
2288
|
+
})(WebhookResponse || (WebhookResponse = {}));
|
|
2139
2289
|
export {
|
|
2140
2290
|
AccessService,
|
|
2141
2291
|
ApiError,
|
|
@@ -2146,6 +2296,7 @@ export {
|
|
|
2146
2296
|
BaseHttpRequest,
|
|
2147
2297
|
CancelError,
|
|
2148
2298
|
CancelablePromise,
|
|
2299
|
+
CreateWebhookRequest,
|
|
2149
2300
|
EnvSyncAPISDK,
|
|
2150
2301
|
EnvironmentTypesService,
|
|
2151
2302
|
EnvironmentVariablesPointInTimeService,
|
|
@@ -2160,6 +2311,9 @@ export {
|
|
|
2160
2311
|
SecretsPointInTimeService,
|
|
2161
2312
|
SecretsRollbackService,
|
|
2162
2313
|
SecretsService,
|
|
2314
|
+
UpdateWebhookRequest,
|
|
2163
2315
|
UsersService,
|
|
2164
|
-
VariableRollbackResponse
|
|
2316
|
+
VariableRollbackResponse,
|
|
2317
|
+
WebhookResponse,
|
|
2318
|
+
WebhooksService
|
|
2165
2319
|
};
|