leash-integration-gong 0.1.0
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.
- checksums.yaml +7 -0
- data/lib/leash/integration/gong.rb +173 -0
- metadata +57 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 16599683769f00b9b2d99aa4a533eda7c98322c3c01b1f6a6c945a468b7c4156
|
|
4
|
+
data.tar.gz: 1370b9fb542461d19b2b50f7e881c897ad6be4b263adf6cdba7d2e8c8fb90ee6
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 96742d891151a7f628c9f45c93b03bbc789525218d8776427fd89793ea64e4a5714ee0a5522ba43972e1b223c1c4e9b9515864958bbd543138e24c5c2aca45d5
|
|
7
|
+
data.tar.gz: 840015548a152ab31cd93bdcff05523ab3b0a56521df03bbf61f1be9c71fad88110bc148048682f3428d06d7c193623f71340916261b719b3a8b18467e5f84b1
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Auto-generated by leash-codegen — do not edit manually
|
|
4
|
+
|
|
5
|
+
module Leash
|
|
6
|
+
module Integration
|
|
7
|
+
class GongClient
|
|
8
|
+
# Create a new Gong integration client.
|
|
9
|
+
#
|
|
10
|
+
# @param leash [Leash::Client] the Leash SDK client
|
|
11
|
+
def initialize(leash)
|
|
12
|
+
@leash = leash
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# List Gong calls with optional date filtering. Returns minimal call metadata (ID, title, date, duration). Use get_call_summary for details or get_call_transcript for full transcript.
|
|
16
|
+
#
|
|
17
|
+
# @param fromdatetime [String, nil] Start date/time filter in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Must be before toDateTime if both specified.
|
|
18
|
+
# @param todatetime [String, nil] End date/time filter in ISO 8601 format (e.g., 2024-01-31T23:59:59Z). Must be after fromDateTime if both specified.
|
|
19
|
+
# @param workspaceid [String, nil] Filter calls by workspace ID (numeric string up to 20 digits)
|
|
20
|
+
# @param cursor [String, nil] Pagination cursor for fetching next page of results
|
|
21
|
+
# @return [Object]
|
|
22
|
+
def list_calls(fromdatetime: nil, todatetime: nil, workspaceid: nil, cursor: nil)
|
|
23
|
+
params = {
|
|
24
|
+
'fromDateTime' => fromdatetime,
|
|
25
|
+
'toDateTime' => todatetime,
|
|
26
|
+
'workspaceId' => workspaceid,
|
|
27
|
+
'cursor' => cursor
|
|
28
|
+
}.compact
|
|
29
|
+
@leash.call('gong', 'list_calls', params)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Get an AI-generated summary of a single call including brief overview, key points, topics, action items, and detailed outline. This is the recommended way to understand a call - use get_call_transc...
|
|
33
|
+
#
|
|
34
|
+
# @param callid [String] Gong call ID (numeric string up to 20 digits)
|
|
35
|
+
# @return [Object]
|
|
36
|
+
def get_call_summary(callid)
|
|
37
|
+
params = {
|
|
38
|
+
'callId' => callid
|
|
39
|
+
}.compact
|
|
40
|
+
@leash.call('gong', 'get_call_summary', params)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Get the raw transcript for a single call with speaker-attributed text. Only use this when you need exact quotes - prefer get_call_summary for understanding call content. Transcripts are truncated b...
|
|
44
|
+
#
|
|
45
|
+
# @param callid [String] Gong call ID (numeric string up to 20 digits)
|
|
46
|
+
# @param maxlength [Float, nil] Maximum characters to return (default: 10000, ~10KB). Longer transcripts are truncated with pagination info.
|
|
47
|
+
# @param offset [Float, nil] Character offset to start from (default: 0). Use to paginate through long transcripts.
|
|
48
|
+
# @return [Object]
|
|
49
|
+
def get_call_transcript(callid, maxlength: nil, offset: nil)
|
|
50
|
+
params = {
|
|
51
|
+
'callId' => callid,
|
|
52
|
+
'maxLength' => maxlength,
|
|
53
|
+
'offset' => offset
|
|
54
|
+
}.compact
|
|
55
|
+
@leash.call('gong', 'get_call_transcript', params)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# List all Gong users in your workspace. Returns user details including name, email, and title.
|
|
59
|
+
#
|
|
60
|
+
# @param cursor [String, nil] Pagination cursor for fetching next page of results
|
|
61
|
+
# @param includeavatars [Boolean, nil] Whether to include user avatar URLs in the response
|
|
62
|
+
# @return [Object]
|
|
63
|
+
def list_users(cursor: nil, includeavatars: nil)
|
|
64
|
+
params = {
|
|
65
|
+
'cursor' => cursor,
|
|
66
|
+
'includeAvatars' => includeavatars
|
|
67
|
+
}.compact
|
|
68
|
+
@leash.call('gong', 'list_users', params)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Search for Gong calls with advanced filters including date range, workspace, primary users (call hosts), and specific call IDs. More flexible than list_calls for targeted queries.
|
|
72
|
+
#
|
|
73
|
+
# @param fromdatetime [String, nil] Start date/time filter in ISO 8601 format (e.g., 2024-01-01T00:00:00Z). Must be before toDateTime if both specified.
|
|
74
|
+
# @param todatetime [String, nil] End date/time filter in ISO 8601 format (e.g., 2024-01-31T23:59:59Z). Must be after fromDateTime if both specified.
|
|
75
|
+
# @param workspaceid [String, nil] Filter calls by workspace ID (numeric string up to 20 digits)
|
|
76
|
+
# @param primaryuserids [Array, nil] Filter by primary user IDs (call hosts). Array of numeric strings.
|
|
77
|
+
# @param callids [Array, nil] Filter by specific call IDs. Array of numeric strings.
|
|
78
|
+
# @param cursor [String, nil] Pagination cursor for fetching next page of results
|
|
79
|
+
# @return [Object]
|
|
80
|
+
def search_calls(fromdatetime: nil, todatetime: nil, workspaceid: nil, primaryuserids: nil, callids: nil, cursor: nil)
|
|
81
|
+
params = {
|
|
82
|
+
'fromDateTime' => fromdatetime,
|
|
83
|
+
'toDateTime' => todatetime,
|
|
84
|
+
'workspaceId' => workspaceid,
|
|
85
|
+
'primaryUserIds' => primaryuserids,
|
|
86
|
+
'callIds' => callids,
|
|
87
|
+
'cursor' => cursor
|
|
88
|
+
}.compact
|
|
89
|
+
@leash.call('gong', 'search_calls', params)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Get metadata for a specific Gong call including URL, direction, scope, system, and duration. Faster than get_call_summary when you only need call metadata.
|
|
93
|
+
#
|
|
94
|
+
# @param callid [String] Gong call ID (numeric string up to 20 digits)
|
|
95
|
+
# @return [Object]
|
|
96
|
+
def get_call(callid)
|
|
97
|
+
params = {
|
|
98
|
+
'callId' => callid
|
|
99
|
+
}.compact
|
|
100
|
+
@leash.call('gong', 'get_call', params)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# List all keyword tracker definitions including tracked phrases, affiliation (who speaks them), and filter queries. Explains tracker hits visible in call summaries.
|
|
104
|
+
#
|
|
105
|
+
# @param workspaceid [String, nil] Filter trackers by workspace ID
|
|
106
|
+
# @return [Object]
|
|
107
|
+
def get_trackers(workspaceid: nil)
|
|
108
|
+
params = {
|
|
109
|
+
'workspaceId' => workspaceid
|
|
110
|
+
}.compact
|
|
111
|
+
@leash.call('gong', 'get_trackers', params)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Get a specific user profile including name, email, title, phone, and settings. Use to resolve user IDs returned from call data.
|
|
115
|
+
#
|
|
116
|
+
# @param userid [String] Gong user ID (numeric string up to 20 digits)
|
|
117
|
+
# @return [Object]
|
|
118
|
+
def get_user(userid)
|
|
119
|
+
params = {
|
|
120
|
+
'userId' => userid
|
|
121
|
+
}.compact
|
|
122
|
+
@leash.call('gong', 'get_user', params)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Search and filter users by IDs or creation date. More flexible than list_users for resolving specific user IDs from call data.
|
|
126
|
+
#
|
|
127
|
+
# @param userids [Array, nil] Specific user IDs to look up
|
|
128
|
+
# @param createdfromdatetime [String, nil] Filter users created after this datetime (ISO 8601)
|
|
129
|
+
# @param createdtodatetime [String, nil] Filter users created before this datetime (ISO 8601)
|
|
130
|
+
# @param cursor [String, nil] Pagination cursor for fetching next page
|
|
131
|
+
# @return [Object]
|
|
132
|
+
def search_users(userids: nil, createdfromdatetime: nil, createdtodatetime: nil, cursor: nil)
|
|
133
|
+
params = {
|
|
134
|
+
'userIds' => userids,
|
|
135
|
+
'createdFromDateTime' => createdfromdatetime,
|
|
136
|
+
'createdToDateTime' => createdtodatetime,
|
|
137
|
+
'cursor' => cursor
|
|
138
|
+
}.compact
|
|
139
|
+
@leash.call('gong', 'search_users', params)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# List all Gong workspaces with their IDs and names. Use workspace IDs as filters in list_calls, search_calls, get_trackers, and other tools.
|
|
143
|
+
#
|
|
144
|
+
# @return [Object]
|
|
145
|
+
def list_workspaces
|
|
146
|
+
params = {}
|
|
147
|
+
@leash.call('gong', 'list_workspaces', params)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# List all public Gong call library folders for a workspace. Returns folder IDs and names to use with get_library_folder_calls. Use list_workspaces to find workspace IDs.
|
|
151
|
+
#
|
|
152
|
+
# @param workspaceid [String] Workspace ID to list folders for (use list_workspaces to find IDs)
|
|
153
|
+
# @return [Object]
|
|
154
|
+
def list_library_folders(workspaceid)
|
|
155
|
+
params = {
|
|
156
|
+
'workspaceId' => workspaceid
|
|
157
|
+
}.compact
|
|
158
|
+
@leash.call('gong', 'list_library_folders', params)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Get all calls saved in a specific Gong library folder. Returns call IDs, titles, curator notes, and snippet timing. Use list_library_folders to find folder IDs. Call IDs can be passed to get_call_s...
|
|
162
|
+
#
|
|
163
|
+
# @param folderid [String] Library folder ID (numeric string, from list_library_folders)
|
|
164
|
+
# @return [Object]
|
|
165
|
+
def get_library_folder_calls(folderid)
|
|
166
|
+
params = {
|
|
167
|
+
'folderId' => folderid
|
|
168
|
+
}.compact
|
|
169
|
+
@leash.call('gong', 'get_library_folder_calls', params)
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: leash-integration-gong
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Leash
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-04-14 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: leash-sdk
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 0.2.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 0.2.0
|
|
27
|
+
description: Auto-generated typed client for the Gong integration on Leash.
|
|
28
|
+
email:
|
|
29
|
+
executables: []
|
|
30
|
+
extensions: []
|
|
31
|
+
extra_rdoc_files: []
|
|
32
|
+
files:
|
|
33
|
+
- lib/leash/integration/gong.rb
|
|
34
|
+
homepage: https://github.com/leash-build/leash-codegen
|
|
35
|
+
licenses:
|
|
36
|
+
- Apache-2.0
|
|
37
|
+
metadata: {}
|
|
38
|
+
post_install_message:
|
|
39
|
+
rdoc_options: []
|
|
40
|
+
require_paths:
|
|
41
|
+
- lib
|
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 2.7.0
|
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
|
+
requirements:
|
|
49
|
+
- - ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '0'
|
|
52
|
+
requirements: []
|
|
53
|
+
rubygems_version: 3.0.3.1
|
|
54
|
+
signing_key:
|
|
55
|
+
specification_version: 4
|
|
56
|
+
summary: Typed Gong integration for Leash
|
|
57
|
+
test_files: []
|