@parallelworks/tandem-web 0.178.0 → 0.179.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.
@@ -0,0 +1,80 @@
1
+ import { api as e, unwrap as t } from "../api/client.js";
2
+ import { keepPreviousData as n, queryOptions as r, useMutation as i, useQueryClient as a } from "@tanstack/react-query";
3
+ // src/lib/docSeries.ts
4
+ var o = [
5
+ "daily",
6
+ "weekly",
7
+ "biweekly",
8
+ "monthly"
9
+ ], s = (i, a, o, s) => r({
10
+ queryKey: [
11
+ "workspace",
12
+ i,
13
+ "docs",
14
+ "series",
15
+ a,
16
+ o ?? "",
17
+ s ?? ""
18
+ ],
19
+ queryFn: async ({ signal: n }) => t(await e.GET("/api/v1/workspaces/{workspace}/doc-series", {
20
+ params: {
21
+ path: { workspace: i },
22
+ query: {
23
+ space: a,
24
+ ...o && s && {
25
+ from: o,
26
+ to: s
27
+ }
28
+ }
29
+ },
30
+ signal: n
31
+ })).series,
32
+ placeholderData: n
33
+ });
34
+ function c(n) {
35
+ let r = a(), o = () => r.invalidateQueries({ queryKey: [
36
+ "workspace",
37
+ n,
38
+ "docs"
39
+ ] });
40
+ return {
41
+ create: i({
42
+ mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/doc-series", {
43
+ params: { path: { workspace: n } },
44
+ body: r
45
+ })),
46
+ onSettled: o
47
+ }),
48
+ update: i({
49
+ mutationFn: async ({ id: r, ...i }) => t(await e.PUT("/api/v1/workspaces/{workspace}/doc-series/{series}", {
50
+ params: { path: {
51
+ workspace: n,
52
+ series: r
53
+ } },
54
+ body: i
55
+ })),
56
+ onSettled: o
57
+ }),
58
+ stop: i({
59
+ mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/doc-series/{series}/stop", { params: { path: {
60
+ workspace: n,
61
+ series: r
62
+ } } })),
63
+ onSettled: o
64
+ }),
65
+ makeDoc: i({
66
+ mutationFn: async ({ id: r, day: i }) => t(await e.POST("/api/v1/workspaces/{workspace}/doc-series/{series}/docs", {
67
+ params: { path: {
68
+ workspace: n,
69
+ series: r
70
+ } },
71
+ body: { day: i }
72
+ })),
73
+ onSettled: o
74
+ })
75
+ };
76
+ }
77
+ function l() {
78
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
79
+ }
80
+ export { l as browserZone, s as docSeriesQuery, o as seriesRepeats, c as useDocSeriesActions };
package/lib/knowledge.js CHANGED
@@ -107,12 +107,6 @@ function N(e, t) {
107
107
  id: s.id,
108
108
  status: "decided"
109
109
  })
110
- }] : s.status === "added" ? [{
111
- label: n("confirm"),
112
- onClick: () => i.update.mutate({
113
- id: s.id,
114
- status: "decided"
115
- })
116
110
  }] : [],
117
111
  ...s.status === "superseded" ? [] : [{
118
112
  label: n("supersede"),
@@ -86,6 +86,8 @@ function T() {
86
86
  status_changed: e.raw("status_changed"),
87
87
  run_finished: e.raw("run_finished"),
88
88
  run_stopped: e.raw("run_stopped"),
89
+ run_finished_on: e.raw("run_finished_on"),
90
+ run_stopped_on: e.raw("run_stopped_on"),
89
91
  mentioned: e.raw("mentioned"),
90
92
  update_posted: e.raw("update_posted"),
91
93
  reminder: e.raw("reminder"),
@@ -4,4 +4,10 @@ function t() {
4
4
  let t = e("agent");
5
5
  return (e) => t(e === "default" ? "permissionDefault" : e === "accept-edits" ? "permissionAcceptEdits" : e === "auto" ? "permissionAuto" : "permissionBypass");
6
6
  }
7
- export { t as usePermissionModeName };
7
+ var n = [
8
+ "default",
9
+ "accept-edits",
10
+ "auto",
11
+ "bypass"
12
+ ], r = (e, t) => n.indexOf(e) < n.indexOf(t), i = (e) => `tandem runner --permission-mode ${e}${e === "bypass" ? " --allow-bypass" : ""}`;
13
+ export { r as modeBelow, i as runnerModeCommand, t as usePermissionModeName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallelworks/tandem-web",
3
- "version": "0.178.0",
3
+ "version": "0.179.0",
4
4
  "description": "Tandem's pages, for a host app to render in its own",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",