Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integrations/.nango/nango.json
Original file line number Diff line number Diff line change
Expand Up @@ -16882,7 +16882,7 @@
"User",
"SyncMetadata_zendesk_users"
],
"version": "2.0.0",
"version": "2.0.1",
"webhookSubscriptions": []
}
],
Expand Down
11 changes: 11 additions & 0 deletions integrations/.nango/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -65801,6 +65801,17 @@
},
"email": {
"type": "string"
},
"user_fields": {
"type": "object",
"additionalProperties": {
"anyOf": [
{},
{
"not": {}
}
]
}
}
},
"required": [
Expand Down
1 change: 1 addition & 0 deletions integrations/.nango/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14066,6 +14066,7 @@ export interface ActionOutput_zendesk_createuser {
firstName: string;
lastName: string;
email: string;
user_fields?: { [key: string]: any | undefined;};
};

export interface ActionInput_zendesk_deleteuser {
Expand Down
2 changes: 1 addition & 1 deletion integrations/zendesk/.nango/nango.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
"User",
"SyncMetadata_zendesk_users"
],
"version": "2.0.0",
"version": "2.0.1",
"webhookSubscriptions": []
}
],
Expand Down
11 changes: 11 additions & 0 deletions integrations/zendesk/.nango/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,17 @@
},
"email": {
"type": "string"
},
"user_fields": {
"type": "object",
"additionalProperties": {
"anyOf": [
{},
{
"not": {}
}
]
}
}
},
"required": [
Expand Down
1 change: 1 addition & 0 deletions integrations/zendesk/.nango/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export interface ActionOutput_zendesk_createuser {
firstName: string;
lastName: string;
email: string;
user_fields?: { [key: string]: any | undefined;};
};

export interface ActionInput_zendesk_deleteuser {
Expand Down
71 changes: 47 additions & 24 deletions integrations/zendesk/mocks/users/User/batchSave.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,138 +3,161 @@
"id": "32763192893073",
"firstName": "The",
"lastName": "Customer",
"email": "customer@example.com"
"email": "customer@example.com",
"user_fields": {}
},
{
"id": "32763206658065",
"firstName": "Kelvin",
"lastName": "Wari",
"email": "hassanwari254@gmail.com"
"email": "hassanwari254@gmail.com",
"user_fields": {}
},
{
"id": "32763235076113",
"firstName": "Zhang",
"lastName": "Wei",
"email": "zhang.weixu@example.com"
"email": "zhang.weixu@example.com",
"user_fields": {}
},
{
"id": "32763235217681",
"firstName": "Ingrid",
"lastName": "Van",
"email": "ingrid.vandijk@example.com"
"email": "ingrid.vandijk@example.com",
"user_fields": {}
},
{
"id": "32763266879633",
"firstName": "Soobin",
"lastName": "Do",
"email": "soobin.do@example.com"
"email": "soobin.do@example.com",
"user_fields": {}
},
{
"id": "32763282580241",
"firstName": "Customer",
"lastName": "",
"email": "example@zendesk.com"
"email": "example@zendesk.com",
"user_fields": {}
},
{
"id": "32768199515537",
"firstName": "Roger",
"lastName": "Wilco",
"email": null
"email": null,
"user_fields": {}
},
{
"id": "32768693470737",
"firstName": "Roger",
"lastName": "Wilco",
"email": null
"email": null,
"user_fields": {}
},
{
"id": "32768722488209",
"firstName": "Roger",
"lastName": "Wilco",
"email": null
"email": null,
"user_fields": {}
},
{
"id": "32768749121553",
"firstName": "tests",
"lastName": "in",
"email": "tco@test.com"
"email": "tco@test.com",
"user_fields": {}
},
{
"id": "32777971122577",
"firstName": "John",
"lastName": "Doe",
"email": "johndoe@example.com"
"email": "johndoe@example.com",
"user_fields": {}
},
{
"id": "32778022853009",
"firstName": "Johns",
"lastName": "Doe",
"email": "johndoes@example.com"
"email": "johndoes@example.com",
"user_fields": {}
},
{
"id": "32778051354129",
"firstName": "Johns",
"lastName": "Doe",
"email": "johndoes@examples.com"
"email": "johndoes@examples.com",
"user_fields": {}
},
{
"id": "32778088066961",
"firstName": "Johns",
"lastName": "Does",
"email": "johndoesss@example.com"
"email": "johndoesss@example.com",
"user_fields": {}
},
{
"id": "32778096357905",
"firstName": "Johnsw",
"lastName": "Does",
"email": "johndoesssww@example.com"
"email": "johndoesssww@example.com",
"user_fields": {}
},
{
"id": "32778150390161",
"firstName": "John",
"lastName": "Doe",
"email": "customer1@example.com"
"email": "customer1@example.com",
"user_fields": {}
},
{
"id": "32778203764369",
"firstName": "James",
"lastName": "Doe",
"email": "jamescustomer@example.com"
"email": "jamescustomer@example.com",
"user_fields": {}
},
{
"id": "32888998590865",
"firstName": "Jane",
"lastName": "Doe",
"email": "janedoe@example.com"
"email": "janedoe@example.com",
"user_fields": {}
},
{
"id": "32889172187409",
"firstName": "Sample",
"lastName": "User",
"email": "sampleuser-1@gmail.com"
"email": "sampleuser-1@gmail.com",
"user_fields": {}
},
{
"id": "32889564879505",
"firstName": "Sample",
"lastName": "User2",
"email": "sampleuser-2@gmail.com"
"email": "sampleuser-2@gmail.com",
"user_fields": {}
},
{
"id": "32889653118481",
"firstName": "Sample",
"lastName": "User2",
"email": "sampleuser-2@gmail.comp"
"email": "sampleuser-2@gmail.comp",
"user_fields": {}
},
{
"id": "32890003697937",
"firstName": "Sample",
"lastName": "User2999",
"email": "sampleuser-3@gmail.com"
"email": "sampleuser-3@gmail.com",
"user_fields": {}
},
{
"id": "32981016448017",
"firstName": "Sample",
"lastName": "User2",
"email": "sampleuser-43@gmail.com"
"email": "sampleuser-43@gmail.com",
"user_fields": {}
}
]
]
3 changes: 2 additions & 1 deletion integrations/zendesk/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const User = z.object({
id: z.string(),
firstName: z.string(),
lastName: z.string(),
email: z.string()
email: z.string(),
user_fields: z.record(z.string(), z.any()).optional()
});

