@spotto/contract 1.0.61-alpha.0 → 1.0.61-alpha.1
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.
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { StandardSortFields, SortOrders } from '../../shared';
|
|
1
|
+
import { StandardSortFields, SortOrders, IPaginationQuery } from '../../shared';
|
|
2
2
|
export declare type FieldSortField = StandardSortFields | 'label';
|
|
3
3
|
export declare type FieldEmbedField = 'meta';
|
|
4
|
-
export interface GetFieldsQuery {
|
|
5
|
-
page?: number;
|
|
6
|
-
limit?: number;
|
|
4
|
+
export interface GetFieldsQuery extends IPaginationQuery {
|
|
7
5
|
names?: string[];
|
|
8
6
|
sort?: FieldSortField;
|
|
9
7
|
sortOrder?: SortOrders;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { GetFieldsQuery } from './query';
|
|
2
2
|
import { GetFieldResponse } from '../[id]/get';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
total: number;
|
|
6
|
-
items: GetFieldResponse[];
|
|
3
|
+
import { IPaginatedResponse } from '../../shared';
|
|
4
|
+
export interface GetFieldsResponse extends IPaginatedResponse<GetFieldResponse, GetFieldsQuery> {
|
|
7
5
|
}
|
package/dist/shared/query.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
export interface IQueryStringParameters {
|
|
2
2
|
[name: string]: string | undefined;
|
|
3
3
|
}
|
|
4
|
+
export interface IPaginationQuery {
|
|
5
|
+
limit?: number;
|
|
6
|
+
page?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IPaginatedResponse<T, Q extends IPaginationQuery = IPaginationQuery> {
|
|
9
|
+
query: Q | null;
|
|
10
|
+
total: number;
|
|
11
|
+
items: T[];
|
|
12
|
+
}
|
package/dist/shared/sort.d.ts
CHANGED
|
@@ -4,3 +4,7 @@ export declare type SearchableSortFields = StandardSortFields | 'relevancy';
|
|
|
4
4
|
export declare const searchableSortFields: SearchableSortFields[];
|
|
5
5
|
export declare type SortOrders = 'asc' | 'desc';
|
|
6
6
|
export declare const sortOrders: SortOrders[];
|
|
7
|
+
export interface IStandardSortQuery {
|
|
8
|
+
sort?: StandardSortFields;
|
|
9
|
+
sortOrder?: SortOrders;
|
|
10
|
+
}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
+
import { IPaginationQuery, IStandardSortQuery } from '../shared';
|
|
2
|
+
export declare type WorkflowActionEmail = {
|
|
3
|
+
type: 'EMAIL';
|
|
4
|
+
to: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare type WorkflowAction = WorkflowActionEmail;
|
|
7
|
+
export declare type WorkflowConditionSnapshotCreatedWithMissingItems = {
|
|
8
|
+
type: 'SNAPSHOT_CREATED_WITH_MISSING_ITEMS';
|
|
9
|
+
};
|
|
10
|
+
export declare type WorkflowCondition = WorkflowConditionSnapshotCreatedWithMissingItems;
|
|
1
11
|
export declare type NewWorkflow = {
|
|
2
12
|
name: string;
|
|
3
13
|
trigger: 'SNAPSHOT_CREATED';
|
|
4
|
-
conditions?:
|
|
5
|
-
|
|
6
|
-
}[];
|
|
7
|
-
actions: {
|
|
8
|
-
type: 'EMAIL';
|
|
9
|
-
to: string[];
|
|
10
|
-
}[];
|
|
14
|
+
conditions?: WorkflowCondition[];
|
|
15
|
+
actions: WorkflowAction[];
|
|
11
16
|
};
|
|
12
17
|
export declare type Workflow = NewWorkflow & {
|
|
13
18
|
id: string;
|
|
14
|
-
|
|
19
|
+
organisation: string;
|
|
20
|
+
lastUpdated: number;
|
|
15
21
|
};
|
|
22
|
+
export interface GetWorkflowsQuery extends IStandardSortQuery, IPaginationQuery {
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "1.0.61-alpha.
|
|
4
|
+
"version": "1.0.61-alpha.1",
|
|
5
5
|
"description": "Spotto's API Contract type definitions",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"@types/geojson": "^7946.0.11",
|
|
19
19
|
"shx": "^0.3.4"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "16f1cc8f8af2c739013a048c03fb02f729909f66"
|
|
22
22
|
}
|