@vendure/core 2.3.2 → 2.3.4

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 (106) hide show
  1. package/README.md +11 -11
  2. package/dist/api/config/generate-error-code-enum.js +3 -3
  3. package/dist/api/config/generate-permissions.js +29 -29
  4. package/dist/api/config/graphql-custom-fields.js +150 -150
  5. package/dist/api/schema/admin-api/administrator.api.graphql +47 -47
  6. package/dist/api/schema/admin-api/administrator.type.graphql +14 -14
  7. package/dist/api/schema/admin-api/asset.api.graphql +68 -68
  8. package/dist/api/schema/admin-api/auth.api.graphql +22 -22
  9. package/dist/api/schema/admin-api/channel.api.graphql +69 -69
  10. package/dist/api/schema/admin-api/collection-admin.type.graphql +4 -4
  11. package/dist/api/schema/admin-api/collection.api.graphql +94 -94
  12. package/dist/api/schema/admin-api/country.api.graphql +41 -41
  13. package/dist/api/schema/admin-api/customer-admin.type.graphql +4 -4
  14. package/dist/api/schema/admin-api/customer-group.api.graphql +37 -37
  15. package/dist/api/schema/admin-api/customer.api.graphql +63 -63
  16. package/dist/api/schema/admin-api/duplicate-entity.api.graphql +40 -40
  17. package/dist/api/schema/admin-api/facet-admin.type.graphql +3 -3
  18. package/dist/api/schema/admin-api/facet.api.graphql +100 -100
  19. package/dist/api/schema/admin-api/global-settings.api.graphql +26 -26
  20. package/dist/api/schema/admin-api/global-settings.type.graphql +28 -28
  21. package/dist/api/schema/admin-api/history-entry-admin.type.graphql +4 -4
  22. package/dist/api/schema/admin-api/import.api.graphql +3 -3
  23. package/dist/api/schema/admin-api/import.type.graphql +5 -5
  24. package/dist/api/schema/admin-api/job.api.graphql +63 -63
  25. package/dist/api/schema/admin-api/order-admin.type.graphql +37 -37
  26. package/dist/api/schema/admin-api/order.api.graphql +461 -461
  27. package/dist/api/schema/admin-api/payment-method.api.graphql +65 -65
  28. package/dist/api/schema/admin-api/payment.api.graphql +2 -2
  29. package/dist/api/schema/admin-api/product-admin.type.graphql +21 -21
  30. package/dist/api/schema/admin-api/product-option-group.api.graphql +58 -58
  31. package/dist/api/schema/admin-api/product-search-admin.type.graphql +5 -5
  32. package/dist/api/schema/admin-api/product-search.api.graphql +10 -10
  33. package/dist/api/schema/admin-api/product.api.graphql +214 -214
  34. package/dist/api/schema/admin-api/promotion.api.graphql +70 -70
  35. package/dist/api/schema/admin-api/province.api.graphql +37 -37
  36. package/dist/api/schema/admin-api/role.api.graphql +33 -33
  37. package/dist/api/schema/admin-api/seller.api.graphql +31 -31
  38. package/dist/api/schema/admin-api/shipping-method.api.graphql +91 -91
  39. package/dist/api/schema/admin-api/stock-level.type.graphql +9 -9
  40. package/dist/api/schema/admin-api/stock-location.api.graphql +51 -51
  41. package/dist/api/schema/admin-api/stock-location.type.graphql +7 -7
  42. package/dist/api/schema/admin-api/stock-movement.type.graphql +80 -80
  43. package/dist/api/schema/admin-api/tag.api.graphql +25 -25
  44. package/dist/api/schema/admin-api/tax-category.api.graphql +36 -36
  45. package/dist/api/schema/admin-api/tax-rate.api.graphql +37 -37
  46. package/dist/api/schema/admin-api/zone.api.graphql +42 -42
  47. package/dist/api/schema/common/address.type.graphql +16 -16
  48. package/dist/api/schema/common/asset.type.graphql +31 -31
  49. package/dist/api/schema/common/auth.type.graphql +12 -12
  50. package/dist/api/schema/common/channel.type.graphql +24 -24
  51. package/dist/api/schema/common/collection.type.graphql +40 -40
  52. package/dist/api/schema/common/common-enums.graphql +35 -35
  53. package/dist/api/schema/common/common-error-results.graphql +98 -98
  54. package/dist/api/schema/common/common-types.graphql +284 -284
  55. package/dist/api/schema/common/currency-code.graphql +322 -322
  56. package/dist/api/schema/common/custom-field-types.graphql +166 -166
  57. package/dist/api/schema/common/customer-group.type.graphql +10 -10
  58. package/dist/api/schema/common/customer.type.graphql +18 -18
  59. package/dist/api/schema/common/facet-value.type.graphql +19 -19
  60. package/dist/api/schema/common/facet.type.graphql +35 -35
  61. package/dist/api/schema/common/history-entry.type.graphql +43 -43
  62. package/dist/api/schema/common/language-code.graphql +325 -325
  63. package/dist/api/schema/common/order.type.graphql +257 -257
  64. package/dist/api/schema/common/payment-method.type.graphql +21 -21
  65. package/dist/api/schema/common/product-option-group.type.graphql +38 -38
  66. package/dist/api/schema/common/product-search.type.graphql +69 -69
  67. package/dist/api/schema/common/product.type.graphql +70 -70
  68. package/dist/api/schema/common/promotion.type.graphql +31 -31
  69. package/dist/api/schema/common/region.type.graphql +65 -65
  70. package/dist/api/schema/common/role.type.graphql +14 -14
  71. package/dist/api/schema/common/seller.type.graphql +6 -6
  72. package/dist/api/schema/common/shipping-method.type.graphql +27 -27
  73. package/dist/api/schema/common/tag.type.graphql +11 -11
  74. package/dist/api/schema/common/tax-category.type.graphql +7 -7
  75. package/dist/api/schema/common/tax-rate.type.graphql +16 -16
  76. package/dist/api/schema/common/user.type.graphql +17 -17
  77. package/dist/api/schema/common/zone.type.graphql +8 -8
  78. package/dist/api/schema/shop-api/shop-error-results.graphql +114 -114
  79. package/dist/api/schema/shop-api/shop.api.graphql +250 -250
  80. package/dist/config/auth/native-authentication-strategy.js +5 -5
  81. package/dist/i18n/messages/de.json +116 -116
  82. package/dist/i18n/messages/en.json +138 -138
  83. package/dist/i18n/messages/es.json +38 -38
  84. package/dist/i18n/messages/fr.json +138 -138
  85. package/dist/i18n/messages/pt_BR.json +99 -99
  86. package/dist/i18n/messages/pt_PT.json +118 -118
  87. package/dist/i18n/messages/ru.json +118 -118
  88. package/dist/i18n/messages/uk.json +118 -118
  89. package/dist/migrate.js +15 -15
  90. package/dist/plugin/default-search-plugin/api/api-extensions.js +8 -8
  91. package/dist/plugin/default-search-plugin/search-strategy/mysql-search-strategy.js +3 -3
  92. package/dist/plugin/default-search-plugin/search-strategy/postgres-search-strategy.js +7 -5
  93. package/dist/plugin/default-search-plugin/search-strategy/postgres-search-strategy.js.map +1 -1
  94. package/dist/plugin/default-search-plugin/search-strategy/sqlite-search-strategy.js +4 -4
  95. package/dist/service/helpers/request-context/request-context.service.js +6 -2
  96. package/dist/service/helpers/request-context/request-context.service.js.map +1 -1
  97. package/dist/service/services/product.service.js +5 -3
  98. package/dist/service/services/product.service.js.map +1 -1
  99. package/package.json +3 -3
  100. package/LICENSE +0 -9
  101. package/cli/cli-utils.d.ts +0 -1
  102. package/cli/cli-utils.js +0 -8
  103. package/cli/cli-utils.js.map +0 -1
  104. package/cli/vendure-cli.d.ts +0 -2
  105. package/cli/vendure-cli.js +0 -119
  106. package/cli/vendure-cli.js.map +0 -1
