sunsama-api 0.11.0 → 0.11.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.
Files changed (127) hide show
  1. package/README.md +30 -3
  2. package/dist/cjs/queries/fragments/index.js +1 -0
  3. package/dist/cjs/queries/fragments/index.js.map +1 -1
  4. package/dist/cjs/queries/{mutations/updateTaskComplete.js → fragments/mutation-responses.js} +4 -21
  5. package/dist/cjs/queries/fragments/mutation-responses.js.map +1 -0
  6. package/dist/cjs/queries/index.js +3 -4
  7. package/dist/cjs/queries/index.js.map +1 -1
  8. package/dist/cjs/queries/streams/index.js +8 -0
  9. package/dist/cjs/queries/streams/index.js.map +1 -0
  10. package/dist/cjs/queries/{streams.js → streams/queries.js} +2 -2
  11. package/dist/cjs/queries/streams/queries.js.map +1 -0
  12. package/dist/cjs/queries/tasks/index.js +9 -0
  13. package/dist/cjs/queries/tasks/index.js.map +1 -0
  14. package/dist/cjs/queries/tasks/mutations.js +171 -0
  15. package/dist/cjs/queries/tasks/mutations.js.map +1 -0
  16. package/dist/cjs/queries/{tasks.js → tasks/queries.js} +2 -2
  17. package/dist/cjs/queries/tasks/queries.js.map +1 -0
  18. package/dist/cjs/queries/user/index.js +8 -0
  19. package/dist/cjs/queries/user/index.js.map +1 -0
  20. package/dist/cjs/queries/{user.js → user/queries.js} +1 -1
  21. package/dist/cjs/queries/{mutations/updateTaskText.js.map → user/queries.js.map} +1 -1
  22. package/dist/esm/queries/fragments/index.js +1 -0
  23. package/dist/esm/queries/fragments/index.js.map +1 -1
  24. package/dist/esm/queries/{mutations/updateTaskComplete.js → fragments/mutation-responses.js} +3 -20
  25. package/dist/esm/queries/fragments/mutation-responses.js.map +1 -0
  26. package/dist/esm/queries/index.js +3 -4
  27. package/dist/esm/queries/index.js.map +1 -1
  28. package/dist/esm/queries/streams/index.js +5 -0
  29. package/dist/esm/queries/streams/index.js.map +1 -0
  30. package/dist/esm/queries/{streams.js → streams/queries.js} +2 -2
  31. package/dist/esm/queries/streams/queries.js.map +1 -0
  32. package/dist/esm/queries/tasks/index.js +6 -0
  33. package/dist/esm/queries/tasks/index.js.map +1 -0
  34. package/dist/esm/queries/tasks/mutations.js +168 -0
  35. package/dist/esm/queries/tasks/mutations.js.map +1 -0
  36. package/dist/esm/queries/{tasks.js → tasks/queries.js} +2 -2
  37. package/dist/esm/queries/tasks/queries.js.map +1 -0
  38. package/dist/esm/queries/user/index.js +5 -0
  39. package/dist/esm/queries/user/index.js.map +1 -0
  40. package/dist/esm/queries/{user.js → user/queries.js} +1 -1
  41. package/dist/esm/queries/{user.js.map → user/queries.js.map} +1 -1
  42. package/dist/types/queries/fragments/index.d.ts +1 -0
  43. package/dist/types/queries/fragments/index.d.ts.map +1 -1
  44. package/dist/types/queries/fragments/mutation-responses.d.ts +14 -0
  45. package/dist/types/queries/fragments/mutation-responses.d.ts.map +1 -0
  46. package/dist/types/queries/index.d.ts +3 -4
  47. package/dist/types/queries/index.d.ts.map +1 -1
  48. package/dist/types/queries/streams/index.d.ts +5 -0
  49. package/dist/types/queries/streams/index.d.ts.map +1 -0
  50. package/dist/types/queries/{streams.d.ts → streams/queries.d.ts} +1 -1
  51. package/dist/types/queries/streams/queries.d.ts.map +1 -0
  52. package/dist/types/queries/tasks/index.d.ts +6 -0
  53. package/dist/types/queries/tasks/index.d.ts.map +1 -0
  54. package/dist/types/queries/tasks/mutations.d.ts +85 -0
  55. package/dist/types/queries/tasks/mutations.d.ts.map +1 -0
  56. package/dist/types/queries/{tasks.d.ts → tasks/queries.d.ts} +1 -1
  57. package/dist/types/queries/tasks/queries.d.ts.map +1 -0
  58. package/dist/types/queries/user/index.d.ts +5 -0
  59. package/dist/types/queries/user/index.d.ts.map +1 -0
  60. package/dist/types/queries/{user.d.ts → user/queries.d.ts} +1 -1
  61. package/dist/types/queries/user/queries.d.ts.map +1 -0
  62. package/package.json +1 -1
  63. package/dist/cjs/queries/mutations/createTask.js +0 -32
  64. package/dist/cjs/queries/mutations/createTask.js.map +0 -1
  65. package/dist/cjs/queries/mutations/index.js +0 -16
  66. package/dist/cjs/queries/mutations/index.js.map +0 -1
  67. package/dist/cjs/queries/mutations/updateTaskComplete.js.map +0 -1
  68. package/dist/cjs/queries/mutations/updateTaskDelete.js +0 -26
  69. package/dist/cjs/queries/mutations/updateTaskDelete.js.map +0 -1
  70. package/dist/cjs/queries/mutations/updateTaskDueDate.js +0 -22
  71. package/dist/cjs/queries/mutations/updateTaskDueDate.js.map +0 -1
  72. package/dist/cjs/queries/mutations/updateTaskNotes.js +0 -554
  73. package/dist/cjs/queries/mutations/updateTaskNotes.js.map +0 -1
  74. package/dist/cjs/queries/mutations/updateTaskPlannedTime.js +0 -26
  75. package/dist/cjs/queries/mutations/updateTaskPlannedTime.js.map +0 -1
  76. package/dist/cjs/queries/mutations/updateTaskSnoozeDate.js +0 -22
  77. package/dist/cjs/queries/mutations/updateTaskSnoozeDate.js.map +0 -1
  78. package/dist/cjs/queries/mutations/updateTaskStream.js +0 -565
  79. package/dist/cjs/queries/mutations/updateTaskStream.js.map +0 -1
  80. package/dist/cjs/queries/mutations/updateTaskText.js +0 -554
  81. package/dist/cjs/queries/streams.js.map +0 -1
  82. package/dist/cjs/queries/tasks.js.map +0 -1
  83. package/dist/cjs/queries/user.js.map +0 -1
  84. package/dist/esm/queries/mutations/createTask.js +0 -29
  85. package/dist/esm/queries/mutations/createTask.js.map +0 -1
  86. package/dist/esm/queries/mutations/index.js +0 -13
  87. package/dist/esm/queries/mutations/index.js.map +0 -1
  88. package/dist/esm/queries/mutations/updateTaskComplete.js.map +0 -1
  89. package/dist/esm/queries/mutations/updateTaskDelete.js +0 -23
  90. package/dist/esm/queries/mutations/updateTaskDelete.js.map +0 -1
  91. package/dist/esm/queries/mutations/updateTaskDueDate.js +0 -18
  92. package/dist/esm/queries/mutations/updateTaskDueDate.js.map +0 -1
  93. package/dist/esm/queries/mutations/updateTaskNotes.js +0 -551
  94. package/dist/esm/queries/mutations/updateTaskNotes.js.map +0 -1
  95. package/dist/esm/queries/mutations/updateTaskPlannedTime.js +0 -23
  96. package/dist/esm/queries/mutations/updateTaskPlannedTime.js.map +0 -1
  97. package/dist/esm/queries/mutations/updateTaskSnoozeDate.js +0 -18
  98. package/dist/esm/queries/mutations/updateTaskSnoozeDate.js.map +0 -1
  99. package/dist/esm/queries/mutations/updateTaskStream.js +0 -562
  100. package/dist/esm/queries/mutations/updateTaskStream.js.map +0 -1
  101. package/dist/esm/queries/mutations/updateTaskText.js +0 -551
  102. package/dist/esm/queries/mutations/updateTaskText.js.map +0 -1
  103. package/dist/esm/queries/streams.js.map +0 -1
  104. package/dist/esm/queries/tasks.js.map +0 -1
  105. package/dist/types/queries/mutations/createTask.d.ts +0 -13
  106. package/dist/types/queries/mutations/createTask.d.ts.map +0 -1
  107. package/dist/types/queries/mutations/index.d.ts +0 -13
  108. package/dist/types/queries/mutations/index.d.ts.map +0 -1
  109. package/dist/types/queries/mutations/updateTaskComplete.d.ts +0 -23
  110. package/dist/types/queries/mutations/updateTaskComplete.d.ts.map +0 -1
  111. package/dist/types/queries/mutations/updateTaskDelete.d.ts +0 -13
  112. package/dist/types/queries/mutations/updateTaskDelete.d.ts.map +0 -1
  113. package/dist/types/queries/mutations/updateTaskDueDate.d.ts +0 -5
  114. package/dist/types/queries/mutations/updateTaskDueDate.d.ts.map +0 -1
  115. package/dist/types/queries/mutations/updateTaskNotes.d.ts +0 -5
  116. package/dist/types/queries/mutations/updateTaskNotes.d.ts.map +0 -1
  117. package/dist/types/queries/mutations/updateTaskPlannedTime.d.ts +0 -13
  118. package/dist/types/queries/mutations/updateTaskPlannedTime.d.ts.map +0 -1
  119. package/dist/types/queries/mutations/updateTaskSnoozeDate.d.ts +0 -5
  120. package/dist/types/queries/mutations/updateTaskSnoozeDate.d.ts.map +0 -1
  121. package/dist/types/queries/mutations/updateTaskStream.d.ts +0 -5
  122. package/dist/types/queries/mutations/updateTaskStream.d.ts.map +0 -1
  123. package/dist/types/queries/mutations/updateTaskText.d.ts +0 -5
  124. package/dist/types/queries/mutations/updateTaskText.d.ts.map +0 -1
  125. package/dist/types/queries/streams.d.ts.map +0 -1
  126. package/dist/types/queries/tasks.d.ts.map +0 -1
  127. package/dist/types/queries/user.d.ts.map +0 -1
