@gravity-rail/sdk 0.7.4 → 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-ANY7WLOD.js → chunk-ML55PVP7.js} +142 -9
- 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 +141 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +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-ANY7WLOD.js.map +0 -1
|
@@ -455,10 +455,52 @@ ${formattedErrors}`, response.status);
|
|
|
455
455
|
// src/api/abilities.ts
|
|
456
456
|
var AbilitiesApi = class extends BaseApiClient {
|
|
457
457
|
/**
|
|
458
|
-
* List
|
|
458
|
+
* List available ability types from the registry.
|
|
459
|
+
* Pass includeSystem to also return auto-injected system abilities.
|
|
459
460
|
*/
|
|
460
|
-
async getAbilityTypes(wid) {
|
|
461
|
-
|
|
461
|
+
async getAbilityTypes(wid, options = {}) {
|
|
462
|
+
const params = new URLSearchParams();
|
|
463
|
+
if (options.includeSystem) params.append("includeSystem", "true");
|
|
464
|
+
const qs = params.toString() ? `?${params.toString()}` : "";
|
|
465
|
+
return this.fetch(`w/${wid}/abilities/types${qs}`);
|
|
466
|
+
}
|
|
467
|
+
/** Get the full spec for a single ability type by slug. */
|
|
468
|
+
async getAbilityType(wid, slug) {
|
|
469
|
+
return this.fetch(
|
|
470
|
+
`w/${wid}/abilities/types/${encodeURIComponent(slug)}`
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* List configured ability instances for a workflow or task scope.
|
|
475
|
+
* Exactly one of workflowId / taskId must be provided.
|
|
476
|
+
*/
|
|
477
|
+
async listAbilities(wid, options) {
|
|
478
|
+
const params = new URLSearchParams();
|
|
479
|
+
if (options.workflowId !== void 0)
|
|
480
|
+
params.append("workflowId", options.workflowId.toString());
|
|
481
|
+
if (options.taskId !== void 0)
|
|
482
|
+
params.append("taskId", options.taskId.toString());
|
|
483
|
+
return this.fetch(`w/${wid}/abilities?${params}`);
|
|
484
|
+
}
|
|
485
|
+
/** Create (enable) a configured ability on a workflow or task scope. */
|
|
486
|
+
async createAbility(wid, body) {
|
|
487
|
+
return this.fetch(`w/${wid}/abilities`, {
|
|
488
|
+
method: "POST",
|
|
489
|
+
body: JSON.stringify(body)
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
/** Update a configured ability (configure / enable / disable) by UUID. */
|
|
493
|
+
async updateAbility(wid, abilityUuid, body) {
|
|
494
|
+
return this.fetch(`w/${wid}/abilities/${abilityUuid}`, {
|
|
495
|
+
method: "PATCH",
|
|
496
|
+
body: JSON.stringify(body)
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
/** Delete a configured ability instance by UUID. */
|
|
500
|
+
async deleteAbility(wid, abilityUuid) {
|
|
501
|
+
return this.fetch(`w/${wid}/abilities/${abilityUuid}`, {
|
|
502
|
+
method: "DELETE"
|
|
503
|
+
});
|
|
462
504
|
}
|
|
463
505
|
};
|
|
464
506
|
|
|
@@ -621,9 +663,21 @@ var AgentsApi = class extends BaseApiClient {
|
|
|
621
663
|
async resolveAgentTools(wid, id, options) {
|
|
622
664
|
const params = new URLSearchParams();
|
|
623
665
|
params.append("channel", options.channel);
|
|
624
|
-
params.append("taskId", options.taskId.toString());
|
|
666
|
+
if (options.taskId !== void 0) params.append("taskId", options.taskId.toString());
|
|
667
|
+
if (options.taskUuid !== void 0) params.append("taskUuid", options.taskUuid);
|
|
625
668
|
return this.fetch(`w/${wid}/agents/${id}/resolve-tools?${params}`);
|
|
626
669
|
}
|
|
670
|
+
/**
|
|
671
|
+
* List the configured abilities effective for an agent via a task's workflow.
|
|
672
|
+
* Requires taskId because abilities are scoped to workflows/tasks, not agents.
|
|
673
|
+
*/
|
|
674
|
+
async listAgentAbilities(wid, id, options) {
|
|
675
|
+
const params = new URLSearchParams();
|
|
676
|
+
params.append("taskId", options.taskId.toString());
|
|
677
|
+
return this.fetch(
|
|
678
|
+
`w/${wid}/agents/${id}/abilities?${params}`
|
|
679
|
+
);
|
|
680
|
+
}
|
|
627
681
|
};
|
|
628
682
|
|
|
629
683
|
// src/api/ai-models.ts
|
|
@@ -681,7 +735,11 @@ var AIModelsApi = class extends BaseApiClient {
|
|
|
681
735
|
return this.fetch(url);
|
|
682
736
|
}
|
|
683
737
|
/**
|
|
684
|
-
* Get available speech-to-text models
|
|
738
|
+
* Get available speech-to-text models.
|
|
739
|
+
*
|
|
740
|
+
* Returns the per-shape `STTModelsResponse` so callers see `languages` and
|
|
741
|
+
* `capabilities` on each model (the chat-shape `AIModelsResponse` it used
|
|
742
|
+
* to return doesn't include either).
|
|
685
743
|
*/
|
|
686
744
|
async getSTTModels(provider) {
|
|
687
745
|
const searchParams = new URLSearchParams();
|
|
@@ -3493,6 +3551,12 @@ var AppConnectionsApi = class extends BaseApiClient {
|
|
|
3493
3551
|
* values are intentionally never exposed. Operators can also add a
|
|
3494
3552
|
* new key via the UI's "Add custom field key" free-text action.
|
|
3495
3553
|
*/
|
|
3554
|
+
async setDefaultGooglePlatformAccount(wid, connectionUuid, credentialUuid) {
|
|
3555
|
+
return this.fetch(
|
|
3556
|
+
`w/${wid}/app-connections/google/platform-apps/${connectionUuid}/accounts/${credentialUuid}/default`,
|
|
3557
|
+
{ method: "POST" }
|
|
3558
|
+
);
|
|
3559
|
+
}
|
|
3496
3560
|
async listConnectionMemberFieldKeys(wid, connectionId) {
|
|
3497
3561
|
return this.fetch(
|
|
3498
3562
|
`w/${wid}/app-connections/${connectionId}/member-field-keys`
|
|
@@ -5848,6 +5912,28 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
5848
5912
|
async getSubscriptions() {
|
|
5849
5913
|
return this.fetch("subscriptions");
|
|
5850
5914
|
}
|
|
5915
|
+
/**
|
|
5916
|
+
* Create a Stripe Checkout session to purchase an organization plan.
|
|
5917
|
+
* Returns the checkout URL to open in a browser. The organization, billing
|
|
5918
|
+
* customer, and subscription are created on payment by the checkout
|
|
5919
|
+
* completion handler.
|
|
5920
|
+
*/
|
|
5921
|
+
async createCheckoutSession(productId, planPeriod = "month") {
|
|
5922
|
+
return this.fetch(`subscriptions/checkout-session`, {
|
|
5923
|
+
method: "POST",
|
|
5924
|
+
credentials: "include",
|
|
5925
|
+
body: JSON.stringify({ productId, planPeriod }),
|
|
5926
|
+
headers: { "Content-Type": "application/json" }
|
|
5927
|
+
});
|
|
5928
|
+
}
|
|
5929
|
+
/**
|
|
5930
|
+
* List self-service, purchasable plans (org or workspace). Only plans with a
|
|
5931
|
+
* paid Stripe price are returned. No auth required.
|
|
5932
|
+
*/
|
|
5933
|
+
async listSelfServeProducts(productType) {
|
|
5934
|
+
const qs = productType ? `?product_type=${productType}` : "";
|
|
5935
|
+
return this.fetch(`products/self-service${qs}`);
|
|
5936
|
+
}
|
|
5851
5937
|
/** List all subscriptions associated with a workspace. */
|
|
5852
5938
|
async getWorkspaceSubscriptions(wid) {
|
|
5853
5939
|
return this.fetch(`w/${wid}/subscriptions`);
|
|
@@ -5888,6 +5974,10 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
5888
5974
|
}
|
|
5889
5975
|
});
|
|
5890
5976
|
}
|
|
5977
|
+
/** List line items for a subscription. */
|
|
5978
|
+
async getSubscriptionItems(subscriptionId) {
|
|
5979
|
+
return this.fetch(`subscriptions/${subscriptionId}/items`);
|
|
5980
|
+
}
|
|
5891
5981
|
/** Purchase extra credits on a subscription (org-level). */
|
|
5892
5982
|
async purchaseCredits(subscriptionId, amountCents) {
|
|
5893
5983
|
return this.fetch(`subscriptions/${subscriptionId}/purchase-credits`, {
|
|
@@ -6143,6 +6233,12 @@ var TasksApi = class extends BaseApiClient {
|
|
|
6143
6233
|
if (options.workflowId) {
|
|
6144
6234
|
params.append("workflow_id", options.workflowId.toString());
|
|
6145
6235
|
}
|
|
6236
|
+
if (options.sortBy) {
|
|
6237
|
+
params.append("sortBy", options.sortBy);
|
|
6238
|
+
}
|
|
6239
|
+
if (options.sortOrder) {
|
|
6240
|
+
params.append("sortOrder", options.sortOrder);
|
|
6241
|
+
}
|
|
6146
6242
|
return this.fetch(
|
|
6147
6243
|
`w/${wid}/tasks${params.toString() ? `?${params.toString()}` : ""}`
|
|
6148
6244
|
);
|
|
@@ -6513,9 +6609,17 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
6513
6609
|
`w/${wid}/workflows/activity/batch?${params.toString()}`
|
|
6514
6610
|
);
|
|
6515
6611
|
}
|
|
6516
|
-
/**
|
|
6517
|
-
|
|
6518
|
-
|
|
6612
|
+
/**
|
|
6613
|
+
* Get the Mermaid diagram representation of a workflow.
|
|
6614
|
+
*
|
|
6615
|
+
* By default only active tasks are rendered. Pass `includeArchived: true`
|
|
6616
|
+
* to also render archived tasks (distinctly styled). `taskCount` is always
|
|
6617
|
+
* the total (active + archived); `archivedTaskCount` breaks out the archived
|
|
6618
|
+
* portion so the active count can be derived.
|
|
6619
|
+
*/
|
|
6620
|
+
async getWorkflowDiagram(wid, id, options = {}) {
|
|
6621
|
+
const query = options.includeArchived ? "?include_archived=true" : "";
|
|
6622
|
+
return this.fetch(`w/${wid}/workflows/${id}/diagram${query}`);
|
|
6519
6623
|
}
|
|
6520
6624
|
/**
|
|
6521
6625
|
* Get workflow thumbnail URL.
|
|
@@ -8040,6 +8144,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8040
8144
|
"convertEmail",
|
|
8041
8145
|
"convertFile",
|
|
8042
8146
|
"crawlSite",
|
|
8147
|
+
"createAbility",
|
|
8043
8148
|
"createAccessGrant",
|
|
8044
8149
|
"createAgent",
|
|
8045
8150
|
"createApiKey",
|
|
@@ -8103,6 +8208,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8103
8208
|
"createWorkspaceMember",
|
|
8104
8209
|
"createWorkspaceSupportRequest",
|
|
8105
8210
|
"deactivateWorkflowVersion",
|
|
8211
|
+
"deleteAbility",
|
|
8106
8212
|
"deleteAgent",
|
|
8107
8213
|
"deleteAssignment",
|
|
8108
8214
|
"deleteCalendar",
|
|
@@ -8226,6 +8332,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8226
8332
|
"generateICalToken",
|
|
8227
8333
|
"generateSiteMediaUploadUrl",
|
|
8228
8334
|
"getAIUsageReport",
|
|
8335
|
+
"getAbilityType",
|
|
8229
8336
|
"getAbilityTypes",
|
|
8230
8337
|
"getAccessGrant",
|
|
8231
8338
|
"getAccessGrants",
|
|
@@ -8513,11 +8620,14 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8513
8620
|
"linkMemberToMonday",
|
|
8514
8621
|
"linkMemberToSalesforce",
|
|
8515
8622
|
"linkPhoneNumber",
|
|
8623
|
+
"listAbilities",
|
|
8624
|
+
"listAgentAbilities",
|
|
8516
8625
|
"listAppConnections",
|
|
8517
8626
|
"listAvailableAppConnections",
|
|
8518
8627
|
"listConfluencePages",
|
|
8519
8628
|
"listConfluenceSpaces",
|
|
8520
8629
|
"listConnectionMemberFieldKeys",
|
|
8630
|
+
"setDefaultGooglePlatformAccount",
|
|
8521
8631
|
"listGoogleCalendars",
|
|
8522
8632
|
"listHealthieAppointmentTypes",
|
|
8523
8633
|
"listHealthiePatients",
|
|
@@ -8606,6 +8716,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8606
8716
|
"unlinkMemberFromMonday",
|
|
8607
8717
|
"unlinkMemberFromSalesforce",
|
|
8608
8718
|
"unregisterPushSubscription",
|
|
8719
|
+
"updateAbility",
|
|
8609
8720
|
"updateAgent",
|
|
8610
8721
|
"updateAssignment",
|
|
8611
8722
|
"updateCalendar",
|
|
@@ -8732,6 +8843,7 @@ function bindAgentsMethods(target, agents) {
|
|
|
8732
8843
|
target.archiveAgent = agents.archiveAgent.bind(agents);
|
|
8733
8844
|
target.unarchiveAgent = agents.unarchiveAgent.bind(agents);
|
|
8734
8845
|
target.resolveAgentTools = agents.resolveAgentTools.bind(agents);
|
|
8846
|
+
target.listAgentAbilities = agents.listAgentAbilities.bind(agents);
|
|
8735
8847
|
}
|
|
8736
8848
|
|
|
8737
8849
|
// src/client/bindings/tasks.ts
|
|
@@ -8745,6 +8857,11 @@ function bindTasksMethods(target, tasks, abilities) {
|
|
|
8745
8857
|
target.unarchiveTask = tasks.unarchiveTask.bind(tasks);
|
|
8746
8858
|
target.cloneTask = tasks.cloneTask.bind(tasks);
|
|
8747
8859
|
target.getAbilityTypes = abilities.getAbilityTypes.bind(abilities);
|
|
8860
|
+
target.getAbilityType = abilities.getAbilityType.bind(abilities);
|
|
8861
|
+
target.listAbilities = abilities.listAbilities.bind(abilities);
|
|
8862
|
+
target.createAbility = abilities.createAbility.bind(abilities);
|
|
8863
|
+
target.updateAbility = abilities.updateAbility.bind(abilities);
|
|
8864
|
+
target.deleteAbility = abilities.deleteAbility.bind(abilities);
|
|
8748
8865
|
}
|
|
8749
8866
|
|
|
8750
8867
|
// src/client/bindings/chats.ts
|
|
@@ -9299,6 +9416,8 @@ function bindBillingMethods(target, apiKeys, subscriptions, reports) {
|
|
|
9299
9416
|
target.updateSubscription = subscriptions.updateSubscription.bind(subscriptions);
|
|
9300
9417
|
target.addWorkspaceToSubscription = subscriptions.addWorkspaceToSubscription.bind(subscriptions);
|
|
9301
9418
|
target.purchaseCredits = subscriptions.purchaseCredits.bind(subscriptions);
|
|
9419
|
+
target.createCheckoutSession = subscriptions.createCheckoutSession.bind(subscriptions);
|
|
9420
|
+
target.listSelfServeProducts = subscriptions.listSelfServeProducts.bind(subscriptions);
|
|
9302
9421
|
target.getAIUsageReport = reports.getAIUsageReport.bind(reports);
|
|
9303
9422
|
target.getSMSUsageReport = reports.getSMSUsageReport.bind(reports);
|
|
9304
9423
|
target.getPhoneUsageReport = reports.getPhoneUsageReport.bind(reports);
|
|
@@ -9496,6 +9615,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
9496
9615
|
target.updatePlatformApp = appConnections.updatePlatformApp.bind(appConnections);
|
|
9497
9616
|
target.deletePlatformApp = appConnections.deletePlatformApp.bind(appConnections);
|
|
9498
9617
|
target.listConnectionMemberFieldKeys = appConnections.listConnectionMemberFieldKeys.bind(appConnections);
|
|
9618
|
+
target.setDefaultGooglePlatformAccount = appConnections.setDefaultGooglePlatformAccount.bind(appConnections);
|
|
9499
9619
|
}
|
|
9500
9620
|
|
|
9501
9621
|
// src/client/bindings/operator-groups.ts
|
|
@@ -9533,6 +9653,8 @@ function bindOrgMethods(target, org) {
|
|
|
9533
9653
|
target.updateBusinessProfile = org.updateBusinessProfile.bind(org);
|
|
9534
9654
|
target.submitBusinessProfile = org.submitBusinessProfile.bind(org);
|
|
9535
9655
|
target.cancelBusinessProfile = org.cancelBusinessProfile.bind(org);
|
|
9656
|
+
target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
|
|
9657
|
+
target.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
|
|
9536
9658
|
}
|
|
9537
9659
|
|
|
9538
9660
|
// src/client/bindings/pronunciations.ts
|
|
@@ -9677,6 +9799,11 @@ var GravityRailClient = class {
|
|
|
9677
9799
|
unarchiveTask;
|
|
9678
9800
|
cloneTask;
|
|
9679
9801
|
getAbilityTypes;
|
|
9802
|
+
getAbilityType;
|
|
9803
|
+
listAbilities;
|
|
9804
|
+
createAbility;
|
|
9805
|
+
updateAbility;
|
|
9806
|
+
deleteAbility;
|
|
9680
9807
|
// Chats API
|
|
9681
9808
|
getChats;
|
|
9682
9809
|
getChat;
|
|
@@ -9816,6 +9943,7 @@ var GravityRailClient = class {
|
|
|
9816
9943
|
archiveAgent;
|
|
9817
9944
|
unarchiveAgent;
|
|
9818
9945
|
resolveAgentTools;
|
|
9946
|
+
listAgentAbilities;
|
|
9819
9947
|
// Qualifications API
|
|
9820
9948
|
getQualifications;
|
|
9821
9949
|
getQualification;
|
|
@@ -9970,6 +10098,8 @@ var GravityRailClient = class {
|
|
|
9970
10098
|
updateBusinessProfile;
|
|
9971
10099
|
submitBusinessProfile;
|
|
9972
10100
|
cancelBusinessProfile;
|
|
10101
|
+
createOrganizationWorkspace;
|
|
10102
|
+
getOrgBillingCustomer;
|
|
9973
10103
|
getVapidPublicKey;
|
|
9974
10104
|
registerPushSubscription;
|
|
9975
10105
|
unregisterPushSubscription;
|
|
@@ -10298,6 +10428,8 @@ var GravityRailClient = class {
|
|
|
10298
10428
|
updateSubscription;
|
|
10299
10429
|
addWorkspaceToSubscription;
|
|
10300
10430
|
purchaseCredits;
|
|
10431
|
+
createCheckoutSession;
|
|
10432
|
+
listSelfServeProducts;
|
|
10301
10433
|
getAIUsageReport;
|
|
10302
10434
|
getSMSUsageReport;
|
|
10303
10435
|
getPhoneUsageReport;
|
|
@@ -10500,6 +10632,7 @@ var GravityRailClient = class {
|
|
|
10500
10632
|
updatePlatformApp;
|
|
10501
10633
|
deletePlatformApp;
|
|
10502
10634
|
listConnectionMemberFieldKeys;
|
|
10635
|
+
setDefaultGooglePlatformAccount;
|
|
10503
10636
|
// Pronunciations API
|
|
10504
10637
|
getPronunciationEntries;
|
|
10505
10638
|
createPronunciationEntry;
|
|
@@ -12020,4 +12153,4 @@ export {
|
|
|
12020
12153
|
ScopeManager,
|
|
12021
12154
|
SCOPE_PRESETS
|
|
12022
12155
|
};
|
|
12023
|
-
//# sourceMappingURL=chunk-
|
|
12156
|
+
//# sourceMappingURL=chunk-ML55PVP7.js.map
|