@gravity-rail/sdk 0.7.3 → 0.8.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.
- package/dist/{chunk-YCASSXLL.js → chunk-ML55PVP7.js} +150 -17
- package/dist/chunk-ML55PVP7.js.map +1 -0
- package/dist/{client-B_cweJhP.d.cts → client-C2aWAalu.d.cts} +189 -43
- package/dist/{client-C-on7whi.d.ts → client-CLGovEox.d.ts} +189 -43
- package/dist/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/index.cjs +216 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +71 -1
- package/dist/index.js.map +1 -1
- package/dist/{inquiries-BX3PuU-7.d.cts → inquiries-CmECZnkl.d.cts} +3 -0
- package/dist/{inquiries-BX3PuU-7.d.ts → inquiries-CmECZnkl.d.ts} +3 -0
- package/dist/internal.cjs +141 -8
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +4 -4
- package/dist/internal.d.ts +4 -4
- package/dist/internal.js +1 -1
- package/dist/schemas.cjs +11 -0
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +30 -2
- package/dist/schemas.d.ts +30 -2
- package/dist/schemas.js +11 -0
- package/dist/schemas.js.map +1 -1
- package/dist/{scopes-CNbQi30F.d.cts → scopes-CDaJBQVT.d.cts} +2 -2
- package/dist/{scopes-ColqadkM.d.ts → scopes-D6a_Mvqr.d.ts} +2 -2
- package/package.json +2 -2
- package/dist/chunk-YCASSXLL.js.map +0 -1
package/dist/internal.cjs
CHANGED
|
@@ -2430,10 +2430,52 @@ ${formattedErrors}`, response.status);
|
|
|
2430
2430
|
// src/api/abilities.ts
|
|
2431
2431
|
var AbilitiesApi = class extends BaseApiClient {
|
|
2432
2432
|
/**
|
|
2433
|
-
* List
|
|
2433
|
+
* List available ability types from the registry.
|
|
2434
|
+
* Pass includeSystem to also return auto-injected system abilities.
|
|
2434
2435
|
*/
|
|
2435
|
-
async getAbilityTypes(wid) {
|
|
2436
|
-
|
|
2436
|
+
async getAbilityTypes(wid, options = {}) {
|
|
2437
|
+
const params = new URLSearchParams();
|
|
2438
|
+
if (options.includeSystem) params.append("includeSystem", "true");
|
|
2439
|
+
const qs = params.toString() ? `?${params.toString()}` : "";
|
|
2440
|
+
return this.fetch(`w/${wid}/abilities/types${qs}`);
|
|
2441
|
+
}
|
|
2442
|
+
/** Get the full spec for a single ability type by slug. */
|
|
2443
|
+
async getAbilityType(wid, slug) {
|
|
2444
|
+
return this.fetch(
|
|
2445
|
+
`w/${wid}/abilities/types/${encodeURIComponent(slug)}`
|
|
2446
|
+
);
|
|
2447
|
+
}
|
|
2448
|
+
/**
|
|
2449
|
+
* List configured ability instances for a workflow or task scope.
|
|
2450
|
+
* Exactly one of workflowId / taskId must be provided.
|
|
2451
|
+
*/
|
|
2452
|
+
async listAbilities(wid, options) {
|
|
2453
|
+
const params = new URLSearchParams();
|
|
2454
|
+
if (options.workflowId !== void 0)
|
|
2455
|
+
params.append("workflowId", options.workflowId.toString());
|
|
2456
|
+
if (options.taskId !== void 0)
|
|
2457
|
+
params.append("taskId", options.taskId.toString());
|
|
2458
|
+
return this.fetch(`w/${wid}/abilities?${params}`);
|
|
2459
|
+
}
|
|
2460
|
+
/** Create (enable) a configured ability on a workflow or task scope. */
|
|
2461
|
+
async createAbility(wid, body) {
|
|
2462
|
+
return this.fetch(`w/${wid}/abilities`, {
|
|
2463
|
+
method: "POST",
|
|
2464
|
+
body: JSON.stringify(body)
|
|
2465
|
+
});
|
|
2466
|
+
}
|
|
2467
|
+
/** Update a configured ability (configure / enable / disable) by UUID. */
|
|
2468
|
+
async updateAbility(wid, abilityUuid, body) {
|
|
2469
|
+
return this.fetch(`w/${wid}/abilities/${abilityUuid}`, {
|
|
2470
|
+
method: "PATCH",
|
|
2471
|
+
body: JSON.stringify(body)
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
/** Delete a configured ability instance by UUID. */
|
|
2475
|
+
async deleteAbility(wid, abilityUuid) {
|
|
2476
|
+
return this.fetch(`w/${wid}/abilities/${abilityUuid}`, {
|
|
2477
|
+
method: "DELETE"
|
|
2478
|
+
});
|
|
2437
2479
|
}
|
|
2438
2480
|
};
|
|
2439
2481
|
|
|
@@ -2596,9 +2638,21 @@ var AgentsApi = class extends BaseApiClient {
|
|
|
2596
2638
|
async resolveAgentTools(wid, id, options) {
|
|
2597
2639
|
const params = new URLSearchParams();
|
|
2598
2640
|
params.append("channel", options.channel);
|
|
2599
|
-
params.append("taskId", options.taskId.toString());
|
|
2641
|
+
if (options.taskId !== void 0) params.append("taskId", options.taskId.toString());
|
|
2642
|
+
if (options.taskUuid !== void 0) params.append("taskUuid", options.taskUuid);
|
|
2600
2643
|
return this.fetch(`w/${wid}/agents/${id}/resolve-tools?${params}`);
|
|
2601
2644
|
}
|
|
2645
|
+
/**
|
|
2646
|
+
* List the configured abilities effective for an agent via a task's workflow.
|
|
2647
|
+
* Requires taskId because abilities are scoped to workflows/tasks, not agents.
|
|
2648
|
+
*/
|
|
2649
|
+
async listAgentAbilities(wid, id, options) {
|
|
2650
|
+
const params = new URLSearchParams();
|
|
2651
|
+
params.append("taskId", options.taskId.toString());
|
|
2652
|
+
return this.fetch(
|
|
2653
|
+
`w/${wid}/agents/${id}/abilities?${params}`
|
|
2654
|
+
);
|
|
2655
|
+
}
|
|
2602
2656
|
};
|
|
2603
2657
|
|
|
2604
2658
|
// src/api/ai-models.ts
|
|
@@ -2656,7 +2710,11 @@ var AIModelsApi = class extends BaseApiClient {
|
|
|
2656
2710
|
return this.fetch(url);
|
|
2657
2711
|
}
|
|
2658
2712
|
/**
|
|
2659
|
-
* Get available speech-to-text models
|
|
2713
|
+
* Get available speech-to-text models.
|
|
2714
|
+
*
|
|
2715
|
+
* Returns the per-shape `STTModelsResponse` so callers see `languages` and
|
|
2716
|
+
* `capabilities` on each model (the chat-shape `AIModelsResponse` it used
|
|
2717
|
+
* to return doesn't include either).
|
|
2660
2718
|
*/
|
|
2661
2719
|
async getSTTModels(provider) {
|
|
2662
2720
|
const searchParams = new URLSearchParams();
|
|
@@ -5623,6 +5681,12 @@ var AppConnectionsApi = class extends BaseApiClient {
|
|
|
5623
5681
|
* values are intentionally never exposed. Operators can also add a
|
|
5624
5682
|
* new key via the UI's "Add custom field key" free-text action.
|
|
5625
5683
|
*/
|
|
5684
|
+
async setDefaultGooglePlatformAccount(wid, connectionUuid, credentialUuid) {
|
|
5685
|
+
return this.fetch(
|
|
5686
|
+
`w/${wid}/app-connections/google/platform-apps/${connectionUuid}/accounts/${credentialUuid}/default`,
|
|
5687
|
+
{ method: "POST" }
|
|
5688
|
+
);
|
|
5689
|
+
}
|
|
5626
5690
|
async listConnectionMemberFieldKeys(wid, connectionId) {
|
|
5627
5691
|
return this.fetch(
|
|
5628
5692
|
`w/${wid}/app-connections/${connectionId}/member-field-keys`
|
|
@@ -7978,6 +8042,28 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
7978
8042
|
async getSubscriptions() {
|
|
7979
8043
|
return this.fetch("subscriptions");
|
|
7980
8044
|
}
|
|
8045
|
+
/**
|
|
8046
|
+
* Create a Stripe Checkout session to purchase an organization plan.
|
|
8047
|
+
* Returns the checkout URL to open in a browser. The organization, billing
|
|
8048
|
+
* customer, and subscription are created on payment by the checkout
|
|
8049
|
+
* completion handler.
|
|
8050
|
+
*/
|
|
8051
|
+
async createCheckoutSession(productId, planPeriod = "month") {
|
|
8052
|
+
return this.fetch(`subscriptions/checkout-session`, {
|
|
8053
|
+
method: "POST",
|
|
8054
|
+
credentials: "include",
|
|
8055
|
+
body: JSON.stringify({ productId, planPeriod }),
|
|
8056
|
+
headers: { "Content-Type": "application/json" }
|
|
8057
|
+
});
|
|
8058
|
+
}
|
|
8059
|
+
/**
|
|
8060
|
+
* List self-service, purchasable plans (org or workspace). Only plans with a
|
|
8061
|
+
* paid Stripe price are returned. No auth required.
|
|
8062
|
+
*/
|
|
8063
|
+
async listSelfServeProducts(productType) {
|
|
8064
|
+
const qs = productType ? `?product_type=${productType}` : "";
|
|
8065
|
+
return this.fetch(`products/self-service${qs}`);
|
|
8066
|
+
}
|
|
7981
8067
|
/** List all subscriptions associated with a workspace. */
|
|
7982
8068
|
async getWorkspaceSubscriptions(wid) {
|
|
7983
8069
|
return this.fetch(`w/${wid}/subscriptions`);
|
|
@@ -8018,6 +8104,10 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
8018
8104
|
}
|
|
8019
8105
|
});
|
|
8020
8106
|
}
|
|
8107
|
+
/** List line items for a subscription. */
|
|
8108
|
+
async getSubscriptionItems(subscriptionId) {
|
|
8109
|
+
return this.fetch(`subscriptions/${subscriptionId}/items`);
|
|
8110
|
+
}
|
|
8021
8111
|
/** Purchase extra credits on a subscription (org-level). */
|
|
8022
8112
|
async purchaseCredits(subscriptionId, amountCents) {
|
|
8023
8113
|
return this.fetch(`subscriptions/${subscriptionId}/purchase-credits`, {
|
|
@@ -8273,6 +8363,12 @@ var TasksApi = class extends BaseApiClient {
|
|
|
8273
8363
|
if (options.workflowId) {
|
|
8274
8364
|
params.append("workflow_id", options.workflowId.toString());
|
|
8275
8365
|
}
|
|
8366
|
+
if (options.sortBy) {
|
|
8367
|
+
params.append("sortBy", options.sortBy);
|
|
8368
|
+
}
|
|
8369
|
+
if (options.sortOrder) {
|
|
8370
|
+
params.append("sortOrder", options.sortOrder);
|
|
8371
|
+
}
|
|
8276
8372
|
return this.fetch(
|
|
8277
8373
|
`w/${wid}/tasks${params.toString() ? `?${params.toString()}` : ""}`
|
|
8278
8374
|
);
|
|
@@ -8643,9 +8739,17 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
8643
8739
|
`w/${wid}/workflows/activity/batch?${params.toString()}`
|
|
8644
8740
|
);
|
|
8645
8741
|
}
|
|
8646
|
-
/**
|
|
8647
|
-
|
|
8648
|
-
|
|
8742
|
+
/**
|
|
8743
|
+
* Get the Mermaid diagram representation of a workflow.
|
|
8744
|
+
*
|
|
8745
|
+
* By default only active tasks are rendered. Pass `includeArchived: true`
|
|
8746
|
+
* to also render archived tasks (distinctly styled). `taskCount` is always
|
|
8747
|
+
* the total (active + archived); `archivedTaskCount` breaks out the archived
|
|
8748
|
+
* portion so the active count can be derived.
|
|
8749
|
+
*/
|
|
8750
|
+
async getWorkflowDiagram(wid, id, options = {}) {
|
|
8751
|
+
const query = options.includeArchived ? "?include_archived=true" : "";
|
|
8752
|
+
return this.fetch(`w/${wid}/workflows/${id}/diagram${query}`);
|
|
8649
8753
|
}
|
|
8650
8754
|
/**
|
|
8651
8755
|
* Get workflow thumbnail URL.
|
|
@@ -9488,6 +9592,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9488
9592
|
"convertEmail",
|
|
9489
9593
|
"convertFile",
|
|
9490
9594
|
"crawlSite",
|
|
9595
|
+
"createAbility",
|
|
9491
9596
|
"createAccessGrant",
|
|
9492
9597
|
"createAgent",
|
|
9493
9598
|
"createApiKey",
|
|
@@ -9551,6 +9656,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9551
9656
|
"createWorkspaceMember",
|
|
9552
9657
|
"createWorkspaceSupportRequest",
|
|
9553
9658
|
"deactivateWorkflowVersion",
|
|
9659
|
+
"deleteAbility",
|
|
9554
9660
|
"deleteAgent",
|
|
9555
9661
|
"deleteAssignment",
|
|
9556
9662
|
"deleteCalendar",
|
|
@@ -9674,6 +9780,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9674
9780
|
"generateICalToken",
|
|
9675
9781
|
"generateSiteMediaUploadUrl",
|
|
9676
9782
|
"getAIUsageReport",
|
|
9783
|
+
"getAbilityType",
|
|
9677
9784
|
"getAbilityTypes",
|
|
9678
9785
|
"getAccessGrant",
|
|
9679
9786
|
"getAccessGrants",
|
|
@@ -9961,11 +10068,14 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
9961
10068
|
"linkMemberToMonday",
|
|
9962
10069
|
"linkMemberToSalesforce",
|
|
9963
10070
|
"linkPhoneNumber",
|
|
10071
|
+
"listAbilities",
|
|
10072
|
+
"listAgentAbilities",
|
|
9964
10073
|
"listAppConnections",
|
|
9965
10074
|
"listAvailableAppConnections",
|
|
9966
10075
|
"listConfluencePages",
|
|
9967
10076
|
"listConfluenceSpaces",
|
|
9968
10077
|
"listConnectionMemberFieldKeys",
|
|
10078
|
+
"setDefaultGooglePlatformAccount",
|
|
9969
10079
|
"listGoogleCalendars",
|
|
9970
10080
|
"listHealthieAppointmentTypes",
|
|
9971
10081
|
"listHealthiePatients",
|
|
@@ -10054,6 +10164,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10054
10164
|
"unlinkMemberFromMonday",
|
|
10055
10165
|
"unlinkMemberFromSalesforce",
|
|
10056
10166
|
"unregisterPushSubscription",
|
|
10167
|
+
"updateAbility",
|
|
10057
10168
|
"updateAgent",
|
|
10058
10169
|
"updateAssignment",
|
|
10059
10170
|
"updateCalendar",
|
|
@@ -10180,6 +10291,7 @@ function bindAgentsMethods(target, agents) {
|
|
|
10180
10291
|
target.archiveAgent = agents.archiveAgent.bind(agents);
|
|
10181
10292
|
target.unarchiveAgent = agents.unarchiveAgent.bind(agents);
|
|
10182
10293
|
target.resolveAgentTools = agents.resolveAgentTools.bind(agents);
|
|
10294
|
+
target.listAgentAbilities = agents.listAgentAbilities.bind(agents);
|
|
10183
10295
|
}
|
|
10184
10296
|
|
|
10185
10297
|
// src/client/bindings/tasks.ts
|
|
@@ -10193,6 +10305,11 @@ function bindTasksMethods(target, tasks, abilities) {
|
|
|
10193
10305
|
target.unarchiveTask = tasks.unarchiveTask.bind(tasks);
|
|
10194
10306
|
target.cloneTask = tasks.cloneTask.bind(tasks);
|
|
10195
10307
|
target.getAbilityTypes = abilities.getAbilityTypes.bind(abilities);
|
|
10308
|
+
target.getAbilityType = abilities.getAbilityType.bind(abilities);
|
|
10309
|
+
target.listAbilities = abilities.listAbilities.bind(abilities);
|
|
10310
|
+
target.createAbility = abilities.createAbility.bind(abilities);
|
|
10311
|
+
target.updateAbility = abilities.updateAbility.bind(abilities);
|
|
10312
|
+
target.deleteAbility = abilities.deleteAbility.bind(abilities);
|
|
10196
10313
|
}
|
|
10197
10314
|
|
|
10198
10315
|
// src/client/bindings/chats.ts
|
|
@@ -10747,6 +10864,8 @@ function bindBillingMethods(target, apiKeys, subscriptions, reports) {
|
|
|
10747
10864
|
target.updateSubscription = subscriptions.updateSubscription.bind(subscriptions);
|
|
10748
10865
|
target.addWorkspaceToSubscription = subscriptions.addWorkspaceToSubscription.bind(subscriptions);
|
|
10749
10866
|
target.purchaseCredits = subscriptions.purchaseCredits.bind(subscriptions);
|
|
10867
|
+
target.createCheckoutSession = subscriptions.createCheckoutSession.bind(subscriptions);
|
|
10868
|
+
target.listSelfServeProducts = subscriptions.listSelfServeProducts.bind(subscriptions);
|
|
10750
10869
|
target.getAIUsageReport = reports.getAIUsageReport.bind(reports);
|
|
10751
10870
|
target.getSMSUsageReport = reports.getSMSUsageReport.bind(reports);
|
|
10752
10871
|
target.getPhoneUsageReport = reports.getPhoneUsageReport.bind(reports);
|
|
@@ -10944,6 +11063,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
10944
11063
|
target.updatePlatformApp = appConnections.updatePlatformApp.bind(appConnections);
|
|
10945
11064
|
target.deletePlatformApp = appConnections.deletePlatformApp.bind(appConnections);
|
|
10946
11065
|
target.listConnectionMemberFieldKeys = appConnections.listConnectionMemberFieldKeys.bind(appConnections);
|
|
11066
|
+
target.setDefaultGooglePlatformAccount = appConnections.setDefaultGooglePlatformAccount.bind(appConnections);
|
|
10947
11067
|
}
|
|
10948
11068
|
|
|
10949
11069
|
// src/client/bindings/operator-groups.ts
|
|
@@ -10981,6 +11101,8 @@ function bindOrgMethods(target, org) {
|
|
|
10981
11101
|
target.updateBusinessProfile = org.updateBusinessProfile.bind(org);
|
|
10982
11102
|
target.submitBusinessProfile = org.submitBusinessProfile.bind(org);
|
|
10983
11103
|
target.cancelBusinessProfile = org.cancelBusinessProfile.bind(org);
|
|
11104
|
+
target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
|
|
11105
|
+
target.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
|
|
10984
11106
|
}
|
|
10985
11107
|
|
|
10986
11108
|
// src/client/bindings/pronunciations.ts
|
|
@@ -11125,6 +11247,11 @@ var GravityRailClient = class {
|
|
|
11125
11247
|
unarchiveTask;
|
|
11126
11248
|
cloneTask;
|
|
11127
11249
|
getAbilityTypes;
|
|
11250
|
+
getAbilityType;
|
|
11251
|
+
listAbilities;
|
|
11252
|
+
createAbility;
|
|
11253
|
+
updateAbility;
|
|
11254
|
+
deleteAbility;
|
|
11128
11255
|
// Chats API
|
|
11129
11256
|
getChats;
|
|
11130
11257
|
getChat;
|
|
@@ -11264,6 +11391,7 @@ var GravityRailClient = class {
|
|
|
11264
11391
|
archiveAgent;
|
|
11265
11392
|
unarchiveAgent;
|
|
11266
11393
|
resolveAgentTools;
|
|
11394
|
+
listAgentAbilities;
|
|
11267
11395
|
// Qualifications API
|
|
11268
11396
|
getQualifications;
|
|
11269
11397
|
getQualification;
|
|
@@ -11418,6 +11546,8 @@ var GravityRailClient = class {
|
|
|
11418
11546
|
updateBusinessProfile;
|
|
11419
11547
|
submitBusinessProfile;
|
|
11420
11548
|
cancelBusinessProfile;
|
|
11549
|
+
createOrganizationWorkspace;
|
|
11550
|
+
getOrgBillingCustomer;
|
|
11421
11551
|
getVapidPublicKey;
|
|
11422
11552
|
registerPushSubscription;
|
|
11423
11553
|
unregisterPushSubscription;
|
|
@@ -11746,6 +11876,8 @@ var GravityRailClient = class {
|
|
|
11746
11876
|
updateSubscription;
|
|
11747
11877
|
addWorkspaceToSubscription;
|
|
11748
11878
|
purchaseCredits;
|
|
11879
|
+
createCheckoutSession;
|
|
11880
|
+
listSelfServeProducts;
|
|
11749
11881
|
getAIUsageReport;
|
|
11750
11882
|
getSMSUsageReport;
|
|
11751
11883
|
getPhoneUsageReport;
|
|
@@ -11948,6 +12080,7 @@ var GravityRailClient = class {
|
|
|
11948
12080
|
updatePlatformApp;
|
|
11949
12081
|
deletePlatformApp;
|
|
11950
12082
|
listConnectionMemberFieldKeys;
|
|
12083
|
+
setDefaultGooglePlatformAccount;
|
|
11951
12084
|
// Pronunciations API
|
|
11952
12085
|
getPronunciationEntries;
|
|
11953
12086
|
createPronunciationEntry;
|