@@ -0,0 +1,168 @@
1
+ /**
2
+ * Task-related GraphQL mutations
3
+ */
4
+ import { gql } from 'graphql-tag';
5
+ import { UPDATE_TASK_PAYLOAD_FRAGMENT } from '../fragments/index.js';
6
+ /**
7
+ * Mutation for creating a new task
8
+ *
9
+ * Variables:
10
+ * - task: The complete task object to create
11
+ * - groupId: The group ID (duplicated from task for API requirements)
12
+ * - position: Optional position parameter
13
+ */
14
+ export const CREATE_TASK_MUTATION = gql `
15
+ mutation createTask($task: TaskInput!, $groupId: String!, $position: String) {
16
+ createTaskV2(task: $task, groupId: $groupId, position: $position) {
17
+ success
18
+ error
19
+ updatedFields {
20
+ recommendedStreamId
21
+ streamIds
22
+ recommendedTimeEstimate
23
+ timeEstimate
24
+ __typename
25
+ }
26
+ __typename
27
+ }
28
+ }
29
+ `;
30
+ /**
31
+ * Mutation for marking a task as complete
32
+ *
33
+ * Variables:
34
+ * - input.taskId: The ID of the task to mark complete
35
+ * - input.completeOn: ISO 8601 timestamp when the task was completed
36
+ * - input.limitResponsePayload: Flag to limit response size (optional)
37
+ */
38
+ export const UPDATE_TASK_COMPLETE_MUTATION = gql `
39
+ mutation updateTaskComplete($input: UpdateTaskCompleteInput!) {
40
+ updateTaskComplete(input: $input) {
41
+ ...UpdateTaskPayload
42
+ __typename
43
+ }
44
+ }
45
+ ${UPDATE_TASK_PAYLOAD_FRAGMENT}
46
+ `;
47
+ /**
48
+ * Mutation for deleting a task
49
+ *
50
+ * Variables:
51
+ * - input.taskId: The ID of the task to delete
52
+ * - input.limitResponsePayload: Flag to limit response size (optional)
53
+ * - input.wasTaskMerged: Whether the task was merged before deletion (optional)
54
+ */
55
+ export const UPDATE_TASK_DELETE_MUTATION = gql `
56
+ mutation updateTaskDelete($input: UpdateTaskDeleteInput!) {
57
+ updateTaskDelete(input: $input) {
58
+ ...UpdateTaskPayload
59
+ __typename
60
+ }
61
+ }
62
+ ${UPDATE_TASK_PAYLOAD_FRAGMENT}
63
+ `;
64
+ /**
65
+ * Mutation for updating task due date
66
+ *
67
+ * Variables:
68
+ * - input.taskId: The ID of the task to update
69
+ * - input.dueDate: ISO 8601 timestamp for the due date
70
+ * - input.limitResponsePayload: Flag to limit response size (optional)
71
+ */
72
+ export const UPDATE_TASK_DUE_DATE_MUTATION = gql `
73
+ mutation updateTaskDueDate($input: UpdateTaskDueDateInput!) {
74
+ updateTaskDueDate(input: $input) {
75
+ ...UpdateTaskPayload
76
+ __typename
77
+ }
78
+ }
79
+
80
+ ${UPDATE_TASK_PAYLOAD_FRAGMENT}
81
+ `;
82
+ /**
83
+ * Mutation for updating task notes
84
+ *
85
+ * Variables:
86
+ * - input.taskId: The ID of the task to update
87
+ * - input.notes: The updated notes content
88
+ * - input.limitResponsePayload: Flag to limit response size (optional)
89
+ */
90
+ export const UPDATE_TASK_NOTES_MUTATION = gql `
91
+ mutation updateTaskNotes($input: UpdateTaskNotesInput!) {
92
+ updateTaskNotes(input: $input) {
93
+ ...UpdateTaskPayload
94
+ __typename
95
+ }
96
+ }
97
+ ${UPDATE_TASK_PAYLOAD_FRAGMENT}
98
+ `;
99
+ /**
100
+ * Mutation for updating a task's planned time (time estimate)
101
+ *
102
+ * Variables:
103
+ * - input.taskId: The ID of the task to update
104
+ * - input.timeInSeconds: The planned time in seconds (timeEstimate * 60)
105
+ * - input.limitResponsePayload: Flag to limit response size (optional)
106
+ */
107
+ export const UPDATE_TASK_PLANNED_TIME_MUTATION = gql `
108
+ mutation updateTaskPlannedTime($input: UpdateTaskPlannedTimeInput!) {
109
+ updateTaskPlannedTime(input: $input) {
110
+ ...UpdateTaskPayload
111
+ __typename
112
+ }
113
+ }
114
+ ${UPDATE_TASK_PAYLOAD_FRAGMENT}
115
+ `;
116
+ /**
117
+ * Mutation for updating task snooze date
118
+ *
119
+ * Variables:
120
+ * - input.taskId: The ID of the task to update
121
+ * - input.snoozeDate: ISO 8601 timestamp for when to un-snooze the task
122
+ * - input.limitResponsePayload: Flag to limit response size (optional)
123
+ */
124
+ export const UPDATE_TASK_SNOOZE_DATE_MUTATION = gql `
125
+ mutation updateTaskSnoozeDate($input: UpdateTaskSnoozeDateInput!) {
126
+ updateTaskSnoozeDate(input: $input) {
127
+ ...UpdateTaskPayload
128
+ __typename
129
+ }
130
+ }
131
+
132
+ ${UPDATE_TASK_PAYLOAD_FRAGMENT}
133
+ `;
134
+ /**
135
+ * Mutation for updating task stream assignment
136
+ *
137
+ * Variables:
138
+ * - input.taskId: The ID of the task to update
139
+ * - input.streamIds: Array of stream IDs to assign the task to
140
+ * - input.limitResponsePayload: Flag to limit response size (optional)
141
+ */
142
+ export const UPDATE_TASK_STREAM_MUTATION = gql `
143
+ mutation updateTaskStream($input: UpdateTaskStreamInput!) {
144
+ updateTaskStream(input: $input) {
145
+ ...UpdateTaskPayload
146
+ __typename
147
+ }
148
+ }
149
+ ${UPDATE_TASK_PAYLOAD_FRAGMENT}
150
+ `;
151
+ /**
152
+ * Mutation for updating task text/title
153
+ *
154
+ * Variables:
155
+ * - input.taskId: The ID of the task to update
156
+ * - input.text: The updated task title/text
157
+ * - input.limitResponsePayload: Flag to limit response size (optional)
158
+ */
159
+ export const UPDATE_TASK_TEXT_MUTATION = gql `
160
+ mutation updateTaskText($input: UpdateTaskTextInput!) {
161
+ updateTaskText(input: $input) {
162
+ ...UpdateTaskPayload
163
+ __typename
164
+ }
165
+ }
166
+ ${UPDATE_TASK_PAYLOAD_FRAGMENT}
167
+ `;
168
+ //# sourceMappingURL=mutations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../../src/queries/tasks/mutations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;CAetC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAA;;;;;;;IAO5C,4BAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;;;;;;IAO1C,4BAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAA;;;;;;;;IAQ5C,4BAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;;;;;;;IAOzC,4BAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAA;;;;;;;IAOhD,4BAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAA;;;;;;;;IAQ/C,4BAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;;;;;;IAO1C,4BAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAA;;;;;;;IAOxC,4BAA4B;CAC/B,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Task-related GraphQL queries
3
3
  */
