openpond-sdk 0.0.10 → 0.0.11
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/index.js +31 -0
- package/dist/index.js.map +2 -2
- package/dist/profile-actions.js +31 -0
- package/dist/profile-actions.js.map +2 -2
- package/dist/types/packages/sdk/src/index.d.ts +1 -1
- package/dist/types/packages/sdk/src/index.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/profile-actions.d.ts +30 -0
- package/dist/types/packages/sdk/src/profile-actions.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2591,6 +2591,37 @@ var OpenPondProfileActionsClient = class {
|
|
|
2591
2591
|
"Get Profile Action catalog"
|
|
2592
2592
|
)).catalog;
|
|
2593
2593
|
}
|
|
2594
|
+
async run(input) {
|
|
2595
|
+
const teamId = requiredValue(input.teamId, "teamId");
|
|
2596
|
+
const actionKey = requiredValue(input.actionKey, "actionKey");
|
|
2597
|
+
const idempotencyKey = requiredValue(input.idempotencyKey, "idempotencyKey");
|
|
2598
|
+
const catalogVersion = requiredValue(input.catalogVersion, "catalogVersion");
|
|
2599
|
+
const response = await apiFetch(
|
|
2600
|
+
this.#apiBaseUrl,
|
|
2601
|
+
this.#apiKey,
|
|
2602
|
+
`/v1/profile/actions/run?${new URLSearchParams({ teamId }).toString()}`,
|
|
2603
|
+
{
|
|
2604
|
+
method: "POST",
|
|
2605
|
+
headers: { "Content-Type": "application/json" },
|
|
2606
|
+
body: JSON.stringify({
|
|
2607
|
+
...input.profileId?.trim() ? { profileId: input.profileId.trim() } : {},
|
|
2608
|
+
...input.profileName?.trim() ? { profileName: input.profileName.trim() } : {},
|
|
2609
|
+
actionKey,
|
|
2610
|
+
value: input.value ?? {},
|
|
2611
|
+
conversationId: input.conversationId ?? null,
|
|
2612
|
+
createConversation: input.createConversation,
|
|
2613
|
+
conversationTitle: input.conversationTitle ?? null,
|
|
2614
|
+
idempotencyKey,
|
|
2615
|
+
catalogVersion,
|
|
2616
|
+
externalCapabilityLeases: input.externalCapabilityLeases
|
|
2617
|
+
})
|
|
2618
|
+
}
|
|
2619
|
+
);
|
|
2620
|
+
return readApiJson(
|
|
2621
|
+
response,
|
|
2622
|
+
"Run Profile Action"
|
|
2623
|
+
);
|
|
2624
|
+
}
|
|
2594
2625
|
};
|
|
2595
2626
|
function requiredValue(value, name) {
|
|
2596
2627
|
const normalized = value.trim();
|