Skip to content

Commit c951ac6

Browse files
committed
fix(integrations): address PR review comments
1 parent 9f44ae1 commit c951ac6

5 files changed

Lines changed: 9 additions & 6 deletions

File tree

apps/docs/content/docs/en/tools/gong.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Retrieve call data by date range from Gong.
4848
| `accessKey` | string | Yes | Gong API Access Key |
4949
| `accessKeySecret` | string | Yes | Gong API Access Key Secret |
5050
| `fromDateTime` | string | Yes | Start date/time in ISO-8601 format \(e.g., 2024-01-01T00:00:00Z\) |
51-
| `toDateTime` | string | Yes | End date/time in ISO-8601 format \(e.g., 2024-01-31T23:59:59Z\) |
51+
| `toDateTime` | string | No | End date/time in ISO-8601 format \(e.g., 2024-01-31T23:59:59Z\). Defaults to the current execution time when omitted. |
5252
| `cursor` | string | No | Pagination cursor from a previous response |
5353
| `workspaceId` | string | No | Gong workspace ID to filter calls |
5454

apps/sim/blocks/blocks/gong.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ Return ONLY the JSON array - no explanations, no quotes, no extra text.`,
179179
field: 'operation',
180180
value: ['list_calls'],
181181
},
182-
required: { field: 'operation', value: 'list_calls' },
183182
wandConfig: {
184183
enabled: true,
185184
prompt: `Generate an ISO 8601 timestamp based on the user's description.

apps/sim/tools/gong/list_calls.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ export const listCallsTool: ToolConfig<GongListCallsParams, GongListCallsRespons
2929
},
3030
toDateTime: {
3131
type: 'string',
32-
required: true,
32+
required: false,
3333
visibility: 'user-or-llm',
34-
description: 'End date/time in ISO-8601 format (e.g., 2024-01-31T23:59:59Z)',
34+
description:
35+
'End date/time in ISO-8601 format (e.g., 2024-01-31T23:59:59Z). Defaults to the current execution time when omitted.',
3536
},
3637
cursor: {
3738
type: 'string',
@@ -51,7 +52,7 @@ export const listCallsTool: ToolConfig<GongListCallsParams, GongListCallsRespons
5152
url: (params) => {
5253
const url = new URL('https://api.gong.io/v2/calls')
5354
url.searchParams.set('fromDateTime', params.fromDateTime.trim())
54-
url.searchParams.set('toDateTime', params.toDateTime.trim())
55+
url.searchParams.set('toDateTime', params.toDateTime?.trim() || new Date().toISOString())
5556
if (params.cursor?.trim()) url.searchParams.set('cursor', params.cursor.trim())
5657
if (params.workspaceId?.trim()) url.searchParams.set('workspaceId', params.workspaceId.trim())
5758
return url.toString()

apps/sim/tools/gong/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface GongBaseParams {
99
/** List Calls */
1010
export interface GongListCallsParams extends GongBaseParams {
1111
fromDateTime: string
12-
toDateTime: string
12+
toDateTime?: string
1313
cursor?: string
1414
workspaceId?: string
1515
}

apps/sim/tools/new_relic/create_deployment_event.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ const buildCustomAttributes = (
134134
const buildDeploymentMutation = (params: NewRelicCreateDeploymentEventParams): string => {
135135
const deploymentType = getDeploymentType(params.deploymentType)
136136
const entityGuid = params.entityGuid.trim()
137+
if (!entityGuid || entityGuid.includes("'")) {
138+
throw new Error('Invalid entity GUID: value must not be empty or contain single quotes')
139+
}
137140
const version = params.version.trim()
138141
const shortDescription = cleanOptionalString(params.shortDescription)
139142
const description = cleanOptionalString(params.description)

0 commit comments

Comments
 (0)