export type User = z.infer<typeof User>;
Expand Down
5 changes: 3 additions & 2 deletions integrations/zendesk/syncs/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { z } from 'zod';

const sync = createSync({
description: 'Fetches a list of admin or agent users from Zendesk',
version: '2.0.0',
version: '2.0.1',
frequency: 'every 6 hours',
autoStart: true,
syncType: 'full',
Expand Down Expand Up @@ -58,7 +58,8 @@ const sync = createSync({
id: zUser.id.toString(),
firstName: firstName || '',
lastName: lastName || '',
email: zUser.email
email: zUser.email,
user_fields: zUser.user_fields
};
});

Expand Down
2 changes: 1 addition & 1 deletion integrations/zendesk/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export interface ZendeskUser {
suspended: boolean;
default_group_id: number;
report_csv: boolean;
user_fields: Record<string, any>;
user_fields?: Record<string, any>;
}

interface ZendeskAttachmet {
Expand Down
13 changes: 12 additions & 1 deletion internal/flows.zero.json
Original file line number Diff line number Diff line change
Expand Up @@ -100039,7 +100039,7 @@
"sync_type": "full",
"track_deletes": false,
"usedModels": ["User", "SyncMetadata_zendesk_users"],
"version": "2.0.0",
"version": "2.0.1",
"webhookSubscriptions": []
}
],
Expand Down Expand Up @@ -100769,6 +100769,17 @@
},
"email": {
"type": "string"
},
"user_fields": {
"type": "object",
"additionalProperties": {
"anyOf": [
{},
{
"not": {}
}
]
}
}
},
"required": ["id", "firstName", "lastName", "email"],
Expand Down
Loading