@@ -1,214 +1,214 @@
1
- type Query {
2
- "List Products"
3
- products(options: ProductListOptions): ProductList!
4
- "Get a Product either by id or slug. If neither id nor slug is specified, an error will result."
5
- product(id: ID, slug: String): Product
6
- "List ProductVariants either all or for the specific product."
7
- productVariants(options: ProductVariantListOptions, productId: ID): ProductVariantList!
8
- "Get a ProductVariant by id"
9
- productVariant(id: ID!): ProductVariant
10
- }
11
-
12
- type Mutation {
13
- "Create a new Product"
14
- createProduct(input: CreateProductInput!): Product!
15
-
16
- "Update an existing Product"
17
- updateProduct(input: UpdateProductInput!): Product!
18
-
19
- "Update multiple existing Products"
20
- updateProducts(input: [UpdateProductInput!]!): [Product!]!
21
-
22
- "Delete a Product"
23
- deleteProduct(id: ID!): DeletionResponse!
24
-
25
- "Delete multiple Products"
26
- deleteProducts(ids: [ID!]!): [DeletionResponse!]!
27
-
28
- "Add an OptionGroup to a Product"
29
- addOptionGroupToProduct(productId: ID!, optionGroupId: ID!): Product!
30
-
31
- """
32
- Remove an OptionGroup from a Product. If the OptionGroup is in use by any ProductVariants
33
- the mutation will return a ProductOptionInUseError, and the OptionGroup will not be removed.
34
- Setting the `force` argument to `true` will override this and remove the OptionGroup anyway,
35
- as well as removing any of the group's options from the Product's ProductVariants.
36
- """
37
- removeOptionGroupFromProduct(productId: ID!, optionGroupId: ID!, force: Boolean): RemoveOptionGroupFromProductResult!
38
-
39
- "Create a set of ProductVariants based on the OptionGroups assigned to the given Product"
40
- createProductVariants(input: [CreateProductVariantInput!]!): [ProductVariant]!
41
-
42
- "Update existing ProductVariants"
43
- updateProductVariants(input: [UpdateProductVariantInput!]!): [ProductVariant]!
44
-
45
- "Delete a ProductVariant"
46
- deleteProductVariant(id: ID!): DeletionResponse!
47
-
48
- "Delete multiple ProductVariants"
49
- deleteProductVariants(ids: [ID!]!): [DeletionResponse!]!
50
-
51
- "Assigns all ProductVariants of Product to the specified Channel"
52
- assignProductsToChannel(input: AssignProductsToChannelInput!): [Product!]!
53
-
54
- "Removes all ProductVariants of Product from the specified Channel"
55
- removeProductsFromChannel(input: RemoveProductsFromChannelInput!): [Product!]!
56
-
57
- "Assigns ProductVariants to the specified Channel"
58
- assignProductVariantsToChannel(input: AssignProductVariantsToChannelInput!): [ProductVariant!]!
59
-
60
- "Removes ProductVariants from the specified Channel"
61
- removeProductVariantsFromChannel(input: RemoveProductVariantsFromChannelInput!): [ProductVariant!]!
62
- }
63
-
64
- input StockMovementListOptions {
65
- type: StockMovementType
66
- skip: Int
67
- take: Int
68
- }
69
-
70
- # generated by generateListOptions function
71
- input ProductListOptions
72
-
73
- input ProductFilterParameter {
74
- facetValueId: IDOperators
75
- sku: StringOperators
76
- }
77
-
78
- # generated by generateListOptions function
79
- input ProductVariantListOptions
80
-
81
- input ProductVariantFilterParameter {
82
- facetValueId: IDOperators
83
- }
84
-
85
- input ProductTranslationInput {
86
- id: ID
87
- languageCode: LanguageCode!
88
- name: String
89
- slug: String
90
- description: String
91
- }
92
-
93
- input CreateProductInput {
94
- featuredAssetId: ID
95
- enabled: Boolean
96
- assetIds: [ID!]
97
- facetValueIds: [ID!]
98
- translations: [ProductTranslationInput!]!
99
- }
100
-
101
- input UpdateProductInput {
102
- id: ID!
103
- enabled: Boolean
104
- featuredAssetId: ID
105
- assetIds: [ID!]
106
- facetValueIds: [ID!]
107
- translations: [ProductTranslationInput!]
108
- }
109
-
110
- input ProductVariantTranslationInput {
111
- id: ID
112
- languageCode: LanguageCode!
113
- name: String
114
- }
115
-
116
- input ProductOptionTranslationInput {
117
- id: ID
118
- languageCode: LanguageCode!
119
- name: String
120
- }
121
-
122
- input CreateProductVariantOptionInput {
123
- optionGroupId: ID!
124
- code: String!
125
- translations: [ProductOptionTranslationInput!]!
126
- }
127
-
128
- input StockLevelInput {
129
- stockLocationId: ID!
130
- stockOnHand: Int!
131
- }
132
-
133
- """
134
- Used to set up update the price of a ProductVariant in a particular Channel.
135
- If the `delete` flag is `true`, the price will be deleted for the given Channel.
136
- """
137
- input ProductVariantPriceInput {
138
- currencyCode: CurrencyCode!
139
- price: Money!
140
- delete: Boolean
141
- }
142
-
143
- input CreateProductVariantInput {
144
- productId: ID!
145
- translations: [ProductVariantTranslationInput!]!
146
- facetValueIds: [ID!]
147
- sku: String!
148
- price: Money
149
- taxCategoryId: ID
150
- optionIds: [ID!]
151
- featuredAssetId: ID
152
- assetIds: [ID!]
153
- stockOnHand: Int
154
- stockLevels: [StockLevelInput!]
155
- outOfStockThreshold: Int
156
- useGlobalOutOfStockThreshold: Boolean
157
- trackInventory: GlobalFlag
158
- }
159
-
160
- input UpdateProductVariantInput {
161
- id: ID!
162
- enabled: Boolean
163
- translations: [ProductVariantTranslationInput!]
164
- facetValueIds: [ID!]
165
- optionIds: [ID!]
166
- sku: String
167
- taxCategoryId: ID
168
- """
169
- Sets the price for the ProductVariant in the Channel's default currency
170
- """
171
- price: Money
172
- """
173
- Allows multiple prices to be set for the ProductVariant in different currencies.
174
- """
175
- prices: [ProductVariantPriceInput!]
176
- featuredAssetId: ID
177
- assetIds: [ID!]
178
- stockOnHand: Int
179
- stockLevels: [StockLevelInput!]
180
- outOfStockThreshold: Int
181
- useGlobalOutOfStockThreshold: Boolean
182
- trackInventory: GlobalFlag
183
- }
184
-
185
- input AssignProductsToChannelInput {
186
- productIds: [ID!]!
187
- channelId: ID!
188
- priceFactor: Float
189
- }
190
-
191
- input RemoveProductsFromChannelInput {
192
- productIds: [ID!]!
193
- channelId: ID!
194
- }
195
-
196
- input AssignProductVariantsToChannelInput {
197
- productVariantIds: [ID!]!
198
- channelId: ID!
199
- priceFactor: Float
200
- }
201
-
202
- input RemoveProductVariantsFromChannelInput {
203
- productVariantIds: [ID!]!
204
- channelId: ID!
205
- }
206
-
207
- type ProductOptionInUseError implements ErrorResult {
208
- errorCode: ErrorCode!
209
- message: String!
210
- optionGroupCode: String!
211
- productVariantCount: Int!
212
- }
213
-
214
- union RemoveOptionGroupFromProductResult = Product | ProductOptionInUseError
1
+ type Query {
2
+ "List Products"
3
+ products(options: ProductListOptions): ProductList!
4
+ "Get a Product either by id or slug. If neither id nor slug is specified, an error will result."
5
+ product(id: ID, slug: String): Product
6
+ "List ProductVariants either all or for the specific product."
7
+ productVariants(options: ProductVariantListOptions, productId: ID): ProductVariantList!
8
+ "Get a ProductVariant by id"
9
+ productVariant(id: ID!): ProductVariant
10
+ }
11
+
12
+ type Mutation {
13
+ "Create a new Product"
14
+ createProduct(input: CreateProductInput!): Product!
15
+
16
+ "Update an existing Product"
17
+ updateProduct(input: UpdateProductInput!): Product!
18
+
19
+ "Update multiple existing Products"
20
+ updateProducts(input: [UpdateProductInput!]!): [Product!]!
21
+
22
+ "Delete a Product"
23
+ deleteProduct(id: ID!): DeletionResponse!
24
+
25
+ "Delete multiple Products"
26
+ deleteProducts(ids: [ID!]!): [DeletionResponse!]!
27
+
28
+ "Add an OptionGroup to a Product"
29
+ addOptionGroupToProduct(productId: ID!, optionGroupId: ID!): Product!
30
+
31
+ """
32
+ Remove an OptionGroup from a Product. If the OptionGroup is in use by any ProductVariants
33
+ the mutation will return a ProductOptionInUseError, and the OptionGroup will not be removed.
34
+ Setting the `force` argument to `true` will override this and remove the OptionGroup anyway,
35
+ as well as removing any of the group's options from the Product's ProductVariants.
36
+ """
37
+ removeOptionGroupFromProduct(productId: ID!, optionGroupId: ID!, force: Boolean): RemoveOptionGroupFromProductResult!
38
+
39
+ "Create a set of ProductVariants based on the OptionGroups assigned to the given Product"
40
+ createProductVariants(input: [CreateProductVariantInput!]!): [ProductVariant]!
41
+
42
+ "Update existing ProductVariants"
43
+ updateProductVariants(input: [UpdateProductVariantInput!]!): [ProductVariant]!
44
+
45
+ "Delete a ProductVariant"
46
+ deleteProductVariant(id: ID!): DeletionResponse!
47
+
48
+ "Delete multiple ProductVariants"
49
+ deleteProductVariants(ids: [ID!]!): [DeletionResponse!]!
50
+
51
+ "Assigns all ProductVariants of Product to the specified Channel"
52
+ assignProductsToChannel(input: AssignProductsToChannelInput!): [Product!]!
53
+
54
+ "Removes all ProductVariants of Product from the specified Channel"
55
+ removeProductsFromChannel(input: RemoveProductsFromChannelInput!): [Product!]!
56
+
57
+ "Assigns ProductVariants to the specified Channel"
58
+ assignProductVariantsToChannel(input: AssignProductVariantsToChannelInput!): [ProductVariant!]!
59
+
60
+ "Removes ProductVariants from the specified Channel"
61
+ removeProductVariantsFromChannel(input: RemoveProductVariantsFromChannelInput!): [ProductVariant!]!
62
+ }
63
+
64
+ input StockMovementListOptions {
65
+ type: StockMovementType
66
+ skip: Int
67
+ take: Int
68
+ }
69
+
70
+ # generated by generateListOptions function
71
+ input ProductListOptions
72
+
73
+ input ProductFilterParameter {
74
+ facetValueId: IDOperators
75
+ sku: StringOperators
76
+ }
77
+
78
+ # generated by generateListOptions function
79
+ input ProductVariantListOptions
80
+
81
+ input ProductVariantFilterParameter {
82
+ facetValueId: IDOperators
83
+ }
84
+
85
+ input ProductTranslationInput {
86
+ id: ID
87
+ languageCode: LanguageCode!
88
+ name: String
89
+ slug: String
90
+ description: String
91
+ }
92
+
93
+ input CreateProductInput {
94
+ featuredAssetId: ID
95
+ enabled: Boolean
96
+ assetIds: [ID!]
97
+ facetValueIds: [ID!]
98
+ translations: [ProductTranslationInput!]!
99
+ }
100
+
101
+ input UpdateProductInput {
102
+ id: ID!
103
+ enabled: Boolean
104
+ featuredAssetId: ID
105
+ assetIds: [ID!]
106
+ facetValueIds: [ID!]
107
+ translations: [ProductTranslationInput!]
108
+ }
109
+
110
+ input ProductVariantTranslationInput {
111
+ id: ID
112
+ languageCode: LanguageCode!
113
+ name: String
114
+ }
115
+
116
+ input ProductOptionTranslationInput {
117
+ id: ID
118
+ languageCode: LanguageCode!
119
+ name: String
120
+ }
121
+
122
+ input CreateProductVariantOptionInput {
123
+ optionGroupId: ID!
124
+ code: String!
125
+ translations: [ProductOptionTranslationInput!]!
126
+ }
127
+
128
+ input StockLevelInput {
129
+ stockLocationId: ID!
130
+ stockOnHand: Int!
131
+ }
132
+
133
+ """
134
+ Used to set up update the price of a ProductVariant in a particular Channel.
135
+ If the `delete` flag is `true`, the price will be deleted for the given Channel.
136
+ """
137
+ input ProductVariantPriceInput {
138
+ currencyCode: CurrencyCode!
139
+ price: Money!
140
+ delete: Boolean
141
+ }
142
+
143
+ input CreateProductVariantInput {
144
+ productId: ID!
145
+ translations: [ProductVariantTranslationInput!]!
146
+ facetValueIds: [ID!]
147
+ sku: String!
148
+ price: Money
149
+ taxCategoryId: ID
150
+ optionIds: [ID!]
151
+ featuredAssetId: ID
152
+ assetIds: [ID!]
153
+ stockOnHand: Int
154
+ stockLevels: [StockLevelInput!]
155
+ outOfStockThreshold: Int
156
+ useGlobalOutOfStockThreshold: Boolean
157
+ trackInventory: GlobalFlag
158
+ }
159
+
160
+ input UpdateProductVariantInput {
161
+ id: ID!
162
+ enabled: Boolean
163
+ translations: [ProductVariantTranslationInput!]
164
+ facetValueIds: [ID!]
165
+ optionIds: [ID!]
166
+ sku: String
167
+ taxCategoryId: ID
168
+ """
169
+ Sets the price for the ProductVariant in the Channel's default currency
170
+ """
171
+ price: Money
172
+ """
173
+ Allows multiple prices to be set for the ProductVariant in different currencies.
174
+ """
175
+ prices: [ProductVariantPriceInput!]
176
+ featuredAssetId: ID
177
+ assetIds: [ID!]
178
+ stockOnHand: Int
179
+ stockLevels: [StockLevelInput!]
180
+ outOfStockThreshold: Int
181
+ useGlobalOutOfStockThreshold: Boolean
182
+ trackInventory: GlobalFlag
183
+ }
184
+
185
+ input AssignProductsToChannelInput {
186
+ productIds: [ID!]!
187
+ channelId: ID!
188
+ priceFactor: Float
189
+ }
190
+
191
+ input RemoveProductsFromChannelInput {
192
+ productIds: [ID!]!
193
+ channelId: ID!
194
+ }
195
+
196
+ input AssignProductVariantsToChannelInput {
197
+ productVariantIds: [ID!]!
198
+ channelId: ID!
199
+ priceFactor: Float
200
+ }
201
+
202
+ input RemoveProductVariantsFromChannelInput {
203
+ productVariantIds: [ID!]!
204
+ channelId: ID!
205
+ }
206
+
207
+ type ProductOptionInUseError implements ErrorResult {
208
+ errorCode: ErrorCode!
209
+ message: String!
210
+ optionGroupCode: String!
211
+ productVariantCount: Int!
212
+ }
213
+
214
+ union RemoveOptionGroupFromProductResult = Product | ProductOptionInUseError
@@ -1,70 +1,70 @@
1
- type Query {
2
- promotion(id: ID!): Promotion
3
- promotions(options: PromotionListOptions): PromotionList!
4
- promotionConditions: [ConfigurableOperationDefinition!]!
5
- promotionActions: [ConfigurableOperationDefinition!]!
6
- }
7
-
8
- type Mutation {
9
- createPromotion(input: CreatePromotionInput!): CreatePromotionResult!
10
- updatePromotion(input: UpdatePromotionInput!): UpdatePromotionResult!
11
- deletePromotion(id: ID!): DeletionResponse!
12
- deletePromotions(ids: [ID!]!): [DeletionResponse!]!
13
- "Assigns Promotions to the specified Channel"
14
- assignPromotionsToChannel(input: AssignPromotionsToChannelInput!): [Promotion!]!
15
- "Removes Promotions from the specified Channel"
16
- removePromotionsFromChannel(input: RemovePromotionsFromChannelInput!): [Promotion!]!
17
- }
18
-
19
- # generated by generateListOptions function
20
- input PromotionListOptions
21
-
22
- input PromotionTranslationInput {
23
- id: ID
24
- languageCode: LanguageCode!
25
- name: String
26
- description: String
27
- }
28
- input CreatePromotionInput {
29
- enabled: Boolean!
30
- startsAt: DateTime
31
- endsAt: DateTime
32
- couponCode: String
33
- perCustomerUsageLimit: Int
34
- usageLimit: Int
35
- conditions: [ConfigurableOperationInput!]!
36
- actions: [ConfigurableOperationInput!]!
37
- translations: [PromotionTranslationInput!]!
38
- }
39
-
40
- input UpdatePromotionInput {
41
- id: ID!
42
- enabled: Boolean
43
- startsAt: DateTime
44
- endsAt: DateTime
45
- couponCode: String
46
- perCustomerUsageLimit: Int
47
- usageLimit: Int
48
- conditions: [ConfigurableOperationInput!]
49
- actions: [ConfigurableOperationInput!]
50
- translations: [PromotionTranslationInput!]
51
- }
52
-
53
- input AssignPromotionsToChannelInput {
54
- promotionIds: [ID!]!
55
- channelId: ID!
56
- }
57
-
58
- input RemovePromotionsFromChannelInput {
59
- promotionIds: [ID!]!
60
- channelId: ID!
61
- }
62
-
63
- "Returned if a PromotionCondition has neither a couponCode nor any conditions set"
64
- type MissingConditionsError implements ErrorResult {
65
- errorCode: ErrorCode!
66
- message: String!
67
- }
68
-
69
- union CreatePromotionResult = Promotion | MissingConditionsError
70
- union UpdatePromotionResult = Promotion | MissingConditionsError
1
+ type Query {
2
+ promotion(id: ID!): Promotion
3
+ promotions(options: PromotionListOptions): PromotionList!
4
+ promotionConditions: [ConfigurableOperationDefinition!]!
5
+ promotionActions: [ConfigurableOperationDefinition!]!
6
+ }
7
+
8
+ type Mutation {
9
+ createPromotion(input: CreatePromotionInput!): CreatePromotionResult!
10
+ updatePromotion(input: UpdatePromotionInput!): UpdatePromotionResult!
11
+ deletePromotion(id: ID!): DeletionResponse!
12
+ deletePromotions(ids: [ID!]!): [DeletionResponse!]!
13
+ "Assigns Promotions to the specified Channel"
14
+ assignPromotionsToChannel(input: AssignPromotionsToChannelInput!): [Promotion!]!
15
+ "Removes Promotions from the specified Channel"
16
+ removePromotionsFromChannel(input: RemovePromotionsFromChannelInput!): [Promotion!]!
17
+ }
18
+
19
+ # generated by generateListOptions function
20
+ input PromotionListOptions
21
+
22
+ input PromotionTranslationInput {
23
+ id: ID
24
+ languageCode: LanguageCode!
25
+ name: String
26
+ description: String
27
+ }
28
+ input CreatePromotionInput {
29
+ enabled: Boolean!
30
+ startsAt: DateTime
31
+ endsAt: DateTime
32
+ couponCode: String
33
+ perCustomerUsageLimit: Int
34
+ usageLimit: Int
35
+ conditions: [ConfigurableOperationInput!]!
36
+ actions: [ConfigurableOperationInput!]!
37
+ translations: [PromotionTranslationInput!]!
38
+ }
39
+
40
+ input UpdatePromotionInput {
41
+ id: ID!
42
+ enabled: Boolean
43
+ startsAt: DateTime
44
+ endsAt: DateTime
45
+ couponCode: String
46
+ perCustomerUsageLimit: Int
47
+ usageLimit: Int
48
+ conditions: [ConfigurableOperationInput!]
49
+ actions: [ConfigurableOperationInput!]
50
+ translations: [PromotionTranslationInput!]
51
+ }
52
+
53
+ input AssignPromotionsToChannelInput {
54
+ promotionIds: [ID!]!
55
+ channelId: ID!
56
+ }
57
+
58
+ input RemovePromotionsFromChannelInput {
59
+ promotionIds: [ID!]!
60
+ channelId: ID!
61
+ }
62
+
63
+ "Returned if a PromotionCondition has neither a couponCode nor any conditions set"
64
+ type MissingConditionsError implements ErrorResult {
65
+ errorCode: ErrorCode!
66
+ message: String!
67
+ }
68
+
69
+ union CreatePromotionResult = Promotion | MissingConditionsError
70
+ union UpdatePromotionResult = Promotion | MissingConditionsError
@@ -1,37 +1,37 @@
1
- type Query {
2
- provinces(options: ProvinceListOptions): ProvinceList!
3
- province(id: ID!): Province
4
- }
5
-
6
- type Mutation {
7
- "Create a new Province"
8
- createProvince(input: CreateProvinceInput!): Province!
9
-
10
- "Update an existing Province"
11
- updateProvince(input: UpdateProvinceInput!): Province!
12
-
13
- "Delete a Province"
14
- deleteProvince(id: ID!): DeletionResponse!
15
- }
16
-
17
- input ProvinceTranslationInput {
18
- id: ID
19
- languageCode: LanguageCode!
20
- name: String
21
- }
22
-
23
- input CreateProvinceInput {
24
- code: String!
25
- translations: [ProvinceTranslationInput!]!
26
- enabled: Boolean!
27
- }
28
-
29
- input UpdateProvinceInput {
30
- id: ID!
31
- code: String
32
- translations: [ProvinceTranslationInput!]
33
- enabled: Boolean
34
- }
35
-
36
- # generated by generateListOptions function
37
- input ProvinceListOptions
1
+ type Query {
2
+ provinces(options: ProvinceListOptions): ProvinceList!
3
+ province(id: ID!): Province
4
+ }
5
+
6
+ type Mutation {
7
+ "Create a new Province"
8
+ createProvince(input: CreateProvinceInput!): Province!
9
+
10
+ "Update an existing Province"
11
+ updateProvince(input: UpdateProvinceInput!): Province!
12
+
13
+ "Delete a Province"
14
+ deleteProvince(id: ID!): DeletionResponse!
15
+ }
16
+
17
+ input ProvinceTranslationInput {
18
+ id: ID
19
+ languageCode: LanguageCode!
20
+ name: String
21
+ }
22
+
23
+ input CreateProvinceInput {
24
+ code: String!
25
+ translations: [ProvinceTranslationInput!]!
26
+ enabled: Boolean!
27
+ }
28
+
29
+ input UpdateProvinceInput {
30
+ id: ID!
31
+ code: String
32
+ translations: [ProvinceTranslationInput!]
33
+ enabled: Boolean
34
+ }
35
+
36
+ # generated by generateListOptions function
37
+ input ProvinceListOptions