Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {
- GraphQLObjectType,
- GraphQLString,
- GraphQLInt,
- GraphQLList,
- GraphQLBoolean,
- } from 'graphql';
- const promoAdjustmentListPaymentType = new GraphQLObjectType({
- name: 'promoAdjustmentListPaymentType',
- fields: {
- paymentId: {type: GraphQLString},
- binNumbers: {type: new GraphQLList(GraphQLString)}
- }
- });
- const promoAdjustmentCodeCompanyCost = new GraphQLObjectType({
- name: 'promoAdjustmentCodeCompanyCost',
- fields: {
- value: {type: GraphQLInt},
- percent: {type: GraphQLInt},
- maxValue: {type: GraphQLInt},
- name: {type: GraphQLInt},
- }
- });
- const promoAdjustmentCodePatnerCost = new GraphQLObjectType({
- name: 'promoAdjustmentCodePatnerCost',
- fields: {
- value: {type: GraphQLInt},
- percent: {type: GraphQLInt},
- maxValue: {type: GraphQLInt},
- name: {type: GraphQLInt},
- }
- });
- const promoAdjustmentListCodeCostType = new GraphQLObjectType({
- name: 'promoAdjustmentListCodeCostType',
- fields: {
- patnerCost: {type: new GraphQLList(promoAdjustmentCodePatnerCost)},
- companyCost: {type: new GraphQLList(promoAdjustmentCodeCompanyCost)}
- }
- });
- const promoAdjustmentCodeDiscount = new GraphQLObjectType({
- name: 'promoAdjustmentCodeDiscount',
- fields: {
- value: {type: GraphQLInt},
- percent: {type: GraphQLInt},
- maxPrice: {type: GraphQLInt},
- minPrice: {type: GraphQLInt},
- }
- });
- const promoAdjustmentListPriceRangesType = new GraphQLObjectType({
- name: 'promoAdjustmentListPriceRangesType',
- fields: {
- minPrice: {type: GraphQLInt},
- maxPrice: {type: GraphQLInt},
- promoCodeDiscount: {type: GraphQLList(promoAdjustmentCodeDiscount)}
- }
- });
- const promoAdjustmentCodeRuleValue = new GraphQLObjectType({
- name: 'promoAdjustmentCodeRuleValue',
- fields: {
- operator: {type: GraphQLString},
- value: {type: GraphQLString}
- }
- });
- const promoAdjustmentCompanyCost = new GraphQLObjectType({
- name: 'promoAdjustmentCompanyCost',
- fields: {
- value: {type: GraphQLString},
- percent: {type: GraphQLInt},
- maxValue: {type: GraphQLInt},
- name: {type: GraphQLString}
- }
- });
- const promoAdjustmentCodeRules = new GraphQLObjectType({
- name: 'promoAdjustmentCodeRules',
- fields: {
- param: {type: GraphQLString},
- promoCodeRuleValue: {type: new GraphQLList(promoAdjustmentCodeRuleValue)},
- usedForCalculate: {type: GraphQLBoolean},
- productType: {type: GraphQLString}
- }
- });
- const promoAdjustmentPatnerCost = new GraphQLObjectType({
- name: 'promoAdjustmentPatnerCost',
- fields: {
- value: {type: GraphQLString},
- percent: {type: GraphQLInt},
- maxValue: {type: GraphQLInt},
- name: {type: GraphQLString}
- }
- });
- const promoAdjustmentGroupCost = new GraphQLObjectType({
- name: 'promoAdjustmentListGroupCost',
- fields: {
- patnerCost: {type: new GraphQLList(promoAdjustmentPatnerCost)},
- companyCost: {type: new GraphQLList(promoAdjustmentCompanyCost)}
- }
- });
- const promoAdjustmentListGroupRulesType = new GraphQLObjectType({
- name: 'promoAdjustmentListGroupRulesType',
- fields: {
- name: {type: GraphQLString},
- promoGroupRulesCost: {type: new GraphQLList(promoAdjustmentGroupCost)},
- promoCodePriceRanges: {type: new GraphQLList(GraphQLString)},
- promoCodeRules: {type: new GraphQLList(promoAdjustmentCodeRules)}
- }
- });
- const promoAdjustmentListDistributionsType = new GraphQLObjectType({
- name: 'promoAdjustmentListDistributionsType',
- fields: {
- storeId: {type: GraphQLString},
- channelId: {type: new GraphQLList(GraphQLString)}
- }
- });
- const promoAdjustmentListUsageType = new GraphQLObjectType({
- name: 'promoAdjustmentListUsageType',
- fields: {
- usageCount: {type: GraphQLInt},
- usagePeriod: {type: GraphQLString},
- usageAmount: {type: GraphQLInt},
- amountPeriod: {type: GraphQLString},
- validatedBy: {type: GraphQLString}
- }
- });
- const promoAdjustmentListContentType = new GraphQLObjectType({
- name: 'promoAdjustmentListContentType',
- fields: {
- id: {type: GraphQLString},
- promoCodeType: {type: GraphQLString},
- code: {type: GraphQLString},
- name: {type: GraphQLString},
- description: {type: GraphQLString},
- usageRules: {type: new GraphQLList(promoAdjustmentListUsageType)},
- promoCodeDistributions: {type: new GraphQLList(promoAdjustmentListDistributionsType)},
- maxDiscount: {type: GraphQLInt},
- promoCodeGroupRules: {type: new GraphQLList(promoAdjustmentListGroupRulesType)},
- promoCodeAdjustmentStatus: {type: GraphQLString},
- calculateType: {type: GraphQLString},
- promoCodePriceRanges: {type: new GraphQLList(promoAdjustmentListPriceRangesType)},
- promoCodeCost: {type: new GraphQLList(promoAdjustmentListCodeCostType)},
- paymentMethods: {type: new GraphQLList(promoAdjustmentListPaymentType)},
- promoCodeCombine: {type: GraphQLBoolean},
- validAllOrderDetails: {type: GraphQLBoolean}
- }
- });
- const promoAdjustmentListDataType = new GraphQLObjectType({
- name: 'promoAdjustmentListDataType',
- fields: {
- content: {type: new GraphQLList(promoAdjustmentListContentType)}
- }
- });
- const promoAdjustmentListType = new GraphQLObjectType({
- name: 'promoAdjustmentListType',
- fields: {
- code: {type: GraphQLString},
- message: {type: GraphQLString},
- data: {type: promoAdjustmentListDataType}
- }
- });
- export default promoAdjustmentListType;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement