@chili-publish/studio-connectors 1.15.0 → 1.17.0

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.
@@ -0,0 +1,42 @@
1
+ import { ConnectorConfigValue, ConnectorRuntimeContext, Dictionary } from './Connector.Shared';
2
+ export interface DataConnector {
3
+ getPage(config: PageConfig, context: Dictionary): Promise<DataPage>;
4
+ getModel(context: Dictionary): Promise<DataModel>;
5
+ getConfigurationOptions(): ConnectorConfigValue[] | null;
6
+ getCapabilities(): DataConnectorCapabilities;
7
+ }
8
+ export type DataConnectorRuntimeContext = ConnectorRuntimeContext;
9
+ export type DataConnectorCapabilities = {
10
+ filtering: boolean;
11
+ sorting: boolean;
12
+ model: boolean;
13
+ };
14
+ export declare class DataModel {
15
+ properties: DataModelProperty[];
16
+ }
17
+ export declare class DataModelProperty {
18
+ name: string;
19
+ type: 'number' | 'boolean' | 'singleLine' | 'multiLine' | 'date';
20
+ }
21
+ export type DataItem = {
22
+ [key: string]: string | number | boolean | Date | null;
23
+ };
24
+ export interface DataPage {
25
+ data: DataItem[];
26
+ continuationToken?: string | null;
27
+ }
28
+ export interface PageConfig {
29
+ filters?: DataFilter[] | null;
30
+ sorting?: DataSorting[] | null;
31
+ continuationToken?: string | null;
32
+ limit: number;
33
+ }
34
+ export interface DataSorting {
35
+ property: string;
36
+ direction: 'asc' | 'desc';
37
+ }
38
+ export interface DataFilter {
39
+ property: string;
40
+ value: string;
41
+ type: 'contains' | 'exact';
42
+ }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * as Connector from './Connector.Shared';
2
+ export * as Data from './DataConnector';
2
3
  export * as Font from './FontConnector';
3
4
  export * as Media from './MediaConnector';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chili-publish/studio-connectors",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "types": "dist/index.d.ts",
5
5
  "files": [
6
6
  "dist"