@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.
- package/README.md +73 -0
- package/dist/admin.d.ts +348 -12
- package/dist/express.d.ts +15 -2
- package/dist/gateway/contracts.d.ts +15 -2
- package/dist/gateway.d.ts +15 -2
- package/dist/gateway.js +2 -2
- package/dist/index.d.ts +79 -0
- package/dist/index.js +3 -3
- package/dist/knowledge-sources/payload.d.ts +23 -2
- package/dist/knowledge-sources/strapi.d.ts +23 -2
- package/dist/persistence/drizzle.d.ts +39 -2
- package/dist/persistence/drizzle.js +4 -4
- package/dist/resources.d.ts +24 -2
- package/dist/resources.js +3 -3
- package/dist/runtime/effect.d.ts +81 -2
- package/dist/runtime/effect.js +4 -4
- package/dist/runtime/express.d.ts +15 -2
- package/dist/runtime/nestjs.d.ts +24 -2
- package/dist/runtime/nestjs.js +1 -1
- package/dist/runtime/next.d.ts +24 -2
- package/dist/runtime/next.js +1 -1
- package/dist/runtime/web.d.ts +15 -2
- package/dist/runtime/web.js +1 -1
- package/dist/tools/ai-sdk.js +2 -2
- package/package.json +3 -3
|
@@ -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[];
|
package/dist/runtime/nestjs.d.ts
CHANGED
|
@@ -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<{
|