4
4
  import { gql } from 'graphql-tag';
5
- import { TASK_FRAGMENT, TASK_ACTUAL_TIME_FRAGMENT, TASK_SCHEDULED_TIME_FRAGMENT, TASK_INTEGRATION_FRAGMENT, } from './fragments/index.js';
5
+ import { TASK_FRAGMENT, TASK_ACTUAL_TIME_FRAGMENT, TASK_SCHEDULED_TIME_FRAGMENT, TASK_INTEGRATION_FRAGMENT, } from '../fragments/index.js';
6
6
  export const GET_TASKS_BY_DAY_QUERY = gql `
7
7
  query getTasksByDay($input: GetTasksByDayInput!) {
8
8
  tasksByDayV2(input: $input) {
@@ -67,4 +67,4 @@ export const GET_TASK_BY_ID_QUERY = gql `
67
67
 
68
68
  ${TASK_INTEGRATION_FRAGMENT}
69
69
  `;
70
- //# sourceMappingURL=tasks.js.map
70
+ //# sourceMappingURL=queries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../../src/queries/tasks/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;IAQrC,aAAa;;IAEb,yBAAyB;;IAEzB,4BAA4B;;IAE5B,yBAAyB;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;;;;;IAQtC,aAAa;;IAEb,yBAAyB;;IAEzB,4BAA4B;;IAE5B,yBAAyB;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAA;;;;;;;;IAQvC,aAAa;;IAEb,yBAAyB;;IAEzB,4BAA4B;;IAE5B,yBAAyB;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;IAQnC,aAAa;;IAEb,yBAAyB;;IAEzB,4BAA4B;;IAE5B,yBAAyB;CAC5B,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * User-related GraphQL operations exports
3
+ */
4
+ export * from './queries.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/user/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC"}
@@ -466,4 +466,4 @@ export const GET_USER_QUERY = gql `
466
466
  }
