@uidu/client 3.0.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.
Files changed (74) hide show
  1. package/.env.example +9 -0
  2. package/CHANGELOG.md +7 -0
  3. package/codegen.ts +42 -0
  4. package/dist/uidu-client.cjs.d.ts +2 -0
  5. package/dist/uidu-client.cjs.js +16 -0
  6. package/package.json +45 -0
  7. package/src/bookings.ts +77 -0
  8. package/src/calls.ts +29 -0
  9. package/src/campaigns.ts +39 -0
  10. package/src/client.ts +60 -0
  11. package/src/cms.ts +46 -0
  12. package/src/contacts.ts +49 -0
  13. package/src/courses.ts +77 -0
  14. package/src/donations.ts +39 -0
  15. package/src/events.ts +39 -0
  16. package/src/forms.ts +49 -0
  17. package/src/generated/index.ts +47209 -0
  18. package/src/help-center.ts +18 -0
  19. package/src/index.ts +106 -0
  20. package/src/kb.ts +53 -0
  21. package/src/people.ts +43 -0
  22. package/src/queries/bookings/GetBooking.graphql +26 -0
  23. package/src/queries/bookings/GetCalendar.graphql +13 -0
  24. package/src/queries/bookings/GetCalendarEvent.graphql +29 -0
  25. package/src/queries/bookings/ListBookings.graphql +30 -0
  26. package/src/queries/bookings/ListCalendarEvents.graphql +45 -0
  27. package/src/queries/bookings/ListCalendars.graphql +19 -0
  28. package/src/queries/calls/GetCall.graphql +31 -0
  29. package/src/queries/calls/ListCalls.graphql +32 -0
  30. package/src/queries/campaigns/GetCampaign.graphql +19 -0
  31. package/src/queries/campaigns/ListCampaigns.graphql +27 -0
  32. package/src/queries/campaigns/ListEmailCampaigns.graphql +34 -0
  33. package/src/queries/cms/GetPage.graphql +80 -0
  34. package/src/queries/cms/GetTemplate.graphql +41 -0
  35. package/src/queries/cms/ListPages.graphql +20 -0
  36. package/src/queries/contacts/GetContact.graphql +15 -0
  37. package/src/queries/contacts/GetDeal.graphql +30 -0
  38. package/src/queries/contacts/ListContacts.graphql +12 -0
  39. package/src/queries/contacts/ListDeals.graphql +30 -0
  40. package/src/queries/courses/GetCourse.graphql +22 -0
  41. package/src/queries/courses/GetEnrollment.graphql +25 -0
  42. package/src/queries/courses/GetLecture.graphql +36 -0
  43. package/src/queries/courses/ListCourses.graphql +27 -0
  44. package/src/queries/courses/ListEnrollments.graphql +31 -0
  45. package/src/queries/courses/ListLectures.graphql +45 -0
  46. package/src/queries/donations/CreateDonation.graphql +18 -0
  47. package/src/queries/donations/GetDonationCampaign.graphql +28 -0
  48. package/src/queries/donations/ListDonationCampaigns.graphql +24 -0
  49. package/src/queries/events/CreateAttendance.graphql +16 -0
  50. package/src/queries/events/GetEvent.graphql +43 -0
  51. package/src/queries/events/ListEvents.graphql +32 -0
  52. package/src/queries/forms/CreateFormResponse.graphql +12 -0
  53. package/src/queries/forms/FormFields.graphql +35 -0
  54. package/src/queries/forms/FormResponseFields.graphql +15 -0
  55. package/src/queries/forms/GetForm.graphql +7 -0
  56. package/src/queries/forms/ListForms.graphql +20 -0
  57. package/src/queries/forms/UpdateFormResponse.graphql +12 -0
  58. package/src/queries/help-center/GetChannel.graphql +45 -0
  59. package/src/queries/kb/GetKbArticle.graphql +17 -0
  60. package/src/queries/kb/GetKbCollection.graphql +28 -0
  61. package/src/queries/kb/ListKbArticles.graphql +29 -0
  62. package/src/queries/kb/ListKbCollections.graphql +26 -0
  63. package/src/queries/people/GetEmployee.graphql +47 -0
  64. package/src/queries/people/ListEmployees.graphql +30 -0
  65. package/src/queries/search/Search.graphql +29 -0
  66. package/src/queries/stories/GetStory.graphql +15 -0
  67. package/src/queries/stories/ListStories.graphql +21 -0
  68. package/src/queries/system/CurrentUser.graphql +6 -0
  69. package/src/search.ts +18 -0
  70. package/src/stories.ts +29 -0
  71. package/src/types.ts +28 -0
  72. package/src/utils/paginate.ts +64 -0
  73. package/src/utils/relay.ts +8 -0
  74. package/tsconfig.json +8 -0
@@ -0,0 +1,30 @@
1
+ query GetDeal($id: ID!) {
2
+ currentWorkspace {
3
+ deal(id: $id) {
4
+ id
5
+ name
6
+ amount
7
+ currency
8
+ deadline
9
+ winProbability
10
+ createdAt
11
+ updatedAt
12
+ publicPath
13
+ publicUrl
14
+ status {
15
+ id
16
+ name
17
+ }
18
+ pipeline {
19
+ id
20
+ name
21
+ }
22
+ user {
23
+ id
24
+ name
25
+ firstName
26
+ lastName
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,12 @@
1
+ query ListContacts {
2
+ currentWorkspace {
3
+ contacts {
4
+ id
5
+ name
6
+ email
7
+ avatar
8
+ avatarData
9
+ createdAt
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,30 @@
1
+ query ListDeals($first: Int, $after: String, $params: SearchParams) {
2
+ currentWorkspace {
3
+ deals(first: $first, after: $after, params: $params) {
4
+ pageInfo {
5
+ hasNextPage
6
+ endCursor
7
+ }
8
+ edges {
9
+ node {
10
+ id
11
+ name
12
+ amount
13
+ currency
14
+ deadline
15
+ winProbability
16
+ createdAt
17
+ updatedAt
18
+ status {
19
+ id
20
+ name
21
+ }
22
+ pipeline {
23
+ id
24
+ name
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,22 @@
1
+ query GetCourse($id: ID!) {
2
+ currentWorkspace {
3
+ course(id: $id) {
4
+ id
5
+ name
6
+ abstract
7
+ body
8
+ cover
9
+ coverData
10
+ kind
11
+ mode
12
+ tags
13
+ publishedAt
14
+ published
15
+ draft
16
+ publicPath
17
+ publicUrl
18
+ createdAt
19
+ updatedAt
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,25 @@
1
+ query GetEnrollment($id: ID!) {
2
+ currentWorkspace {
3
+ enrollment(id: $id) {
4
+ id
5
+ aasmState
6
+ createdAt
7
+ updatedAt
8
+ fieldValuesByShortname
9
+ course {
10
+ id
11
+ name
12
+ }
13
+ contact {
14
+ id
15
+ name
16
+ email
17
+ }
18
+ currentLecture {
19
+ id
20
+ name
21
+ position
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,36 @@
1
+ query GetLecture($id: ID!) {
2
+ currentWorkspace {
3
+ lecture(id: $id) {
4
+ id
5
+ name
6
+ body
7
+ cover
8
+ coverData
9
+ position
10
+ duration
11
+ kind
12
+ link
13
+ publishedAt
14
+ published
15
+ draft
16
+ startDate
17
+ startTime
18
+ createdAt
19
+ updatedAt
20
+ course {
21
+ id
22
+ name
23
+ }
24
+ nextLecture {
25
+ id
26
+ name
27
+ position
28
+ }
29
+ previousLecture {
30
+ id
31
+ name
32
+ position
33
+ }
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,27 @@
1
+ query ListCourses($first: Int, $after: String, $params: SearchParams) {
2
+ currentWorkspace {
3
+ courses(first: $first, after: $after, params: $params) {
4
+ pageInfo {
5
+ hasNextPage
6
+ endCursor
7
+ }
8
+ edges {
9
+ node {
10
+ id
11
+ name
12
+ abstract
13
+ cover
14
+ coverData
15
+ kind
16
+ mode
17
+ tags
18
+ publishedAt
19
+ published
20
+ draft
21
+ publicPath
22
+ publicUrl
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,31 @@
1
+ query ListEnrollments($first: Int, $after: String, $params: SearchParams) {
2
+ currentWorkspace {
3
+ enrollments(first: $first, after: $after, params: $params) {
4
+ pageInfo {
5
+ hasNextPage
6
+ endCursor
7
+ }
8
+ edges {
9
+ node {
10
+ id
11
+ aasmState
12
+ createdAt
13
+ updatedAt
14
+ course {
15
+ id
16
+ name
17
+ }
18
+ contact {
19
+ id
20
+ name
21
+ email
22
+ }
23
+ currentLecture {
24
+ id
25
+ name
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,45 @@
1
+ query ListLectures(
2
+ $first: Int
3
+ $after: String
4
+ $scopes: [String!]
5
+ $orderBy: String
6
+ $from: String
7
+ $to: String
8
+ ) {
9
+ currentWorkspace {
10
+ lectures(
11
+ first: $first
12
+ after: $after
13
+ scopes: $scopes
14
+ orderBy: $orderBy
15
+ from: $from
16
+ to: $to
17
+ ) {
18
+ pageInfo {
19
+ hasNextPage
20
+ endCursor
21
+ }
22
+ edges {
23
+ node {
24
+ id
25
+ name
26
+ position
27
+ duration
28
+ kind
29
+ link
30
+ publishedAt
31
+ published
32
+ draft
33
+ cover
34
+ coverData
35
+ startDate
36
+ startTime
37
+ course {
38
+ id
39
+ name
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,18 @@
1
+ mutation CreateDonation($input: CreateDonationInput!) {
2
+ createDonation(input: $input) {
3
+ errors {
4
+ key
5
+ name
6
+ type
7
+ }
8
+ donation {
9
+ id
10
+ amount
11
+ currency
12
+ createdAt
13
+ contact {
14
+ id
15
+ }
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,28 @@
1
+ query GetDonationCampaign($id: ID!) {
2
+ currentWorkspace {
3
+ donationCampaign(id: $id) {
4
+ id
5
+ name
6
+ body
7
+ cover
8
+ coverData
9
+ kind
10
+ goal
11
+ donationsAmount
12
+ donationsCount
13
+ donationsAverage
14
+ startsAt
15
+ publishedAt
16
+ publicUrl
17
+ publicPath
18
+ primaryAddress {
19
+ id
20
+ formattedAddress
21
+ city
22
+ }
23
+ form {
24
+ ...FormFields
25
+ }
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,24 @@
1
+ query ListDonationCampaigns($first: Int, $after: String) {
2
+ currentWorkspace {
3
+ donationCampaigns(first: $first, after: $after) {
4
+ pageInfo {
5
+ hasNextPage
6
+ endCursor
7
+ }
8
+ edges {
9
+ node {
10
+ id
11
+ name
12
+ cover
13
+ coverData
14
+ goal
15
+ donationsAmount
16
+ donationsCount
17
+ startsAt
18
+ publishedAt
19
+ publicPath
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,16 @@
1
+ mutation CreateAttendance($input: CreateAttendanceInput!) {
2
+ createAttendance(input: $input) {
3
+ errors {
4
+ key
5
+ name
6
+ type
7
+ }
8
+ attendance {
9
+ id
10
+ checkedIn
11
+ contact {
12
+ id
13
+ }
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,43 @@
1
+ query GetEvent($id: ID!) {
2
+ currentWorkspace {
3
+ event(id: $id) {
4
+ id
5
+ name
6
+ description
7
+ body
8
+ cover
9
+ coverData
10
+ published
11
+ publishedAt
12
+ isPaidEvent
13
+ hasSeats
14
+ currentCapacity
15
+ publicUrl
16
+ publicPath
17
+ toGoogleCalendarUrl
18
+ toIcsUrl
19
+ primaryAddress {
20
+ id
21
+ formattedAddress
22
+ name
23
+ city
24
+ postalCode
25
+ countryCode
26
+ latitude
27
+ longitude
28
+ }
29
+ instance {
30
+ id
31
+ beginsAt
32
+ finishesAt
33
+ endDate
34
+ endTime
35
+ }
36
+ instances {
37
+ id
38
+ beginsAt
39
+ finishesAt
40
+ }
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,32 @@
1
+ query ListEvents($first: Int, $after: String) {
2
+ currentWorkspace {
3
+ events(first: $first, after: $after) {
4
+ pageInfo {
5
+ hasNextPage
6
+ endCursor
7
+ }
8
+ edges {
9
+ node {
10
+ id
11
+ name
12
+ description
13
+ cover
14
+ coverData
15
+ published
16
+ publicPath
17
+ isPaidEvent
18
+ primaryAddress {
19
+ id
20
+ formattedAddress
21
+ city
22
+ }
23
+ instance {
24
+ id
25
+ beginsAt
26
+ finishesAt
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,12 @@
1
+ mutation CreateFormResponse($input: CreateFormResponseInput!) {
2
+ createFormResponse(input: $input) {
3
+ errors {
4
+ key
5
+ name
6
+ type
7
+ }
8
+ formResponse {
9
+ ...FormResponseFields
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,35 @@
1
+ fragment FormFields on Form {
2
+ id
3
+ name
4
+ inputs: formQuestions {
5
+ edges {
6
+ node {
7
+ id
8
+ position
9
+ label
10
+ required
11
+ hidden
12
+ placeholder
13
+ hint
14
+ fieldKind
15
+ rules
16
+ preferences
17
+ field {
18
+ id
19
+ kind
20
+ name
21
+ accessor
22
+ type
23
+ shortname
24
+ uploadPresignedUrl
25
+ uploadUrl
26
+ uploadParams
27
+ options: optionList {
28
+ id
29
+ name
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,15 @@
1
+ fragment FormResponseFields on FormResponse {
2
+ id
3
+ status
4
+ fieldValues {
5
+ id
6
+ content
7
+ linkedRecordId
8
+ field {
9
+ id
10
+ }
11
+ }
12
+ contact {
13
+ id
14
+ }
15
+ }
@@ -0,0 +1,7 @@
1
+ query GetForm($id: ID!) {
2
+ currentWorkspace {
3
+ form(id: $id) {
4
+ ...FormFields
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,20 @@
1
+ query ListForms($first: Int, $after: String) {
2
+ currentWorkspace {
3
+ forms(first: $first, after: $after) {
4
+ pageInfo {
5
+ hasNextPage
6
+ endCursor
7
+ }
8
+ edges {
9
+ node {
10
+ id
11
+ name
12
+ cover
13
+ coverData
14
+ published
15
+ publishedAt
16
+ }
17
+ }
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,12 @@
1
+ mutation UpdateFormResponse($input: UpdateFormResponseInput!) {
2
+ updateFormResponse(input: $input) {
3
+ errors {
4
+ key
5
+ name
6
+ type
7
+ }
8
+ formResponse {
9
+ ...FormResponseFields
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,45 @@
1
+ query GetChannel($id: ID!) {
2
+ currentWorkspace {
3
+ id
4
+ channel(id: $id) {
5
+ id
6
+ name
7
+ channelKbCollections(last: 100) {
8
+ edges {
9
+ node {
10
+ id
11
+ position
12
+ kbCollection {
13
+ id
14
+ }
15
+ }
16
+ }
17
+ }
18
+ kbCollections(last: 100) {
19
+ edges {
20
+ node {
21
+ id
22
+ name
23
+ description
24
+ iconData
25
+ kbArticles(last: 100) {
26
+ edges {
27
+ node {
28
+ id
29
+ name
30
+ body
31
+ updatedAt
32
+ workspaceTagList {
33
+ id
34
+ name
35
+ color
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,17 @@
1
+ query GetKbArticle($id: ID!) {
2
+ currentWorkspace {
3
+ kbArticle(id: $id) {
4
+ id
5
+ name
6
+ body
7
+ position
8
+ isDraft
9
+ createdAt
10
+ updatedAt
11
+ kbCollection {
12
+ id
13
+ name
14
+ }
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,28 @@
1
+ query GetKbCollection($id: ID!) {
2
+ currentWorkspace {
3
+ kbCollection(id: $id) {
4
+ id
5
+ name
6
+ description
7
+ iconData
8
+ position
9
+ createdAt
10
+ updatedAt
11
+ kbArticles(first: 50) {
12
+ pageInfo {
13
+ hasNextPage
14
+ endCursor
15
+ }
16
+ edges {
17
+ node {
18
+ id
19
+ name
20
+ position
21
+ isDraft
22
+ updatedAt
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,29 @@
1
+ query ListKbArticles(
2
+ $first: Int
3
+ $after: String
4
+ $before: String
5
+ $last: Int
6
+ ) {
7
+ currentWorkspace {
8
+ kbArticles(first: $first, after: $after, before: $before, last: $last) {
9
+ pageInfo {
10
+ hasNextPage
11
+ endCursor
12
+ }
13
+ edges {
14
+ node {
15
+ id
16
+ name
17
+ position
18
+ isDraft
19
+ createdAt
20
+ updatedAt
21
+ kbCollection {
22
+ id
23
+ name
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,26 @@
1
+ query ListKbCollections(
2
+ $first: Int
3
+ $after: String
4
+ $before: String
5
+ $last: Int
6
+ ) {
7
+ currentWorkspace {
8
+ kbCollections(first: $first, after: $after, before: $before, last: $last) {
9
+ pageInfo {
10
+ hasNextPage
11
+ endCursor
12
+ }
13
+ edges {
14
+ node {
15
+ id
16
+ name
17
+ description
18
+ iconData
19
+ position
20
+ createdAt
21
+ updatedAt
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }