@collective-intelligence/external-apps-server-sdk 0.1.9 → 0.1.10

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.
@@ -65,13 +65,21 @@ export type ResourceDefinition<Entity, Create = Entity, Update = Partial<Entity>
65
65
  }>;
66
66
  }>;
67
67
  export type FilterValue = ResourceJsonValue | readonly ResourceJsonValue[];
68
+ /**
69
+ * A filter predicate. `field` names a declared filterable field, or a path
70
+ * through at most three fields that hold Entity References to a field of
71
+ * the last target, such as `company.industry` or
72
+ * `contacts.company.parent.industry`. On a field that holds Entity
73
+ * References, `is_empty` means no reference, and `contains_any` and
74
+ * `contains_all` compare the ids of a field that holds many.
75
+ */
68
76
  export type ResourceFilter = Readonly<{
69
77
  field: string;
70
- operator: "contains" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
78
+ operator: "contains" | "contains_all" | "contains_any" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
71
79
  value: FilterValue;
72
80
  }> | Readonly<{
73
81
  field: string;
74
- operator: "is_not_null" | "is_null";
82
+ operator: "is_empty" | "is_not_null" | "is_null";
75
83
  }> | Readonly<{
76
84
  filters: readonly ResourceFilter[];
77
85
  operator: "and" | "or";
@@ -94,6 +102,11 @@ export type ResourcePagination = Readonly<{
94
102
  }>;
95
103
  export type ResourceListQuery = Readonly<{
96
104
  filter?: ResourceFilter;
105
+ /**
106
+ * Include Paths, such as `["company", "contacts.company"]`: relation
107
+ * fields whose records each item carries in `included`.
108
+ */
109
+ include?: readonly string[];
97
110
  includeDeleted?: boolean;
98
111
  pagination: ResourcePagination;
99
112
  sort?: readonly ResourceSort[];
@@ -102,7 +115,15 @@ export type ResourceListQuery = Readonly<{
102
115
  export type ResourceRecord<Entity> = Readonly<{
103
116
  deletedAt?: string;
104
117
  id: ResourceRecordId;
118
+ /**
119
+ * The records of the read's Include Paths by relation field key: one
120
+ * record, or the records of a `many` field in reference order. Untyped:
121
+ * the target schemas are CI's.
122
+ */
123
+ included?: Readonly<Record<string, ResourceJsonValue>>;
105
124
  revision: ResourceRevision;
125
+ /** The keys whose included records were cut to the first 100. */
126
+ truncated?: readonly string[];
106
127
  value: Entity;
107
128
  }>;
108
129
  export type ResourceListResult<Entity> = Readonly<{
@@ -230,6 +251,7 @@ export type EntityRequest<Create = unknown, Patch = unknown> = EntityRequestIden
230
251
  }> | Readonly<{
231
252
  operation: "get";
232
253
  id: ResourceRecordId;
254
+ include?: readonly string[];
233
255
  }> | (Readonly<{
234
256
  operation: "create";
235
257
  }> & EntityCreateInput<Create>) | (Readonly<{