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.
- package/README.md +30 -3
- package/dist/cjs/queries/fragments/index.js +1 -0
- package/dist/cjs/queries/fragments/index.js.map +1 -1
- package/dist/cjs/queries/{mutations/updateTaskComplete.js → fragments/mutation-responses.js} +4 -21
- package/dist/cjs/queries/fragments/mutation-responses.js.map +1 -0
- package/dist/cjs/queries/index.js +3 -4
- package/dist/cjs/queries/index.js.map +1 -1
- package/dist/cjs/queries/streams/index.js +8 -0
- package/dist/cjs/queries/streams/index.js.map +1 -0
- package/dist/cjs/queries/{streams.js → streams/queries.js} +2 -2
- package/dist/cjs/queries/streams/queries.js.map +1 -0
- package/dist/cjs/queries/tasks/index.js +9 -0
- package/dist/cjs/queries/tasks/index.js.map +1 -0
- package/dist/cjs/queries/tasks/mutations.js +171 -0
- package/dist/cjs/queries/tasks/mutations.js.map +1 -0
- package/dist/cjs/queries/{tasks.js → tasks/queries.js} +2 -2
- package/dist/cjs/queries/tasks/queries.js.map +1 -0
- package/dist/cjs/queries/user/index.js +8 -0
- package/dist/cjs/queries/user/index.js.map +1 -0
- package/dist/cjs/queries/{user.js → user/queries.js} +1 -1
- package/dist/cjs/queries/{mutations/updateTaskText.js.map → user/queries.js.map} +1 -1
- package/dist/esm/queries/fragments/index.js +1 -0
- package/dist/esm/queries/fragments/index.js.map +1 -1
- package/dist/esm/queries/{mutations/updateTaskComplete.js → fragments/mutation-responses.js} +3 -20
- package/dist/esm/queries/fragments/mutation-responses.js.map +1 -0
- package/dist/esm/queries/index.js +3 -4
- package/dist/esm/queries/index.js.map +1 -1
- package/dist/esm/queries/streams/index.js +5 -0
- package/dist/esm/queries/streams/index.js.map +1 -0
- package/dist/esm/queries/{streams.js → streams/queries.js} +2 -2
- package/dist/esm/queries/streams/queries.js.map +1 -0
- package/dist/esm/queries/tasks/index.js +6 -0
- package/dist/esm/queries/tasks/index.js.map +1 -0
- package/dist/esm/queries/tasks/mutations.js +168 -0
- package/dist/esm/queries/tasks/mutations.js.map +1 -0
- package/dist/esm/queries/{tasks.js → tasks/queries.js} +2 -2
- package/dist/esm/queries/tasks/queries.js.map +1 -0
- package/dist/esm/queries/user/index.js +5 -0
- package/dist/esm/queries/user/index.js.map +1 -0
- package/dist/esm/queries/{user.js → user/queries.js} +1 -1
- package/dist/esm/queries/{user.js.map → user/queries.js.map} +1 -1
- package/dist/types/queries/fragments/index.d.ts +1 -0
- package/dist/types/queries/fragments/index.d.ts.map +1 -1
- package/dist/types/queries/fragments/mutation-responses.d.ts +14 -0
- package/dist/types/queries/fragments/mutation-responses.d.ts.map +1 -0
- package/dist/types/queries/index.d.ts +3 -4
- package/dist/types/queries/index.d.ts.map +1 -1
- package/dist/types/queries/streams/index.d.ts +5 -0
- package/dist/types/queries/streams/index.d.ts.map +1 -0
- package/dist/types/queries/{streams.d.ts → streams/queries.d.ts} +1 -1
- package/dist/types/queries/streams/queries.d.ts.map +1 -0
- package/dist/types/queries/tasks/index.d.ts +6 -0
- package/dist/types/queries/tasks/index.d.ts.map +1 -0
- package/dist/types/queries/tasks/mutations.d.ts +85 -0
- package/dist/types/queries/tasks/mutations.d.ts.map +1 -0
- package/dist/types/queries/{tasks.d.ts → tasks/queries.d.ts} +1 -1
- package/dist/types/queries/tasks/queries.d.ts.map +1 -0
- package/dist/types/queries/user/index.d.ts +5 -0
- package/dist/types/queries/user/index.d.ts.map +1 -0
- package/dist/types/queries/{user.d.ts → user/queries.d.ts} +1 -1
- package/dist/types/queries/user/queries.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/cjs/queries/mutations/createTask.js +0 -32
- package/dist/cjs/queries/mutations/createTask.js.map +0 -1
- package/dist/cjs/queries/mutations/index.js +0 -16
- package/dist/cjs/queries/mutations/index.js.map +0 -1
- package/dist/cjs/queries/mutations/updateTaskComplete.js.map +0 -1
- package/dist/cjs/queries/mutations/updateTaskDelete.js +0 -26
- package/dist/cjs/queries/mutations/updateTaskDelete.js.map +0 -1
- package/dist/cjs/queries/mutations/updateTaskDueDate.js +0 -22
- package/dist/cjs/queries/mutations/updateTaskDueDate.js.map +0 -1
- package/dist/cjs/queries/mutations/updateTaskNotes.js +0 -554
- package/dist/cjs/queries/mutations/updateTaskNotes.js.map +0 -1
- package/dist/cjs/queries/mutations/updateTaskPlannedTime.js +0 -26
- package/dist/cjs/queries/mutations/updateTaskPlannedTime.js.map +0 -1
- package/dist/cjs/queries/mutations/updateTaskSnoozeDate.js +0 -22
- package/dist/cjs/queries/mutations/updateTaskSnoozeDate.js.map +0 -1
- package/dist/cjs/queries/mutations/updateTaskStream.js +0 -565
- package/dist/cjs/queries/mutations/updateTaskStream.js.map +0 -1
- package/dist/cjs/queries/mutations/updateTaskText.js +0 -554
- package/dist/cjs/queries/streams.js.map +0 -1
- package/dist/cjs/queries/tasks.js.map +0 -1
- package/dist/cjs/queries/user.js.map +0 -1
- package/dist/esm/queries/mutations/createTask.js +0 -29
- package/dist/esm/queries/mutations/createTask.js.map +0 -1
- package/dist/esm/queries/mutations/index.js +0 -13
- package/dist/esm/queries/mutations/index.js.map +0 -1
- package/dist/esm/queries/mutations/updateTaskComplete.js.map +0 -1
- package/dist/esm/queries/mutations/updateTaskDelete.js +0 -23
- package/dist/esm/queries/mutations/updateTaskDelete.js.map +0 -1
- package/dist/esm/queries/mutations/updateTaskDueDate.js +0 -18
- package/dist/esm/queries/mutations/updateTaskDueDate.js.map +0 -1
- package/dist/esm/queries/mutations/updateTaskNotes.js +0 -551
- package/dist/esm/queries/mutations/updateTaskNotes.js.map +0 -1
- package/dist/esm/queries/mutations/updateTaskPlannedTime.js +0 -23
- package/dist/esm/queries/mutations/updateTaskPlannedTime.js.map +0 -1
- package/dist/esm/queries/mutations/updateTaskSnoozeDate.js +0 -18
- package/dist/esm/queries/mutations/updateTaskSnoozeDate.js.map +0 -1
- package/dist/esm/queries/mutations/updateTaskStream.js +0 -562
- package/dist/esm/queries/mutations/updateTaskStream.js.map +0 -1
- package/dist/esm/queries/mutations/updateTaskText.js +0 -551
- package/dist/esm/queries/mutations/updateTaskText.js.map +0 -1
- package/dist/esm/queries/streams.js.map +0 -1
- package/dist/esm/queries/tasks.js.map +0 -1
- package/dist/types/queries/mutations/createTask.d.ts +0 -13
- package/dist/types/queries/mutations/createTask.d.ts.map +0 -1
- package/dist/types/queries/mutations/index.d.ts +0 -13
- package/dist/types/queries/mutations/index.d.ts.map +0 -1
- package/dist/types/queries/mutations/updateTaskComplete.d.ts +0 -23
- package/dist/types/queries/mutations/updateTaskComplete.d.ts.map +0 -1
- package/dist/types/queries/mutations/updateTaskDelete.d.ts +0 -13
- package/dist/types/queries/mutations/updateTaskDelete.d.ts.map +0 -1
- package/dist/types/queries/mutations/updateTaskDueDate.d.ts +0 -5
- package/dist/types/queries/mutations/updateTaskDueDate.d.ts.map +0 -1
- package/dist/types/queries/mutations/updateTaskNotes.d.ts +0 -5
- package/dist/types/queries/mutations/updateTaskNotes.d.ts.map +0 -1
- package/dist/types/queries/mutations/updateTaskPlannedTime.d.ts +0 -13
- package/dist/types/queries/mutations/updateTaskPlannedTime.d.ts.map +0 -1
- package/dist/types/queries/mutations/updateTaskSnoozeDate.d.ts +0 -5
- package/dist/types/queries/mutations/updateTaskSnoozeDate.d.ts.map +0 -1
- package/dist/types/queries/mutations/updateTaskStream.d.ts +0 -5
- package/dist/types/queries/mutations/updateTaskStream.d.ts.map +0 -1
- package/dist/types/queries/mutations/updateTaskText.d.ts +0 -5
- package/dist/types/queries/mutations/updateTaskText.d.ts.map +0 -1
- package/dist/types/queries/streams.d.ts.map +0 -1
- package/dist/types/queries/tasks.d.ts.map +0 -1
- package/dist/types/queries/user.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -406,6 +406,29 @@ try {
|
|
|
406
406
|
}
|
|
407
407
|
```
|
|
408
408
|
|
|
409
|
+
## Project Structure
|
|
410
|
+
|
|
411
|
+
```
|
|
412
|
+
sunsama-api/
|
|
413
|
+
├── src/
|
|
414
|
+
│ ├── client/ # Main SunsamaClient implementation
|
|
415
|
+
│ ├── queries/ # GraphQL operations (domain-based)
|
|
416
|
+
│ │ ├── tasks/ # Task queries and mutations
|
|
417
|
+
│ │ ├── streams/ # Stream queries
|
|
418
|
+
│ │ ├── user/ # User queries
|
|
419
|
+
│ │ └── fragments/ # Shared GraphQL fragments
|
|
420
|
+
│ ├── types/ # TypeScript type definitions
|
|
421
|
+
│ ├── utils/ # Utility functions
|
|
422
|
+
│ ├── errors/ # Custom error classes
|
|
423
|
+
│ └── __tests__/ # Test suite
|
|
424
|
+
├── scripts/ # Development and testing scripts
|
|
425
|
+
├── dist/ # Build output (git ignored)
|
|
426
|
+
│ ├── cjs/ # CommonJS build
|
|
427
|
+
│ ├── esm/ # ES Modules build
|
|
428
|
+
│ └── types/ # TypeScript declarations
|
|
429
|
+
└── package.json
|
|
430
|
+
```
|
|
431
|
+
|
|
409
432
|
## Development
|
|
410
433
|
|
|
411
434
|
This project uses modern development tools:
|
|
@@ -438,12 +461,16 @@ pnpm lint
|
|
|
438
461
|
|
|
439
462
|
### Scripts
|
|
440
463
|
|
|
441
|
-
- `pnpm build` - Build the package for distribution
|
|
464
|
+
- `pnpm build` - Build the package for distribution (CJS, ESM, types)
|
|
442
465
|
- `pnpm dev` - Start development mode with watch
|
|
443
|
-
- `pnpm test` - Run the test suite
|
|
466
|
+
- `pnpm test` - Run the test suite with Vitest
|
|
467
|
+
- `pnpm test:auth` - Test with real API credentials
|
|
444
468
|
- `pnpm test:coverage` - Run tests with coverage report
|
|
445
|
-
- `pnpm
|
|
469
|
+
- `pnpm test:watch` - Run tests in watch mode
|
|
470
|
+
- `pnpm lint` - Lint the codebase with ESLint
|
|
446
471
|
- `pnpm format` - Format code with Prettier
|
|
472
|
+
- `pnpm typecheck` - Type-check without building
|
|
473
|
+
- `npx changeset` - Create changeset for version bump
|
|
447
474
|
|
|
448
475
|
## Contributing
|
|
449
476
|
|
|
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
tslib_1.__exportStar(require("./task.js"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./stream.js"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./mutation-responses.js"), exports);
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/fragments/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oDAA0B;AAC1B,sDAA4B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/fragments/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oDAA0B;AAC1B,sDAA4B;AAC5B,kEAAwC"}
|
package/dist/cjs/queries/{mutations/updateTaskComplete.js → fragments/mutation-responses.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* GraphQL
|
|
3
|
+
* GraphQL fragments for mutation responses
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.UPDATE_TASK_PAYLOAD_FRAGMENT = exports.PARTIAL_TASK_FRAGMENT = void 0;
|
|
7
7
|
const graphql_tag_1 = require("graphql-tag");
|
|
8
|
-
const task_js_1 = require("
|
|
8
|
+
const task_js_1 = require("./task.js");
|
|
9
9
|
/**
|
|
10
10
|
* Fragment for PartialTask structure
|
|
11
11
|
* Used in update operations to return only modified fields
|
|
@@ -71,21 +71,4 @@ exports.UPDATE_TASK_PAYLOAD_FRAGMENT = (0, graphql_tag_1.gql) `
|
|
|
71
71
|
${task_js_1.TASK_FRAGMENT}
|
|
72
72
|
${exports.PARTIAL_TASK_FRAGMENT}
|
|
73
73
|
`;
|
|
74
|
-
|
|
75
|
-
* Mutation for marking a task as complete
|
|
76
|
-
*
|
|
77
|
-
* Variables:
|
|
78
|
-
* - input.taskId: The ID of the task to mark complete
|
|
79
|
-
* - input.completeOn: ISO 8601 timestamp when the task was completed
|
|
80
|
-
* - input.limitResponsePayload: Flag to limit response size (optional)
|
|
81
|
-
*/
|
|
82
|
-
exports.UPDATE_TASK_COMPLETE_MUTATION = (0, graphql_tag_1.gql) `
|
|
83
|
-
mutation updateTaskComplete($input: UpdateTaskCompleteInput!) {
|
|
84
|
-
updateTaskComplete(input: $input) {
|
|
85
|
-
...UpdateTaskPayload
|
|
86
|
-
__typename
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
${exports.UPDATE_TASK_PAYLOAD_FRAGMENT}
|
|
90
|
-
`;
|
|
91
|
-
//# sourceMappingURL=updateTaskComplete.js.map
|
|
74
|
+
//# sourceMappingURL=mutation-responses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutation-responses.js","sourceRoot":"","sources":["../../../../src/queries/fragments/mutation-responses.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6CAAkC;AAClC,uCAKmB;AAEnB;;;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"}
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
|
-
tslib_1.__exportStar(require("./
|
|
8
|
-
tslib_1.__exportStar(require("./
|
|
9
|
-
tslib_1.__exportStar(require("./
|
|
7
|
+
tslib_1.__exportStar(require("./tasks/index.js"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./streams/index.js"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./user/index.js"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./fragments/index.js"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./mutations/index.js"), exports);
|
|
12
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/queries/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/queries/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2DAAiC;AACjC,6DAAmC;AACnC,0DAAgC;AAChC,+DAAqC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/streams/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uDAA6B"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.GET_STREAMS_BY_GROUP_ID_QUERY = void 0;
|
|
7
7
|
const graphql_tag_1 = require("graphql-tag");
|
|
8
|
-
const index_js_1 = require("
|
|
8
|
+
const index_js_1 = require("../fragments/index.js");
|
|
9
9
|
exports.GET_STREAMS_BY_GROUP_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
10
10
|
query getStreamsByGroupId($groupId: String!) {
|
|
11
11
|
streamsByGroupId(groupId: $groupId) {
|
|
@@ -16,4 +16,4 @@ exports.GET_STREAMS_BY_GROUP_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
|
16
16
|
|
|
17
17
|
${index_js_1.STREAM_FRAGMENT}
|
|
18
18
|
`;
|
|
19
|
-
//# sourceMappingURL=
|
|
19
|
+
//# sourceMappingURL=queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../../src/queries/streams/queries.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6CAAkC;AAClC,oDAAwD;AAE3C,QAAA,6BAA6B,GAAG,IAAA,iBAAG,EAAA;;;;;;;;IAQ5C,0BAAe;CAClB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Task-related GraphQL operations exports
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
tslib_1.__exportStar(require("./queries.js"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./mutations.js"), exports);
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/tasks/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uDAA6B;AAC7B,yDAA+B"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Task-related GraphQL mutations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UPDATE_TASK_TEXT_MUTATION = exports.UPDATE_TASK_STREAM_MUTATION = exports.UPDATE_TASK_SNOOZE_DATE_MUTATION = exports.UPDATE_TASK_PLANNED_TIME_MUTATION = exports.UPDATE_TASK_NOTES_MUTATION = exports.UPDATE_TASK_DUE_DATE_MUTATION = exports.UPDATE_TASK_DELETE_MUTATION = exports.UPDATE_TASK_COMPLETE_MUTATION = exports.CREATE_TASK_MUTATION = void 0;
|
|
7
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
8
|
+
const index_js_1 = require("../fragments/index.js");
|
|
9
|
+
/**
|
|
10
|
+
* Mutation for creating a new task
|
|
11
|
+
*
|
|
12
|
+
* Variables:
|
|
13
|
+
* - task: The complete task object to create
|
|
14
|
+
* - groupId: The group ID (duplicated from task for API requirements)
|
|
15
|
+
* - position: Optional position parameter
|
|
16
|
+
*/
|
|
17
|
+
exports.CREATE_TASK_MUTATION = (0, graphql_tag_1.gql) `
|
|
18
|
+
mutation createTask($task: TaskInput!, $groupId: String!, $position: String) {
|
|
19
|
+
createTaskV2(task: $task, groupId: $groupId, position: $position) {
|
|
20
|
+
success
|
|
21
|
+
error
|
|
22
|
+
updatedFields {
|
|
23
|
+
recommendedStreamId
|
|
24
|
+
streamIds
|
|
25
|
+
recommendedTimeEstimate
|
|
26
|
+
timeEstimate
|
|
27
|
+
__typename
|
|
28
|
+
}
|
|
29
|
+
__typename
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
/**
|
|
34
|
+
* Mutation for marking a task as complete
|
|
35
|
+
*
|
|
36
|
+
* Variables:
|
|
37
|
+
* - input.taskId: The ID of the task to mark complete
|
|
38
|
+
* - input.completeOn: ISO 8601 timestamp when the task was completed
|
|
39
|
+
* - input.limitResponsePayload: Flag to limit response size (optional)
|
|
40
|
+
*/
|
|
41
|
+
exports.UPDATE_TASK_COMPLETE_MUTATION = (0, graphql_tag_1.gql) `
|
|
42
|
+
mutation updateTaskComplete($input: UpdateTaskCompleteInput!) {
|
|
43
|
+
updateTaskComplete(input: $input) {
|
|
44
|
+
...UpdateTaskPayload
|
|
45
|
+
__typename
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
${index_js_1.UPDATE_TASK_PAYLOAD_FRAGMENT}
|
|
49
|
+
`;
|
|
50
|
+
/**
|
|
51
|
+
* Mutation for deleting a task
|
|
52
|
+
*
|
|
53
|
+
* Variables:
|
|
54
|
+
* - input.taskId: The ID of the task to delete
|
|
55
|
+
* - input.limitResponsePayload: Flag to limit response size (optional)
|
|
56
|
+
* - input.wasTaskMerged: Whether the task was merged before deletion (optional)
|
|
57
|
+
*/
|
|
58
|
+
exports.UPDATE_TASK_DELETE_MUTATION = (0, graphql_tag_1.gql) `
|
|
59
|
+
mutation updateTaskDelete($input: UpdateTaskDeleteInput!) {
|
|
60
|
+
updateTaskDelete(input: $input) {
|
|
61
|
+
...UpdateTaskPayload
|
|
62
|
+
__typename
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
${index_js_1.UPDATE_TASK_PAYLOAD_FRAGMENT}
|
|
66
|
+
`;
|
|
67
|
+
/**
|
|
68
|
+
* Mutation for updating task due date
|
|
69
|
+
*
|
|
70
|
+
* Variables:
|
|
71
|
+
* - input.taskId: The ID of the task to update
|
|
72
|
+
* - input.dueDate: ISO 8601 timestamp for the due date
|
|
73
|
+
* - input.limitResponsePayload: Flag to limit response size (optional)
|
|
74
|
+
*/
|
|
75
|
+
exports.UPDATE_TASK_DUE_DATE_MUTATION = (0, graphql_tag_1.gql) `
|
|
76
|
+
mutation updateTaskDueDate($input: UpdateTaskDueDateInput!) {
|
|
77
|
+
updateTaskDueDate(input: $input) {
|
|
78
|
+
...UpdateTaskPayload
|
|
79
|
+
__typename
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
${index_js_1.UPDATE_TASK_PAYLOAD_FRAGMENT}
|
|
84
|
+
`;
|
|
85
|
+
/**
|
|
86
|
+
* Mutation for updating task notes
|
|
87
|
+
*
|
|
88
|
+
* Variables:
|
|
89
|
+
* - input.taskId: The ID of the task to update
|
|
90
|
+
* - input.notes: The updated notes content
|
|
91
|
+
* - input.limitResponsePayload: Flag to limit response size (optional)
|
|
92
|
+
*/
|
|
93
|
+
exports.UPDATE_TASK_NOTES_MUTATION = (0, graphql_tag_1.gql) `
|
|
94
|
+
mutation updateTaskNotes($input: UpdateTaskNotesInput!) {
|
|
95
|
+
updateTaskNotes(input: $input) {
|
|
96
|
+
...UpdateTaskPayload
|
|
97
|
+
__typename
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
${index_js_1.UPDATE_TASK_PAYLOAD_FRAGMENT}
|
|
101
|
+
`;
|
|
102
|
+
/**
|
|
103
|
+
* Mutation for updating a task's planned time (time estimate)
|
|
104
|
+
*
|
|
105
|
+
* Variables:
|
|
106
|
+
* - input.taskId: The ID of the task to update
|
|
107
|
+
* - input.timeInSeconds: The planned time in seconds (timeEstimate * 60)
|
|
108
|
+
* - input.limitResponsePayload: Flag to limit response size (optional)
|
|
109
|
+
*/
|
|
110
|
+
exports.UPDATE_TASK_PLANNED_TIME_MUTATION = (0, graphql_tag_1.gql) `
|
|
111
|
+
mutation updateTaskPlannedTime($input: UpdateTaskPlannedTimeInput!) {
|
|
112
|
+
updateTaskPlannedTime(input: $input) {
|
|
113
|
+
...UpdateTaskPayload
|
|
114
|
+
__typename
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
${index_js_1.UPDATE_TASK_PAYLOAD_FRAGMENT}
|
|
118
|
+
`;
|
|
119
|
+
/**
|
|
120
|
+
* Mutation for updating task snooze date
|
|
121
|
+
*
|
|
122
|
+
* Variables:
|
|
123
|
+
* - input.taskId: The ID of the task to update
|
|
124
|
+
* - input.snoozeDate: ISO 8601 timestamp for when to un-snooze the task
|
|
125
|
+
* - input.limitResponsePayload: Flag to limit response size (optional)
|
|
126
|
+
*/
|
|
127
|
+
exports.UPDATE_TASK_SNOOZE_DATE_MUTATION = (0, graphql_tag_1.gql) `
|
|
128
|
+
mutation updateTaskSnoozeDate($input: UpdateTaskSnoozeDateInput!) {
|
|
129
|
+
updateTaskSnoozeDate(input: $input) {
|
|
130
|
+
...UpdateTaskPayload
|
|
131
|
+
__typename
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
${index_js_1.UPDATE_TASK_PAYLOAD_FRAGMENT}
|
|
136
|
+
`;
|
|
137
|
+
/**
|
|
138
|
+
* Mutation for updating task stream assignment
|
|
139
|
+
*
|
|
140
|
+
* Variables:
|
|
141
|
+
* - input.taskId: The ID of the task to update
|
|
142
|
+
* - input.streamIds: Array of stream IDs to assign the task to
|
|
143
|
+
* - input.limitResponsePayload: Flag to limit response size (optional)
|
|
144
|
+
*/
|
|
145
|
+
exports.UPDATE_TASK_STREAM_MUTATION = (0, graphql_tag_1.gql) `
|
|
146
|
+
mutation updateTaskStream($input: UpdateTaskStreamInput!) {
|
|
147
|
+
updateTaskStream(input: $input) {
|
|
148
|
+
...UpdateTaskPayload
|
|
149
|
+
__typename
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
${index_js_1.UPDATE_TASK_PAYLOAD_FRAGMENT}
|
|
153
|
+
`;
|
|
154
|
+
/**
|
|
155
|
+
* Mutation for updating task text/title
|
|
156
|
+
*
|
|
157
|
+
* Variables:
|
|
158
|
+
* - input.taskId: The ID of the task to update
|
|
159
|
+
* - input.text: The updated task title/text
|
|
160
|
+
* - input.limitResponsePayload: Flag to limit response size (optional)
|
|
161
|
+
*/
|
|
162
|
+
exports.UPDATE_TASK_TEXT_MUTATION = (0, graphql_tag_1.gql) `
|
|
163
|
+
mutation updateTaskText($input: UpdateTaskTextInput!) {
|
|
164
|
+
updateTaskText(input: $input) {
|
|
165
|
+
...UpdateTaskPayload
|
|
166
|
+
__typename
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
${index_js_1.UPDATE_TASK_PAYLOAD_FRAGMENT}
|
|
170
|
+
`;
|
|
171
|
+
//# 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,6CAAkC;AAClC,oDAAqE;AAErE;;;;;;;GAOG;AACU,QAAA,oBAAoB,GAAG,IAAA,iBAAG,EAAA;;;;;;;;;;;;;;;CAetC,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,6BAA6B,GAAG,IAAA,iBAAG,EAAA;;;;;;;IAO5C,uCAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,2BAA2B,GAAG,IAAA,iBAAG,EAAA;;;;;;;IAO1C,uCAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,6BAA6B,GAAG,IAAA,iBAAG,EAAA;;;;;;;;IAQ5C,uCAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,0BAA0B,GAAG,IAAA,iBAAG,EAAA;;;;;;;IAOzC,uCAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,iCAAiC,GAAG,IAAA,iBAAG,EAAA;;;;;;;IAOhD,uCAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,gCAAgC,GAAG,IAAA,iBAAG,EAAA;;;;;;;;IAQ/C,uCAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,2BAA2B,GAAG,IAAA,iBAAG,EAAA;;;;;;;IAO1C,uCAA4B;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,yBAAyB,GAAG,IAAA,iBAAG,EAAA;;;;;;;IAOxC,uCAA4B;CAC/B,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.GET_TASK_BY_ID_QUERY = exports.GET_ARCHIVED_TASKS_QUERY = exports.GET_TASKS_BACKLOG_QUERY = exports.GET_TASKS_BY_DAY_QUERY = void 0;
|
|
7
7
|
const graphql_tag_1 = require("graphql-tag");
|
|
8
|
-
const index_js_1 = require("
|
|
8
|
+
const index_js_1 = require("../fragments/index.js");
|
|
9
9
|
exports.GET_TASKS_BY_DAY_QUERY = (0, graphql_tag_1.gql) `
|
|
10
10
|
query getTasksByDay($input: GetTasksByDayInput!) {
|
|
11
11
|
tasksByDayV2(input: $input) {
|
|
@@ -70,4 +70,4 @@ exports.GET_TASK_BY_ID_QUERY = (0, graphql_tag_1.gql) `
|
|
|
70
70
|
|
|
71
71
|
${index_js_1.TASK_INTEGRATION_FRAGMENT}
|
|
72
72
|
`;
|
|
73
|
-
//# sourceMappingURL=
|
|
73
|
+
//# 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,6CAAkC;AAClC,oDAK+B;AAElB,QAAA,sBAAsB,GAAG,IAAA,iBAAG,EAAA;;;;;;;;IAQrC,wBAAa;;IAEb,oCAAyB;;IAEzB,uCAA4B;;IAE5B,oCAAyB;CAC5B,CAAC;AAEW,QAAA,uBAAuB,GAAG,IAAA,iBAAG,EAAA;;;;;;;;IAQtC,wBAAa;;IAEb,oCAAyB;;IAEzB,uCAA4B;;IAE5B,oCAAyB;CAC5B,CAAC;AAEW,QAAA,wBAAwB,GAAG,IAAA,iBAAG,EAAA;;;;;;;;IAQvC,wBAAa;;IAEb,oCAAyB;;IAEzB,uCAA4B;;IAE5B,oCAAyB;CAC5B,CAAC;AAEW,QAAA,oBAAoB,GAAG,IAAA,iBAAG,EAAA;;;;;;;;IAQnC,wBAAa;;IAEb,oCAAyB;;IAEzB,uCAA4B;;IAE5B,oCAAyB;CAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/user/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uDAA6B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../../src/queries/user/queries.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6CAAkC;AAErB,QAAA,cAAc,GAAG,IAAA,iBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+chC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/fragments/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/fragments/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC"}
|
package/dist/esm/queries/{mutations/updateTaskComplete.js → fragments/mutation-responses.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GraphQL
|
|
2
|
+
* GraphQL fragments for mutation responses
|
|
3
3
|
*/
|
|
4
4
|
import { gql } from 'graphql-tag';
|
|
5
|
-
import { TASK_ACTUAL_TIME_FRAGMENT,
|
|
5
|
+
import { TASK_FRAGMENT, TASK_ACTUAL_TIME_FRAGMENT, TASK_SCHEDULED_TIME_FRAGMENT, TASK_INTEGRATION_FRAGMENT, } from './task.js';
|
|
6
6
|
/**
|
|
7
7
|
* Fragment for PartialTask structure
|
|
8
8
|
* Used in update operations to return only modified fields
|
|
@@ -68,21 +68,4 @@ export const UPDATE_TASK_PAYLOAD_FRAGMENT = gql `
|
|
|
68
68
|
${TASK_FRAGMENT}
|
|
69
69
|
${PARTIAL_TASK_FRAGMENT}
|
|
70
70
|
`;
|
|
71
|
-
|
|
72
|
-
* Mutation for marking a task as complete
|
|
73
|
-
*
|
|
74
|
-
* Variables:
|
|
75
|
-
* - input.taskId: The ID of the task to mark complete
|
|
76
|
-
* - input.completeOn: ISO 8601 timestamp when the task was completed
|
|
77
|
-
* - input.limitResponsePayload: Flag to limit response size (optional)
|
|
78
|
-
*/
|
|
79
|
-
export const UPDATE_TASK_COMPLETE_MUTATION = gql `
|
|
80
|
-
mutation updateTaskComplete($input: UpdateTaskCompleteInput!) {
|
|
81
|
-
updateTaskComplete(input: $input) {
|
|
82
|
-
...UpdateTaskPayload
|
|
83
|
-
__typename
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
${UPDATE_TASK_PAYLOAD_FRAGMENT}
|
|
87
|
-
`;
|
|
88
|
-
//# sourceMappingURL=updateTaskComplete.js.map
|
|
71
|
+
//# sourceMappingURL=mutation-responses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutation-responses.js","sourceRoot":"","sources":["../../../../src/queries/fragments/mutation-responses.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,WAAW,CAAC;AAEnB;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoCpC,yBAAyB;IACzB,4BAA4B;IAC5B,yBAAyB;CAC5B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;IAc3C,aAAa;IACb,qBAAqB;CACxB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GraphQL queries and fragments exports
|
|
3
3
|
*/
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
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.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/queries/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/streams/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Stream-related GraphQL queries
|
|
3
3
|
*/
|
|
4
4
|
import { gql } from 'graphql-tag';
|
|
5
|
-
import { STREAM_FRAGMENT } from '
|
|
5
|
+
import { STREAM_FRAGMENT } from '../fragments/index.js';
|
|
6
6
|
export const GET_STREAMS_BY_GROUP_ID_QUERY = gql `
|
|
7
7
|
query getStreamsByGroupId($groupId: String!) {
|
|
8
8
|
streamsByGroupId(groupId: $groupId) {
|
|
@@ -13,4 +13,4 @@ export const GET_STREAMS_BY_GROUP_ID_QUERY = gql `
|
|
|
13
13
|
|
|
14
14
|
${STREAM_FRAGMENT}
|
|
15
15
|
`;
|
|
16
|
-
//# sourceMappingURL=
|
|
16
|
+
//# sourceMappingURL=queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../../src/queries/streams/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAA;;;;;;;;IAQ5C,eAAe;CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/queries/tasks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|