UNPKG

@wepublish/api

Version:
93 lines 4.68 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GraphQLSetting = exports.GraphQLSettingsInput = exports.GraphQLUpdateSettingArgs = exports.GraphQLSettingInput = exports.GraphQLSettingRestrictionInput = exports.GraphQLSettingRestriction = exports.GraphQLInputAllowedSettingVals = exports.GraphQLAllowedSettingVals = exports.GraphQLSettingName = exports.GraphQLSettingValueType = void 0; const graphql_1 = require("graphql"); const api_1 = require("../../../settings-api/src"); exports.GraphQLSettingValueType = new graphql_1.GraphQLScalarType({ name: 'Value', serialize(Value) { return Value; } }); exports.GraphQLSettingName = new graphql_1.GraphQLEnumType({ name: 'SettingName', values: { ALLOW_GUEST_COMMENTING: { value: api_1.SettingName.ALLOW_GUEST_COMMENTING }, ALLOW_GUEST_COMMENT_RATING: { value: api_1.SettingName.ALLOW_GUEST_COMMENT_RATING }, ALLOW_GUEST_POLL_VOTING: { value: api_1.SettingName.ALLOW_GUEST_POLL_VOTING }, SEND_LOGIN_JWT_EXPIRES_MIN: { value: api_1.SettingName.SEND_LOGIN_JWT_EXPIRES_MIN }, RESET_PASSWORD_JWT_EXPIRES_MIN: { value: api_1.SettingName.RESET_PASSWORD_JWT_EXPIRES_MIN }, PEERING_TIMEOUT_MS: { value: api_1.SettingName.PEERING_TIMEOUT_MS }, INVOICE_REMINDER_FREQ: { value: api_1.SettingName.INVOICE_REMINDER_FREQ }, INVOICE_REMINDER_MAX_TRIES: { value: api_1.SettingName.INVOICE_REMINDER_MAX_TRIES }, MAKE_ACTIVE_SUBSCRIBERS_API_PUBLIC: { value: api_1.SettingName.MAKE_ACTIVE_SUBSCRIBERS_API_PUBLIC }, MAKE_NEW_SUBSCRIBERS_API_PUBLIC: { value: api_1.SettingName.MAKE_NEW_SUBSCRIBERS_API_PUBLIC }, MAKE_RENEWING_SUBSCRIBERS_API_PUBLIC: { value: api_1.SettingName.MAKE_RENEWING_SUBSCRIBERS_API_PUBLIC }, MAKE_NEW_DEACTIVATIONS_API_PUBLIC: { value: api_1.SettingName.MAKE_NEW_DEACTIVATIONS_API_PUBLIC }, MAKE_EXPECTED_REVENUE_API_PUBLIC: { value: api_1.SettingName.MAKE_EXPECTED_REVENUE_API_PUBLIC }, MAKE_REVENUE_API_PUBLIC: { value: api_1.SettingName.MAKE_REVENUE_API_PUBLIC }, COMMENT_CHAR_LIMIT: { value: api_1.SettingName.COMMENT_CHAR_LIMIT }, ALLOW_COMMENT_EDITING: { value: api_1.SettingName.ALLOW_COMMENT_EDITING } } }); exports.GraphQLAllowedSettingVals = new graphql_1.GraphQLObjectType({ name: 'AllowedSettingVals', fields: { stringChoice: { type: new graphql_1.GraphQLList(graphql_1.GraphQLString) }, boolChoice: { type: graphql_1.GraphQLBoolean } } }); exports.GraphQLInputAllowedSettingVals = new graphql_1.GraphQLInputObjectType({ name: 'AllowedSettingValsInput', fields: { stringChoice: { type: new graphql_1.GraphQLList(graphql_1.GraphQLString) }, boolChoice: { type: graphql_1.GraphQLBoolean } } }); exports.GraphQLSettingRestriction = new graphql_1.GraphQLObjectType({ name: 'SettingRestriction', fields: { maxValue: { type: graphql_1.GraphQLInt }, minValue: { type: graphql_1.GraphQLInt }, inputLength: { type: graphql_1.GraphQLInt }, allowedValues: { type: exports.GraphQLAllowedSettingVals } } }); exports.GraphQLSettingRestrictionInput = new graphql_1.GraphQLInputObjectType({ name: 'SettingRestrictionInput', fields: { maxValue: { type: graphql_1.GraphQLInt }, minValue: { type: graphql_1.GraphQLInt }, inputLength: { type: graphql_1.GraphQLInt }, allowedValues: { type: new graphql_1.GraphQLList(exports.GraphQLInputAllowedSettingVals) } } }); exports.GraphQLSettingInput = new graphql_1.GraphQLInputObjectType({ name: 'SettingInput', fields: { value: { type: exports.GraphQLSettingValueType } } }); exports.GraphQLUpdateSettingArgs = new graphql_1.GraphQLInputObjectType({ name: 'UpdateSettingArgs', fields: { name: { type: new graphql_1.GraphQLNonNull(exports.GraphQLSettingName) }, value: { type: new graphql_1.GraphQLNonNull(exports.GraphQLSettingValueType) } } }); exports.GraphQLSettingsInput = new graphql_1.GraphQLInputObjectType({ name: 'SettingsInput', fields: { value: { type: new graphql_1.GraphQLList(exports.GraphQLUpdateSettingArgs) } } }); exports.GraphQLSetting = new graphql_1.GraphQLObjectType({ name: 'Setting', fields: { id: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLID) }, name: { type: new graphql_1.GraphQLNonNull(exports.GraphQLSettingName) }, value: { type: new graphql_1.GraphQLNonNull(exports.GraphQLSettingValueType) }, settingRestriction: { type: exports.GraphQLSettingRestriction } } }); //# sourceMappingURL=setting.js.map