Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(edge_services): add GetPipelineStages endpoint #1449

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,24 +193,6 @@ export const unmarshalPipeline = (data: unknown): Pipeline => {
} as Pipeline
}

export const unmarshalPurgeRequest = (data: unknown): PurgeRequest => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'PurgeRequest' failed as data isn't a dictionary.`,
)
}

return {
all: data.all,
assets: data.assets,
createdAt: unmarshalDate(data.created_at),
id: data.id,
pipelineId: data.pipeline_id,
status: data.status,
updatedAt: unmarshalDate(data.updated_at),
} as PurgeRequest
}

const unmarshalTLSSecret = (data: unknown): TLSSecret => {
if (!isJSONObject(data)) {
throw new TypeError(
Expand Down Expand Up @@ -245,6 +227,24 @@ export const unmarshalTLSStage = (data: unknown): TLSStage => {
} as TLSStage
}

export const unmarshalPurgeRequest = (data: unknown): PurgeRequest => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'PurgeRequest' failed as data isn't a dictionary.`,
)
}

return {
all: data.all,
assets: data.assets,
createdAt: unmarshalDate(data.created_at),
id: data.id,
pipelineId: data.pipeline_id,
status: data.status,
updatedAt: unmarshalDate(data.updated_at),
} as PurgeRequest
}

export const unmarshalCheckDomainResponse = (
data: unknown,
): CheckDomainResponse => {
Expand Down
72 changes: 36 additions & 36 deletions packages/clients/src/api/edge_services/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,6 @@ export interface TLSSecret {
region: Region
}

export interface CheckPEMChainRequestSecretChain {
secretId: string
secretRegion: string
}

export interface BackendStage {
/** ID of the backend stage. */
id: string
Expand Down Expand Up @@ -242,37 +237,6 @@ export interface Pipeline {
dnsStageId?: string
}

export interface PlanDetails {
planName: PlanName
packageGb: number
pipelineLimit: number
}

export interface PurgeRequest {
/** ID of the purge request. */
id: string
/** Pipeline ID the purge request belongs to. */
pipelineId: string
/** Status of the purge request. */
status: PurgeRequestStatus
/**
* List of asserts to purge.
*
* One-of ('target'): at most one of 'assets', 'all' could be set.
*/
assets?: string[]
/**
* Defines whether to purge all content.
*
* One-of ('target'): at most one of 'assets', 'all' could be set.
*/
all?: boolean
/** Date the purge request was created. */
createdAt?: Date
/** Date the purge request was last updated. */
updatedAt?: Date
}

export interface TLSStage {
/** ID of the TLS stage. */
id: string
Expand Down Expand Up @@ -309,6 +273,42 @@ export interface TLSStage {
backendStageId?: string
}

export interface CheckPEMChainRequestSecretChain {
secretId: string
secretRegion: string
}

export interface PlanDetails {
planName: PlanName
packageGb: number
pipelineLimit: number
}

export interface PurgeRequest {
/** ID of the purge request. */
id: string
/** Pipeline ID the purge request belongs to. */
pipelineId: string
/** Status of the purge request. */
status: PurgeRequestStatus
/**
* List of asserts to purge.
*
* One-of ('target'): at most one of 'assets', 'all' could be set.
*/
assets?: string[]
/**
* Defines whether to purge all content.
*
* One-of ('target'): at most one of 'assets', 'all' could be set.
*/
all?: boolean
/** Date the purge request was created. */
createdAt?: Date
/** Date the purge request was last updated. */
updatedAt?: Date
}

export interface TLSSecretsConfig {
/** Secret information (from Secret Manager). */
tlsSecrets: TLSSecret[]
Expand Down