@axiom-lattice/client-sdk 4.7.1 → 4.8.1
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/__tests__/project-rooms.test.js +20 -0
- package/dist/__tests__/project-rooms.test.js.map +1 -1
- package/dist/index.d.ts +15 -2
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/project-room-hydrators.js +2 -2
- package/dist/project-room-hydrators.js.map +1 -1
- package/dist/project-rooms.d.ts +15 -2
- package/dist/project-rooms.d.ts.map +1 -1
- package/dist/project-rooms.js +3 -1
- package/dist/project-rooms.js.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3679,8 +3679,8 @@ var hydrateMember = (value) => {
|
|
|
3679
3679
|
};
|
|
3680
3680
|
var hydrateBot = (value) => {
|
|
3681
3681
|
const row = record(value);
|
|
3682
|
-
exactKeys(row, ["id", "tenantId", "workspaceId", "projectId", "roomId", "assistantId", "role", "title", "mentionName", "status", "roomThreadId", "joinedAt", "updatedAt"], ["responsibility"]);
|
|
3683
|
-
return { id: requiredString(row, "id"), tenantId: requiredString(row, "tenantId"), workspaceId: requiredString(row, "workspaceId"), projectId: requiredString(row, "projectId"), roomId: requiredString(row, "roomId"), assistantId: requiredString(row, "assistantId"), role: oneOf(row.role, botRoles, "role"), title: requiredString(row, "title"), ...row.responsibility === void 0 ? {} : { responsibility: requiredString(row, "responsibility") }, mentionName: requiredString(row, "mentionName"), status: oneOf(row.status, botStatuses, "status"), roomThreadId: requiredString(row, "roomThreadId"), joinedAt: date(row.joinedAt, "joinedAt"), updatedAt: date(row.updatedAt, "updatedAt") };
|
|
3682
|
+
exactKeys(row, ["id", "tenantId", "workspaceId", "projectId", "roomId", "assistantId", "role", "title", "mentionName", "status", "roomThreadId", "joinedAt", "updatedAt"], ["responsibility", "provisional"]);
|
|
3683
|
+
return { id: requiredString(row, "id"), tenantId: requiredString(row, "tenantId"), workspaceId: requiredString(row, "workspaceId"), projectId: requiredString(row, "projectId"), roomId: requiredString(row, "roomId"), assistantId: requiredString(row, "assistantId"), role: oneOf(row.role, botRoles, "role"), title: requiredString(row, "title"), ...row.responsibility === void 0 ? {} : { responsibility: requiredString(row, "responsibility") }, mentionName: requiredString(row, "mentionName"), status: oneOf(row.status, botStatuses, "status"), roomThreadId: requiredString(row, "roomThreadId"), joinedAt: date(row.joinedAt, "joinedAt"), updatedAt: date(row.updatedAt, "updatedAt"), ...row.provisional === true ? { provisional: true } : {} };
|
|
3684
3684
|
};
|
|
3685
3685
|
var hydrateDispatch = (value) => {
|
|
3686
3686
|
const row = record(value);
|
|
@@ -3742,6 +3742,7 @@ var ProjectRoomsClient = class {
|
|
|
3742
3742
|
};
|
|
3743
3743
|
this.bots = {
|
|
3744
3744
|
list: async (projectId) => this.records(`/api/projects/${encode(projectId)}/bots`, hydrateBot),
|
|
3745
|
+
ensure: async (projectId, membershipId) => hydrateBot(await this.request(`/api/projects/${encode(projectId)}/bots/${encode(membershipId)}/ensure`, { method: "POST", body: {} })),
|
|
3745
3746
|
add: async (projectId, input) => hydrateBot(await this.request(`/api/projects/${encode(projectId)}/bots`, { method: "POST", body: input })),
|
|
3746
3747
|
update: async (projectId, membershipId, input) => hydrateBot(await this.request(`/api/projects/${encode(projectId)}/bots/${encode(membershipId)}`, { method: "PATCH", body: { ...input, expectedUpdatedAt: iso(input.expectedUpdatedAt) } })),
|
|
3747
3748
|
pause: async (projectId, membershipId, input) => hydrateBot(await this.request(`/api/projects/${encode(projectId)}/bots/${encode(membershipId)}/pause`, { method: "POST", body: { expectedUpdatedAt: iso(input.expectedUpdatedAt) } })),
|
|
@@ -3750,10 +3751,11 @@ var ProjectRoomsClient = class {
|
|
|
3750
3751
|
};
|
|
3751
3752
|
this.interrupts = {
|
|
3752
3753
|
resume: async (projectId, input) => {
|
|
3754
|
+
const target = "ref" in input ? { ref: input.ref } : { membershipId: input.membershipId };
|
|
3753
3755
|
await this.request(`/api/projects/${encode(projectId)}/room/interrupts/resume`, {
|
|
3754
3756
|
method: "POST",
|
|
3755
3757
|
body: {
|
|
3756
|
-
|
|
3758
|
+
...target,
|
|
3757
3759
|
...input.answers === void 0 ? {} : { answers: input.answers }
|
|
3758
3760
|
}
|
|
3759
3761
|
});
|