-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from Enterprise-CMCS/bruce
feat(OY2-26538): package action changelog
- Loading branch information
Showing
64 changed files
with
813 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
export type Hit<T> = { | ||
_index: string; | ||
_id: string; | ||
_score: number; | ||
_source: T; | ||
sort: Array<number>; | ||
}; | ||
export type Hits<T> = { | ||
hits: Hit<T>[]; | ||
max_score: number; | ||
total: { value: number; relation: "eq" }; | ||
}; | ||
|
||
export type Response<T> = { | ||
_shards: { | ||
total: number; | ||
failed: number; | ||
successful: number; | ||
skipped: number; | ||
}; | ||
hits: Hits<T>; | ||
total: { | ||
value: number; | ||
}; | ||
max_score: number | null; | ||
took: number; | ||
timed_out: boolean; | ||
aggregations?: AggResult; | ||
}; | ||
|
||
export type FilterType = | ||
| "term" | ||
| "terms" | ||
| "match" | ||
| "range" | ||
| "search" | ||
| "global_search" | ||
| "exists"; | ||
|
||
export type RangeValue = { gte?: string; lte?: string }; | ||
export type FilterValue = string | string[] | number | boolean | RangeValue; | ||
|
||
export type Filterable<_FIELD> = { | ||
type: FilterType; | ||
label?: string; | ||
component?: string; | ||
field: _FIELD; | ||
value: FilterValue; | ||
prefix: "must" | "must_not" | "should" | "filter"; | ||
}; | ||
|
||
export type QueryState<_FIELD> = { | ||
sort: { field: _FIELD; order: "asc" | "desc" }; | ||
pagination: { number: number; size: number }; | ||
filters: Filterable<_FIELD>[]; | ||
search?: string; | ||
}; | ||
|
||
export type AggQuery<_FIELD> = { | ||
name: string; | ||
type: FilterType; | ||
field: _FIELD; | ||
size: number; | ||
}; | ||
|
||
export type AggBucket = { key: string; doc_count: number }; | ||
|
||
export type AggResult = Record< | ||
string, | ||
{ | ||
doc_count_error_upper_bound: number; | ||
sum_other_doc_count: number; | ||
buckets: AggBucket[]; | ||
} | ||
>; | ||
|
||
export type ExportHeaderOptions<TData> = { | ||
transform: (data: TData) => string; | ||
name: string; | ||
}; | ||
|
||
export type Index = "main" | "seatool" | "changelog"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { | ||
Response as Res, | ||
Hit, | ||
Filterable as FIL, | ||
QueryState, | ||
AggQuery, | ||
} from "./_"; | ||
|
||
export type Document = { | ||
actionType: string; | ||
additionalInformation: string; | ||
attachments?: { | ||
bucket: string; | ||
filename: string; | ||
key: string; | ||
title: string; | ||
uploadDate: number; | ||
}[]; | ||
timestamp: string; | ||
authority: string; | ||
id: string; | ||
origin: string; | ||
packageId: string; | ||
proposedEffectiveDate: number; | ||
raiWithdrawEnabled: boolean; | ||
rais: any; | ||
requestedDate: number; | ||
responseDate: number; | ||
state: string; | ||
submitterEmail: string; | ||
submitterName: string; | ||
withdrawnDate: number; | ||
}; | ||
|
||
export type Response = Res<Document>; | ||
export type ItemResult = Hit<Document> & { | ||
found: boolean; | ||
}; | ||
|
||
export type Field = keyof Document | `${keyof Document}.keyword`; | ||
export type Filterable = FIL<Field>; | ||
export type State = QueryState<Field>; | ||
export type Aggs = AggQuery<Field>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * as changelog from "./changelog"; | ||
export * as main from "./main"; | ||
export * from "./_"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { | ||
SeaToolTransform, | ||
OnemacTransform, | ||
OnemacLegacyTransform, | ||
RaiIssueTransform, | ||
RaiResponseTransform, | ||
RaiWithdrawTransform, | ||
WithdrawPackageTransform, | ||
ToggleWithdrawRaiEnabledTransform, | ||
} from ".."; | ||
|
||
import { | ||
Response as Res, | ||
Hit, | ||
Filterable as FIL, | ||
QueryState, | ||
AggQuery, | ||
} from "./_"; | ||
import { ItemResult as Changelog } from "./changelog"; | ||
|
||
export type Document = OnemacTransform & | ||
OnemacLegacyTransform & | ||
SeaToolTransform & | ||
RaiIssueTransform & | ||
RaiResponseTransform & | ||
RaiWithdrawTransform & | ||
WithdrawPackageTransform & | ||
ToggleWithdrawRaiEnabledTransform & { changelog?: Changelog[] }; | ||
|
||
export type Response = Res<Document>; | ||
export type ItemResult = Hit<Document> & { | ||
found: boolean; | ||
}; | ||
|
||
export type Field = keyof Document | `${keyof Document}.keyword`; | ||
export type Filterable = FIL<Field>; | ||
export type State = QueryState<Field>; | ||
export type Aggs = AggQuery<Field>; |
4 changes: 2 additions & 2 deletions
4
src/packages/shared-utils/package-actions/getAvailableActions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.