@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
package/dist/helpers.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { dk as GravityRailClient } from './client-
|
|
2
|
-
import { bM as WorkspaceMemberResponse } from './inquiries-
|
|
1
|
+
import { dk as GravityRailClient } from './client-C2aWAalu.cjs';
|
|
2
|
+
import { bM as WorkspaceMemberResponse } from './inquiries-CmECZnkl.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface OutboundPhoneNumberOption {
|
package/dist/helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { dk as GravityRailClient } from './client-
|
|
2
|
-
import { bM as WorkspaceMemberResponse } from './inquiries-
|
|
1
|
+
import { dk as GravityRailClient } from './client-CLGovEox.js';
|
|
2
|
+
import { bM as WorkspaceMemberResponse } from './inquiries-CmECZnkl.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface OutboundPhoneNumberOption {
|
package/dist/index.cjs
CHANGED
|
@@ -631,10 +631,52 @@ ${formattedErrors}`, response.status);
|
|
|
631
631
|
// src/api/abilities.ts
|
|
632
632
|
var AbilitiesApi = class extends BaseApiClient {
|
|
633
633
|
/**
|
|
634
|
-
* List
|
|
634
|
+
* List available ability types from the registry.
|
|
635
|
+
* Pass includeSystem to also return auto-injected system abilities.
|
|
635
636
|
*/
|
|
636
|
-
async getAbilityTypes(wid) {
|
|
637
|
-
|
|
637
|
+
async getAbilityTypes(wid, options = {}) {
|
|
638
|
+
const params = new URLSearchParams();
|
|
639
|
+
if (options.includeSystem) params.append("includeSystem", "true");
|
|
640
|
+
const qs = params.toString() ? `?${params.toString()}` : "";
|
|
641
|
+
return this.fetch(`w/${wid}/abilities/types${qs}`);
|
|
642
|
+
}
|
|
643
|
+
/** Get the full spec for a single ability type by slug. */
|
|
644
|
+
async getAbilityType(wid, slug) {
|
|
645
|
+
return this.fetch(
|
|
646
|
+
`w/${wid}/abilities/types/${encodeURIComponent(slug)}`
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* List configured ability instances for a workflow or task scope.
|
|
651
|
+
* Exactly one of workflowId / taskId must be provided.
|
|
652
|
+
*/
|
|
653
|
+
async listAbilities(wid, options) {
|
|
654
|
+
const params = new URLSearchParams();
|
|
655
|
+
if (options.workflowId !== void 0)
|
|
656
|
+
params.append("workflowId", options.workflowId.toString());
|
|
657
|
+
if (options.taskId !== void 0)
|
|
658
|
+
params.append("taskId", options.taskId.toString());
|
|
659
|
+
return this.fetch(`w/${wid}/abilities?${params}`);
|
|
660
|
+
}
|
|
661
|
+
/** Create (enable) a configured ability on a workflow or task scope. */
|
|
662
|
+
async createAbility(wid, body) {
|
|
663
|
+
return this.fetch(`w/${wid}/abilities`, {
|
|
664
|
+
method: "POST",
|
|
665
|
+
body: JSON.stringify(body)
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
/** Update a configured ability (configure / enable / disable) by UUID. */
|
|
669
|
+
async updateAbility(wid, abilityUuid, body) {
|
|
670
|
+
return this.fetch(`w/${wid}/abilities/${abilityUuid}`, {
|
|
671
|
+
method: "PATCH",
|
|
672
|
+
body: JSON.stringify(body)
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
/** Delete a configured ability instance by UUID. */
|
|
676
|
+
async deleteAbility(wid, abilityUuid) {
|
|
677
|
+
return this.fetch(`w/${wid}/abilities/${abilityUuid}`, {
|
|
678
|
+
method: "DELETE"
|
|
679
|
+
});
|
|
638
680
|
}
|
|
639
681
|
};
|
|
640
682
|
|
|
@@ -797,9 +839,21 @@ var AgentsApi = class extends BaseApiClient {
|
|
|
797
839
|
async resolveAgentTools(wid, id, options) {
|
|
798
840
|
const params = new URLSearchParams();
|
|
799
841
|
params.append("channel", options.channel);
|
|
800
|
-
params.append("taskId", options.taskId.toString());
|
|
842
|
+
if (options.taskId !== void 0) params.append("taskId", options.taskId.toString());
|
|
843
|
+
if (options.taskUuid !== void 0) params.append("taskUuid", options.taskUuid);
|
|
801
844
|
return this.fetch(`w/${wid}/agents/${id}/resolve-tools?${params}`);
|
|
802
845
|
}
|
|
846
|
+
/**
|
|
847
|
+
* List the configured abilities effective for an agent via a task's workflow.
|
|
848
|
+
* Requires taskId because abilities are scoped to workflows/tasks, not agents.
|
|
849
|
+
*/
|
|
850
|
+
async listAgentAbilities(wid, id, options) {
|
|
851
|
+
const params = new URLSearchParams();
|
|
852
|
+
params.append("taskId", options.taskId.toString());
|
|
853
|
+
return this.fetch(
|
|
854
|
+
`w/${wid}/agents/${id}/abilities?${params}`
|
|
855
|
+
);
|
|
856
|
+
}
|
|
803
857
|
};
|
|
804
858
|
|
|
805
859
|
// src/api/ai-models.ts
|
|
@@ -857,7 +911,11 @@ var AIModelsApi = class extends BaseApiClient {
|
|
|
857
911
|
return this.fetch(url);
|
|
858
912
|
}
|
|
859
913
|
/**
|
|
860
|
-
* Get available speech-to-text models
|
|
914
|
+
* Get available speech-to-text models.
|
|
915
|
+
*
|
|
916
|
+
* Returns the per-shape `STTModelsResponse` so callers see `languages` and
|
|
917
|
+
* `capabilities` on each model (the chat-shape `AIModelsResponse` it used
|
|
918
|
+
* to return doesn't include either).
|
|
861
919
|
*/
|
|
862
920
|
async getSTTModels(provider) {
|
|
863
921
|
const searchParams = new URLSearchParams();
|
|
@@ -3824,6 +3882,12 @@ var AppConnectionsApi = class extends BaseApiClient {
|
|
|
3824
3882
|
* values are intentionally never exposed. Operators can also add a
|
|
3825
3883
|
* new key via the UI's "Add custom field key" free-text action.
|
|
3826
3884
|
*/
|
|
3885
|
+
async setDefaultGooglePlatformAccount(wid, connectionUuid, credentialUuid) {
|
|
3886
|
+
return this.fetch(
|
|
3887
|
+
`w/${wid}/app-connections/google/platform-apps/${connectionUuid}/accounts/${credentialUuid}/default`,
|
|
3888
|
+
{ method: "POST" }
|
|
3889
|
+
);
|
|
3890
|
+
}
|
|
3827
3891
|
async listConnectionMemberFieldKeys(wid, connectionId) {
|
|
3828
3892
|
return this.fetch(
|
|
3829
3893
|
`w/${wid}/app-connections/${connectionId}/member-field-keys`
|
|
@@ -6152,6 +6216,28 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
6152
6216
|
async getSubscriptions() {
|
|
6153
6217
|
return this.fetch("subscriptions");
|
|
6154
6218
|
}
|
|
6219
|
+
/**
|
|
6220
|
+
* Create a Stripe Checkout session to purchase an organization plan.
|
|
6221
|
+
* Returns the checkout URL to open in a browser. The organization, billing
|
|
6222
|
+
* customer, and subscription are created on payment by the checkout
|
|
6223
|
+
* completion handler.
|
|
6224
|
+
*/
|
|
6225
|
+
async createCheckoutSession(productId, planPeriod = "month") {
|
|
6226
|
+
return this.fetch(`subscriptions/checkout-session`, {
|
|
6227
|
+
method: "POST",
|
|
6228
|
+
credentials: "include",
|
|
6229
|
+
body: JSON.stringify({ productId, planPeriod }),
|
|
6230
|
+
headers: { "Content-Type": "application/json" }
|
|
6231
|
+
});
|
|
6232
|
+
}
|
|
6233
|
+
/**
|
|
6234
|
+
* List self-service, purchasable plans (org or workspace). Only plans with a
|
|
6235
|
+
* paid Stripe price are returned. No auth required.
|
|
6236
|
+
*/
|
|
6237
|
+
async listSelfServeProducts(productType) {
|
|
6238
|
+
const qs = productType ? `?product_type=${productType}` : "";
|
|
6239
|
+
return this.fetch(`products/self-service${qs}`);
|
|
6240
|
+
}
|
|
6155
6241
|
/** List all subscriptions associated with a workspace. */
|
|
6156
6242
|
async getWorkspaceSubscriptions(wid) {
|
|
6157
6243
|
return this.fetch(`w/${wid}/subscriptions`);
|
|
@@ -6192,6 +6278,10 @@ var SubscriptionsApi = class extends BaseApiClient {
|
|
|
6192
6278
|
}
|
|
6193
6279
|
});
|
|
6194
6280
|
}
|
|
6281
|
+
/** List line items for a subscription. */
|
|
6282
|
+
async getSubscriptionItems(subscriptionId) {
|
|
6283
|
+
return this.fetch(`subscriptions/${subscriptionId}/items`);
|
|
6284
|
+
}
|
|
6195
6285
|
/** Purchase extra credits on a subscription (org-level). */
|
|
6196
6286
|
async purchaseCredits(subscriptionId, amountCents) {
|
|
6197
6287
|
return this.fetch(`subscriptions/${subscriptionId}/purchase-credits`, {
|
|
@@ -6447,6 +6537,12 @@ var TasksApi = class extends BaseApiClient {
|
|
|
6447
6537
|
if (options.workflowId) {
|
|
6448
6538
|
params.append("workflow_id", options.workflowId.toString());
|
|
6449
6539
|
}
|
|
6540
|
+
if (options.sortBy) {
|
|
6541
|
+
params.append("sortBy", options.sortBy);
|
|
6542
|
+
}
|
|
6543
|
+
if (options.sortOrder) {
|
|
6544
|
+
params.append("sortOrder", options.sortOrder);
|
|
6545
|
+
}
|
|
6450
6546
|
return this.fetch(
|
|
6451
6547
|
`w/${wid}/tasks${params.toString() ? `?${params.toString()}` : ""}`
|
|
6452
6548
|
);
|
|
@@ -6817,9 +6913,17 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
6817
6913
|
`w/${wid}/workflows/activity/batch?${params.toString()}`
|
|
6818
6914
|
);
|
|
6819
6915
|
}
|
|
6820
|
-
/**
|
|
6821
|
-
|
|
6822
|
-
|
|
6916
|
+
/**
|
|
6917
|
+
* Get the Mermaid diagram representation of a workflow.
|
|
6918
|
+
*
|
|
6919
|
+
* By default only active tasks are rendered. Pass `includeArchived: true`
|
|
6920
|
+
* to also render archived tasks (distinctly styled). `taskCount` is always
|
|
6921
|
+
* the total (active + archived); `archivedTaskCount` breaks out the archived
|
|
6922
|
+
* portion so the active count can be derived.
|
|
6923
|
+
*/
|
|
6924
|
+
async getWorkflowDiagram(wid, id, options = {}) {
|
|
6925
|
+
const query = options.includeArchived ? "?include_archived=true" : "";
|
|
6926
|
+
return this.fetch(`w/${wid}/workflows/${id}/diagram${query}`);
|
|
6823
6927
|
}
|
|
6824
6928
|
/**
|
|
6825
6929
|
* Get workflow thumbnail URL.
|
|
@@ -8268,6 +8372,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8268
8372
|
"convertEmail",
|
|
8269
8373
|
"convertFile",
|
|
8270
8374
|
"crawlSite",
|
|
8375
|
+
"createAbility",
|
|
8271
8376
|
"createAccessGrant",
|
|
8272
8377
|
"createAgent",
|
|
8273
8378
|
"createApiKey",
|
|
@@ -8331,6 +8436,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8331
8436
|
"createWorkspaceMember",
|
|
8332
8437
|
"createWorkspaceSupportRequest",
|
|
8333
8438
|
"deactivateWorkflowVersion",
|
|
8439
|
+
"deleteAbility",
|
|
8334
8440
|
"deleteAgent",
|
|
8335
8441
|
"deleteAssignment",
|
|
8336
8442
|
"deleteCalendar",
|
|
@@ -8454,6 +8560,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8454
8560
|
"generateICalToken",
|
|
8455
8561
|
"generateSiteMediaUploadUrl",
|
|
8456
8562
|
"getAIUsageReport",
|
|
8563
|
+
"getAbilityType",
|
|
8457
8564
|
"getAbilityTypes",
|
|
8458
8565
|
"getAccessGrant",
|
|
8459
8566
|
"getAccessGrants",
|
|
@@ -8741,11 +8848,14 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8741
8848
|
"linkMemberToMonday",
|
|
8742
8849
|
"linkMemberToSalesforce",
|
|
8743
8850
|
"linkPhoneNumber",
|
|
8851
|
+
"listAbilities",
|
|
8852
|
+
"listAgentAbilities",
|
|
8744
8853
|
"listAppConnections",
|
|
8745
8854
|
"listAvailableAppConnections",
|
|
8746
8855
|
"listConfluencePages",
|
|
8747
8856
|
"listConfluenceSpaces",
|
|
8748
8857
|
"listConnectionMemberFieldKeys",
|
|
8858
|
+
"setDefaultGooglePlatformAccount",
|
|
8749
8859
|
"listGoogleCalendars",
|
|
8750
8860
|
"listHealthieAppointmentTypes",
|
|
8751
8861
|
"listHealthiePatients",
|
|
@@ -8834,6 +8944,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
8834
8944
|
"unlinkMemberFromMonday",
|
|
8835
8945
|
"unlinkMemberFromSalesforce",
|
|
8836
8946
|
"unregisterPushSubscription",
|
|
8947
|
+
"updateAbility",
|
|
8837
8948
|
"updateAgent",
|
|
8838
8949
|
"updateAssignment",
|
|
8839
8950
|
"updateCalendar",
|
|
@@ -8960,6 +9071,7 @@ function bindAgentsMethods(target, agents) {
|
|
|
8960
9071
|
target.archiveAgent = agents.archiveAgent.bind(agents);
|
|
8961
9072
|
target.unarchiveAgent = agents.unarchiveAgent.bind(agents);
|
|
8962
9073
|
target.resolveAgentTools = agents.resolveAgentTools.bind(agents);
|
|
9074
|
+
target.listAgentAbilities = agents.listAgentAbilities.bind(agents);
|
|
8963
9075
|
}
|
|
8964
9076
|
|
|
8965
9077
|
// src/client/bindings/tasks.ts
|
|
@@ -8973,6 +9085,11 @@ function bindTasksMethods(target, tasks, abilities) {
|
|
|
8973
9085
|
target.unarchiveTask = tasks.unarchiveTask.bind(tasks);
|
|
8974
9086
|
target.cloneTask = tasks.cloneTask.bind(tasks);
|
|
8975
9087
|
target.getAbilityTypes = abilities.getAbilityTypes.bind(abilities);
|
|
9088
|
+
target.getAbilityType = abilities.getAbilityType.bind(abilities);
|
|
9089
|
+
target.listAbilities = abilities.listAbilities.bind(abilities);
|
|
9090
|
+
target.createAbility = abilities.createAbility.bind(abilities);
|
|
9091
|
+
target.updateAbility = abilities.updateAbility.bind(abilities);
|
|
9092
|
+
target.deleteAbility = abilities.deleteAbility.bind(abilities);
|
|
8976
9093
|
}
|
|
8977
9094
|
|
|
8978
9095
|
// src/client/bindings/chats.ts
|
|
@@ -9527,6 +9644,8 @@ function bindBillingMethods(target, apiKeys, subscriptions, reports) {
|
|
|
9527
9644
|
target.updateSubscription = subscriptions.updateSubscription.bind(subscriptions);
|
|
9528
9645
|
target.addWorkspaceToSubscription = subscriptions.addWorkspaceToSubscription.bind(subscriptions);
|
|
9529
9646
|
target.purchaseCredits = subscriptions.purchaseCredits.bind(subscriptions);
|
|
9647
|
+
target.createCheckoutSession = subscriptions.createCheckoutSession.bind(subscriptions);
|
|
9648
|
+
target.listSelfServeProducts = subscriptions.listSelfServeProducts.bind(subscriptions);
|
|
9530
9649
|
target.getAIUsageReport = reports.getAIUsageReport.bind(reports);
|
|
9531
9650
|
target.getSMSUsageReport = reports.getSMSUsageReport.bind(reports);
|
|
9532
9651
|
target.getPhoneUsageReport = reports.getPhoneUsageReport.bind(reports);
|
|
@@ -9724,6 +9843,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
|
|
|
9724
9843
|
target.updatePlatformApp = appConnections.updatePlatformApp.bind(appConnections);
|
|
9725
9844
|
target.deletePlatformApp = appConnections.deletePlatformApp.bind(appConnections);
|
|
9726
9845
|
target.listConnectionMemberFieldKeys = appConnections.listConnectionMemberFieldKeys.bind(appConnections);
|
|
9846
|
+
target.setDefaultGooglePlatformAccount = appConnections.setDefaultGooglePlatformAccount.bind(appConnections);
|
|
9727
9847
|
}
|
|
9728
9848
|
|
|
9729
9849
|
// src/client/bindings/operator-groups.ts
|
|
@@ -9761,6 +9881,8 @@ function bindOrgMethods(target, org) {
|
|
|
9761
9881
|
target.updateBusinessProfile = org.updateBusinessProfile.bind(org);
|
|
9762
9882
|
target.submitBusinessProfile = org.submitBusinessProfile.bind(org);
|
|
9763
9883
|
target.cancelBusinessProfile = org.cancelBusinessProfile.bind(org);
|
|
9884
|
+
target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
|
|
9885
|
+
target.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
|
|
9764
9886
|
}
|
|
9765
9887
|
|
|
9766
9888
|
// src/client/bindings/pronunciations.ts
|
|
@@ -9905,6 +10027,11 @@ var GravityRailClient = class {
|
|
|
9905
10027
|
unarchiveTask;
|
|
9906
10028
|
cloneTask;
|
|
9907
10029
|
getAbilityTypes;
|
|
10030
|
+
getAbilityType;
|
|
10031
|
+
listAbilities;
|
|
10032
|
+
createAbility;
|
|
10033
|
+
updateAbility;
|
|
10034
|
+
deleteAbility;
|
|
9908
10035
|
// Chats API
|
|
9909
10036
|
getChats;
|
|
9910
10037
|
getChat;
|
|
@@ -10044,6 +10171,7 @@ var GravityRailClient = class {
|
|
|
10044
10171
|
archiveAgent;
|
|
10045
10172
|
unarchiveAgent;
|
|
10046
10173
|
resolveAgentTools;
|
|
10174
|
+
listAgentAbilities;
|
|
10047
10175
|
// Qualifications API
|
|
10048
10176
|
getQualifications;
|
|
10049
10177
|
getQualification;
|
|
@@ -10198,6 +10326,8 @@ var GravityRailClient = class {
|
|
|
10198
10326
|
updateBusinessProfile;
|
|
10199
10327
|
submitBusinessProfile;
|
|
10200
10328
|
cancelBusinessProfile;
|
|
10329
|
+
createOrganizationWorkspace;
|
|
10330
|
+
getOrgBillingCustomer;
|
|
10201
10331
|
getVapidPublicKey;
|
|
10202
10332
|
registerPushSubscription;
|
|
10203
10333
|
unregisterPushSubscription;
|
|
@@ -10526,6 +10656,8 @@ var GravityRailClient = class {
|
|
|
10526
10656
|
updateSubscription;
|
|
10527
10657
|
addWorkspaceToSubscription;
|
|
10528
10658
|
purchaseCredits;
|
|
10659
|
+
createCheckoutSession;
|
|
10660
|
+
listSelfServeProducts;
|
|
10529
10661
|
getAIUsageReport;
|
|
10530
10662
|
getSMSUsageReport;
|
|
10531
10663
|
getPhoneUsageReport;
|
|
@@ -10728,6 +10860,7 @@ var GravityRailClient = class {
|
|
|
10728
10860
|
updatePlatformApp;
|
|
10729
10861
|
deletePlatformApp;
|
|
10730
10862
|
listConnectionMemberFieldKeys;
|
|
10863
|
+
setDefaultGooglePlatformAccount;
|
|
10731
10864
|
// Pronunciations API
|
|
10732
10865
|
getPronunciationEntries;
|
|
10733
10866
|
createPronunciationEntry;
|