wabe 0.5.1 → 0.5.3

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.
@@ -1,6 +1,11 @@
1
1
  """Phone custom scalar type"""
2
2
  scalar Phone
3
3
 
4
+ enum RoleEnum {
5
+ Admin
6
+ Client
7
+ }
8
+
4
9
  enum AuthenticationProvider {
5
10
  Google
6
11
  }
@@ -9,6 +14,21 @@ enum SecondaryFactor {
9
14
  EmailOTP
10
15
  }
11
16
 
17
+ enum PaymentMode {
18
+ payment
19
+ subscription
20
+ }
21
+
22
+ enum PaymentReccuringInterval {
23
+ month
24
+ year
25
+ }
26
+
27
+ enum Currency {
28
+ eur
29
+ usd
30
+ }
31
+
12
32
  """User class"""
13
33
  type User {
14
34
  id: ID!
@@ -489,22 +509,123 @@ input RoleRelationInput {
489
509
  createAndAdd: [RoleCreateFieldsInput!]
490
510
  }
491
511
 
512
+ type Payment {
513
+ id: ID!
514
+ user: User
515
+ amount: Int!
516
+ currency: Currency!
517
+ acl: PaymentACLObject
518
+ createdAt: Date
519
+ updatedAt: Date
520
+ search: [String]
521
+ }
522
+
523
+ type PaymentACLObject {
524
+ users: [PaymentACLObjectUsersACL]
525
+ roles: [PaymentACLObjectRolesACL]
526
+ }
527
+
528
+ type PaymentACLObjectUsersACL {
529
+ userId: String!
530
+ read: Boolean!
531
+ write: Boolean!
532
+ }
533
+
534
+ type PaymentACLObjectRolesACL {
535
+ roleId: String!
536
+ read: Boolean!
537
+ write: Boolean!
538
+ }
539
+
540
+ input PaymentInput {
541
+ user: UserPointerInput
542
+ amount: Int!
543
+ currency: Currency!
544
+ acl: PaymentACLObjectInput
545
+ createdAt: Date
546
+ updatedAt: Date
547
+ search: [String]
548
+ }
549
+
550
+ input PaymentACLObjectInput {
551
+ users: [PaymentACLObjectUsersACLInput]
552
+ roles: [PaymentACLObjectRolesACLInput]
553
+ }
554
+
555
+ input PaymentACLObjectUsersACLInput {
556
+ userId: String!
557
+ read: Boolean!
558
+ write: Boolean!
559
+ }
560
+
561
+ input PaymentACLObjectRolesACLInput {
562
+ roleId: String!
563
+ read: Boolean!
564
+ write: Boolean!
565
+ }
566
+
567
+ """Input to link an object to a pointer Payment"""
568
+ input PaymentPointerInput {
569
+ unlink: Boolean
570
+ link: ID
571
+ createAndLink: PaymentCreateFieldsInput
572
+ }
573
+
574
+ input PaymentCreateFieldsInput {
575
+ user: UserPointerInput
576
+ amount: Int
577
+ currency: Currency
578
+ acl: PaymentACLObjectCreateFieldsInput
579
+ createdAt: Date
580
+ updatedAt: Date
581
+ search: [String]
582
+ }
583
+
584
+ input PaymentACLObjectCreateFieldsInput {
585
+ users: [PaymentACLObjectUsersACLCreateFieldsInput]
586
+ roles: [PaymentACLObjectRolesACLCreateFieldsInput]
587
+ }
588
+
589
+ input PaymentACLObjectUsersACLCreateFieldsInput {
590
+ userId: String
591
+ read: Boolean
592
+ write: Boolean
593
+ }
594
+
595
+ input PaymentACLObjectRolesACLCreateFieldsInput {
596
+ roleId: String
597
+ read: Boolean
598
+ write: Boolean
599
+ }
600
+
601
+ """Input to add a relation to the class Payment"""
602
+ input PaymentRelationInput {
603
+ add: [ID!]
604
+ remove: [ID!]
605
+ createAndAdd: [PaymentCreateFieldsInput!]
606
+ }
607
+
492
608
  type Query {
493
609
  """User class"""
494
610
  user(id: ID): User
495
611
 
496
612
  """User class"""
497
- users(where: UserWhereInput, offset: Int, first: Int): UserConnection!
613
+ users(where: UserWhereInput, offset: Int, first: Int, order: [UserOrder!]): UserConnection!
498
614
  post(id: ID): Post
499
- posts(where: PostWhereInput, offset: Int, first: Int): PostConnection!
615
+ posts(where: PostWhereInput, offset: Int, first: Int, order: [PostOrder!]): PostConnection!
500
616
  _session(id: ID): _Session
501
- _sessions(where: _SessionWhereInput, offset: Int, first: Int): _SessionConnection!
617
+ _sessions(where: _SessionWhereInput, offset: Int, first: Int, order: [_SessionOrder!]): _SessionConnection!
502
618
  role(id: ID): Role
503
- roles(where: RoleWhereInput, offset: Int, first: Int): RoleConnection!
619
+ roles(where: RoleWhereInput, offset: Int, first: Int, order: [RoleOrder!]): RoleConnection!
620
+ payment(id: ID): Payment
621
+ payments(where: PaymentWhereInput, offset: Int, first: Int, order: [PaymentOrder!]): PaymentConnection!
504
622
 
505
623
  """Hello world description"""
506
624
  helloWorld(name: String!): String
507
625
  me: MeOutput
626
+
627
+ """Get invoices of a customer"""
628
+ getInvoices(email: Email!): [Invoice]!
508
629
  }
509
630
 
510
631
  """User class"""
@@ -712,6 +833,35 @@ input _SessionACLObjectRolesACLWhereInput {
712
833
  AND: [_SessionACLObjectRolesACLWhereInput]
713
834
  }
714
835
 
836
+ enum UserOrder {
837
+ name_ASC
838
+ name_DESC
839
+ age_ASC
840
+ age_DESC
841
+ acl_ASC
842
+ acl_DESC
843
+ createdAt_ASC
844
+ createdAt_DESC
845
+ updatedAt_ASC
846
+ updatedAt_DESC
847
+ search_ASC
848
+ search_DESC
849
+ authentication_ASC
850
+ authentication_DESC
851
+ provider_ASC
852
+ provider_DESC
853
+ isOauth_ASC
854
+ isOauth_DESC
855
+ email_ASC
856
+ email_DESC
857
+ verifiedEmail_ASC
858
+ verifiedEmail_DESC
859
+ role_ASC
860
+ role_DESC
861
+ sessions_ASC
862
+ sessions_DESC
863
+ }
864
+
715
865
  type PostConnection {
716
866
  totalCount: Int
717
867
  edges: [PostEdge]
@@ -763,6 +913,42 @@ input PostACLObjectRolesACLWhereInput {
763
913
  AND: [PostACLObjectRolesACLWhereInput]
764
914
  }
765
915
 
916
+ enum PostOrder {
917
+ name_ASC
918
+ name_DESC
919
+ test_ASC
920
+ test_DESC
921
+ acl_ASC
922
+ acl_DESC
923
+ createdAt_ASC
924
+ createdAt_DESC
925
+ updatedAt_ASC
926
+ updatedAt_DESC
927
+ search_ASC
928
+ search_DESC
929
+ }
930
+
931
+ enum _SessionOrder {
932
+ user_ASC
933
+ user_DESC
934
+ accessToken_ASC
935
+ accessToken_DESC
936
+ accessTokenExpiresAt_ASC
937
+ accessTokenExpiresAt_DESC
938
+ refreshToken_ASC
939
+ refreshToken_DESC
940
+ refreshTokenExpiresAt_ASC
941
+ refreshTokenExpiresAt_DESC
942
+ acl_ASC
943
+ acl_DESC
944
+ createdAt_ASC
945
+ createdAt_DESC
946
+ updatedAt_ASC
947
+ updatedAt_DESC
948
+ search_ASC
949
+ search_DESC
950
+ }
951
+
766
952
  type RoleConnection {
767
953
  totalCount: Int
768
954
  edges: [RoleEdge]
@@ -772,10 +958,97 @@ type RoleEdge {
772
958
  node: Role!
773
959
  }
774
960
 
961
+ enum RoleOrder {
962
+ name_ASC
963
+ name_DESC
964
+ users_ASC
965
+ users_DESC
966
+ acl_ASC
967
+ acl_DESC
968
+ createdAt_ASC
969
+ createdAt_DESC
970
+ updatedAt_ASC
971
+ updatedAt_DESC
972
+ search_ASC
973
+ search_DESC
974
+ }
975
+
976
+ type PaymentConnection {
977
+ totalCount: Int
978
+ edges: [PaymentEdge]
979
+ }
980
+
981
+ type PaymentEdge {
982
+ node: Payment!
983
+ }
984
+
985
+ input PaymentWhereInput {
986
+ id: IdWhereInput
987
+ user: UserWhereInput
988
+ amount: IntWhereInput
989
+ currency: AnyWhereInput
990
+ acl: PaymentACLObjectWhereInput
991
+ createdAt: DateWhereInput
992
+ updatedAt: DateWhereInput
993
+ search: SearchWhereInput
994
+ OR: [PaymentWhereInput]
995
+ AND: [PaymentWhereInput]
996
+ }
997
+
998
+ input PaymentACLObjectWhereInput {
999
+ users: [PaymentACLObjectUsersACLWhereInput]
1000
+ roles: [PaymentACLObjectRolesACLWhereInput]
1001
+ OR: [PaymentACLObjectWhereInput]
1002
+ AND: [PaymentACLObjectWhereInput]
1003
+ }
1004
+
1005
+ input PaymentACLObjectUsersACLWhereInput {
1006
+ userId: StringWhereInput
1007
+ read: BooleanWhereInput
1008
+ write: BooleanWhereInput
1009
+ OR: [PaymentACLObjectUsersACLWhereInput]
1010
+ AND: [PaymentACLObjectUsersACLWhereInput]
1011
+ }
1012
+
1013
+ input PaymentACLObjectRolesACLWhereInput {
1014
+ roleId: StringWhereInput
1015
+ read: BooleanWhereInput
1016
+ write: BooleanWhereInput
1017
+ OR: [PaymentACLObjectRolesACLWhereInput]
1018
+ AND: [PaymentACLObjectRolesACLWhereInput]
1019
+ }
1020
+
1021
+ enum PaymentOrder {
1022
+ user_ASC
1023
+ user_DESC
1024
+ amount_ASC
1025
+ amount_DESC
1026
+ currency_ASC
1027
+ currency_DESC
1028
+ acl_ASC
1029
+ acl_DESC
1030
+ createdAt_ASC
1031
+ createdAt_DESC
1032
+ updatedAt_ASC
1033
+ updatedAt_DESC
1034
+ search_ASC
1035
+ search_DESC
1036
+ }
1037
+
775
1038
  type MeOutput {
776
1039
  user: User
777
1040
  }
778
1041
 
1042
+ type Invoice {
1043
+ amountDue: Int!
1044
+ amountPaid: Int!
1045
+ currency: Currency!
1046
+ id: String!
1047
+ created: Int!
1048
+ invoiceUrl: String!
1049
+ isPaid: Boolean!
1050
+ }
1051
+
779
1052
  type Mutation {
780
1053
  """User class"""
781
1054
  createUser(input: CreateUserInput!): CreateUserPayload
@@ -812,10 +1085,22 @@ type Mutation {
812
1085
  updateRoles(input: UpdateRolesInput!): RoleConnection!
813
1086
  deleteRole(input: DeleteRoleInput!): DeleteRolePayload
814
1087
  deleteRoles(input: DeleteRolesInput!): RoleConnection!
1088
+ createPayment(input: CreatePaymentInput!): CreatePaymentPayload
1089
+ createPayments(input: CreatePaymentsInput!): PaymentConnection!
1090
+ updatePayment(input: UpdatePaymentInput!): UpdatePaymentPayload
1091
+ updatePayments(input: UpdatePaymentsInput!): PaymentConnection!
1092
+ deletePayment(input: DeletePaymentInput!): DeletePaymentPayload
1093
+ deletePayments(input: DeletePaymentsInput!): PaymentConnection!
815
1094
  createMutation(input: CreateMutationInput!): Boolean!
816
1095
  customMutation(input: CustomMutationInput!): Int
817
1096
  secondCustomMutation(input: SecondCustomMutationInput!): Int
818
1097
 
1098
+ """
1099
+ Create a payment with the payment provider. Returns the url to redirect the user to pay
1100
+ """
1101
+ makePayment(input: MakePaymentInput!): String
1102
+ cancelSubscription(input: CancelSubscriptionInput!): Boolean
1103
+
819
1104
  """Send basic email with text and html, returns the id of the email"""
820
1105
  sendEmail(input: SendEmailInput!): String
821
1106
  signInWith(input: SignInWithInput!): SignInWithOutput
@@ -838,6 +1123,7 @@ input CreateUsersInput {
838
1123
  fields: [UserCreateFieldsInput]!
839
1124
  offset: Int
840
1125
  first: Int
1126
+ order: [UserOrder]
841
1127
  }
842
1128
 
843
1129
  type UpdateUserPayload {
@@ -905,6 +1191,7 @@ input UpdateUsersInput {
905
1191
  where: UserWhereInput
906
1192
  offset: Int
907
1193
  first: Int
1194
+ order: [UserOrder]
908
1195
  }
909
1196
 
910
1197
  type DeleteUserPayload {
@@ -918,6 +1205,7 @@ input DeleteUserInput {
918
1205
 
919
1206
  input DeleteUsersInput {
920
1207
  where: UserWhereInput
1208
+ order: [UserOrder]
921
1209
  }
922
1210
 
923
1211
  type CreatePostPayload {
@@ -933,6 +1221,7 @@ input CreatePostsInput {
933
1221
  fields: [PostCreateFieldsInput]!
934
1222
  offset: Int
935
1223
  first: Int
1224
+ order: [PostOrder]
936
1225
  }
937
1226
 
938
1227
  type UpdatePostPayload {
@@ -976,6 +1265,7 @@ input UpdatePostsInput {
976
1265
  where: PostWhereInput
977
1266
  offset: Int
978
1267
  first: Int
1268
+ order: [PostOrder]
979
1269
  }
980
1270
 
981
1271
  type DeletePostPayload {
@@ -989,6 +1279,7 @@ input DeletePostInput {
989
1279
 
990
1280
  input DeletePostsInput {
991
1281
  where: PostWhereInput
1282
+ order: [PostOrder]
992
1283
  }
993
1284
 
994
1285
  type Create_SessionPayload {
@@ -1004,6 +1295,7 @@ input Create_SessionsInput {
1004
1295
  fields: [_SessionCreateFieldsInput]!
1005
1296
  offset: Int
1006
1297
  first: Int
1298
+ order: [_SessionOrder]
1007
1299
  }
1008
1300
 
1009
1301
  type Update_SessionPayload {
@@ -1050,6 +1342,7 @@ input Update_SessionsInput {
1050
1342
  where: _SessionWhereInput
1051
1343
  offset: Int
1052
1344
  first: Int
1345
+ order: [_SessionOrder]
1053
1346
  }
1054
1347
 
1055
1348
  type Delete_SessionPayload {
@@ -1063,6 +1356,7 @@ input Delete_SessionInput {
1063
1356
 
1064
1357
  input Delete_SessionsInput {
1065
1358
  where: _SessionWhereInput
1359
+ order: [_SessionOrder]
1066
1360
  }
1067
1361
 
1068
1362
  type CreateRolePayload {
@@ -1078,6 +1372,7 @@ input CreateRolesInput {
1078
1372
  fields: [RoleCreateFieldsInput]!
1079
1373
  offset: Int
1080
1374
  first: Int
1375
+ order: [RoleOrder]
1081
1376
  }
1082
1377
 
1083
1378
  type UpdateRolePayload {
@@ -1121,6 +1416,7 @@ input UpdateRolesInput {
1121
1416
  where: RoleWhereInput
1122
1417
  offset: Int
1123
1418
  first: Int
1419
+ order: [RoleOrder]
1124
1420
  }
1125
1421
 
1126
1422
  type DeleteRolePayload {
@@ -1134,6 +1430,82 @@ input DeleteRoleInput {
1134
1430
 
1135
1431
  input DeleteRolesInput {
1136
1432
  where: RoleWhereInput
1433
+ order: [RoleOrder]
1434
+ }
1435
+
1436
+ type CreatePaymentPayload {
1437
+ payment: Payment
1438
+ clientMutationId: String
1439
+ }
1440
+
1441
+ input CreatePaymentInput {
1442
+ fields: PaymentCreateFieldsInput
1443
+ }
1444
+
1445
+ input CreatePaymentsInput {
1446
+ fields: [PaymentCreateFieldsInput]!
1447
+ offset: Int
1448
+ first: Int
1449
+ order: [PaymentOrder]
1450
+ }
1451
+
1452
+ type UpdatePaymentPayload {
1453
+ payment: Payment
1454
+ clientMutationId: String
1455
+ }
1456
+
1457
+ input UpdatePaymentInput {
1458
+ id: ID
1459
+ fields: PaymentUpdateFieldsInput
1460
+ }
1461
+
1462
+ input PaymentUpdateFieldsInput {
1463
+ user: UserPointerInput
1464
+ amount: Int
1465
+ currency: Currency
1466
+ acl: PaymentACLObjectUpdateFieldsInput
1467
+ createdAt: Date
1468
+ updatedAt: Date
1469
+ search: [String]
1470
+ }
1471
+
1472
+ input PaymentACLObjectUpdateFieldsInput {
1473
+ users: [PaymentACLObjectUsersACLUpdateFieldsInput]
1474
+ roles: [PaymentACLObjectRolesACLUpdateFieldsInput]
1475
+ }
1476
+
1477
+ input PaymentACLObjectUsersACLUpdateFieldsInput {
1478
+ userId: String
1479
+ read: Boolean
1480
+ write: Boolean
1481
+ }
1482
+
1483
+ input PaymentACLObjectRolesACLUpdateFieldsInput {
1484
+ roleId: String
1485
+ read: Boolean
1486
+ write: Boolean
1487
+ }
1488
+
1489
+ input UpdatePaymentsInput {
1490
+ fields: PaymentUpdateFieldsInput
1491
+ where: PaymentWhereInput
1492
+ offset: Int
1493
+ first: Int
1494
+ order: [PaymentOrder]
1495
+ }
1496
+
1497
+ type DeletePaymentPayload {
1498
+ payment: Payment
1499
+ clientMutationId: String
1500
+ }
1501
+
1502
+ input DeletePaymentInput {
1503
+ id: ID
1504
+ }
1505
+
1506
+ input DeletePaymentsInput {
1507
+ where: PaymentWhereInput
1508
+ order: [PaymentOrder]
1137
1509
  }
1138
1510
 
1139
1511
  input CreateMutationInput {
@@ -1154,6 +1526,26 @@ input SecondCustomMutationSumInput {
1154
1526
  b: Int!
1155
1527
  }
1156
1528
 
1529
+ input MakePaymentInput {
1530
+ customerEmail: Email
1531
+ paymentMode: PaymentMode!
1532
+ successUrl: String!
1533
+ cancelUrl: String!
1534
+ products: [MakePaymentProductInput]!
1535
+ automaticTax: Boolean
1536
+ recurringInterval: PaymentReccuringInterval
1537
+ }
1538
+
1539
+ input MakePaymentProductInput {
1540
+ name: String!
1541
+ unitAmount: Int!
1542
+ quantity: Int!
1543
+ }
1544
+
1545
+ input CancelSubscriptionInput {
1546
+ email: Email!
1547
+ }
1548
+
1157
1549
  input SendEmailInput {
1158
1550
  from: String!
1159
1551
  to: [String!]!