@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.
@@ -426,13 +426,21 @@ export type ResourceDefinition<Entity, Create = Entity, Update = Partial<Entity>
426
426
  }>;
427
427
  }>;
428
428
  export type FilterValue = ResourceJsonValue | readonly ResourceJsonValue[];
429
+ /**
430
+ * A filter predicate. `field` names a declared filterable field, or a path
431
+ * through at most three fields that hold Entity References to a field of
432
+ * the last target, such as `company.industry` or
433
+ * `contacts.company.parent.industry`. On a field that holds Entity
434
+ * References, `is_empty` means no reference, and `contains_any` and
435
+ * `contains_all` compare the ids of a field that holds many.
436
+ */
429
437
  export type ResourceFilter = Readonly<{
430
438
  field: string;
431
- operator: "contains" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
439
+ operator: "contains" | "contains_all" | "contains_any" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
432
440
  value: FilterValue;
433
441
  }> | Readonly<{
434
442
  field: string;
435
- operator: "is_not_null" | "is_null";
443
+ operator: "is_empty" | "is_not_null" | "is_null";
436
444
  }> | Readonly<{
437
445
  filters: readonly ResourceFilter[];
438
446
  operator: "and" | "or";
@@ -455,6 +463,11 @@ export type ResourcePagination = Readonly<{
455
463
  }>;
456
464
  export type ResourceListQuery = Readonly<{
457
465
  filter?: ResourceFilter;
466
+ /**
467
+ * Include Paths, such as `["company", "contacts.company"]`: relation
468
+ * fields whose records each item carries in `included`.
469
+ */
470
+ include?: readonly string[];
458
471
  includeDeleted?: boolean;
459
472
  pagination: ResourcePagination;
460
473
  sort?: readonly ResourceSort[];
@@ -67,13 +67,21 @@ export type ResourceDefinition<Entity, Create = Entity, Update = Partial<Entity>
67
67
  }>;
68
68
  }>;
69
69
  export type FilterValue = ResourceJsonValue | readonly ResourceJsonValue[];
70
+ /**
71
+ * A filter predicate. `field` names a declared filterable field, or a path
72
+ * through at most three fields that hold Entity References to a field of
73
+ * the last target, such as `company.industry` or
74
+ * `contacts.company.parent.industry`. On a field that holds Entity
75
+ * References, `is_empty` means no reference, and `contains_any` and
76
+ * `contains_all` compare the ids of a field that holds many.
77
+ */
70
78
  export type ResourceFilter = Readonly<{
71
79
  field: string;
72
- operator: "contains" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
80
+ operator: "contains" | "contains_all" | "contains_any" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
73
81
  value: FilterValue;
74
82
  }> | Readonly<{
75
83
  field: string;
76
- operator: "is_not_null" | "is_null";
84
+ operator: "is_empty" | "is_not_null" | "is_null";
77
85
  }> | Readonly<{
78
86
  filters: readonly ResourceFilter[];
79
87
  operator: "and" | "or";
@@ -96,6 +104,11 @@ export type ResourcePagination = Readonly<{
96
104
  }>;
97
105
  export type ResourceListQuery = Readonly<{
98
106
  filter?: ResourceFilter;
107
+ /**
108
+ * Include Paths, such as `["company", "contacts.company"]`: relation
109
+ * fields whose records each item carries in `included`.
110
+ */
111
+ include?: readonly string[];
99
112
  includeDeleted?: boolean;
100
113
  pagination: ResourcePagination;
101
114
  sort?: readonly ResourceSort[];
@@ -104,7 +117,15 @@ export type ResourceListQuery = Readonly<{
104
117
  export type ResourceRecord<Entity> = Readonly<{
105
118
  deletedAt?: string;
106
119
  id: ResourceRecordId;
120
+ /**
121
+ * The records of the read's Include Paths by relation field key: one
122
+ * record, or the records of a `many` field in reference order. Untyped:
123
+ * the target schemas are CI's.
124
+ */
125
+ included?: Readonly<Record<string, ResourceJsonValue>>;
107
126
  revision: ResourceRevision;
127
+ /** The keys whose included records were cut to the first 100. */
128
+ truncated?: readonly string[];
108
129
  value: Entity;
109
130
  }>;
110
131
  export type ResourceListResult<Entity> = Readonly<{
@@ -232,6 +253,7 @@ export type EntityRequest<Create = unknown, Patch = unknown> = EntityRequestIden
232
253
  }> | Readonly<{
233
254
  operation: "get";
234
255
  id: ResourceRecordId;
256
+ include?: readonly string[];
235
257
  }> | (Readonly<{
236
258
  operation: "create";
237
259
  }> & EntityCreateInput<Create>) | (Readonly<{