Skip to content

Commit 848a25d

Browse files
committed
feat: include contact fields on the api
1 parent 265a25a commit 848a25d

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

apps/api/src/chat/entities/contact.ts

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export class Contact extends BaseEntity {
3131
@prop({ default: [], index: true })
3232
tags: string[]
3333

34+
@Field(() => GraphQLJSONObject, { nullable: true })
3435
@jsonProp()
3536
fields?: Record<string, any>
3637
}

apps/runner/src/utils/input.utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function parseInput(input: unknown, outputs: Record<string, Record<string
6060
*/
6161
export function calculateExpression(input: string, references: Record<string, Record<string, unknown>>): unknown {
6262
// each "[\w[\]]" group matches the allowed characters for variables, including array access (e.g. a.b[0].c)
63-
const operatorsRegex = /[\w\s[\]]+(\.[\w\s[\]]+|\[\d+\])*/g
63+
const operatorsRegex = /[\w[\]]+\.[\w[\]]+(\.[\w[\]]+)*/g
6464

6565
const operators = [...input.matchAll(operatorsRegex)]
6666

generated/graphql.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,7 @@ export interface Contact {
10601060
createdAt: DateTime;
10611061
address: string;
10621062
tags?: Nullable<string[]>;
1063+
fields?: Nullable<JSONObject>;
10631064
}
10641065

10651066
export interface AccountCredential {
@@ -1372,6 +1373,7 @@ export interface ContactDeleteResponse {
13721373
createdAt?: Nullable<DateTime>;
13731374
address?: Nullable<string>;
13741375
tags?: Nullable<string[]>;
1376+
fields?: Nullable<JSONObject>;
13751377
}
13761378

13771379
export interface ContactEdge {

generated/schema.graphql

+2
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ type Contact {
413413
createdAt: DateTime!
414414
address: String!
415415
tags: [String!]
416+
fields: JSONObject
416417
}
417418

418419
type AccountCredential {
@@ -826,6 +827,7 @@ type ContactDeleteResponse {
826827
createdAt: DateTime
827828
address: String
828829
tags: [String!]
830+
fields: JSONObject
829831
}
830832

831833
type ContactEdge {

0 commit comments

Comments
 (0)