@uidu/client 3.0.0 → 3.1.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 (69) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +56 -0
  3. package/dist/declarations/src/bookings.d.ts +58 -0
  4. package/dist/declarations/src/calls.d.ts +26 -0
  5. package/dist/declarations/src/campaigns.d.ts +39 -0
  6. package/dist/declarations/src/client.d.ts +10 -0
  7. package/dist/declarations/src/cms.d.ts +75 -0
  8. package/dist/declarations/src/contacts.d.ts +36 -0
  9. package/dist/declarations/src/courses.d.ts +68 -0
  10. package/dist/declarations/src/donations.d.ts +51 -0
  11. package/dist/declarations/src/events.d.ts +59 -0
  12. package/dist/declarations/src/forms.d.ts +69 -0
  13. package/dist/declarations/src/generated/index.d.ts +45142 -0
  14. package/dist/declarations/src/help-center.d.ts +4 -0
  15. package/dist/declarations/src/index.d.ts +39 -0
  16. package/dist/declarations/src/kb.d.ts +30 -0
  17. package/dist/declarations/src/mutations.d.ts +394 -0
  18. package/dist/declarations/src/notes.d.ts +18 -0
  19. package/dist/declarations/src/people.d.ts +31 -0
  20. package/dist/declarations/src/search.d.ts +4 -0
  21. package/dist/declarations/src/spaces.d.ts +19 -0
  22. package/dist/declarations/src/stories.d.ts +28 -0
  23. package/dist/declarations/src/system.d.ts +36 -0
  24. package/dist/declarations/src/tasks.d.ts +16 -0
  25. package/dist/declarations/src/types.d.ts +19 -0
  26. package/dist/declarations/src/utils/paginate.d.ts +34 -0
  27. package/dist/uidu-client.cjs.d.ts +2 -2
  28. package/dist/uidu-client.cjs.dev.js +588 -0
  29. package/dist/uidu-client.cjs.js +6 -15
  30. package/dist/uidu-client.cjs.prod.js +588 -0
  31. package/dist/uidu-client.esm.js +477 -0
  32. package/package.json +8 -3
  33. package/src/cms.ts +43 -0
  34. package/src/donations.ts +10 -0
  35. package/src/events.ts +10 -0
  36. package/src/generated/index.ts +2899 -84
  37. package/src/index.ts +53 -3
  38. package/src/mutations.ts +167 -0
  39. package/src/notes.ts +15 -0
  40. package/src/people.test.ts +28 -0
  41. package/src/queries/cms/CreateFieldValue.graphql +16 -0
  42. package/src/queries/cms/CreatePage.graphql +15 -0
  43. package/src/queries/cms/CreatePageBlock.graphql +14 -0
  44. package/src/queries/cms/CreateProject.graphql +16 -0
  45. package/src/queries/contacts/ContactMutations.graphql +53 -0
  46. package/src/queries/courses/CourseMutations.graphql +38 -0
  47. package/src/queries/donations/CreateDonationCampaign.graphql +13 -0
  48. package/src/queries/donations/DonationCampaignMutations.graphql +25 -0
  49. package/src/queries/events/CreateEvent.graphql +13 -0
  50. package/src/queries/events/UpdateEvent.graphql +12 -0
  51. package/src/queries/forms/FormMutations.graphql +40 -0
  52. package/src/queries/help-center/ChannelMutations.graphql +40 -0
  53. package/src/queries/kb/KbMutations.graphql +81 -0
  54. package/src/queries/notes/CreateNote.graphql +14 -0
  55. package/src/queries/notes/NoteMutations.graphql +25 -0
  56. package/src/queries/spaces/CreateSpace.graphql +15 -0
  57. package/src/queries/spaces/SpaceMutations.graphql +25 -0
  58. package/src/queries/stories/CreateStory.graphql +13 -0
  59. package/src/queries/stories/UpdateStory.graphql +12 -0
  60. package/src/queries/system/CreateWorkspace.graphql +15 -0
  61. package/src/queries/system/GenerateWorkspaceApiCredentials.graphql +18 -0
  62. package/src/queries/tasks/CreateTask.graphql +13 -0
  63. package/src/queries/tasks/TaskMutations.graphql +25 -0
  64. package/src/spaces.ts +15 -0
  65. package/src/stories.ts +10 -0
  66. package/src/system.ts +33 -0
  67. package/src/tasks.ts +15 -0
  68. package/src/utils/paginate.test.ts +116 -0
  69. package/src/utils/relay.test.ts +35 -0
