@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.
@@ -114,13 +114,21 @@ export type ResourceDefinition<Entity, Create = Entity, Update = Partial<Entity>
114
114
  }>;
115
115
  }>;
116
116
  export type FilterValue = ResourceJsonValue | readonly ResourceJsonValue[];
117
+ /**
118
+ * A filter predicate. `field` names a declared filterable field, or a path
119
+ * through at most three fields that hold Entity References to a field of
120
+ * the last target, such as `company.industry` or
121
+ * `contacts.company.parent.industry`. On a field that holds Entity
122
+ * References, `is_empty` means no reference, and `contains_any` and
123
+ * `contains_all` compare the ids of a field that holds many.
124
+ */
117
125
  export type ResourceFilter = Readonly<{
118
126
  field: string;
119
- operator: "contains" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
127
+ operator: "contains" | "contains_all" | "contains_any" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
120
128
  value: FilterValue;
121
129
  }> | Readonly<{
122
130
  field: string;
123
- operator: "is_not_null" | "is_null";
131
+ operator: "is_empty" | "is_not_null" | "is_null";
124
132
  }> | Readonly<{
125
133
  filters: readonly ResourceFilter[];
126
134
  operator: "and" | "or";
@@ -143,6 +151,11 @@ export type ResourcePagination = Readonly<{
143
151
  }>;
144
152
  export type ResourceListQuery = Readonly<{
145
153
  filter?: ResourceFilter;
154
+ /**
155
+ * Include Paths, such as `["company", "contacts.company"]`: relation
156
+ * fields whose records each item carries in `included`.
157
+ */
158
+ include?: readonly string[];
146
159
  includeDeleted?: boolean;
147
160
  pagination: ResourcePagination;
148
161
  sort?: readonly ResourceSort[];
@@ -151,7 +164,15 @@ export type ResourceListQuery = Readonly<{
151
164
  export type ResourceRecord<Entity> = Readonly<{
152
165
  deletedAt?: string;
153
166
  id: ResourceRecordId;
167
+ /**
168
+ * The records of the read's Include Paths by relation field key: one
169
+ * record, or the records of a `many` field in reference order. Untyped:
170
+ * the target schemas are CI's.
171
+ */
172
+ included?: Readonly<Record<string, ResourceJsonValue>>;
154
173
  revision: ResourceRevision;
174
+ /** The keys whose included records were cut to the first 100. */
175
+ truncated?: readonly string[];
155
176
  value: Entity;
156
177
  }>;
157
178
  export type ResourceListResult<Entity> = Readonly<{
@@ -279,6 +300,7 @@ export type EntityRequest<Create = unknown, Patch = unknown> = EntityRequestIden
279
300
  }> | Readonly<{
280
301
  operation: "get";
281
302
  id: ResourceRecordId;
303
+ include?: readonly string[];
282
304
  }> | (Readonly<{
283
305
  operation: "create";
284
306
  }> & EntityCreateInput<Create>) | (Readonly<{