467
467
  }
468
468
  `;
469
- //# sourceMappingURL=user.js.map
469
+ //# sourceMappingURL=queries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","sourceRoot":"","sources":["../../../src/queries/user.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+chC,CAAC"}
1
+ {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../../src/queries/user/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+chC,CAAC"}
@@ -3,4 +3,5 @@
3
3
  */
4
4
  export * from './task.js';
5
5
  export * from './stream.js';
6
+ export * from './mutation-responses.js';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queries/fragments/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queries/fragments/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * GraphQL fragments for mutation responses
3
+ */
4
+ /**
5
+ * Fragment for PartialTask structure
6
+ * Used in update operations to return only modified fields
7
+ */
8
+ export declare const PARTIAL_TASK_FRAGMENT: import("graphql").DocumentNode;
9
+ /**
10
+ * Fragment for UpdateTaskPayload structure
11
+ * Defines the response structure for task update mutations
12
+ */
13
+ export declare const UPDATE_TASK_PAYLOAD_FRAGMENT: import("graphql").DocumentNode;
14
+ //# sourceMappingURL=mutation-responses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutation-responses.d.ts","sourceRoot":"","sources":["../../../../src/queries/fragments/mutation-responses.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH;;;GAGG;AACH,eAAO,MAAM,qBAAqB,gCAuCjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,gCAgBxC,CAAC"}
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * GraphQL queries and fragments exports
3
3
  */
4
- export * from './user.js';
5
- export * from './tasks.js';
6
- export * from './streams.js';
4
+ export * from './tasks/index.js';
5
+ export * from './streams/index.js';
6
+ export * from './user/index.js';
7
7
  export * from './fragments/index.js';
8
- export * from './mutations/index.js';
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/queries/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/queries/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Stream-related GraphQL operations exports
3
+ */
4
+ export * from './queries.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queries/streams/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC"}
@@ -2,4 +2,4 @@
2
2
  * Stream-related GraphQL queries
3
3
  */
4
4
  export declare const GET_STREAMS_BY_GROUP_ID_QUERY: import("graphql").DocumentNode;
5
- //# sourceMappingURL=streams.d.ts.map
5
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../src/queries/streams/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,6BAA6B,gCASzC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Task-related GraphQL operations exports
3
+ */
4
+ export * from './queries.js';
5
+ export * from './mutations.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queries/tasks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Task-related GraphQL mutations
3
+ */
4
+ /**
5
+ * Mutation for creating a new task
6
+ *
7
+ * Variables:
8
+ * - task: The complete task object to create
9
+ * - groupId: The group ID (duplicated from task for API requirements)
10
+ * - position: Optional position parameter
11
+ */
12
+ export declare const CREATE_TASK_MUTATION: import("graphql").DocumentNode;
13
+ /**
14
+ * Mutation for marking a task as complete
15
+ *
16
+ * Variables:
17
+ * - input.taskId: The ID of the task to mark complete
18
+ * - input.completeOn: ISO 8601 timestamp when the task was completed
19
+ * - input.limitResponsePayload: Flag to limit response size (optional)
20
+ */
21
+ export declare const UPDATE_TASK_COMPLETE_MUTATION: import("graphql").DocumentNode;
22
+ /**
23
+ * Mutation for deleting a task
24
+ *
25
+ * Variables:
26
+ * - input.taskId: The ID of the task to delete
27
+ * - input.limitResponsePayload: Flag to limit response size (optional)
28
+ * - input.wasTaskMerged: Whether the task was merged before deletion (optional)
29
+ */
30
+ export declare const UPDATE_TASK_DELETE_MUTATION: import("graphql").DocumentNode;
31
+ /**
32
+ * Mutation for updating task due date
33
+ *
34
+ * Variables:
35
+ * - input.taskId: The ID of the task to update
36
+ * - input.dueDate: ISO 8601 timestamp for the due date
37
+ * - input.limitResponsePayload: Flag to limit response size (optional)
38
+ */
39
+ export declare const UPDATE_TASK_DUE_DATE_MUTATION: import("graphql").DocumentNode;
40
+ /**
41
+ * Mutation for updating task notes
42
+ *
43
+ * Variables:
44
+ * - input.taskId: The ID of the task to update
45
+ * - input.notes: The updated notes content
46
+ * - input.limitResponsePayload: Flag to limit response size (optional)
47
+ */
48
+ export declare const UPDATE_TASK_NOTES_MUTATION: import("graphql").DocumentNode;
49
+ /**
50
+ * Mutation for updating a task's planned time (time estimate)
51
+ *
52
+ * Variables:
53
+ * - input.taskId: The ID of the task to update
54
+ * - input.timeInSeconds: The planned time in seconds (timeEstimate * 60)
55
+ * - input.limitResponsePayload: Flag to limit response size (optional)
56
+ */
57
+ export declare const UPDATE_TASK_PLANNED_TIME_MUTATION: import("graphql").DocumentNode;
58
+ /**
59
+ * Mutation for updating task snooze date
60
+ *
61
+ * Variables:
62
+ * - input.taskId: The ID of the task to update
63
+ * - input.snoozeDate: ISO 8601 timestamp for when to un-snooze the task
64
+ * - input.limitResponsePayload: Flag to limit response size (optional)
65
+ */
66
+ export declare const UPDATE_TASK_SNOOZE_DATE_MUTATION: import("graphql").DocumentNode;
67
+ /**
68
+ * Mutation for updating task stream assignment
69
+ *
70
+ * Variables:
71
+ * - input.taskId: The ID of the task to update
72
+ * - input.streamIds: Array of stream IDs to assign the task to
73
+ * - input.limitResponsePayload: Flag to limit response size (optional)
74
+ */
75
+ export declare const UPDATE_TASK_STREAM_MUTATION: import("graphql").DocumentNode;
76
+ /**
77
+ * Mutation for updating task text/title
78
+ *
79
+ * Variables:
80
+ * - input.taskId: The ID of the task to update
81
+ * - input.text: The updated task title/text
82
+ * - input.limitResponsePayload: Flag to limit response size (optional)
83
+ */
84
+ export declare const UPDATE_TASK_TEXT_MUTATION: import("graphql").DocumentNode;
85
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../../src/queries/tasks/mutations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,gCAehC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,gCAQzC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,gCAQvC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,gCASzC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,gCAQtC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC,gCAQ7C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC,gCAS5C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,gCAQvC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,gCAQrC,CAAC"}
@@ -5,4 +5,4 @@ export declare const GET_TASKS_BY_DAY_QUERY: import("graphql").DocumentNode;
5
5
  export declare const GET_TASKS_BACKLOG_QUERY: import("graphql").DocumentNode;
6
6
  export declare const GET_ARCHIVED_TASKS_QUERY: import("graphql").DocumentNode;
7
7
  export declare const GET_TASK_BY_ID_QUERY: import("graphql").DocumentNode;
8
- //# sourceMappingURL=tasks.d.ts.map
8
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../src/queries/tasks/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,eAAO,MAAM,sBAAsB,gCAelC,CAAC;AAEF,eAAO,MAAM,uBAAuB,gCAenC,CAAC;AAEF,eAAO,MAAM,wBAAwB,gCAepC,CAAC;AAEF,eAAO,MAAM,oBAAoB,gCAehC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * User-related GraphQL operations exports
3
+ */
4
+ export * from './queries.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queries/user/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC"}
@@ -2,4 +2,4 @@
2
2
  * User-related GraphQL queries
3
3
  */
4
4
  export declare const GET_USER_QUERY: import("graphql").DocumentNode;
5
- //# sourceMappingURL=user.d.ts.map
5
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../src/queries/user/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,cAAc,gCA+c1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sunsama-api",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "TypeScript wrapper for the Sunsama API - Daily planning and task management",
5
5
  "keywords": [
6
6
  "sunsama",
@@ -1,32 +0,0 @@
1
- "use strict";
2
- /**
3
- * GraphQL mutation for creating a new task
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CREATE_TASK_MUTATION = void 0;
7
- const graphql_tag_1 = require("graphql-tag");
8
- /**
9
- * Mutation for creating a new task
10
- *
11
- * Variables:
12
- * - task: The complete task object to create
13
- * - groupId: The group ID (duplicated from task for API requirements)
14
- * - position: Optional position parameter
15
- */
16
- exports.CREATE_TASK_MUTATION = (0, graphql_tag_1.gql) `
17
- mutation createTask($task: TaskInput!, $groupId: String!, $position: String) {
18
- createTaskV2(task: $task, groupId: $groupId, position: $position) {
19
- success
20
- error
21
- updatedFields {
22
- recommendedStreamId
23
- streamIds
24
- recommendedTimeEstimate
25
- timeEstimate
26
- __typename
27
- }
28
- __typename
29
- }
30
- }
31
- `;
32
- //# sourceMappingURL=createTask.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createTask.js","sourceRoot":"","sources":["../../../../src/queries/mutations/createTask.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6CAAkC;AAElC;;;;;;;GAOG;AACU,QAAA,oBAAoB,GAAG,IAAA,iBAAG,EAAA;;;;;;;;;;;;;;;CAetC,CAAC"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- /**
3
- * GraphQL mutations exports
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const tslib_1 = require("tslib");
7
- tslib_1.__exportStar(require("./updateTaskComplete.js"), exports);
8
- tslib_1.__exportStar(require("./updateTaskDelete.js"), exports);
9
- tslib_1.__exportStar(require("./createTask.js"), exports);
10
- tslib_1.__exportStar(require("./updateTaskSnoozeDate.js"), exports);
11
- tslib_1.__exportStar(require("./updateTaskNotes.js"), exports);
12
- tslib_1.__exportStar(require("./updateTaskPlannedTime.js"), exports);
13
- tslib_1.__exportStar(require("./updateTaskDueDate.js"), exports);
14
- tslib_1.__exportStar(require("./updateTaskText.js"), exports);
15
- tslib_1.__exportStar(require("./updateTaskStream.js"), exports);
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/mutations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAAwC;AACxC,gEAAsC;AACtC,0DAAgC;AAChC,oEAA0C;AAC1C,+DAAqC;AACrC,qEAA2C;AAC3C,iEAAuC;AACvC,8DAAoC;AACpC,gEAAsC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateTaskComplete.js","sourceRoot":"","sources":["../../../../src/queries/mutations/updateTaskComplete.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6CAAkC;AAClC,kDAK8B;AAE9B;;;GAGG;AACU,QAAA,qBAAqB,GAAG,IAAA,iBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoCpC,mCAAyB;IACzB,sCAA4B;IAC5B,mCAAyB;CAC5B,CAAC;AAEF;;;GAGG;AACU,QAAA,4BAA4B,GAAG,IAAA,iBAAG,EAAA;;;;;;;;;;;;;;IAc3C,uBAAa;IACb,6BAAqB;CACxB,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,6BAA6B,GAAG,IAAA,iBAAG,EAAA;;;;;;;IAO5C,oCAA4B;CAC/B,CAAC"}
@@ -1,26 +0,0 @@
1
- "use strict";
2
- /**
3
- * GraphQL mutation for deleting a task
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UPDATE_TASK_DELETE_MUTATION = void 0;
7
- const graphql_tag_1 = require("graphql-tag");
8
- const updateTaskComplete_js_1 = require("./updateTaskComplete.js");
9
- /**
10
- * Mutation for deleting a task
11
- *
12
- * Variables:
13
- * - input.taskId: The ID of the task to delete
14
- * - input.limitResponsePayload: Flag to limit response size (optional)
15
- * - input.wasTaskMerged: Whether the task was merged before deletion (optional)
16
- */
17
- exports.UPDATE_TASK_DELETE_MUTATION = (0, graphql_tag_1.gql) `
18
- mutation updateTaskDelete($input: UpdateTaskDeleteInput!) {
19
- updateTaskDelete(input: $input) {
20
- ...UpdateTaskPayload
21
- __typename
22
- }
23
- }
24
- ${updateTaskComplete_js_1.UPDATE_TASK_PAYLOAD_FRAGMENT}
25
- `;
26
- //# sourceMappingURL=updateTaskDelete.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateTaskDelete.js","sourceRoot":"","sources":["../../../../src/queries/mutations/updateTaskDelete.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6CAAkC;AAClC,mEAAuE;AAEvE;;;;;;;GAOG;AACU,QAAA,2BAA2B,GAAG,IAAA,iBAAG,EAAA;;;;;;;IAO1C,oDAA4B;CAC/B,CAAC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- /**
3
- * GraphQL mutation for updating task due date
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UPDATE_TASK_DUE_DATE_MUTATION = void 0;
7
- const tslib_1 = require("tslib");
8
- const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
9
- const index_js_1 = require("../fragments/index.js");
10
- const updateTaskComplete_js_1 = require("./updateTaskComplete.js");
11
- exports.UPDATE_TASK_DUE_DATE_MUTATION = (0, graphql_tag_1.default) `
12
- mutation updateTaskDueDate($input: UpdateTaskDueDateInput!) {
13
- updateTaskDueDate(input: $input) {
14
- ...UpdateTaskPayload
15
- __typename
16
- }
17
- }
18
-
19
- ${updateTaskComplete_js_1.UPDATE_TASK_PAYLOAD_FRAGMENT}
20
- ${index_js_1.TASK_FRAGMENT}
21
- `;
22
- //# sourceMappingURL=updateTaskDueDate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateTaskDueDate.js","sourceRoot":"","sources":["../../../../src/queries/mutations/updateTaskDueDate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,sEAA8B;AAC9B,oDAAsD;AACtD,mEAAuE;AAE1D,QAAA,6BAA6B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;IAQ5C,oDAA4B;IAC5B,wBAAa;CAChB,CAAC"}