package/src/index.ts CHANGED
@@ -26,9 +26,58 @@ export {
26
26
  ListStoriesDocument,
27
27
  } from './generated';
28
28
 
29
- export { getPage, listPages, getTemplate } from './cms';
29
+ export {
30
+ getPage,
31
+ listPages,
32
+ getTemplate,
33
+ createProject,
34
+ createPage,
35
+ createPageBlock,
36
+ createFieldValue,
37
+ } from './cms';
30
38
  export type { Page, Template } from './cms';
31
39
 
40
+ export {
41
+ createWorkspace,
42
+ generateWorkspaceApiCredentials,
43
+ } from './system';
44
+
45
+ export { createSpace } from './spaces';
46
+ export { createTask } from './tasks';
47
+ export { createNote } from './notes';
48
+
49
+ export {
50
+ createCourse,
51
+ updateCourse,
52
+ deleteCourse,
53
+ createForm,
54
+ updateForm,
55
+ deleteForm,
56
+ createContact,
57
+ deleteContact,
58
+ createDeal,
59
+ updateDeal,
60
+ createKbCollection,
61
+ updateKbCollection,
62
+ deleteKbCollection,
63
+ createKbArticle,
64
+ updateKbArticle,
65
+ deleteKbArticle,
66
+ createChannel,
67
+ updateChannel,
68
+ deleteChannel,
69
+ updateEvent,
70
+ updateStory,
71
+ updateDonationCampaign,
72
+ deleteDonationCampaign,
73
+ updateTask,
74
+ deleteTask,
75
+ updateNote,
76
+ deleteNote,
77
+ updateSpace,
78
+ deleteSpace,
79
+ } from './mutations';
80
+
32
81
  export {
33
82
  getForm,
34
83
  listForms,
@@ -43,7 +92,7 @@ export type { Channel } from './help-center';
43
92
  export { search } from './search';
44
93
  export type { SearchResult } from './search';
45
94
 
46
- export { getEvent, listEvents, createAttendance } from './events';
95
+ export { getEvent, listEvents, createAttendance, createEvent } from './events';
47
96
  export type { Event } from './events';
48
97
 
49
98
  export { getCall, listCalls } from './calls';
@@ -53,10 +102,11 @@ export {
53
102
  getDonationCampaign,
54
103
  listDonationCampaigns,
55
104
  createDonation,
105
+ createDonationCampaign,
56
106
  } from './donations';
57
107
  export type { DonationCampaign } from './donations';
58
108
 
59
- export { getStory, listStories } from './stories';
109
+ export { getStory, listStories, createStory } from './stories';
60
110
  export type { Story } from './stories';
61
111
 
62
112
  export { listEmployees, getEmployee, weekStartFor } from './people';
@@ -0,0 +1,167 @@
1
+ // Authoring mutations (create / update / delete) added for the CLI + server-side
2
+ // provisioning. All require a Bearer token (client `apiKey`) and run under the
3
+ // backend's Pundit authorization. Each returns the mutation payload (including
4
+ // an `errors` array) or null. Grouped here to keep the authoring surface in one
5
+ // place; read functions stay in their per-scope domain files.
6
+ import type { UiduClient } from './client';
7
+ import {
8
+ CreateChannelDocument,
9
+ type CreateChannelMutationVariables,
10
+ CreateContactDocument,
11
+ type CreateContactMutationVariables,
12
+ CreateCourseDocument,
13
+ type CreateCourseMutationVariables,
14
+ CreateDealDocument,
15
+ type CreateDealMutationVariables,
16
+ CreateFormDocument,
17
+ type CreateFormMutationVariables,
18
+ CreateKbArticleDocument,
19
+ type CreateKbArticleMutationVariables,
20
+ CreateKbCollectionDocument,
21
+ type CreateKbCollectionMutationVariables,
22
+ DeleteChannelDocument,
23
+ type DeleteChannelMutationVariables,
24
+ DeleteContactDocument,
25
+ type DeleteContactMutationVariables,
26
+ DeleteCourseDocument,
27
+ type DeleteCourseMutationVariables,
28
+ DeleteDonationCampaignDocument,
29
+ type DeleteDonationCampaignMutationVariables,
30
+ DeleteFormDocument,
31
+ type DeleteFormMutationVariables,
32
+ DeleteKbArticleDocument,
33
+ type DeleteKbArticleMutationVariables,
34
+ DeleteKbCollectionDocument,
35
+ type DeleteKbCollectionMutationVariables,
36
+ DeleteNoteDocument,
37
+ type DeleteNoteMutationVariables,
38
+ DeleteSpaceDocument,
39
+ type DeleteSpaceMutationVariables,
40
+ DeleteTaskDocument,
41
+ type DeleteTaskMutationVariables,
42
+ UpdateChannelDocument,
43
+ type UpdateChannelMutationVariables,
44
+ UpdateCourseDocument,
45
+ type UpdateCourseMutationVariables,
46
+ UpdateDealDocument,
47
+ type UpdateDealMutationVariables,
48
+ UpdateDonationCampaignDocument,
49
+ type UpdateDonationCampaignMutationVariables,
50
+ UpdateEventDocument,
51
+ type UpdateEventMutationVariables,
52
+ UpdateFormDocument,
53
+ type UpdateFormMutationVariables,
54
+ UpdateKbArticleDocument,
55
+ type UpdateKbArticleMutationVariables,
56
+ UpdateKbCollectionDocument,
57
+ type UpdateKbCollectionMutationVariables,
58
+ UpdateNoteDocument,
59
+ type UpdateNoteMutationVariables,
60
+ UpdateSpaceDocument,
61
+ type UpdateSpaceMutationVariables,
62
+ UpdateStoryDocument,
63
+ type UpdateStoryMutationVariables,
64
+ UpdateTaskDocument,
65
+ type UpdateTaskMutationVariables,
66
+ } from './generated';
67
+
68
+ // --- Courses ---
69
+ export async function createCourse(c: UiduClient, v: CreateCourseMutationVariables) {
70
+ return (await c.mutate(CreateCourseDocument, v)).createCourse ?? null;
71
+ }
72
+ export async function updateCourse(c: UiduClient, v: UpdateCourseMutationVariables) {
73
+ return (await c.mutate(UpdateCourseDocument, v)).updateCourse ?? null;
74
+ }
75
+ export async function deleteCourse(c: UiduClient, v: DeleteCourseMutationVariables) {
76
+ return (await c.mutate(DeleteCourseDocument, v)).deleteCourse ?? null;
77
+ }
78
+
79
+ // --- Forms ---
80
+ export async function createForm(c: UiduClient, v: CreateFormMutationVariables) {
81
+ return (await c.mutate(CreateFormDocument, v)).createForm ?? null;
82
+ }
83
+ export async function updateForm(c: UiduClient, v: UpdateFormMutationVariables) {
84
+ return (await c.mutate(UpdateFormDocument, v)).updateForm ?? null;
85
+ }
86
+ export async function deleteForm(c: UiduClient, v: DeleteFormMutationVariables) {
87
+ return (await c.mutate(DeleteFormDocument, v)).deleteForm ?? null;
88
+ }
89
+
90
+ // --- Contacts & Deals ---
91
+ export async function createContact(c: UiduClient, v: CreateContactMutationVariables) {
92
+ return (await c.mutate(CreateContactDocument, v)).createContact ?? null;
93
+ }
94
+ export async function deleteContact(c: UiduClient, v: DeleteContactMutationVariables) {
95
+ return (await c.mutate(DeleteContactDocument, v)).deleteContact ?? null;
96
+ }
97
+ export async function createDeal(c: UiduClient, v: CreateDealMutationVariables) {
98
+ return (await c.mutate(CreateDealDocument, v)).createDeal ?? null;
99
+ }
100
+ export async function updateDeal(c: UiduClient, v: UpdateDealMutationVariables) {
101
+ return (await c.mutate(UpdateDealDocument, v)).updateDeal ?? null;
102
+ }
103
+
104
+ // --- Knowledge base ---
105
+ export async function createKbCollection(c: UiduClient, v: CreateKbCollectionMutationVariables) {
106
+ return (await c.mutate(CreateKbCollectionDocument, v)).createKbCollection ?? null;
107
+ }
108
+ export async function updateKbCollection(c: UiduClient, v: UpdateKbCollectionMutationVariables) {
109
+ return (await c.mutate(UpdateKbCollectionDocument, v)).updateKbCollection ?? null;
110
+ }
111
+ export async function deleteKbCollection(c: UiduClient, v: DeleteKbCollectionMutationVariables) {
112
+ return (await c.mutate(DeleteKbCollectionDocument, v)).deleteKbCollection ?? null;
113
+ }
114
+ export async function createKbArticle(c: UiduClient, v: CreateKbArticleMutationVariables) {
115
+ return (await c.mutate(CreateKbArticleDocument, v)).createKbArticle ?? null;
116
+ }
117
+ export async function updateKbArticle(c: UiduClient, v: UpdateKbArticleMutationVariables) {
118
+ return (await c.mutate(UpdateKbArticleDocument, v)).updateKbArticle ?? null;
119
+ }
120
+ export async function deleteKbArticle(c: UiduClient, v: DeleteKbArticleMutationVariables) {
121
+ return (await c.mutate(DeleteKbArticleDocument, v)).deleteKbArticle ?? null;
122
+ }
123
+
124
+ // --- Help center channels ---
125
+ export async function createChannel(c: UiduClient, v: CreateChannelMutationVariables) {
126
+ return (await c.mutate(CreateChannelDocument, v)).createChannel ?? null;
127
+ }
128
+ export async function updateChannel(c: UiduClient, v: UpdateChannelMutationVariables) {
129
+ return (await c.mutate(UpdateChannelDocument, v)).updateChannel ?? null;
130
+ }
131
+ export async function deleteChannel(c: UiduClient, v: DeleteChannelMutationVariables) {
132
+ return (await c.mutate(DeleteChannelDocument, v)).deleteChannel ?? null;
133
+ }
134
+
135
+ // --- Content updates (create lives in the scope's domain file) ---
136
+ export async function updateEvent(c: UiduClient, v: UpdateEventMutationVariables) {
137
+ return (await c.mutate(UpdateEventDocument, v)).updateEvent ?? null;
138
+ }
139
+ export async function updateStory(c: UiduClient, v: UpdateStoryMutationVariables) {
140
+ return (await c.mutate(UpdateStoryDocument, v)).updateStory ?? null;
141
+ }
142
+ export async function updateDonationCampaign(c: UiduClient, v: UpdateDonationCampaignMutationVariables) {
143
+ return (await c.mutate(UpdateDonationCampaignDocument, v)).updateDonationCampaign ?? null;
144
+ }
145
+ export async function deleteDonationCampaign(c: UiduClient, v: DeleteDonationCampaignMutationVariables) {
146
+ return (await c.mutate(DeleteDonationCampaignDocument, v)).deleteDonationCampaign ?? null;
147
+ }
148
+
149
+ // --- Tasks / Notes / Spaces (create lives in their domain files) ---
150
+ export async function updateTask(c: UiduClient, v: UpdateTaskMutationVariables) {
151
+ return (await c.mutate(UpdateTaskDocument, v)).updateTask ?? null;
152
+ }
153
+ export async function deleteTask(c: UiduClient, v: DeleteTaskMutationVariables) {
154
+ return (await c.mutate(DeleteTaskDocument, v)).deleteTask ?? null;
155
+ }
156
+ export async function updateNote(c: UiduClient, v: UpdateNoteMutationVariables) {
157
+ return (await c.mutate(UpdateNoteDocument, v)).updateNote ?? null;
158
+ }
159
+ export async function deleteNote(c: UiduClient, v: DeleteNoteMutationVariables) {
160
+ return (await c.mutate(DeleteNoteDocument, v)).deleteNote ?? null;
161
+ }
162
+ export async function updateSpace(c: UiduClient, v: UpdateSpaceMutationVariables) {
163
+ return (await c.mutate(UpdateSpaceDocument, v)).updateSpace ?? null;
164
+ }
165
+ export async function deleteSpace(c: UiduClient, v: DeleteSpaceMutationVariables) {
166
+ return (await c.mutate(DeleteSpaceDocument, v)).deleteSpace ?? null;
167
+ }
package/src/notes.ts ADDED
@@ -0,0 +1,15 @@
1
+ import type { UiduClient } from './client';
2
+ import {
3
+ CreateNoteDocument,
4
+ type CreateNoteMutationVariables,
5
+ } from './generated';
6
+
7
+ // Authoring (Bearer / doorkeeper token). Returns the payload, incl. `errors`.
8
+
9
+ export async function createNote(
10
+ client: UiduClient,
11
+ variables: CreateNoteMutationVariables,
12
+ ) {
13
+ const result = await client.mutate(CreateNoteDocument, variables);
14
+ return result.createNote ?? null;
15
+ }
@@ -0,0 +1,28 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { weekStartFor } from './people';
3
+
4
+ describe('weekStartFor', () => {
5
+ it('returns the week Monday for a Wednesday', () => {
6
+ // 2026-07-08 is a Wednesday.
7
+ const date = new Date(Date.UTC(2026, 6, 8));
8
+ expect(weekStartFor(date)).toBe('2026-07-06');
9
+ });
10
+
11
+ it('returns the same date for a Monday', () => {
12
+ // 2026-07-06 is a Monday.
13
+ const date = new Date(Date.UTC(2026, 6, 6));
14
+ expect(weekStartFor(date)).toBe('2026-07-06');
15
+ });
16
+
17
+ it('returns the previous Monday for a Sunday', () => {
18
+ // 2026-07-12 is a Sunday; the previous Monday is 2026-07-06.
19
+ const date = new Date(Date.UTC(2026, 6, 12));
20
+ expect(weekStartFor(date)).toBe('2026-07-06');
21
+ });
22
+
23
+ it('crosses a month boundary correctly', () => {
24
+ // 2026-08-02 is a Sunday; the previous Monday is 2026-07-27 (prior month).
25
+ const date = new Date(Date.UTC(2026, 7, 2));
26
+ expect(weekStartFor(date)).toBe('2026-07-27');
27
+ });
28
+ });
@@ -0,0 +1,16 @@
1
+ # Staged for codegen — validated on the next `yarn codegen` run. See plans/ai-connector.md.
2
+ mutation CreateFieldValue($input: CreateFieldValueInput!) {
3
+ createFieldValue(input: $input) {
4
+ fieldValue {
5
+ node {
6
+ id
7
+ content
8
+ }
9
+ }
10
+ errors {
11
+ key
12
+ name
13
+ type
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,15 @@
1
+ # Staged for codegen — validated on the next `yarn codegen` run. See plans/ai-connector.md.
2
+ mutation CreatePage($input: CreatePageInput!) {
3
+ createPage(input: $input) {
4
+ page {
5
+ id
6
+ name
7
+ slug
8
+ }
9
+ errors {
10
+ key
11
+ name
12
+ type
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,14 @@
1
+ # Staged for codegen — validated on the next `yarn codegen` run. See plans/ai-connector.md.
2
+ mutation CreatePageBlock($input: CreatePageBlockInput!) {
3
+ createPageBlock(input: $input) {
4
+ pageBlock {
5
+ id
6
+ shortname
7
+ }
8
+ errors {
9
+ key
10
+ name
11
+ type
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,16 @@
1
+ # Staged for codegen — validated on the next `yarn codegen` run. See plans/ai-connector.md.
2
+ mutation CreateProject($input: CreateProjectInput!) {
3
+ createProject(input: $input) {
4
+ project {
5
+ node {
6
+ id
7
+ name
8
+ }
9
+ }
10
+ errors {
11
+ key
12
+ name
13
+ type
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,53 @@
1
+ mutation CreateContact($input: CreateContactInput!) {
2
+ createContact(input: $input) {
3
+ contact {
4
+ id
5
+ }
6
+ errors {
7
+ key
8
+ name
9
+ type
10
+ }
11
+ }
12
+ }
13
+
14
+ mutation DeleteContact($input: DeleteContactInput!) {
15
+ deleteContact(input: $input) {
16
+ contact {
17
+ id
18
+ }
19
+ errors {
20
+ key
21
+ name
22
+ type
23
+ }
24
+ }
25
+ }
26
+
27
+ mutation CreateDeal($input: CreateDealInput!) {
28
+ createDeal(input: $input) {
29
+ deal {
30
+ node {
31
+ id
32
+ }
33
+ }
34
+ errors {
35
+ key
36
+ name
37
+ type
38
+ }
39
+ }
40
+ }
41
+
42
+ mutation UpdateDeal($input: UpdateDealInput!) {
43
+ updateDeal(input: $input) {
44
+ deal {
45
+ id
46
+ }
47
+ errors {
48
+ key
49
+ name
50
+ type
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,38 @@
1
+ mutation CreateCourse($input: CreateCourseInput!) {
2
+ createCourse(input: $input) {
3
+ course {
4
+ id
5
+ }
6
+ errors {
7
+ key
8
+ name
9
+ type
10
+ }
11
+ }
12
+ }
13
+
14
+ mutation UpdateCourse($input: UpdateCourseInput!) {
15
+ updateCourse(input: $input) {
16
+ course {
17
+ id
18
+ }
19
+ errors {
20
+ key
21
+ name
22
+ type
23
+ }
24
+ }
25
+ }
26
+
27
+ mutation DeleteCourse($input: DeleteCourseInput!) {
28
+ deleteCourse(input: $input) {
29
+ course {
30
+ id
31
+ }
32
+ errors {
33
+ key
34
+ name
35
+ type
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,13 @@
1
+ mutation CreateDonationCampaign($input: CreateDonationCampaignInput!) {
2
+ createDonationCampaign(input: $input) {
3
+ donationCampaign {
4
+ id
5
+ name
6
+ }
7
+ errors {
8
+ key
9
+ name
10
+ type
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,25 @@
1
+ mutation UpdateDonationCampaign($input: UpdateDonationCampaignInput!) {
2
+ updateDonationCampaign(input: $input) {
3
+ donationCampaign {
4
+ id
5
+ }
6
+ errors {
7
+ key
8
+ name
9
+ type
10
+ }
11
+ }
12
+ }
13
+
14
+ mutation DeleteDonationCampaign($input: DeleteDonationCampaignInput!) {
15
+ deleteDonationCampaign(input: $input) {
16
+ donationCampaign {
17
+ id
18
+ }
19
+ errors {
20
+ key
21
+ name
22
+ type
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,13 @@
1
+ mutation CreateEvent($input: CreateEventInput!) {
2
+ createEvent(input: $input) {
3
+ event {
4
+ id
5
+ name
6
+ }
7
+ errors {
8
+ key
9
+ name
10
+ type
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,12 @@
1
+ mutation UpdateEvent($input: UpdateEventInput!) {
2
+ updateEvent(input: $input) {
3
+ event {
4
+ id
5
+ }
6
+ errors {
7
+ key
8
+ name
9
+ type
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,40 @@
1
+ mutation CreateForm($input: CreateFormInput!) {
2
+ createForm(input: $input) {
3
+ form {
4
+ node {
5
+ id
6
+ }
7
+ }
8
+ errors {
9
+ key
10
+ name
11
+ type
12
+ }
13
+ }
14
+ }
15
+
16
+ mutation UpdateForm($input: UpdateFormInput!) {
17
+ updateForm(input: $input) {
18
+ form {
19
+ id
20
+ }
21
+ errors {
22
+ key
23
+ name
24
+ type
25
+ }
26
+ }
27
+ }
28
+
29
+ mutation DeleteForm($input: DeleteFormInput!) {
30
+ deleteForm(input: $input) {
31
+ form {
32
+ id
33
+ }
34
+ errors {
35
+ key
36
+ name
37
+ type
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,40 @@
1
+ mutation CreateChannel($input: CreateChannelInput!) {
2
+ createChannel(input: $input) {
3
+ channel {
4
+ node {
5
+ id
6
+ }
7
+ }
8
+ errors {
9
+ key
10
+ name
11
+ type
12
+ }
13
+ }
14
+ }
15
+
16
+ mutation UpdateChannel($input: UpdateChannelInput!) {
17
+ updateChannel(input: $input) {
18
+ channel {
19
+ id
20
+ }
21
+ errors {
22
+ key
23
+ name
24
+ type
25
+ }
26
+ }
27
+ }
28
+
29
+ mutation DeleteChannel($input: DeleteChannelInput!) {
30
+ deleteChannel(input: $input) {
31
+ channel {
32
+ id
33
+ }
34
+ errors {
35
+ key
36
+ name
37
+ type
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,81 @@
1
+ mutation CreateKbCollection($input: CreateKbCollectionInput!) {
2
+ createKbCollection(input: $input) {
3
+ kbCollection {
4
+ node {
5
+ id
6
+ }
7
+ }
8
+ errors {
9
+ key
10
+ name
11
+ type
12
+ }
13
+ }
14
+ }
15
+
16
+ mutation UpdateKbCollection($input: UpdateKbCollectionInput!) {
17
+ updateKbCollection(input: $input) {
18
+ kbCollection {
19
+ id
20
+ }
21
+ errors {
22
+ key
23
+ name
24
+ type
25
+ }
26
+ }
27
+ }
28
+
29
+ mutation DeleteKbCollection($input: DeleteKbCollectionInput!) {
30
+ deleteKbCollection(input: $input) {
31
+ kbCollection {
32
+ id
33
+ }
34
+ errors {
35
+ key
36
+ name
37
+ type
38
+ }
39
+ }
40
+ }
41
+
42
+ mutation CreateKbArticle($input: CreateKbArticleInput!) {
43
+ createKbArticle(input: $input) {
44
+ kbArticle {
45
+ node {
46
+ id
47
+ }
48
+ }
49
+ errors {
50
+ key
51
+ name
52
+ type
53
+ }
54
+ }
55
+ }
56
+
57
+ mutation UpdateKbArticle($input: UpdateKbArticleInput!) {
58
+ updateKbArticle(input: $input) {
59
+ kbArticle {
60
+ id
61
+ }
62
+ errors {
63
+ key
64
+ name
65
+ type
66
+ }
67
+ }
68
+ }
69
+
70
+ mutation DeleteKbArticle($input: DeleteKbArticleInput!) {
71
+ deleteKbArticle(input: $input) {
72
+ kbArticle {
73
+ id
74
+ }
75
+ errors {
76
+ key
77
+ name
78
+ type
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,14 @@
1
+ mutation CreateNote($input: CreateNoteInput!) {
2
+ createNote(input: $input) {
3
+ note {
4
+ node {
5
+ id
6
+ }
7
+ }
8
+ errors {
9
+ key
10
+ name
11
+ type
12
+ }
13
+ }
14
+ }