@unchainedshop/api 2.3.6 → 2.4.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/lib/errors.d.ts +1 -0
  2. package/lib/errors.js +1 -0
  3. package/lib/errors.js.map +1 -1
  4. package/lib/resolvers/mutations/accounts/impersonate.js +3 -3
  5. package/lib/resolvers/mutations/accounts/impersonate.js.map +1 -1
  6. package/lib/resolvers/mutations/accounts/stopImpersonation.d.ts +6 -0
  7. package/lib/resolvers/mutations/accounts/stopImpersonation.js +21 -0
  8. package/lib/resolvers/mutations/accounts/stopImpersonation.js.map +1 -0
  9. package/lib/resolvers/mutations/index.d.ts +16 -37
  10. package/lib/resolvers/mutations/index.js +17 -15
  11. package/lib/resolvers/mutations/index.js.map +1 -1
  12. package/lib/resolvers/mutations/payment/removePaymentCredentials.js.map +1 -1
  13. package/lib/resolvers/queries/index.d.ts +2 -0
  14. package/lib/resolvers/queries/index.js +2 -0
  15. package/lib/resolvers/queries/index.js.map +1 -1
  16. package/lib/resolvers/queries/users/impersonator.d.ts +2 -0
  17. package/lib/resolvers/queries/users/impersonator.js +12 -0
  18. package/lib/resolvers/queries/users/impersonator.js.map +1 -0
  19. package/lib/resolvers/type/product/product-types.js +3 -0
  20. package/lib/resolvers/type/product/product-types.js.map +1 -1
  21. package/lib/resolvers/type/user-types.d.ts +7 -0
  22. package/lib/resolvers/type/user-types.js +16 -1
  23. package/lib/resolvers/type/user-types.js.map +1 -1
  24. package/lib/roles/all.js +16 -0
  25. package/lib/roles/all.js.map +1 -1
  26. package/lib/roles/index.js +16 -0
  27. package/lib/roles/index.js.map +1 -1
  28. package/lib/roles/loggedIn.js +3 -0
  29. package/lib/roles/loggedIn.js.map +1 -1
  30. package/lib/schema/mutation.js +5 -0
  31. package/lib/schema/mutation.js.map +1 -1
  32. package/lib/schema/query.js +4 -0
  33. package/lib/schema/query.js.map +1 -1
  34. package/lib/schema/types/product/bundle-product.js +1 -0
  35. package/lib/schema/types/product/bundle-product.js.map +1 -1
  36. package/lib/schema/types/product/configurable-product.js +1 -0
  37. package/lib/schema/types/product/configurable-product.js.map +1 -1
  38. package/lib/schema/types/product/plan-product.js +1 -0
  39. package/lib/schema/types/product/plan-product.js.map +1 -1
  40. package/lib/schema/types/product/product.js +1 -0
  41. package/lib/schema/types/product/product.js.map +1 -1
  42. package/lib/schema/types/product/simple-product.js +1 -0
  43. package/lib/schema/types/product/simple-product.js.map +1 -1
  44. package/lib/schema/types/product/tokenized-product.js +1 -0
  45. package/lib/schema/types/product/tokenized-product.js.map +1 -1
  46. package/lib/schema/types/user.js +2 -0
  47. package/lib/schema/types/user.js.map +1 -1
  48. package/package.json +14 -14
  49. package/src/errors.ts +5 -0
  50. package/src/resolvers/mutations/accounts/impersonate.ts +3 -3
  51. package/src/resolvers/mutations/accounts/stopImpersonation.ts +31 -0
  52. package/src/resolvers/mutations/index.ts +21 -15
  53. package/src/resolvers/mutations/payment/removePaymentCredentials.ts +2 -3
  54. package/src/resolvers/queries/index.ts +2 -0
  55. package/src/resolvers/queries/users/impersonator.ts +19 -0
  56. package/src/resolvers/type/product/product-types.ts +3 -0
  57. package/src/resolvers/type/user-types.ts +26 -0
  58. package/src/roles/all.ts +16 -0
  59. package/src/roles/index.ts +17 -0
  60. package/src/roles/loggedIn.ts +3 -0
  61. package/src/schema/mutation.ts +5 -0
  62. package/src/schema/query.ts +4 -0
  63. package/src/schema/types/product/bundle-product.ts +1 -0
  64. package/src/schema/types/product/configurable-product.ts +1 -0
  65. package/src/schema/types/product/plan-product.ts +1 -0
  66. package/src/schema/types/product/product.ts +1 -0
  67. package/src/schema/types/product/simple-product.ts +1 -0
  68. package/src/schema/types/product/tokenized-product.ts +1 -0
  69. package/src/schema/types/user.ts +2 -0
@@ -5,6 +5,10 @@ export default [
5
5
  Currently logged in user
6
6
  """
7
7
  me: User
8
+ """
9
+ User impersonating current user session using the impersonate API
10
+ """
11
+ impersonator: User
8
12
 
9
13
  """
10
14
  Get list of users, by default sorted by creation date (ascending) unless a queryString is set
@@ -20,6 +20,7 @@ export default [
20
20
  sort: [SortOptionInput!]
21
21
  queryString: String
22
22
  ): [ProductReview!]!
23
+ reviewsCount(queryString: String): Int!
23
24
  assortmentPaths: [ProductAssortmentPath!]!
24
25
  siblings(
25
26
  assortmentId: ID
@@ -85,6 +85,7 @@ export default [
85
85
  sort: [SortOptionInput!]
86
86
  queryString: String
87
87
  ): [ProductReview!]!
88
+ reviewsCount(queryString: String): Int!
88
89
  catalogPriceRange(
89
90
  quantity: Int = 0
90
91
  vectors: [ProductAssignmentVectorInput!]
@@ -62,6 +62,7 @@ export default [
62
62
  sort: [SortOptionInput!]
63
63
  queryString: String
64
64
  ): [ProductReview!]!
65
+ reviewsCount(queryString: String): Int!
65
66
  plan: ProductPlanConfiguration
66
67
  }
67
68
  `,
@@ -69,6 +69,7 @@ export default [
69
69
  sort: [SortOptionInput!]
70
70
  queryString: String
71
71
  ): [ProductReview!]!
72
+ reviewsCount(queryString: String): Int!
72
73
  assortmentPaths: [ProductAssortmentPath!]!
73
74
  siblings(
74
75
  assortmentId: ID
@@ -45,6 +45,7 @@ export default [
45
45
  sort: [SortOptionInput!]
46
46
  queryString: String
47
47
  ): [ProductReview!]!
48
+ reviewsCount(queryString: String): Int!
48
49
  }
49
50
  `,
50
51
  ];
@@ -50,6 +50,7 @@ export default [
50
50
  sort: [SortOptionInput!]
51
51
  queryString: String
52
52
  ): [ProductReview!]!
53
+ reviewsCount(queryString: String): Int!
53
54
  contractAddress: String
54
55
  contractStandard: SmartContractStandard
55
56
  contractConfiguration: ContractConfiguration
@@ -153,6 +153,8 @@ export default [
153
153
  allowedActions: [RoleAction!]!
154
154
  tokens: [Token!]!
155
155
  oAuthAccounts: [OAuthAccount!]!
156
+ reviews(limit: Int = 10, offset: Int = 0, sort: [SortOptionInput!]): [ProductReview!]!
157
+ reviewsCount: Int!
156
158
  }
157
159
  `,
158
160
  ];