diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..ab57381 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +node_modules +build +dist diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..a18eca5 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,26 @@ +const baseConfig = { + extends: ['@encoura/eslint-config'], + settings: { + 'import/resolver': { + 'babel-plugin-root-import': {}, + typescript: { + project: ['tsconfig.json', 'test/tsconfig.json'], + }, + }, + }, +}; + +const tsConfig = { + extends: ['@encoura/eslint-config'], + files: ['**/*.ts'], + parser: '@typescript-eslint/parser', + parserOptions: { + project: ['tsconfig.json', 'test/tsconfig.json'], + }, + plugins: ['@typescript-eslint', 'prettier'], + rules: { + ...baseConfig.rules, + }, +}; + +module.exports = { ...baseConfig, overrides: [tsConfig] }; diff --git a/.gitignore b/.gitignore index 3c3629e..dd87e2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +build diff --git a/README.md b/README.md index 061b3f4..7a5f637 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,75 @@ # Apollo Rest utils -Encoura's solution to integrating rest APIs with [Apollo](https://www.apollographql.com/docs/) and [Apollo Client](https://www.apollographql.com/docs/react/). +Encoura's solution to integrating rest APIs with +[Apollo](https://www.apollographql.com/docs/) and +[Apollo Client](https://www.apollographql.com/docs/react/). -These utils build on top of the great work of [apollo-link-rest](https://www.apollographql.com/docs/react/api/link/apollo-link-rest/). +These utils build on top of the great work of +[apollo-link-rest](https://www.apollographql.com/docs/react/api/link/apollo-link-rest/). -This library provides helper functions and generators for making integration with REST apis and Apollo in a TypeScript application. +This library provides helper functions and generators for making integration +with REST apis and Apollo in a TypeScript application. ## Features -* A command line utiltity that takes a swagger file/url, and automatically generates input and output types, and endpoint definitions that can be used to make integration with `apollo-link-rest` much easier. -* Wrapper functions for common GraphQL operations that allow you to pass in pure GraphQL, and enables the input variables and the result to be strongly typed based on the swagger definition. -* Automatically checks your GraphQL at runtime and will throw exceptions if your GraphQL fields do not match the endpoint definition. +* A command line utiltity that takes a swagger file/url, and automatically + generates input and output types, and endpoint definitions that can be used + to make integration with `apollo-link-rest` much easier. +* Wrapper functions for common GraphQL operations that allow you to pass in + pure GraphQL, and enables the input variables and the result to be strongly + typed based on the swagger definition. +* Automatically checks your GraphQL at runtime and will throw exceptions if + your GraphQL fields do not match the endpoint definition. ## Usage -TODO +From the command line you can generate definitions for endpoints: + +`npx apollo-rest-utils ` + +Then you can use those definitions to make GraphQL calls within an Apollo context: + +```TypeScript +import { wrapRestQuery } from 'apollo-rest-utils'; + +import ROUTES from 'path/to/directory_specified_in_cli_call/__generatedRestEndpoints'; + +const userSearch = (searchPattern: string) => { + const wrappedRestQuery = wrapRestQuery<'users'>(); + + const { data, loading } = wrappedRestQuery( + gql` + query RenderUserSearchQuery($search: String!) { + user(search: $search) { + id + name + city + state + } + } + `, + { + endpoint: ROUTES.GET.USER_SEARCH, + skip: !searchPattern, + variables: { + search: searchPattern, + }, + }, + ); + + return data?.users ?? []; +} +``` ## Releasing After making any changes and merging them to main, please do the following: + * Create a new branch from main and run `npm run update:version` * Verify the `CHANGELOG.md` generated changes * Commit, push, and merge to main. -* Create a new [release](https://github.com/nrccua/apollo-rest-utils/releases/new) using the tag generated in the previous steps -* Use the `Auto-generate release notes` button to generate the release notes, and add any context you may deem necessary. +* Create a new + [release](https://github.com/nrccua/apollo-rest-utils/releases/new) using + the tag generated in the previous steps +* Use the `Auto-generate release notes` button to generate the release notes, + and add any context you may deem necessary. diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..de855f3 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,27 @@ +const defaultConfig = require('@encoura/eslint-config/jest.config'); +const os = require('os'); + +module.exports = { + ...defaultConfig, + collectCoverageFrom: ['/lib/**/*.ts', '!/lib/index.ts'], + coverageThreshold: { + global: { + branches: 100, + functions: 100, + lines: 100, + statements: 100, + }, + }, + globals: { + 'ts-jest': { + diagnostics: false, + tsconfig: './tsconfig.json', + }, + }, + maxWorkers: os.cpus().length / 2, + preset: 'ts-jest', + roots: ['/lib'], + transform: { + '^.+\\.ts$': 'ts-jest', + }, +}; diff --git a/lib/generateRoutes/index.test.ts b/lib/generateRoutes/index.test.ts new file mode 100644 index 0000000..9da2662 --- /dev/null +++ b/lib/generateRoutes/index.test.ts @@ -0,0 +1,78 @@ +import { randomUUID } from 'crypto'; +import fs from 'fs'; +import path from 'path'; + +import SwaggerParser from '@apidevtools/swagger-parser'; + +import { generateTypes, generateTypescript, normalizeName, pathToType } from '.'; + +const buildFolder = path.join('.', 'build', 'tests'); + +function createBuildFolder(): void { + if (!fs.existsSync(buildFolder)) { + fs.mkdirSync(buildFolder, { recursive: true }); + } +} +function deleteBuildFolder(): void { + if (fs.existsSync(buildFolder)) { + fs.rmdirSync(buildFolder, { recursive: true }); + } +} + +function doTestImport(tsData: string): unknown { + const filename = `${randomUUID()}.ts`; + + fs.writeFileSync(path.join(buildFolder, filename), tsData); + + // eslint-disable-next-line max-len + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, security/detect-non-literal-require, import/no-dynamic-require, global-require, @typescript-eslint/no-var-requires + const endpoints = require(`../../build/tests/${filename}`); + expect(endpoints).toBeTruthy(); // Probably a better test here, but I don't know what it would be + return endpoints; +} + +describe('generateTypescript', () => { + const testSwaggerPath = './test/test_data/generateRoutes/'; + + beforeAll(() => { + createBuildFolder(); + }); + + afterAll(() => { + deleteBuildFolder(); + }); + + it.each(fs.readdirSync(testSwaggerPath).map(d => path.join(testSwaggerPath, d)))('can parse the swagger document %s', async apiPath => { + const api = await SwaggerParser.validate(apiPath); + + const typeImport = await generateTypes(apiPath, path.join(buildFolder, `${randomUUID()}_types.ts`)); + + const tsData = generateTypescript(api, typeImport).replace('apollo-rest-utils', '../../lib'); + + expect(tsData).toBeTruthy(); // Not empty, null, or undefined + + doTestImport(tsData); + }); +}); + +describe('normalizeName', () => { + it.each([ + ['/login', 'LOGIN'], + ['login', 'LOGIN'], + ['/high-schools/search', 'HIGH_SCHOOLS_SEARCH'], + ['/invitations/{studentKey}/users/{mentorEmail}', 'INVITATIONS_BY_STUDENTKEY_USERS_BY_MENTOREMAIL'], + ['/{userId}/{studentKey}/{email}', 'BY_USERID_BY_STUDENTKEY_BY_EMAIL'], + ])('path %s produces name %s', (pathName, expectedEndpointName) => { + expect(normalizeName(pathName)).toEqual(expectedEndpointName); + }); +}); + +describe('pathToType', () => { + it.each([ + ['/login', 'LoginResponse'], + ['/high-schools/search', 'SearchResponse'], + ['/invitations/{studentKey}/users/{mentorEmail}', 'UsersResponse'], + ])('path %s produces type name %s', (pathName, expectedTypeName) => { + expect(pathToType(pathName)).toEqual(expectedTypeName); + }); +}); diff --git a/lib/generateRoutes/index.ts b/lib/generateRoutes/index.ts new file mode 100644 index 0000000..9bb1264 --- /dev/null +++ b/lib/generateRoutes/index.ts @@ -0,0 +1,177 @@ +// This file is NOT meant to be imported. +// It is a helper file to generate @rest endpoint definitions +// from a swagger.json file + +/* eslint-disable import/no-extraneous-dependencies, no-console */ + +import fs from 'fs'; +import path from 'path'; + +import SwaggerParser from '@apidevtools/swagger-parser'; +import _ from 'lodash'; +import { OpenAPI, OpenAPIV3 } from 'openapi-types'; +import openapiTS from 'openapi-typescript'; +import prettier from 'prettier'; + +import { RestEndpointSchema } from '../types'; + +export function addArgsToPath(endpointPath: string, parameters: OpenAPIV3.ParameterObject[] | undefined): string { + const queryParams = parameters?.filter(p => p.in === 'query').map(p => `${p.name}={args.${p.name}}`) ?? []; + return !_.includes(endpointPath, '{') && queryParams.length > 0 + ? `${endpointPath.substr(1)}?{args}` + : endpointPath.substr(1).replace(/{/g, '{args.') + (queryParams.length > 0 ? `?${queryParams.join('&')}` : ''); +} + +export function getResponseSchema(properties?: { [name: string]: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject }): RestEndpointSchema | undefined { + if (!properties) { + return undefined; + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + const result = Object.keys(properties) + .map((p: string) => + // eslint-disable-next-line no-nested-ternary + 'properties' in properties[p] + ? { [p]: getResponseSchema((properties[p] as OpenAPIV3.SchemaObject).properties) } // eslint-disable-this-line @typescript-eslint/no-unsafe-assignment + : 'items' in properties[p] + ? { [p]: getResponseSchema(((properties[p] as OpenAPIV3.ArraySchemaObject).items as OpenAPIV3.SchemaObject).properties) } + : p, + ) + .filter(p => + p !== undefined && _.isObject(p) + ? Object.keys(p) + .map(key => p[key] !== undefined) + .reduce((a, v) => a && v, true) + : true, + ); + return result; +} + +export function normalizeName(name: string): string { + const normalized = name.trim().replace(/[/-]/g, '_').toUpperCase().replace(/{/g, 'BY_').replace(/}/g, ''); + return normalized.startsWith('_') ? normalized.substr(1) : normalized; +} + +export function pathToType(endpointPath: string, isArray = false): string { + const result = `${_.camelCase(_.last(endpointPath.split('/').filter(x => !x.startsWith('{'))))}Response`; + return `${isArray ? '[' : ''}${result.replace(result[0], result[0].toUpperCase())}${isArray ? ']' : ''}`; +} + +export async function generateTypes(apiPath: string, filePath: string): Promise { + const typeOutput = await openapiTS(apiPath, { prettierConfig: '.prettierrc.js' }); + fs.writeFileSync(filePath, typeOutput); + return `./${path.basename(filePath.replace(/[.]ts$/, ''))}`; +} + +export function generateTypescript(api: OpenAPI.Document, typeImportLocation: string): string { + let generatedTSEndpoints = + '/**\n* This file was auto-generated by the generateRoutes endpoint generator.\n* Do not make direct changes to the file.\n' + + '* To update this file run `npm run updatee:endpoints`\n*/\n\n'; + generatedTSEndpoints += `import {operations} from '${typeImportLocation}'\n\nimport { IRestEndpoint} from 'apollo-rest-utils';\n\n\n`; + // Create an object representing routes by method, e.g., { 'get': {}, ... } + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access + const routes = Object.entries(OpenAPIV3.HttpMethods).reduce( + (a, v) => ({ + ...a, + [v[1]]: {}, + }), + {}, + ) as unknown as Record, Record>; + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + const paths = api.paths as Record; + Object.keys(paths).forEach(endpointPath => { + // eslint-disable-next-line @typescript-eslint/ban-types + const pathObject = paths[endpointPath] as Record>; + Object.keys(pathObject).forEach(method => { + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + const endpointObject = pathObject[method]; + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call + let responseBody = `operations['${endpointObject.operationId as string}']['responses']`; + let responseSchema; + let isArray = false; + const okResponse = _.first(Object.keys(endpointObject.responses).sort()); + if (okResponse && parseInt(okResponse, 10) < 300) { + responseBody += `['${okResponse}']`; + const responseObject = endpointObject.responses[okResponse] as OpenAPIV3.ResponseObject; + if (responseObject?.content) { + responseBody += `['content']`; + if (responseObject?.content?.['application/json']) { + responseBody += `['application/json']`; + const schema = responseObject.content['application/json'].schema as OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject; + if ('properties' in schema) { + responseSchema = getResponseSchema(schema.properties); + } else if ('items' in schema && 'properties' in schema.items) { + isArray = true; + responseSchema = getResponseSchema(schema.items.properties); + } + } + } + } + const requestBodyObject = endpointObject.requestBody as OpenAPIV3.RequestBodyObject; + const requestBody = Object.keys(requestBodyObject?.content ?? {}).includes('application/json') + ? `operations['${endpointObject.operationId as string}']['requestBody']['content']['application/json']` + : undefined; + const headers = endpointObject.parameters?.filter(p => 'in' in p && p.in === 'header').map(p => p as OpenAPIV3.ParameterObject) ?? []; + routes[method as Uppercase][ + normalizeName(endpointPath) + ] = `${`{ gql: '@rest(method: "${method.toUpperCase()}", path: "${addArgsToPath( + endpointPath, + endpointObject.parameters as OpenAPIV3.ParameterObject[] | undefined, + )}", type: "${pathToType(endpointPath, isArray)}")', `}${ + headers?.length > 0 + ? `headers: [${headers.map(h => JSON.stringify({ description: h.description, name: h.name, required: h.required, schema: h.schema })).join(',\n')}],` + : '' + }${responseSchema ? `responseSchema: ${JSON.stringify(responseSchema)},\n` : ''}} as IRestEndpoint<${responseBody}${ + requestBody ? `,${requestBody}` : '' + }>,`; + }); + }); + generatedTSEndpoints += 'const ROUTES = {\n'; + Object.keys(routes) + .sort() + .forEach(method => { + generatedTSEndpoints += `${method.toUpperCase()}: {\n`; + Object.keys(routes[method as Uppercase]) + .sort() + .forEach(endpoint => { + generatedTSEndpoints += `${endpoint}: ${routes[method as Uppercase][endpoint]}\n`; + }); + generatedTSEndpoints += `},\n`; + }); + generatedTSEndpoints += '};\n\nexport default ROUTES;'; + + return generatedTSEndpoints; +} + +// NO TEST COVERAGE FOR THE CLI TOOL AT THIS TIME +// istanbul ignore next +async function main(): Promise { + if (require.main === module) { + const usage = 'apollo-rest-utils '; + if (process.argv.length < 3) { + console.log(usage); + throw new Error('No swagger.json URL provided as an argument'); + } + if (process.argv.length < 4) { + console.log(usage); + throw new Error('No output directory provided as an argument'); + } + const swaggerUrl = process.argv[2]; + const outputDirectory = process.argv[3]; + const typesFilename = path.join(outputDirectory, '__generatedSwaggerTypes.ts'); + const endpointsFilename = path.join(outputDirectory, '__generatedRestEndpoints.ts'); + const swaggerTypes = await generateTypes(swaggerUrl, typesFilename); + console.log(`Types file written to ${typesFilename}`); + const api = await SwaggerParser.validate(swaggerUrl); + const generatedTSEndpoints = generateTypescript(api, swaggerTypes); + const prettierTSEndpoints = prettier.format(generatedTSEndpoints, { filepath: endpointsFilename }); + fs.writeFileSync(endpointsFilename, prettierTSEndpoints); + console.log(`Endpoint definition file written to ${endpointsFilename}`); + } +} + +// NO TEST COVERAGE FOR THE CLI TOOL AT THIS TIME +// istanbul ignore next +main().catch((unkErr: unknown) => { + console.error(unkErr); + process.exit(1); +}); diff --git a/lib/index.ts b/lib/index.ts new file mode 100644 index 0000000..fcb073f --- /dev/null +++ b/lib/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/lib/types/index.ts b/lib/types/index.ts new file mode 100644 index 0000000..4da117f --- /dev/null +++ b/lib/types/index.ts @@ -0,0 +1,2 @@ +export * from './invalidQueryError'; +export * from './restSchema'; diff --git a/lib/types/invalidQueryError.ts b/lib/types/invalidQueryError.ts new file mode 100644 index 0000000..18612c8 --- /dev/null +++ b/lib/types/invalidQueryError.ts @@ -0,0 +1,16 @@ +import { DocumentNode, OperationVariables, TypedDocumentNode } from '@apollo/client'; + +import { Input, IRestEndpoint, NamedGQLResult, RestEndpointSchema } from './restSchema'; + +// Default export makes re-exporting in types a pain +// eslint-disable-next-line import/prefer-default-export +export class InvalidQueryError extends Error { + constructor( + public message: string, + public query: DocumentNode | TypedDocumentNode, TVariables>, + public endpoint: IRestEndpoint, Input>, + public schema?: RestEndpointSchema, + ) { + super(message); + } +} diff --git a/lib/types/restSchema/index.test.ts b/lib/types/restSchema/index.test.ts new file mode 100644 index 0000000..824fd98 --- /dev/null +++ b/lib/types/restSchema/index.test.ts @@ -0,0 +1,23 @@ +import { getSchemaField } from '.'; + +describe('getSchemaField', () => { + const dummySchema = ['a', { b: ['c'] }]; + + it('can find a simple schema field', () => { + const result = getSchemaField(dummySchema, 'a'); + + expect(result).toEqual(['a']); + }); + + it('can find a complex schema field', () => { + const result = getSchemaField(dummySchema, 'b'); + + expect(result).toEqual(['c']); + }); + + it('returns undefined for a missing schema field', () => { + const result = getSchemaField(dummySchema, 'd'); + + expect(result).toBeUndefined(); + }); +}); diff --git a/lib/types/restSchema/index.ts b/lib/types/restSchema/index.ts new file mode 100644 index 0000000..3e59576 --- /dev/null +++ b/lib/types/restSchema/index.ts @@ -0,0 +1,46 @@ +import { isObject } from 'lodash'; + +// This should probably come from OpenAPITypes, but it works for now +export interface IRestEndpointHeaderSchema { + type: 'string'; + enum: string[]; +} + +export interface IRestEndpointHeader { + name: string; + description: string; + required?: boolean; + schema: IRestEndpointHeaderSchema; +} + +export interface IRestEndpoint { + gql: string; + requestBody?: RequestType; + responseBody?: ResponseType; + headers?: IRestEndpointHeader[]; + responseSchema: RestEndpointSchema; +} + +export type Input = T | { input: T }; + +export interface IEndpointOptions { + endpoint: IRestEndpoint; +} + +export type NamedGQLResult = { + [k in Name]: TData; +}; + +export type RestEndpointSchema = (string | { [k in string]?: RestEndpointSchema })[]; + +export function getSchemaField(schema: RestEndpointSchema, field: string): RestEndpointSchema | undefined { + if (schema.includes(field)) { + return [field]; + } + const schemaObjects = schema.filter(schemaItem => isObject(schemaItem)); + const found = schemaObjects.filter(schemaItem => Object.keys(schemaItem)[0] === field); + if (found.length === 1) { + return (found[0] as Record)[field]; + } + return undefined; +} diff --git a/lib/useRestQuery/index.test.ts b/lib/useRestQuery/index.test.ts new file mode 100644 index 0000000..a8234b8 --- /dev/null +++ b/lib/useRestQuery/index.test.ts @@ -0,0 +1,224 @@ +import * as apolloClientLib from '@apollo/client'; +import { ApolloClient, DocumentNode, gql, useMutation, useQuery } from '@apollo/client'; +import { print, SelectionNode } from 'graphql'; +import { first } from 'lodash'; + +import { IRestEndpoint } from '../types'; + +import { validateQueryAgainstEndpoint, wrapRestClientQuery, wrapRestMutation, wrapRestQuery } from '.'; + +// eslint-disable-next-line @typescript-eslint/no-extraneous-class +class MockApolloClient { + public query: jest.Mock; + + constructor() { + this.query = jest.fn(); + } +} + +jest.mock('@apollo/client', () => ({ + ...jest.requireActual('@apollo/client'), + ApolloClient: jest.fn().mockImplementation(() => new MockApolloClient()), + useMutation: jest.fn(), + useQuery: jest.fn(), +})); + +describe('useRestQuery Library', () => { + const useMutationMock = useMutation as jest.Mock; + const useQueryMock = useQuery as jest.Mock; + const dummyEndpoint = { gql: '@rest(method: "get", path: "test")' } as IRestEndpoint<{ sessionToken: string }, { testInput: string }>; + + beforeEach(() => { + jest.resetAllMocks(); + }); + + afterAll(() => { + jest.restoreAllMocks(); + }); + + it('wrapRestMutation should create a function that returns results via useMutation', async () => { + const testToken = 'TEST_TOKEN'; + const mockResult = { + called: true, + client: new MockApolloClient() as unknown as ApolloClient, + data: { refreshToken: { sessionToken: testToken } }, + loading: false, + }; + + useMutationMock.mockReturnValue([async (): Promise => Promise.resolve(mockResult), mockResult]); + + const wrappedRestMutation = wrapRestMutation<'refreshToken'>(); + const [refreshToken] = wrappedRestMutation( + gql` + query TestMutation($input: input) { + refreshToken(input: $input) { + sessionToken + } + } + `, + { endpoint: dummyEndpoint }, + ); + const result = await refreshToken({ + variables: { + input: { + testInput: 'test', + }, + }, + }); + + expect(result.data?.refreshToken.sessionToken).toBe(testToken); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access + const generatedNode = first(first(useMutationMock.mock.calls)) as DocumentNode; + + // Make sure our @rest gql got injected + expect(print(generatedNode)).toContain(dummyEndpoint.gql); + }); + + it('wrapRestQuery should create a function that returns results via useQuery', () => { + const testToken = 'TEST_TOKEN'; + useQueryMock.mockReturnValue({ data: { refreshToken: { sessionToken: testToken } } }); + + const wrappedRestQuery = wrapRestQuery<'refreshToken'>(); + const { data } = wrappedRestQuery( + gql` + query TestQuery($input: input) { + refreshToken(input: $input) { + sessionToken + } + } + `, + { + endpoint: dummyEndpoint, + variables: { + testInput: 'test', + }, + }, + ); + + expect(data?.refreshToken.sessionToken).toBe(testToken); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access + const generatedNode = first(first(useQueryMock.mock.calls)) as DocumentNode; + + // Make sure our @rest gql got injected + expect(print(generatedNode)).toContain(dummyEndpoint.gql); + }); + + it('wrapRestClientQuery should create a function that returns results via client.query', async () => { + const testToken = 'TEST_TOKEN'; + const clientMock = new MockApolloClient(); + + clientMock.query.mockReturnValue({ data: { refreshToken: { sessionToken: testToken } } }); + + const wrappedRestQuery = wrapRestClientQuery<'refreshToken'>(); + + const { data } = await wrappedRestQuery({ + client: clientMock as unknown as ApolloClient, + endpoint: dummyEndpoint, + query: gql` + query TestClientQuery($input: input) { + refreshToken(input: $input) { + sessionToken + } + } + `, + variables: { + testInput: 'test', + }, + }); + + expect(data?.refreshToken.sessionToken).toBe(testToken); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access + const generatedNode = (first(first(clientMock.query.mock.calls)) as Parameters[0])?.query as DocumentNode; + + // Make sure our @rest gql got injected + expect(print(generatedNode)).toContain(dummyEndpoint.gql); + }); +}); + +describe('validateQueryAgainstEndpoint', () => { + const dummyEndpoint = { gql: '@rest(method: "get", path: "test")', responseSchema: ['sessionToken'] } as IRestEndpoint< + { sessionToken: string }, + { testInput: string } + >; + + beforeEach(() => { + jest.resetAllMocks(); + }); + + afterAll(() => { + jest.restoreAllMocks(); + }); + + it('should not throw an error for a valid query', () => { + const query = gql` + query TestQuery($input: input) { + refreshToken(input: $input) { + sessionToken + } + } + `; + + expect(() => validateQueryAgainstEndpoint(query, dummyEndpoint)).not.toThrowError(); + }); + + it('should throw an error for a query with no definitions', () => { + const query = { definitions: [], kind: 'Document' } as DocumentNode; + + expect(() => validateQueryAgainstEndpoint(query, dummyEndpoint)).toThrowError('Query must contain exactly one definition'); + }); + + it('should throw an error for a query with a non-operation definitions', () => { + const query = { definitions: [{ kind: 'ScalarTypeDefinition', name: { kind: 'Name', value: 'NULL' } }], kind: 'Document' } as DocumentNode; + + expect(() => validateQueryAgainstEndpoint(query, dummyEndpoint)).toThrowError('Query definition must be an operation'); + }); + + it('should throw and error with an empty selections array', () => { + const query: DocumentNode = { + definitions: [{ kind: 'OperationDefinition', operation: 'query', selectionSet: { kind: 'SelectionSet', selections: [] as readonly SelectionNode[] } }], + kind: 'Document', + }; + + expect(() => validateQueryAgainstEndpoint(query, dummyEndpoint)).toThrowError('Query must contain exactly one selection'); + }); + + it('should throw and error with a non-Field selection', () => { + const query: DocumentNode = { + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'NULL' } }] as readonly SelectionNode[] }, + }, + ], + kind: 'Document', + }; + + expect(() => validateQueryAgainstEndpoint(query, dummyEndpoint)).toThrowError('Query selection must be a field'); + }); + + it('should throw an error for a query with no requested return value', () => { + const query = gql` + query TestQuery($input: input) { + refreshToken + } + `; + + expect(() => validateQueryAgainstEndpoint(query, dummyEndpoint)).toThrowError('Query selection must contain at least one value to return'); + }); + + it('should throw an error for a query with a bad field', () => { + const query = gql` + query TestQuery($input: input) { + refreshToken(input: $input) { + test + } + } + `; + + expect(() => validateQueryAgainstEndpoint(query, dummyEndpoint)).toThrowError('Query contains invalid fields: test'); + }); +}); diff --git a/lib/useRestQuery/index.ts b/lib/useRestQuery/index.ts new file mode 100644 index 0000000..f38cf7e --- /dev/null +++ b/lib/useRestQuery/index.ts @@ -0,0 +1,227 @@ +import { + ApolloCache, + ApolloClient, + ApolloQueryResult, + DefaultContext, + DocumentNode, + gql, + MutationHookOptions, + MutationTuple, + OperationVariables, + QueryHookOptions, + QueryOptions, + QueryResult, + TypedDocumentNode, + useMutation, + useQuery, +} from '@apollo/client'; +import { DirectiveNode, FieldNode, OperationDefinitionNode } from 'graphql'; + +import { IEndpointOptions, getSchemaField, Input, InvalidQueryError, IRestEndpoint, NamedGQLResult } from '../types'; + +export function validateQueryAgainstEndpoint( + query: DocumentNode | TypedDocumentNode, TVariables>, + endpoint: IRestEndpoint, Input>, +): void { + if (query.definitions.length !== 1) { + throw new InvalidQueryError('Query must contain exactly one definition', query, endpoint); + } + + const definition = query.definitions[0]; + if (definition.kind !== 'OperationDefinition') { + throw new InvalidQueryError('Query definition must be an operation', query, endpoint); + } + + if (definition.selectionSet.selections.length !== 1) { + throw new InvalidQueryError('Query must contain exactly one selection', query, endpoint); + } + + const selection = definition.selectionSet.selections[0] as FieldNode; + if (selection.kind !== 'Field') { + throw new InvalidQueryError('Query selection must be a field', query, endpoint); + } + + if (selection.selectionSet === undefined || selection.selectionSet.selections.length === 0) { + throw new InvalidQueryError('Query selection must contain at least one value to return', query, endpoint); + } + + const subFields = selection.selectionSet.selections.map(s => (s as FieldNode).name.value); + + const badFields = subFields.filter(fieldName => endpoint.responseSchema !== undefined && getSchemaField(endpoint.responseSchema, fieldName) === undefined); + + if (badFields.length > 0) { + throw new InvalidQueryError(`Query contains invalid fields: ${badFields.join(', ')}`, query, endpoint, endpoint.responseSchema); + } +} + +export function useRestMutation< + TName extends string, + TData = unknown, + TVariables = OperationVariables, + TContext = DefaultContext, + TCache extends ApolloCache = ApolloCache, +>( + mutation: DocumentNode | TypedDocumentNode, TVariables>, + options: IEndpointOptions, TVariables | Input> & + MutationHookOptions, TVariables, TContext>, +): MutationTuple, TVariables | Input, TContext, TCache> { + validateQueryAgainstEndpoint(mutation, options.endpoint); + const directives = (mutation.definitions[0] as OperationDefinitionNode).selectionSet.selections[0].directives as DirectiveNode[]; + if (directives.length === 0) { + const dummyGQL = gql`query a($c: any) { b(c: $c) ${options.endpoint.gql} {d} }`; + const dummyDirectives = (dummyGQL.definitions[0] as OperationDefinitionNode).selectionSet.selections[0].directives as DirectiveNode[]; + directives.push(dummyDirectives[0]); + } + + // eslint-disable-next-line react-hooks/rules-of-hooks + return useMutation, TVariables | Input, TContext, TCache>( + mutation, + options as MutationHookOptions, TVariables | Input, TContext>, + ); +} + +/** + * Creates a function to wrap the mutation results in an outer object for proper type checking. + * + * E.g., for an endpoint that returns user information like: + * `{ uid: string; firsName: string; }` + * + * And the following gql: + * `mutation MyMutation { + * user @rest(...) { + * uid + * firstName + * } + * }` + * + * Because of how apollo-client/GraphQL structures the result, the result of calling this with useRestMutation would return an object like: + * `{ user: { uid: string; firsName: string; } }` + * + * So this function generates a function that is typed with the expected outer wrapper. + * + * E.g., for the above example: + * + *` const wrappedMutation = wrapRestMutation<'user'>();` + * + *` result = wrappedMutation(gqlMutation, ...);` + * + *` const uid = result.user.uid; // This is properly typed!` + */ +export function wrapRestMutation() { + return = ApolloCache>( + mutation: DocumentNode | TypedDocumentNode, + options: IEndpointOptions & MutationHookOptions, + ): MutationTuple, TVariables | Input, TContext, TCache> => + useRestMutation( + mutation, + options as unknown as IEndpointOptions, TVariables | Input> & + MutationHookOptions, TVariables, TContext>, + ); +} + +export function useRestQuery( + query: DocumentNode | TypedDocumentNode, TVariables>, + options: IEndpointOptions, TVariables | Input> & QueryHookOptions, TVariables>, +): QueryResult, TVariables> { + validateQueryAgainstEndpoint(query, options.endpoint); + const directives = (query.definitions[0] as OperationDefinitionNode).selectionSet.selections[0].directives as DirectiveNode[]; + if (directives.length === 0) { + const dummyGQL = gql`query a($c: any) { b(c: $c) ${options.endpoint.gql} {d} }`; + const dummyDirectives = (dummyGQL.definitions[0] as OperationDefinitionNode).selectionSet.selections[0].directives as DirectiveNode[]; + directives.push(dummyDirectives[0]); + } + + // eslint-disable-next-line react-hooks/rules-of-hooks + return useQuery, TVariables>(query, options as QueryHookOptions, TVariables>); +} + +/** + * Creates a function to wrap the query results in an outer object for proper type checking. + * + * E.g., for an endpoint that returns user information like: + * `{ uid: string; firsName: string; }` + * + * And the following gql: + * `query MyQuery { + * user @rest(...) { + * uid + * firstName + * } + * }` + * + * Because of how apollo-client/GraphQL structures the result, the result of calling this with useRestQuery would return an object like: + * `{ user: { uid: string; firsName: string; } }` + * + * So this function generates a function that is typed with the expected outer wrapper. + * + * E.g., for the above example: + * + *` const wrappedQuery = wrapRestQuery<'user'>();` + * + *` result = wrappedQuery(gqlQuery, ...);` + * + *` const uid = result.user.uid; // This is properly typed!` + */ +export function wrapRestQuery() { + return ( + query: DocumentNode | TypedDocumentNode, + options: IEndpointOptions & QueryHookOptions, + ): QueryResult, TVariables> => + useRestQuery( + query, + options as unknown as IEndpointOptions, TVariables | Input> & + QueryHookOptions, TVariables>, + ); +} + +export function useRestClientQuery( + options: IEndpointOptions, TVariables | Input> & + QueryOptions> & { client: ApolloClient }, +): Promise>> { + validateQueryAgainstEndpoint(options.query, options.endpoint); + const directives = (options.query.definitions[0] as OperationDefinitionNode).selectionSet.selections[0].directives as DirectiveNode[]; + if (directives.length === 0) { + const dummyGQL = gql`query a($c: any) { b(c: $c) ${options.endpoint.gql} {d} }`; + const dummyDirectives = (dummyGQL.definitions[0] as OperationDefinitionNode).selectionSet.selections[0].directives as DirectiveNode[]; + directives.push(dummyDirectives[0]); + } + + return options.client.query, TVariables>(options); +} + +/** + * Creates an async function to wrap the clientquery results in an outer object for proper type checking. + * + * E.g., for an endpoint that returns user information like: + * `{ uid: string; firsName: string; }` + * + * And the following gql: + * `query MyQuery { + * user @rest(...) { + * uid + * firstName + * } + * }` + * + * Because of how apollo-client/GraphQL structures the result, the result of calling this with useClientRestQuery would return an object like: + * `{ user: { uid: string; firsName: string; } }` + * + * So this function generates a function that is typed with the expected outer wrapper. + * + * E.g., for the above example: + * + *` const wrappedQuery = wrapClientRestQuery<'user'>();` + * + *` result = await wrappedQuery(gqlOptionsWithQuery, ...);` + * + *` const uid = result.user.uid; // This is properly typed!` + */ +export function wrapRestClientQuery() { + return ( + options: IEndpointOptions & QueryOptions & { client: ApolloClient }, + ): Promise>> => + useRestClientQuery( + options as unknown as IEndpointOptions, TVariables | Input> & + QueryOptions> & { client: ApolloClient }, + ); +} diff --git a/package-lock.json b/package-lock.json index 1bd86b3..5cfe75d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -524,6 +524,55 @@ } } }, + "@apidevtools/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", + "requires": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + } + } + }, + "@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==" + }, + "@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==" + }, + "@apidevtools/swagger-parser": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.0.3.tgz", + "integrity": "sha512-sNiLY51vZOmSPFZA5TF35KZ2HbgYklQnTSDnkghamzLb3EkNtcQnrBQEj5AOCxHpTtXpqMCRM1CrmV2rG6nw4g==", + "requires": { + "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@apidevtools/openapi-schemas": "^2.0.4", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "z-schema": "^5.0.1" + } + }, "@apollo/client": { "version": "3.4.17", "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.4.17.tgz", @@ -584,7 +633,6 @@ "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", - "dev": true, "requires": { "@babel/highlight": "^7.16.0" } @@ -791,8 +839,7 @@ "@babel/helper-validator-identifier": { "version": "7.15.7", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true + "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==" }, "@babel/helper-validator-option": { "version": "7.14.5", @@ -815,7 +862,6 @@ "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", - "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.15.7", "chalk": "^2.0.0", @@ -826,7 +872,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -835,7 +880,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -846,7 +890,6 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "requires": { "color-name": "1.1.3" } @@ -854,20 +897,17 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -1520,17 +1560,78 @@ "eslint-plugin-jest": "25.2.4", "eslint-plugin-jsx-a11y": "6.5.1", "eslint-plugin-lodash": "7.3.0", - "eslint-plugin-new-with-error": "2.0.0", + "eslint-plugin-new-with-error": "3.1.0", "eslint-plugin-no-loops": "0.3.0", "eslint-plugin-prettier": "4.0.0", "eslint-plugin-promise": "5.1.1", - "eslint-plugin-react": "7.27.0", + "eslint-plugin-react": "7.27.1", "eslint-plugin-react-hooks": "4.3.0", "eslint-plugin-security": "1.4.0", "markdownlint-cli": "0.29.0", "prettier": "2.4.1", "ts-node": "10.4.0", "typescript": "4.5.2" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "eslint-plugin-new-with-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-new-with-error/-/eslint-plugin-new-with-error-3.1.0.tgz", + "integrity": "sha512-YULTdYUCxK2MM7pB564a7SzANDCuttpYELG3HTmg/PdfN+hLm5kC6NNc6lYjymtDCLDszW9wCKKG3ApyZGbSUg==", + "dev": true + }, + "eslint-plugin-react": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.27.1.tgz", + "integrity": "sha512-meyunDjMMYeWr/4EBLTV1op3iSG3mjT/pz5gti38UzfM4OPpNc2m0t2xvKCOMU5D6FSdd34BIMFOvQbW+i8GAA==", + "dev": true, + "requires": { + "array-includes": "^3.1.4", + "array.prototype.flatmap": "^1.2.5", + "doctrine": "^2.1.0", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.0.4", + "object.entries": "^1.1.5", + "object.fromentries": "^2.0.5", + "object.hasown": "^1.1.0", + "object.values": "^1.1.5", + "prop-types": "^15.7.2", + "resolve": "^2.0.0-next.3", + "semver": "^6.3.0", + "string.prototype.matchall": "^4.0.6" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "resolve": { + "version": "2.0.0-next.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", + "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@endemolshinegroup/cosmiconfig-typescript-loader": { @@ -1850,6 +1951,11 @@ "chalk": "^4.0.0" } }, + "@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2007,11 +2113,20 @@ "@types/istanbul-lib-report": "*" } }, + "@types/jest": { + "version": "27.0.3", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.3.tgz", + "integrity": "sha512-cmmwv9t7gBYt7hNKH5Spu7Kuu/DotGa+Ff+JGRKZ4db5eh8PnKS4LuebJ3YLUoyOyIHraTGyULn23YtEAm0VSg==", + "dev": true, + "requires": { + "jest-diff": "^27.0.0", + "pretty-format": "^27.0.0" + } + }, "@types/json-schema": { "version": "7.0.9", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==" }, "@types/json5": { "version": "0.0.29", @@ -2019,11 +2134,16 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/lodash": { + "version": "4.14.177", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.177.tgz", + "integrity": "sha512-0fDwydE2clKe9MNfvXHBHF9WEahRuj+msTuQqOmAApNORFvhMYZKNGGJdCzuhheVjMps/ti0Ak/iJPACMaevvw==", + "dev": true + }, "@types/minimist": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==" }, "@types/node": { "version": "16.11.9", @@ -2034,8 +2154,7 @@ "@types/normalize-package-data": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", - "dev": true + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==" }, "@types/parse-json": { "version": "4.0.0", @@ -2049,6 +2168,29 @@ "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", "dev": true }, + "@types/prop-types": { + "version": "15.7.4", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", + "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==", + "dev": true + }, + "@types/react": { + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.35.tgz", + "integrity": "sha512-r3C8/TJuri/SLZiiwwxQoLAoavaczARfT9up9b4Jr65+ErAUX3MIkU0oMOQnrpfgHme8zIqZLX7O5nnjm5Wayw==", + "dev": true, + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "dev": true + }, "@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -2596,8 +2738,7 @@ "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" }, "ast-types-flow": { "version": "0.0.7", @@ -2676,6 +2817,33 @@ "@types/babel__traverse": "^7.0.6" } }, + "babel-plugin-root-import": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-root-import/-/babel-plugin-root-import-5.1.0.tgz", + "integrity": "sha1-gOoc1ZRbRjpeP34gSmlHjFc+Mow=", + "dev": true, + "requires": { + "slash": "^1.0.0" + }, + "dependencies": { + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + } + } + }, + "babel-plugin-transform-imports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-imports/-/babel-plugin-transform-imports-2.0.0.tgz", + "integrity": "sha512-65ewumYJ85QiXdcB/jmiU0y0jg6eL6CdnDqQAqQ8JMOKh1E52VPG3NJzbVKWcgovUR5GBH8IWpCXQ7I8Q3wjgw==", + "dev": true, + "requires": { + "@babel/types": "^7.4", + "is-valid-path": "^0.1.1" + } + }, "babel-preset-current-node-syntax": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", @@ -2789,6 +2957,11 @@ "get-intrinsic": "^1.0.2" } }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2798,14 +2971,12 @@ "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "camelcase-keys": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, "requires": { "camelcase": "^5.3.1", "map-obj": "^4.0.0", @@ -3426,6 +3597,12 @@ } } }, + "csstype": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==", + "dev": true + }, "damerau-levenshtein": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz", @@ -3495,14 +3672,12 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "decamelize-keys": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "dev": true, "requires": { "decamelize": "^1.1.0", "map-obj": "^1.0.0" @@ -3511,8 +3686,7 @@ "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" } } }, @@ -3806,7 +3980,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -3865,8 +4038,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { "version": "2.0.0", @@ -4122,6 +4294,50 @@ "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", "dev": true }, + "eslint-import-resolver-babel-plugin-root-import": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-babel-plugin-root-import/-/eslint-import-resolver-babel-plugin-root-import-1.1.1.tgz", + "integrity": "sha512-ZZxdV9AxzL2WFVggDxZ36xodPg2+BTrkhhMf/of+BxSVh/GKLGCs17EDq5b61wqC7/oQsA2h1RtH1fV7HOUV/w==", + "dev": true, + "requires": { + "eslint-import-resolver-node": "^0.2.1", + "json5": "^0.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "eslint-import-resolver-node": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz", + "integrity": "sha1-Wt2BBujJKNssuiMrzZ76hG49oWw=", + "dev": true, + "requires": { + "debug": "^2.2.0", + "object-assign": "^4.0.1", + "resolve": "^1.1.6" + } + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "eslint-import-resolver-node": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", @@ -4421,9 +4637,9 @@ "dev": true }, "eslint-plugin-react": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.27.0.tgz", - "integrity": "sha512-0Ut+CkzpppgFtoIhdzi2LpdpxxBvgFf99eFqWxJnUrO7mMe0eOiNpou6rvNYeVVV6lWZvTah0BFne7k5xHjARg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.27.1.tgz", + "integrity": "sha512-meyunDjMMYeWr/4EBLTV1op3iSG3mjT/pz5gti38UzfM4OPpNc2m0t2xvKCOMU5D6FSdd34BIMFOvQbW+i8GAA==", "dev": true, "requires": { "array-includes": "^3.1.4", @@ -4724,7 +4940,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, "requires": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -5023,6 +5238,11 @@ } } }, + "globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==" + }, "globby": { "version": "11.0.4", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", @@ -5037,6 +5257,11 @@ "slash": "^3.0.0" } }, + "globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==" + }, "graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -5099,8 +5324,7 @@ "hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", - "dev": true + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==" }, "has": { "version": "1.0.3", @@ -5148,7 +5372,6 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", - "dev": true, "requires": { "lru-cache": "^6.0.0" } @@ -5286,8 +5509,7 @@ "indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" }, "inflight": { "version": "1.0.6", @@ -5325,8 +5547,7 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-bigint": { "version": "1.0.4", @@ -5357,7 +5578,6 @@ "version": "2.8.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", - "dev": true, "requires": { "has": "^1.0.3" } @@ -5398,6 +5618,32 @@ "is-extglob": "^2.1.1" } }, + "is-invalid-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-invalid-path/-/is-invalid-path-0.1.0.tgz", + "integrity": "sha1-MHqFWzzxqTi0TqcNLGEQYFNxTzQ=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", @@ -5428,8 +5674,7 @@ "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" }, "is-potential-custom-element-name": { "version": "1.0.1", @@ -5498,6 +5743,15 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, + "is-valid-path": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-valid-path/-/is-valid-path-0.1.1.tgz", + "integrity": "sha1-EQ+f90w39mPh7HkV60UfLbk6yd8=", + "dev": true, + "requires": { + "is-invalid-path": "^0.1.0" + } + }, "is-weakref": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", @@ -6170,8 +6424,7 @@ "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "json-schema-traverse": { "version": "0.4.1", @@ -6235,8 +6488,7 @@ "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" }, "kleur": { "version": "3.0.3", @@ -6278,8 +6530,7 @@ "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, "linkify-it": { "version": "3.0.3", @@ -6534,7 +6785,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, "requires": { "p-locate": "^4.1.0" } @@ -6542,8 +6792,7 @@ "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.camelcase": { "version": "4.3.0", @@ -6578,14 +6827,12 @@ "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" }, "lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" }, "lodash.ismatch": { "version": "4.4.0", @@ -6641,7 +6888,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "requires": { "yallist": "^4.0.0" } @@ -6681,8 +6927,7 @@ "map-obj": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "dev": true + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==" }, "markdown-it": { "version": "12.0.4", @@ -6846,6 +7091,11 @@ "picomatch": "^2.2.3" } }, + "mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==" + }, "mime-db": { "version": "1.51.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", @@ -6870,8 +7120,7 @@ "min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==" }, "minimatch": { "version": "3.0.4", @@ -6892,7 +7141,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", - "dev": true, "requires": { "arrify": "^1.0.1", "is-plain-obj": "^1.1.0", @@ -6955,6 +7203,14 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node-fetch": { + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -6977,7 +7233,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "dev": true, "requires": { "hosted-git-info": "^4.0.1", "is-core-module": "^2.5.0", @@ -7304,6 +7559,74 @@ "mimic-fn": "^2.1.0" } }, + "openapi-types": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-9.3.1.tgz", + "integrity": "sha512-/Yvsd2D7miYB4HLJ3hOOS0+vnowQpaT75FsHzr/y5M9P4q9bwa7RcbW2YdH6KZBn8ceLbKGnHxMZ1CHliGHUFw==" + }, + "openapi-typescript": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-4.4.0.tgz", + "integrity": "sha512-fSx4qAd5q1NPjpJv7qobwYgLud7HDgwX1DJsRgERmouS333AJOl904oRLwZqHcjKqaZFeuVm6WCWC7nOKeXU1g==", + "requires": { + "hosted-git-info": "^3.0.8", + "js-yaml": "^4.1.0", + "kleur": "^4.1.4", + "meow": "^9.0.0", + "mime": "^2.5.2", + "node-fetch": "^2.6.5", + "prettier": "^2.4.1", + "slash": "^3.0.0", + "tiny-glob": "^0.2.9" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "hosted-git-info": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "kleur": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.4.tgz", + "integrity": "sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA==" + }, + "meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "requires": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + } + } + } + }, "optimism": { "version": "0.16.1", "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.16.1.tgz", @@ -7331,7 +7654,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, "requires": { "p-try": "^2.0.0" } @@ -7340,7 +7662,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, "requires": { "p-limit": "^2.2.0" } @@ -7348,8 +7669,7 @@ "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "parent-module": { "version": "1.0.1", @@ -7364,7 +7684,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -7390,8 +7709,7 @@ "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, "path-is-absolute": { "version": "1.0.1", @@ -7408,8 +7726,7 @@ "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "path-type": { "version": "4.0.0", @@ -7525,8 +7842,7 @@ "prettier": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", - "dev": true + "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==" }, "prettier-linter-helpers": { "version": "1.0.0", @@ -7630,8 +7946,7 @@ "quick-lru": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==" }, "raf": { "version": "3.4.1", @@ -7678,6 +7993,16 @@ } } }, + "react": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -7687,7 +8012,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, "requires": { "@types/normalize-package-data": "^2.4.0", "normalize-package-data": "^2.5.0", @@ -7698,14 +8022,12 @@ "hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -7716,14 +8038,12 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "type-fest": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==" } } }, @@ -7731,7 +8051,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, "requires": { "find-up": "^4.1.0", "read-pkg": "^5.2.0", @@ -7741,8 +8060,7 @@ "type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -7761,7 +8079,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, "requires": { "indent-string": "^4.0.0", "strip-indent": "^3.0.0" @@ -7805,7 +8122,6 @@ "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, "requires": { "is-core-module": "^2.2.0", "path-parse": "^1.0.6" @@ -7935,7 +8251,6 @@ "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, "requires": { "lru-cache": "^6.0.0" } @@ -7986,8 +8301,7 @@ "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" }, "slice-ansi": { "version": "4.0.0", @@ -8020,7 +8334,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -8029,14 +8342,12 @@ "spdx-exceptions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" }, "spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -8045,8 +8356,7 @@ "spdx-license-ids": { "version": "3.0.11", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", - "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", - "dev": true + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" }, "split": { "version": "1.0.1", @@ -8326,7 +8636,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, "requires": { "min-indent": "^1.0.0" } @@ -8449,6 +8758,15 @@ "readable-stream": "3" } }, + "tiny-glob": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", + "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", + "requires": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -8489,11 +8807,15 @@ } } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, "trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", - "dev": true + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==" }, "ts-invariant": { "version": "0.4.4", @@ -8602,8 +8924,7 @@ "type-fest": { "version": "0.18.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", - "dev": true + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==" }, "typedarray": { "version": "0.0.6", @@ -8701,12 +9022,16 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, + "validator": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", + "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==" + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -8734,6 +9059,11 @@ "makeerror": "1.0.12" } }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, "whatwg-encoding": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", @@ -8749,6 +9079,15 @@ "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", "dev": true }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -8845,8 +9184,7 @@ "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "yaml": { "version": "1.10.2", @@ -8872,8 +9210,7 @@ "yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" }, "yn": { "version": "3.1.1", @@ -8887,6 +9224,25 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true }, + "z-schema": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.2.tgz", + "integrity": "sha512-40TH47ukMHq5HrzkeVE40Ad7eIDKaRV2b+Qpi2prLc9X9eFJFzV7tMe5aH12e6avaSS/u5l653EQOv+J9PirPw==", + "requires": { + "commander": "^2.7.1", + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^13.7.0" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "optional": true + } + } + }, "zen-observable": { "version": "0.8.15", "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", diff --git a/package.json b/package.json index 37dff39..bd03d21 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,34 @@ "bugs": { "url": "https://github.com/nrccua/apollo-rest-utils/issues" }, + "dependencies": { + "@apidevtools/swagger-parser": "10.0.3", + "@apollo/client": "3.4.17", + "apollo-link": "1.2.14", + "apollo-link-rest": "0.7.3", + "graphql": "15.7.2", + "graphql-anywhere": "4.2.7", + "lodash": "4.17.21", + "openapi-types": "9.3.1", + "openapi-typescript": "4.4.0", + "qs": "6.10.1" + }, "description": "A helper package that makes connecting apollo to rest endpoints as painless as possible", "devDependencies": { "@encoura/eslint-config": "git+https://github.com/nrccua/eslint-config.git", + "@types/jest": "27.0.3", + "@types/lodash": "4.14.177", + "@types/react": "17.0.35", + "babel-plugin-root-import": "5.1.0", + "babel-plugin-transform-imports": "2.0.0", + "eslint-import-resolver-babel-plugin-root-import": "1.1.1", + "eslint-plugin-react": "7.27.1", "husky": "7.0.4", "jest": "27.3.1", "lint-staged": "12.0.3", "npm-run-all": "4.1.5", "prettier": "2.4.1", + "react": "17.0.2", "standard-version": "9.3.2", "ts-jest": "27.0.7", "typescript": "4.5.2" @@ -23,24 +43,26 @@ "graphql" ], "license": "MIT", - "main": "index.js", + "main": "dist/generateRoutes/index.js", "name": "apollo-rest-utils", "repository": { "type": "git", "url": "git+https://github.com/nrccua/apollo-rest-utils.git" }, "scripts": { + "build": "npm run clean && tsc lib/**/*.ts --excludeFiles lib/**/*.test.ts --outDir dist --esModuleInterop --declaration", + "clean": "rm -rf dist", + "clean:full": "npm run clean && rm -rf node_modules", + "postinstall": "npm run build", "prepare": "husky install && git config --local push.followTags true", - "test": "echo \"Error: no test specified\" && exit 1", + "test": "npm-run-all test:**", + "test:lint:js": "eslint . --ext .js --fix --quiet", + "test:lint:md": "markdownlint README.md --config node_modules/@actinc/eslint-config/markdownlint.config.json", + "test:lint:ts": "eslint . --ext .ts --fix", + "test:prettier": "prettier --write './**/*.js' './**/*.ts'", + "test:types": "tsc --project ./tsconfig.json --noEmit", + "test:unit": "NODE_ENV=test jest --silent --coverage", "update:version": "standard-version" }, - "version": "1.0.0", - "dependencies": { - "@apollo/client": "3.4.17", - "apollo-link": "1.2.14", - "apollo-link-rest": "0.7.3", - "graphql": "15.7.2", - "graphql-anywhere": "4.2.7", - "qs": "6.10.1" - } + "version": "1.0.0" } diff --git a/test/test_data/generateRoutes/EncouraApiSwagger2WithRefs.json b/test/test_data/generateRoutes/EncouraApiSwagger2WithRefs.json new file mode 100644 index 0000000..94701a5 --- /dev/null +++ b/test/test_data/generateRoutes/EncouraApiSwagger2WithRefs.json @@ -0,0 +1,15089 @@ +{ + "swagger": "2.0", + "info": { + "version": "2.2.4", + "title": "Data Lab Service API", + "termsOfService": "", + "contact": { + "email": "support@encoura.org" + }, + "description": "\"API end points to be used for Data Lab application\"\n" + }, + "host": "api.dev-datalab.nrccua.org", + "basePath": "/v1", + "tags": [ + { + "name": "Authorization", + "description": "Authorization" + }, + { + "name": "User", + "description": "User" + }, + { + "name": "Organization", + "description": "Organization" + }, + { + "name": "Ticket", + "description": "Ticket" + }, + { + "name": "Logger", + "description": "Logger" + }, + { + "name": "Files", + "description": "Upload Legacy or Enrollment Files" + }, + { + "name": "Restricted Files", + "description": "Restricted Files" + }, + { + "name": "Enrollment Lens", + "description": "Enrollment Lens visualization charts" + }, + { + "name": "CollegeProfile", + "description": "College Profile Editor" + }, + { + "name": "Searches", + "description": "Searches" + }, + { + "name": "Tags", + "description": "Tags" + }, + { + "name": "Filters", + "description": "Filters" + }, + { + "name": "LRO", + "description": "Long Run Operations" + }, + { + "name": "Carts", + "description": "Carts" + }, + { + "name": "PurchaseGroups", + "description": "Purchase Groups" + }, + { + "name": "Orders", + "description": "Orders" + }, + { + "name": "Payment", + "description": "Payment Profile" + }, + { + "name": "Fulfillment", + "description": "Fulfillments" + }, + { + "name": "Delivery", + "description": "Deliveries" + }, + { + "name": "ContractVolume", + "description": "Contract Volume" + }, + { + "name": "Product", + "description": "Products" + }, + { + "name": "FulfillmentSchedule", + "description": "FulfillmentSchedule" + }, + { + "name": "Researches", + "description": "Research Library" + }, + { + "name": "AOS", + "description": "AOS" + }, + { + "name": "ScoreReporter", + "description": "Student Score Reports" + }, + { + "name": "Exports", + "description": "Exports" + }, + { + "name": "StudentCredentials", + "description": "Student Credentials" + } + ], + "schemes": [ + "http", + "https" + ], + "securityDefinitions": { + "JWT": { + "description": "For accessing the API a valid JWT token must be passed in all the queries in the 'Authorization' header.\n\n\nA valid JWT token is generated by the API and returned as answer of a call to the route /authenticate giving a valid user & password.\n\n\nThe following syntax must be used in the 'Authorization' header :\n\n JWT xxxxxx.yyyyyyy.zzzzzz\n", + "type": "apiKey", + "name": "Authorization", + "in": "header" + }, + "AWS": { + "description": "AWS API Key for development enviroment\n", + "type": "apiKey", + "name": "x-api-key", + "in": "header" + }, + "Organization": { + "description": "Organization UID\n", + "type": "apiKey", + "name": "Organization", + "in": "header" + } + }, + "paths": { + "/login": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "login", + "security": [ + { + "AWS": [] + } + ], + "summary": "Authenticates user", + "description": "Authenticates user", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "userName and password to be used in the authentication process & acceptedTerms flag if the user is authenticating by accepting terms", + "required": true, + "schema": { + "type": "object", + "properties": { + "userName": { + "type": "string", + "example": "Sample University-0" + }, + "password": { + "type": "string", + "example": "password" + }, + "acceptedTerms": { + "type": "boolean", + "example": true + } + } + } + } + ], + "responses": { + "200": { + "description": "User authenticated", + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User" + }, + "userName": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "status": { + "type": "string", + "example": "Active" + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "name": { + "type": "string", + "example": "Sample University" + }, + "fice": { + "type": "string", + "example": "SAMPLE" + }, + "stateCode": { + "type": "string", + "example": "MO" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "sessionToken": { + "type": "string", + "example": "Base64 string" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/refresh-token": { + "get": { + "tags": [ + "Authorization" + ], + "operationId": "refresh-token", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Refresh JWT", + "description": "Return a new Json Web Token with a refreshed expiration time", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "JWT successfully refreshed", + "schema": { + "type": "object", + "properties": { + "sessionToken": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/activate-user": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "activateUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Activate user", + "description": "Verifies user e-mail and if e-mail is valid, activate user and set userName and passname as provided on body if the terms were accepted.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Body contains the user e-mail to be verified and the verificationCode, which corresponds to the authToken in the user model; the userName to be set; the password; and user uid.", + "required": true, + "schema": { + "$ref": "#/definitions/ActivateUserRequest" + } + } + ], + "responses": { + "200": { + "description": "User successfully verified", + "schema": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "message": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/forgot-password": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "forgotPassword", + "security": [ + { + "AWS": [] + } + ], + "summary": "Send forgot password e-mail", + "description": "Requests a password change. An e-mail with instructions on how to change the password will be sent to the configured user e-mail\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "Send-Email", + "in": "header", + "description": "Indicates whether an actual email should be sent or not. For security reasons the default behavior is to not send any email.\n", + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + }, + { + "name": "body", + "in": "body", + "description": "Body should have the e-mail or userName of the user that forgot his password", + "required": true, + "schema": { + "$ref": "#/definitions/ForgotPasswordRequest" + } + } + ], + "responses": { + "200": { + "description": "E-mail with password change information sent successfully", + "schema": { + "$ref": "#/definitions/PasswordResponse" + } + }, + "204": { + "description": "User not found" + } + } + } + }, + "/reset-password": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "resetPassword", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Changes user password", + "description": "Changes user password to a new password provided in the request body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Body must always contains the new password field. The uid or e-mail to identify the user is only necessary for LdapUsers trying to change some other user password, or for UMS users that are logged off, in this case it should also contains the verification code.\n", + "required": true, + "schema": { + "$ref": "#/definitions/ResetPasswordRequest" + } + } + ], + "responses": { + "200": { + "description": "Password successfully modified", + "schema": { + "$ref": "#/definitions/PasswordResponse" + } + }, + "204": { + "description": "User not found" + }, + "401": { + "description": "Info doesn't match" + } + } + } + }, + "/authorize-module/{moduleIndentifier}": { + "get": { + "tags": [ + "Authorization" + ], + "operationId": "checkModuleAuthorization", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Check authorization to module", + "description": "Check authorization to module by moduleIndentifier (it could be both uid or key)", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "moduleIndentifier", + "in": "path", + "description": "Module indentifier (can be uid or key)", + "required": true, + "type": "string" + }, + { + "name": "overwrites", + "in": "query", + "type": "string", + "enum": [ + true, + false + ], + "description": "Send it as 'true' to receive attibute overwrites. Default is false." + } + ], + "responses": { + "200": { + "description": "User has access to module", + "schema": { + "$ref": "#/definitions/Credentials" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/validate-email": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "validateEmail", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Validate Email", + "description": "Return a flag indicating if e-mails is valid (not used yet) or invalid.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Body must contain the e-mail to be validated, in other words, an e-mail that uniqueness will be verified.\n", + "required": true, + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "son.goku@capsule-corp.org" + } + } + } + } + ], + "responses": { + "200": { + "description": "Email validated", + "schema": { + "type": "object", + "properties": { + "isEmailUnique": { + "type": "boolean", + "example": true + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/validate-username": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "validateUsername", + "security": [ + { + "AWS": [] + } + ], + "summary": "Validate Email", + "description": "Return flags indicating if username is valid (not used yet) or invalid.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Body must contain the username to be validated", + "required": true, + "schema": { + "type": "object", + "properties": { + "userName": { + "type": "string", + "example": "son.goku" + } + } + } + } + ], + "responses": { + "200": { + "description": "Username validated", + "schema": { + "type": "object", + "properties": { + "isUsernameUnique": { + "type": "boolean", + "example": true + }, + "isUsernameValid": { + "type": "boolean", + "example": true + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users": { + "post": { + "tags": [ + "User" + ], + "operationId": "createUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Creates new user", + "description": "Creates a new User passing user data. Not all user model fields are required, check its description for reference. When making an user inactive, it also removes its Admin status\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "Send-Email", + "in": "header", + "description": "Indicates whether an actual email should be sent or not. For security reasons the default behavior is to not send any email.\n", + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + }, + { + "name": "body", + "in": "body", + "description": "Body is a JSON describing the user to be created", + "required": true, + "schema": { + "$ref": "#/definitions/CreateUserRequest" + } + } + ], + "responses": { + "201": { + "description": "User created successfuly", + "schema": { + "$ref": "#/definitions/CreateUserResponse" + } + }, + "400": { + "description": "Validation error" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "User" + ], + "operationId": "readUserList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Gets list of Users by Organization", + "description": "Gets a list of Users from Organization. Query parameters can be provided into the url to filter the returned users\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "status", + "in": "query", + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ], + "description": "User status Check \"Try it out\" for possible options, can user ',' to send multiple status" + }, + { + "name": "type", + "in": "query", + "description": "Filter users list by type Example: type=LdapUser (can user ',' to send multiple types)\n", + "type": "string" + }, + { + "name": "firstName", + "in": "query", + "type": "string", + "description": "Filter by user firstName" + }, + { + "name": "lastName", + "in": "query", + "type": "string", + "description": "Filter by user lastName" + }, + { + "name": "userName", + "in": "query", + "type": "string", + "description": "Filter by userName" + }, + { + "name": "email", + "in": "query", + "type": "string", + "description": "Filter by email" + }, + { + "name": "createdAt", + "in": "query", + "type": "string", + "description": "Filter by createdAt. Example 2020-03-26T17:16:46.872Z" + }, + { + "name": "verifiedDate", + "in": "query", + "type": "string", + "description": "Filter by verifiedDate. Example 2020-03-26T17:19:04.723Z" + }, + { + "name": "searchStr", + "in": "query", + "description": "Filter users list by searchStr Example: searchStr=Abbott This will get all users with Abbott at some important field (firstName, lastName, userName, etc ...)\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "An array of Users", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GetUsersResponse" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users/{userUid}": { + "get": { + "tags": [ + "User" + ], + "operationId": "readUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Finds user by UID", + "description": "Returns a single user by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/User" + } + }, + "204": { + "description": "No user found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "User" + ], + "operationId": "updateUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Updates an user", + "description": "Updates user identified by UID. Parameters to be updated are provided in the requested body and correspond to the fields described in user model. Valid user fields not shown in the model will be ignored in update (createAt, lastUpdated, ...) All parameters are optional, but at least one parameter must be provided in the request body for the request to succeed. The UID field can be provided but must match the one provided in path\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateUserRequest" + } + } + ], + "responses": { + "200": { + "description": "User update successfully", + "schema": { + "$ref": "#/definitions/User" + } + }, + "204": { + "description": "User not found" + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "User" + ], + "operationId": "deleteUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Deletes an user", + "description": "Sets an user as inactive in the database", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "User successfully deleted", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + } + }, + "204": { + "description": "User not found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users/{uid}/impersonate": { + "post": { + "tags": [ + "User" + ], + "operationId": "impersonateUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Impersonates a user", + "description": "Impersonates a user by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID of the user you want to impersonate", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Impersonation successful", + "schema": { + "$ref": "#/definitions/ImpersonateResponse" + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "delete": { + "tags": [ + "User" + ], + "operationId": "stopImpersonateUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Stops impersonating an user", + "description": "Stops impersonating an user by its UID and JWT payload. JWT should be the same as the one created in the POST impersonate route. An JWT obtained from the login route won't work on this route\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID of the user you want to stop impersonating (should match payload)", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Stopped impersonation successful", + "schema": { + "$ref": "#/definitions/AuthenticationResponse" + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + }, + "/users/{uid}/resend-email": { + "post": { + "tags": [ + "User" + ], + "operationId": "resendEmail", + "security": [ + { + "AWS": [] + } + ], + "summary": "Resend Email", + "description": "Sends an email to activate or invite a user again\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + } + ], + "responses": { + "201": { + "description": "E-mail sent successfully", + "schema": { + "$ref": "#/definitions/CreateUserResponse" + } + }, + "204": { + "description": "User not found" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/tableu/ticket": { + "get": { + "tags": [ + "Ticket" + ], + "operationId": "ticket", + "security": [ + { + "AWS": [] + } + ], + "summary": "Get a trusted Tableau Ticket", + "description": "Get a trusted Tableau Ticket. This endpoint is taken directly from Tableu server thtough AWS API Gateway.\n", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Trusted ticket successfully obtained", + "schema": { + "type": "object", + "properties": { + "ticket": { + "type": "string", + "example": "hah4nm3292kakxchf9" + } + } + } + } + } + } + }, + "/organizations": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrgList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets list of organization", + "description": "Gets a list of organizations Query parameters can be provided to filter the returned organizations\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "status", + "in": "query", + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "description": "Organization status Check \"Try it out\" for possible options" + }, + { + "name": "name", + "in": "query", + "description": "Filter organizations list by name Example: name=Org1|Org2 This will get all organizations with Org1 or Org2 as the name\n", + "type": "string" + }, + { + "name": "type", + "in": "query", + "description": "Filter organizations list by type Example: type=Business This will get all organizations with orgType field pointing to an organization named 'Business'\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "An array of Organizations", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GetOrganizationsResponse" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/organizations/{uid}": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrg", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Finds organization by UID", + "description": "Returns an organization by the provided UID, the organization will contain only the granted modules", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the organization to be returned", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "An Organization object", + "schema": { + "$ref": "#/definitions/GetOrganizationByIdResponse" + } + }, + "204": { + "description": "No organization found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Organization" + ], + "operationId": "updateOrg", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Updates an organization", + "description": "Updates organization identified by UID if your user is authorized to do that. Currently it is possible to update only the permissions.\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the organization to be updated", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateOrganizationRequest" + } + } + ], + "responses": { + "200": { + "description": "Organization update successfully", + "schema": { + "$ref": "#/definitions/GetOrganizationByIdResponse" + } + }, + "204": { + "description": "Organization not found" + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/organizations/cache/{uid}": { + "delete": { + "tags": [ + "Organization" + ], + "operationId": "clearOrgCacheDataForAllOpts", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Clear organization cache data", + "description": "Clear organization cache data for specific organization for all possible opts parameters\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Cache cleared" + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/attributes": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrgAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organization attributes", + "description": "Returns the attributes from an organization by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/attributes/keys": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrgAttributesKeys", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organization attributes keys", + "description": "Returns the keys from organization attributes", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes keys retrieved", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/attributes/keys/{key}": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrgAttributesByKey", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organization attributes by key", + "description": "Returns the attributes from an organization by its key", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/settings": { + "put": { + "tags": [ + "Organization" + ], + "operationId": "updateOrganizationSettings", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Update Organization settings", + "description": "Update a particular Organization settings for example an SuperScore delivery schedule", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body containing settings to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/OrganizationSettings" + } + } + ], + "responses": { + "200": { + "description": "The upserted Organization", + "schema": { + "$ref": "#/definitions/OrganizationSettings" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrganizationSettings", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Read Organization settings", + "description": "Read a particular Organization settings regarding SuperScore delivery schedule and sensitive information", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The Organization settings", + "schema": { + "$ref": "#/definitions/OrganizationSettings" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/colleges/{fice}/profiles": { + "get": { + "tags": [ + "CollegeProfile" + ], + "operationId": "readCollegeProfile", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Read College Profile", + "description": "Read a particular MyOption's College Profile by Fice", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fice", + "in": "path", + "description": "College Fice", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The College Profile", + "schema": { + "$ref": "#/definitions/CollegeProfile" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "patch": { + "tags": [ + "CollegeProfile" + ], + "operationId": "patchCollegeProfile", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Patch College Profile", + "description": "Patch (partial update) a particular MyOption's College Profile by Fice", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fice", + "in": "path", + "description": "College Fice", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body containing profile fields", + "required": true, + "schema": { + "$ref": "#/definitions/CollegeProfile" + } + } + ], + "responses": { + "200": { + "description": "The patched College Profile", + "schema": { + "$ref": "#/definitions/CollegeProfile" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/colleges/{fice}/profiles/images/urls": { + "post": { + "tags": [ + "CollegeProfile" + ], + "operationId": "createCollegeProfileImagePreSignedUrl", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Create a College Profile Pre Signed Url", + "description": "Create a College Profile Pre Signed Url", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fice", + "in": "path", + "description": "College Fice", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body containing image type", + "required": true, + "schema": { + "type": "object", + "properties": { + "imageType": { + "type": "string", + "example": "LOGO or MOBILE or BACKGROUND" + } + } + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "object", + "properties": { + "preSignedUrl": { + "type": "string", + "example": "https://media-myoptions-org.s3.amazonaws.com/development/schools/logos/810.png?AWSAccessKeyId=AKIA" + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/colleges/{fice}/profiles/images/invalidations": { + "post": { + "tags": [ + "CollegeProfile" + ], + "operationId": "createCollegeProfileImageInvalidation", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Create a College Profile Image Invalidation", + "description": "Create a College Profile Image Invalidation", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fice", + "in": "path", + "description": "College Fice", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body containing image type", + "required": true, + "schema": { + "type": "object", + "properties": { + "imageType": { + "type": "string", + "example": "LOGO or MOBILE or BACKGROUND" + } + } + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Invalidation successufully created" + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/searches": { + "post": { + "tags": [ + "Searches" + ], + "operationId": "createSearch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Creates a new search", + "description": "Creates a new ClassPlanner search connected with a specific organization\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "search content", + "required": true, + "schema": { + "$ref": "#/definitions/SearchRequest" + } + } + ], + "responses": { + "201": { + "description": "The created Search and a message of success", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "search": { + "$ref": "#/definitions/SearchResponse" + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "Searches" + ], + "operationId": "readSearchesList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Gets list of searches", + "description": "Gets a list of searches Query parameters can be provided to filter the returned searches. Regex can be passed in all string parameters (case insensitive).\nThe new searches are calculated according to the last time the enpoint was called.\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "title", + "in": "query", + "type": "string", + "description": "Search title" + }, + { + "name": "labels", + "in": "query", + "type": "string", + "description": "Any label that search could have" + }, + { + "name": "status", + "in": "query", + "type": "string", + "enum": [ + "Active", + "Disable" + ], + "description": "The search status" + }, + { + "name": "type", + "in": "query", + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ], + "description": "The search type" + }, + { + "name": "created.name", + "in": "query", + "type": "string", + "description": "The search creator's name" + }, + { + "name": "recommended", + "in": "query", + "type": "boolean", + "description": "Use true for recommended searches and false to saved searches, don't use if both searches are required" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "An array of Searches", + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible searches to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + }, + "last-access": { + "type": "integer", + "description": "Last access timestamp, should be send together with the limit and offset for subsequent requests" + }, + "new-searches": { + "type": "integer", + "description": "Total of new searches (excluding limit and offset)" + }, + "new-recommended-searches": { + "type": "integer", + "description": "Total of new searches - to be deprecated prefer to use new-searches instead" + }, + "new-saved-searches": { + "type": "integer", + "description": "Total of new searches - to be deprecated prefer to use new-searches instead" + } + }, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ListSearchResponse" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/searches/run-counts": { + "post": { + "tags": [ + "Searches" + ], + "operationId": "runCounts", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Run a counts query", + "description": "Run a big data counts query in background (LRO), the result needs to be pulled from another endpoint (if not cached).", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Run counts parameters, if 'type' is omitted from the body 'Prospect' will be used as default value. Possible values - Prospect, Legacy, Ematch or Declared", + "required": true, + "schema": { + "$ref": "#/definitions/RunCountsRequest" + } + } + ], + "responses": { + "200": { + "description": "The response will be always a LRO object, but sometimes it can have the result already (cached)", + "schema": { + "$ref": "#/definitions/LROCached" + } + }, + "202": { + "description": "The response will be always a LRO object, most of the time results won't be available instantly", + "schema": { + "$ref": "#/definitions/LRO" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/searches/run-deduplication": { + "post": { + "tags": [ + "Searches" + ], + "operationId": "runDeduplication", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Run a deduplication query", + "description": "Run a big data deduplication query in background (LRO), the result needs to be pulled from another endpoint (if not cached). Set dedupPrevious to true/false to deduplicate (or not) against previous orders. Default is 'false'. Set dedupGroup to true/false to deduplicate within the same purchase group. Default is 'false'.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "The Purchase Group that should be deduplicated", + "required": true, + "schema": { + "$ref": "#/definitions/DeduplicationRequest" + } + } + ], + "responses": { + "202": { + "description": "The response will be a LRO object", + "schema": { + "$ref": "#/definitions/LRO" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/searches/{uid}": { + "get": { + "tags": [ + "Searches" + ], + "operationId": "readSearch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Finds a ClassPlanner search by UID", + "description": "Returns a search by the provided UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the search to be returned", + "required": true, + "type": "string" + }, + { + "name": "upgrade", + "in": "query", + "type": "string", + "enum": [ + "true", + "false" + ], + "description": "Use this flag to retrieve an upgraded version of the search. Defaults to false" + } + ], + "responses": { + "200": { + "description": "An Search object", + "schema": { + "$ref": "#/definitions/SearchResponse" + } + }, + "204": { + "description": "No search found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "put": { + "tags": [ + "Searches" + ], + "operationId": "updateSearch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Update a ClassPlanner search by the provided UID", + "description": "Returns a search updated object\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the search to be updated", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "update content", + "required": true, + "schema": { + "$ref": "#/definitions/SearchRequest" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/SearchResponse" + } + }, + "204": { + "description": "No search found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "Searches" + ], + "operationId": "deleteSearch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Soft delete (change status as Disabled) a ClassPlanner search by the provided UID", + "description": "Returns a search updated object with status changed to Disabled. This will also delete any tags associated with the search that are not being used by any other searches.\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the search to be deleted", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/DeleteSearchResponse" + } + }, + "204": { + "description": "No search found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/searches/tags": { + "get": { + "tags": [ + "Tags" + ], + "operationId": "readTagsList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Gets list of tags", + "description": "Gets a list of tags. Query parameters can be provided to filter the returned tags.\n", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "An array of tags", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TagResponse" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/searches/{searchUid}/tags": { + "put": { + "tags": [ + "Tags" + ], + "operationId": "createTag", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Creates a new tag", + "description": "Creates a new Tag connected with a specific search\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "searchUid", + "in": "path", + "description": "Search uid", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Tag content", + "required": true, + "schema": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Tag label", + "example": "Tag 1" + }, + "type": { + "type": "string", + "enum": [ + "Recommended", + "Saved", + "Both" + ] + } + } + } + } + ], + "responses": { + "200": { + "description": "Returns the search updated with the new tag", + "schema": { + "$ref": "#/definitions/SearchResponse" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "Tags" + ], + "operationId": "deleteTag", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "deletes a new tag", + "description": "deletes a tag connected with a specific search\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "searchUid", + "in": "path", + "description": "Search uid", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Tag content", + "required": true, + "schema": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "Tag label", + "example": "Tag 2" + } + } + } + } + ], + "responses": { + "200": { + "description": "Tag successfully deleted from the search", + "schema": { + "$ref": "#/definitions/SearchResponse" + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/filters": { + "post": { + "tags": [ + "Filters" + ], + "operationId": "createFilter", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Creates a new filter", + "description": "Creates a new ClassPlanner filter\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "filter content", + "required": true, + "schema": { + "$ref": "#/definitions/FilterRequest" + } + } + ], + "responses": { + "201": { + "description": "The created Filter and a message of success", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "filter": { + "$ref": "#/definitions/FilterResponse" + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "Filters" + ], + "operationId": "readFiltersList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Gets list of filters", + "description": "Gets a list of filters. Query parameters can be provided to filter the returned filters. Regex can be passed in all string parameters (case insensitive).\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "displayName", + "in": "query", + "type": "string", + "description": "Filter display name" + }, + { + "name": "type", + "in": "query", + "type": "string", + "enum": [ + "range", + "list", + "singleSelect", + "bool" + ], + "description": "The filter type" + }, + { + "name": "searchTypes", + "in": "query", + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ], + "description": "The search type this filter can be associated to" + }, + { + "name": "overrideVersion", + "in": "query", + "type": "integer", + "description": "Use this to override the org classPlanner version" + }, + { + "name": "allowAll", + "in": "query", + "type": "boolean", + "description": "True or false, if filter has allow all option" + }, + { + "name": "top", + "in": "query", + "type": "boolean", + "description": "True or false, if filter is a top filter or not" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "An array of Filters", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/FilterResponse" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/filters/mappings": { + "get": { + "tags": [ + "Filters" + ], + "operationId": "readMappings", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Gets list of all mappings", + "description": "Get a full list of all available DB mappings", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "An array of mappings", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/SimpleMapping" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/filters/{uid}": { + "get": { + "tags": [ + "Filters" + ], + "operationId": "readFilter", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Finds a ClassPlanner filter by UID", + "description": "Returns a filter by the provided UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the filter to be returned", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "An Filter object", + "schema": { + "$ref": "#/definitions/FilterResponse" + } + }, + "204": { + "description": "No filter found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "put": { + "tags": [ + "Filters" + ], + "operationId": "updateFilter", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Update a ClassPlanner filter by the provided UID", + "description": "Returns a filter updated object\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the filter to be updated", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "update content", + "required": true, + "schema": { + "$ref": "#/definitions/FilterRequest" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/FilterResponse" + } + }, + "204": { + "description": "No filter found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "Filters" + ], + "operationId": "deleteFilter", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Delete a ClassPlanner filter by the provided UID", + "description": "Returns a message of success\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the filter to be deleted", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "success" + } + } + } + }, + "204": { + "description": "No filter found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/filters/{uid}/options": { + "get": { + "tags": [ + "Filters" + ], + "operationId": "readFilterOptions", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Finds all options of a ClassPlanner filter or all possible locations for a Geo filter.", + "description": "ClassPlanner filter: Returns a list of a filter's options.\nGeo filter: Returns a list of a filter's valid geo locations. (parameter: searchString)\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the filter", + "required": true, + "type": "string" + }, + { + "name": "searchString", + "in": "query", + "type": "string", + "description": "If the filter type is a Geo, this parameter returns a list of valid geo locations that include the searchString.\nExample: searchString='787'\nIf the filter type is not Geo, this parameter is ignored.\n" + } + ], + "responses": { + "200": { + "description": "An array of Filter options", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/FilterOptionsResponse" + } + } + }, + "204": { + "description": "No filter found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/filters/{uid}/options/{optionKey}": { + "get": { + "tags": [ + "Filters" + ], + "operationId": "readFilterOptionsByKey", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Finds a specific filter option", + "description": "Returns a option object", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the filter", + "required": true, + "type": "string" + }, + { + "name": "optionKey", + "in": "path", + "description": "Key of the specific option", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "An Filter option object", + "schema": { + "$ref": "#/definitions/FilterOptionsResponse" + } + }, + "204": { + "description": "No filter or option found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/filters/{uid}/mappings": { + "post": { + "tags": [ + "Filters" + ], + "operationId": "createFilterMapping", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Create a database mapping entity for a specific filter", + "description": "Returns the db mapping object", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the filter", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "mapping content", + "required": true, + "schema": { + "$ref": "#/definitions/MappingRequest" + } + } + ], + "responses": { + "200": { + "description": "A database mapping object", + "schema": { + "$ref": "#/definitions/MappingResponse" + } + }, + "204": { + "description": "No filter found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/classplanner/filters/{uid}/validate": { + "post": { + "tags": [ + "Filters" + ], + "operationId": "validateGeoFilterValues", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Validate an array of geo filter values for a specific filter.", + "description": "Returns an array of valid filter values and an array of invalid filter values.\nThe valid filter values are an object with key and displayName elements.\nIf the filter type is county, fips is also in the valid filter object.\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the filter", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "mapping content", + "required": true, + "schema": { + "$ref": "#/definitions/ValidateRequest" + } + } + ], + "responses": { + "200": { + "description": "A valid/invalid values object", + "schema": { + "$ref": "#/definitions/ValidateResponse" + } + }, + "204": { + "description": "No filter found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/lro/processes": { + "post": { + "tags": [ + "LRO" + ], + "operationId": "createLRO", + "security": [ + { + "AWS": [] + } + ], + "summary": "Create LRO process", + "description": "Create a new long run operation process that can be latter updated with the final result", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Body should contains only the callbackUrl field, this url will be used by the clients to fetch the completed LRO process.", + "required": true, + "schema": { + "$ref": "#/definitions/LRORequest" + } + } + ], + "responses": { + "200": { + "description": "LRO object successfully verified", + "schema": { + "$ref": "#/definitions/LRO" + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/lro/processes/{lroUid}": { + "get": { + "tags": [ + "LRO" + ], + "operationId": "getLRO", + "security": [ + { + "AWS": [] + } + ], + "summary": "Get a LRO process", + "description": "Retrieve a long run operation process", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "lroUid", + "in": "path", + "description": "UID of the LRO process to be returned", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "LRO object successfully retrieved", + "schema": { + "$ref": "#/definitions/LRO" + } + }, + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "put": { + "tags": [ + "LRO" + ], + "operationId": "updateLRO", + "security": [ + { + "AWS": [] + } + ], + "summary": "Updates a LRO process", + "description": "Updates a long run operation process with his final result", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "lroUid", + "in": "path", + "description": "UID of the LRO process to be returned", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body should contains either a result field or a error field, depending on what happened during the lon run operation process.", + "required": true, + "schema": { + "$ref": "#/definitions/LROUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "LRO object successfully updated", + "schema": { + "$ref": "#/definitions/LRO" + } + }, + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/carts": { + "get": { + "tags": [ + "Carts" + ], + "operationId": "readCart", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve Cart", + "description": "Retrieve the organization associated Cart", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "The organization Cart", + "headers": { + "total-count": { + "type": "integer", + "description": "Total of Purchase Groups in that Cart" + } + }, + "schema": { + "$ref": "#/definitions/CartFullResponse" + } + }, + "204": { + "description": "No cart found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "put": { + "tags": [ + "Carts" + ], + "operationId": "updateCart", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Creates or update a cart", + "description": "Create or update the organization associated cart", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "The cart content", + "required": true, + "schema": { + "$ref": "#/definitions/CartUpdateRequest" + } + } + ], + "responses": { + "200": { + "description": "The organization Cart", + "headers": { + "total-count": { + "type": "integer", + "description": "Total of Purchase Groups in that Cart" + } + }, + "schema": { + "$ref": "#/definitions/CartFullResponse" + } + }, + "204": { + "description": "No cart found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/carts/purchase-groups/{purchaseGroupUid}": { + "delete": { + "tags": [ + "Carts" + ], + "operationId": "deletePurchaseGroup", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Delete Purchase Group", + "description": "Remove a Purchase Group from the Cart and also delete it from Purchase Group collection", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "purchaseGroupUid", + "in": "path", + "description": "UID of the Purchase Group to be removed", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The organization Cart", + "headers": { + "total-count": { + "type": "integer", + "description": "Total of Purchase Groups in that Cart" + } + }, + "schema": { + "$ref": "#/definitions/CartFullResponse" + } + }, + "204": { + "description": "No cart or purchase group found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/purchase-groups": { + "post": { + "tags": [ + "PurchaseGroups" + ], + "operationId": "createPurchaseGroup", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Create Purchase Group", + "description": "Create or update a Purchase Group including all Purchased Items", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Purchase Group content", + "required": true, + "schema": { + "$ref": "#/definitions/PurchaseGroupRequest" + } + } + ], + "responses": { + "201": { + "description": "A Purchase Group object", + "schema": { + "type": "object", + "properties": { + "purchaseGroup": { + "$ref": "#/definitions/PurchaseGroup" + }, + "message": { + "type": "string", + "example": "Success" + } + } + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/purchase-groups/{uid}": { + "put": { + "tags": [ + "PurchaseGroups" + ], + "operationId": "updatePurchaseGroup", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Update Purchase Group", + "description": "Updates a Purchase Group including all Purchased Items", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the Purchase Group to be updated", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Purchase Group content", + "required": true, + "schema": { + "$ref": "#/definitions/PurchaseGroupRequest" + } + } + ], + "responses": { + "200": { + "description": "A Purchase Group object", + "schema": { + "$ref": "#/definitions/PurchaseGroup" + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "PurchaseGroups" + ], + "operationId": "readPurchaseGroup", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Get Purchase Group by uid", + "description": "Get Purchase Group by uid", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Purchase Group UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Purchase Group successfully retrived", + "schema": { + "$ref": "#/definitions/PurchaseGroup" + } + }, + "204": { + "description": "No purchase group found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "PurchaseGroups" + ], + "operationId": "deletePurchaseGroupById", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Deletes a Purchase Group", + "description": "Remove a Purchase Group from its collection", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the Purchase Group to be removed", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success Message", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + } + }, + "204": { + "description": "No purchase group found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/purchase-groups/{uid}/fulfillment-schedules": { + "post": { + "tags": [ + "FulfillmentSchedule", + "PurchaseGroups" + ], + "operationId": "createFulfillmentSchedule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Create a new fulfillment schedule", + "description": "Create a new fulfillment schedule.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "required": true, + "type": "string", + "description": "UID of the Purchase Group to assign fulfillment schedule" + }, + { + "name": "body", + "in": "body", + "description": "Fulfillment schedule to be created", + "required": true, + "schema": { + "$ref": "#/definitions/FulfillmentSchedule" + } + } + ], + "responses": { + "200": { + "description": "Fulfillment schedule successfully created", + "schema": { + "$ref": "#/definitions/FulfillmentSchedule" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/purchase-groups/{uid}/fulfillment-schedules/{fulfillmentScheduleUid}": { + "put": { + "tags": [ + "FulfillmentSchedule", + "PurchaseGroups" + ], + "operationId": "updateFulfillmentSchedule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Update an existing fulfillment schedule", + "description": "Update an existing fulfillment schedule.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "required": true, + "type": "string", + "description": "UID of the Purchase Group" + }, + { + "name": "fulfillmentScheduleUid", + "in": "path", + "required": true, + "type": "string", + "description": "UID of the Fulfillment Schedule to update" + }, + { + "name": "body", + "in": "body", + "description": "Fulfillment schedule updates", + "required": true, + "schema": { + "$ref": "#/definitions/FulfillmentSchedule" + } + } + ], + "responses": { + "200": { + "description": "Fulfillment schedule successfully updated", + "schema": { + "$ref": "#/definitions/FulfillmentSchedule" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/purchase-groups/{uid}/searches/filters": { + "get": { + "tags": [ + "PurchaseGroups" + ], + "operationId": "readSearchFilters", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Get Purchase Group search filters by uid", + "description": "Get Purchase Group search filters by uid", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Purchase Group UID", + "required": true, + "type": "string" + }, + { + "name": "searchUid", + "in": "query", + "description": "Search UID", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Purchase items containing search filters", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PurchaseItem" + } + } + }, + "204": { + "description": "No purchase group found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/purchase-groups/searches/filters": { + "post": { + "tags": [ + "PurchaseGroups" + ], + "operationId": "getSearchInfo", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Get Purchase Group search filters by uid", + "description": "Get Purchase Group search filters by uid", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Purchase group UIDs for bulk search", + "required": true, + "schema": { + "$ref": "#/definitions/GetSearchInfoRequest" + } + } + ], + "responses": { + "200": { + "description": "Purchase items containing search filters", + "schema": { + "$ref": "#/definitions/GetSearchInfoResponse" + } + }, + "204": { + "description": "No purchase group found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/orders": { + "get": { + "tags": [ + "Orders" + ], + "operationId": "readOrders", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve Orders", + "description": "Retrieve Orders in the Cart, the result will be an array of orders. If the user type of JWT is a LdapUser, this route will retrieve Orders from all organizations, unless a organizations query parameter is passed. The organizations query parameter is ignored if it is not a LdapUser and only orders from the organization uid passed in the header will be retrieved.\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "status", + "in": "query", + "type": "string", + "enum": [ + "Pending", + "Approved", + "Rejected", + "Purchased" + ], + "description": "Order status Check \"Try it out\" for possible options. Altough in this documentation you can only select one, when using the route you can select multiple status separating them with a comma (','). Caution as passing an invalid status will return an empty array, not throw an error!\n" + }, + { + "name": "purchasedDate", + "in": "query", + "type": "string", + "description": "Can receive an date function and arguments eg':' purchasedDate=between(1501684404478, 150178224499)" + }, + { + "name": "purchaseGroupsUids", + "in": "query", + "type": "string", + "description": "Filter by Purchase Group Uids Example: purchaseGroupsUids=purchaseGroupUid1,purchaseGroupUid2 This will get all Orders for the organizations with purchaseGroups uids purchaseGroupUid1 or purchaseGroupUid2.\n" + }, + { + "name": "approvedDate", + "in": "query", + "type": "string", + "description": "Can receive an date function and arguments eg':' approvedDate=between(1501684404478, 150178224499)" + }, + { + "name": "organizations", + "in": "query", + "description": "Filter organizations by uids Example: organizations=OrgUid1,OrgUid2 This will get all Orders for the organizations with organizations uids OrgUid1 or OrgUid2. This query only works for LdapUsers\n", + "type": "string" + }, + { + "name": "type", + "in": "query", + "type": "string", + "description": "Order type (eg':' platform, platform fulfillment, standard)" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + }, + { + "name": "containingOrderUid", + "in": "query", + "type": "string", + "description": "Searches for the order with matching orderUid and then finds the page that the order resides and returns an array of orders that make up that page. If this parameter is used, the limit parameter is required and the offset parameter is ignored. If an order that matches this parameter is not found, an array of orders that satisfies the rest of the parameters will be returned.\n" + }, + { + "name": "includePurchaseGroups", + "in": "query", + "type": "boolean", + "description": "If set to true it will do the purchase group aggregation using the lookup aggregation from mongo instead of performing a separate call.\n" + }, + { + "name": "includeAddons", + "in": "query", + "type": "boolean", + "description": "If set to true it will additionally return addons along with the standard purchase group purchase items\n" + }, + { + "name": "importedFromSf", + "in": "query", + "type": "boolean", + "description": "True if order was created as a result of an order import" + } + ], + "responses": { + "200": { + "description": "An array of Orders", + "headers": { + "total-orders": { + "type": "integer", + "description": "Total of orders to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + }, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/FullOrder" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "post": { + "tags": [ + "Orders" + ], + "operationId": "createOrder", + "security": [ + { + "AWS": [] + } + ], + "summary": "Creates new order", + "description": "Creates new order", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Order data (Obs. uid shouldn't be passed on creation). The purchaseGroups array must contains at least one purchaseGroupUid.", + "required": true, + "schema": { + "$ref": "#/definitions/Order" + } + } + ], + "responses": { + "201": { + "description": "Order successfully created", + "schema": { + "type": "object", + "properties": { + "order": { + "$ref": "#/definitions/FullOrder" + }, + "message": { + "type": "string", + "example": "Success" + } + } + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/orders/{orderUid}": { + "put": { + "tags": [ + "Orders" + ], + "operationId": "updateOrder", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Updates an order status", + "description": "Updates an order status", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "orderUid", + "in": "path", + "description": "Order UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Order status. If status equals Rejected, an feedback object is also allowed", + "required": true, + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "Pending", + "Approved", + "Rejected", + "Purchased", + "Failed" + ], + "example": "Pending" + }, + "rejectedFeedback": { + "type": "object" + }, + "organizationUid": { + "type": "string", + "description": "Organization UID" + }, + "sfOpportunityNumber": { + "type": "string", + "description": "Salesforce Opportunity Id", + "example": "SO-0000056815" + }, + "additionalSfOpportunityNumbers": { + "type": "array", + "items": { + "type": "string", + "description": "Salesforce Opportunity Id", + "example": "SO-0000056815" + } + }, + "paymentProfiles": { + "type": "array", + "items": { + "$ref": "#/definitions/PaymentProfile" + } + }, + "sfStatus": { + "type": "string", + "enum": [ + "Pending", + "Processing", + "Complete" + ], + "example": "Pending" + } + } + } + } + ], + "responses": { + "201": { + "description": "Order successfully updated", + "schema": { + "$ref": "#/definitions/FullOrder" + } + }, + "204": { + "description": "No order found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "Orders" + ], + "operationId": "readOrder", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Get order by uid", + "description": "Get order by uid", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "orderUid", + "in": "path", + "description": "Order UID", + "required": true, + "type": "string" + }, + { + "name": "includeAddons", + "in": "query", + "type": "boolean", + "description": "If set to true it will additionally return addons along with the standard purchase group purchase items\n" + }, + { + "name": "includeSurveyData", + "in": "query", + "type": "boolean", + "description": "If set to true it will additionally return the surveySupported boolean key/value pair\n" + } + ], + "responses": { + "200": { + "description": "Order successfully retrived", + "schema": { + "$ref": "#/definitions/FullOrder" + } + }, + "204": { + "description": "No order found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/orders/{orderUid}/order-summary": { + "get": { + "tags": [ + "Orders" + ], + "operationId": "orderSummary", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Get signed S3 url for order summary PDF by order uid", + "description": "Get signed S3 url for order summary PDF by order uid", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "orderUid", + "in": "path", + "description": "Order UID", + "required": true, + "type": "string" + }, + { + "name": "timezone", + "in": "query", + "type": "string", + "description": "The requester timezone in order to generate the PDF with the correct date. If this is not sent, the default it to UTC.\n" + } + ], + "responses": { + "200": { + "description": "Signed Url successfully retrieved" + }, + "204": { + "description": "No order found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/orders/{orderUid}/copy-searches": { + "post": { + "tags": [ + "Orders" + ], + "operationId": "copySearches", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Copies searches from an existing purchased order", + "description": "Copies searches from an existing purchased order", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "orderUid", + "in": "path", + "description": "Order UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Copy search data", + "required": true, + "schema": { + "$ref": "#/definitions/CopySearchesRequest" + } + } + ], + "responses": { + "200": { + "description": "Copied searches by purchase item UID", + "schema": { + "type": "object", + "example": { + "820d4668-7d99-4f97-8194-f18d9945ebc0": { + "uid": "1ad1c27d-d298-4e26-827d-c9e3369d3452", + "title": "My Copied Search", + "type": "Prospect", + "status": "Active", + "classPlannerVersion": 2, + "maxVolume": 0, + "recommended": true, + "estimate": false + } + } + } + }, + "204": { + "description": "No order found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/orders/organizations": { + "get": { + "tags": [ + "Orders" + ], + "operationId": "readOrganizations", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve Organizations of the orders in given parameters", + "description": "Retrieve Organizations of the orders that would be returned given parameters, the result will be an array with organizationsUids, and organizationsNames. Is the same as get orders but we aggregate the result by organizations.\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "status", + "in": "query", + "type": "string", + "enum": [ + "Pending", + "Approved", + "Rejected", + "Purchased" + ], + "description": "Order status Check \"Try it out\" for possible options. Altough in this documentation you can only select one, when using the route you can select multiple status separating them with a comma (','). Caution as passing an invalid status will return an empty array, not throw an error!\n" + }, + { + "name": "purchasedDate", + "in": "query", + "type": "string", + "description": "Can receive an date function and arguments eg':' purchasedDate=between(1501684404478, 150178224499)" + }, + { + "name": "approvedDate", + "in": "query", + "type": "string", + "description": "Can receive an date function and arguments eg':' approvedDate=between(1501684404478, 150178224499)" + }, + { + "name": "organizations", + "in": "query", + "description": "Filter organizations by uids Example: organizations=OrgUid1,OrgUid2 This will get all Orders for the organizations with organizations uids OrgUid1 or OrgUid2. This query only works for LdapUsers\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "An array of organizationNames and organizationsUid", + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "organizationName": { + "type": "string", + "example": "Sample University" + }, + "organizationUid": { + "type": "string", + "example": "e6a3272e-6b34-4de9-991c-4d7d6125acbc" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/payment-profiles": { + "post": { + "tags": [ + "Payment" + ], + "operationId": "createPaymentProfiles", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Create payment profile", + "description": "Create an organization payment profile. You can pass only a card or a bank account by request", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Payment profile", + "required": true, + "schema": { + "$ref": "#/definitions/CreatePaymentProfileRequest" + } + } + ], + "responses": { + "201": { + "description": "Payment Profiles created successfully", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "paymentProfile": { + "$ref": "#/definitions/PaymentProfile" + } + } + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "Payment" + ], + "operationId": "readPaymentProfiles", + "summary": "Retrieve payment profiles from an organization", + "description": "Retrieve how many all payment profiles from an organization", + "responses": { + "200": { + "description": "Payment Profiles returned successfully", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PaymentProfile" + } + } + }, + "204": { + "description": "No cart found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/payment-profiles/{externalPaymentProfileUid}": { + "delete": { + "tags": [ + "Payment" + ], + "operationId": "deletePaymentProfile", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Delete Payment Profile", + "description": "Remove a Payment Profile from organization", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "externalPaymentProfileUid", + "in": "path", + "description": "Payment Profile uid", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success Message", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "No payment profile found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/products": { + "post": { + "tags": [ + "Product" + ], + "operationId": "createProduct", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Create a new product", + "description": "Create a new product. It will be latter used to generate a purchase item. This endpoint can be only used by internal users.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Product data", + "required": true, + "schema": { + "$ref": "#/definitions/CreateProductRequest" + } + } + ], + "responses": { + "201": { + "description": "Product successfully created", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "product": { + "$ref": "#/definitions/Product" + } + } + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "Product" + ], + "operationId": "readProducts", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve a list of products", + "description": "Retrieve a list of products.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "query", + "type": "string", + "description": "Use to restrict products by a specific name" + }, + { + "name": "type", + "in": "query", + "type": "string", + "enum": [ + "Search", + "Module", + "Service" + ], + "description": "Use to restrict products by a specific type" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "Product list successfully retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Product" + } + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/products/{productUid}": { + "get": { + "tags": [ + "Product" + ], + "operationId": "readProduct", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Read a product by uid", + "description": "Retrieve a product by a provided uid. Product Name or Product Key can be also used.", + "parameters": [ + { + "name": "productUid", + "in": "path", + "description": "Product uid", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Product successfully retrieved", + "schema": { + "$ref": "#/definitions/Product" + } + }, + "204": { + "description": "No product found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "put": { + "tags": [ + "Product" + ], + "operationId": "updateProduct", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Update a product by uid", + "description": "Update a product by a provided uid. This endpoint can be only used by internal users.", + "parameters": [ + { + "name": "productUid", + "in": "path", + "description": "Product uid", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Product data", + "required": true, + "schema": { + "$ref": "#/definitions/CreateProductRequest" + } + } + ], + "responses": { + "200": { + "description": "Product successfully updated", + "schema": { + "$ref": "#/definitions/Product" + } + }, + "204": { + "description": "No product found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "Product" + ], + "operationId": "deleteProduct", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Delete a product by uid", + "description": "Delete a product by a provided uid. This endpoint can be only used by internal users.", + "parameters": [ + { + "name": "productUid", + "in": "path", + "description": "Product uid", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success Message", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + } + }, + "204": { + "description": "No product found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/fulfillments": { + "post": { + "tags": [ + "Fulfillment" + ], + "operationId": "createFulfillment", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Create a new Fulfillment", + "description": "Create a new Fulfillment it can be either a standalone or a order based fulfillment", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Fulfillment data", + "required": true, + "schema": { + "$ref": "#/definitions/CreateFulfillmentRequest" + } + } + ], + "responses": { + "201": { + "description": "Fulfillment successfully created", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "fulfillment": { + "$ref": "#/definitions/Fulfillment" + } + } + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "Fulfillment" + ], + "operationId": "readFulfillments", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve a list of fulfillments", + "description": "Retrieve a list of fulfillments.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fice", + "in": "query", + "type": "string", + "description": "Use to restrict fulfillments by a specific fice. Example fice=001024,001025" + }, + { + "name": "organizationUid", + "in": "query", + "type": "string", + "description": "Use to restrict fulfillments by a specific organizationUid. Example organizationUid=976e6288-5960-4c8d-b53e-17b4f6892480" + }, + { + "name": "orderUid", + "in": "query", + "type": "string", + "description": "Use to restrict fulfillments by a specific orderUid. Example orderUid=976e6288-5960-4c8d-b53e-17b4f6892480" + }, + { + "name": "purchaseGroupUid", + "in": "query", + "type": "string", + "description": "Use to restrict fulfillments by a specific purchaseGroupUid. Example purchaseGroupUid=976e6288-5960-4c8d-b53e-17b4f6892480" + }, + { + "name": "listPath", + "in": "query", + "type": "string", + "description": "Use to restrict fulfillments by a specific listPath. Example listPath=976e6288-5960-4c8d-b53e-17b4f6892480" + }, + { + "name": "status", + "in": "query", + "type": "string", + "enum": [ + "Processing", + "Delivered", + "Complete" + ], + "description": "Use to restrict fulfillments by a status. Example status=Processing,Delivered" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + }, + { + "name": "includeAddons", + "in": "query", + "type": "boolean", + "description": "Use to restrict fulfillments Purchase Items to include or not addons Purchase Items" + }, + { + "name": "includeOrders", + "in": "query", + "type": "boolean", + "description": "Use to retrieve fulfillments with its respective orders. PS: When this param is true the return of the method will be changed, instead of an array, it will return an object with two keys { fulfillments, orders }." + }, + { + "name": "fromDate", + "in": "query", + "type": "number", + "description": "Use to restrict fulfillments by creation date, starting on the passed. Example fromDate=1550085524933" + }, + { + "name": "toDate", + "in": "query", + "type": "number", + "description": "Use to restrict fulfillments by creation date, it should be used along with the fromDate. Example fromDate=1550085524933" + }, + { + "name": "search", + "in": "query", + "type": "string", + "description": "Use to restrict fulfillments based on a search string. Will search a match on sfOpportunityNumber, createdBy or productKey. Example search=prospect" + }, + { + "name": "productKey", + "in": "query", + "type": "string", + "description": "Use to restrict fulfillments by productKey. Example productKey=classplanner.aos" + }, + { + "name": "sortBy", + "in": "query", + "type": "string", + "description": "Use to sort the results based on the fulfillment properties. Example sortBy=created.createdAt" + }, + { + "name": "sortDirection", + "in": "query", + "type": "string", + "description": "Use to change the sort direction, can be desc or asc. It should be used along with sortBy. Example sortDirection=desc" + } + ], + "responses": { + "200": { + "description": "Fulfillment list successfully retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Fulfillment" + } + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/fulfillments/total": { + "get": { + "tags": [ + "Fulfillment" + ], + "operationId": "readFulfillmentsTotal", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve the total of fulfillments by criteria", + "description": "Retrieve the total of fulfillments by criteria.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "disconsiderExpired", + "in": "query", + "type": "boolean", + "description": "Excludes expired fulfillments from count", + "default": true + }, + { + "name": "disconsiderExported", + "in": "query", + "type": "boolean", + "description": "Excludes fulfillments already exported from count", + "default": true + }, + { + "name": "listGenerated", + "in": "query", + "type": "boolean", + "description": "Source information already generated", + "default": true + } + ], + "responses": { + "200": { + "description": "Total of Fulfillment retrieved", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "example": 10 + } + } + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/fulfillments/{fulfillmentUid}": { + "get": { + "tags": [ + "Fulfillment" + ], + "operationId": "readFulfillment", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Read a fulfillment by uid", + "description": "Retrieve a fulfillment by a provided uid.", + "parameters": [ + { + "name": "fulfillmentUid", + "in": "path", + "description": "Fulfillment uid", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Fulfillment successfully retrieved", + "schema": { + "$ref": "#/definitions/Fulfillment" + } + }, + "204": { + "description": "No fulfillment found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "put": { + "tags": [ + "Fulfillment" + ], + "operationId": "updateFulfillment", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Update a fulfillment by uid", + "description": "Update a fulfillment by a provided uid.", + "parameters": [ + { + "name": "fulfillmentUid", + "in": "path", + "description": "Fulfillment uid", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fulfillment data", + "required": true, + "schema": { + "$ref": "#/definitions/FulfillmentRequest" + } + } + ], + "responses": { + "200": { + "description": "Fulfillment successfully updated", + "schema": { + "$ref": "#/definitions/Fulfillment" + } + }, + "204": { + "description": "No fulfillment found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/fulfillments/{fulfillmentUid}/deliveries": { + "post": { + "tags": [ + "Delivery" + ], + "operationId": "createDelivery", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Creates a new delivery under the specified fulfillment", + "description": "Creates a new delivery under the specified fulfillment\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fulfillmentUid", + "in": "path", + "description": "Fulfillment uid", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Delivery data", + "required": true, + "schema": { + "$ref": "#/definitions/DeliveryRequest" + } + } + ], + "responses": { + "201": { + "description": "The response will be always a LRO object", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "filter": { + "$ref": "#/definitions/LRO" + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/fulfillments/{fulfillmentUid}/deliveries/{deliveryUid}": { + "get": { + "tags": [ + "Delivery" + ], + "operationId": "readDelivery", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Read a delivery by uid", + "description": "Retrieve a delivery by a provided uid.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fulfillmentUid", + "in": "path", + "description": "Fulfillment uid", + "required": true, + "type": "string" + }, + { + "name": "deliveryUid", + "in": "path", + "description": "Delivery uid", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Delivery successfully retrieved", + "schema": { + "$ref": "#/definitions/Delivery" + } + }, + "204": { + "description": "No delivery found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "put": { + "tags": [ + "Delivery" + ], + "operationId": "updateDelivery", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Update a delivery by uid", + "description": "Update a delivery by a provided uid.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fulfillmentUid", + "in": "path", + "description": "Fulfillment uid", + "required": true, + "type": "string" + }, + { + "name": "deliveryUid", + "in": "path", + "description": "Delivery uid", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Delivery data", + "required": true, + "schema": { + "$ref": "#/definitions/DeliveryRequest" + } + } + ], + "responses": { + "200": { + "description": "Delivery successfully updated", + "schema": { + "$ref": "#/definitions/Delivery" + } + }, + "204": { + "description": "No Delivery found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/fulfillments/{fulfillmentUid}/deliveries/{deliveryUid}/file": { + "get": { + "tags": [ + "Delivery" + ], + "operationId": "downloadDeliveryFile", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Downloads a delivery file by delivery uid", + "description": "Downloads a delivery file by delivery uid.", + "produces": [ + "text/csv", + "application/vnd.ms-excel" + ], + "parameters": [ + { + "name": "fulfillmentUid", + "in": "path", + "description": "Fulfillment uid", + "required": true, + "type": "string" + }, + { + "name": "deliveryUid", + "in": "path", + "description": "Delivery uid", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Output file" + }, + "204": { + "description": "No delivery found or no output file found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/contract-volume": { + "get": { + "tags": [ + "ContractVolume" + ], + "operationId": "readSummary", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve an organization contract volume summary", + "description": "Retrieve an organization contract volume summary.", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Contract volume summary successfully retrieved", + "schema": { + "type": "object", + "properties": { + "points": { + "$ref": "#/definitions/ContractVolumePointsResponse" + }, + "history": { + "$ref": "#/definitions/ContractVolumeHistoryResponse" + } + } + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/contract-volume/points": { + "get": { + "tags": [ + "ContractVolume" + ], + "operationId": "readSummaryPoints", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve an organization contract volume summary points", + "description": "Retrieve an organization contract volume summary points.", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Contract volume points successfully retrieved", + "schema": { + "$ref": "#/definitions/ContractVolumePointsResponse" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/contract-volume/history": { + "get": { + "tags": [ + "ContractVolume" + ], + "operationId": "readSummaryHistory", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve an organization contract volume summary history", + "description": "Retrieve an organization contract volume summary history.", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Contract volume history successfully retrieved", + "schema": { + "$ref": "#/definitions/ContractVolumeHistoryResponse" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/fulfillment-schedules": { + "get": { + "tags": [ + "FulfillmentSchedule" + ], + "operationId": "readFulfillmentSchedules", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve fulfillment schedules due for processing", + "description": "Retrieve fulfillment schedules due for processing.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "date", + "in": "query", + "type": "string", + "description": "Accepts a yyyy-mm-dd date string to determine due schedules" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "Fulfillment schedules successfully retrieved", + "schema": { + "$ref": "#/definitions/FulfillmentScheduleResponse" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/ecommerce/fulfillment-schedules/{fulfillmentScheduleUid}": { + "put": { + "tags": [ + "FulfillmentSchedule" + ], + "operationId": "updateFirstSchedule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Update an existing fulfillment schedule", + "description": "Update an existing fulfillment schedule.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fulfillmentScheduleUid", + "in": "path", + "required": true, + "type": "string", + "description": "UID of the Purchase Group" + }, + { + "name": "body", + "in": "body", + "description": "Fulfillment schedule updates", + "required": true, + "schema": { + "$ref": "#/definitions/Schedule" + } + } + ], + "responses": { + "200": { + "description": "Fulfillment schedule successfully updated", + "schema": { + "$ref": "#/definitions/FulfillmentSchedule" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "FulfillmentSchedule" + ], + "operationId": "readFulfillmentSchedule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve fulfillment schedules due for processing", + "description": "Retrieve fulfillment schedules due for processing.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fulfillmentScheduleUid", + "in": "path", + "description": "Fulfillment schedule UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Fulfillment schedule successfully retrieved", + "schema": { + "$ref": "#/definitions/FulfillmentSchedule" + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/research/login": { + "post": { + "tags": [ + "Researches" + ], + "operationId": "researcheLogin", + "security": [ + { + "AWS": [] + } + ], + "summary": "Authenticates user in research library", + "description": "Authenticates user in research library", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "userName and password to be used in the authentication process", + "required": true, + "schema": { + "type": "object", + "properties": { + "userName": { + "type": "string", + "example": "Sample University-0" + }, + "password": { + "type": "string", + "example": "password" + } + } + } + } + ], + "responses": { + "200": { + "description": "User authenticated", + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User" + }, + "userName": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "status": { + "type": "string", + "example": "Active" + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "name": { + "type": "string", + "example": "Sample University" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "sessionToken": { + "type": "string", + "example": "Base64 string" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/research/articles": { + "get": { + "tags": [ + "Researches" + ], + "operationId": "readArticles", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Get list of researches", + "description": "Retrieve a list of researches papers based on some search criterias", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "search", + "in": "query", + "type": "string", + "description": "Any text string to be searched on papers" + }, + { + "name": "program", + "in": "query", + "type": "string", + "description": "Use to restrict research papers by a specific program" + }, + { + "name": "date", + "in": "query", + "type": "string", + "description": "Can receive an date function between(date1, date2), use to restrict the time span" + }, + { + "name": "type", + "in": "query", + "type": "string", + "description": "Use to restrict research papers by a specific type" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + }, + { + "name": "page", + "in": "query", + "type": "string", + "description": "Used for pagination, do not use this with offset" + }, + { + "name": "perPage", + "in": "query", + "type": "boolean", + "description": "Same as limit but when using page style" + }, + { + "name": "status", + "in": "query", + "type": "string", + "enum": [ + "Active", + "Pending", + "Expired" + ], + "description": "Use to restrict articles according to active and expiration dates. The default behaviour is status=Active. Active = active date <= today && expiration date > today. Pending = active date > today && expiration date > today. Expired = expiration date <= today. If an invalid status is passed, the default behaviour will occur\n" + } + ], + "responses": { + "200": { + "description": "The array of articles", + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible articles to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "prev-page": { + "type": "integer", + "description": "Page value to go back one page" + }, + "next-page": { + "type": "integer", + "description": "Page value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + }, + "programs": { + "type": "string", + "description": "Array as string containing the programs metadata" + }, + "dates": { + "type": "string", + "description": "Array as string containing the dates metadata" + }, + "types": { + "type": "string", + "description": "Array as string containing the types metadata" + } + }, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ResearchResponse" + } + } + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "post": { + "tags": [ + "Researches" + ], + "operationId": "createResearchArticle", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Creates new article in research", + "description": "Creates a new article in research passing article data. Not all article model fields are required, check its description for reference\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Body is a JSON describing the article to be created", + "required": true, + "schema": { + "$ref": "#/definitions/CreateResearchArticleRequest" + } + } + ], + "responses": { + "201": { + "description": "Article created successfuly", + "schema": { + "$ref": "#/definitions/CreateResearchArticleResponse" + } + }, + "400": { + "description": "Validation error" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/research/articles/{articleUid}": { + "put": { + "tags": [ + "Researches" + ], + "operationId": "updateResearchArticle", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Updates an article in research", + "description": "Updates research article identified by UID. Parameters to be updated are provided in the requested body and correspond to the fields described in research article model.\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "articleUid", + "in": "path", + "description": "Article UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateResearchArticleRequest" + } + } + ], + "responses": { + "200": { + "description": "Research article updated successfully", + "schema": { + "$ref": "#/definitions/ResearchArticle" + } + }, + "204": { + "description": "Article not found" + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "Researches" + ], + "operationId": "deleteResearchArticle", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Deletes an research article", + "description": "Sets an article expiration date to now in the database", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "articleUid", + "in": "path", + "description": "Article UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Article successfully deleted", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + } + }, + "204": { + "description": "Article not found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/research/articles/{articleUid}/file": { + "get": { + "tags": [ + "Researches" + ], + "operationId": "getResearchArticleFile", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Get file given the article Uid.", + "description": "Get the signed filePath to the article's file.\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "articleUid", + "in": "path", + "description": "Article UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Research article updated successfully", + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "example": "s3://research-library-pdfs-dev/06.2017_Masters_Homeland_Security.pdf" + } + } + } + }, + "204": { + "description": "Article not found" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/log": { + "post": { + "tags": [ + "Logger" + ], + "operationId": "log", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "summary": "Logs a message", + "description": "Logs a message", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Logger message, level, and metadata", + "required": true, + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Could not find page" + }, + "level": { + "type": "string", + "example": "warn" + }, + "metadata": { + "type": "object" + } + } + } + } + ], + "responses": { + "200": { + "description": "Message successfully logged", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Could not find page" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/files": { + "get": { + "tags": [ + "Files" + ], + "operationId": "getUploadFile", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Uploaded files list", + "description": "Get paginated collection of file records uploaded for this organization. Each file record has current processing status that gets updated over time as file goes through backend validation and processing. Collection can be filtered and sorted. By default rows returned in the order they are stored. Max number of results for this call is in response header **total-count**", + "parameters": [ + { + "description": "How many items should be returned.", + "required": false, + "type": "integer", + "default": 20, + "name": "limit", + "in": "query" + }, + { + "description": "How many items to skip.", + "required": false, + "type": "integer", + "default": 0, + "name": "offset", + "in": "query" + }, + { + "name": "sortBy", + "description": "Field to sort by", + "required": false, + "type": "string", + "enum": [ + "productType", + "filePath", + "id", + "status", + "userName", + "recordVolume", + "uploadDate" + ], + "in": "query" + }, + { + "name": "sortDirection", + "description": "Sort direction", + "in": "query", + "enum": [ + "DESC", + "ASC" + ], + "required": false, + "type": "string" + }, + { + "name": "filter", + "required": false, + "type": "string", + "description": "\n http://www.trirand.com/jqgridwiki/doku.php?id=wiki:advanced_searching\n\n {\n \"groupOp\":\"OR\",\n \"rules\":[{\"field\":\"x\",\"op\":\"eq\",\"data\":\"1\"}],\n \"groups\":[\n {\n \"groupOp\":\"AND\",\n \"rules\":[{\"field\":\"x\",\"op\":\"eq\",\"data\":\"2\"}],\n \"groups\":[...]\n }\n ]\n }\n ", + "in": "query" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "title": "Response Get Files For This Institution Get", + "type": "array", + "items": { + "$ref": "#/definitions/FileRecordModel" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "User is not authorized to use the following modules MODULE1, MODULE2,..." + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/HTTPValidationError" + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/files/{id}": { + "get": { + "tags": [ + "Files" + ], + "summary": "Get Uploaded file record and metadata", + "description": "Get file record and metadata for an uploaded file on a given organization

File record is composed by id, fileName, fileDescription, filePath, productType, status, userName, uploadDate and recordVolume

**id** File record id
**fileName** Uploaded File Name
**fileDescription** Uploaded File Description
**filePath** File path relative to AWS S3
**productType** This file product type, for example legacy, enrollment, ematch.
**status** Current status of file being processed\n
* uploading
* analyzing
* analyzed
* enqueued
* processing
* done
* failure

**status** Current status of file being processed **userName** the user that uploaded the file
**uploadDate** the date time when the file was uploaded
**recordVolume** Number of records in file

Metadata is composed by, product type, headers map, total rows, headers and data:

**Product Type** This file product type, for example legacy, enrollment, ematch.
**Filename** Filename, for example recordLegacy.csv.
**Headers Map** Ordered list of expected field names for this file product type.
**Total Rows** Total number of records in the uploaded file.
**Headers** List of file header names and number of empty rows for that header (column).
**Data** List of first 50 records from the uploaded file.

If this call returns value of **null** this implies csv file is not yet fully analyzed, a client can make periodic calls to this API and wait until result is not null. Empty dictionary response indicates there is no metadata, file could not be analyzed.

**Error** Field will be populated with corresponding file upload error if any error occurred while uploading a file ", + "operationId": "get_file_metadata__id__meta_get", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "File GUID. It is created by /file/upload call and uniquely identifies file record in our database.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "File's metadata if the file has been analyzed by the backend, null otherwise", + "schema": { + "$ref": "#/definitions/FileRecordModelWithMeta" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "User is not authorized to use the following modules MODULE1, MODULE2,..." + }, + "404": { + "description": "File is NOT FOUND for current organization", + "schema": { + "type": "object", + "example": { + "detail": "File with id: e6224f6a-3eb3-4b50-af92-264b6f88d215 is NOT found." + } + } + } + } + } + }, + "/files/{id}/cancel": { + "post": { + "tags": [ + "Files" + ], + "summary": "Cancel File", + "description": "Any analyzed file can be canceled -- meaning user does not want to continue with this file. A canceled file cannot be processed and will be deleted after 12h.", + "operationId": "generate_file_headers_map_metadata_headers_map_put", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "File GUID. It is created by /file/upload call and uniquely identifies file record in our database.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "File is added to the processing queue.", + "schema": { + "$ref": "#/definitions/FileRecordModelWithMeta" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "User is not authorized to use the following modules MODULE1, MODULE2,..." + }, + "422": { + "description": "This file status is [XXX] and cannot be canceled." + } + } + } + }, + "/files/{id}/process": { + "post": { + "tags": [ + "Files" + ], + "summary": "Save file headers map and trigger processing", + "description": "Save file headers mapping and puts file onto processing queue for another backend process to load that fild into matching algorithm on multiple databases.

", + "operationId": "save_file_headers_map_and_trigger_processing", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/Body_save_file_headers_map_and_trigger_processing" + }, + "required": true + }, + { + "name": "id", + "in": "path", + "description": "File GUID. It is created by /file/upload call and uniquely identifies file record in our database.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "File is added to the processing queue.", + "schema": { + "$ref": "#/definitions/FileRecordModelWithMeta" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "User is not authorized to use the following modules MODULE1, MODULE2,..." + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/HTTPValidationError" + } + } + } + } + }, + "/files/upload": { + "post": { + "tags": [ + "Files" + ], + "summary": "Save file metadata and get upload URL.", + "description": "Create file record in the database, set file status to **[uploading]** and return AWS S3 pre sign URL for uploading the actual file.

Click heere for AWS Reference

", + "operationId": "save_file_headers_and_generate_signed_url_metadata_post", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/Body_save_file_headers_and_generate_signed_url_metadata_post" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Authentication parameters for uploading file directly to S3 bucket. File will be stored in subdirectory structure with name specified in the key argument, actual file name used at the upload is not going to be used.", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "522eb05c-07d4-4e4f-ab59-ab5fea4a3c59" + }, + "url": { + "type": "string", + "example": "https://datalab-file-upload-env.s3.amazonaws.com/" + }, + "fields": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "universityName/students.csv" + }, + "x-amz-algorithm": { + "type": "string", + "example": "AWS4-HMAC-SHA256" + }, + "x-amz-credential": { + "type": "string", + "example": "AJFDKLSDJFLKSDJF" + }, + "x-amz-date": { + "type": "string", + "example": "UTC and in the ISO 8601 format: YYYYMMDD'T'HHMMSS'Z'" + }, + "policy": { + "type": "string", + "example": "eyJleHBpcmF0aW9uIjogIjIwMjEt" + }, + "x-amz-signature": { + "type": "string", + "example": "34534556regt45yf" + }, + "x-amz-security-token": { + "type": "string", + "example": "efjdkljj332" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "User is not authorized to use the following modules MODULE1, MODULE2,..." + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/HTTPValidationError" + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/restrictedfiles/{fileName}": { + "get": { + "tags": [ + "Restricted Files" + ], + "operationId": "getFile", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "summary": "Get a file", + "description": "Get the file URL of the file stored in restricted folder given its file name", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "fileName", + "in": "path", + "description": "the file name", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "the signed URL of the file", + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "example": "s3://dlclient-restricted-dev/fileName.pdf" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/scorereporter/scorereports/{scoreReporId}": { + "patch": { + "tags": [ + "ScoreReporter" + ], + "operationId": "updateScoreReport", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Update a single Score Report", + "description": "Update a single Score Report", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "scoreReporId", + "in": "path", + "description": "Id of a specific score report.", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateScoreReportRequest" + } + } + ], + "responses": { + "200": { + "description": "The signed URL of the file", + "schema": { + "$ref": "#/definitions/ScoreReport" + } + }, + "204": { + "description": "Invalid or nonexistent resource Id" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/scorereporter/scorereports/{scoreReporId}/students/": { + "patch": { + "tags": [ + "ScoreReporter" + ], + "operationId": "updateMultipleStudents", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Update all students (from the same score report uid)", + "description": "Update all students (from the same score report uid)", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "scoreReporId", + "in": "path", + "description": "Id of a specific score report.", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateStudentsRequest" + } + } + ], + "responses": { + "200": { + "description": "The signed URL of the file", + "schema": { + "$ref": "#/definitions/UpdateStudentsResponse" + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/scorereporter/students/{studentReportId}": { + "get": { + "tags": [ + "ScoreReporter" + ], + "operationId": "getReportDetail", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Get a student score report", + "description": "Get a individual student score report detail", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "studentReportId", + "in": "path", + "description": "Id of a specific student score report.", + "required": true, + "type": "string" + }, + { + "name": "allOrganizations", + "in": "query", + "description": "For ldap users, and users with search-all module as true default value is true. If false, score reports will be filtered only in the organization from header. Other users will only be able to search the score report from the organization in the header\n", + "type": "boolean" + } + ], + "responses": { + "200": { + "description": "The student score report detailed", + "schema": { + "$ref": "#/definitions/StudentReportDetail" + } + }, + "204": { + "description": "Invalid or nonexistent student score report Id or Organization doesn't have actCode" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/scorereporter/students/search": { + "post": { + "tags": [ + "ScoreReporter" + ], + "operationId": "getReportsList", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Get a list of students score reports", + "description": "Gets a list of students score reports that can be filtered by.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "allOrganizations", + "in": "query", + "description": "For ldap users, and users with search-all module as true default value is true. If false, score reports will be filtered only in the organization from header. Other users will only be able to search from the organization in the header\n", + "type": "boolean" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + }, + { + "name": "sortBy", + "in": "query", + "type": "string", + "description": "Use to sort the results based on the score report properties. Example sortBy=processDate", + "enum": [ + "actId", + "firstName", + "lastName", + "city", + "state", + "birthDate", + "testDate", + "processDate", + "exportDate", + "organization.ECLN", + "actCollegeCode", + "cancel", + "gender", + "ethnicity", + "highSchoolCode", + "actScoreRange", + "testDateRange", + "createdAt", + "canceledAt", + "cancelReason", + "registrationId" + ] + }, + { + "name": "sortDirection", + "in": "query", + "type": "string", + "description": "Use to change the sort direction, can be DESC or ASC. It should be used along with sortBy. Example sortDirection=DESC" + }, + { + "name": "body", + "in": "body", + "description": "Values to filter students score reports.", + "required": true, + "schema": { + "type": "object", + "properties": { + "registrationId": { + "type": "string", + "example": "ac184fc7-7d85-491a-a9a9-af66b981ee65" + }, + "actId": { + "type": "string", + "example": "-99515212" + }, + "sourceRegId": { + "type": "string", + "example": "831567893" + }, + "testDate": { + "type": "string", + "example": "04/2019" + }, + "firstName": { + "type": "string", + "example": "XOWUT" + }, + "lastName": { + "type": "string", + "example": "JUXCUD" + }, + "birthDate": { + "type": "string", + "example": "07/14/1952" + }, + "city": { + "type": "string", + "example": "TEMVFAMX" + }, + "state": { + "type": "string", + "example": "WP" + }, + "highSchoolCode": { + "type": "string", + "example": 430070 + }, + "cancel": { + "type": "boolean", + "example": true + }, + "gender": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "1", + "2" + ] + }, + "ethnicity": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "1", + "2" + ] + }, + "actScoreRange": { + "type": "array", + "items": { + "type": "integer" + }, + "example": [ + 20, + 22 + ] + }, + "testDateRange": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "03/2019", + "05/2019" + ] + } + } + } + } + ], + "responses": { + "200": { + "description": "An array of students", + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible searches to be returned (excluding limit and offset). If search request is in All Organizations and the body has only text fields (firstName, lastName and city), first is performed a textual search in order to make the response more manageable, reducing the dataset. However, when the same search is requested in a specific school, actCode is automatically added in the match criteria, and the textual search is not performed anymore. Given that the total-count can vary based in this textual search.\n" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + }, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GeneralStudentReport" + } + } + }, + "204": { + "description": "Organization doesn't have actCode" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/scorereporter/students/cancel": { + "post": { + "tags": [ + "ScoreReporter" + ], + "operationId": "cancelStudent", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Cancel a student score report", + "description": "Cancel a student score report that matches with the body filters and all have the same RegistrationId.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "Send-Email", + "in": "header", + "description": "Indicates whether an actual email should be sent or not to the organizations informing about the cancellation. For security reasons the default behavior is to not send any email.\n", + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + }, + { + "name": "allOrganizations", + "in": "query", + "description": "For ldap users, and users with search-all module as true default value is true. If false, score reports will be filtered only in the organization from header. Other users will only be able to cancel score report from the organization in the header\n", + "type": "boolean" + }, + { + "name": "body", + "in": "body", + "description": "Values to filter which student score Report will be canceled.", + "required": true, + "schema": { + "type": "object", + "properties": { + "cancelReason": { + "type": "string", + "example": "Score updated" + }, + "studentReportId": { + "type": "string", + "example": "598717ea-b6b6-4dc6-be2c-f23cda189387" + }, + "registrationId": { + "type": "string", + "example": "ac184fc7-7d85-491a-a9a9-af66b981ee65" + }, + "actId": { + "type": "string", + "example": "-99515212" + }, + "sourceRegId": { + "type": "string", + "example": "831567893" + }, + "testDate": { + "type": "string", + "example": "04/2019" + }, + "firstName": { + "type": "string", + "example": "XOWUT" + }, + "lastName": { + "type": "string", + "example": "JUXCUD" + }, + "birthDate": { + "type": "string", + "example": "07/14/1952" + }, + "city": { + "type": "string", + "example": "TEMVFAMX" + }, + "state": { + "type": "string", + "example": "WP" + } + }, + "required": [ + "cancelReason" + ] + } + } + ], + "responses": { + "200": { + "description": "Canceled student", + "schema": { + "$ref": "#/definitions/UpdatedStudent" + } + }, + "204": { + "description": "Not found a score report to cancel or Organization doesn't have actCode" + }, + "401": { + "description": "Unauthorized" + }, + "409": { + "description": "Conflict, matched multiple RegistrationId" + }, + "412": { + "description": "Precondition Failed, some RegistrationId was empty in the result of search criteria." + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/scorereporter/students/reinstate": { + "post": { + "tags": [ + "ScoreReporter" + ], + "operationId": "reinstateStudent", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Reinstate a student score report", + "description": "Reinstate a student score report that matches with the body filters and all have the same RegistrationId", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "Send-Email", + "in": "header", + "description": "Indicates whether an actual email should be sent or not to the organizations informing about the reinstatement. For security reasons the default behavior is to not send any email.\n", + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + }, + { + "name": "allOrganizations", + "in": "query", + "description": "For ldap users, and users with search-all module as true default value is true. If false, score reports will be filtered only in the organization from header. Other users will only be able to reinstate score report from the organization in the header\n", + "type": "boolean" + }, + { + "name": "body", + "in": "body", + "description": "Values to filter which student score Report will be reinstated.", + "required": true, + "schema": { + "type": "object", + "properties": { + "studentReportId": { + "type": "string", + "example": "598717ea-b6b6-4dc6-be2c-f23cda189387" + }, + "registrationId": { + "type": "string", + "example": "ac184fc7-7d85-491a-a9a9-af66b981ee65" + }, + "actId": { + "type": "string", + "example": "-99515212" + }, + "sourceRegId": { + "type": "string", + "example": "831567893" + }, + "testDate": { + "type": "string", + "example": "04/2019" + }, + "firstName": { + "type": "string", + "example": "XOWUT" + }, + "lastName": { + "type": "string", + "example": "JUXCUD" + }, + "birthDate": { + "type": "string", + "example": "07/14/1952" + }, + "city": { + "type": "string", + "example": "TEMVFAMX" + }, + "state": { + "type": "string", + "example": "WP" + } + } + } + } + ], + "responses": { + "200": { + "description": "Reinstated student", + "schema": { + "$ref": "#/definitions/UpdatedStudent" + } + }, + "204": { + "description": "Not found a score report to reinstate or Organization doesn't have actCode" + }, + "401": { + "description": "Unauthorized" + }, + "409": { + "description": "Conflict, matched multiple RegistrationId" + }, + "412": { + "description": "Precondition Failed, some RegistrationId was empty in the result of search criteria" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/scorereporter/students/{studentReportId}/delivery": { + "post": { + "tags": [ + "ScoreReporter" + ], + "operationId": "getStudentReportDelivery", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "summary": "Get a student score report file", + "description": "Get a individual student score report file", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "studentReportId", + "in": "path", + "description": "Id of a specific student score report.", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body containing either the ScoreReport uid or the Examinee Uid", + "required": true, + "schema": { + "$ref": "#/definitions/StudentDeliveryRequest" + } + } + ], + "responses": { + "200": { + "description": "The signed URL of the file", + "schema": { + "$ref": "#/definitions/StudentScoreReportDelivery" + } + }, + "204": { + "description": "Invalid or nonexistent resource Id or Organization doesn't have actCode" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/aos/links": { + "post": { + "tags": [ + "AOS" + ], + "operationId": "updateAOSLinks", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Create/update organization AOS links", + "description": "Creates or updates organization AOS links on both UMS and the MCO database", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "Organization", + "in": "header", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "AOS link group", + "required": true, + "schema": { + "$ref": "#/definitions/AOSLinkGroup" + } + } + ], + "responses": { + "200": { + "description": "AOS links updated" + }, + "400": { + "description": "Invalid UID or invalid AOS links" + } + } + } + }, + "/aos/studentactivity": { + "post": { + "tags": [ + "AOS" + ], + "operationId": "trackStudentActivity", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Tracks an AOS student activity event", + "description": "Tracks an AOS student activity event", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "AOS student activity data", + "required": true, + "schema": { + "$ref": "#/definitions/AOSStudentActivityRequest" + } + } + ], + "responses": { + "200": { + "description": "AOS event tracked successfully" + }, + "400": { + "description": "Invalid AOS event data" + } + } + } + }, + "/studentcredentials/studentcredentials": { + "get": { + "tags": [ + "StudentCredentials" + ], + "operationId": "getCredentialsCount", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Get the total number of new student credentials", + "description": "Get the total number of new student credentials\n", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Export history for student credential retrieved successfuly", + "schema": { + "type": "object", + "properties": { + "total": { + "type": "number", + "example": 25 + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + } + }, + "post": { + "tags": [ + "StudentCredentials" + ], + "operationId": "getCredentialsList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Get a list of credentials", + "description": "Get a list of all types student credentials\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "List Credential Request", + "required": true, + "schema": { + "$ref": "#/definitions/ListCredentialRequest" + } + } + ], + "responses": { + "200": { + "description": "Export history for student credential retrieved successfuly", + "schema": { + "$ref": "#/definitions/ListCredentialResponse" + } + }, + "403": { + "description": "Authorization failed" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "No student credential uid received" + } + } + } + }, + "/studentcredentials/studentcredentials/{studentCredentialUid}": { + "get": { + "tags": [ + "StudentCredentials" + ], + "operationId": "getExportHistory", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Get export history", + "description": "Get export history for single student credential uid\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "studentCredentialUid", + "in": "path", + "description": "Student Credential UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Export history for student credential retrieved successfuly", + "schema": { + "$ref": "#/definitions/ExportHistory" + } + }, + "403": { + "description": "Authorization failed" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "No student credential uid received" + } + } + } + }, + "/studentcredentials/studentcredentials/{studentCredentialUid}/export": { + "post": { + "tags": [ + "StudentCredentials" + ], + "operationId": "getSingleExportUrl", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Get URL for download a file", + "description": "Get URL for downloading a credential file\n", + "consumes": [ + "application/json" + ], + "produces": [ + "plain/text" + ], + "parameters": [ + { + "name": "studentCredentialUid", + "in": "path", + "description": "Student Credential UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Single Export Request", + "required": true, + "schema": { + "$ref": "#/definitions/SingleExportRequest" + } + } + ], + "responses": { + "200": { + "description": "The signed URL of the file", + "schema": { + "type": "string", + "example": "https://encoura-export-files-dev.s3.amazonaws.com/score-reporter%5CACT-TECH-COLL-07012019-211525.pdf?AWSAccessKeyId=ASIA2ZTSVUMX67Q34CWO&Signature=987asdasdasdasdas09-8a0sd9870-as&x-amz-security-token=ASDAUPOIUPI!#Expires=1594308396" + } + }, + "403": { + "description": "Authorization failed" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "No student credential uid received" + } + } + } + }, + "/studentcredentials/studentcredentials/export": { + "post": { + "tags": [ + "StudentCredentials" + ], + "operationId": "getCombinedExportUrl", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Get URL for download a file", + "description": "Get URL for downloading a zip file with the required credentials\n", + "consumes": [ + "application/json" + ], + "produces": [ + "plain/text" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Combined Export Request", + "required": true, + "schema": { + "$ref": "#/definitions/CombinedExportRequest" + } + } + ], + "responses": { + "200": { + "description": "The signed URL of the file", + "schema": { + "type": "string", + "example": "https://encoura-export-files-dev.s3.amazonaws.com/score-reporter%5CACT-TECH-COLL-07012019-211525.pdf?AWSAccessKeyId=ASIA2ZTSVUMX67Q34CWO&Signature=987asdasdasdasdas09-8a0sd9870-as&x-amz-security-token=ASDAUPOIUPI!#Expires=1594308396" + } + }, + "403": { + "description": "Authorization failed" + }, + "404": { + "description": "Resource not found" + }, + "422": { + "description": "No student credential uid received" + } + } + } + }, + "/datacenter/exports": { + "get": { + "tags": [ + "Exports" + ], + "operationId": "readExports", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Retrieve a list exports", + "description": "Retrieve a list of not delivered files.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "status", + "in": "query", + "type": "string", + "enum": [ + "NotDelivered" + ], + "description": "Use to restrict exports by a status. Example status=NotDelivered" + }, + { + "name": "productKey", + "in": "query", + "type": "string", + "description": "Use to restrict exports by productKey. Example productKey=score-reporter" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "Export list successfully retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/FulfillmentScoreReporter" + } + } + }, + "204": { + "description": "No content" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/datacenter/exports/{uid}/download": { + "get": { + "tags": [ + "Exports" + ], + "operationId": "downloadExport", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + }, + { + "Organization": [] + } + ], + "summary": "Downloads a \"not delivered\" file by export uid", + "description": "Downloads a \"not delivered file\" by export uid.", + "produces": [ + "text/csv", + "application/vnd.ms-excel" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Export uid", + "required": true, + "type": "string" + }, + { + "name": "fileType", + "in": "query", + "type": "string", + "description": "Use to select the file type to download (defaults to csv)" + } + ], + "responses": { + "200": { + "description": "Output file", + "schema": { + "type": "object", + "properties": { + "downloadUrl": { + "type": "string", + "example": "https://encoura-export-files-dev.s3.amazonaws.com/score-reporter/ACT-LOYOLA-11019-1711.csv?AWSAccessKeyId=AKIWBTJA&Expires=15743185&Signature=NWKgP4gqGzM%3D" + } + } + } + }, + "204": { + "description": "No export file found" + }, + "400": { + "description": "Bad request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/enrollmentlens/charts": { + "post": { + "tags": [ + "Enrollment Lens" + ], + "summary": "Get a report chart", + "description": "Get a chart type based on the POST request

", + "operationId": "charts_post", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + }, + { + "Organization": [] + } + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/Body_charts_post" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Response containing the **finalQueryStatement** and the **results** from the executed query.", + "schema": { + "type": "object", + "properties": { + "finalQueryStatement": { + "type": "string", + "example": "Select * from exampl_table" + }, + "results": { + "type": "array", + "example": [ + { + "key": "value" + }, + { + "key": "value" + } + ], + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "label" + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/HTTPValidationError" + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + } + }, + "definitions": { + "AttributeSmall": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + }, + "Creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "55ee6a37-7395-4a99-a623-7a53815b7103" + }, + "firstName": { + "type": "string", + "example": "Administrator" + }, + "lastName": { + "type": "string", + "example": "Administrator" + } + } + }, + "User": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "eabac226-5706-4e7c-812c-00b19e2ddf4b" + }, + "type": { + "type": "string", + "example": "User" + }, + "firstName": { + "type": "string", + "example": "Administrator" + }, + "lastName": { + "type": "string", + "example": "Administrator" + }, + "userName": { + "type": "string", + "example": "admin" + }, + "email": { + "type": "string", + "example": "admin@nrccua.org" + }, + "status": { + "type": "string", + "example": "Pending" + }, + "verifiedDate": { + "type": "string", + "example": null + }, + "creator": { + "$ref": "#/definitions/Creator" + }, + "createdAt": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/definitions/OrganizationSmall" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "application": { + "$ref": "#/definitions/ApplicationSmall" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "GetUsersResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "userName": { + "type": "string", + "example": "Sample University-0" + }, + "firstName": { + "type": "string", + "example": "McGlynn" + }, + "lastName": { + "type": "string", + "example": "Antoinette" + }, + "email": { + "type": "string", + "example": "antoinette@nrccua.org" + }, + "status": { + "type": "string", + "example": "Active" + }, + "type": { + "type": "string", + "example": "LdapUser" + }, + "createdAt": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "verifiedDate": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "UserSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "McGlynn" + }, + "lastName": { + "type": "string", + "example": "Antoinette" + } + } + }, + "UpdateUserRequest": { + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string", + "example": "NewUserLastname" + }, + "userName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/definitions/PermissionSmall" + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "required": [ + "roleName", + "remove" + ], + "properties": { + "roleName": { + "type": "string", + "example": "externaladministrator" + }, + "remove": { + "type": "boolean", + "example": false + } + } + } + } + } + }, + "CreateUserRequest": { + "type": "object", + "required": [ + "firstName", + "lastName", + "email" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LdapUser", + "Role", + "User" + ], + "default": "User" + }, + "firstName": { + "type": "string", + "example": "UserName" + }, + "lastName": { + "type": "string", + "example": "UserLastName" + }, + "password": { + "type": "string", + "example": "UserPassword" + }, + "userName": { + "type": "string", + "example": "UserUserName" + }, + "email": { + "type": "string", + "example": "UserEmail@nrccua.org" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ], + "default": "Pending" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/definitions/PermissionSmall" + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "required": [ + "roleName", + "remove" + ], + "properties": { + "roleName": { + "type": "string", + "example": "externaladministrator" + }, + "remove": { + "type": "boolean", + "example": false + } + } + } + } + } + }, + "CreateUserResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "Credentials": { + "type": "object", + "properties": { + "authorize": { + "type": "boolean" + }, + "credentials": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "sessionUid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User" + }, + "userName": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "status": { + "type": "string", + "example": "Active" + }, + "exp": { + "type": "string" + }, + "iss": { + "type": "string" + }, + "jti": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/definitions/OrganizationSmall" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + } + } + }, + "organization": { + "$ref": "#/definitions/GetOrganizationByIdResponse" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "ForgotPasswordRequest": { + "required": [ + "credential" + ], + "type": "object", + "properties": { + "credential": { + "type": "string", + "example": "admin@nrccua.org" + } + } + }, + "ResetPasswordRequest": { + "type": "object", + "required": [ + "newPassword" + ], + "properties": { + "uid": { + "type": "string", + "example": "eabac226-5706-4e7c-812c-00b19e2ddf4b" + }, + "email": { + "type": "string", + "example": "admin@nrccua.org" + }, + "newPassword": { + "type": "string", + "example": "admin" + }, + "verificationCode": { + "type": "string", + "example": "$2a$10$asynLtrxxuZXFgKSYf4Bae.4D8Mm6aG/m/nqORbiByEVpqndy3coi" + } + } + }, + "ActivateUserRequest": { + "type": "object", + "required": [ + "verificationCode", + "userName", + "password" + ], + "properties": { + "verificationCode": { + "type": "string", + "example": "$2a$10$asynLtrxxuZXFgKSYf4Bae.4D8Mm6aG/m/nqORbiByEVpqndy3coi" + }, + "userName": { + "type": "string", + "example": "admin" + }, + "password": { + "type": "string", + "example": "p455w0rd" + }, + "acceptedTerms": { + "type": "boolean", + "example": true + } + } + }, + "Role": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + }, + "OrganizationSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "name": { + "type": "string", + "example": "Sample University" + }, + "fice": { + "type": "string", + "example": "SAMPLE" + }, + "stateCode": { + "type": "string", + "example": "MO" + } + } + }, + "OrganizationReallySmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "name": { + "type": "string", + "example": "Sample University" + } + } + }, + "CollegeProfile": { + "type": "object", + "properties": { + "mcoId": { + "type": "string", + "example": "1234" + }, + "fice": { + "type": "string", + "example": "003754" + }, + "name": { + "type": "string", + "example": "Sample University" + }, + "country": { + "type": "string", + "example": "US" + }, + "city": { + "type": "string", + "example": "Portland" + }, + "state": { + "type": "string", + "example": "OR" + }, + "address": { + "type": "string", + "example": "123 Any Street" + }, + "zip": { + "type": "string", + "example": "12345" + }, + "geoPin": { + "type": "boolean", + "example": true + }, + "lastUpdatedAt": { + "type": "string", + "example": "2021-03-02T15:27:11.280000" + }, + "likes": { + "type": "number", + "example": 3355 + }, + "myOptionsUrl": { + "type": "string", + "example": "www.mco.com/sampleuni" + }, + "generalInformation": { + "type": "object", + "properties": { + "control": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "Private" + }, + "label": { + "type": "string", + "example": "Private (Non-Profit)" + } + } + }, + "yearLevel": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "4-year" + }, + "label": { + "type": "string", + "example": "4 years or more" + } + } + }, + "campusSetting": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "Large City" + }, + "label": { + "type": "string", + "example": "Large City (population of 250,000 or more)" + } + } + }, + "collegePreferences": { + "type": "string", + "example": "Co-ed College" + }, + "religiousAffiliation": { + "type": "string", + "example": "Lutheran Church" + }, + "historicallyBlackCollege": { + "type": "boolean", + "example": false + }, + "tribalCollege": { + "type": "boolean", + "example": false + }, + "hispanicCollege": { + "type": "boolean", + "example": true + } + } + }, + "webPresence": { + "type": "object", + "properties": { + "webAddress": { + "type": "string", + "example": "https://www.sampleuni.edu" + }, + "facebookAccount": { + "type": "string", + "example": "https://www.facebook.com/sampleuni" + }, + "twitterAccount": { + "type": "string", + "example": "https://www.twitter.com/sampleuni" + }, + "instagramAccount": { + "type": "string", + "example": "https://instagram.com/sampleuni" + }, + "youtubeChannel": { + "type": "string", + "example": "https://youtube.com/sampleuni" + } + } + }, + "media": { + "type": "object", + "properties": { + "generalInfoVideo": { + "type": "string", + "example": "https://youtube.com/watch?v=abcdKiek" + }, + "campusTourVideo": { + "type": "string", + "example": "https://www.vimeo.com/watch?v=abAZ34cdKCGF" + }, + "backgroundImage": { + "type": "string", + "example": "https://media.myoptions.org/production/schools/images/597_16x9_2048.jpg" + }, + "mobileImage": { + "type": "string", + "example": "https://media.myoptions.org/production/schools/images/597_1x1_2048.jpg" + }, + "logoImage": { + "type": "string", + "example": "https://media.myoptions.org/production/schools/logos/597.png" + } + } + }, + "studentExperience": { + "type": "object", + "properties": { + "studentBodyBreakdown": { + "type": "object", + "properties": { + "africanAmerican": { + "type": "object", + "properties": { + "male": { + "type": "number", + "example": 10 + }, + "female": { + "type": "number", + "example": 25 + } + } + }, + "americanIndian": { + "type": "object", + "properties": { + "male": { + "type": "number", + "example": 8 + }, + "female": { + "type": "number", + "example": 7 + } + } + }, + "asian": { + "type": "object", + "properties": { + "male": { + "type": "number", + "example": 36 + }, + "female": { + "type": "number", + "example": 45 + } + } + }, + "caucasian": { + "type": "object", + "properties": { + "male": { + "type": "number", + "example": 50 + }, + "female": { + "type": "number", + "example": 56 + } + } + }, + "hispanic": { + "type": "object", + "properties": { + "male": { + "type": "number", + "example": 12 + }, + "female": { + "type": "number", + "example": 8 + } + } + }, + "other": { + "type": "object", + "properties": { + "male": { + "type": "number", + "example": 1 + }, + "female": { + "type": "number", + "example": 2 + } + } + }, + "inStateStudents": { + "type": "number", + "example": 298 + }, + "outOfStateStudents": { + "type": "number", + "example": 160 + } + } + }, + "retention": { + "type": "object", + "properties": { + "studentsGraduated": { + "type": "number", + "example": 80 + }, + "studentsReturned": { + "type": "number", + "example": 99 + } + } + }, + "campusRules": { + "type": "object", + "properties": { + "alcoholPermitted": { + "type": "boolean", + "example": false + }, + "allCarsPermitted": { + "type": "boolean", + "example": true + } + } + }, + "housing": { + "type": "object", + "properties": { + "campusHousingAvailable": { + "type": "boolean", + "example": true + }, + "firstYearStudentsInCampusHousing": { + "type": "number", + "example": 70 + }, + "studentLivingOffCampus": { + "type": "number", + "example": 40 + }, + "housingTypesAvailable": { + "type": "object", + "properties": { + "coedDorms": { + "type": "boolean", + "example": true + }, + "womensDorms": { + "type": "boolean", + "example": true + }, + "mensDorms": { + "type": "boolean", + "example": false + }, + "sororityHouse": { + "type": "boolean", + "example": false + }, + "fraternityHouse": { + "type": "boolean", + "example": false + }, + "singleStudentApartments": { + "type": "boolean", + "example": true + }, + "marriedStudentApartments": { + "type": "boolean", + "example": true + }, + "specialHousingForDisabled": { + "type": "boolean", + "example": false + }, + "specialHousingForInternational": { + "type": "boolean", + "example": true + }, + "cooperativeHousing": { + "type": "boolean", + "example": true + }, + "other": { + "type": "boolean", + "example": false + } + } + } + } + } + } + }, + "studentCostAndAid": { + "type": "object", + "properties": { + "annualTuitionFees": { + "type": "object", + "properties": { + "tuitionInState": { + "type": "number", + "example": 30580 + }, + "tuitionOutState": { + "type": "number", + "example": 30580 + }, + "estimatedFees": { + "type": "number", + "example": 29000 + }, + "roomBoard": { + "type": "number", + "example": 9670 + } + } + }, + "netPrice": { + "type": "object", + "properties": { + "averageNetPrice": { + "type": "number", + "example": 0 + }, + "bellowThirty": { + "type": "number", + "example": 19674 + }, + "bellowFifty": { + "type": "number", + "example": 21856 + }, + "bellowSeventy": { + "type": "number", + "example": 22345 + }, + "bellowHundred": { + "type": "number", + "example": 26578 + }, + "aboveHundred": { + "type": "number", + "example": 27849 + } + } + }, + "financialAid": { + "type": "object", + "properties": { + "averageFinancialAid": { + "type": "number", + "example": 0 + }, + "averageStudentDebt": { + "type": "number", + "example": 5394 + }, + "federalWorkAvailable": { + "type": "boolean", + "example": true + }, + "firstYearStudentsReceivingNeedAid": { + "type": "number", + "example": 5 + }, + "firstYearStudentsReceivingMeritAid": { + "type": "number", + "example": 18 + } + } + } + } + }, + "admissions": { + "type": "object", + "properties": { + "admissionGeneralInfo": { + "type": "object", + "properties": { + "admissionsPhone": { + "type": "string", + "example": "212-500-1000" + }, + "financialAidPhone": { + "type": "string", + "example": "212-500-2000" + }, + "admissionsEmail": { + "type": "string", + "example": "admissions@sampleuni.edu" + }, + "financialAidEmail": { + "type": "string", + "example": "financialaid@sampleuni.edu" + }, + "studentRatio": { + "type": "number", + "example": 17 + }, + "averageGpa": { + "type": "number", + "example": 3.35 + }, + "averageClassRank": { + "type": "string", + "example": "A" + }, + "incomingFreshmen": { + "type": "number", + "example": 5234 + } + } + }, + "applicationInfo": { + "type": "object", + "properties": { + "applicationDeadline": { + "type": "object", + "properties": { + "month": { + "type": "string", + "example": "July" + }, + "day": { + "type": "string", + "example": "12" + } + } + }, + "applicationFee": { + "type": "number", + "example": 0 + }, + "applicationsReceived": { + "type": "number", + "example": 1226 + }, + "applicationsAccepted": { + "type": "number", + "example": 712 + }, + "applicationsEnrolled": { + "type": "number", + "example": 228 + }, + "earlyActionOffered": { + "type": "object", + "properties": { + "active": { + "type": "boolean", + "example": true + }, + "deadline": { + "type": "object", + "properties": { + "month": { + "type": "string", + "example": "June" + }, + "day": { + "type": "string", + "example": "10" + } + } + } + } + }, + "earlyDecisionOffered": { + "type": "object", + "properties": { + "active": { + "type": "boolean", + "example": true + }, + "deadline": { + "type": "object", + "properties": { + "month": { + "type": "string", + "example": "July" + }, + "day": { + "type": "string", + "example": "13" + } + } + } + } + }, + "commonApplicationAccepted": { + "type": "object", + "properties": { + "active": { + "type": "boolean", + "example": false + }, + "deadline": { + "type": "object", + "properties": { + "month": { + "type": "string", + "example": "August" + }, + "day": { + "type": "string", + "example": "22" + } + } + } + } + } + } + }, + "applicationRequirements": { + "type": "object", + "properties": { + "officialTranscript": { + "type": "string", + "enum": [ + "Required", + "Recommended", + "Required Conditionally", + "Neither Required nor Recommended", + "Considered but not Required", + "Not Applicable", + "Not Used" + ], + "example": "Required" + }, + "letterOfRecommendation": { + "type": "string", + "enum": [ + "Required", + "Recommended", + "Required Conditionally", + "Neither Required nor Recommended", + "Considered but not Required", + "Not Applicable", + "Not Used" + ], + "example": "Recommended" + }, + "counselorRecommendation": { + "type": "string", + "enum": [ + "Required", + "Recommended", + "Required Conditionally", + "Neither Required nor Recommended", + "Considered but not Required", + "Not Applicable", + "Not Used" + ], + "example": "Neither Required nor Recommended" + }, + "portfolioOrAudition": { + "type": "string", + "enum": [ + "Required", + "Recommended", + "Required Conditionally", + "Neither Required nor Recommended", + "Considered but not Required", + "Not Applicable", + "Not Used" + ], + "example": "Considered but not Required" + }, + "admissionTestScores": { + "type": "string", + "enum": [ + "Required", + "Recommended", + "Required Conditionally", + "Neither Required nor Recommended", + "Considered but not Required", + "Not Applicable", + "Not Used" + ], + "example": "Recommended" + }, + "admissionInterview": { + "type": "string", + "enum": [ + "Required", + "Recommended", + "Required Conditionally", + "Neither Required nor Recommended", + "Considered but not Required", + "Not Applicable", + "Not Used" + ], + "example": "Neither Required nor Recommended" + }, + "highSchoolProfile": { + "type": "string", + "enum": [ + "Required", + "Recommended", + "Required Conditionally", + "Neither Required nor Recommended", + "Considered but not Required", + "Not Applicable", + "Not Used" + ], + "example": "Considered but not Required" + }, + "personalStatement": { + "type": "string", + "enum": [ + "Required", + "Recommended", + "Required Conditionally", + "Neither Required nor Recommended", + "Considered but not Required", + "Not Applicable", + "Not Used" + ], + "example": "Required" + }, + "studentResume": { + "type": "string", + "enum": [ + "Required", + "Recommended", + "Required Conditionally", + "Neither Required nor Recommended", + "Considered but not Required", + "Not Applicable", + "Not Used" + ], + "example": "Recommended" + } + } + }, + "testScoreRange": { + "type": "object", + "properties": { + "actCompositeScoreRange": { + "type": "object", + "properties": { + "min": { + "type": "number", + "example": 18 + }, + "max": { + "type": "number", + "example": 25 + } + } + }, + "satRange": { + "type": "object", + "properties": { + "min": { + "type": "number", + "example": 900 + }, + "max": { + "type": "number", + "example": 1180 + } + } + } + } + }, + "actSatTestUsePolicy": { + "type": "object", + "properties": { + "admissionReview": { + "type": "string", + "enum": [ + "Test Required", + "Test Recommended", + "Test Optional", + "Test Blind", + "Test Flexible", + "Test Conditional" + ], + "example": "Test Required" + }, + "homeschoolStudentAdmissionReview": { + "type": "string", + "enum": [ + "Test Required", + "Test Recommended", + "Test Optional", + "Test Blind", + "Test Flexible", + "Test Conditional" + ], + "example": "Test Recommended" + }, + "financialAidConsideration": { + "type": "string", + "enum": [ + "Test Required", + "Test Recommended", + "Test Optional", + "Test Blind", + "Test Flexible", + "Test Conditional" + ], + "example": "Test Flexible" + }, + "testsUsedInOtherProcess": { + "type": "boolean", + "example": true + } + } + } + } + }, + "majorFamilies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "example": "Engineering" + }, + "majors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string", + "example": "Ocean Engineering" + }, + "degreeCount": { + "type": "number", + "example": 10 + }, + "majorCode": { + "type": "string", + "example": "14.2401" + }, + "categoryCode": { + "type": "string", + "example": "14.24" + }, + "isOffered": { + "type": "boolean", + "example": true + } + } + } + } + } + } + }, + "specialPrograms": { + "type": "object", + "properties": { + "specialStudyPrograms": { + "type": "object", + "properties": { + "distanceLearning": { + "type": "boolean", + "example": true + }, + "studyAbroad": { + "type": "boolean", + "example": false + }, + "weekendClasses": { + "type": "boolean", + "example": true + } + } + }, + "rotcPrograms": { + "type": "object", + "properties": { + "army": { + "type": "boolean", + "example": true + }, + "navy": { + "type": "boolean", + "example": false + }, + "airForce": { + "type": "boolean", + "example": true + } + } + } + } + }, + "transfers": { + "type": "object", + "properties": { + "transfers": { + "type": "object", + "properties": { + "friendly": { + "type": "boolean", + "example": true + }, + "percent": { + "type": "number", + "example": 40 + } + } + }, + "transferGeneralInfo": { + "type": "object", + "properties": { + "termsAvailable": { + "type": "string", + "example": "Fall, Spring, Summer" + }, + "examsAcceptedForCreditTransfer": { + "type": "string", + "example": "Yes" + }, + "acceptsTransferCredit": { + "type": "string", + "example": "Up to 56 credits may transfer" + }, + "enrolledTransferStudents": { + "type": "number", + "example": 1098 + }, + "minimumCreditsToBachelors": { + "type": "number", + "example": 120 + } + } + }, + "transferAdmissionsProcess": { + "type": "object", + "properties": { + "transferFinancialAid": { + "type": "string", + "example": "http://sampleuni.edu/transferfinancialaid" + }, + "onlineApplication": { + "type": "string", + "example": "http://sampleuni.edu/onlineapplication" + }, + "applicationFee": { + "type": "number", + "example": 100 + }, + "applicationRequirements": { + "type": "string", + "example": "http://sampleuni.edu/onlineapplication/faq" + }, + "applicationDeadlines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "example": "Summer" + }, + "deadline": { + "type": "object", + "properties": { + "month": { + "type": "string", + "example": "June" + }, + "day": { + "type": "string", + "example": "10" + } + } + } + } + } + } + } + }, + "transferAdvisorContactInfo": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Amy Turner" + }, + "title": { + "type": "string", + "example": "Transfer Advisor" + }, + "email": { + "type": "string", + "example": "amy.turner@sampleuni.edu" + }, + "directPhone": { + "type": "string", + "example": "329-111-1717" + }, + "contactUs": { + "type": "string", + "example": "http://sampleuni.edu/contact/us" + } + } + }, + "transferRequirements": { + "type": "object", + "properties": { + "requirementsAndPolicies": { + "type": "string", + "example": "http://sampleuni.edu/transferpolicies" + }, + "minimumCreditsToTransfer": { + "type": "number", + "example": 45 + }, + "overview": { + "type": "string", + "example": "A very long text" + } + } + }, + "articulationAgreements": { + "type": "object", + "properties": { + "agreements": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Some other cool college" + }, + "url": { + "type": "string", + "example": "http://someothercoolcollege.edu" + } + } + } + }, + "advices": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + } + } + }, + "example": { + "mcoId": "1234", + "fice": "003754", + "name": "Sample University", + "country": "US", + "city": "Portland", + "state": "OR", + "address": "123 Any Street", + "zip": "12345", + "geoPin": true, + "lastUpdatedAt": "2021-03-02T15:27:11.280000", + "likes": 3355, + "myOptionsUrl": "www.mco.com/sampleuni", + "generalInformation": { + "control": { + "key": "Private", + "label": "Private (Non-Profit)" + }, + "yearLevel": { + "key": "4-year", + "label": "4 years or more" + }, + "campusSetting": { + "key": "Large City", + "label": "Large City (population of 250,000 or more)" + }, + "collegePreferences": "Co-ed College", + "religiousAffiliation": "Lutheran Church", + "historicallyBlackCollege": false, + "tribalCollege": false, + "hispanicCollege": true + }, + "webPresence": { + "webAddress": "https://www.sampleuni.edu", + "facebookAccount": "https://www.facebook.com/sampleuni", + "twitterAccount": "https://www.twitter.com/sampleuni", + "instagramAccount": "https://instagram.com/sampleuni", + "youtubeChannel": "https://youtube.com/sampleuni" + }, + "media": { + "generalInfoVideo": "https://youtube.com/watch?v=abcdKiek", + "campusTourVideo": "https://www.vimeo.com/watch?v=abAZ34cdKCGF", + "backgroundImage": "https://media.myoptions.org/production/schools/images/597_16x9_2048.jpg", + "mobileImage": "https://media.myoptions.org/production/schools/images/597_1x1_2048.jpg", + "logoImage": "https://media.myoptions.org/production/schools/logos/597.png" + }, + "studentExperience": { + "studentBodyBreakdown": { + "africanAmerican": { + "male": 10, + "female": 25 + }, + "americanIndian": { + "male": 8, + "female": 7 + }, + "asian": { + "male": 36, + "female": 45 + }, + "caucasian": { + "male": 50, + "female": 56 + }, + "hispanic": { + "male": 12, + "female": 8 + }, + "other": { + "male": 1, + "female": 2 + }, + "inStateStudents": 298, + "outOfStateStudents": 160 + }, + "retention": { + "studentsGraduated": 80, + "studentsReturned": 99 + }, + "campusRules": { + "alcoholPermitted": false, + "allCarsPermitted": true + }, + "housing": { + "campusHousingAvailable": true, + "firstYearStudentsInCampusHousing": 70, + "studentLivingOffCampus": 40, + "housingTypesAvailable": { + "coedDorms": true, + "womensDorms": true, + "mensDorms": false, + "sororityHouse": false, + "fraternityHouse": false, + "singleStudentApartments": true, + "marriedStudentApartments": true, + "specialHousingForDisabled": false, + "specialHousingForInternational": true, + "cooperativeHousing": true, + "other": false + } + } + }, + "studentCostAndAid": { + "annualTuitionFees": { + "tuitionInState": 30580, + "tuitionOutState": 30580, + "estimatedFees": 29000, + "roomBoard": 9670 + }, + "netPrice": { + "averageNetPrice": 0, + "bellowThirty": 19674, + "bellowFifty": 21856, + "bellowSeventy": 22345, + "bellowHundred": 26578, + "aboveHundred": 27849 + }, + "financialAid": { + "averageFinancialAid": 0, + "averageStudentDebt": 5394, + "federalWorkAvailable": true, + "firstYearStudentsReceivingNeedAid": 5, + "firstYearStudentsReceivingMeritAid": 18 + } + }, + "admissions": { + "admissionGeneralInfo": { + "admissionsPhone": "212-500-1000", + "financialAidPhone": "212-500-2000", + "admissionsEmail": "admissions@sampleuni.edu", + "financialAidEmail": "financialaid@sampleuni.edu", + "studentRatio": 17, + "averageGpa": 3.35, + "averageClassRank": "A", + "incomingFreshmen": 5234 + }, + "applicationInfo": { + "applicationDeadline": { + "month": "July", + "day": "12" + }, + "applicationFee": 0, + "applicationsReceived": 1226, + "applicationsAccepted": 712, + "applicationsEnrolled": 228, + "earlyActionOffered": { + "active": true, + "deadline": { + "month": "June", + "day": "10" + } + }, + "earlyDecisionOffered": { + "active": true, + "deadline": { + "month": "July", + "day": "13" + } + }, + "commonApplicationAccepted": { + "active": false, + "deadline": { + "month": "August", + "day": "22" + } + } + }, + "applicationRequirements": { + "officialTranscript": "Required", + "letterOfRecommendation": "Recommended", + "counselorRecommendation": "Neither Required nor Recommended", + "portfolioOrAudition": "Considered but not Required", + "admissionTestScores": "Recommended", + "admissionInterview": "Neither Required nor Recommended", + "highSchoolProfile": "Considered but not Required", + "personalStatement": "Required", + "studentResume": "Recommended" + }, + "testScoreRange": { + "actCompositeScoreRange": { + "min": 18, + "max": 25 + }, + "satRange": { + "min": 900, + "max": 1180 + } + }, + "actSatTestUsePolicy": { + "admissionReview": "Test Required", + "homeschoolStudentAdmissionReview": "Test Recommended", + "financialAidConsideration": "Test Flexible", + "testsUsedInOtherProcess": true + } + }, + "majorFamilies": [ + { + "title": "Engineering", + "majors": [ + { + "title": "Ocean Engineering", + "degreeCount": 10, + "majorCode": "14.2401", + "categoryCode": "14.24", + "isOffered": true + } + ] + } + ], + "specialPrograms": { + "specialStudyPrograms": { + "distanceLearning": true, + "studyAbroad": false, + "weekendClasses": true + }, + "rotcPrograms": { + "army": true, + "navy": false, + "airForce": true + } + }, + "transfers": { + "transfers": { + "friendly": true, + "percent": 40 + }, + "transferGeneralInfo": { + "termsAvailable": "Fall, Spring, Summer", + "examsAcceptedForCreditTransfer": "Yes", + "acceptsTransferCredit": "Up to 56 credits may transfer", + "enrolledTransferStudents": 1098, + "minimumCreditsToBachelors": 120 + }, + "transferAdmissionsProcess": { + "transferFinancialAid": "http://sampleuni.edu/transferfinancialaid", + "onlineApplication": "http://sampleuni.edu/onlineapplication", + "applicationFee": 100, + "applicationRequirements": "http://sampleuni.edu/onlineapplication/faq", + "applicationDeadlines": [ + { + "label": "Summer", + "deadline": { + "month": "June", + "day": "10" + } + } + ] + }, + "transferAdvisorContactInfo": { + "name": "Amy Turner", + "title": "Transfer Advisor", + "email": "amy.turner@sampleuni.edu", + "directPhone": "329-111-1717", + "contactUs": "http://sampleuni.edu/contact/us" + }, + "transferRequirements": { + "requirementsAndPolicies": "http://sampleuni.edu/transferpolicies", + "minimumCreditsToTransfer": 45, + "overview": "A very long text" + }, + "articulationAgreements": { + "agreements": [ + { + "name": "Some other cool college", + "url": "http://someothercoolcollege.edu" + } + ], + "advices": [] + } + } + } + }, + "ProgramSmall": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + } + } + }, + "PermissionSmall": { + "type": "object", + "required": [ + "moduleKey" + ], + "properties": { + "moduleKey": { + "type": "string", + "example": "datalab.engagementanalytics.marketingconversion" + }, + "permissionOverwrite": { + "type": "boolean", + "example": true + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "ModuleSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permission": { + "type": "boolean" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "ApplicationSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "44bc5658-e923-4c0b-9400-c638eabef494" + }, + "key": { + "type": "string", + "example": "Data Lab" + }, + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleSmall" + } + }, + "status": { + "type": "string", + "example": "Active" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "UpdateOrganizationRequest": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "$ref": "#/definitions/PermissionSmall" + } + } + } + }, + "AuthenticationResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "sessionToken": { + "type": "string" + } + } + }, + "PasswordResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "message": { + "type": "string" + } + } + }, + "ImpersonateResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "impersonatingUser": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "eabac226-5706-4e7c-812c-00b19e2ddf4b" + }, + "firstName": { + "type": "string", + "example": "Administrator" + }, + "lastName": { + "type": "string", + "example": "Administrator" + }, + "userName": { + "type": "string", + "example": "admin" + } + } + }, + "sessionToken": { + "type": "string" + } + } + }, + "GetOrganizationByIdResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "name": { + "type": "string", + "example": "Sample University" + }, + "type": { + "type": "string", + "example": "Institution" + }, + "fice": { + "type": "string", + "example": "000000" + }, + "actCode": { + "type": "string", + "example": "9999" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Active" + }, + "createdAt": { + "type": "string", + "example": "2017-06-21T16:36:08.039Z" + }, + "creator": { + "$ref": "#/definitions/Creator" + }, + "parent": { + "type": "string", + "example": "Father Organization" + }, + "application": { + "$ref": "#/definitions/ApplicationSmall" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "programs": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "settings": { + "$ref": "#/definitions/OrganizationSettings" + } + } + }, + "GetOrganizationsResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "name": { + "type": "string", + "example": "Sample University" + }, + "fice": { + "type": "string", + "example": "SAMPLE" + }, + "stateCode": { + "type": "string", + "example": "MO" + } + } + }, + "SearchRequest": { + "type": "object", + "required": [ + "title", + "type" + ], + "properties": { + "title": { + "type": "string", + "example": "My Custom Search" + }, + "type": { + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ] + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Disabled", + "Temporary" + ] + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "example": "Tag 1" + } + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilterObject" + } + }, + "rules": { + "$ref": "#/definitions/RulesObject" + }, + "counts": { + "type": "array", + "items": { + "$ref": "#/definitions/CountObject" + } + }, + "maxVolume": { + "type": "number", + "example": 100500 + }, + "classPlannerVersion": { + "type": "number", + "example": 1 + } + } + }, + "SearchResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1ad1c27d-d298-4e26-827d-c9e3369d3452" + }, + "title": { + "type": "string", + "example": "My Custom Search" + }, + "recommended": { + "type": "boolean", + "example": true + }, + "estimate": { + "type": "boolean", + "example": false + }, + "type": { + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ], + "example": "Prospect" + }, + "organizationUid": { + "type": "string", + "example": "c50d3be8-d15c-44b6-8310-91df948af6da" + }, + "status": { + "type": "string", + "example": "Active" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "example": "Tag 1" + } + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilterObject" + } + }, + "rules": { + "$ref": "#/definitions/RulesObject" + }, + "counts": { + "type": "array", + "items": { + "$ref": "#/definitions/CountObject" + } + }, + "modified": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifiedObject" + } + }, + "created": { + "$ref": "#/definitions/CreatedObject" + }, + "maxVolume": { + "type": "number", + "example": 100500 + }, + "classPlannerVersion": { + "type": "number", + "example": 1 + } + } + }, + "ListSearchResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1ad1c27d-d298-4e26-827d-c9e3369d3452" + }, + "title": { + "type": "string", + "example": "My Custom Search" + }, + "new": { + "type": "boolean", + "example": true + }, + "recommended": { + "type": "boolean", + "example": true + }, + "estimate": { + "type": "boolean", + "example": false + }, + "type": { + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ], + "example": "Prospect" + }, + "organizationUid": { + "type": "string", + "example": "c50d3be8-d15c-44b6-8310-91df948af6da" + }, + "status": { + "type": "string", + "example": "Active" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "example": "Tag 1" + } + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilterObject" + } + }, + "rules": { + "$ref": "#/definitions/RulesObject" + }, + "counts": { + "type": "array", + "items": { + "$ref": "#/definitions/CountObject" + } + }, + "modified": { + "$ref": "#/definitions/ModifiedObject" + }, + "created": { + "$ref": "#/definitions/CreatedObject" + }, + "maxVolume": { + "type": "number", + "example": 100500 + }, + "classPlannerVersion": { + "type": "number", + "example": 1 + } + } + }, + "DeleteSearchResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1ad1c27d-d298-4e26-827d-c9e3369d3452" + }, + "title": { + "type": "string", + "example": "My Custom Search" + }, + "recommended": { + "type": "boolean", + "example": true + }, + "type": { + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ], + "example": "Prospect" + }, + "organizationUid": { + "type": "string", + "example": "c50d3be8-d15c-44b6-8310-91df948af6da" + }, + "status": { + "type": "string", + "example": "Disabled" + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "example": "Tag 1" + } + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilterObject" + } + }, + "rules": { + "$ref": "#/definitions/RulesObject" + }, + "counts": { + "type": "array", + "items": { + "$ref": "#/definitions/CountObject" + } + }, + "modified": { + "type": "array", + "items": { + "$ref": "#/definitions/ModifiedObject" + } + }, + "created": { + "$ref": "#/definitions/CreatedObject" + }, + "maxVolume": { + "type": "number", + "example": 100500 + }, + "classPlannerVersion": { + "type": "number", + "example": 1 + } + } + }, + "FilterObject": { + "type": "object", + "properties": { + "filterUid": { + "type": "string", + "example": "49311c0d-bc80-4a54-bc6a-88e9c2b89aed" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "TN" + }, + "displayName": { + "type": "string", + "example": "Tennessee (TN)" + }, + "fips": { + "type": "string", + "example": "005" + } + } + } + } + } + }, + "RuleObject": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "49311c0d-bc80-4a54-bc6a-88e9c2b89aed" + }, + "field": { + "type": "string", + "example": "graduationYear" + }, + "conjunction": { + "type": "string", + "enum": [ + "AND", + "OR" + ], + "example": "AND" + }, + "operator": { + "type": "string", + "enum": [ + "includes", + "excludes", + "between", + "equals", + "unequals" + ], + "example": "includes" + }, + "type": { + "type": "string", + "enum": [ + "group", + "rule" + ], + "example": "rule" + }, + "values": { + "type": "array", + "items": { + "type": "string", + "example": [ + "HSGRAD2019" + ] + } + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "example": "Recursive..." + } + } + } + }, + "RulesObject": { + "type": "object", + "description": "Rules can be an object that represents a filter or a group of rules.\nWhen rules is present in the request, only geo filters will be considered valid.\n", + "properties": { + "conjunction": { + "type": "string", + "enum": [ + "AND", + "OR" + ], + "example": "AND" + }, + "type": { + "type": "string", + "enum": [ + "group", + "rule" + ], + "example": "group" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/definitions/RuleObject" + } + } + } + }, + "FilterPurchasedObject": { + "type": "object", + "properties": { + "filterUid": { + "type": "string", + "example": "49311c0d-bc80-4a54-bc6a-88e9c2b89aed" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "HSGRAD2017" + }, + "displayName": { + "type": "string", + "example": "California (CA)" + } + } + } + } + } + }, + "SearchCountPurchasedObject": { + "type": "object", + "properties": { + "purchasableCount": { + "type": "number", + "example": 1213412 + }, + "duplicateCount": { + "type": "number", + "example": 12323412 + }, + "preReleaseCount": { + "type": "number", + "example": 12323412 + }, + "alreadyPurchased": { + "type": "number", + "example": 12323412 + }, + "undiscoveredCount": { + "type": "number", + "example": 12323412 + }, + "dedupVolume": { + "type": "number", + "example": 1213412 + }, + "dedupFutureVolume": { + "type": "number", + "example": 12323412 + }, + "currentVolume": { + "type": "number", + "example": 12323412 + }, + "futureVolume": { + "type": "number", + "example": 12323412 + }, + "total": { + "type": "number", + "example": 3123123 + }, + "gradYears": { + "type": "array", + "items": { + "type": "object", + "properties": { + "gradYear": { + "type": "string", + "example": "2017" + }, + "count": { + "type": "number", + "example": 3123 + }, + "futureCount": { + "type": "number", + "example": 5000 + } + } + } + } + } + }, + "CountObject": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "texas" + }, + "value": { + "type": "number", + "example": 10000 + } + } + }, + "ModifiedObject": { + "type": "object", + "properties": { + "modifications": { + "type": "object" + }, + "created": { + "$ref": "#/definitions/CreatedObject" + } + } + }, + "CreatedObject": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1ad1c27d-d298-4e26-827d-c9e3369d3452" + }, + "name": { + "type": "string", + "example": "Jason Watson" + }, + "timestamp": { + "type": "number", + "example": 1501684404478 + } + } + }, + "EcommerceModification": { + "type": "object", + "properties": { + "modifiedBy": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "name": { + "type": "string", + "example": "Son Goku" + } + } + }, + "modification": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "something" + }, + "value": { + "type": "object" + } + } + } + }, + "modifiedAt": { + "type": "number", + "example": 1501684404478 + } + } + }, + "RunCountsRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "example": "Prospect", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ] + }, + "overrideVersion": { + "type": "integer", + "example": 1 + }, + "aggregation": { + "type": "string", + "example": "gpa", + "enum": [ + "state", + "zip", + "gpa", + "gender", + "gender, gpa", + "major", + "ethnicity", + "prepcourse", + "collegetype", + "socialenvironment", + "denomination" + ] + }, + "selectedFilters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "filterUid": { + "type": "string", + "example": "49311c0d-bc80-4a54-bc6a-88e9c2b89aed" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "HSGRAD2017" + } + } + } + } + } + } + }, + "rules": { + "$ref": "#/definitions/RulesObject" + }, + "estimate": { + "type": "boolean", + "example": false + } + } + }, + "RunCountsResponse": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string", + "example": "gpa" + }, + "value": { + "type": "string", + "example": "GRADEAPLUS" + }, + "display": { + "type": "string", + "example": "A+" + } + } + } + }, + "count": { + "type": "string", + "example": "1203765" + } + } + }, + "DeduplicationRequest": { + "type": "object", + "properties": { + "dedupGroup": { + "type": "boolean", + "example": false + }, + "dedupPrevious": { + "type": "boolean", + "example": false + }, + "purchaseItems": { + "type": "array", + "items": { + "$ref": "#/definitions/DedupItemRequest" + } + } + } + }, + "DedupItemRequest": { + "type": "object", + "properties": { + "searchPurchaseItem": { + "$ref": "#/definitions/DedupSearchItem" + } + } + }, + "DedupSearchItem": { + "type": "object", + "properties": { + "sortOrder": { + "type": "number", + "example": 1 + }, + "search": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "recommended": { + "type": "boolean", + "example": true + }, + "type": { + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ], + "example": "Prospect" + }, + "title": { + "type": "string", + "example": "2018 Military" + }, + "maxVolume": { + "type": "number", + "example": 5000 + }, + "classPlannerVersion": { + "type": "number", + "example": 1 + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "example": "Tag 1" + } + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilterPurchasedObject" + } + }, + "rules": { + "$ref": "#/definitions/RulesObject" + } + } + } + } + }, + "TagResponse": { + "type": "object", + "properties": { + "label": { + "type": "string", + "example": "New Tag" + }, + "organizationUid": { + "type": "string", + "example": "5e521c84-8968-48c4-9136-f68096cd8ca5" + }, + "type": { + "type": "string", + "enum": [ + "Recommended", + "Saved", + "Both" + ] + }, + "uid": { + "type": "string", + "example": "efbe83d2-bb2b-407f-b05f-bf6fad43c0c2" + } + } + }, + "FilterRequest": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "example": "GPA" + }, + "type": { + "type": "string", + "enum": [ + "range", + "list", + "singleSelect", + "bool" + ] + }, + "searchTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ] + } + }, + "allowAll": { + "type": "boolean" + }, + "top": { + "type": "boolean" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "display": { + "type": "string" + }, + "defaultSelect": { + "type": "boolean" + } + } + } + } + } + }, + "FilterResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "130f8f6e-8c55-4720-8513-1ed9d68d7cb4" + }, + "displayName": { + "type": "string", + "example": "GPA" + }, + "type": { + "type": "string", + "enum": [ + "range", + "list", + "singleSelect", + "bool" + ] + }, + "searchTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ] + } + }, + "allowAll": { + "type": "boolean" + }, + "top": { + "type": "boolean" + }, + "filterType": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "display": { + "type": "string" + }, + "defaultSelect": { + "type": "boolean" + } + } + } + } + } + }, + "FilterOptionsResponse": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "keyA" + }, + "display": { + "type": "string", + "example": "valueA" + }, + "defaultSelect": { + "type": "boolean" + } + } + }, + "MappingRequest": { + "type": "object", + "properties": { + "fieldName": { + "type": "string", + "example": "db field name" + }, + "searchTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ] + } + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "display": { + "type": "string" + }, + "dbValue": { + "type": "string" + } + } + } + } + } + }, + "MappingResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "599217663a5eb4d1bdb31cd8" + }, + "filterUid": { + "type": "string", + "example": "0ff3424d-878e-49dc-a0b0-dba0025c55bc" + }, + "fieldName": { + "type": "string", + "example": "db field name" + }, + "searchTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ] + } + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "display": { + "type": "string" + }, + "dbValue": { + "type": "string" + } + } + } + } + } + }, + "SimpleMapping": { + "type": "object", + "properties": { + "filterUid": { + "type": "string", + "example": "138afd98-31a4-4c0a-a7ec-34145eabb8eb" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "GRADELC" + }, + "dbValue": { + "type": "string", + "example": "LC" + } + } + } + } + } + }, + "ValidateRequest": { + "type": "object", + "properties": { + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + } + } + } + } + } + }, + "ValidateResponse": { + "type": "object", + "properties": { + "valid": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "fips": { + "type": "string" + } + } + } + }, + "invalid": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "CartUpdateRequest": { + "type": "object", + "properties": { + "purchaseGroups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "name": { + "type": "string", + "example": "this is a search name" + } + } + } + } + } + }, + "PurchaseGroupRequest": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "name": { + "type": "string", + "example": "Purchase Group Name" + }, + "sfLineNumber": { + "type": "string", + "example": "ol-1024" + }, + "sfOrderNum": { + "type": "string", + "example": "1551430800000" + }, + "dedupGroup": { + "type": "boolean", + "example": false + }, + "dedupPrevious": { + "type": "boolean", + "example": false + }, + "creatingCounts": { + "type": "boolean", + "example": false + }, + "purchaseItems": { + "type": "array", + "items": { + "$ref": "#/definitions/PurchaseItemRequest" + } + }, + "sfOrderLine": { + "type": "array", + "items": { + "$ref": "#/definitions/SfOrderLineItem" + } + }, + "sfFulfillmentLine": { + "type": "array", + "items": { + "$ref": "#/definitions/SfFulfillmentLineItem" + } + } + } + }, + "PurchaseItemRequest": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "product": { + "$ref": "#/definitions/SmallProduct" + }, + "purchaseItemType": { + "type": "string", + "example": "current" + }, + "futureLabel": { + "type": "string", + "example": "Jun 2019" + }, + "quantity": { + "type": "number", + "example": 3 + }, + "discount": { + "type": "number", + "example": 0 + }, + "finalUnitCost": { + "type": "number", + "example": 10 + }, + "searchPurchaseItem": { + "$ref": "#/definitions/SearchPurchaseItem" + }, + "fulfillmentHistory": { + "$ref": "#/definitions/FulfillmentHistory" + } + } + }, + "CartFullResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "organizationUid": { + "type": "string", + "example": "67cc9a6e-0caf-4e33-8ca4-87066747f81f" + }, + "purchaseGroups": { + "type": "array", + "items": { + "$ref": "#/definitions/PurchaseGroup" + } + }, + "orderSummary": { + "$ref": "#/definitions/OrderSummary" + } + } + }, + "OrderSummary": { + "type": "object", + "properties": { + "availablePoints": { + "type": "object", + "properties": { + "AOS": { + "type": "number", + "example": 0 + }, + "Declared": { + "type": "number", + "example": 0 + }, + "Inquiry": { + "type": "number", + "example": 0 + }, + "Prospect": { + "type": "number", + "example": 0 + }, + "Legacy": { + "type": "number", + "example": 0 + }, + "Ematch": { + "type": "number", + "example": 0 + } + } + }, + "paidPrice": { + "type": "object", + "properties": { + "AOS": { + "type": "number", + "example": 0 + }, + "Declared": { + "type": "number", + "example": 0 + }, + "Inquiry": { + "type": "number", + "example": 0 + }, + "Prospect": { + "type": "number", + "example": 0 + }, + "Legacy": { + "type": "number", + "example": 0 + }, + "Ematch": { + "type": "number", + "example": 0 + } + } + }, + "remainingUnpaidPrice": { + "type": "object", + "properties": { + "AOS": { + "type": "number", + "example": 0 + }, + "Declared": { + "type": "number", + "example": 0 + }, + "Inquiry": { + "type": "number", + "example": 0 + }, + "Prospect": { + "type": "number", + "example": 0 + }, + "Legacy": { + "type": "number", + "example": 0 + }, + "Ematch": { + "type": "number", + "example": 0 + } + } + }, + "remainingUnpaidQuantity": { + "type": "object", + "properties": { + "AOS": { + "type": "number", + "example": 0 + }, + "Declared": { + "type": "number", + "example": 0 + }, + "Inquiry": { + "type": "number", + "example": 0 + }, + "Prospect": { + "type": "number", + "example": 0 + }, + "Legacy": { + "type": "number", + "example": 0 + }, + "Ematch": { + "type": "number", + "example": 0 + } + } + }, + "remainingValue": { + "type": "number", + "example": 0 + }, + "searches": { + "type": "array", + "items": { + "type": "object", + "properties": { + "finalUnitCost": { + "type": "number", + "example": 0 + }, + "label": { + "type": "string", + "example": "Prospect Students" + }, + "lists": { + "type": "number", + "example": 0 + }, + "totalQuantity": { + "type": "number", + "example": 0 + }, + "type": { + "type": "string", + "example": "Prospect" + }, + "value": { + "type": "number", + "example": 3.15 + }, + "yearsSummary": { + "type": "object", + "properties": { + "2019": { + "type": "number", + "example": 0 + }, + "2020": { + "type": "number", + "example": 0 + }, + "2021": { + "type": "number", + "example": 0 + }, + "2022": { + "type": "number", + "example": 0 + }, + "2023": { + "type": "number", + "example": 0 + }, + "2024": { + "type": "number", + "example": 0 + } + } + } + } + } + }, + "totalQuantity": { + "type": "number", + "example": 0 + }, + "totalValue": { + "type": "number", + "example": 0 + } + } + }, + "FulfillmentHistory": { + "type": "object", + "properties": { + "fulfillmentUid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "date": { + "type": "number", + "example": 1606744196 + }, + "quantity": { + "type": "integer", + "minimum": 0, + "example": 500 + }, + "listGenerated": { + "type": "boolean", + "example": false + } + } + }, + "SfOrderLineItem": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "sfLineNumber": { + "type": "string", + "example": "SF-1234567" + }, + "productType": { + "type": "string", + "enum": [ + "classplanner.legacy", + "classplanner.ematch", + "classplanner.inquiry", + "classplanner.declared", + "classplanner.prospects", + "classplanner.aos", + "score-reporter" + ], + "example": "classplanner.inquiry" + }, + "committedVolume": { + "type": "integer", + "minimum": 0, + "example": 500 + }, + "fulfilledVolume": { + "type": "integer", + "minimum": 0, + "example": 500 + }, + "purchaseType": { + "type": "string", + "enum": [ + "volume", + "invoice", + "undiscovered" + ], + "example": "volume" + } + } + }, + "SfFulfillmentLineItem": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "sfFulfillmentNumber": { + "type": "string", + "example": "FI-1234567" + }, + "productKey": { + "type": "string", + "enum": [ + "classplanner.legacy", + "classplanner.ematch", + "classplanner.inquiry", + "classplanner.declared", + "classplanner.prospects", + "classplanner.aos", + "score-reporter" + ], + "example": "classplanner.prospects" + }, + "quantity": { + "type": "integer", + "example": 570 + }, + "dateFulfilled": { + "type": "number", + "example": 1501684404478 + } + } + }, + "PurchaseGroup": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "organizationUid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "sfLineNumber": { + "type": "string", + "example": "ol-1024" + }, + "sfOrderNum": { + "type": "string", + "example": "1551430800000" + }, + "name": { + "type": "string", + "example": "SAMPLE-123" + }, + "dedupGroup": { + "type": "boolean", + "example": false + }, + "dedupPrevious": { + "type": "boolean", + "example": false + }, + "purchaseItems": { + "type": "array", + "items": { + "$ref": "#/definitions/PurchaseItem" + } + }, + "deleted": { + "type": "number", + "example": 1606744196 + }, + "costInPoints": { + "type": "number", + "example": 10020 + }, + "costInDollars": { + "type": "number", + "example": 1245.5 + }, + "isContinuous": { + "type": "boolean", + "example": false + }, + "created": { + "$ref": "#/definitions/EcommerceCreated" + }, + "sfOrderLine": { + "type": "array", + "items": { + "$ref": "#/definitions/SfOrderLineItem" + } + }, + "sfFulfillmentLine": { + "type": "array", + "items": { + "$ref": "#/definitions/SfFulfillmentLineItem" + } + }, + "modificationHistory": { + "type": "object", + "properties": { + "modifications": { + "type": "array", + "items": { + "$ref": "#/definitions/EcommerceModification" + } + } + } + } + } + }, + "PurchaseItem": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "product": { + "$ref": "#/definitions/SmallProduct" + }, + "purchaseItemType": { + "type": "string", + "example": "current" + }, + "futureLabel": { + "type": "string", + "example": "Jun 2019" + }, + "quantity": { + "type": "number", + "example": 3 + }, + "discount": { + "type": "number", + "example": 0 + }, + "finalUnitCost": { + "type": "number", + "example": 10 + }, + "smsListId": { + "type": "string", + "example": "AA" + }, + "searchPurchaseItem": { + "$ref": "#/definitions/SearchPurchaseItem" + }, + "fulfillmentHistory": { + "type": "array", + "items": { + "$ref": "#/definitions/FulfillmentHistory" + } + }, + "created": { + "$ref": "#/definitions/EcommerceCreated" + }, + "modificationHistory": { + "type": "object", + "properties": { + "modifications": { + "type": "array", + "items": { + "$ref": "#/definitions/EcommerceModification" + } + } + } + } + } + }, + "SearchPurchaseItem": { + "type": "object", + "properties": { + "enableAOS": { + "type": "boolean", + "example": false + }, + "sortOrder": { + "type": "number", + "example": 1 + }, + "counts": { + "$ref": "#/definitions/SearchCountPurchasedObject" + }, + "search": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "recommended": { + "type": "boolean", + "example": true + }, + "type": { + "type": "string", + "enum": [ + "Prospect", + "Legacy", + "Declared", + "Ematch" + ], + "example": "Prospect" + }, + "title": { + "type": "string", + "example": "2018 Military" + }, + "maxVolume": { + "type": "number", + "example": 5000 + }, + "classPlannerVersion": { + "type": "number", + "example": 1 + }, + "tags": { + "type": "array", + "items": { + "type": "string", + "example": "Tag 1" + } + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilterPurchasedObject" + } + }, + "rules": { + "$ref": "#/definitions/RulesObject" + }, + "surveyYear": { + "type": "number", + "example": 2020 + } + } + } + } + }, + "SmallProduct": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "key": { + "type": "string", + "example": "classplanner.prospects" + }, + "unitCost": { + "type": "number", + "example": 0.86 + } + } + }, + "CreditCard": { + "type": "object", + "required": [ + "cardNumber", + "expirationDate", + "securityCode" + ], + "properties": { + "cardNumber": { + "type": "string", + "example": "4007000000027" + }, + "expirationDate": { + "type": "string", + "example": "012018" + }, + "securityCode": { + "type": "string", + "example": "456" + }, + "cardType": { + "type": "string", + "example": "American Express" + }, + "nameOnCard": { + "type": "string", + "example": "Elliot Alderson" + } + } + }, + "BankAccount": { + "type": "object", + "required": [ + "accountType", + "routingNumber", + "accountNumber", + "nameOnAccount" + ], + "properties": { + "bankName": { + "type": "string", + "example": "Citibank" + }, + "accountType": { + "type": "string", + "enum": [ + "checking", + "savings", + "businessChecking" + ] + }, + "routingNumber": { + "type": "string", + "minLength": 9, + "maxLength": 9, + "example": "056008849" + }, + "accountNumber": { + "type": "string", + "minLength": 5, + "maxLength": 17, + "example": "1234567890" + }, + "nameOnAccount": { + "type": "string", + "maxLength": 22, + "example": "Hari Seldon" + } + } + }, + "Invoice": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "paidTimestamp": { + "type": "integer", + "example": 1515179948 + }, + "emailTo": { + "type": "string", + "example": "elliot@e-corp.com" + }, + "phoneTo": { + "type": "string", + "example": "5551234567" + }, + "postalMailTo": { + "type": "object", + "properties": { + "street": { + "type": "string", + "example": "123 Avenue" + }, + "street2": { + "type": "string", + "example": "Ap. 123" + }, + "city": { + "type": "string", + "example": "Chicago" + }, + "state": { + "type": "string", + "example": "IL" + }, + "zip": { + "type": "string", + "example": "60655" + }, + "country": { + "type": "string", + "example": "USA" + } + } + } + } + }, + "Credits": { + "type": "object", + "properties": { + "numberOfCredits": { + "type": "integer", + "example": 30 + } + } + }, + "Address": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "example": "Ellen" + }, + "lastName": { + "type": "string", + "example": "Johnson" + }, + "company": { + "type": "string", + "example": "Souveniropolis" + }, + "address": { + "type": "string", + "example": "14 Main Street" + }, + "city": { + "type": "string", + "example": "Pecan Springs" + }, + "state": { + "type": "string", + "example": "TX" + }, + "zip": { + "type": "string", + "example": "44628" + }, + "country": { + "type": "string", + "example": "USA" + } + } + }, + "CreatePaymentProfileRequest": { + "type": "object", + "properties": { + "achPaymentProfile": { + "$ref": "#/definitions/BankAccount" + }, + "creditCardPaymentProfile": { + "$ref": "#/definitions/CreditCard" + }, + "billTo": { + "$ref": "#/definitions/Address" + } + } + }, + "PaymentProfile": { + "type": "object", + "properties": { + "creditCardPaymentProfile": { + "type": "object", + "properties": { + "externalProfileId": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "cardNumber": { + "type": "string", + "example": "377593333478781" + }, + "expirationDate": { + "type": "number", + "example": 1606744196 + }, + "cardType": { + "type": "string", + "example": "A TYPE" + } + } + }, + "achPaymentProfile": { + "type": "object", + "properties": { + "externalProfileId": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "accountNumber": { + "type": "string", + "example": "377593333478781" + }, + "routingNumber": { + "type": "string", + "example": "377593333478781" + }, + "bankName": { + "type": "string", + "example": "Capsule Corp" + }, + "nameOnAccount": { + "type": "string", + "example": "Son Goku" + } + } + }, + "creditsPaymentProfile": { + "type": "object", + "properties": { + "numberOfCreditsRemaining": { + "type": "number", + "example": 11 + }, + "product": { + "type": "string", + "example": "Senzu Bean" + } + } + }, + "invoicePaymentProfile": { + "type": "object", + "properties": { + "emailtTo": { + "type": "string", + "example": "bulma@capsule-corp.com" + }, + "postalMailTo": { + "type": "object", + "properties": { + "street": { + "type": "string", + "example": "123 Avenue" + }, + "street2": { + "type": "string", + "example": "456 Avenue" + }, + "city": { + "type": "string", + "example": "Master Roshi Island" + }, + "state": { + "type": "string", + "example": "Sea" + }, + "zipcode": { + "type": "string", + "example": "12345646" + }, + "country": { + "type": "string", + "example": "Sea" + } + } + } + } + } + } + }, + "ContractVolumeHistoryItem": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "0811f429-715c-41db-8115-60d36b2ac07e" + }, + "purchaseGroupUid": { + "type": "string", + "example": "0811f429-715c-41db-8115-60d36b2ac07e" + }, + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "name": { + "type": "string", + "example": "Son Goku" + }, + "type": { + "type": "string", + "example": "LdapUser" + } + } + }, + "date": { + "type": "number", + "example": 1501684404478 + }, + "volume": { + "type": "number", + "example": 1337 + }, + "productKey": { + "type": "string", + "example": "classplanner.aos" + } + } + }, + "ContractVolumePointsResponse": { + "type": "object", + "properties": { + "available": { + "type": "object" + }, + "spent": { + "type": "object" + }, + "remaining": { + "type": "object" + } + } + }, + "ContractVolumeHistoryResponse": { + "type": "array", + "items": { + "$ref": "#/definitions/ContractVolumeHistoryItem" + } + }, + "CopySearchesRequest": { + "type": "object", + "properties": { + "simple": { + "type": "boolean", + "example": false + }, + "searchesItemsToCopy": { + "type": "array", + "items": { + "type": "object", + "properties": { + "isPastGradYears": { + "type": "boolean", + "example": false + }, + "purchaseGroupUid": { + "type": "string", + "example": "2791c62c-9b32-4af0-af9c-d237e248f86b" + }, + "purchaseItemUid": { + "type": "string", + "example": "673a1a8a-69e6-4d3a-aaaa-8043cb4ce6d5" + }, + "newTitle": { + "type": "string", + "example": "New Search Title" + }, + "newGradYears": { + "type": "array", + "items": { + "type": "string", + "example": "HSGRAD2021" + } + }, + "status": { + "type": "string", + "example": "Active" + } + } + } + } + } + }, + "GetSearchInfoRequest": { + "type": "object", + "properties": { + "purchaseGroupUids": { + "type": "array", + "items": { + "type": "string", + "example": "827adeda-1da5-4cf0-9bca-055e2cd01b7d" + } + } + } + }, + "GetSearchInfoResponse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "product": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "classplanner.prospects" + } + } + }, + "searchPurchaseItem": { + "type": "object", + "properties": { + "search": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "e1f82ebc-2673-49e5-a7bb-3059af5e94e1" + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/definitions/FilterObject" + } + } + } + } + } + } + } + } + }, + "ResearchResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bzmFD2ABhFdhQ4NV_2iC" + }, + "title": { + "type": "string", + "example": "Roundtable_Trends in Campaign Design and Planning" + }, + "summary": { + "type": "string", + "example": "The comprehensive campaign continues its nearly uncontested reign as the most-widely used form of campaigning across the country. An excellent tool for..." + }, + "reportType": { + "type": "string", + "example": "Collaborative Research" + }, + "displayDate": { + "type": "string", + "example": "2012-12-20T00:00:00" + }, + "activeDate": { + "type": "string", + "example": "2012-12-20T00:00:00" + }, + "expirationDate": { + "type": "string", + "example": "2012-12-20T00:00:00" + }, + "hasFile": { + "type": "boolean", + "example": false + }, + "authors": { + "type": "array", + "items": { + "type": "string" + } + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "programs": { + "type": "array", + "items": { + "type": "string" + } + }, + "methodology": { + "type": "array", + "items": { + "type": "string" + } + }, + "attachment": { + "type": "object", + "properties": { + "content": { + "type": "string", + "example": "Trends in Campaign Design \\nand Planning\\n\\nEduventures Roundtable\\n\\nDecember 2012..." + }, + "contentLength": { + "type": "integer", + "example": 7538 + } + } + } + } + }, + "ResearchArticle": { + "type": "object", + "properties": { + "title": { + "type": "string", + "example": "Test Document" + }, + "summary": { + "type": "string", + "example": "This document is being updated for testing purposes" + }, + "reportType": { + "type": "string", + "example": "Custom Inquiry" + }, + "displayDate": { + "type": "string", + "example": "2017-12-21T00:00:00" + }, + "activeDate": { + "type": "string", + "example": "2017-12-21T00:00:00" + }, + "expirationDate": { + "type": "string", + "example": "2017-12-21T00:00:00" + }, + "hasFile": { + "type": "boolean", + "example": false + }, + "authors": { + "type": "array", + "items": { + "type": "string", + "example": "Artiga" + } + }, + "keywords": { + "type": "array", + "items": { + "type": "string", + "example": "Keyword1" + } + }, + "programs": { + "type": "array", + "items": { + "type": "string", + "example": "Industry Practice" + } + }, + "methodology": { + "type": "array", + "items": { + "type": "string", + "example": "Methodology1" + } + }, + "attachment": { + "type": "object", + "properties": { + "content": { + "type": "string", + "example": "pdf text" + }, + "contentLength": { + "type": "number", + "example": 9 + } + } + } + } + }, + "UpdateResearchArticleRequest": { + "type": "object", + "properties": { + "title": { + "type": "string", + "example": "Test Document" + }, + "summary": { + "type": "string", + "example": "This document is being updated for testing purposes" + }, + "reportType": { + "type": "string", + "example": "Custom Inquiry" + }, + "displayDate": { + "type": "string", + "example": "2017-12-21T00:00:00" + }, + "activeDate": { + "type": "string", + "example": "2017-12-21T00:00:00" + }, + "expirationDate": { + "type": "string", + "example": "2017-12-21T00:00:00" + }, + "filePath": { + "type": "string", + "example": "s3://research-library-pdfs-dev/06.2017_Masters_Homeland Security.pdf" + }, + "authors": { + "type": "array", + "items": { + "type": "string", + "example": "Artiga" + } + }, + "keywords": { + "type": "array", + "items": { + "type": "string", + "example": "Keyword1" + } + }, + "programs": { + "type": "array", + "items": { + "type": "string", + "example": "Industry Practice" + } + }, + "methodology": { + "type": "array", + "items": { + "type": "string", + "example": "Methodology1" + } + }, + "pdf": { + "type": "string", + "example": "cGRmIHRleHQ=" + } + } + }, + "CreateResearchArticleRequest": { + "type": "object", + "required": [ + "title", + "summary", + "activeDate", + "displayDate" + ], + "properties": { + "title": { + "type": "string", + "example": "Test Document" + }, + "summary": { + "type": "string", + "example": "This document is being created for testing purposes" + }, + "reportType": { + "type": "string", + "example": "Custom Inquiry" + }, + "displayDate": { + "type": "string", + "example": "2017-12-21T00:00:00" + }, + "activeDate": { + "type": "string", + "example": "2017-12-21T00:00:00" + }, + "expirationDate": { + "type": "string", + "example": "2017-12-21T00:00:00" + }, + "filePath": { + "type": "string", + "example": "s3://research-library-pdfs-dev/06.2017_Masters_Homeland Security.pdf" + }, + "authors": { + "type": "array", + "items": { + "type": "string", + "example": "Artiga" + } + }, + "keywords": { + "type": "array", + "items": { + "type": "string", + "example": "Keyword1" + } + }, + "programs": { + "type": "array", + "items": { + "type": "string", + "example": "Industry Practice" + } + }, + "methodology": { + "type": "array", + "items": { + "type": "string", + "example": "Methodology1" + } + }, + "pdf": { + "type": "string", + "example": "cGRmIHRleHQ=" + } + } + }, + "CreateResearchArticleResponse": { + "type": "object", + "properties": { + "article": { + "$ref": "#/definitions/ResearchArticle" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "Contact": { + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "Order": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "organizationUid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "sfOpportunityNumber": { + "type": "string", + "example": "OP-00010022" + }, + "additionalSfOpportunityNumbers": { + "type": "array", + "items": { + "type": "string", + "example": "OP-00010022" + } + }, + "purchaseGroups": { + "type": "array", + "items": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + } + }, + "status": { + "type": "string", + "enum": [ + "Pending", + "Approved", + "Rejected", + "Purchased", + "Failed" + ], + "example": "Pending" + }, + "termsAccepted": { + "type": "boolean", + "example": true + }, + "importedFromSf": { + "type": "boolean", + "example": false + }, + "paymentFailed": { + "type": "boolean", + "example": false + }, + "sftpDeliveryMethod": { + "type": "boolean", + "example": true + }, + "sftpDeliveryLayout": { + "type": "string", + "enum": [ + "NRCCUA", + "ACT", + "ENCOURA" + ], + "example": "NRCCUA" + }, + "poNumber": { + "type": "string", + "example": "Custom order number" + }, + "paymentProfiles": { + "type": "array", + "items": { + "$ref": "#/definitions/PaymentProfile" + } + }, + "paymentTransations": { + "type": "array", + "items": { + "$ref": "#/definitions/PaymentTransaction" + } + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/Contact" + } + }, + "sfStatus": { + "type": "string", + "enum": [ + "Pending", + "Processing", + "Complete" + ], + "example": "Pending" + } + } + }, + "FullOrder": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "organization": { + "$ref": "#/definitions/OrganizationReallySmall" + }, + "sfOpportunityNumber": { + "type": "string", + "example": "OP-00010022" + }, + "additionalSfOpportunityNumbers": { + "type": "array", + "items": { + "type": "string", + "example": "OP-00010022" + } + }, + "isPlatform": { + "type": "boolean", + "example": true + }, + "purchaseGroups": { + "type": "array", + "items": { + "$ref": "#/definitions/PurchaseGroup" + } + }, + "status": { + "type": "string", + "enum": [ + "Pending", + "Approved", + "Rejected", + "Purchased", + "Failed" + ], + "example": "Pending" + }, + "paid": { + "type": "boolean", + "example": true + }, + "paymentFailed": { + "type": "boolean", + "example": false + }, + "completed": { + "type": "boolean", + "example": true + }, + "termsAccepted": { + "type": "boolean", + "example": true + }, + "reviewRequired": { + "type": "boolean", + "example": true + }, + "importedFromSf": { + "type": "boolean", + "example": false + }, + "sftpDeliveryMethod": { + "type": "boolean", + "example": true + }, + "sftpDeliveryLayout": { + "type": "string", + "enum": [ + "NRCCUA", + "ACT", + "ENCOURA" + ], + "example": "NRCCUA" + }, + "purchasedDate": { + "type": "number", + "example": 1501684404478 + }, + "approvedDate": { + "type": "number", + "example": 816091200000 + }, + "completedDate": { + "type": "number", + "example": 825091203020 + }, + "amount": { + "type": "number", + "example": 25121 + }, + "poNumber": { + "type": "string", + "example": "Custom order number" + }, + "rejectedFeedback": { + "type": "object", + "example": "Any Object/String/Array that may suit our needs (can be null)" + }, + "searchTypes": { + "type": "array", + "items": { + "type": "string", + "example": "Prospect" + } + }, + "paymentTypes": { + "type": "array", + "items": { + "type": "string", + "example": "Credit Card, Invoice or Points" + } + }, + "purchaseGroupNames": { + "type": "array", + "items": { + "type": "string", + "example": "Names defined by the user on each Purchase Groups" + } + }, + "paymentProfiles": { + "type": "array", + "items": { + "$ref": "#/definitions/PaymentProfile" + } + }, + "paymentTransations": { + "type": "array", + "items": { + "$ref": "#/definitions/PaymentTransaction" + } + }, + "representative": { + "$ref": "#/definitions/Contact" + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/Contact" + } + }, + "created": { + "$ref": "#/definitions/EcommerceCreated" + }, + "modificationHistory": { + "type": "object", + "properties": { + "modifications": { + "type": "array", + "items": { + "$ref": "#/definitions/EcommerceModification" + } + } + } + }, + "sfStatus": { + "type": "string", + "enum": [ + "Pending", + "Processing", + "Complete" + ], + "example": "Pending" + } + } + }, + "PaymentTransaction": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "amount": { + "type": "integer", + "example": 15 + }, + "poNumber": { + "type": "string" + }, + "transactionTimestamp": { + "type": "integer", + "example": 1515174425 + }, + "creditCardPaymentTransaction": { + "$ref": "#/definitions/CreditCard" + }, + "achPaymentTransaction": { + "$ref": "#/definitions/BankAccount" + }, + "creditsPaymentTransaction": { + "$ref": "#/definitions/Credits" + }, + "invoicePaymentTransaction": { + "$ref": "#/definitions/Invoice" + } + } + }, + "CreateProductRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Prospect Search List" + }, + "key": { + "type": "string", + "example": "classplanner.declared" + }, + "salesforceId": { + "type": "string", + "example": "01t60000001p36OAAQ" + }, + "salesforceProductCodes": { + "type": "array", + "items": { + "type": "string", + "example": "A" + } + }, + "type": { + "type": "string", + "example": "Search", + "enum": [ + "Search", + "Module", + "Service" + ] + }, + "unitCost": { + "type": "number", + "example": 0.95 + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "Product": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "11896062-5f13-43fc-8ddb-0e5bb747f6fb" + }, + "name": { + "type": "string", + "example": "Prospect Search List" + }, + "key": { + "type": "string", + "example": "classplanner.declared" + }, + "salesforceId": { + "type": "string", + "example": "01t60000001p36OAAQ" + }, + "salesforceProductCodes": { + "type": "array", + "items": { + "type": "string", + "example": "A" + } + }, + "type": { + "type": "string", + "example": "Search", + "enum": [ + "Search", + "Module", + "Service" + ] + }, + "unitCost": { + "type": "number", + "example": 0.95 + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "LRORequest": { + "type": "object", + "properties": { + "callbackUrl": { + "type": "string", + "example": "https://api.dev-datalab.nrccua.org/v1/lro" + } + } + }, + "LROUpdateRequest": { + "type": "object", + "properties": { + "error": { + "type": "object", + "example": "Relevant Error Object" + }, + "result": { + "type": "object", + "example": "Can be anything: string, number, array, object that may suit our needs" + } + } + }, + "LRO": { + "type": "object", + "properties": { + "lroUid": { + "type": "string", + "example": "046dcbb1-9528-4104-88cd-b9bd3d508353" + }, + "startTime": { + "type": "number", + "example": 1525708003525 + }, + "endTime": { + "type": "number", + "example": 1525708007725 + }, + "state": { + "type": "string", + "enum": [ + "Executing", + "Success", + "Error" + ] + }, + "callbackUrl": { + "type": "string", + "example": "https://api.dev-datalab.nrccua.org/v1/lro" + }, + "result": { + "type": "object", + "example": "Can be anything: string, number, array, object that may suit our needs" + } + } + }, + "LROCached": { + "type": "object", + "properties": { + "lroUid": { + "type": "string", + "example": "046dcbb1-9528-4104-88cd-b9bd3d508353" + }, + "startTime": { + "type": "number", + "example": 1525708003525 + }, + "endTime": { + "type": "number", + "example": 1525708007725 + }, + "state": { + "type": "string", + "enum": [ + "Success" + ] + }, + "callbackUrl": { + "type": "string", + "example": "https://api.dev-datalab.nrccua.org/v1/lro" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/RunCountsResponse" + } + } + } + }, + "LRODedupCached": { + "type": "object", + "properties": { + "lroUid": { + "type": "string", + "example": "046dcbb1-9528-4104-88cd-b9bd3d508353" + }, + "startTime": { + "type": "number", + "example": 1525708003525 + }, + "endTime": { + "type": "number", + "example": 1525708007725 + }, + "state": { + "type": "string", + "enum": [ + "Success" + ] + }, + "callbackUrl": { + "type": "string", + "example": "https://api.dev-datalab.nrccua.org/v1/lro" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/PurchaseGroup" + } + } + } + }, + "CreateFulfillmentRequest": { + "type": "object", + "properties": { + "orderUid": { + "type": "string", + "example": "976e6288-5960-4c8d-b53e-17b4f6892480" + }, + "purchaseGroupUid": { + "type": "string", + "example": "53bfc4fb-389d-4c17-a5d6-7e6902e3839b" + }, + "productKey": { + "type": "string", + "example": "classplanner.prospects" + }, + "purchaseItems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "quantity": { + "type": "number", + "example": 150 + } + } + } + }, + "isContinuous": { + "type": "boolean", + "example": false + }, + "status": { + "type": "string", + "enum": [ + "Processing", + "Delivered", + "Complete" + ], + "example": "Processing" + }, + "sfStatus": { + "type": "string", + "enum": [ + "Pending", + "Allocating", + "Processing", + "Complete" + ], + "example": "Processing" + }, + "listGenerated": { + "type": "boolean", + "example": false + }, + "listPath": { + "type": "string", + "example": "some s3 path" + }, + "quantity": { + "type": "number", + "example": 500 + }, + "costInPoints": { + "type": "number", + "example": 10020 + }, + "costInDollars": { + "type": "number", + "example": 1245.5 + }, + "date": { + "type": "number", + "example": "1530556037946'" + } + } + }, + "FulfillmentRequest": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "Processing", + "Delivered", + "Complete" + ], + "example": "Delivered" + }, + "sfStatus": { + "type": "string", + "enum": [ + "Pending", + "Allocating", + "Processing", + "Complete" + ], + "example": "Processing" + }, + "listGenerated": { + "type": "boolean", + "example": true + }, + "listPath": { + "type": "string", + "example": "some s3 path" + }, + "delivery": { + "$ref": "#/definitions/Delivery" + } + } + }, + "DeliveryRequest": { + "type": "object", + "properties": { + "triggeredBy": { + "type": "string", + "enum": [ + "Client", + "Service" + ], + "example": "Client" + }, + "method": { + "type": "string", + "enum": [ + "Download", + "Email", + "FTP" + ], + "example": "Download" + }, + "email": { + "type": "string", + "example": "email@nrccua.org" + }, + "file": { + "$ref": "#/definitions/DeliveryFile" + }, + "created": { + "$ref": "#/definitions/EcommerceCreated" + } + } + }, + "OrganizationProduct": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "273f5933-7ba9-4bcc-8e7a-b513594e692a" + }, + "organizationUid": { + "type": "string", + "example": "0811f429-715c-41db-8115-60d36b2ac07e" + }, + "productKey": { + "type": "string", + "example": "classplanner.prospects" + }, + "unitCost": { + "type": "number", + "example": 0.8 + }, + "discount": { + "type": "number", + "example": 0.2 + }, + "allocatedPoints": { + "type": "number", + "example": 10000 + }, + "remainingPoints": { + "type": "number", + "example": 9000 + }, + "dateApplied": { + "type": "number", + "example": 1530556037946 + }, + "expiration": { + "type": "number", + "example": 1530556037946 + }, + "importedFromSf": { + "type": "boolean", + "example": false + }, + "created": { + "$ref": "#/definitions/EcommerceCreated" + } + } + }, + "OrganizationProductRequest": { + "type": "object", + "properties": { + "productKey": { + "type": "string", + "example": "classplanner.prospects" + }, + "unitCost": { + "type": "number", + "example": 0.8 + }, + "discount": { + "type": "number", + "example": 0.2 + }, + "allocatedPoints": { + "type": "number", + "example": 10000 + }, + "importedFromSf": { + "type": "boolean", + "example": false + }, + "creator": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "example": "Pedro" + }, + "lastName": { + "type": "string", + "example": "Artiga" + } + } + } + } + }, + "AOSLinkGroup": { + "type": "object", + "properties": { + "inquiryUrl": { + "type": "string", + "example": "https://encoura.org" + }, + "visitUrl": { + "type": "string", + "example": "https://encoura.org" + }, + "applyUrl": { + "type": "string", + "example": "https://encoura.org" + } + } + }, + "AOSStudentActivityRequest": { + "type": "object", + "properties": { + "action": { + "description": "Action descriptor", + "type": "string", + "example": "click" + }, + "action_type": { + "description": "Action sub-type", + "type": "string", + "example": "click_inquiry" + }, + "data": { + "description": "AOS link group", + "type": "object", + "properties": { + "fice": { + "type": "string", + "example": "013454" + }, + "seq_num": { + "type": "string", + "example": "01234567" + } + } + } + } + }, + "Schedule": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "273f5933-7ba9-4bcc-8e7a-b513594e692a" + }, + "interval": { + "type": "string", + "enum": [ + "Single", + "Weekly", + "Monthly" + ], + "example": "Weekly" + }, + "weekOfMonth": { + "type": "string", + "enum": [ + "First", + "Second", + "Third", + "Fourth", + "Last" + ], + "example": "Third" + }, + "dayOfWeek": { + "type": "string", + "enum": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday" + ], + "example": "Wednesday" + }, + "dayOfMonth": { + "type": "integer", + "example": 20, + "minimum": 1, + "maximum": 31 + }, + "dateFulfillment": { + "type": "array", + "items": { + "type": "number", + "example": 1501684404478 + } + } + } + }, + "Fulfillment": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "273f5933-7ba9-4bcc-8e7a-b513594e692a" + }, + "organizationUid": { + "type": "string", + "example": "0811f429-715c-41db-8115-60d36b2ac07e" + }, + "fice": { + "type": "string", + "example": "001024" + }, + "orderUid": { + "type": "string", + "example": "976e6288-5960-4c8d-b53e-17b4f6892480" + }, + "purchaseGroupUid": { + "type": "string", + "example": "53bfc4fb-389d-4c17-a5d6-7e6902e3839b" + }, + "productKey": { + "type": "string", + "example": "classplanner.prospects" + }, + "purchaseItems": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "quantity": { + "type": "number", + "example": 150 + }, + "undiscoveredQuantity": { + "type": "number", + "example": 150 + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "Processing", + "Delivered", + "Complete" + ], + "example": "Processing" + }, + "sfStatus": { + "type": "string", + "enum": [ + "Pending", + "Allocating", + "Processing", + "Complete" + ], + "example": "Processing" + }, + "listGenerated": { + "type": "boolean", + "example": false + }, + "listPath": { + "type": "string", + "example": "some s3 path" + }, + "quantity": { + "type": "number", + "example": 500 + }, + "costInPoints": { + "type": "number", + "example": 10020 + }, + "costInDollars": { + "type": "number", + "example": 1245.5 + }, + "date": { + "type": "number", + "example": 1530556037946 + }, + "deliveries": { + "type": "array", + "items": { + "$ref": "#/definitions/Delivery" + } + }, + "created": { + "$ref": "#/definitions/EcommerceCreated" + } + } + }, + "FulfillmentSchedule": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "273f5933-7ba9-4bcc-8e7a-b513594e692a" + }, + "organizationUid": { + "type": "string", + "example": "c50d3be8-d15c-44b6-8310-91df948af6da" + }, + "purchaseGroupUid": { + "type": "string", + "example": "0811f429-715c-41db-8115-60d36b2ac07e" + }, + "active": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "Ready", + "Processing", + "Complete", + "Error" + ] + }, + "schedules": { + "type": "array", + "items": { + "$ref": "#/definitions/Schedule" + } + }, + "minimumRecords": { + "type": "integer", + "minimum": 0, + "example": 500 + }, + "lastFulfillment": { + "type": "number", + "example": 1501684404478 + }, + "reason": { + "type": "string", + "example": "Fulfillment schedule process interrupted" + }, + "orderUid": { + "type": "string", + "example": "976e6288-5960-4c8d-b53e-17b4f6892480" + } + } + }, + "FulfillmentScheduleResponse": { + "type": "object", + "properties": { + "fulfillmentSchedules": { + "type": "array", + "items": { + "$ref": "#/definitions/FulfillmentSchedule" + } + }, + "currentCount": { + "type": "number", + "example": 100 + }, + "totalCount": { + "type": "number", + "example": 1000 + }, + "nextOffset": { + "type": "number", + "example": 100 + } + } + }, + "StudentReportDetail": { + "type": "object", + "example": { + "studentReportId": "0000479b-8660-4e8c-9240-c597c0399914", + "scoreReportFileId": "3d64ea29-b0b2-4e9f-90b3-6c0d2339314c", + "examineeUid": "4cc45f65-ce89-4160-adbb-56933884de57", + "actCollegeCode": "0015", + "actId": "-99515212", + "firstName": "XOWUT", + "middleName": "Q", + "lastName": "JUXCUD", + "address": "9607 XUGOAR FUYID", + "city": "TEMVFAMX", + "state": "WP", + "zipCode": "93379", + "birthDate": "07/14/1952", + "testDate": "04/2019", + "highSchoolGraduationYear": "2020", + "highSchoolCode": "430070", + "highSchoolClassSize": "5", + "highSchoolType": "1", + "highSchoolRank": "3", + "highSchoolGPA": "3", + "highSchoolProgramType": "2", + "interestMajor": "552", + "majorAssurance": "2", + "collegeChoice": "2", + "collegeType": "1", + "studentBody": "1", + "location": "43", + "size": "9", + "actScore": { + "composite": "21", + "math": "20", + "science": "21", + "english": "22", + "reading": "22", + "writing": "", + "STEM": "21", + "ELA": "--", + "careerReadiness": "21" + }, + "processDate": 1565197117112, + "exportDate": 1571939119805, + "registrationId": "67127120", + "cancel": false, + "cancelReason": "", + "canceledAt": 1571939119805, + "reinstatedAt": 1571939133597, + "organization": { + "CLCopy": "0", + "IDCL": "3994", + "ECLCN": "MELINDA THOMAS", + "ECLCT": "DIR OF UG ADMISSIONS/SSAC 120", + "ECLN": "MIDDLE TENNESSEE STATE UNIVERSITY", + "ECLA": "1301 EAST MAIN STREET", + "ECLCITY": "MURFREESBORO", + "ECLST": "TN", + "ECLZIP": "37132", + "GPACS1": "", + "GPACS2": "", + "GPACS3": "", + "GPACS4": "", + "GPACS5": "", + "SCCS1": "", + "SCCS2": "", + "SCCS3": "", + "SCCS4": "", + "SCCS5": "" + } + } + }, + "GeneralStudentReport": { + "type": "object", + "example": { + "studentReportId": "0000479b-8660-4e8c-9240-c597c0399914", + "scoreReportFileId": "3d64ea29-b0b2-4e9f-90b3-6c0d2339314c", + "examineeUid": "4cc45f65-ce89-4160-adbb-56933884de57", + "actCollegeCode": "0015", + "actId": "-99515212", + "firstName": "XOWUT", + "lastName": "JUXCUD", + "city": "TEMVFAMX", + "state": "WP", + "birthDate": "07/14/1952", + "testDate": "04/2019", + "highSchoolCode": "430070", + "processDate": 1565197117112, + "exportDate": 1566270000000, + "registrationId": "816496456", + "cancel": false, + "cancelReason": "", + "canceledAt": 1571939119805, + "reinstatedAt": 1571939133597, + "actScore": { + "composite": "21" + }, + "organization": { + "CLCopy": "0", + "IDCL": "3994", + "ECLCN": "MELINDA THOMAS", + "ECLCT": "DIR OF UG ADMISSIONS/SSAC 120", + "ECLN": "MIDDLE TENNESSEE STATE UNIVERSITY", + "ECLA": "1301 EAST MAIN STREET", + "ECLCITY": "MURFREESBORO", + "ECLST": "TN", + "ECLZIP": "37132", + "GPACS1": "", + "GPACS2": "", + "GPACS3": "", + "GPACS4": "", + "GPACS5": "", + "SCCS1": "", + "SCCS2": "", + "SCCS3": "", + "SCCS4": "", + "SCCS5": "" + } + } + }, + "UpdatedStudent": { + "type": "object", + "example": { + "scoreReportFileId": "3d64ea29-b0b2-4e9f-90b3-6c0d2339314c", + "collegeChoices": [ + "0015", + "0000", + "0011" + ], + "actId": "-99515212", + "firstName": "XOWUT", + "lastName": "JUXCUD", + "city": "TEMVFAMX", + "state": "WP", + "birthDate": "07/14/1952", + "testDate": "04/2019", + "highSchoolCode": "430070", + "processDate": 1565197117112, + "exportDate": 1566270000000, + "registrationId": "816496456", + "cancel": false, + "cancelReason": "", + "canceledAt": 1571939119805, + "reinstatedAt": 1571939133597, + "actScore": { + "composite": "21" + } + } + }, + "StudentDeliveryRequest": { + "type": "object", + "properties": { + "examineeUid": { + "type": "string", + "example": "0000479b-8660-4e8c-9240-c597c0399914" + }, + "scoreReportUid": { + "type": "string", + "example": "3d64ea29-b0b2-4e9f-90b3-6c0d2339314c" + } + } + }, + "StudentScoreReportDelivery": { + "type": "object", + "properties": { + "url": { + "type": "string", + "example": "file_name.pdf" + }, + "fileName": { + "type": "string", + "example": "https://dev.s3.amazonaws.com/score-reporter/file_name.pdf" + } + } + }, + "ScoreReport": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "11896062-5f13-43fc-8ddb-0e5bb747f6fb" + }, + "fulfillmentUid": { + "type": "string", + "example": "22896062-5f13-43fc-8ddb-0e5bb747faaa" + }, + "pdfFilePath": { + "type": "string", + "example": "ACT-MIDWESTERN STATE UNIVERSITY-11212019-225836.pdf" + }, + "dataFilePath": { + "type": "string", + "example": "ACT-MIDWESTERN STATE UNIVERSITY-11212019-225836.txt" + }, + "organization": { + "type": "object" + }, + "students": { + "type": "array", + "items": { + "type": "string", + "example": "44896cc2-5f13-21fc-8ddb-0e5bb747faaa" + } + }, + "pdfVersion": { + "type": "string", + "example": "4.0.4" + }, + "dataVersion": { + "type": "string", + "example": "4.0.3" + }, + "uploadedAt": { + "type": "number", + "example": 1280777199966 + }, + "exportedAt": { + "type": "number", + "example": 1380777199967 + }, + "createdAt": { + "type": "number", + "example": 1480777199968 + } + } + }, + "UpdateScoreReportRequest": { + "type": "object", + "properties": { + "exportedAt": { + "type": "number", + "example": 1580777199968 + } + } + }, + "UpdateStudentsRequest": { + "type": "object", + "properties": { + "exportedAt": { + "type": "number", + "example": 1580777199968 + } + } + }, + "UpdateStudentsResponse": { + "type": "object", + "properties": { + "documentsModified": { + "type": "number", + "example": 5 + } + } + }, + "OrganizationSettings": { + "type": "object", + "properties": { + "superScoreSettings": { + "$ref": "#/definitions/SuperScoreSettings" + } + } + }, + "SuperScoreSettings": { + "type": "object", + "properties": { + "deliverySchedule": { + "type": "string", + "example": "Daily" + }, + "suppressFederallyReportedEthn": { + "type": "boolean", + "example": true + }, + "suppressStudentSelectedEthn": { + "type": "boolean", + "example": false + }, + "supressReligiousAffiliation": { + "type": "boolean", + "example": true + } + } + }, + "SuperScoreOrganization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "44896cc2-5f13-21fc-8ddb-0e5bb747faaa" + }, + "organizationUid": { + "type": "string", + "example": "28896cc2-5f14-31fc-8ddb-0e5bb747fjjj" + }, + "name": { + "type": "string", + "example": "University of Dallas" + }, + "fice": { + "type": "string", + "example": "001122" + }, + "actCode": { + "type": "string", + "example": "0122" + }, + "settings": { + "$ref": "#/definitions/SuperScoreSettings" + }, + "created": { + "$ref": "#/definitions/EcommerceCreated" + } + } + }, + "ExportHistory": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "00ef4d2d-d617-4040-8ccc-d8ee0c336322" + }, + "student_key": { + "type": "string", + "example": "23052834" + }, + "submitted_by": { + "type": "string", + "example": "72a9095b-8807-4a77-a21f-4bf335c5c7c4" + }, + "submitted_at": { + "type": "string", + "example": "2020-04-28T12:34:56" + }, + "recipient_org": { + "type": "string", + "example": "4ab0025f-400b-46de-aaa9-bb2c1aa32b30" + }, + "credential_type": { + "type": "string", + "example": "transcript" + }, + "file_id": { + "type": "string", + "example": "e8e8ae33-974b-4929-95cf-e405cb564728" + }, + "first_export_date": { + "type": "string", + "example": "2020-06-25T12:03:50.408000" + }, + "removed_by": { + "type": "string", + "example": "Gustavo" + }, + "removed_reason": { + "type": "string", + "example": "some reason" + }, + "export_id": { + "type": "string", + "example": "8c2b651e-c178-40a4-ad2a-b6da08ff310c" + }, + "file": { + "type": "object", + "properties": { + "file_id": { + "type": "string", + "example": "e8e8ae33-974b-4929-95cf-e405cb564728" + }, + "file_url": { + "type": "string", + "example": "student-23052834-transcript.pdf" + }, + "file_size": { + "type": "number", + "example": 19571 + }, + "display_name": { + "type": "string", + "example": "Student 23052834 Transcript" + } + } + }, + "student": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "23052834" + }, + "seq_num": { + "type": "string", + "example": "30238402" + }, + "first_name": { + "type": "string", + "example": "Hank" + }, + "last_name": { + "type": "string", + "example": "Hill" + }, + "dob": { + "type": "string", + "example": "2003-02-11" + }, + "city": { + "type": "string", + "example": "Arlen" + }, + "state": { + "type": "string", + "example": "TX" + }, + "grad_year": { + "type": "number", + "example": 2020 + }, + "high_school_id": { + "type": "string", + "example": "10285143" + }, + "high_school": { + "type": "object", + "properties": { + "high_school_id": { + "type": "string", + "example": "10285143" + }, + "ceeb": { + "type": "string", + "example": "000001" + }, + "name": { + "type": "string", + "example": "ABC High School" + }, + "hs_ums_id": { + "type": "string", + "example": "05ebd45c-e828-4298-b08e-fd1184915705" + } + } + } + } + }, + "export": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "8c2b651e-c178-40a4-ad2a-b6da08ff310c" + }, + "file_path": { + "type": "string", + "example": "score-reporter\\\\ACT-TRENHOLM-STATE-TECH-COLL-TRENHOLM-CMP-07012019-211525.pdf" + }, + "file_size": { + "type": "number", + "example": 5000 + }, + "created": { + "type": "object", + "properties": { + "created_by": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "created_at": { + "type": "string" + } + } + }, + "product_key": { + "type": "string" + }, + "source_id": { + "type": "string" + }, + "first_export_date": { + "type": "string" + }, + "is_combined": { + "type": "boolean" + }, + "combined_exports": { + "type": "array", + "items": { + "type": "string" + } + }, + "deliveries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "date": { + "type": "string" + }, + "method": { + "type": "string" + }, + "file_type": { + "type": "string" + }, + "layout": { + "type": "string" + }, + "file_path": { + "type": "string" + }, + "combined_export": { + "type": "string" + } + } + } + } + } + } + } + }, + "CombinedExportRequest": { + "type": "object", + "required": [ + "uids" + ], + "properties": { + "method": { + "type": "string", + "example": "api" + }, + "uids": { + "type": "array", + "items": { + "type": "string", + "example": "80561bdb-399b-4cb1-b6b9-b3bbc6c14e9e" + } + }, + "layout": { + "type": "string", + "example": "test_layout" + }, + "application": { + "type": "string", + "example": "datalab" + }, + "file_path": { + "type": "string", + "example": "file-name-2020-01-01.zip" + }, + "student": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "example": "first" + }, + "lastName": { + "type": "string", + "example": "last" + } + } + }, + "created_by": { + "$ref": "#/definitions/createdBy" + } + } + }, + "SingleExportRequest": { + "type": "object", + "properties": { + "method": { + "type": "string", + "example": "client" + }, + "layout": { + "type": "string", + "example": "test_layout" + }, + "application": { + "type": "string", + "example": "datalab" + }, + "created_by": { + "$ref": "#/definitions/createdBy" + } + } + }, + "ListCredentialRequest": { + "type": "object", + "properties": { + "firstNameFilter": { + "type": "string", + "example": "Johnson" + }, + "historyFilter": { + "type": "string", + "example": "new" + }, + "itemsPerPage": { + "type": "number", + "example": 25 + }, + "lastNameFilter": { + "type": "string", + "example": "" + }, + "offset": { + "type": "number", + "example": 0 + }, + "typeFilter": { + "type": "array", + "items": { + "type": "string", + "example": "interim-transcript" + } + } + } + }, + "ListCredentialResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "student_credentials": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ItemCredentialResponse" + } + }, + "total_count": { + "type": "number" + } + } + } + } + } + } + }, + "ItemCredentialResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "00ef4d2d-d617-4040-8ccc-d8ee0c336322" + }, + "credential_type": { + "type": "string", + "example": "transcript" + }, + "file": { + "type": "object", + "properties": { + "file_id": { + "type": "string", + "example": "e8e8ae33-974b-4929-95cf-e405cb564728" + }, + "file_url": { + "type": "string", + "example": "student-23052834-transcript.pdf" + }, + "file_size": { + "type": "number", + "example": 19571 + }, + "display_name": { + "type": "string", + "example": "Student 23052834 Transcript" + } + } + }, + "first_export_date": { + "type": "string", + "example": "2020-06-25T12:03:50.408000" + }, + "student": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "23052834" + }, + "seq_num": { + "type": "string", + "example": "30238402" + }, + "first_name": { + "type": "string", + "example": "Hank" + }, + "last_name": { + "type": "string", + "example": "Hill" + }, + "dob": { + "type": "string", + "example": "2003-02-11" + }, + "city": { + "type": "string", + "example": "Arlen" + }, + "state": { + "type": "string", + "example": "TX" + }, + "grad_year": { + "type": "number", + "example": 2020 + }, + "high_school_id": { + "type": "string", + "example": "10285143" + }, + "high_school": { + "type": "object", + "properties": { + "high_school_id": { + "type": "string", + "example": "10285143" + }, + "ceeb": { + "type": "string", + "example": "000001" + }, + "name": { + "type": "string", + "example": "ABC High School" + }, + "hs_ums_id": { + "type": "string", + "example": "05ebd45c-e828-4298-b08e-fd1184915705" + } + } + } + } + }, + "submitted_at": { + "type": "string", + "example": "2020-04-28T12:34:56" + } + } + }, + "FulfillmentScoreReporter": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "273f5933-7ba9-4bcc-8e7a-b513594e692a" + }, + "fice": { + "type": "string", + "example": "001024" + }, + "organizationUid": { + "type": "string", + "example": "0811f429-715c-41db-8115-60d36b2ac07e" + }, + "productKey": { + "type": "string", + "example": "score-reporter" + }, + "purchaseItems": { + "type": "array", + "items": { + "type": "object" + } + }, + "status": { + "type": "string", + "enum": [ + "Processing", + "Delivered", + "Complete" + ], + "example": "Processing" + }, + "listGenerated": { + "type": "boolean", + "example": false + }, + "listPath": { + "type": "string", + "example": "some s3 path" + }, + "quantity": { + "type": "number", + "example": 500 + }, + "costInPoints": { + "type": "number", + "example": 10020 + }, + "costInDollars": { + "type": "number", + "example": 1245.5 + }, + "date": { + "type": "number", + "example": 1530556037946 + }, + "deliveries": { + "type": "array", + "items": { + "$ref": "#/definitions/Delivery" + } + }, + "created": { + "$ref": "#/definitions/EcommerceCreated" + } + } + }, + "Delivery": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "273f5933-7ba9-4bcc-8e7a-b513594e692a" + }, + "lroUid": { + "type": "string", + "example": "046dcbb1-9528-4104-88cd-b9bd3d508353" + }, + "triggeredBy": { + "type": "string", + "enum": [ + "Client", + "Service" + ], + "example": "Client" + }, + "method": { + "type": "string", + "enum": [ + "Download", + "Email", + "FTP" + ], + "example": "Download" + }, + "email": { + "type": "string", + "example": "email@nrccua.org" + }, + "date": { + "type": "number", + "example": 1530556037946 + }, + "combined": { + "type": "boolean", + "example": false + }, + "file": { + "$ref": "#/definitions/DeliveryFile" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/DeliveryFile" + } + }, + "download": { + "type": "object", + "properties": { + "downloadedBy": { + "type": "string", + "example": "Pedro Artiga" + }, + "date": { + "type": "number", + "example": 1530556037946 + } + } + }, + "requested": { + "type": "object", + "properties": { + "requestedBy": { + "type": "string", + "example": "Pedro Artiga" + }, + "date": { + "type": "number", + "example": 1530556037946 + } + } + }, + "created": { + "$ref": "#/definitions/EcommerceCreated" + } + } + }, + "EcommerceCreated": { + "type": "object", + "properties": { + "createdBy": { + "$ref": "#/definitions/createdBy" + }, + "createdAt": { + "type": "number", + "example": 1501684404478 + } + } + }, + "createdBy": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "82c096b2-f9be-4c4e-b2f5-291ce144aed3" + }, + "name": { + "type": "string", + "example": "Son Goku" + }, + "type": { + "type": "string", + "example": "LdapUser" + } + } + }, + "DeliveryFile": { + "type": "object", + "properties": { + "generated": { + "type": "boolean", + "example": false + }, + "type": { + "type": "string", + "enum": [ + "csv", + "json", + "pdf", + "txt", + "xlsx", + "xls" + ], + "example": "csv" + }, + "layout": { + "type": "string", + "enum": [ + "NRCCUA", + "ACT", + "ENCOURA" + ], + "example": "NRCCUA" + }, + "includeHeaderRow": { + "type": "boolean", + "example": false + }, + "source": { + "type": "string", + "example": "some file path" + }, + "path": { + "type": "string", + "example": "some file path" + }, + "bucket": { + "type": "string", + "example": "some s3 bucket where the file is stored" + } + } + }, + "HTTPValidationError": { + "type": "object", + "properties": { + "detail": { + "title": "Detail", + "type": "array", + "items": { + "$ref": "#/definitions/ValidationError" + } + } + } + }, + "ProductTypeModel": { + "enum": [ + "legacy", + "enrollment", + "ematch" + ], + "type": "string", + "description": "An enumeration." + }, + "ValidationError": { + "title": "ValidationError", + "required": [ + "loc", + "msg", + "type" + ], + "type": "object", + "properties": { + "loc": { + "title": "Location", + "type": "array", + "items": { + "type": "string" + } + }, + "msg": { + "title": "Message", + "type": "string" + }, + "type": { + "title": "Error Type", + "type": "string" + } + } + }, + "Body_generate_file_headers_map_metadata_headers_map_put": { + "title": "Body_generate_file_headers_map_metadata_headers_map_put", + "required": [ + "headers", + "productType" + ], + "type": "object", + "properties": { + "headers": { + "title": "File Headers", + "type": "array", + "items": { + "type": "string" + }, + "description": "Comma separated collection of strings that represent headers from file" + }, + "productType": { + "title": "Product type", + "allOf": [ + { + "$ref": "#/definitions/ProductTypeModel" + } + ], + "description": "Product type for which you want to get list of fields" + } + } + }, + "Body_save_file_headers_and_generate_signed_url_metadata_post": { + "title": "Body_save_file_headers_and_generate_signed_url_metadata_post", + "required": [ + "fileName", + "productType" + ], + "type": "object", + "properties": { + "fileName": { + "title": "File name", + "type": "string", + "description": "Signed URL will be generated to save file with this name." + }, + "productType": { + "title": "Product type", + "allOf": [ + { + "$ref": "#/definitions/ProductTypeModel" + } + ] + } + } + }, + "Body_save_file_headers_map_and_trigger_processing": { + "title": "Body_save_file_headers_map_and_trigger_processing", + "required": [ + "additionalProp1", + "additionalProp2", + "additionalProp3" + ], + "type": "object", + "properties": { + "additionalProp1": { + "title": "Additional Prop1", + "type": "string", + "description": "Mapped Header" + }, + "additionalProp2": { + "title": "Additional Prop2", + "type": "string", + "description": "Mapped Header" + }, + "additionalProp3": { + "title": "Additional Prop3", + "type": "string", + "description": "Mapped Header" + } + } + }, + "FieldMapModel": { + "title": "FieldMapModel", + "type": "object", + "properties": { + "fileHeader": { + "title": "Fileheader", + "type": "string", + "description": "Field name from the CSV file." + }, + "field": { + "title": "Field", + "type": "string", + "description": "Field name we expect to see." + }, + "isRequired": { + "title": "Isrequired", + "type": "boolean", + "description": "This field must be mapped to a file header." + } + }, + "description": "Field metadata model. If field matches one of the file headers the fileHeader filed would be set." + }, + "FileRecordModel": { + "title": "FileRecordModel", + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "description": "Unique record ID" + }, + "filePath": { + "title": "Filepath", + "type": "string", + "description": "Name of the file" + }, + "productType": { + "allOf": [ + { + "$ref": "#/definitions/ProductTypeModel" + } + ], + "description": "Product type for this file", + "default": "legacy" + }, + "status": { + "allOf": [ + { + "$ref": "#/definitions/FileStatusModel" + } + ], + "description": "Processing status for this file", + "default": "uploading" + }, + "userName": { + "title": "Username", + "type": "string", + "description": "Full User name who uploaded this file." + }, + "uploadDate": { + "title": "Uploaddate", + "type": "string", + "description": "Date when file was uploaded.", + "format": "date" + }, + "recordVolume": { + "title": "Recordvolume", + "type": "integer", + "description": "Number of records in the file. When file is processed by the backend this number is updated.", + "default": 0 + } + }, + "description": "This is the description of the main model" + }, + "FileStatusModel": { + "title": "FileStatusModel", + "enum": [ + "uploading", + "analyzing", + "analyzed", + "enqueued", + "processing", + "failure", + "done", + "canceled" + ], + "type": "string", + "description": "An enumeration." + }, + "FileMetadataModel": { + "title": "File metadata model", + "type": "object", + "properties": { + "totalRows": { + "title": "Totalrows", + "type": "integer", + "description": "Total File Rows" + }, + "headers": { + "title": "Headers", + "type": "array", + "items": { + "$ref": "#/definitions/Header" + }, + "description": "Headers provided for file" + }, + "data": { + "title": "Data", + "type": "array", + "items": { + "type": "string" + }, + "description": "First 50 records for uploaded file" + }, + "headersMap": { + "title": "Headers Mapping for this file and product type", + "type": "array", + "items": { + "$ref": "#/definitions/FieldMapModel" + }, + "description": "First 50 records for uploaded file" + } + } + }, + "Header": { + "title": "Header", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the header where the count of empty rows is performed" + }, + "emptyRows": { + "title": "Emptyrows", + "type": "integer", + "description": "Number of empty rows corresponding to the header", + "default": 0 + } + } + }, + "FileRecordModelWithMeta": { + "title": "FileRecordModel", + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "title": "Id", + "type": "string", + "description": "Unique record ID" + }, + "filePath": { + "title": "Filepath", + "type": "string", + "description": "Name of the file" + }, + "productType": { + "allOf": [ + { + "$ref": "#/definitions/ProductTypeModel" + } + ], + "description": "Product type for this file", + "default": "legacy" + }, + "status": { + "allOf": [ + { + "$ref": "#/definitions/FileStatusModel" + } + ], + "description": "Processing status for this file", + "default": "uploading" + }, + "userName": { + "title": "Username", + "type": "string", + "description": "Full User name who uploaded this file." + }, + "uploadDate": { + "title": "Uploaddate", + "type": "string", + "description": "Date when file was uploaded.", + "format": "date" + }, + "recordVolume": { + "title": "Recordvolume", + "type": "integer", + "description": "Number of records in the file. When file is processed by the backend this number is updated.", + "default": 0 + }, + "meta": { + "title": "Meta", + "allOf": [ + { + "$ref": "#/definitions/FileMetadataModel" + } + ], + "description": "Metadata for this file, created by file analyzer." + }, + "userSelectedHeaders": { + "title": "Userselectedheaders", + "type": "object", + "description": "File header mapping selected by the user" + }, + "error": { + "title": "fileError", + "type": "string", + "description": "Error produced if file upload caused any errors while uploading" + } + }, + "description": "This is the description of the main model" + }, + "Body_charts_post": { + "title": "Body_charts_post", + "required": [ + "reportKey", + "aggregationKey", + "filterValues" + ], + "type": "object", + "properties": { + "reportKey": { + "title": "Report key", + "type": "string", + "description": "Unique identifier for any given report", + "example": "enrollmentlens.strategicOverview" + }, + "aggregationKey": { + "title": "Aggregation key", + "type": "string", + "description": "Unique identifier for any given aggregation", + "example": "enrollmentlens.strategicOverview.funnelComparison" + }, + "filterValues": { + "title": "Filter Values", + "type": "array", + "description": "list of filters to apply to the query", + "items": { + "type": "object", + "properties": { + "values": { + "description": "Specific values to apply to the query, used as an IN('value1', 'value2') in the query", + "type": "array", + "items": { + "type": "string", + "example": "2020" + } + }, + "filter": { + "type": "object", + "properties": { + "filterKey": { + "type": "string", + "description": "Unique key for the filter to be applied to the query", + "example": "enrollmentlens.strategicInsight.funnelComparison.date1" + } + } + } + } + } + } + } + } + } +} diff --git a/test/test_data/generateRoutes/OpenAPIV3NoJSONResponse.json b/test/test_data/generateRoutes/OpenAPIV3NoJSONResponse.json new file mode 100644 index 0000000..0383c33 --- /dev/null +++ b/test/test_data/generateRoutes/OpenAPIV3NoJSONResponse.json @@ -0,0 +1,87 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Encourage Service", + "description": "Encourage Service endpoints used by Encourage clients and other internal services", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.dev-encourage.myoptions.org/v1", + "description": "URL for \"development\" environment" + } + ], + "paths": { + "/health": { + "get": { + "tags": [ + "Health" + ], + "summary": "Health Checker", + "operationId": "health", + "description": "Check service status and environment", + "responses": { + "200": { + "description": "OK", + "content": { + "application/xml": { + "schema": { + "type": "object", + "properties": { + "database": { + "type": "string", + "example": "development" + }, + "email": { + "type": "string", + "example": "development" + }, + "genericCache": { + "type": "string", + "example": "development" + }, + "myOptions": { + "type": "string", + "example": "development" + }, + "secondarySchoolService": { + "type": "string", + "example": "development" + }, + "studentCredentials": { + "type": "string", + "example": "development" + }, + "studentService": { + "type": "string", + "example": "development" + }, + "ums": { + "type": "string", + "example": "development" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + } + }, + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "externalDocs": { + "url": "https://nrccua.atlassian.net/wiki/spaces/MDL/pages/102531073/API+Design+Guidelines", + "description": "Learn more about operations on request/response fields provided by this service." + } +} diff --git a/test/test_data/generateRoutes/OpenAPIV3NoRef.json b/test/test_data/generateRoutes/OpenAPIV3NoRef.json new file mode 100644 index 0000000..b1dcc00 --- /dev/null +++ b/test/test_data/generateRoutes/OpenAPIV3NoRef.json @@ -0,0 +1,17999 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Encourage Service", + "description": "Encourage Service endpoints used by Encourage clients and other internal services", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.dev-encourage.myoptions.org/v1", + "description": "URL for \"development\" environment" + } + ], + "paths": { + "/health": { + "get": { + "tags": [ + "Health" + ], + "summary": "Health Checker", + "operationId": "health", + "description": "Check service status and environment", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "database": { + "type": "string", + "example": "development" + }, + "email": { + "type": "string", + "example": "development" + }, + "genericCache": { + "type": "string", + "example": "development" + }, + "myOptions": { + "type": "string", + "example": "development" + }, + "secondarySchoolService": { + "type": "string", + "example": "development" + }, + "studentCredentials": { + "type": "string", + "example": "development" + }, + "studentService": { + "type": "string", + "example": "development" + }, + "ums": { + "type": "string", + "example": "development" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/login": { + "post": { + "tags": [ + "Authorization" + ], + "summary": "Authenticates a user", + "operationId": "login", + "security": [ + { + "AWS": [] + } + ], + "requestBody": { + "required": true, + "description": "email and password to be used in the authentication process. If acceptedTerms is set to true, it will update user's terms attribute", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "test@mail.com" + }, + "password": { + "type": "string", + "format": "password", + "example": "testPassword" + }, + "acceptedTerms": { + "type": "boolean", + "example": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "sessionToken": { + "type": "string", + "format": "byte", + "example": "Base64 string" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Missing user credentials (email and/or password)" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/activate-user": { + "post": { + "tags": [ + "Authorization" + ], + "summary": "Activate user", + "operationId": "activateUser", + "description": "Verifies user e-mail and if e-mail is valid, activate user and set userName and password as provided on body.", + "security": [ + { + "AWS": [] + } + ], + "requestBody": { + "required": true, + "description": "Body contains the user e-mail to be verified and the verificationCode, which corresponds to the authToken \n in the user model; the userName to be set; the password; and user uid", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "verificationCode", + "userName", + "password" + ], + "properties": { + "verificationCode": { + "type": "string", + "example": "$2a$10$aslynLtrxxuZXFgKSYf4Bae.4D8Mm6aG/m/nqORbiByEVpqndy3coi" + }, + "userName": { + "type": "string", + "example": "admin" + }, + "password": { + "type": "string", + "example": "p455w0rd" + }, + "acceptedTerms": { + "type": "boolean", + "example": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "User successfully verified", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/forgot-password": { + "post": { + "tags": [ + "Authorization" + ], + "summary": "Send forgot password e-mail", + "operationId": "forgotPassword", + "description": "Requests a password change. An e-mail with instructions on how to change the password will be sent to the configured user e-mail.", + "security": [ + { + "AWS": [] + } + ], + "requestBody": { + "required": true, + "description": "Body should have the e-mail or userName of the user that forgot his password", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "credential": { + "type": "string", + "example": "admin@nrccua.org" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + } + } + } + }, + "204": { + "description": "No Content" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/reset-password": { + "post": { + "tags": [ + "Authorization" + ], + "summary": "Reset or change user password", + "operationId": "resetPassword", + "description": "Changes user password to a new password provided in the request body.", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "requestBody": { + "required": true, + "description": "Body must always contain the newPassword field.\n This route has different behaviors depending on headers and body provided:\n
    \n \n
  • \n A logged in LDAP user can change any user's password based on uid or email\n
    \n Authentication header with JWT is required; request body must have either uid or email:\n
    \n
    \n \n {\n \"uid\": \"eabac226-5706-4e7c-812c-00b19e2ddf4b\",\n \"email\": \"user@mail.com\",\n \"newPassword\": \"password123\"\n }\n \n
    \n
  • \n
    \n \n
  • \n A logged in regular user can change his own password\n
    \n Authentication header with JWT is required; request body must have current password:\n
    \n
    \n \n {\n \"password\": \"something456\",\n \"newPassword\": \"password123\"\n }\n \n
    \n
  • \n
    \n \n
  • \n A user can change his password by following the forgot email link, which contains a verification code\n
    \n Authentication header must be omitted; request body must have the verificationCode:\n
    \n
    \n \n {\n \"verificationCode\": \"$2a$10$asynLtrxxuZXFgKSYf4Bae.4D8Mm6aG/m/nqORbiByEVpqndy3coi\",\n \"newPassword\": \"admin\"\n }\n \n
    \n
  • \n
    \n
      ", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "newPassword" + ], + "properties": { + "uid": { + "type": "string", + "example": "eabac226-5706-4e7c-812c-00b19e2ddf4b" + }, + "email": { + "type": "string", + "example": "admin@nrccua.org" + }, + "password": { + "type": "string", + "example": "password" + }, + "newPassword": { + "type": "string", + "example": "admin" + }, + "verificationCode": { + "type": "string", + "example": "$2a$10$asynLtrxxuZXFgKSYf4Bae.4D8Mm6aG/m/nqORbiByEVpqndy3coi" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + } + } + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Missing required field" + }, + "403": { + "description": "Info doesn't match" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/refresh-token": { + "get": { + "tags": [ + "Authorization" + ], + "summary": "Refresh JWT", + "operationId": "refreshJWT", + "description": "Return a new Json Web Token with a refreshed expiration time.", + "security": [ + { + "AWS": [] + } + ], + "responses": { + "200": { + "description": "JWT successfully refreshed", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sessionToken": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/authorize-module/{moduleIdentifier}": { + "get": { + "tags": [ + "Authorization" + ], + "summary": "Check authorization to module", + "operationId": "checkModuleAuthorization", + "description": "Check authorization to module by moduleIdentifier (it could be both uid or key).", + "security": [ + { + "AWS": [] + } + ], + "parameters": [ + { + "name": "moduleIdentifier", + "in": "path", + "description": "Module identifier (can be uid or key)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "overwrites", + "in": "query", + "description": "Send it as 'true' to receive attribute overwrites. Default is false.", + "schema": { + "type": "string", + "enum": [ + true, + false + ] + } + } + ], + "responses": { + "200": { + "description": "User has access to module", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorize": { + "type": "boolean", + "example": true + }, + "credentials": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "testUser" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "email": { + "type": "string", + "example": "testUserEmail" + }, + "status": { + "type": "string", + "example": "Active" + }, + "exp": { + "type": "integer" + }, + "iss": { + "type": "string" + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + } + } + } + }, + "roles": { + "type": "array", + "example": [] + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/validate-email": { + "post": { + "tags": [ + "Authorization" + ], + "summary": "Validate Email", + "operationId": "validateEmail", + "description": "Return a flag indicating if e-mails is valid (not used yet) or invalid.", + "security": [ + { + "AWS": [] + } + ], + "requestBody": { + "required": true, + "description": "Body must contain the e-mail to be validated, in other words, an e-mail that uniqueness will be verified.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "son.goku@capsule-corp.org" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Email validated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isEmailUnique": { + "type": "boolean", + "example": true + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/identify-email": { + "post": { + "tags": [ + "Authorization" + ], + "summary": "Identify Email", + "operationId": "identifyEmail", + "description": "Identify whether the email exists in UMS (`existing`) and is supported (`supported`) by Encourage. DataLab users are not supported.", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "requestBody": { + "required": true, + "description": "Body must contain the e-mail to be identified.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email" + ], + "properties": { + "email": { + "type": "string", + "example": "testemail@test.com" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "existing": { + "type": "boolean", + "example": true + }, + "supported": { + "type": "boolean", + "example": true + }, + "isActive": { + "type": "boolean", + "example": false + } + } + } + } + } + }, + "400": { + "description": "Missing email" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/validate-username": { + "post": { + "tags": [ + "Authorization" + ], + "summary": "Validate Username", + "operationId": "validateUsername", + "description": "Return flags indicating if username is valid (not used yet) or invalid.", + "security": [ + { + "AWS": [] + } + ], + "requestBody": { + "required": true, + "description": "Body must contain the username to be validated.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "userName": { + "type": "string", + "example": "son.goku" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Username validated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isUsernameUnique": { + "type": "boolean", + "example": true + }, + "isUsernameValid": { + "type": "boolean", + "example": true + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/detailed-permissions": { + "get": { + "tags": [ + "Authorization" + ], + "summary": "Gets a list of user orgs with permissions", + "description": "Gets a user org list for the requester and adds boolean flag for each attribute in userOrg permissions, if permission is false, it won't be returned", + "operationId": "getOrgPermissions", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "organization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "role": { + "type": "string", + "example": "teacher" + } + } + }, + "permissions": { + "type": "object", + "properties": { + "applicationManagement": { + "type": "boolean" + }, + "credentialSubmission": { + "type": "boolean" + }, + "highSchoolAdmin": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/generic-permissions": { + "get": { + "tags": [ + "Authorization" + ], + "summary": "Gets user's access to each encourage module", + "description": "Returns object containing information whether user is authorized or not for each module associated with encourage application", + "operationId": "getGlobalPermissions", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mentoring": { + "type": "boolean" + }, + "applicationManagement": { + "type": "boolean" + }, + "research": { + "type": "boolean" + }, + "credentialSubmission": { + "type": "boolean" + }, + "highSchoolAdmin": { + "type": "boolean" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/users": { + "get": { + "tags": [ + "User" + ], + "summary": "Gets a list of Encourage Users", + "description": "If the requesting user has the readUserList permission module, gets a list of users", + "operationId": "getUsers", + "parameters": [ + { + "in": "query", + "name": "searchStr", + "schema": { + "type": "string", + "example": "stringToSearch" + }, + "required": false, + "description": "Filter users list by searchStr. Example: searchStr=Abbott. \n This will get all users containing Abbott in an important field (firstName, lastName, userName, email)" + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "default": 20, + "minimum": 1 + }, + "required": false, + "description": "Size limit for returned array" + }, + { + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "required": false, + "description": "Offset for the data to be returned" + }, + { + "in": "query", + "name": "firstName", + "schema": { + "type": "string", + "example": "Jack|Jackson" + }, + "description": "Filter user list by firstName Example: firstName=Jack|Jackson This will get all users with firstName matching \"Jack\" or \"Jackson\"\n" + }, + { + "in": "query", + "name": "lastName", + "schema": { + "type": "string", + "example": "Sam|Samwise" + }, + "description": "Filter user list by lastName Example: lastName=Sam|Samwise This will get all users with lastName matching \"Sam\" or \"Samwise\"\n" + }, + { + "in": "query", + "name": "email", + "schema": { + "type": "string", + "example": "mail@mal.com" + }, + "description": "Filter user list by email Example: firstName=mail@mail.com This will get the user with email \"mail@mail.com\"\n" + }, + { + "in": "query", + "name": "status", + "schema": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ] + }, + "required": false, + "description": "Filters list by status" + }, + { + "in": "query", + "name": "createdAt", + "schema": { + "type": "string", + "example": "2020-03-26T17:16:46.872Z" + }, + "description": "Filter by createdAt. Example 2020-03-26T17:16:46.872Z" + }, + { + "in": "query", + "name": "verifiedDate", + "schema": { + "type": "string", + "example": "2020-03-26T17:16:46.872Z" + }, + "description": "Filter by verifiedDate. Example 2020-03-26T17:16:46.872Z" + }, + { + "in": "query", + "name": "ignore", + "schema": { + "type": "string", + "example": "firstName|lastName" + }, + "required": false, + "description": "List of user fields to ignore on search when passing searchStr parameter.\n Example: ignore=firstName|lastName" + }, + { + "in": "query", + "name": "type", + "schema": { + "type": "string", + "example": "User" + }, + "description": "Filter user list by type Example: type=User This will get all users which are of User type" + }, + { + "in": "query", + "name": "externalId", + "schema": { + "type": "string", + "example": "HC000123" + } + }, + { + "in": "query", + "name": "externalSource", + "schema": { + "type": "string", + "example": "contact_id" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + }, + "post": { + "tags": [ + "User" + ], + "summary": "Creates a new Encourage User", + "description": "Creates a new user passing user data. Not all user model fields are required, check its description for reference.\n The \"permissions\" and \"roles\" fields require special permissions to be added. When making an user inactive, it also removes its Admin status.", + "operationId": "createUser", + "parameters": [ + { + "name": "Send-Email", + "in": "header", + "description": "Indicates whether an actual email should be sent or not. For security reasons the default behavior is to not send any email.\n", + "schema": { + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "firstName", + "lastName", + "email" + ], + "properties": { + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + }, + "permissions": { + "type": "array", + "items": { + "type": "object", + "required": [ + "moduleKey" + ], + "properties": { + "moduleKey": { + "type": "string", + "example": "encourage.engagementanalytics.marketingconversion" + }, + "permissionOverwrite": { + "type": "boolean", + "example": true + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "User created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + } + }, + "headers": { + "total-count": { + "schema": { + "type": "integer" + }, + "description": "The total number of resources for the input query" + }, + "total-pages": { + "schema": { + "type": "integer" + }, + "description": "The total number of pages considering the input query and the limit query parameter" + }, + "prev-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the previous set of resources considering the same input query and the limit parameter" + }, + "next-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the next set of resources considering the same input query and the limit parameter" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/users/{uid}": { + "get": { + "tags": [ + "User" + ], + "summary": "Finds an Encourage User by UID", + "description": "Returns a single user by its UID", + "operationId": "readUser", + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + }, + "put": { + "tags": [ + "User" + ], + "summary": "Updates an Encourage User", + "description": "Updates an user identified by UID. Parameters to be updated are provided in the requested body and correspond to the \n fields described in user model. Valid user fields not shown in the model will be ignored in update (createAt, lastUpdated, ...). \n All parameters are optional, but at least one parameter must be provided in the request body for the request to succeed. \n The UID field can be provided but must match the one provided in path.", + "operationId": "updateUser", + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "cell_phone": { + "type": "string", + "example": "2025550152" + }, + "fax_phone": { + "type": "string", + "example": "2025550152" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + }, + "delete": { + "tags": [ + "User" + ], + "summary": "Deletes an Encourage User", + "description": "Sets an user as inactive in the database. Can't delete oneself.", + "operationId": "deleteUser", + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User successfully deleted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "messsage": { + "type": "string", + "example": "Success" + } + } + } + } + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/users/{uid}/impersonate": { + "post": { + "tags": [ + "User" + ], + "summary": "Impersonate an Encourage User", + "description": "Impersonate an user by its UID", + "operationId": "impersonateUser", + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Impersonation successful", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "impersonatingUser": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "sessionToken": { + "type": "string", + "format": "byte", + "example": "Base64 string" + } + } + } + } + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + }, + "delete": { + "tags": [ + "User" + ], + "summary": "Stops impersonating an Encourage User", + "description": "Stops impersonating an user by its UID and JWT payload. JWT should be the same as the one \n created in the POST impersonate route. An JWT obtained from the login route won't work on this route", + "operationId": "stopImpersonateUser", + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stopped impersonation successful", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "sessionToken": { + "type": "string", + "format": "byte", + "example": "Base64 string" + } + } + } + } + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/users/signup": { + "post": { + "tags": [ + "User" + ], + "summary": "Submits a new user support ticket", + "description": "Sends an email to support, containing related high school and user data", + "operationId": "userSignup", + "security": [ + { + "AWS": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "required": [ + "firstName", + "lastName", + "email", + "description", + "title" + ], + "properties": { + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "description": { + "type": "string", + "example": "School Administrator", + "enum": [ + "school_administrator", + "school_counselor", + "parent_guardian", + "other_mentor" + ] + }, + "title": { + "type": "string", + "example": "Principal" + } + } + }, + "secondarySchool": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "hs_id": { + "type": "string", + "example": "HS021361" + }, + "name": { + "type": "string", + "example": "Stanfield Johnson" + }, + "city": { + "type": "string", + "example": "Stanfield" + }, + "state": { + "type": "string", + "example": "WA" + }, + "address": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "url": { + "type": "string", + "example": "www.school.com" + } + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created" + }, + "400": { + "description": "Bad Request" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/users/{uid}/activate": { + "post": { + "tags": [ + "User" + ], + "summary": "Activate Educator", + "description": "Activate an educator account", + "operationId": "activateEducator", + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "acceptedTerms", + "contactId", + "password", + "email" + ], + "properties": { + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "acceptedTerms": { + "type": "boolean" + }, + "contactId": { + "type": "string", + "example": "HC123456" + }, + "password": { + "type": "string", + "example": "P@ssw0rd" + }, + "email": { + "type": "string", + "example": "test@email.com" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users/{uid}/setup-mco-user": { + "post": { + "tags": [ + "User" + ], + "summary": "Sets up the Encourage User's MCO data from a UMS user.", + "description": "[LDAP ONLY] An Encourage user is composed by multiple parts, one of them being in MCO. This uses existing UMS data to set up\n the MCO part of a user in AWS DB and EncourageDB.\n One use case for this is finishing users that have been created from the Migrator Lambdas or directly in UMS.", + "operationId": "setupMcoUser", + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "prefix": { + "type": "string", + "example": "Mr." + } + }, + "required": [ + "firstName", + "lastName" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/users/{uid}/pre-activate-educator": { + "post": { + "tags": [ + "User" + ], + "summary": "Pre-activate Educator users coming from the Migrator lambdas and assign them a random password.", + "description": "[LDAP ONLY] For a user that has been created from the Migrator Lambdas or directly in UMS, and is Pending,\n this route will do the following:
      \n - set up the user as Active and with terms accepted in UMS
      \n - define a random generated password", + "operationId": "preActivateEducator", + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/users/contact/{contact_id}": { + "get": { + "tags": [ + "User" + ], + "summary": "Get a User's status by contact id", + "description": "Returns a user's status and email given its contact_id external Id", + "operationId": "getUserStatusByContactId", + "parameters": [ + { + "name": "contact_id", + "in": "path", + "description": "The external ID, contact_id, of the educator contact", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + } + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users/contact/{contact_id}/generate-code": { + "post": { + "tags": [ + "User" + ], + "summary": "Generates a verification code", + "description": "For a user that has been created from the Migrator Lambdas or directly in UMS, and is Pending,\n this route will generate a validation code and send an email containing it to the user", + "operationId": "generateCode", + "parameters": [ + { + "name": "contact_id", + "in": "path", + "description": "The external ID, contact_id, of the educator contact", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "User not found for contact_id = {contact_id}" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/users/contact/{contact_id}/validate-code": { + "post": { + "tags": [ + "User" + ], + "summary": "Validate a verification code", + "description": "Validates a verification code for a user that is trying to activate their account", + "operationId": "validateCode", + "parameters": [ + { + "name": "contact_id", + "in": "path", + "description": "The external ID, contact_id, of the educator contact", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "verificationCode": { + "type": "string", + "example": "111555" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + }, + "schoolName": { + "type": "string", + "example": "NitzscheandSons", + "nullable": true + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "429": { + "description": "Too Many Requests" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/log": { + "post": { + "tags": [ + "Logger" + ], + "summary": "Logs a message", + "operationId": "log", + "description": "Logs a message", + "requestBody": { + "required": true, + "description": "Logger message, level, and metadata.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Generic warning message" + }, + "level": { + "type": "string", + "example": "warn" + }, + "metadata": { + "type": "object" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Message successfully logged", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Generic warning message" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/mentoring": { + "get": { + "tags": [ + "Student" + ], + "summary": "Get MyStudents data for the EncourageUser's related students", + "operationId": "getMentoringStudents", + "description": "An Encourage User can have linked students in MyOptions and students related to administered survey programs \n if the user is an educator. This route fetches student data related to MyStudents from those two sources.", + "parameters": [ + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "default": 20, + "minimum": 1, + "maximum": 20 + }, + "required": false, + "description": "Size limit for returned array, max = 20" + }, + { + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "required": false, + "description": "Offset for the data to be returned" + }, + { + "in": "query", + "name": "gradYears", + "schema": { + "type": "array", + "items": { + "type": "integer" + }, + "minItems": 1 + }, + "explode": false, + "required": false, + "description": "List of student graduation years for filtering" + }, + { + "in": "query", + "name": "hsIds", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "HS001234", + "HS054321" + ] + }, + "explode": false, + "required": false, + "description": "List of MCO's HS IDs for filtering" + }, + { + "in": "query", + "name": "sort", + "schema": { + "type": "string", + "example": "fieldName(asc),otherFieldName(desc)" + }, + "required": false, + "description": "Specifies sorting and sort order by fields" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "576173212", + "description": "This is the primary key" + }, + "sequence_number": { + "type": "string", + "example": "34653" + }, + "last_activity_date": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T19:01:01.088Z" + }, + "first_name": { + "type": "string", + "example": "UserFirstName" + }, + "middle_name": { + "type": "string", + "example": "UserMiddleName" + }, + "last_name": { + "type": "string", + "example": "UserLastName" + }, + "gender": { + "type": "string", + "example": "F" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "example": "1996-05-23T00:00:00.000Z" + }, + "graduation_year": { + "type": "integer", + "example": 2018 + }, + "relationship_type_keys": { + "type": "array", + "example": [ + 8 + ] + }, + "answers": { + "type": "object", + "example": {} + }, + "checklist_items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 27 + }, + "title": { + "type": "string", + "example": "Checklist item title" + }, + "deadline": { + "type": "string", + "format": "date-time", + "example": "2018-09-24T01:38:17.690Z" + }, + "high_school_grade": { + "type": "integer", + "minimum": 0, + "maximum": 4, + "example": 2 + }, + "semester": { + "type": "integer", + "minimum": 1, + "maximum": 2, + "example": 2 + }, + "status": { + "type": "integer", + "minimum": 0, + "maximum": 2, + "example": 1 + } + } + } + } + } + } + } + } + }, + "headers": { + "total-count": { + "schema": { + "type": "integer" + }, + "description": "The total number of resources for the input query" + }, + "total-pages": { + "schema": { + "type": "integer" + }, + "description": "The total number of pages considering the input query and the limit query parameter" + }, + "prev-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the previous set of resources considering the same input query and the limit parameter" + }, + "next-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the next set of resources considering the same input query and the limit parameter" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "EncourageUser not found in the database" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/students/mentoring/search": { + "get": { + "tags": [ + "Student" + ], + "summary": "Search in EncourageUser's related students", + "operationId": "searchStudents", + "description": "Searches through all the user's related student's by their full name.", + "parameters": [ + { + "in": "query", + "name": "relationshipTypes", + "schema": { + "type": "string", + "enum": [ + "mentoring", + "counseling" + ] + }, + "required": false, + "description": "Parameter to filter results based on the relationship type" + }, + { + "in": "query", + "name": "search", + "schema": { + "type": "string", + "example": "Stan" + }, + "required": false, + "description": "Used for filtering results based on a search string" + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "default": 20, + "minimum": 1 + }, + "required": false, + "description": "Size limit for returned array" + }, + { + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "required": false, + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "576173212", + "description": "This is the primary key" + }, + "first_name": { + "type": "string", + "example": "UserFirstName" + }, + "last_name": { + "type": "string", + "example": "UserLastName" + }, + "graduation_year": { + "type": "integer", + "example": 2018 + } + } + } + } + } + }, + "headers": { + "total-count": { + "schema": { + "type": "integer" + }, + "description": "The total number of resources for the input query" + }, + "total-pages": { + "schema": { + "type": "integer" + }, + "description": "The total number of pages considering the input query and the limit query parameter" + }, + "prev-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the previous set of resources considering the same input query and the limit parameter" + }, + "next-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the next set of resources considering the same input query and the limit parameter" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/students/application-management/{hsId}": { + "get": { + "tags": [ + "Student" + ], + "summary": "Get a user's related application management students", + "operationId": "getStudentAppMan", + "description": "Get a student list with application status for the informed secondary school if the user has access to it", + "parameters": [ + { + "name": "hsId", + "in": "path", + "description": "Unique ID for MCO High School", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "default": 20, + "minimum": 1 + }, + "required": false, + "description": "Size limit for returned array" + }, + { + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "required": false, + "description": "Offset for the data to be returned" + }, + { + "in": "query", + "name": "sort", + "schema": { + "type": "string", + "example": "fieldName(asc),otherFieldName(desc)" + }, + "required": false, + "description": "Specifies sorting and sort order by fields" + }, + { + "in": "query", + "name": "gradYears", + "schema": { + "type": "array", + "items": { + "type": "integer" + }, + "minItems": 1 + }, + "explode": false, + "required": true, + "description": "List of student graduation years for filtering" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "576173212", + "description": "This is the primary key" + }, + "sequence_number": { + "type": "string", + "example": "34653" + }, + "last_activity_date": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T19:01:01.088Z" + }, + "first_name": { + "type": "string", + "example": "UserFirstName" + }, + "middle_name": { + "type": "string", + "example": "UserMiddleName" + }, + "last_name": { + "type": "string", + "example": "UserLastName" + }, + "gender": { + "type": "string", + "example": "F" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "example": "1996-05-23T00:00:00.000Z" + }, + "graduation_year": { + "type": "integer", + "example": 2018 + }, + "relationship_type_keys": { + "type": "array", + "example": [ + 8 + ] + }, + "answers": { + "type": "object", + "properties": { + "ANSWER_1": { + "type": "array", + "items": { + "type": "string" + } + }, + "ANSWER_2": { + "type": "array", + "items": { + "type": "string" + } + }, + "ANSWER_n": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "is_approved": { + "type": "boolean", + "example": true + }, + "is_auto_login": { + "type": "boolean", + "example": true + }, + "is_active_login": { + "type": "boolean", + "example": true + }, + "address_1": { + "type": "string", + "example": "Street, 250" + }, + "address_2": { + "type": "string", + "example": "Street, 250" + }, + "zip": { + "type": "string", + "example": "111111" + }, + "state": { + "type": "string", + "example": "TX" + }, + "city": { + "type": "string", + "example": "Austin" + }, + "is_valid_address": { + "type": "boolean", + "example": true + }, + "cell_phone": { + "type": "string", + "example": "55511234" + }, + "home_phone": { + "type": "string", + "example": "55511234" + }, + "parents": { + "type": "object", + "properties": { + "one": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "string" + }, + "first_name": { + "type": "string", + "example": "string" + }, + "last_name": { + "type": "string", + "example": "string" + } + } + }, + "two": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "string" + }, + "first_name": { + "type": "string", + "example": "string" + }, + "last_name": { + "type": "string", + "example": "string" + } + } + } + } + }, + "userSchool": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "102482975" + }, + "school_id": { + "type": "integer", + "example": 1 + }, + "application_status_key": { + "type": "string", + "enum": [ + "INITIAL", + "APPLYING_0", + "APPLYING_25", + "APPLYING_50", + "APPLYING_75", + "APPLIED", + "ACCEPTED", + "NOT_ACCEPTED", + "ENROLLING", + "NOT_ENROLLING", + "DEFERRED_WAITLISTED" + ] + }, + "update_increment": { + "type": "integer", + "example": 1 + }, + "is_bookmarked": { + "type": "boolean", + "example": true + }, + "is_declared": { + "type": "boolean", + "example": true + }, + "is_quickmatch": { + "type": "boolean", + "example": false + }, + "is_aos": { + "type": "boolean", + "example": false + }, + "application_status": { + "type": "string", + "example": "applying" + }, + "applying_percent": { + "type": "integer", + "example": 75 + }, + "school": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + }, + "has_campus_image_1x1": { + "type": "boolean" + }, + "has_campus_image_16x9": { + "type": "boolean" + }, + "slug_name": { + "type": "string", + "example": "test-university-1" + }, + "images": { + "type": "object", + "properties": { + "logo": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/logo.png" + }, + "1x1_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + } + } + } + } + } + } + } + } + } + } + } + }, + "headers": { + "total-count": { + "schema": { + "type": "integer" + }, + "description": "The total number of resources for the input query" + }, + "total-pages": { + "schema": { + "type": "integer" + }, + "description": "The total number of pages considering the input query and the limit query parameter" + }, + "prev-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the previous set of resources considering the same input query and the limit parameter" + }, + "next-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the next set of resources considering the same input query and the limit parameter" + } + } + }, + "400": { + "description": "Invalid hsId" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/application-management/{hsId}/search": { + "get": { + "tags": [ + "Student" + ], + "summary": "Search user's related application management students", + "operationId": "searchStudentAppMan", + "description": "Get a list of students matching the search criteria", + "parameters": [ + { + "name": "hsId", + "in": "path", + "description": "Unique ID for MCO High School", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "default": 20, + "minimum": 1 + }, + "required": false, + "description": "Size limit for returned array" + }, + { + "in": "query", + "name": "search", + "schema": { + "type": "string", + "example": "Stan" + }, + "required": true, + "description": "Used for filtering results based on a search string" + }, + { + "in": "query", + "name": "gradYears", + "schema": { + "type": "array", + "items": { + "type": "integer" + }, + "minItems": 1 + }, + "explode": false, + "required": true, + "description": "List of student graduation years for filtering" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "576173212", + "description": "This is the primary key" + }, + "first_name": { + "type": "string", + "example": "UserFirstName" + }, + "last_name": { + "type": "string", + "example": "UserLastName" + } + } + } + } + } + }, + "headers": { + "total-count": { + "schema": { + "type": "integer" + }, + "description": "The total number of resources for the input query" + }, + "total-pages": { + "schema": { + "type": "integer" + }, + "description": "The total number of pages considering the input query and the limit query parameter" + }, + "prev-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the previous set of resources considering the same input query and the limit parameter" + }, + "next-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the next set of resources considering the same input query and the limit parameter" + } + } + }, + "400": { + "description": "Missing search param" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}": { + "get": { + "tags": [ + "Student" + ], + "summary": "Get a user's related student base MCO info", + "operationId": "getStudent", + "description": "Get a specific student's base info related to the user, searching by its key and checking by relationship type.", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "relationshipTypes", + "schema": { + "type": "string", + "enum": [ + "mentoring", + "counseling" + ] + }, + "required": false, + "description": "Parameter to filter results based on the relationship type" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "576173212", + "description": "This is the primary key" + }, + "entity_type_key": { + "type": "integer", + "example": 3 + }, + "sequence_number": { + "type": "string", + "example": "34653" + }, + "username": { + "type": "string", + "example": "user@ma.il" + }, + "last_activity_date": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T19:01:01.088Z" + }, + "email": { + "type": "string", + "format": "email", + "example": "user@ma.il" + }, + "first_name": { + "type": "string", + "example": "UserFirstName" + }, + "middle_name": { + "type": "string", + "example": "UserMiddleName" + }, + "last_name": { + "type": "string", + "example": "UserLastName" + }, + "gender": { + "type": "string", + "example": "F" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "example": "1996-05-23T00:00:00.000Z" + }, + "graduation_year": { + "type": "integer", + "example": 2018 + }, + "high_school": { + "type": "object", + "properties": { + "hs_id": { + "type": "string", + "example": "userHighSchoolId" + }, + "name": { + "type": "string", + "example": "userHighSchoolName" + } + } + }, + "relationship_type_keys": { + "type": "array", + "example": [ + 8 + ] + }, + "answers": { + "type": "object", + "example": {} + }, + "is_approved": { + "type": "boolean", + "example": true + }, + "is_auto_login": { + "type": "boolean", + "example": true + }, + "is_active_login": { + "type": "boolean", + "example": true + }, + "address_1": { + "type": "string", + "example": "Street, 250" + }, + "address_2": { + "type": "string", + "example": "Street, 250" + }, + "zip": { + "type": "string", + "example": "111111" + }, + "state": { + "type": "string", + "example": "TX" + }, + "city": { + "type": "string", + "example": "Austin" + }, + "is_valid_address": { + "type": "boolean", + "example": true + }, + "cell_phone": { + "type": "string", + "example": "55511234" + }, + "home_phone": { + "type": "string", + "example": "55511234" + }, + "parents": { + "type": "object", + "properties": { + "one": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "string" + }, + "first_name": { + "type": "string", + "example": "string" + }, + "last_name": { + "type": "string", + "example": "string" + } + } + }, + "two": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "string" + }, + "first_name": { + "type": "string", + "example": "string" + }, + "last_name": { + "type": "string", + "example": "string" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid studentKey" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "Student not found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}/application-management": { + "get": { + "tags": [ + "Student" + ], + "summary": "Get a user's related student application management details info", + "operationId": "getStudentAppManDetails", + "description": "Get application management details for the informed student if the user has access to the same school as the student.", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "default": 20, + "minimum": 1 + }, + "required": false, + "description": "Size limit for returned array" + }, + { + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "required": false, + "description": "Offset for the data to be returned" + }, + { + "in": "query", + "name": "sort", + "schema": { + "type": "string", + "example": "fieldName(asc),otherFieldName(desc)" + }, + "required": false, + "description": "Specifies sorting and sort order by fields" + }, + { + "name": "collegeId", + "in": "query", + "description": "Unique ID (mcocid) for MCO college", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Cache-Control", + "in": "header", + "description": "Informs the service that it should skip cache reading (no-cache), writing (no-store) or both in this request", + "schema": { + "type": "string", + "enum": [ + "no-cache", + "no-store", + "no-cache no-store" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "student": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "576173212", + "description": "This is the primary key" + }, + "first_name": { + "type": "string", + "example": "UserFirstName" + }, + "last_name": { + "type": "string", + "example": "UserLastName" + } + } + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "102482975" + }, + "school_id": { + "type": "integer", + "example": 1 + }, + "application_status_key": { + "type": "string", + "enum": [ + "APPLYING_0", + "APPLYING_25", + "APPLYING_50", + "APPLYING_75", + "APPLIED", + "ACCEPTED", + "NOT_ACCEPTED", + "ENROLLING", + "NOT_ENROLLING", + "DEFERRED_WAITLISTED" + ] + }, + "update_increment": { + "type": "integer", + "example": 1 + }, + "is_bookmarked": { + "type": "boolean", + "example": true + }, + "is_declared": { + "type": "boolean", + "example": true + }, + "is_quickmatch": { + "type": "boolean", + "example": false + }, + "is_aos": { + "type": "boolean", + "example": false + }, + "application_status": { + "type": "string", + "example": "applying" + }, + "applying_percent": { + "type": "integer", + "example": 75 + }, + "school": { + "type": "object", + "properties": { + "urls": { + "type": "object", + "properties": { + "main": { + "type": "string", + "example": "https://www.test.com" + }, + "inquiry": { + "type": "string", + "example": "https://www.test.com" + }, + "schedule_visit": { + "type": "string", + "example": "https://www.test.com" + }, + "admissions_blog": { + "type": "string", + "example": "https://www.test.com" + } + } + } + } + }, + "credentials": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx", + "description": "This is the primary key" + }, + "export_id": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx" + }, + "credential_type": { + "type": "string", + "enum": [ + "final-transcript", + "interim-transcript", + "recommendation", + "application-essay", + "fee-waiver", + "personal-statement", + "portfolio-manuscript", + "resume", + "other" + ] + }, + "submitted_at": { + "type": "string", + "example": "1558984276791" + }, + "first_export_date": { + "type": "string", + "example": "1558984276791" + }, + "removed_by": { + "type": "string", + "example": "removedBy" + } + } + } + }, + "externalCredential": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx", + "description": "This is the primary key" + }, + "studentKey": { + "type": "string", + "example": "15556777" + }, + "fice": { + "type": "string", + "example": "123778" + }, + "submissionDate": { + "type": "string", + "example": "1558984276791" + }, + "submittedBy": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx" + }, + "removed_by": { + "type": "string", + "example": "removedBy" + } + } + }, + "isSupported": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "headers": { + "total-count": { + "schema": { + "type": "integer" + }, + "description": "The total number of resources for the input query" + }, + "total-pages": { + "schema": { + "type": "integer" + }, + "description": "The total number of pages considering the input query and the limit query parameter" + }, + "prev-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the previous set of resources considering the same input query and the limit parameter" + }, + "next-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the next set of resources considering the same input query and the limit parameter" + } + } + }, + "400": { + "description": "Invalid studentKey" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Student not found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}/checklist": { + "get": { + "tags": [ + "Student" + ], + "summary": "Get a user's related student checklist items", + "operationId": "getStudentChecklist", + "description": "Get a specific student's checklist items, searching by its key and checking by relationship type.", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "relationshipTypes", + "schema": { + "type": "string", + "enum": [ + "mentoring", + "counseling" + ] + }, + "required": false, + "description": "Parameter to filter results based on the relationship type" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 27 + }, + "is_visible": { + "type": "boolean", + "default": false, + "example": true + }, + "title": { + "type": "string", + "example": "Checklist item title" + }, + "description": { + "type": "string", + "example": "Checklist item description" + }, + "link": { + "type": "string", + "format": "uri", + "example": "https://some.link.here" + }, + "deadline": { + "type": "string", + "format": "date-time", + "example": "2018-09-24T01:38:17.690Z" + }, + "high_school_grade": { + "type": "integer", + "minimum": 0, + "maximum": 4, + "example": 2 + }, + "semester": { + "type": "integer", + "minimum": 1, + "maximum": 2, + "example": 2 + }, + "is_athlete": { + "type": "boolean", + "default": false, + "example": true + }, + "is_first_gen": { + "type": "boolean", + "default": false, + "example": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-04-24T01:38:17.690Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "deleted_at": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "integer", + "minimum": 0, + "maximum": 2, + "example": 1 + }, + "status_updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "personal_notes": { + "type": "string", + "example": "Checklist item personal notes" + } + } + } + } + } + } + }, + "400": { + "description": "Invalid studentKey" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "Student not found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}/test-scores": { + "get": { + "tags": [ + "Student" + ], + "summary": "Get a user's related student test scores", + "operationId": "getStudentTestScores", + "description": "Get a specific student's test scores, searching by its key and checking by relationship type.", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "relationshipTypes", + "schema": { + "type": "string", + "enum": [ + "mentoring", + "counseling" + ] + }, + "required": false, + "description": "Parameter to filter results based on the relationship type" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "gpa": { + "type": "object", + "properties": { + "total_score": { + "type": "number", + "format": "float", + "minimum": 0, + "maximum": 4, + "example": 3.9 + }, + "min_total_score": { + "type": "number", + "example": 0 + }, + "max_total_score": { + "type": "number", + "example": 4 + } + } + }, + "act": { + "type": "object", + "properties": { + "english": { + "type": "number", + "minimum": 1, + "maximum": 36, + "example": 34 + }, + "math": { + "type": "number", + "minimum": 1, + "maximum": 36, + "example": 34 + }, + "reading": { + "type": "number", + "minimum": 1, + "maximum": 36, + "example": 34 + }, + "science": { + "type": "number", + "minimum": 1, + "maximum": 36, + "example": 34 + }, + "total_score": { + "type": "number", + "minimum": 1, + "maximum": 36, + "example": 34 + }, + "min_score": { + "type": "number", + "example": 1 + }, + "max_score": { + "type": "number", + "example": 35 + }, + "min_total_score": { + "type": "number", + "example": 1 + }, + "max_total_score": { + "type": "number", + "example": 35 + } + } + }, + "sat": { + "type": "object", + "properties": { + "math": { + "type": "number", + "minimum": 200, + "maximum": 800, + "example": 700 + }, + "reading_writing": { + "type": "number", + "minimum": 200, + "maximum": 800, + "example": 700 + }, + "total_score": { + "type": "number", + "minimum": 1500, + "maximum": 400, + "example": 1600 + }, + "min_score": { + "type": "number", + "example": 200 + }, + "max_score": { + "type": "number", + "example": 800 + }, + "min_total_score": { + "type": "number", + "example": 400 + }, + "max_total_score": { + "type": "number", + "example": 1600 + } + } + }, + "psat": { + "type": "object", + "properties": { + "math": { + "type": "number", + "minimum": 200, + "maximum": 800, + "example": 700 + }, + "reading_writing": { + "type": "number", + "minimum": 200, + "maximum": 800, + "example": 700 + }, + "total_score": { + "type": "number", + "minimum": 1500, + "maximum": 400, + "example": 1600 + }, + "min_score": { + "type": "number", + "example": 200 + }, + "max_score": { + "type": "number", + "example": 800 + }, + "min_total_score": { + "type": "number", + "example": 400 + }, + "max_total_score": { + "type": "number", + "example": 1600 + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid studentKey" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "Student not found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}/survey-answers": { + "get": { + "tags": [ + "Student" + ], + "summary": "Get a user's related student survey answers", + "operationId": "getStudentSurveyAnswers", + "description": "Get a specific student's survey answers related to the user, searching by its key and checking by relationship type.", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "surveyYear", + "schema": { + "type": "number", + "example": 2020 + }, + "required": true, + "description": "MCO's Survey Year" + }, + { + "in": "query", + "name": "editions", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "mco", + "mop" + ] + }, + "example": [ + "mco", + "mop" + ] + }, + "required": false, + "description": "Survey editions" + }, + { + "in": "query", + "name": "relationshipTypes", + "schema": { + "type": "string", + "enum": [ + "mentoring", + "counseling" + ] + }, + "required": false, + "description": "Parameter to filter results based on the relationship type" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ANSWER_1": { + "type": "array", + "items": { + "type": "string" + } + }, + "ANSWER_2": { + "type": "array", + "items": { + "type": "string" + } + }, + "ANSWER_n": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "400": { + "description": "Invalid studentKey" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "Student not found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}/application-status": { + "get": { + "tags": [ + "Student" + ], + "summary": "Get a user related student's college application status", + "operationId": "getStudentAppStatus", + "description": "Get a specific student's college application status, searching by its key and checking by relationship type.", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "relationshipTypes", + "schema": { + "type": "string", + "enum": [ + "mentoring", + "counseling" + ] + }, + "required": false, + "description": "Parameter to filter results based on the relationship type" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "102482975" + }, + "school_id": { + "type": "integer", + "example": 1 + }, + "application_status_key": { + "type": "string", + "enum": [ + "INITIAL", + "APPLYING_0", + "APPLYING_25", + "APPLYING_50", + "APPLYING_75", + "APPLIED", + "ACCEPTED", + "NOT_ACCEPTED", + "ENROLLING", + "NOT_ENROLLING", + "DEFERRED_WAITLISTED" + ] + }, + "update_increment": { + "type": "integer", + "example": 1 + }, + "is_bookmarked": { + "type": "boolean", + "example": true + }, + "is_declared": { + "type": "boolean", + "example": true + }, + "is_quickmatch": { + "type": "boolean", + "example": false + }, + "is_aos": { + "type": "boolean", + "example": false + }, + "application_status": { + "type": "string", + "example": "applying" + }, + "applying_percent": { + "type": "integer", + "example": 75 + }, + "school": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + }, + "has_campus_image_1x1": { + "type": "boolean" + }, + "has_campus_image_16x9": { + "type": "boolean" + }, + "slug_name": { + "type": "string", + "example": "test-university-1" + }, + "images": { + "type": "object", + "properties": { + "logo": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/logo.png" + }, + "1x1_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + } + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid studentKey" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "Student not found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}/colleges": { + "get": { + "tags": [ + "Student" + ], + "summary": "Get a user's colleges", + "operationId": "getStudentColleges", + "description": "Get a specific student's colleges, searching by its key and checking by relationship type.", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "relationshipTypes", + "schema": { + "type": "string", + "enum": [ + "mentoring", + "counseling" + ] + }, + "required": false, + "description": "Parameter to filter results based on the relationship type" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "matched_colleges": { + "type": "array", + "items": { + "type": "object", + "properties": { + "mcocid": { + "type": "integer", + "example": 792 + }, + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + } + } + } + }, + "declared_colleges": { + "type": "array", + "items": { + "type": "object", + "properties": { + "mcocid": { + "type": "integer", + "example": 792 + }, + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + } + } + } + }, + "aos_colleges": { + "type": "array", + "items": { + "type": "object", + "properties": { + "mcocid": { + "type": "integer", + "example": 792 + }, + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + } + } + } + }, + "bookmarked_colleges": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + }, + "has_campus_image_1x1": { + "type": "boolean" + }, + "has_campus_image_16x9": { + "type": "boolean" + }, + "slug_name": { + "type": "string", + "example": "test-university-1" + }, + "images": { + "type": "object", + "properties": { + "logo": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/logo.png" + }, + "1x1_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + } + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Invalid studentKey" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "Student not found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}/scholarships": { + "get": { + "tags": [ + "Student" + ], + "summary": "Get a user's related student scholarships", + "operationId": "getStudentScholarships", + "description": "Get a specific student's scholarships, searching by its key and checking by relationship type.", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "relationshipTypes", + "schema": { + "type": "string", + "enum": [ + "mentoring", + "counseling" + ] + }, + "required": false, + "description": "Parameter to filter results based on the relationship type" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "AMOUNT": { + "type": "string", + "example": "$1,000-$12,500" + }, + "DEADLINE": { + "type": "string", + "example": "November 5" + }, + "PATRON_NM": { + "type": "string", + "example": "U.S. Bank" + }, + "SCHOL_NM": { + "type": "string", + "example": "U.S. Bank Scholarship Programme" + }, + "SORT_YEAR": { + "type": "integer", + "example": 2019 + }, + "S_UUID": { + "type": "string", + "example": "EC15DE51-5323-063F-5ED1551B4543BB44" + }, + "WEB_AMT": { + "type": "integer", + "example": 1250 + }, + "WEB_DAY": { + "type": "integer", + "example": 5 + }, + "WEB_MO": { + "type": "integer", + "example": 11 + } + } + } + } + } + } + }, + "400": { + "description": "Invalid studentKey" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "Student not found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}/colleges/{collegeFice}/credentials": { + "post": { + "tags": [ + "Credentials" + ], + "summary": "Add a new or replace student's credential to college", + "operationId": "createCredential", + "description": "Add or replace a student's credential to a specific college", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collegeFice", + "in": "path", + "description": "Unique ID for college", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "credentialToReplaceUid": { + "type": "string", + "example": "xxxx-xxx-xxxx-xxx" + }, + "type": { + "type": "string", + "example": "final-transcript", + "enum": [ + "final-transcript", + "interim-transcript", + "recommendation", + "application-essay", + "fee-waiver", + "personal-statement", + "portfolio-manuscript", + "resume", + "other" + ] + }, + "displayName": { + "type": "string", + "example": "example.pdf" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "credential": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx", + "description": "This is the primary key" + }, + "export_id": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx" + }, + "credential_type": { + "type": "string", + "enum": [ + "final-transcript", + "interim-transcript", + "recommendation", + "application-essay", + "fee-waiver", + "personal-statement", + "portfolio-manuscript", + "resume", + "other" + ] + }, + "submitted_at": { + "type": "string", + "example": "1558984276791" + }, + "first_export_date": { + "type": "string", + "example": "1558984276791" + }, + "removed_by": { + "type": "string", + "example": "removedBy" + }, + "file": { + "type": "object", + "example": { + "display_name": "displayName" + } + } + } + }, + "upload_url": { + "type": "string", + "example": "uploadUrl" + }, + "upload_fields": { + "type": "object", + "properties": { + "fieldKey": { + "type": "string", + "example": "fieldValue" + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + }, + "get": { + "tags": [ + "Credentials" + ], + "summary": "Get a student's credentials for a specific college", + "operationId": "getCredentials", + "description": "Get a student's credentials for a specific college", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collegeFice", + "in": "path", + "description": "Unique ID for college", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx", + "description": "This is the primary key" + }, + "export_id": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx" + }, + "credential_type": { + "type": "string", + "enum": [ + "final-transcript", + "interim-transcript", + "recommendation", + "application-essay", + "fee-waiver", + "personal-statement", + "portfolio-manuscript", + "resume", + "other" + ] + }, + "submitted_at": { + "type": "string", + "example": "1558984276791" + }, + "first_export_date": { + "type": "string", + "example": "1558984276791" + }, + "removed_by": { + "type": "string", + "example": "removedBy" + }, + "file": { + "type": "object", + "example": { + "display_name": "displayName" + } + }, + "url": { + "type": "string", + "example": "http://credential.url.org/credentialidonaremotebucketthatcanbeanything" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}/credentials/{credUid}": { + "post": { + "tags": [ + "Credentials" + ], + "summary": "Export a student's credential", + "operationId": "exportCredentials", + "description": "Export a specific student's credentials", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "credUid", + "in": "path", + "description": "Credential unique ID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx", + "description": "This is the primary key" + }, + "url": { + "type": "string", + "example": "http://credential.url.org/credentialidonaremotebucketthatcanbeanything" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + }, + "delete": { + "tags": [ + "Credentials" + ], + "summary": "Delete a student's credential", + "operationId": "deleteCredentials", + "description": "Delete a specific student's credentials", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "credUid", + "in": "path", + "description": "Credential unique ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "reason", + "schema": { + "type": "string", + "example": "reason" + }, + "description": "Text containing the reason to delete a credential" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/students/{key}/external-credentials/colleges/{collegeId}": { + "put": { + "tags": [ + "External Credentials" + ], + "summary": "Manual submission date", + "operationId": "createOrUpdateExternalCredential", + "description": "Create or update an External Credential when manually setting the credential submission date for a college", + "parameters": [ + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collegeId", + "in": "path", + "description": "Unique ID (mcocid) for MCO college", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "submissionDate" + ], + "properties": { + "submissionDate": { + "type": "string", + "format": "date-time", + "example": "2020-04-30T12:00:00.000Z" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + }, + "/high-schools/search": { + "get": { + "tags": [ + "High Schools" + ], + "summary": "Search secondary schools", + "operationId": "searchSecondarySchools", + "description": "Get a list of secondary schools given search parameters.This route has different behaviours depending on authentication provided:
      An authenticated LDAP user or a request without an Authorization Header can access all secondary schools.
      An authenticated user can only access secondary schools he is associated with.", + "parameters": [ + { + "in": "query", + "name": "search", + "schema": { + "type": "string", + "example": "Stan" + }, + "required": false, + "description": "Used for filtering results based on a search string" + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "default": 20, + "minimum": 1 + }, + "required": false, + "description": "Size limit for returned array" + }, + { + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "required": false, + "description": "Offset for the data to be returned" + }, + { + "name": "Cache-Control", + "in": "header", + "description": "Informs the service that it should skip cache reading (no-cache), writing (no-store) or both in this request", + "schema": { + "type": "string", + "enum": [ + "no-cache", + "no-store", + "no-cache no-store" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "required": [ + "hs_id", + "name", + "city", + "state" + ], + "properties": { + "hs_id": { + "type": "string", + "example": "HS021361" + }, + "name": { + "type": "string", + "example": "Stanfield Johnson" + }, + "city": { + "type": "string", + "example": "Stanfield" + }, + "state": { + "type": "string", + "example": "WA" + }, + "address": { + "type": "string", + "example": "3101 S Bagdad Rd" + } + } + } + } + } + }, + "headers": { + "total-count": { + "schema": { + "type": "integer" + }, + "description": "The total number of resources for the input query" + }, + "total-pages": { + "schema": { + "type": "integer" + }, + "description": "The total number of pages considering the input query and the limit query parameter" + }, + "prev-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the previous set of resources considering the same input query and the limit parameter" + }, + "next-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the next set of resources considering the same input query and the limit parameter" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/high-schools/{hsId}": { + "get": { + "tags": [ + "High Schools" + ], + "summary": "Get secondary school", + "operationId": "getSecondarySchool", + "description": "Gets a secondary school by ID. Only LDAP users can get school information.", + "parameters": [ + { + "name": "hsId", + "in": "path", + "description": "Unique ID for MCO High School", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hs_id": { + "type": "string", + "example": "HS021361" + }, + "name": { + "type": "string", + "example": "Stanfield Johnson" + }, + "city": { + "type": "string", + "example": "Stanfield" + }, + "state": { + "type": "string", + "example": "WA" + }, + "address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "address_2": { + "type": "string", + "example": "" + }, + "zip": { + "type": "string", + "example": "11222" + }, + "zip4": { + "type": "string", + "example": "2328" + }, + "usps_address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "usps_address_2": { + "type": "string", + "example": "" + }, + "usps_city": { + "type": "string", + "example": "Brooklyn" + }, + "usps_state": { + "type": "string", + "example": "NY" + }, + "usps_zip": { + "type": "string", + "example": "11222" + }, + "district": { + "type": "object", + "properties": { + "hs_id": { + "type": "string", + "example": "HS021361" + }, + "name": { + "type": "string", + "example": "Stanfield Johnson" + }, + "city": { + "type": "string", + "example": "Stanfield" + }, + "state": { + "type": "string", + "example": "WA" + }, + "address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "address_2": { + "type": "string", + "example": "" + }, + "zip": { + "type": "string", + "example": "11222" + }, + "zip4": { + "type": "string", + "example": "2328" + }, + "usps_address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "usps_address_2": { + "type": "string", + "example": "" + }, + "usps_city": { + "type": "string", + "example": "Brooklyn" + }, + "usps_state": { + "type": "string", + "example": "NY" + }, + "usps_zip": { + "type": "string", + "example": "11222" + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/high-schools/{hsId}/users": { + "post": { + "tags": [ + "High Schools" + ], + "summary": "Add user to secondary school", + "operationId": "addUser", + "description": "Adds a user to secondary school. User can be an existing UMS/MCO user, if not, they will be created and mapped on the encourage database", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "firstName", + "lastName", + "email", + "role", + "permissions" + ], + "properties": { + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "role": { + "type": "string", + "enum": [ + "counselor", + "principal", + "teacher", + "coach", + "teaching_assistant", + "superintendent", + "other" + ] + }, + "prefix": { + "type": "string", + "enum": [ + "mister", + "doctor", + "miss", + "misses" + ] + }, + "permissions": { + "type": "object", + "properties": { + "applicationManagement": { + "type": "boolean", + "example": true + }, + "credentialSubmission": { + "type": "boolean", + "example": false + }, + "highSchoolAdmin": { + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "hsId", + "in": "path", + "description": "Unique ID for MCO High School", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "userUid": { + "type": "string", + "example": "aa112233-444a-55aa-a66a-3f7e7baaafa3" + }, + "organizationUid": { + "type": "string", + "example": "aa112233-444a-55aa-a66a-3f7e7baaafa3" + }, + "updatedAt": { + "type": "string", + "example": "2020-06-11T20:30:52.408Z" + }, + "createdAt": { + "type": "string", + "example": "2020-06-11T20:30:52.408Z" + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "type": { + "type": "string", + "example": "Primary" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "High Schools" + ], + "summary": "Get a list of users of a secondary school", + "operationId": "getUserSecondarySchools", + "description": "Returns a list of users for that secondary school with count for number of active admins", + "parameters": [ + { + "name": "hsId", + "in": "path", + "description": "Unique ID for MCO High School", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "default": 20, + "minimum": 1 + }, + "required": false, + "description": "Size limit for returned array" + }, + { + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "required": false, + "description": "Offset for the data to be returned" + }, + { + "in": "query", + "name": "sort", + "schema": { + "type": "string", + "example": "fieldName(asc),otherFieldName(desc)" + }, + "required": false, + "description": "Specifies sorting and sort order by fields" + }, + { + "in": "query", + "name": "permission", + "schema": { + "type": "string", + "enum": [ + "applicationManagement", + "credentialSubmission" + ], + "example": "credentialSubmission" + }, + "description": "Filter results based on a specific user permission" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "userList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + } + } + }, + "organization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + } + } + }, + "type": { + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Admin" + ] + }, + "updatedAt": { + "type": "string", + "example": "2020-06-19T14:29:37.492Z" + }, + "createdAt": { + "type": "string", + "example": "2020-06-19T14:29:37.492Z" + } + } + } + }, + "adminCount": { + "type": "number", + "example": 2 + } + } + } + } + }, + "headers": { + "total-count": { + "schema": { + "type": "integer" + }, + "description": "The total number of resources for the input query" + }, + "total-pages": { + "schema": { + "type": "integer" + }, + "description": "The total number of pages considering the input query and the limit query parameter" + }, + "prev-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the previous set of resources considering the same input query and the limit parameter" + }, + "next-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the next set of resources considering the same input query and the limit parameter" + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "User has no access to this secondary school", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/high-schools/{hsId}/users/{uid}": { + "put": { + "tags": [ + "High Schools" + ], + "summary": "Edit user", + "operationId": "editUserHS", + "description": "Edit user role or permissions in a secondary school", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "counselor", + "principal", + "teacher", + "coach", + "teaching_assistant", + "superintendent", + "other" + ] + }, + "permissions": { + "type": "object", + "properties": { + "applicationManagement": { + "type": "boolean", + "example": true + }, + "credentialSubmission": { + "type": "boolean", + "example": false + }, + "highSchoolAdmin": { + "type": "boolean", + "example": true + } + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "hsId", + "in": "path", + "description": "Unique ID for MCO High School", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "aa112233-444a-55aa-a66a-3f7e7baaafa3" + }, + "message": { + "type": "string", + "example": "Success" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "High Schools" + ], + "summary": "Get user", + "operationId": "getUserHS", + "description": "Get full user with permissions in a secondary school", + "parameters": [ + { + "name": "hsId", + "in": "path", + "description": "Unique ID for MCO High School", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "permissions": { + "type": "object", + "properties": { + "applicationManagement": { + "type": "boolean", + "example": true + }, + "credentialSubmission": { + "type": "boolean", + "example": false + }, + "highSchoolAdmin": { + "type": "boolean", + "example": true + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "name": { + "type": "string", + "example": "Sample University" + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "prefix": { + "type": "string", + "enum": [ + "doctor", + "mr", + "mrs", + "ms" + ] + }, + "role": { + "type": "string", + "enum": [ + "counselor", + "principal", + "teacher", + "coach", + "teaching_assistant", + "superintendent", + "other" + ] + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "High Schools" + ], + "summary": "Delete school relation with user", + "operationId": "deletedUserSchool", + "description": "Deletes the relation between a secondary school and a user", + "parameters": [ + { + "name": "hsId", + "in": "path", + "description": "Unique ID for MCO High School", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Nonexisting secondary school" + }, + "401": { + "description": "User has no access to this secondary school", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "404": { + "description": "User has no relation with this secondary school to delete" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/high-schools/{hsId}/validate-email": { + "post": { + "tags": [ + "High Schools" + ], + "summary": "Validate email for associating account", + "operationId": "validateEmailHS", + "description": "Request UMS for provided email. If email is taken, return the user, else returns empty", + "parameters": [ + { + "name": "hsId", + "in": "path", + "description": "Unique ID for MCO High School", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "test@test.com" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/accept-invitation": { + "post": { + "tags": [ + "Invitations" + ], + "summary": "Accept invitation", + "operationId": "acceptInvitation", + "description": "Accept student invitation to be his/her mentor with an existing account of Encourage. Invited user must be authenticated.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "studentKey", + "mentorEmail", + "token" + ], + "properties": { + "studentKey": { + "type": "string", + "example": "9999999" + }, + "mentorEmail": { + "type": "string", + "example": "test@user.mail" + }, + "token": { + "type": "string", + "example": "12345" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Invalid user or missing body property" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Invalid invitation or wrong recipient" + }, + "409": { + "description": "Relationship already exists" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/activate-user-from-invitation": { + "post": { + "tags": [ + "Authorization", + "Invitations" + ], + "summary": "Activate user from invitation", + "operationId": "activateUserFromInvitation", + "description": "Create a new user in Encourage from a student invitation and associate the new user as student mentor. \n User must have accepted the Terms of Use and will not receive any activation email.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "token", + "mentorEmail", + "firstName", + "lastName", + "password", + "studentKey", + "role", + "acceptedTerms" + ], + "properties": { + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "token": { + "type": "string", + "example": "12345" + }, + "mentorEmail": { + "type": "string", + "example": "test@email.com" + }, + "password": { + "type": "string", + "example": "1a2b3c4d5e" + }, + "studentKey": { + "type": "string", + "example": "9999999" + }, + "role": { + "type": "string", + "enum": [ + "counselor", + "principal", + "teacher", + "coach", + "teaching_assistant", + "superintendent", + "other" + ] + }, + "acceptedTerms": { + "type": "boolean", + "example": true + }, + "prefix": { + "type": "string", + "enum": [ + "doctor", + "mr", + "mrs", + "ms" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Missing body property" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Invalid invitation" + }, + "409": { + "description": "Relationship already exists" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/invitations/{studentKey}/users/{mentorEmail}": { + "get": { + "tags": [ + "Invitations" + ], + "summary": "Get invitation details", + "operationId": "getInvitationDetails", + "description": "Get the details of a specific student invitation.", + "parameters": [ + { + "in": "query", + "name": "token", + "description": "The invitation validation token\n", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "mentorEmail", + "in": "path", + "description": "The invited mentor email, possibly already associated to an Encourage account", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "studentFirstName": { + "type": "string", + "example": "John" + }, + "studentLastName": { + "type": "string", + "example": "Longo" + }, + "studentEmail": { + "type": "string", + "example": "test@mail.com" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Invalid invitation" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/datagen": { + "post": { + "tags": [ + "Test Data" + ], + "summary": "Creates test data", + "operationId": "dataGen", + "description": "Creates an student on MO associated to an Encourage user", + "requestBody": { + "required": false, + "description": "Creates one student on myOptions, with default password `password` and emails based on the timestamp.\n Also creates a new Encourage user ready to use with access to Application Management and Mentoring, with the default password `password`.\n
      \n
      \n If you choose to use an existing Encourage user, inform its UID and it will be associated to the student.\n However, permission may have to be manually checked.\n
      \n
      \n There are multiple schemas below for this route depending if a new user is created or not and depending how the checklist items are updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "encUserUid": { + "type": "string", + "format": "uuid", + "example": "0f8ca33c-bd98-4f06-92a2-ab80bb07f965", + "description": "When used, associates students to this user instead of creating a new Encourage user, same as encUserEmail" + }, + "encUserEmail": { + "type": "string", + "format": "email", + "example": "test@mail.com", + "description": "When used, associates students to this user instead of creating a new Encourage user, same as encUserUid" + }, + "gradYear": { + "type": "number", + "default": 2022, + "example": 2021, + "description": "The default value is always equivalent to senior year" + }, + "hsId": { + "type": "string", + "default": "HS031635", + "example": "HS000593" + }, + "checklist": { + "type": "string", + "default": "empty", + "enum": [ + "empty", + "random", + "full" + ], + "description": "Random will pick 30 checklist item and set them as completed or archived" + }, + "fafsa": { + "type": "string", + "default": "MOPFAFSANOT", + "enum": [ + "random", + "MOPFAFSANOT", + "MOPFAFSASTARTED", + "MOPFAFSASUBMITTED", + "MOPFAFSASELECTED", + "MOPFAFSARESUBMITTED", + "MOPFAFSAACCEPTED" + ] + }, + "collegeApplications": { + "type": "object", + "example": { + "2": "APPLYING_25", + "6": "APPLIED", + "[id]": "[status]" + }, + "additionalProperties": { + "type": "string", + "enum": [ + "random", + "INITIAL", + "APPLYING_0", + "APPLYING_25", + "APPLYING_50", + "APPLYING_75", + "APPLIED", + "ACCEPTED", + "NOT_ACCEPTED", + "ENROLLING", + "NOT_ENROLLING", + "DEFERRED_WAITLISTED" + ] + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object", + "properties": { + "encourageUser": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "name": { + "type": "string", + "example": "Sample University" + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "prefix": { + "type": "string", + "enum": [ + "doctor", + "mr", + "mrs", + "ms" + ] + }, + "role": { + "type": "string", + "enum": [ + "counselor", + "principal", + "teacher", + "coach", + "teaching_assistant", + "superintendent", + "other" + ] + }, + "attributes": { + "type": "array", + "example": [] + }, + "entityKey": { + "type": "number", + "example": 1012030710 + } + } + }, + "secondarySchool": { + "type": "object", + "properties": { + "hs_id": { + "type": "string", + "example": "HS021361" + }, + "name": { + "type": "string", + "example": "Stanfield Johnson" + }, + "city": { + "type": "string", + "example": "Stanfield" + }, + "state": { + "type": "string", + "example": "WA" + }, + "address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "address_2": { + "type": "string", + "example": "" + }, + "zip": { + "type": "string", + "example": "11222" + }, + "zip4": { + "type": "string", + "example": "2328" + }, + "usps_address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "usps_address_2": { + "type": "string", + "example": "" + }, + "usps_city": { + "type": "string", + "example": "Brooklyn" + }, + "usps_state": { + "type": "string", + "example": "NY" + }, + "usps_zip": { + "type": "string", + "example": "11222" + }, + "district": { + "type": "object", + "properties": { + "hs_id": { + "type": "string", + "example": "HS021361" + }, + "name": { + "type": "string", + "example": "Stanfield Johnson" + }, + "city": { + "type": "string", + "example": "Stanfield" + }, + "state": { + "type": "string", + "example": "WA" + }, + "address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "address_2": { + "type": "string", + "example": "" + }, + "zip": { + "type": "string", + "example": "11222" + }, + "zip4": { + "type": "string", + "example": "2328" + }, + "usps_address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "usps_address_2": { + "type": "string", + "example": "" + }, + "usps_city": { + "type": "string", + "example": "Brooklyn" + }, + "usps_state": { + "type": "string", + "example": "NY" + }, + "usps_zip": { + "type": "string", + "example": "11222" + } + } + } + } + }, + "students": { + "type": "array", + "items": { + "type": "object", + "properties": { + "profile": { + "type": "object", + "properties": { + "first_name": { + "type": "string", + "example": "Userfirstname" + }, + "last_name": { + "type": "string", + "example": "Userlastname" + }, + "graduation_year": { + "type": "string", + "example": "2018" + }, + "address_one": { + "type": "string", + "example": "Woodside Lane" + }, + "zip_code": { + "type": "string", + "example": "92345" + }, + "is_valid_address": { + "type": "boolean", + "example": false + }, + "high_school_id": { + "type": "string", + "example": "HS1234" + }, + "high_school": { + "type": "string", + "example": "California High School" + }, + "is_survey_complete": { + "type": "string", + "example": "true" + }, + "user_type": { + "type": "string", + "default": "student", + "example": "high-school" + }, + "high_school_country": { + "type": "string", + "example": "usa" + }, + "college_start_year": { + "type": "string", + "example": "2019" + }, + "country": { + "type": "string", + "example": "United States of America" + } + } + }, + "personal_story": { + "type": "object", + "properties": { + "parents_went_college": { + "type": "string", + "description": "Boolean but stringified", + "example": "true" + } + } + }, + "student_key": { + "type": "string", + "example": "576173212" + }, + "authentication_id": { + "type": "string", + "example": "28930FA2-B0E5-463F-9A9E-9B61001243B1" + }, + "last_activity_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T19:01:01.088Z" + }, + "email": { + "type": "string", + "format": "email", + "example": "user@ma.il" + }, + "seq_num": { + "type": "string", + "example": "576173212" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "example": "1996-05-23T00:00:00.000Z" + }, + "username": { + "type": "string", + "example": "user@ma.il", + "deprecated": true + }, + "tos_agreed_at": { + "type": "string", + "format": "date-time", + "example": "2018-11-29T11:25:13.000Z" + }, + "user_type": { + "type": "string", + "default": "student", + "example": "high-school" + }, + "bearer_token": { + "type": "string", + "example": "JF83HF73H21D0GJ3W9W02F29" + }, + "facebook_id": { + "type": "string", + "example": "fbidstring", + "deprecated": true + }, + "twitter_id": { + "type": "string", + "example": "twidstring", + "deprecated": true + }, + "email_verified_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T20:11:00.014Z" + }, + "referred_by_code": { + "type": "string" + }, + "gpa": { + "type": "number", + "format": "float", + "minimum": 0, + "maximum": 4, + "default": 0, + "example": 4 + }, + "is_admin": { + "type": "boolean", + "example": false + }, + "admittedly_score": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "default": 0, + "example": 95 + }, + "is_tutorial_completed": { + "type": "boolean", + "default": false, + "example": false + }, + "is_profile_public": { + "type": "boolean", + "default": false, + "example": false + }, + "tutorial_step": { + "type": "string", + "default": "" + }, + "update_increment": { + "type": "integer", + "default": 0, + "example": 12 + }, + "is_school_verified": { + "type": "boolean", + "default": false, + "example": false + }, + "personal_color": { + "type": "string" + }, + "profile_completion": { + "type": "number", + "format": "float", + "default": 0, + "example": 0.75 + }, + "subscription_expires_at": { + "type": "string", + "format": "date-time", + "example": "2020-01-01T00:00:00.000Z" + }, + "from_mo": { + "type": "boolean", + "default": true, + "example": true + }, + "old_password_format": { + "type": "boolean", + "default": false, + "example": false + }, + "onboarding_status": { + "type": "string", + "default": "INITIAL", + "enum": [ + "INITIAL", + "STARTED" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T19:01:01.088Z" + }, + "forum_posts_count": { + "type": "integer", + "default": 0, + "example": 3, + "deprecated": true + }, + "forum_likes_count": { + "type": "integer", + "default": 0, + "example": 4, + "deprecated": true + }, + "following_count": { + "type": "integer", + "default": 0, + "deprecated": true + }, + "follower_count": { + "type": "integer", + "default": 0, + "deprecated": true + }, + "has_unlimited_messages": { + "type": "boolean", + "default": false, + "deprecated": true + }, + "surveyAnswers": { + "type": "object", + "properties": { + "PARENTCOL": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "example": "PARCOLYES" + } + }, + "GRADYEAR": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "example": "HSGRAD2021" + } + }, + "MOPFAFSA": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "MOPFAFSANOT", + "MOPFAFSASTARTED", + "MOPFAFSASUBMITTED", + "MOPFAFSASELECTED", + "MOPFAFSARESUBMITTED", + "MOPFAFSAACCEPTED" + ] + } + } + } + }, + "password": { + "type": "string", + "example": "password" + }, + "applications": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "102482975" + }, + "school_id": { + "type": "integer", + "example": 1 + }, + "application_status_key": { + "type": "string", + "enum": [ + "INITIAL", + "APPLYING_0", + "APPLYING_25", + "APPLYING_50", + "APPLYING_75", + "APPLIED", + "ACCEPTED", + "NOT_ACCEPTED", + "ENROLLING", + "NOT_ENROLLING", + "DEFERRED_WAITLISTED" + ] + }, + "update_increment": { + "type": "integer", + "example": 1 + }, + "is_bookmarked": { + "type": "boolean", + "example": true + }, + "is_declared": { + "type": "boolean", + "example": true + }, + "is_quickmatch": { + "type": "boolean", + "example": false + }, + "is_aos": { + "type": "boolean", + "example": false + }, + "application_status": { + "type": "string", + "example": "applying" + }, + "applying_percent": { + "type": "integer", + "example": 75 + }, + "school": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + }, + "has_campus_image_1x1": { + "type": "boolean" + }, + "has_campus_image_16x9": { + "type": "boolean" + }, + "slug_name": { + "type": "string", + "example": "test-university-1" + }, + "images": { + "type": "object", + "properties": { + "logo": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/logo.png" + }, + "1x1_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + } + } + } + } + } + } + }, + { + "type": "object", + "properties": { + "school_id": { + "type": "integer", + "example": 1 + }, + "error": { + "type": "string", + "example": "College not found" + } + } + } + ] + } + }, + "checklist": { + "oneOf": [ + { + "type": "object", + "properties": { + "updatedChecklistIds": { + "type": "array", + "items": { + "type": "integer", + "example": 42 + } + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 27 + }, + "is_visible": { + "type": "boolean", + "default": false, + "example": true + }, + "title": { + "type": "string", + "example": "Checklist item title" + }, + "description": { + "type": "string", + "example": "Checklist item description" + }, + "link": { + "type": "string", + "format": "uri", + "example": "https://some.link.here" + }, + "deadline": { + "type": "string", + "format": "date-time", + "example": "2018-09-24T01:38:17.690Z" + }, + "high_school_grade": { + "type": "integer", + "minimum": 0, + "maximum": 4, + "example": 2 + }, + "semester": { + "type": "integer", + "minimum": 1, + "maximum": 2, + "example": 2 + }, + "is_athlete": { + "type": "boolean", + "default": false, + "example": true + }, + "is_first_gen": { + "type": "boolean", + "default": false, + "example": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-04-24T01:38:17.690Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "deleted_at": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "integer", + "minimum": 0, + "maximum": 2, + "example": 1 + }, + "status_updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "personal_notes": { + "type": "string", + "example": "Checklist item personal notes" + } + } + } + } + } + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 27 + }, + "is_visible": { + "type": "boolean", + "default": false, + "example": true + }, + "title": { + "type": "string", + "example": "Checklist item title" + }, + "description": { + "type": "string", + "example": "Checklist item description" + }, + "link": { + "type": "string", + "format": "uri", + "example": "https://some.link.here" + }, + "deadline": { + "type": "string", + "format": "date-time", + "example": "2018-09-24T01:38:17.690Z" + }, + "high_school_grade": { + "type": "integer", + "minimum": 0, + "maximum": 4, + "example": 2 + }, + "semester": { + "type": "integer", + "minimum": 1, + "maximum": 2, + "example": 2 + }, + "is_athlete": { + "type": "boolean", + "default": false, + "example": true + }, + "is_first_gen": { + "type": "boolean", + "default": false, + "example": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-04-24T01:38:17.690Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "deleted_at": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "integer", + "minimum": 0, + "maximum": 2, + "example": 1 + }, + "status_updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "personal_notes": { + "type": "string", + "example": "Checklist item personal notes" + } + } + } + } + ] + } + } + } + } + } + }, + { + "type": "object", + "properties": { + "newEncourageUser": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "name": { + "type": "string", + "example": "Sample University" + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "prefix": { + "type": "string", + "enum": [ + "doctor", + "mr", + "mrs", + "ms" + ] + }, + "role": { + "type": "string", + "enum": [ + "counselor", + "principal", + "teacher", + "coach", + "teaching_assistant", + "superintendent", + "other" + ] + }, + "attributes": { + "type": "array", + "example": [] + }, + "entityKey": { + "type": "number", + "example": 1012030710 + }, + "applications": { + "type": "array", + "items": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + }, + "uid": { + "type": "string", + "example": "ec9ac895-814b-4a68-8577-2b19dcb257b3" + }, + "name": { + "type": "string", + "example": "Encourage" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "PendingApproval" + ], + "example": "Active" + }, + "attributes": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "password": { + "type": "string", + "example": "password" + } + } + }, + "secondarySchool": { + "type": "object", + "properties": { + "hs_id": { + "type": "string", + "example": "HS021361" + }, + "name": { + "type": "string", + "example": "Stanfield Johnson" + }, + "city": { + "type": "string", + "example": "Stanfield" + }, + "state": { + "type": "string", + "example": "WA" + }, + "address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "address_2": { + "type": "string", + "example": "" + }, + "zip": { + "type": "string", + "example": "11222" + }, + "zip4": { + "type": "string", + "example": "2328" + }, + "usps_address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "usps_address_2": { + "type": "string", + "example": "" + }, + "usps_city": { + "type": "string", + "example": "Brooklyn" + }, + "usps_state": { + "type": "string", + "example": "NY" + }, + "usps_zip": { + "type": "string", + "example": "11222" + }, + "district": { + "type": "object", + "properties": { + "hs_id": { + "type": "string", + "example": "HS021361" + }, + "name": { + "type": "string", + "example": "Stanfield Johnson" + }, + "city": { + "type": "string", + "example": "Stanfield" + }, + "state": { + "type": "string", + "example": "WA" + }, + "address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "address_2": { + "type": "string", + "example": "" + }, + "zip": { + "type": "string", + "example": "11222" + }, + "zip4": { + "type": "string", + "example": "2328" + }, + "usps_address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "usps_address_2": { + "type": "string", + "example": "" + }, + "usps_city": { + "type": "string", + "example": "Brooklyn" + }, + "usps_state": { + "type": "string", + "example": "NY" + }, + "usps_zip": { + "type": "string", + "example": "11222" + } + } + } + } + }, + "students": { + "type": "array", + "items": { + "type": "object", + "properties": { + "profile": { + "type": "object", + "properties": { + "first_name": { + "type": "string", + "example": "Userfirstname" + }, + "last_name": { + "type": "string", + "example": "Userlastname" + }, + "graduation_year": { + "type": "string", + "example": "2018" + }, + "address_one": { + "type": "string", + "example": "Woodside Lane" + }, + "zip_code": { + "type": "string", + "example": "92345" + }, + "is_valid_address": { + "type": "boolean", + "example": false + }, + "high_school_id": { + "type": "string", + "example": "HS1234" + }, + "high_school": { + "type": "string", + "example": "California High School" + }, + "is_survey_complete": { + "type": "string", + "example": "true" + }, + "user_type": { + "type": "string", + "default": "student", + "example": "high-school" + }, + "high_school_country": { + "type": "string", + "example": "usa" + }, + "college_start_year": { + "type": "string", + "example": "2019" + }, + "country": { + "type": "string", + "example": "United States of America" + } + } + }, + "personal_story": { + "type": "object", + "properties": { + "parents_went_college": { + "type": "string", + "description": "Boolean but stringified", + "example": "true" + } + } + }, + "student_key": { + "type": "string", + "example": "576173212" + }, + "authentication_id": { + "type": "string", + "example": "28930FA2-B0E5-463F-9A9E-9B61001243B1" + }, + "last_activity_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T19:01:01.088Z" + }, + "email": { + "type": "string", + "format": "email", + "example": "user@ma.il" + }, + "seq_num": { + "type": "string", + "example": "576173212" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "example": "1996-05-23T00:00:00.000Z" + }, + "username": { + "type": "string", + "example": "user@ma.il", + "deprecated": true + }, + "tos_agreed_at": { + "type": "string", + "format": "date-time", + "example": "2018-11-29T11:25:13.000Z" + }, + "user_type": { + "type": "string", + "default": "student", + "example": "high-school" + }, + "bearer_token": { + "type": "string", + "example": "JF83HF73H21D0GJ3W9W02F29" + }, + "facebook_id": { + "type": "string", + "example": "fbidstring", + "deprecated": true + }, + "twitter_id": { + "type": "string", + "example": "twidstring", + "deprecated": true + }, + "email_verified_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T20:11:00.014Z" + }, + "referred_by_code": { + "type": "string" + }, + "gpa": { + "type": "number", + "format": "float", + "minimum": 0, + "maximum": 4, + "default": 0, + "example": 4 + }, + "is_admin": { + "type": "boolean", + "example": false + }, + "admittedly_score": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "default": 0, + "example": 95 + }, + "is_tutorial_completed": { + "type": "boolean", + "default": false, + "example": false + }, + "is_profile_public": { + "type": "boolean", + "default": false, + "example": false + }, + "tutorial_step": { + "type": "string", + "default": "" + }, + "update_increment": { + "type": "integer", + "default": 0, + "example": 12 + }, + "is_school_verified": { + "type": "boolean", + "default": false, + "example": false + }, + "personal_color": { + "type": "string" + }, + "profile_completion": { + "type": "number", + "format": "float", + "default": 0, + "example": 0.75 + }, + "subscription_expires_at": { + "type": "string", + "format": "date-time", + "example": "2020-01-01T00:00:00.000Z" + }, + "from_mo": { + "type": "boolean", + "default": true, + "example": true + }, + "old_password_format": { + "type": "boolean", + "default": false, + "example": false + }, + "onboarding_status": { + "type": "string", + "default": "INITIAL", + "enum": [ + "INITIAL", + "STARTED" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T19:01:01.088Z" + }, + "forum_posts_count": { + "type": "integer", + "default": 0, + "example": 3, + "deprecated": true + }, + "forum_likes_count": { + "type": "integer", + "default": 0, + "example": 4, + "deprecated": true + }, + "following_count": { + "type": "integer", + "default": 0, + "deprecated": true + }, + "follower_count": { + "type": "integer", + "default": 0, + "deprecated": true + }, + "has_unlimited_messages": { + "type": "boolean", + "default": false, + "deprecated": true + }, + "surveyAnswers": { + "type": "object", + "properties": { + "PARENTCOL": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "example": "PARCOLYES" + } + }, + "GRADYEAR": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "example": "HSGRAD2021" + } + }, + "MOPFAFSA": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "MOPFAFSANOT", + "MOPFAFSASTARTED", + "MOPFAFSASUBMITTED", + "MOPFAFSASELECTED", + "MOPFAFSARESUBMITTED", + "MOPFAFSAACCEPTED" + ] + } + } + } + }, + "password": { + "type": "string", + "example": "password" + }, + "applications": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "102482975" + }, + "school_id": { + "type": "integer", + "example": 1 + }, + "application_status_key": { + "type": "string", + "enum": [ + "INITIAL", + "APPLYING_0", + "APPLYING_25", + "APPLYING_50", + "APPLYING_75", + "APPLIED", + "ACCEPTED", + "NOT_ACCEPTED", + "ENROLLING", + "NOT_ENROLLING", + "DEFERRED_WAITLISTED" + ] + }, + "update_increment": { + "type": "integer", + "example": 1 + }, + "is_bookmarked": { + "type": "boolean", + "example": true + }, + "is_declared": { + "type": "boolean", + "example": true + }, + "is_quickmatch": { + "type": "boolean", + "example": false + }, + "is_aos": { + "type": "boolean", + "example": false + }, + "application_status": { + "type": "string", + "example": "applying" + }, + "applying_percent": { + "type": "integer", + "example": 75 + }, + "school": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + }, + "has_campus_image_1x1": { + "type": "boolean" + }, + "has_campus_image_16x9": { + "type": "boolean" + }, + "slug_name": { + "type": "string", + "example": "test-university-1" + }, + "images": { + "type": "object", + "properties": { + "logo": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/logo.png" + }, + "1x1_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + } + } + } + } + } + } + }, + { + "type": "object", + "properties": { + "school_id": { + "type": "integer", + "example": 1 + }, + "error": { + "type": "string", + "example": "College not found" + } + } + } + ] + } + }, + "checklist": { + "oneOf": [ + { + "type": "object", + "properties": { + "updatedChecklistIds": { + "type": "array", + "items": { + "type": "integer", + "example": 42 + } + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 27 + }, + "is_visible": { + "type": "boolean", + "default": false, + "example": true + }, + "title": { + "type": "string", + "example": "Checklist item title" + }, + "description": { + "type": "string", + "example": "Checklist item description" + }, + "link": { + "type": "string", + "format": "uri", + "example": "https://some.link.here" + }, + "deadline": { + "type": "string", + "format": "date-time", + "example": "2018-09-24T01:38:17.690Z" + }, + "high_school_grade": { + "type": "integer", + "minimum": 0, + "maximum": 4, + "example": 2 + }, + "semester": { + "type": "integer", + "minimum": 1, + "maximum": 2, + "example": 2 + }, + "is_athlete": { + "type": "boolean", + "default": false, + "example": true + }, + "is_first_gen": { + "type": "boolean", + "default": false, + "example": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-04-24T01:38:17.690Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "deleted_at": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "integer", + "minimum": 0, + "maximum": 2, + "example": 1 + }, + "status_updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "personal_notes": { + "type": "string", + "example": "Checklist item personal notes" + } + } + } + } + } + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 27 + }, + "is_visible": { + "type": "boolean", + "default": false, + "example": true + }, + "title": { + "type": "string", + "example": "Checklist item title" + }, + "description": { + "type": "string", + "example": "Checklist item description" + }, + "link": { + "type": "string", + "format": "uri", + "example": "https://some.link.here" + }, + "deadline": { + "type": "string", + "format": "date-time", + "example": "2018-09-24T01:38:17.690Z" + }, + "high_school_grade": { + "type": "integer", + "minimum": 0, + "maximum": 4, + "example": 2 + }, + "semester": { + "type": "integer", + "minimum": 1, + "maximum": 2, + "example": 2 + }, + "is_athlete": { + "type": "boolean", + "default": false, + "example": true + }, + "is_first_gen": { + "type": "boolean", + "default": false, + "example": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-04-24T01:38:17.690Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "deleted_at": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "integer", + "minimum": 0, + "maximum": 2, + "example": 1 + }, + "status_updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "personal_notes": { + "type": "string", + "example": "Checklist item personal notes" + } + } + } + } + ] + } + } + } + } + } + } + ], + "example": { + "encourageUser": { + "uid": "1e6c6d8e-af30-43ca-a519-395734701eba", + "type": "User", + "firstName": "testUserFirstName", + "lastName": "testUserLastName", + "userName": "testUserName", + "status": "Active", + "email": "test@user.mail", + "verifiedDate": "2019-01-07T18:29:25.493Z", + "createdAt": "2019-01-07T18:29:25.493Z", + "updatedAt": "2019-01-07T18:29:25.493Z", + "creator": { + "uid": "1e6c6d8e-af30-43ca-a519-395734701eba", + "firstName": "testUserFirstName", + "lastName": "testUserLastName" + }, + "organizations": [ + { + "uid": "1e6c6d8e-af30-43ca-a519-395734701eba", + "name": "Sample University" + } + ], + "roles": [ + { + "uid": "bf45a23c-b527-4c5d-b7b8-60250339d265", + "roleName": "Administrator" + } + ], + "prefix": "doctor", + "role": "counselor", + "attributes": [], + "entityKey": 1012030710 + }, + "highSchool": { + "hs_id": "HS021361", + "name": "Stanfield Johnson", + "city": "Stanfield", + "state": "WA", + "address_1": "3101 S Bagdad Rd", + "address_2": "", + "zip": "11222", + "zip4": "2328", + "usps_address_1": "3101 S Bagdad Rd", + "usps_address_2": "", + "usps_city": "Brooklyn", + "usps_state": "NY", + "usps_zip": "11222", + "district": { + "hs_id": "HS021361", + "name": "Stanfield Johnson", + "city": "Stanfield", + "state": "WA", + "address_1": "3101 S Bagdad Rd", + "address_2": "", + "zip": "11222", + "zip4": "2328", + "usps_address_1": "3101 S Bagdad Rd", + "usps_address_2": "", + "usps_city": "Brooklyn", + "usps_state": "NY", + "usps_zip": "11222" + } + }, + "students": [ + { + "profile": { + "first_name": "Userfirstname", + "last_name": "Userlastname", + "graduation_year": "2018", + "address_one": "Woodside Lane", + "zip_code": "92345", + "is_valid_address": false, + "high_school_id": "HS1234", + "high_school": "California High School", + "is_survey_complete": "true", + "user_type": "high-school", + "high_school_country": "usa", + "college_start_year": "2019", + "country": "United States of America" + }, + "personal_story": { + "parents_went_college": "true" + }, + "student_key": "576173212", + "authentication_id": "28930FA2-B0E5-463F-9A9E-9B61001243B1", + "last_activity_at": "2019-01-07T19:01:01.088Z", + "email": "user@ma.il", + "seq_num": "576173212", + "date_of_birth": "1996-05-23T00:00:00.000Z", + "tos_agreed_at": "2018-11-29T11:25:13.000Z", + "user_type": "high-school", + "bearer_token": "JF83HF73H21D0GJ3W9W02F29", + "email_verified_at": "2019-01-07T20:11:00.014Z", + "referred_by_code": "string", + "gpa": 4, + "is_admin": false, + "admittedly_score": 95, + "is_tutorial_completed": false, + "is_profile_public": false, + "tutorial_step": "string", + "update_increment": 12, + "is_school_verified": false, + "personal_color": "string", + "profile_completion": 0.75, + "subscription_expires_at": "2020-01-01T00:00:00.000Z", + "from_mo": true, + "old_password_format": false, + "onboarding_status": "INITIAL", + "created_at": "2019-01-07T18:29:25.493Z", + "updated_at": "2019-01-07T19:01:01.088Z", + "surveyAnswers": { + "PARENTCOL": [ + "PARCOLYES" + ], + "GRADYEAR": [ + "HSGRAD2021" + ], + "MOPFAFSA": [ + "MOPFAFSANOT" + ] + }, + "password": "password", + "applications": [ + { + "student_key": "102482975", + "school_id": 1, + "application_status_key": "INITIAL", + "update_increment": 1, + "is_bookmarked": true, + "is_declared": true, + "is_quickmatch": false, + "is_aos": false, + "school": { + "name": "CollegeName", + "nickname": "CollegeNickname", + "fice": "1525134", + "ug_inst_id": "collegeinsta", + "ipeds_id": "string", + "address_1": "string", + "address_2": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "has_campus_image_1x1": true, + "has_campus_image_16x9": true, + "slug_name": "test-university-1", + "images": { + "logo": "https://www.test.com/logo.png", + "1x1_320": "https://www.test.com/image.jpg", + "1x1_640": "https://www.test.com/image.jpg", + "1x1_1076": "https://www.test.com/image.jpg", + "1x1_1500": "https://www.test.com/image.jpg", + "1x1_2048": "https://www.test.com/image.jpg", + "16x9_320": "https://www.test.com/image.jpg", + "16x9_640": "https://www.test.com/image.jpg", + "16x9_1076": "https://www.test.com/image.jpg", + "16x9_1500": "https://www.test.com/image.jpg", + "16x9_2048": "https://www.test.com/image.jpg" + } + } + } + ], + "checklist": [ + { + "id": 27, + "is_visible": true, + "title": "Checklist item title", + "description": "Checklist item description", + "link": "https://some.link.here", + "deadline": "2018-09-24T01:38:17.690Z", + "high_school_grade": 2, + "semester": 2, + "is_athlete": true, + "is_first_gen": false, + "created_at": "2018-04-24T01:38:17.690Z", + "updated_at": "2018-06-28T03:34:54.191Z", + "deleted_at": "2020-08-24T16:49:53.983Z", + "status": 1, + "status_updated_at": "2018-06-28T03:34:54.191Z", + "personal_notes": "Checklist item personal notes" + } + ] + } + ] + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/colleges/{collegeId}": { + "get": { + "tags": [ + "Colleges" + ], + "summary": "Get college base info", + "operationId": "collegeBaseInfo", + "description": "Gets base information from a specific college", + "parameters": [ + { + "name": "collegeId", + "in": "path", + "description": "Unique ID (mcocid) for MCO college", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Cache-Control", + "in": "header", + "description": "Informs the service that it should skip cache reading (no-cache), writing (no-store) or both in this request", + "schema": { + "type": "string", + "enum": [ + "no-cache", + "no-store", + "no-cache no-store" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mcocid": { + "type": "integer", + "example": 792 + }, + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + } + } + } + } + }, + "headers": { + "Expires": { + "schema": { + "type": "string" + }, + "description": "The expiration date for a given requested resource, only when obtained from the cache" + } + } + }, + "400": { + "description": "Missing college id param" + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + } + } + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "College not found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + } + }, + "components": { + "schemas": { + "umsApplicationTiny": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "umsApplication": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + }, + "uid": { + "type": "string", + "example": "ec9ac895-814b-4a68-8577-2b19dcb257b3" + }, + "name": { + "type": "string", + "example": "Encourage" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "PendingApproval" + ], + "example": "Active" + }, + "attributes": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + }, + "umsAttributeSmall": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + }, + "umsCredential": { + "type": "object", + "properties": { + "authorize": { + "type": "boolean", + "example": true + }, + "credentials": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "testUser" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "email": { + "type": "string", + "example": "testUserEmail" + }, + "status": { + "type": "string", + "example": "Active" + }, + "exp": { + "type": "integer" + }, + "iss": { + "type": "string" + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + } + } + } + }, + "roles": { + "type": "array", + "example": [] + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "umsModule": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + }, + "umsOrganization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "umsOrganizationSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "name": { + "type": "string", + "example": "Sample University" + }, + "fice": { + "type": "string", + "example": "SAMPLE" + }, + "stateCode": { + "type": "string", + "example": "MO" + } + } + }, + "umsPermissionSmall": { + "type": "object", + "required": [ + "moduleKey" + ], + "properties": { + "moduleKey": { + "type": "string", + "example": "encourage.engagementanalytics.marketingconversion" + }, + "permissionOverwrite": { + "type": "boolean", + "example": true + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "umsRole": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + }, + "umsSessionToken": { + "type": "string", + "format": "byte", + "example": "Base64 string" + }, + "umsExternalId": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + }, + "umsUserOrganization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + }, + "type": { + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Admin" + ] + }, + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "organization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + } + } + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "userBase": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + } + } + }, + "userSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + } + } + }, + "userCreateRequest": { + "type": "object", + "required": [ + "firstName", + "lastName", + "email" + ], + "properties": { + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + }, + "permissions": { + "type": "array", + "items": { + "type": "object", + "required": [ + "moduleKey" + ], + "properties": { + "moduleKey": { + "type": "string", + "example": "encourage.engagementanalytics.marketingconversion" + }, + "permissionOverwrite": { + "type": "boolean", + "example": true + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + } + } + }, + "userImpersonateResponse": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "impersonatingUser": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "sessionToken": { + "type": "string", + "format": "byte", + "example": "Base64 string" + } + } + }, + "userUpdate": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "cell_phone": { + "type": "string", + "example": "2025550152" + }, + "fax_phone": { + "type": "string", + "example": "2025550152" + } + } + }, + "userPermissions": { + "type": "object", + "properties": { + "organization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "role": { + "type": "string", + "example": "teacher" + } + } + }, + "permissions": { + "type": "object", + "properties": { + "applicationManagement": { + "type": "boolean" + }, + "credentialSubmission": { + "type": "boolean" + }, + "highSchoolAdmin": { + "type": "boolean" + } + } + } + } + }, + "userMcoSetup": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "prefix": { + "type": "string", + "example": "Mr." + } + }, + "required": [ + "firstName", + "lastName" + ] + }, + "userActivationStatusResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + } + } + }, + "student": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "576173212", + "description": "This is the primary key" + }, + "entity_type_key": { + "type": "integer", + "example": 3 + }, + "sequence_number": { + "type": "string", + "example": "34653" + }, + "username": { + "type": "string", + "example": "user@ma.il" + }, + "last_activity_date": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T19:01:01.088Z" + }, + "email": { + "type": "string", + "format": "email", + "example": "user@ma.il" + }, + "first_name": { + "type": "string", + "example": "UserFirstName" + }, + "middle_name": { + "type": "string", + "example": "UserMiddleName" + }, + "last_name": { + "type": "string", + "example": "UserLastName" + }, + "gender": { + "type": "string", + "example": "F" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "example": "1996-05-23T00:00:00.000Z" + }, + "graduation_year": { + "type": "integer", + "example": 2018 + }, + "high_school": { + "type": "object", + "properties": { + "hs_id": { + "type": "string", + "example": "userHighSchoolId" + }, + "name": { + "type": "string", + "example": "userHighSchoolName" + } + } + }, + "relationship_type_keys": { + "type": "array", + "example": [ + 8 + ] + }, + "answers": { + "type": "object", + "example": {} + }, + "is_approved": { + "type": "boolean", + "example": true + }, + "is_auto_login": { + "type": "boolean", + "example": true + }, + "is_active_login": { + "type": "boolean", + "example": true + }, + "address_1": { + "type": "string", + "example": "Street, 250" + }, + "address_2": { + "type": "string", + "example": "Street, 250" + }, + "zip": { + "type": "string", + "example": "111111" + }, + "state": { + "type": "string", + "example": "TX" + }, + "city": { + "type": "string", + "example": "Austin" + }, + "is_valid_address": { + "type": "boolean", + "example": true + }, + "cell_phone": { + "type": "string", + "example": "55511234" + }, + "home_phone": { + "type": "string", + "example": "55511234" + }, + "parents": { + "type": "object", + "properties": { + "one": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "string" + }, + "first_name": { + "type": "string", + "example": "string" + }, + "last_name": { + "type": "string", + "example": "string" + } + } + }, + "two": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "string" + }, + "first_name": { + "type": "string", + "example": "string" + }, + "last_name": { + "type": "string", + "example": "string" + } + } + } + } + } + } + }, + "studentSearch": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "576173212", + "description": "This is the primary key" + }, + "first_name": { + "type": "string", + "example": "UserFirstName" + }, + "last_name": { + "type": "string", + "example": "UserLastName" + }, + "graduation_year": { + "type": "integer", + "example": 2018 + } + } + }, + "checklistItem": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 27 + }, + "is_visible": { + "type": "boolean", + "default": false, + "example": true + }, + "title": { + "type": "string", + "example": "Checklist item title" + }, + "description": { + "type": "string", + "example": "Checklist item description" + }, + "link": { + "type": "string", + "format": "uri", + "example": "https://some.link.here" + }, + "deadline": { + "type": "string", + "format": "date-time", + "example": "2018-09-24T01:38:17.690Z" + }, + "high_school_grade": { + "type": "integer", + "minimum": 0, + "maximum": 4, + "example": 2 + }, + "semester": { + "type": "integer", + "minimum": 1, + "maximum": 2, + "example": 2 + }, + "is_athlete": { + "type": "boolean", + "default": false, + "example": true + }, + "is_first_gen": { + "type": "boolean", + "default": false, + "example": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-04-24T01:38:17.690Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "deleted_at": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "integer", + "minimum": 0, + "maximum": 2, + "example": 1 + }, + "status_updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "personal_notes": { + "type": "string", + "example": "Checklist item personal notes" + } + } + }, + "testScores": { + "type": "object", + "properties": { + "gpa": { + "type": "object", + "properties": { + "total_score": { + "type": "number", + "format": "float", + "minimum": 0, + "maximum": 4, + "example": 3.9 + }, + "min_total_score": { + "type": "number", + "example": 0 + }, + "max_total_score": { + "type": "number", + "example": 4 + } + } + }, + "act": { + "type": "object", + "properties": { + "english": { + "type": "number", + "minimum": 1, + "maximum": 36, + "example": 34 + }, + "math": { + "type": "number", + "minimum": 1, + "maximum": 36, + "example": 34 + }, + "reading": { + "type": "number", + "minimum": 1, + "maximum": 36, + "example": 34 + }, + "science": { + "type": "number", + "minimum": 1, + "maximum": 36, + "example": 34 + }, + "total_score": { + "type": "number", + "minimum": 1, + "maximum": 36, + "example": 34 + }, + "min_score": { + "type": "number", + "example": 1 + }, + "max_score": { + "type": "number", + "example": 35 + }, + "min_total_score": { + "type": "number", + "example": 1 + }, + "max_total_score": { + "type": "number", + "example": 35 + } + } + }, + "sat": { + "type": "object", + "properties": { + "math": { + "type": "number", + "minimum": 200, + "maximum": 800, + "example": 700 + }, + "reading_writing": { + "type": "number", + "minimum": 200, + "maximum": 800, + "example": 700 + }, + "total_score": { + "type": "number", + "minimum": 1500, + "maximum": 400, + "example": 1600 + }, + "min_score": { + "type": "number", + "example": 200 + }, + "max_score": { + "type": "number", + "example": 800 + }, + "min_total_score": { + "type": "number", + "example": 400 + }, + "max_total_score": { + "type": "number", + "example": 1600 + } + } + }, + "psat": { + "type": "object", + "properties": { + "math": { + "type": "number", + "minimum": 200, + "maximum": 800, + "example": 700 + }, + "reading_writing": { + "type": "number", + "minimum": 200, + "maximum": 800, + "example": 700 + }, + "total_score": { + "type": "number", + "minimum": 1500, + "maximum": 400, + "example": 1600 + }, + "min_score": { + "type": "number", + "example": 200 + }, + "max_score": { + "type": "number", + "example": 800 + }, + "min_total_score": { + "type": "number", + "example": 400 + }, + "max_total_score": { + "type": "number", + "example": 1600 + } + } + } + } + }, + "surveyAnswers": { + "type": "object", + "properties": { + "ANSWER_1": { + "type": "array", + "items": { + "type": "string" + } + }, + "ANSWER_2": { + "type": "array", + "items": { + "type": "string" + } + }, + "ANSWER_n": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "userSchool": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "102482975" + }, + "school_id": { + "type": "integer", + "example": 1 + }, + "application_status_key": { + "type": "string", + "enum": [ + "INITIAL", + "APPLYING_0", + "APPLYING_25", + "APPLYING_50", + "APPLYING_75", + "APPLIED", + "ACCEPTED", + "NOT_ACCEPTED", + "ENROLLING", + "NOT_ENROLLING", + "DEFERRED_WAITLISTED" + ] + }, + "update_increment": { + "type": "integer", + "example": 1 + }, + "is_bookmarked": { + "type": "boolean", + "example": true + }, + "is_declared": { + "type": "boolean", + "example": true + }, + "is_quickmatch": { + "type": "boolean", + "example": false + }, + "is_aos": { + "type": "boolean", + "example": false + }, + "application_status": { + "type": "string", + "example": "applying" + }, + "applying_percent": { + "type": "integer", + "example": 75 + }, + "school": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + }, + "has_campus_image_1x1": { + "type": "boolean" + }, + "has_campus_image_16x9": { + "type": "boolean" + }, + "slug_name": { + "type": "string", + "example": "test-university-1" + }, + "images": { + "type": "object", + "properties": { + "logo": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/logo.png" + }, + "1x1_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + } + } + } + } + } + } + }, + "collegeMatches": { + "type": "object", + "properties": { + "matched_colleges": { + "type": "array", + "items": { + "type": "object", + "properties": { + "mcocid": { + "type": "integer", + "example": 792 + }, + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + } + } + } + }, + "declared_colleges": { + "type": "array", + "items": { + "type": "object", + "properties": { + "mcocid": { + "type": "integer", + "example": 792 + }, + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + } + } + } + }, + "aos_colleges": { + "type": "array", + "items": { + "type": "object", + "properties": { + "mcocid": { + "type": "integer", + "example": 792 + }, + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + } + } + } + } + } + }, + "scholarship": { + "type": "object", + "properties": { + "AMOUNT": { + "type": "string", + "example": "$1,000-$12,500" + }, + "DEADLINE": { + "type": "string", + "example": "November 5" + }, + "PATRON_NM": { + "type": "string", + "example": "U.S. Bank" + }, + "SCHOL_NM": { + "type": "string", + "example": "U.S. Bank Scholarship Programme" + }, + "SORT_YEAR": { + "type": "integer", + "example": 2019 + }, + "S_UUID": { + "type": "string", + "example": "EC15DE51-5323-063F-5ED1551B4543BB44" + }, + "WEB_AMT": { + "type": "integer", + "example": 1250 + }, + "WEB_DAY": { + "type": "integer", + "example": 5 + }, + "WEB_MO": { + "type": "integer", + "example": 11 + } + } + }, + "appMgtDetailsResponse": { + "type": "object", + "properties": { + "student": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "576173212", + "description": "This is the primary key" + }, + "first_name": { + "type": "string", + "example": "UserFirstName" + }, + "last_name": { + "type": "string", + "example": "UserLastName" + } + } + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "102482975" + }, + "school_id": { + "type": "integer", + "example": 1 + }, + "application_status_key": { + "type": "string", + "enum": [ + "APPLYING_0", + "APPLYING_25", + "APPLYING_50", + "APPLYING_75", + "APPLIED", + "ACCEPTED", + "NOT_ACCEPTED", + "ENROLLING", + "NOT_ENROLLING", + "DEFERRED_WAITLISTED" + ] + }, + "update_increment": { + "type": "integer", + "example": 1 + }, + "is_bookmarked": { + "type": "boolean", + "example": true + }, + "is_declared": { + "type": "boolean", + "example": true + }, + "is_quickmatch": { + "type": "boolean", + "example": false + }, + "is_aos": { + "type": "boolean", + "example": false + }, + "application_status": { + "type": "string", + "example": "applying" + }, + "applying_percent": { + "type": "integer", + "example": 75 + }, + "school": { + "type": "object", + "properties": { + "urls": { + "type": "object", + "properties": { + "main": { + "type": "string", + "example": "https://www.test.com" + }, + "inquiry": { + "type": "string", + "example": "https://www.test.com" + }, + "schedule_visit": { + "type": "string", + "example": "https://www.test.com" + }, + "admissions_blog": { + "type": "string", + "example": "https://www.test.com" + } + } + } + } + }, + "credentials": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx", + "description": "This is the primary key" + }, + "export_id": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx" + }, + "credential_type": { + "type": "string", + "enum": [ + "final-transcript", + "interim-transcript", + "recommendation", + "application-essay", + "fee-waiver", + "personal-statement", + "portfolio-manuscript", + "resume", + "other" + ] + }, + "submitted_at": { + "type": "string", + "example": "1558984276791" + }, + "first_export_date": { + "type": "string", + "example": "1558984276791" + }, + "removed_by": { + "type": "string", + "example": "removedBy" + } + } + } + }, + "externalCredential": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx", + "description": "This is the primary key" + }, + "studentKey": { + "type": "string", + "example": "15556777" + }, + "fice": { + "type": "string", + "example": "123778" + }, + "submissionDate": { + "type": "string", + "example": "1558984276791" + }, + "submittedBy": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx" + }, + "removed_by": { + "type": "string", + "example": "removedBy" + } + } + }, + "isSupported": { + "type": "boolean" + } + } + } + } + } + }, + "dataGen": { + "type": "object", + "properties": { + "profile": { + "type": "object", + "properties": { + "first_name": { + "type": "string", + "example": "Userfirstname" + }, + "last_name": { + "type": "string", + "example": "Userlastname" + }, + "graduation_year": { + "type": "string", + "example": "2018" + }, + "address_one": { + "type": "string", + "example": "Woodside Lane" + }, + "zip_code": { + "type": "string", + "example": "92345" + }, + "is_valid_address": { + "type": "boolean", + "example": false + }, + "high_school_id": { + "type": "string", + "example": "HS1234" + }, + "high_school": { + "type": "string", + "example": "California High School" + }, + "is_survey_complete": { + "type": "string", + "example": "true" + }, + "user_type": { + "type": "string", + "default": "student", + "example": "high-school" + }, + "high_school_country": { + "type": "string", + "example": "usa" + }, + "college_start_year": { + "type": "string", + "example": "2019" + }, + "country": { + "type": "string", + "example": "United States of America" + } + } + }, + "personal_story": { + "type": "object", + "properties": { + "parents_went_college": { + "type": "string", + "description": "Boolean but stringified", + "example": "true" + } + } + }, + "student_key": { + "type": "string", + "example": "576173212" + }, + "authentication_id": { + "type": "string", + "example": "28930FA2-B0E5-463F-9A9E-9B61001243B1" + }, + "last_activity_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T19:01:01.088Z" + }, + "email": { + "type": "string", + "format": "email", + "example": "user@ma.il" + }, + "seq_num": { + "type": "string", + "example": "576173212" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "example": "1996-05-23T00:00:00.000Z" + }, + "username": { + "type": "string", + "example": "user@ma.il", + "deprecated": true + }, + "tos_agreed_at": { + "type": "string", + "format": "date-time", + "example": "2018-11-29T11:25:13.000Z" + }, + "user_type": { + "type": "string", + "default": "student", + "example": "high-school" + }, + "bearer_token": { + "type": "string", + "example": "JF83HF73H21D0GJ3W9W02F29" + }, + "facebook_id": { + "type": "string", + "example": "fbidstring", + "deprecated": true + }, + "twitter_id": { + "type": "string", + "example": "twidstring", + "deprecated": true + }, + "email_verified_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T20:11:00.014Z" + }, + "referred_by_code": { + "type": "string" + }, + "gpa": { + "type": "number", + "format": "float", + "minimum": 0, + "maximum": 4, + "default": 0, + "example": 4 + }, + "is_admin": { + "type": "boolean", + "example": false + }, + "admittedly_score": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "default": 0, + "example": 95 + }, + "is_tutorial_completed": { + "type": "boolean", + "default": false, + "example": false + }, + "is_profile_public": { + "type": "boolean", + "default": false, + "example": false + }, + "tutorial_step": { + "type": "string", + "default": "" + }, + "update_increment": { + "type": "integer", + "default": 0, + "example": 12 + }, + "is_school_verified": { + "type": "boolean", + "default": false, + "example": false + }, + "personal_color": { + "type": "string" + }, + "profile_completion": { + "type": "number", + "format": "float", + "default": 0, + "example": 0.75 + }, + "subscription_expires_at": { + "type": "string", + "format": "date-time", + "example": "2020-01-01T00:00:00.000Z" + }, + "from_mo": { + "type": "boolean", + "default": true, + "example": true + }, + "old_password_format": { + "type": "boolean", + "default": false, + "example": false + }, + "onboarding_status": { + "type": "string", + "default": "INITIAL", + "enum": [ + "INITIAL", + "STARTED" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T19:01:01.088Z" + }, + "forum_posts_count": { + "type": "integer", + "default": 0, + "example": 3, + "deprecated": true + }, + "forum_likes_count": { + "type": "integer", + "default": 0, + "example": 4, + "deprecated": true + }, + "following_count": { + "type": "integer", + "default": 0, + "deprecated": true + }, + "follower_count": { + "type": "integer", + "default": 0, + "deprecated": true + }, + "has_unlimited_messages": { + "type": "boolean", + "default": false, + "deprecated": true + }, + "surveyAnswers": { + "type": "object", + "properties": { + "PARENTCOL": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "example": "PARCOLYES" + } + }, + "GRADYEAR": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "example": "HSGRAD2021" + } + }, + "MOPFAFSA": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "MOPFAFSANOT", + "MOPFAFSASTARTED", + "MOPFAFSASUBMITTED", + "MOPFAFSASELECTED", + "MOPFAFSARESUBMITTED", + "MOPFAFSAACCEPTED" + ] + } + } + } + }, + "password": { + "type": "string", + "example": "password" + }, + "applications": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "student_key": { + "type": "string", + "example": "102482975" + }, + "school_id": { + "type": "integer", + "example": 1 + }, + "application_status_key": { + "type": "string", + "enum": [ + "INITIAL", + "APPLYING_0", + "APPLYING_25", + "APPLYING_50", + "APPLYING_75", + "APPLIED", + "ACCEPTED", + "NOT_ACCEPTED", + "ENROLLING", + "NOT_ENROLLING", + "DEFERRED_WAITLISTED" + ] + }, + "update_increment": { + "type": "integer", + "example": 1 + }, + "is_bookmarked": { + "type": "boolean", + "example": true + }, + "is_declared": { + "type": "boolean", + "example": true + }, + "is_quickmatch": { + "type": "boolean", + "example": false + }, + "is_aos": { + "type": "boolean", + "example": false + }, + "application_status": { + "type": "string", + "example": "applying" + }, + "applying_percent": { + "type": "integer", + "example": 75 + }, + "school": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + }, + "has_campus_image_1x1": { + "type": "boolean" + }, + "has_campus_image_16x9": { + "type": "boolean" + }, + "slug_name": { + "type": "string", + "example": "test-university-1" + }, + "images": { + "type": "object", + "properties": { + "logo": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/logo.png" + }, + "1x1_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "1x1_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_320": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_640": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1076": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_1500": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + }, + "16x9_2048": { + "type": "string", + "format": "uri", + "example": "https://www.test.com/image.jpg" + } + } + } + } + } + } + }, + { + "type": "object", + "properties": { + "school_id": { + "type": "integer", + "example": 1 + }, + "error": { + "type": "string", + "example": "College not found" + } + } + } + ] + } + }, + "checklist": { + "oneOf": [ + { + "type": "object", + "properties": { + "updatedChecklistIds": { + "type": "array", + "items": { + "type": "integer", + "example": 42 + } + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 27 + }, + "is_visible": { + "type": "boolean", + "default": false, + "example": true + }, + "title": { + "type": "string", + "example": "Checklist item title" + }, + "description": { + "type": "string", + "example": "Checklist item description" + }, + "link": { + "type": "string", + "format": "uri", + "example": "https://some.link.here" + }, + "deadline": { + "type": "string", + "format": "date-time", + "example": "2018-09-24T01:38:17.690Z" + }, + "high_school_grade": { + "type": "integer", + "minimum": 0, + "maximum": 4, + "example": 2 + }, + "semester": { + "type": "integer", + "minimum": 1, + "maximum": 2, + "example": 2 + }, + "is_athlete": { + "type": "boolean", + "default": false, + "example": true + }, + "is_first_gen": { + "type": "boolean", + "default": false, + "example": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-04-24T01:38:17.690Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "deleted_at": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "integer", + "minimum": 0, + "maximum": 2, + "example": 1 + }, + "status_updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "personal_notes": { + "type": "string", + "example": "Checklist item personal notes" + } + } + } + } + } + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 27 + }, + "is_visible": { + "type": "boolean", + "default": false, + "example": true + }, + "title": { + "type": "string", + "example": "Checklist item title" + }, + "description": { + "type": "string", + "example": "Checklist item description" + }, + "link": { + "type": "string", + "format": "uri", + "example": "https://some.link.here" + }, + "deadline": { + "type": "string", + "format": "date-time", + "example": "2018-09-24T01:38:17.690Z" + }, + "high_school_grade": { + "type": "integer", + "minimum": 0, + "maximum": 4, + "example": 2 + }, + "semester": { + "type": "integer", + "minimum": 1, + "maximum": 2, + "example": 2 + }, + "is_athlete": { + "type": "boolean", + "default": false, + "example": true + }, + "is_first_gen": { + "type": "boolean", + "default": false, + "example": false + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-04-24T01:38:17.690Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "deleted_at": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "integer", + "minimum": 0, + "maximum": 2, + "example": 1 + }, + "status_updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-06-28T03:34:54.191Z" + }, + "personal_notes": { + "type": "string", + "example": "Checklist item personal notes" + } + } + } + } + ] + } + } + }, + "secondarySchool": { + "type": "object", + "properties": { + "hs_id": { + "type": "string", + "example": "HS021361" + }, + "name": { + "type": "string", + "example": "Stanfield Johnson" + }, + "city": { + "type": "string", + "example": "Stanfield" + }, + "state": { + "type": "string", + "example": "WA" + }, + "address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "address_2": { + "type": "string", + "example": "" + }, + "zip": { + "type": "string", + "example": "11222" + }, + "zip4": { + "type": "string", + "example": "2328" + }, + "usps_address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "usps_address_2": { + "type": "string", + "example": "" + }, + "usps_city": { + "type": "string", + "example": "Brooklyn" + }, + "usps_state": { + "type": "string", + "example": "NY" + }, + "usps_zip": { + "type": "string", + "example": "11222" + }, + "district": { + "type": "object", + "properties": { + "hs_id": { + "type": "string", + "example": "HS021361" + }, + "name": { + "type": "string", + "example": "Stanfield Johnson" + }, + "city": { + "type": "string", + "example": "Stanfield" + }, + "state": { + "type": "string", + "example": "WA" + }, + "address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "address_2": { + "type": "string", + "example": "" + }, + "zip": { + "type": "string", + "example": "11222" + }, + "zip4": { + "type": "string", + "example": "2328" + }, + "usps_address_1": { + "type": "string", + "example": "3101 S Bagdad Rd" + }, + "usps_address_2": { + "type": "string", + "example": "" + }, + "usps_city": { + "type": "string", + "example": "Brooklyn" + }, + "usps_state": { + "type": "string", + "example": "NY" + }, + "usps_zip": { + "type": "string", + "example": "11222" + } + } + } + } + }, + "secondarySchoolUser": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + } + } + }, + "organization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + } + } + }, + "type": { + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Admin" + ] + }, + "updatedAt": { + "type": "string", + "example": "2020-06-19T14:29:37.492Z" + }, + "createdAt": { + "type": "string", + "example": "2020-06-19T14:29:37.492Z" + } + } + }, + "secondarySchoolUserList": { + "type": "object", + "properties": { + "userList": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + } + } + }, + "organization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + } + } + }, + "type": { + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Admin" + ] + }, + "updatedAt": { + "type": "string", + "example": "2020-06-19T14:29:37.492Z" + }, + "createdAt": { + "type": "string", + "example": "2020-06-19T14:29:37.492Z" + } + } + } + }, + "adminCount": { + "type": "number", + "example": 2 + } + } + }, + "secondarySchoolCreateRequest": { + "type": "object", + "required": [ + "firstName", + "lastName", + "email", + "role", + "permissions" + ], + "properties": { + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "role": { + "type": "string", + "enum": [ + "counselor", + "principal", + "teacher", + "coach", + "teaching_assistant", + "superintendent", + "other" + ] + }, + "prefix": { + "type": "string", + "enum": [ + "mister", + "doctor", + "miss", + "misses" + ] + }, + "permissions": { + "type": "object", + "properties": { + "applicationManagement": { + "type": "boolean", + "example": true + }, + "credentialSubmission": { + "type": "boolean", + "example": false + }, + "highSchoolAdmin": { + "type": "boolean", + "example": true + } + } + } + } + }, + "secondarySchoolEditRequest": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "counselor", + "principal", + "teacher", + "coach", + "teaching_assistant", + "superintendent", + "other" + ] + }, + "permissions": { + "type": "object", + "properties": { + "applicationManagement": { + "type": "boolean", + "example": true + }, + "credentialSubmission": { + "type": "boolean", + "example": false + }, + "highSchoolAdmin": { + "type": "boolean", + "example": true + } + } + } + } + }, + "secondarySchoolUserRequest": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "permissions": { + "type": "object", + "properties": { + "applicationManagement": { + "type": "boolean", + "example": true + }, + "credentialSubmission": { + "type": "boolean", + "example": false + }, + "highSchoolAdmin": { + "type": "boolean", + "example": true + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "name": { + "type": "string", + "example": "Sample University" + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "prefix": { + "type": "string", + "enum": [ + "doctor", + "mr", + "mrs", + "ms" + ] + }, + "role": { + "type": "string", + "enum": [ + "counselor", + "principal", + "teacher", + "coach", + "teaching_assistant", + "superintendent", + "other" + ] + } + } + }, + "secondarySchoolCreateResponse": { + "type": "object", + "properties": { + "userUid": { + "type": "string", + "example": "aa112233-444a-55aa-a66a-3f7e7baaafa3" + }, + "organizationUid": { + "type": "string", + "example": "aa112233-444a-55aa-a66a-3f7e7baaafa3" + }, + "updatedAt": { + "type": "string", + "example": "2020-06-11T20:30:52.408Z" + }, + "createdAt": { + "type": "string", + "example": "2020-06-11T20:30:52.408Z" + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } + }, + "type": { + "type": "string", + "example": "Primary" + } + } + }, + "credential": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx", + "description": "This is the primary key" + }, + "export_id": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx" + }, + "credential_type": { + "type": "string", + "enum": [ + "final-transcript", + "interim-transcript", + "recommendation", + "application-essay", + "fee-waiver", + "personal-statement", + "portfolio-manuscript", + "resume", + "other" + ] + }, + "submitted_at": { + "type": "string", + "example": "1558984276791" + }, + "first_export_date": { + "type": "string", + "example": "1558984276791" + }, + "removed_by": { + "type": "string", + "example": "removedBy" + }, + "file": { + "type": "object", + "example": { + "display_name": "displayName" + } + }, + "url": { + "type": "string", + "example": "http://credential.url.org/credentialidonaremotebucketthatcanbeanything" + } + } + }, + "exportedCredential": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx", + "description": "This is the primary key" + }, + "url": { + "type": "string", + "example": "http://credential.url.org/credentialidonaremotebucketthatcanbeanything" + } + } + }, + "createCredentialRequest": { + "type": "object", + "properties": { + "credentialToReplaceUid": { + "type": "string", + "example": "xxxx-xxx-xxxx-xxx" + }, + "type": { + "type": "string", + "example": "final-transcript", + "enum": [ + "final-transcript", + "interim-transcript", + "recommendation", + "application-essay", + "fee-waiver", + "personal-statement", + "portfolio-manuscript", + "resume", + "other" + ] + }, + "displayName": { + "type": "string", + "example": "example.pdf" + } + } + }, + "createdCredential": { + "type": "object", + "properties": { + "credential": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx", + "description": "This is the primary key" + }, + "export_id": { + "type": "string", + "example": "xxxx-xxxx-xxxx-xxxx" + }, + "credential_type": { + "type": "string", + "enum": [ + "final-transcript", + "interim-transcript", + "recommendation", + "application-essay", + "fee-waiver", + "personal-statement", + "portfolio-manuscript", + "resume", + "other" + ] + }, + "submitted_at": { + "type": "string", + "example": "1558984276791" + }, + "first_export_date": { + "type": "string", + "example": "1558984276791" + }, + "removed_by": { + "type": "string", + "example": "removedBy" + }, + "file": { + "type": "object", + "example": { + "display_name": "displayName" + } + } + } + }, + "upload_url": { + "type": "string", + "example": "uploadUrl" + }, + "upload_fields": { + "type": "object", + "properties": { + "fieldKey": { + "type": "string", + "example": "fieldValue" + } + } + } + } + }, + "college": { + "type": "object", + "properties": { + "mcocid": { + "type": "integer", + "example": 792 + }, + "name": { + "type": "string", + "example": "CollegeName" + }, + "nickname": { + "type": "string", + "example": "CollegeNickname" + }, + "fice": { + "type": "string", + "example": "1525134" + }, + "ug_inst_id": { + "type": "string", + "example": "collegeinsta" + }, + "ipeds_id": { + "type": "string", + "default": "234525" + }, + "address_1": { + "type": "string", + "default": "CollegeAddress1" + }, + "address_2": { + "type": "string", + "default": "CollegeAddress2" + }, + "city": { + "type": "string", + "default": "CollegeCity" + }, + "state": { + "type": "string", + "default": "CS" + }, + "zip": { + "type": "string", + "default": "12345" + }, + "country": { + "type": "string", + "default": "CollegeCountry" + }, + "urls": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "M", + "I", + "S", + "A", + "B" + ] + }, + "value": { + "type": "string", + "example": "www.example.com" + }, + "type_desc": { + "type": "string", + "enum": [ + "Main", + "Inquiry", + "Schedule Visit", + "Apply", + "Admissions Blog" + ] + } + } + } + } + } + }, + "invitation": { + "type": "object", + "required": [ + "studentKey", + "mentorEmail", + "token" + ], + "properties": { + "studentKey": { + "type": "string", + "example": "9999999" + }, + "mentorEmail": { + "type": "string", + "example": "test@user.mail" + }, + "token": { + "type": "string", + "example": "12345" + } + } + }, + "invitationDetails": { + "type": "object", + "properties": { + "studentFirstName": { + "type": "string", + "example": "John" + }, + "studentLastName": { + "type": "string", + "example": "Longo" + }, + "studentEmail": { + "type": "string", + "example": "test@mail.com" + } + } + }, + "activateUserFromInvitation": { + "type": "object", + "required": [ + "token", + "mentorEmail", + "firstName", + "lastName", + "password", + "studentKey", + "role", + "acceptedTerms" + ], + "properties": { + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "token": { + "type": "string", + "example": "12345" + }, + "mentorEmail": { + "type": "string", + "example": "test@email.com" + }, + "password": { + "type": "string", + "example": "1a2b3c4d5e" + }, + "studentKey": { + "type": "string", + "example": "9999999" + }, + "role": { + "type": "string", + "enum": [ + "counselor", + "principal", + "teacher", + "coach", + "teaching_assistant", + "superintendent", + "other" + ] + }, + "acceptedTerms": { + "type": "boolean", + "example": true + }, + "prefix": { + "type": "string", + "enum": [ + "doctor", + "mr", + "mrs", + "ms" + ] + } + } + }, + "unauthorized": { + "type": "object", + "properties": { + "status": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "jwt expired" + } + } + }, + "healthResponse": { + "type": "object", + "properties": { + "database": { + "type": "string", + "example": "development" + }, + "email": { + "type": "string", + "example": "development" + }, + "genericCache": { + "type": "string", + "example": "development" + }, + "myOptions": { + "type": "string", + "example": "development" + }, + "secondarySchoolService": { + "type": "string", + "example": "development" + }, + "studentCredentials": { + "type": "string", + "example": "development" + }, + "studentService": { + "type": "string", + "example": "development" + }, + "ums": { + "type": "string", + "example": "development" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "201": { + "description": "Created" + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "No Content" + }, + "301": { + "description": "Moved Permanently" + }, + "307": { + "description": "Temporary Redirect" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not Found" + }, + "409": { + "description": "Conflict" + }, + "429": { + "description": "Too Many Requests" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + }, + "parameters": { + "limit": { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "default": 20, + "minimum": 1 + }, + "required": false, + "description": "Size limit for returned array" + }, + "offset": { + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "default": 0, + "minimum": 0 + }, + "required": false, + "description": "Offset for the data to be returned" + }, + "sort": { + "in": "query", + "name": "sort", + "schema": { + "type": "string", + "example": "fieldName(asc),otherFieldName(desc)" + }, + "required": false, + "description": "Specifies sorting and sort order by fields" + }, + "status": { + "in": "query", + "name": "status", + "schema": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ] + }, + "required": false, + "description": "Filters list by status" + }, + "type": { + "in": "query", + "name": "type", + "schema": { + "type": "string", + "example": "User" + }, + "description": "Filter user list by type Example: type=User This will get all users which are of User type" + }, + "include": { + "in": "query", + "name": "include", + "schema": { + "type": "string" + }, + "required": false, + "description": "Includes additional data in the students base info, such as checklist or application_status_key" + }, + "searchStr": { + "in": "query", + "name": "searchStr", + "schema": { + "type": "string", + "example": "stringToSearch" + }, + "required": false, + "description": "Filter users list by searchStr. Example: searchStr=Abbott. \n This will get all users containing Abbott in an important field (firstName, lastName, userName, email)" + }, + "ignore": { + "in": "query", + "name": "ignore", + "schema": { + "type": "string", + "example": "firstName|lastName" + }, + "required": false, + "description": "List of user fields to ignore on search when passing searchStr parameter.\n Example: ignore=firstName|lastName" + }, + "firstName": { + "in": "query", + "name": "firstName", + "schema": { + "type": "string", + "example": "Jack|Jackson" + }, + "description": "Filter user list by firstName Example: firstName=Jack|Jackson This will get all users with firstName matching \"Jack\" or \"Jackson\"\n" + }, + "lastName": { + "in": "query", + "name": "lastName", + "schema": { + "type": "string", + "example": "Sam|Samwise" + }, + "description": "Filter user list by lastName Example: lastName=Sam|Samwise This will get all users with lastName matching \"Sam\" or \"Samwise\"\n" + }, + "email": { + "in": "query", + "name": "email", + "schema": { + "type": "string", + "example": "mail@mal.com" + }, + "description": "Filter user list by email Example: firstName=mail@mail.com This will get the user with email \"mail@mail.com\"\n" + }, + "createdAt": { + "in": "query", + "name": "createdAt", + "schema": { + "type": "string", + "example": "2020-03-26T17:16:46.872Z" + }, + "description": "Filter by createdAt. Example 2020-03-26T17:16:46.872Z" + }, + "verifiedDate": { + "in": "query", + "name": "verifiedDate", + "schema": { + "type": "string", + "example": "2020-03-26T17:16:46.872Z" + }, + "description": "Filter by verifiedDate. Example 2020-03-26T17:16:46.872Z" + }, + "name": { + "in": "query", + "name": "name", + "schema": { + "type": "string", + "example": "testName" + }, + "description": "Filter organizations list by name Example: name=Org1|Org2 This will get all organizations with Org1 or Org2 as the name\n" + }, + "simple": { + "in": "query", + "name": "simple", + "schema": { + "type": "boolean", + "example": true + }, + "description": "If marked as true will return a simple version of the object (without joins or aggregations), defaults to false" + }, + "search": { + "in": "query", + "name": "search", + "schema": { + "type": "string", + "example": "Stan" + }, + "required": false, + "description": "Used for filtering results based on a search string" + }, + "relationshipTypes": { + "in": "query", + "name": "relationshipTypes", + "schema": { + "type": "string", + "enum": [ + "mentoring", + "counseling" + ] + }, + "required": false, + "description": "Parameter to filter results based on the relationship type" + }, + "surveyYear": { + "in": "query", + "name": "surveyYear", + "schema": { + "type": "number", + "example": 2020 + }, + "required": true, + "description": "MCO's Survey Year" + }, + "gradYears": { + "in": "query", + "name": "gradYears", + "schema": { + "type": "array", + "items": { + "type": "integer" + }, + "minItems": 1 + }, + "explode": false, + "required": false, + "description": "List of student graduation years for filtering" + }, + "hsIds": { + "in": "query", + "name": "hsIds", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "HS001234", + "HS054321" + ] + }, + "explode": false, + "required": false, + "description": "List of MCO's HS IDs for filtering" + }, + "editions": { + "in": "query", + "name": "editions", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "mco", + "mop" + ] + }, + "example": [ + "mco", + "mop" + ] + }, + "required": false, + "description": "Survey editions" + }, + "permission": { + "in": "query", + "name": "permission", + "schema": { + "type": "string", + "enum": [ + "applicationManagement", + "credentialSubmission" + ], + "example": "credentialSubmission" + }, + "description": "Filter results based on a specific user permission" + }, + "invitationToken": { + "in": "query", + "name": "token", + "description": "The invitation validation token\n", + "schema": { + "type": "string" + }, + "required": true + }, + "deleteReason": { + "in": "query", + "name": "reason", + "schema": { + "type": "string", + "example": "reason" + }, + "description": "Text containing the reason to delete a credential" + }, + "externalId": { + "in": "query", + "name": "externalId", + "schema": { + "type": "string", + "example": "HC000123" + } + }, + "externalSource": { + "in": "query", + "name": "externalSource", + "schema": { + "type": "string", + "example": "contact_id" + } + }, + "uid": { + "name": "uid", + "in": "path", + "description": "Unique identifier in UMS", + "required": true, + "schema": { + "type": "string" + } + }, + "studentKey": { + "name": "studentKey", + "in": "path", + "description": "Student key", + "required": true, + "schema": { + "type": "string" + } + }, + "key": { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "schema": { + "type": "string" + } + }, + "credUid": { + "name": "credUid", + "in": "path", + "description": "Credential unique ID", + "required": true, + "schema": { + "type": "string" + } + }, + "collegeFice": { + "name": "collegeFice", + "in": "path", + "description": "Unique ID for college", + "required": true, + "schema": { + "type": "string" + } + }, + "collegeId": { + "name": "collegeId", + "in": "path", + "description": "Unique ID (mcocid) for MCO college", + "required": true, + "schema": { + "type": "string" + } + }, + "highSchoolId": { + "name": "hsId", + "in": "path", + "description": "Unique ID for MCO High School", + "required": true, + "schema": { + "type": "string" + } + }, + "mentorEmail": { + "name": "mentorEmail", + "in": "path", + "description": "The invited mentor email, possibly already associated to an Encourage account", + "required": true, + "schema": { + "type": "string" + } + }, + "contactId": { + "name": "contact_id", + "in": "path", + "description": "The external ID, contact_id, of the educator contact", + "required": true, + "schema": { + "type": "string" + } + }, + "sendEmail": { + "name": "Send-Email", + "in": "header", + "description": "Indicates whether an actual email should be sent or not. For security reasons the default behavior is to not send any email.\n", + "schema": { + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + } + }, + "cacheControl": { + "name": "Cache-Control", + "in": "header", + "description": "Informs the service that it should skip cache reading (no-cache), writing (no-store) or both in this request", + "schema": { + "type": "string", + "enum": [ + "no-cache", + "no-store", + "no-cache no-store" + ] + } + } + }, + "headers": { + "total-count": { + "schema": { + "type": "integer" + }, + "description": "The total number of resources for the input query" + }, + "total-pages": { + "schema": { + "type": "integer" + }, + "description": "The total number of pages considering the input query and the limit query parameter" + }, + "prev-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the previous set of resources considering the same input query and the limit parameter" + }, + "next-offset": { + "schema": { + "type": "integer" + }, + "description": "The value of the offset in order to get the next set of resources considering the same input query and the limit parameter" + }, + "Expires": { + "schema": { + "type": "string" + }, + "description": "The expiration date for a given requested resource, only when obtained from the cache" + } + }, + "securitySchemes": { + "JWT": { + "description": "In order to access the service a valid JWT token must be passed in all the queries in the 'Authorization' header.\n \nA valid JWT token is generated by the API and returned as answer of a call to the route /authenticate giving a valid user & password.\n \nThe following syntax must be used in the 'Authorization' header:\n \nJWT xxxxxx.yyyyyyy.zzzzzz\n \n", + "type": "apiKey", + "name": "Authorization", + "in": "header" + }, + "AWS": { + "description": "AWS API Key for the environment\n", + "type": "apiKey", + "name": "x-api-key", + "in": "header" + }, + "Organization": { + "description": "Organization UID\n", + "type": "apiKey", + "name": "Organization", + "in": "header" + } + } + }, + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "externalDocs": { + "url": "https://nrccua.atlassian.net/wiki/spaces/MDL/pages/102531073/API+Design+Guidelines", + "description": "Learn more about operations on request/response fields provided by this service." + } +} diff --git a/test/test_data/generateRoutes/OpenAPIV3NoUnder200Response.json b/test/test_data/generateRoutes/OpenAPIV3NoUnder200Response.json new file mode 100644 index 0000000..b4eb869 --- /dev/null +++ b/test/test_data/generateRoutes/OpenAPIV3NoUnder200Response.json @@ -0,0 +1,87 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Encourage Service", + "description": "Encourage Service endpoints used by Encourage clients and other internal services", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.dev-encourage.myoptions.org/v1", + "description": "URL for \"development\" environment" + } + ], + "paths": { + "/health": { + "get": { + "tags": [ + "Health" + ], + "summary": "Health Checker", + "operationId": "health", + "description": "Check service status and environment", + "responses": { + "300": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "database": { + "type": "string", + "example": "development" + }, + "email": { + "type": "string", + "example": "development" + }, + "genericCache": { + "type": "string", + "example": "development" + }, + "myOptions": { + "type": "string", + "example": "development" + }, + "secondarySchoolService": { + "type": "string", + "example": "development" + }, + "studentCredentials": { + "type": "string", + "example": "development" + }, + "studentService": { + "type": "string", + "example": "development" + }, + "ums": { + "type": "string", + "example": "development" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + } + }, + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "externalDocs": { + "url": "https://nrccua.atlassian.net/wiki/spaces/MDL/pages/102531073/API+Design+Guidelines", + "description": "Learn more about operations on request/response fields provided by this service." + } +} diff --git a/test/test_data/generateRoutes/OpenAPIV3WithRef.json b/test/test_data/generateRoutes/OpenAPIV3WithRef.json new file mode 100644 index 0000000..cf2d7f1 --- /dev/null +++ b/test/test_data/generateRoutes/OpenAPIV3WithRef.json @@ -0,0 +1,410 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Encourage Service", + "description": "Encourage Service endpoints used by Encourage clients and other internal services", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.dev-encourage.myoptions.org/v1", + "description": "URL for \"development\" environment" + } + ], + "paths": { + "/login": { + "post": { + "tags": [ + "Authorization" + ], + "summary": "Authenticates a user", + "operationId": "login", + "security": [ + { + "AWS": [] + } + ], + "requestBody": { + "required": true, + "description": "email and password to be used in the authentication process. If acceptedTerms is set to true, it will update user's terms attribute", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "test@mail.com" + }, + "password": { + "type": "string", + "format": "password", + "example": "testPassword" + }, + "acceptedTerms": { + "type": "boolean", + "example": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponseError" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + }, + "504": { + "description": "Gateway Timeout" + } + } + } + } + }, + "components": { + "schemas": { + "LoginResponse": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "type": { + "type": "string", + "example": "User", + "default": "User", + "enum": [ + "LdapUser", + "Role", + "User" + ] + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + }, + "userName": { + "type": "string", + "example": "testUserName" + }, + "status": { + "type": "string", + "example": "Active", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + }, + "email": { + "type": "string", + "format": "email", + "example": "test@user.mail" + }, + "verifiedDate": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2019-01-07T18:29:25.493Z" + }, + "externalIds": { + "type": "array", + "items": { + "type": "object", + "required": [ + "uid", + "userUid", + "source", + "externalId" + ], + "properties": { + "uid": { + "type": "string", + "example": "aaaa-bbbbb-ccccc-ddddd", + "description": "UMS unique identifier for the external ID entity" + }, + "userUid": { + "type": "string", + "example": "82596c17-2e90-4321-8f67-c16e4a4ae646" + }, + "organizationUid": { + "type": "string", + "example": "a80585ee-7e81-4d7c-8a75-4c2293243703", + "description": "Optional property if the external ID for the user is related to an org" + }, + "source": { + "type": "string", + "example": "contact_id" + }, + "externalId": { + "type": "string", + "example": "HCSXFXYZ" + } + } + } + }, + "creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "testUserFirstName" + }, + "lastName": { + "type": "string", + "example": "testUserLastName" + } + } + }, + "versionWarning": { + "type": "boolean", + "example": "false", + "default": "false" + }, + "application": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "key": { + "type": "string", + "example": "Encourage" + } + } + }, + "organizations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": {} + }, + "group": {}, + "parent": {}, + "creator": {}, + "users": { + "type": "array", + "items": {} + }, + "applications": { + "type": "array", + "items": {} + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + } + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + } + } + } + }, + "sessionToken": { + "type": "string", + "format": "byte", + "example": "Base64 string" + } + } + }, + "LoginResponseError": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Missing user credentials (email and/or password)" + } + } + } + } + }, + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "externalDocs": { + "url": "https://nrccua.atlassian.net/wiki/spaces/MDL/pages/102531073/API+Design+Guidelines", + "description": "Learn more about operations on request/response fields provided by this service." + } +} diff --git a/test/test_data/generateRoutes/UmsApiSwagger2WithRefs.json b/test/test_data/generateRoutes/UmsApiSwagger2WithRefs.json new file mode 100644 index 0000000..b5f3b74 --- /dev/null +++ b/test/test_data/generateRoutes/UmsApiSwagger2WithRefs.json @@ -0,0 +1,12297 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.2.35", + "title": "User Management System API", + "termsOfService": "", + "contact": { + "email": "something@nrccua.org" + }, + "description": "\"User Management System API. Note: most errors have a message and a status field in the response body, but SwaggerUI won't show it (open issue in swagger-ui)\"\n" + }, + "host": "api-dev-ums.nrccua.org", + "basePath": "/v1", + "tags": [ + { + "name": "Authorization", + "description": "Authorization" + }, + { + "name": "User", + "description": "User" + }, + { + "name": "Organization", + "description": "Organization" + }, + { + "name": "Application", + "description": "Application" + }, + { + "name": "Module", + "description": "Module" + }, + { + "name": "Note", + "description": "Note" + }, + { + "name": "OrganizationApplication", + "description": "Organization Application Relationship" + }, + { + "name": "Role", + "description": "Role" + }, + { + "name": "UserApplication", + "description": "User Application Relationship" + }, + { + "name": "UserOrganization", + "description": "User Organization Relationship" + }, + { + "name": "UserApplicationModule", + "description": "User Aplication Module Relationship" + }, + { + "name": "OrganizationApplicationModule", + "description": "Organization Application Module Relationship" + }, + { + "name": "Encrypt", + "description": "Encrypt" + } + ], + "schemes": [ + "https", + "http" + ], + "securityDefinitions": { + "JWT": { + "description": "For accessing the API a valid JWT token must be passed in all the queries in the 'Authorization' header.\n\n\nA valid JWT token is generated by the API and returned as answer of a call to the route /authenticate giving a valid user & password.\n\n\nThe following syntax must be used in the 'Authorization' header :\n\n JWT xxxxxx.yyyyyyy.zzzzzz\n", + "type": "apiKey", + "name": "Authorization", + "in": "header" + }, + "AWS": { + "description": "AWS API Key for development enviroment\n", + "type": "apiKey", + "name": "x-api-key", + "in": "header" + } + }, + "paths": { + "/authenticate": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "authenticate", + "security": [ + { + "AWS": [] + } + ], + "summary": "Authenticates user", + "description": "Authenticates active user", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "userName and password to be used in the authentication process", + "required": true, + "schema": { + "$ref": "#/definitions/AuthenticationRequest" + } + } + ], + "responses": { + "200": { + "description": "userName and password successfully authenticated", + "schema": { + "$ref": "#/definitions/AuthenticationResponse" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/authenticatev2": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "authenticatev2", + "security": [ + { + "AWS": [] + } + ], + "summary": "Authenticates user v2", + "description": "Authenticates active user", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "userName and password to be used in the authentication process", + "required": true, + "schema": { + "$ref": "#/definitions/Authenticationv2Request" + } + } + ], + "responses": { + "200": { + "description": "userName and password successfully authenticated", + "schema": { + "$ref": "#/definitions/AuthenticationResponse" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/activate-user": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "activateUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Activate user", + "description": "Verifies user e-mail and if e-mail is valid, activate user and set userName and passname", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Body contains the user e-mail to be verified and the verificationCode, which corresponds to the authToken in the user model; the userName to be set; the password; and user uid.", + "required": true, + "schema": { + "$ref": "#/definitions/ActivateUserRequest" + } + } + ], + "responses": { + "200": { + "description": "User successfully verified", + "schema": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "message": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/forgot-password": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "forgotPassword", + "security": [ + { + "AWS": [] + } + ], + "summary": "Send forgot password e-mail", + "description": "Requests a password change. An e-mail with instructions on how to change the password will be sent to the configured user e-mail\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "Send-Email", + "in": "header", + "description": "Indicates whether an actual email should be sent or not. For security reasons the default behavior is to not send any email.\n", + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + }, + { + "name": "Return-Verification-Code", + "in": "header", + "description": "Indicates whether the user verification code should be returned or not. For security reasons the default behavior is to not return it.", + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + }, + { + "name": "body", + "in": "body", + "description": "Body should have the e-mail or userName of the user that forgot his password", + "required": true, + "schema": { + "$ref": "#/definitions/ForgotPasswordRequest" + } + } + ], + "responses": { + "200": { + "description": "E-mail with password change information sent successfully", + "schema": { + "$ref": "#/definitions/StandardUserResponse" + } + }, + "204": { + "description": "User not found" + } + } + } + }, + "/reset-password": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "resetPassword", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Changes user password", + "description": "Changes user password to a new password provided in the request body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Body must always contains the new password field. The uid or e-mail to identify the user is only necessary for LdapUsers trying to change some other user password, or for UMS users that are logged off, in this case it should only contain the verification code (uid and e-mail will be ignored).\n", + "required": true, + "schema": { + "$ref": "#/definitions/ResetPasswordRequest" + } + } + ], + "responses": { + "200": { + "description": "Password successfully modified", + "schema": { + "$ref": "#/definitions/StandardUserResponse" + } + }, + "204": { + "description": "User not found" + }, + "401": { + "description": "Info doesn't match" + } + } + } + }, + "/refresh-token": { + "get": { + "tags": [ + "Authorization" + ], + "operationId": "refresh-token", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Refresh JWT", + "description": "Return a new Json Web Token with a refreshed expiration time", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "JWT successfully refreshed", + "schema": { + "type": "object", + "properties": { + "sessionToken": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/validate-token": { + "get": { + "tags": [ + "Authorization" + ], + "operationId": "validate-token", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Validate JWT", + "description": "Return the JWT internal payload if it's a valide (and not expired) UMS token", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "JWT successfully validated", + "schema": { + "$ref": "#/definitions/Credentials" + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/validate-email": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "validateEmail", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Validate Email", + "description": "Return a flag indicating if e-mails is valid (not used yet) or invalid.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Body must contain the e-mail to be validated, in other words, an e-mail that uniqueness will be verified.\n", + "required": true, + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "son.goku@capsule-corp.org" + }, + "application": { + "type": "string", + "example": "datalab" + } + } + } + } + ], + "responses": { + "200": { + "description": "Email validated", + "schema": { + "type": "object", + "properties": { + "isEmailUnique": { + "type": "boolean", + "example": true + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/validate-username": { + "post": { + "tags": [ + "Authorization" + ], + "operationId": "validateUsername", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Validate Username", + "description": "Returns a flag indicating if the username is valid and another flag indicating if the username was not used yet\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Body must contain the username to be validated", + "required": true, + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "son.goku" + } + } + } + } + ], + "responses": { + "200": { + "description": "Username validated", + "schema": { + "type": "object", + "properties": { + "isUserNameUnique": { + "type": "boolean", + "example": true + }, + "isUserNameValid": { + "type": "boolean", + "example": true + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users": { + "post": { + "tags": [ + "User" + ], + "operationId": "createUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new user", + "description": "Creates a new User passing user data. Not all user model fields are required, check its description for reference\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "Send-Email", + "in": "header", + "description": "Indicates whether an actual email should be sent or not. For security reasons the default behavior is to not send any email.", + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + }, + { + "name": "Return-Verification-Code", + "in": "header", + "description": "Indicates whether the user verification code should be returned or not. For security reasons the default behavior is to not return it.", + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + }, + { + "name": "body", + "in": "body", + "description": "Body is a JSON describing the user to be created", + "required": true, + "schema": { + "$ref": "#/definitions/CreateUserRequest" + } + } + ], + "responses": { + "201": { + "description": "User created successfuly", + "schema": { + "$ref": "#/definitions/StandardUserResponse" + } + }, + "400": { + "description": "Validation error" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "User" + ], + "operationId": "readUserList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets list of user", + "parameters": [ + { + "name": "application", + "in": "query", + "description": "User application UID. It's not implemented yet!", + "type": "array", + "items": { + "type": "string" + } + }, + { + "name": "organization", + "in": "query", + "description": "User organization UID. It's not implemented yet!", + "type": "array", + "items": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "User status Check \"Try Out\" for options Select more than one by holding ctrl\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + } + }, + { + "name": "firstName", + "in": "query", + "description": "Filter user list by firstName Example: firstName=Pedro|Flavio This will get all users with Pedro or Flavio as the first name\n", + "type": "string" + }, + { + "name": "lastName", + "in": "query", + "description": "Filter user list by lastName Example: lastName=Oliveira|Santos This will get all users with Oliveira or Santos as the last name\n", + "type": "string" + }, + { + "name": "userName", + "in": "query", + "description": "Filter user list by userName Example: userName=Pedro123|Flavio345 This will get the users with Pedro123 or Flavio345 as the userName\n", + "type": "string" + }, + { + "name": "email", + "in": "query", + "description": "Filter user list by email Example: email=admin@nrccuaorg|user@nrccuaorg This will get the users with admin@nrccuaorg or user@nrccuaorg as the email\n", + "type": "string" + }, + { + "name": "type", + "in": "query", + "description": "Filter user list by type Example: type=LdapUser\n", + "type": "string" + }, + { + "name": "externalSource", + "in": "query", + "type": "string", + "description": "Filter by external ID source" + }, + { + "name": "externalId", + "in": "query", + "type": "string", + "description": "Filter by external ID value" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of each object (without joins or aggregations), defaults to false" + }, + { + "name": "sort", + "in": "query", + "description": "Indicate the field used to order the resulting list Example: fieldOne,fieldTwo(desc) This will return the list sorted by fieldOne (ascending, the default) and then by fieldTwi (descending)\n", + "type": "string" + } + ], + "responses": { + "200": { + "description": "An array of Users", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/UserSmall" + } + }, + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible searches to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "head": { + "tags": [ + "User" + ], + "operationId": "readUserListHead", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets the header of the list of user", + "parameters": [ + { + "name": "application", + "in": "query", + "description": "User application UID. It's not implemented yet!", + "type": "array", + "items": { + "type": "string" + } + }, + { + "name": "organization", + "in": "query", + "description": "User organization UID. It's not implemented yet!", + "type": "array", + "items": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "User status Check \"Try Out\" for options Select more than one by holding ctrl\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + } + }, + { + "name": "firstName", + "in": "query", + "description": "Filter user list by firstName Example: firstName=Pedro|Flavio This will get all users with Pedro or Flavio as the first name and return their metadata in the header\n", + "type": "string" + }, + { + "name": "lastName", + "in": "query", + "description": "Filter user list by lastName Example: lastName=Oliveira|Santos This will get all users with Oliveira or Santos as the last name and return their metadata in the header\n", + "type": "string" + }, + { + "name": "userName", + "in": "query", + "description": "Filter user list by userName Example: userName=Pedro123|Flavio345 This will get the users with Pedro123 or Flavio345 as the userName and return their metadata in the header\n", + "type": "string" + }, + { + "name": "email", + "in": "query", + "description": "Filter user list by email Example: email=admin@nrccuaorg|user@nrccuaorg This will get the users with admin@nrccuaorg or user@nrccuaorg as the email and return their metadata in the header\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for data used to generate the metadata" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data used to generate the metadata" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of each object (without joins or aggregations), defaults to false" + } + ], + "responses": { + "200": { + "description": "The header of users along with their metadata", + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible searches to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users/{uid}": { + "get": { + "tags": [ + "User" + ], + "operationId": "readUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Finds user by UID", + "description": "Returns a single user by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of the User object, defaults to false" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/User" + } + }, + "204": { + "description": "No user found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "User" + ], + "operationId": "updateUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Updates an user", + "description": "Updates user identified by UID. Parameters to be updated are provided in the requested body and correspond to the fields described in user model. Valid user fields not shown in the model will be ignored in update (createAt, lastUpdated, ...) All parameters are optional, but at least one parameter must be provided in the request body for the request to succeed. The UID field can be provided but must match the one provided in path\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateUserRequest" + } + } + ], + "responses": { + "200": { + "description": "User update successfully", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "user": { + "$ref": "#/definitions/User" + } + } + } + }, + "204": { + "description": "User not found" + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "User" + ], + "operationId": "deleteUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an user", + "description": "Sets an user as inactive in the database", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "User successfully deleted", + "schema": { + "$ref": "#/definitions/DeleteUserResponse" + } + }, + "204": { + "description": "User not found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users/{uid}/modules/{moduleUid}/authorize": { + "get": { + "tags": [ + "User" + ], + "operationId": "isUserModAuthorized", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Checks if user has a permission for module", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module uid or module key", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/AuthorizeResponse" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/users/{uid}/applications/{appUid}/authorize": { + "get": { + "tags": [ + "User" + ], + "operationId": "isUserAppAuthorized", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Checks if user has a permission for application", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "appUid", + "in": "path", + "description": "Application uid or application key", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "object", + "properties": { + "authorize": { + "type": "boolean" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/users/{uid}/attributes": { + "get": { + "tags": [ + "User" + ], + "operationId": "getAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets user attributes", + "description": "Returns the attributes from an user by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "User" + ], + "operationId": "updateUserAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an user attribute in batch", + "description": "Creates or updates the user attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be created or updated", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "User" + ], + "operationId": "deleteUserAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an user attributes in batch", + "description": "Delete multiple user attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be deleted", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteAttributeRequest" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users/{uid}/attributes/keys": { + "get": { + "tags": [ + "User" + ], + "operationId": "readUserAttributesKeys", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets user attributes keys", + "description": "Returns the keys from user attributes", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes keys retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No user with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users/{uid}/attributes/keys/{key}": { + "get": { + "tags": [ + "User" + ], + "operationId": "readUserAttributesByKey", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets user attributes by key", + "description": "Returns the attributes from an user by its key", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No user with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "User" + ], + "operationId": "updateUserAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an user attribute", + "description": "Creates or updates an attribute from the user's attributes array by the user's UID in the path and the attribute key and value in the body If the key is not present in the array, the attribute is created, if the key is present the attribute is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an attribute entry to be created or updated", + "required": true, + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "User" + ], + "operationId": "deleteUserAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an user attribute", + "description": "Deletes an attribute from the user's attributes array by the user's UID in the path and the attribute key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users/{uid}/notes": { + "get": { + "tags": [ + "User" + ], + "operationId": "getUserNotes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets user notes", + "description": "Returns the notes from an user by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Notes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NoteSmall" + } + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users/{uid}/modifications": { + "get": { + "tags": [ + "User" + ], + "operationId": "getUserModifications", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets user modifications", + "description": "Returns the modifications from an user by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Modifications retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Modification" + } + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users/{uid}/login-history": { + "get": { + "tags": [ + "User" + ], + "operationId": "getLoginHistory", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets user login history", + "description": "Returns the login history from an user by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Login history retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/LoginHistory" + } + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users/{uid}/impersonate": { + "post": { + "tags": [ + "User" + ], + "operationId": "impersonateUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Impersonates a user", + "description": "Impersonates a user by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID of the user you want to impersonate", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Impersonation successful", + "schema": { + "$ref": "#/definitions/ImpersonateResponse" + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "delete": { + "tags": [ + "User" + ], + "operationId": "stopImpersonateUser", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Stops impersonating an user", + "description": "Stops impersonating an user by its UID and JWT payload. JWT should be the same as the one created in the POST impersonate route. An JWT obtained from the login route won't work on this route\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID of the user you want to stop impersonating (should match payload)", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Stopped impersonation successful", + "schema": { + "$ref": "#/definitions/AuthenticationResponse" + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + }, + "/users/{uid}/impersonate-history": { + "get": { + "tags": [ + "User" + ], + "operationId": "getImpersonateHistory", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets user impersonate history", + "description": "Returns the impersonate history from an user by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Impersonate history retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ImpersonateHistory" + } + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users/{uid}/resend-email": { + "post": { + "tags": [ + "User" + ], + "operationId": "resendEmail", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "summary": "Resend Email", + "description": "Sends an email to activate or invite a user again\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "Send-Email", + "in": "header", + "description": "Indicates whether an actual email should be sent or not. For security reasons the default behavior is to not send any email.\n", + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + }, + { + "name": "Return-Verification-Code", + "in": "header", + "description": "Indicates whether the user verification code should be returned or not. For security reasons the default behavior is to not return it.", + "type": "string", + "enum": [ + "not-allowed", + "allowed" + ] + }, + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": false, + "schema": { + "type": "object", + "properties": { + "emailConfig": { + "$ref": "#/definitions/EmailConfig" + } + } + } + } + ], + "responses": { + "201": { + "description": "E-mail sent successfully", + "schema": { + "$ref": "#/definitions/StandardUserResponse" + } + }, + "204": { + "description": "User not found" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users/{uid}/authorizations": { + "post": { + "tags": [ + "User" + ], + "operationId": "readWithAuthorizations", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "summary": "Read User with Authorizations", + "description": "Read User with Authorizations based on ApplicationKey and OrganizationUid\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "applicationKey": { + "type": "string", + "example": "datalab" + }, + "organizationUid": { + "type": "string", + "example": "105f7ec8-c4d8-4287-839d-61f7074d9977" + } + } + } + } + ], + "responses": { + "200": { + "description": "User successfully retrieved", + "schema": { + "$ref": "#/definitions/UserAuthorizations" + } + }, + "204": { + "description": "User not found" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users/{uid}/external-ids": { + "post": { + "tags": [ + "User" + ], + "operationId": "createUserExternalId", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates a user external ID record", + "description": "Creates a user external ID record\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "External ID fields to be created", + "required": true, + "schema": { + "$ref": "#/definitions/CreateUserExternalIdRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and the new external ID", + "schema": { + "$ref": "#/definitions/CreateUserExternalIdResponse" + } + }, + "204": { + "description": "No User with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations": { + "post": { + "tags": [ + "Organization" + ], + "operationId": "createOrg", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new organization", + "description": "Creates a new organization passing organization data Not all organization model fields are required, check its description for reference\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the organization to be created\n", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrganizationRequest" + } + } + ], + "responses": { + "201": { + "description": "Organization created successfully", + "schema": { + "$ref": "#/definitions/CreateOrganizationResponse" + } + }, + "400": { + "description": "Missing field at request body or wrong fields" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrgList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets list of organization", + "description": "Gets a list of organizations Query parameters can be provided to filter the returned organizations\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "status", + "in": "query", + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "description": "Organization status Check \"Try it out\" for possible options" + }, + { + "name": "name", + "in": "query", + "description": "Filter organizations list by name Example: name=Org1|Org2 This will get all organizations with Org1 or Org2 as the name\n", + "type": "string" + }, + { + "name": "sfAccountId", + "in": "query", + "description": "Filter organizations list by sfAccountId Example: sfAccountId=0016000000ImzzJAAR|0017000019ImzzJBAR This will get all organizations with those sfAccountIds\n", + "type": "string" + }, + { + "name": "externalId", + "in": "query", + "description": "Filter organizations list by externalId Example: externalId=003422 This will get all organizations with those externalId (FICE)\n", + "type": "string" + }, + { + "name": "actCode", + "in": "query", + "description": "Filter organizations list by actCode Example: actCode=0028 This will get all organizations with those Act College Codes\n", + "type": "string" + }, + { + "name": "orgType", + "in": "query", + "description": "Filter organizations list by type Example: orgType=Organization This will get all organizations with type = Organization\n", + "type": "string" + }, + { + "name": "type", + "in": "query", + "description": "Filter organizations list by type Example: type=Business This will get all organizations with orgType field pointing to an organization named 'Business'\n", + "type": "string" + }, + { + "name": "externalSource", + "in": "query", + "type": "string", + "description": "Filter by external ID source" + }, + { + "name": "externalValue", + "in": "query", + "type": "string", + "description": "Filter by external ID value" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of each object (without joins or aggregations), defaults to false" + }, + { + "name": "sort", + "in": "query", + "description": "Indicate the field used to order the resulting list Example: fieldOne,fieldTwo(desc) This will return the list sorted by fieldOne (ascending, the default) and then by fieldTwi (descending)\n", + "type": "string" + } + ], + "responses": { + "200": { + "description": "An array of Organizations", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GetOrganizationsResponse" + } + }, + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible searches to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "head": { + "tags": [ + "Organization" + ], + "operationId": "readOrgListHead", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets the header of the list of organization", + "description": "Gets the header of the list of organizations Query parameters can be provided to filter the returned organizations\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "status", + "in": "query", + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "description": "Organization status Check \"Try it out\" for possible options" + }, + { + "name": "name", + "in": "query", + "description": "Filter organizations list by name Example: name=Org1|Org2 This will get all organizations with Org1 or Org2 as the name and return their metadata in the header\n", + "type": "string" + }, + { + "name": "type", + "in": "query", + "description": "Filter organizations list by type Example: type=Business This will get all organizations with orgType field pointing to an organization named 'Business' and return their metadata in the header\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for data used to generate the metadata" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data used to generate the metadata" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of each object (without joins or aggregations), defaults to false" + } + ], + "responses": { + "200": { + "description": "The header of organizations along with their metadata", + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible searches to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/organizations/{uid}": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrg", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Finds organization by UID, name, externalId (FICE) or actCode", + "description": "Returns an organization by the provided UID, organization Name, externalId (FICE) or Act College Code.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the organization to be returned (name, externalId (FICE) or Act College Code can also be used)", + "required": true, + "type": "string" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of the Organization object, defaults to false" + } + ], + "responses": { + "200": { + "description": "An Organization object", + "schema": { + "$ref": "#/definitions/Organization" + } + }, + "204": { + "description": "No organization found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Organization" + ], + "operationId": "updateOrg", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Updates an organization", + "description": "Updates organization identified by UID Parameters to be updated are provided in the requested body and correspond to the fields described in organization model All fields are optional, but at least one should be provided in the body", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the organization to be modified", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateOrganizationRequest" + } + } + ], + "responses": { + "200": { + "description": "Organization updated", + "schema": { + "$ref": "#/definitions/CreateOrganizationResponse" + } + }, + "204": { + "description": "Organization not found" + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/organizations/{uid}/modules/{moduleUid}/authorize": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "isOrgModAuthorized", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Checks if organization has permission", + "description": "Checks if organization has permission for a certain module", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization uid Example: ef34d669-8061-4131-84d3-d7e508d784fd", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module uid Example: ef34d669-8061-4131-84d3-d7e508d784fd or Module key Example: datalab.classplanner", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Permissions check object", + "schema": { + "$ref": "#/definitions/AuthorizeResponse" + } + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/organizations/{uid}/applications/{appUid}/authorize": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "isOrgAppAuthorized", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Checks if organization has permission Application", + "description": "Checks if organization has permission for a certain application", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization uid Example: ef34d669-8061-4131-84d3-d7e508d784fd", + "required": true, + "type": "string" + }, + { + "name": "appUid", + "in": "path", + "description": "Application uid Example: ef34d669-8061-4131-84d3-d7e508d784fd or Application key Example: datalab", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Permissions check object", + "schema": { + "type": "object", + "properties": { + "authorize": { + "type": "boolean" + } + } + } + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/organizations/{uid}/attributes": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrgAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organization attributes", + "description": "Returns the attributes from an organization by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Organization" + ], + "operationId": "updateOrgAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an organization attribute in batch", + "description": "Creates or updates the organization attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be created or updated", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No Organization with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "Organization" + ], + "operationId": "deleteOrgAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an organization attributes in batch", + "description": "Delete multiple organization attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be deleted", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteAttributeRequest" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No Organization with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/attributes/keys": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrgAttributesKeys", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organization attributes keys", + "description": "Returns the keys from organization attributes", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes keys retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/attributes/keys/{key}": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrgAttributesByKey", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organization attributes by key", + "description": "Returns the attributes from an organization by its key", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Organization" + ], + "operationId": "updateOrgAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an organization attribute", + "description": "Creates or updates an attribute from the organization's attributes array by the organization's UID in the path and the attribute key and value in the body If the key is not present in the array, the attribute is created, if the key is present the attribute is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an attribute entry to be created or updated\n", + "required": true, + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "Organization" + ], + "operationId": "deleteOrgAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an organization attribute", + "description": "Deletes an attribute from the organization's attributes array by the organization's UID in the path and the attribute key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/DeletedAttribute" + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/programs": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "readOrgPrograms", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organization programs", + "description": "Returns the programs from an organization by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Programs retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Organization" + ], + "operationId": "updateOrgProgram", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an organization program", + "description": "Creates or updates an program from the organization's programs array by the organization's UID in the path and the program key in the body. If the key is not present in the array, the program is created, if the key is present the program is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an program entry to be created or updated\n", + "required": true, + "schema": { + "$ref": "#/definitions/ProgramRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and current program array", + "schema": { + "$ref": "#/definitions/ProgramResponse" + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "Organization" + ], + "operationId": "deleteOrgProgram", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an organization program", + "description": "Deletes an program from the organization's programs array by the organization's UID in the path and the program key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains the program key to be deleted", + "required": true, + "schema": { + "$ref": "#/definitions/ProgramRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and current program array", + "schema": { + "$ref": "#/definitions/ProgramResponse" + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/notes": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "getOrgNotes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organization notes", + "description": "Returns the notes from an organization by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Notes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NoteSmall" + } + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/modifications": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "getOrgModifications", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organization modifications", + "description": "Returns the modifications from an organization by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Modifications retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Modification" + } + } + }, + "204": { + "description": "No organization with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/authorizations": { + "post": { + "tags": [ + "Organization" + ], + "operationId": "readOrgWithAuthorizations", + "security": [ + { + "AWS": [] + }, + { + "JWT": [] + } + ], + "summary": "Read Organization with Authorizations", + "description": "Read Organization with Authorizations based on ApplicationKey\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID (name, externalId (FICE) or Act College Code can also be used)", + "required": true, + "type": "string" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of the Organization object, defaults to true" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "applicationKey": { + "type": "string", + "example": "datalab" + } + } + } + } + ], + "responses": { + "200": { + "description": "Organization successfully retrieved", + "schema": { + "$ref": "#/definitions/OrganizationAuthorizations" + } + }, + "204": { + "description": "Organization not found" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/organizations/{uid}/external-ids": { + "post": { + "tags": [ + "Organization" + ], + "operationId": "createOrganizationExternalId", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates an organization external ID record", + "description": "Creates an organization external ID record\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "External ID fields to be created", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrganizationExternalIdRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and new external ID", + "schema": { + "$ref": "#/definitions/CreateOrganizationExternalIdResponse" + } + }, + "204": { + "description": "No Organization with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations/{uid}/modules/{moduleKey}/users": { + "get": { + "tags": [ + "Organization" + ], + "operationId": "getOrganizationUsersByModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Returns users (non-LDAP only by default) have access for the given module key", + "description": "Returns users (non-LDAP only by default) have access for the given module key\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "moduleKey", + "in": "path", + "description": "Module key", + "required": true, + "type": "string" + }, + { + "name": "application", + "in": "header", + "description": "Application key", + "required": true, + "type": "string" + }, + { + "name": "includeLdap", + "in": "query", + "type": "boolean", + "description": "Set to true if you wish to include LDAP users with this permission check" + }, + { + "name": "returnFirst", + "in": "query", + "type": "boolean", + "description": "Set to true to return early with the first permitted user" + } + ], + "responses": { + "200": { + "description": "Permitted users retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/UserReallySmall" + } + } + } + } + } + }, + "/applications": { + "post": { + "tags": [ + "Application" + ], + "operationId": "createApp", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new application", + "description": "Creates a new application passing application data Not all application model fields are required, check its description for reference\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the application to be created\n", + "required": true, + "schema": { + "$ref": "#/definitions/CreateApplicationRequest" + } + } + ], + "responses": { + "201": { + "description": "Application created successfuly", + "schema": { + "$ref": "#/definitions/CreateApplicationResponse" + } + }, + "400": { + "description": "Missing field at request body or wrong fields" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "Application" + ], + "operationId": "readAppList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets list of applications", + "description": "Gets a list of applications Query parameters can be provided to filter the returned applications", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Filter applications list by name Example: name=App1|App2 This will get all applications with App1 or App2 as the name\n", + "type": "string" + }, + { + "name": "key", + "in": "query", + "description": "Filter applications list by key Example: key=Key1|Key2 This will get all applications with Key1 or Key2 as the key\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of each object (without joins or aggregations), defaults to false" + }, + { + "name": "sort", + "in": "query", + "description": "Indicate the field used to order the resulting list Example: fieldOne,fieldTwo(desc) This will return the list sorted by fieldOne (ascending, the default) and then by fieldTwi (descending)\n", + "type": "string" + } + ], + "responses": { + "200": { + "description": "An array of Applications", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GetApplicationSmall" + } + }, + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible searches to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "head": { + "tags": [ + "Application" + ], + "operationId": "readAppListHeader", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets the header of the list of applications", + "description": "Gets the header of the list of applications Query parameters can be provided to filter the returned applications that generate the metadata", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Filter applications list by name Example: name=App1|App2 This will get all applications with App1 or App2 as the name and return their metadata in the header\n", + "type": "string" + }, + { + "name": "key", + "in": "query", + "description": "Filter applications list by key Example: key=Key1|Key2 This will get all applications with Key1 or Key2 as the key and return their metadata in the header\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for data used to generate the metadata" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data used to generate the metadata" + } + ], + "responses": { + "200": { + "description": "The header of applications along with their metadata", + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible searches to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/applications/{uid}": { + "get": { + "tags": [ + "Application" + ], + "operationId": "readApp", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Finds application by UID", + "description": "Returns a single application by its UID (or Key)", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the application to be returned, application key can be also used", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "An Application object", + "schema": { + "$ref": "#/definitions/Application" + } + }, + "204": { + "description": "No Application found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Application" + ], + "operationId": "updateApp", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Updates an application", + "description": "Updates application identified by UID Parameters to be updated are provided in the requested body and correspond to the fields described in application model", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the application to be updated", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateApplicationRequest" + } + } + ], + "responses": { + "200": { + "description": "Application update successfully", + "schema": { + "$ref": "#/definitions/UpdateApplicationResponse" + } + }, + "204": { + "description": "Application not found" + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/applications/{uid}/authorize/{moduleUid}/": { + "get": { + "tags": [ + "Application" + ], + "operationId": "isAppAuthorized", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Checks if application has permission", + "description": "Checks if application has permission for a module", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Uid of the application whose permission will be verified", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Uid identifying the module which the permission belongs", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Permissions check object", + "schema": { + "type": "object", + "properties": { + "authorized": { + "type": "boolean" + } + } + } + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/applications/{uid}/attributes": { + "get": { + "tags": [ + "Application" + ], + "operationId": "getAppAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets application attributes", + "description": "Returns the attributes from an application by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Application UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + }, + "204": { + "description": "No application with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Application" + ], + "operationId": "updateAppAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an application attribute in batch", + "description": "Creates or updates the application attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Application UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be created or updated", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No Application with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "Application" + ], + "operationId": "deleteAppAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an application attributes in batch", + "description": "Delete multiple application attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Application UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be deleted", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteAttributeRequest" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No Application with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/applications/{uid}/attributes/keys": { + "get": { + "tags": [ + "Application" + ], + "operationId": "readAppAttributesKeys", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets application attributes keys", + "description": "Returns the keys from application attributes", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Applications UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes keys retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No application with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/applications/{uid}/attributes/keys/{key}": { + "get": { + "tags": [ + "Application" + ], + "operationId": "readAppAttributesByKey", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets application attributes by key", + "description": "Returns the attributes from an application by its key", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Application UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No application with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Application" + ], + "operationId": "updateAppAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an application attribute", + "description": "Creates or updates an attribute from the application's attributes array by the application's UID in the path and the attribute key and value in the body If the key is not present in the array, the attribute is created, if the key is present the attribute is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Application UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an attribute entry to be created or updated\n", + "required": true, + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No application with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "Application" + ], + "operationId": "deleteAppAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an application attribute", + "description": "Deletes an attribute from the application's attributes array by the application's UID in the path and the attribute key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Application UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/DeletedAttribute" + } + }, + "204": { + "description": "No application with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/applications/{uid}/notes": { + "get": { + "tags": [ + "Application" + ], + "operationId": "getAppNotes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets application notes", + "description": "Returns the notes from an application by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Application UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Notes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NoteSmall" + } + } + }, + "204": { + "description": "No application with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/applications/{uid}/modifications": { + "get": { + "tags": [ + "Application" + ], + "operationId": "getAppModifications", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets application modifications", + "description": "Returns the modifications from an application by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Application UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Modifications retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Modification" + } + } + }, + "204": { + "description": "No application with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/modules": { + "post": { + "tags": [ + "Module" + ], + "operationId": "createModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new module", + "description": "Creates a new module passing module data Not all module model fields are required, check its description for reference\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the module to be created\n", + "required": true, + "schema": { + "$ref": "#/definitions/CreateModuleRequest" + } + } + ], + "responses": { + "201": { + "description": "Module created successfuly", + "schema": { + "$ref": "#/definitions/CreateModuleResponse" + } + }, + "400": { + "description": "Missing field at request body or wrong fields" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "Module" + ], + "operationId": "readModuleList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets list of modules", + "description": "Gets a list of modules Query parameters can be provided to filter the returned modules", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Filter modules list by name Example: name=Module1|Module2 This will get all modules with Module1 or Module2 as the name\n", + "type": "string" + }, + { + "name": "key", + "in": "query", + "description": "Filter modules list by key Example: key=Key1|Key2 This will get all modules with Key1 or Key2 as the key\n", + "type": "string" + }, + { + "name": "applicationUid", + "in": "query", + "description": "Filter modules list by name Example: applicationUid=ef34d669-8061-4131-84d3-d7e508d784fd This will get all modules with applicationUid ef34d669-8061-4131-84d3-d7e508d784fd\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of each object (without joins or aggregations), defaults to false" + }, + { + "name": "sort", + "in": "query", + "description": "Indicate the field used to order the resulting list Example: fieldOne,fieldTwo(desc) This will return the list sorted by fieldOne (ascending, the default) and then by fieldTwi (descending)\n", + "type": "string" + } + ], + "responses": { + "200": { + "description": "An array of Modules", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleForList" + } + }, + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible searches to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "head": { + "tags": [ + "Module" + ], + "operationId": "readModuleListHead", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets the header of the list of modules", + "description": "Gets the header of the list of modules Query parameters can be provided to filter the returned modules", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Filter modules list by name Example: name=Module1|Module2 This will get all modules with Module1 or Module2 as the name and return their metadata in the header\n", + "type": "string" + }, + { + "name": "key", + "in": "query", + "description": "Filter modules list by key Example: key=Key1|Key2 This will get all modules with Key1 or Key2 as the key and return their metadata in the header\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for data used to generate the metadata" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data used to generate the metadata" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of each object (without joins or aggregations), defaults to false" + } + ], + "responses": { + "200": { + "description": "The header of modules along with their metadata", + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible searches to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/modules/{uid}": { + "get": { + "tags": [ + "Module" + ], + "operationId": "readModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Finds module by UID", + "description": "Returns a single module by its UID (or Key)", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the module to be returned (module key can be also used)", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "An Module object", + "schema": { + "$ref": "#/definitions/Module" + } + }, + "204": { + "description": "No Module found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Module" + ], + "operationId": "updateModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Updates an module", + "description": "Updates module identified by UID Parameters to be updated are provided in the requested body and correspond to the fields described in module model", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the module to be updated", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateModuleRequest" + } + } + ], + "responses": { + "200": { + "description": "Module update successfully", + "schema": { + "$ref": "#/definitions/UpdateModuleResponse" + } + }, + "204": { + "description": "Module not found" + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/modules/{uid}/attributes": { + "get": { + "tags": [ + "Module" + ], + "operationId": "getModuleAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets module attributes", + "description": "Returns the attributes from an module by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Module" + ], + "operationId": "updateModuleAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an module attribute in batch", + "description": "Creates or updates the module attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be created or updated", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No Module with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "Module" + ], + "operationId": "deleteModuleAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an module attributes in batch", + "description": "Delete multiple module attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be deleted", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteAttributeRequest" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No Module with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/modules/{uid}/attributes/keys": { + "get": { + "tags": [ + "Module" + ], + "operationId": "readModAttributesKeys", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets module attributes keys", + "description": "Returns the keys from module attributes", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes keys retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/modules/{uid}/attributes/keys/{key}": { + "get": { + "tags": [ + "Module" + ], + "operationId": "readModAttributesByKey", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets module attributes by key", + "description": "Returns the attributes from an module by its key", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Module" + ], + "operationId": "updateModuleAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an module attribute", + "description": "Creates or updates an attribute from the module's attributes array by the module's UID in the path and the attribute key and value in the body If the key is not present in the array, the attribute is created, if the key is present the attribute is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an attribute entry to be created or updated\n", + "required": true, + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "Module" + ], + "operationId": "deleteModuleAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an module attribute", + "description": "Deletes an attribute from the module's attributes array by the module's UID in the path and the attribute key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/DeletedAttribute" + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/modules/{uid}/programs": { + "get": { + "tags": [ + "Module" + ], + "operationId": "readModulePrograms", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets module programs", + "description": "Returns the programs from an module by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Programs retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Module" + ], + "operationId": "updateModuleProgram", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an module program", + "description": "Creates or updates an program from the module's programs array by the module's UID in the path and the program key in the body. If the key is not present in the array, the program is created, if the key is present the program is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an program entry to be created or updated\n", + "required": true, + "schema": { + "$ref": "#/definitions/ProgramRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and current program array", + "schema": { + "$ref": "#/definitions/ProgramResponse" + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "Module" + ], + "operationId": "deleteModuleProgram", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an module program", + "description": "Deletes an program from the module's programs array by the module's UID in the path and the program key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains the program key to be deleted", + "required": true, + "schema": { + "$ref": "#/definitions/ProgramRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and current program array", + "schema": { + "$ref": "#/definitions/ProgramResponse" + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/modules/{uid}/prerequisites": { + "get": { + "tags": [ + "Module" + ], + "operationId": "readModulePrerequisites", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets module prerequisites", + "description": "Returns the prerequisites from an module by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Prerequisites retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Module" + ], + "operationId": "updateModulePrerequisites", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an module prerequisite", + "description": "Creates or updates an prerequisite from the module's prerequisites array by the module's UID in the path and the prerequisite key in the body. If the key is not present in the array, the prerequisite is created, if the key is present the prerequisite is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an prerequisite entry to be created or updated\n", + "required": true, + "schema": { + "$ref": "#/definitions/ProgramRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and current prerequisite array", + "schema": { + "$ref": "#/definitions/PrerequisitesResponse" + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "Module" + ], + "operationId": "deleteModulePrerequisites", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an module prerequisite", + "description": "Deletes an prerequisite from the prerequisites array by the module's UID in the path and the prerequisite key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains the prerequisite key to be deleted", + "required": true, + "schema": { + "$ref": "#/definitions/ProgramRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and current prerequisite array", + "schema": { + "$ref": "#/definitions/PrerequisitesResponse" + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/modules/{uid}/required-attributes": { + "get": { + "tags": [ + "Module" + ], + "operationId": "readModuleRequiredAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets module required attributes", + "description": "Returns the required attributes from an module by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Required attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Module" + ], + "operationId": "updateModuleRequiredAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an module required attribute", + "description": "Creates or updates an required attribute from the module's required attributes array by the module's UID in the path and the required attribute key in the body. If the key is not present in the array, the required attribute is created, if the key is present the required attribute is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an required attribute entry to be created or updated\n", + "required": true, + "schema": { + "$ref": "#/definitions/ProgramRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and current required attributes array", + "schema": { + "$ref": "#/definitions/RequiredAttributeResponse" + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "Module" + ], + "operationId": "deleteModuleRequiredAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an module required attribute", + "description": "Deletes an required attribute from the required attributes array by the module's UID in the path and the required attribute key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains the required attribute key to be deleted", + "required": true, + "schema": { + "$ref": "#/definitions/ProgramRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and current required attribute array", + "schema": { + "$ref": "#/definitions/RequiredAttributeResponse" + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/modules/{uid}/notes": { + "get": { + "tags": [ + "Module" + ], + "operationId": "getModuleNotes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets module notes", + "description": "Returns the notes from an module by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Notes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NoteSmall" + } + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/modules/{uid}/modifications": { + "get": { + "tags": [ + "Module" + ], + "operationId": "getModuleModifications", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets module modifications", + "description": "Returns the modifications from an module by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Modifications retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Modification" + } + } + }, + "204": { + "description": "No module with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/notes": { + "post": { + "tags": [ + "Note" + ], + "operationId": "createNote", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new note", + "description": "Creates a new note passing note data All note model fields are required\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the note to be created\n", + "required": true, + "schema": { + "$ref": "#/definitions/CreateNoteRequest" + } + } + ], + "responses": { + "201": { + "description": "Note created successfuly", + "schema": { + "$ref": "#/definitions/CreateNoteResponse" + } + }, + "400": { + "description": "Missing field at request body or wrong fields" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/notes/{uid}": { + "get": { + "tags": [ + "Note" + ], + "operationId": "readNote", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Finds note by UID", + "description": "Returns a single note by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of note to return", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/Note" + } + }, + "204": { + "description": "No note found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "Note" + ], + "operationId": "updateNote", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Updates a note", + "description": "Updates note identified by UID Parameters to be updated are provided in the requested body and correspond to the fields described in note model\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of Note that needs to be updated", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateNoteRequest" + } + } + ], + "responses": { + "200": { + "description": "Note update successfully", + "schema": { + "$ref": "#/definitions/UpdateNoteResponse" + } + }, + "204": { + "description": "Note not found" + }, + "400": { + "description": "Wrong field format" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "Note" + ], + "operationId": "deleteNote", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes a note", + "description": "Deletes a note from the databse", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Note UID to be delete", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Note successfully deleted", + "schema": { + "$ref": "#/definitions/DeleteNoteResponse" + } + }, + "204": { + "description": "Note not found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/roles": { + "post": { + "tags": [ + "Role" + ], + "operationId": "createRelation", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new role relationship", + "description": "Creates a new role between two users\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the role to be created\n", + "required": true, + "schema": { + "$ref": "#/definitions/RoleBody" + } + } + ], + "responses": { + "201": { + "description": "Role created successfuly", + "schema": { + "$ref": "#/definitions/CreateRoleResponse" + } + }, + "400": { + "description": "Missing field at request body or wrong fields" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "delete": { + "tags": [ + "Role" + ], + "operationId": "deleteRelation", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes a role", + "description": "Deletes a role between two users\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the role to be deleted\n", + "required": true, + "schema": { + "$ref": "#/definitions/RoleBody" + } + } + ], + "responses": { + "200": { + "description": "Role deleted", + "schema": { + "$ref": "#/definitions/DeleteRoleResponse" + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/organizations-applications": { + "post": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "createOrgApp", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new Organization Application Relationship", + "description": "Creates a new relationship between an organization and an application\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the relationship to be created\n", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrganizationApplicationRequest" + } + } + ], + "responses": { + "201": { + "description": "Relationship created successfuly", + "schema": { + "$ref": "#/definitions/CreateOrganizationApplicationResponse" + } + }, + "400": { + "description": "Missing field at request body or wrong fields" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "readOrgAppList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets list of organization-application relationships", + "description": "Gets a list of organization-application relationshps Query parameters can be provided to filter the returned organization-application relationshps\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "organizationUid", + "in": "query", + "description": "Filter organization-application relationships list by organizationUid Example: organizationUid=44bc5658-e923-4c0b-9400-c638eabef494 This will get all organization-application relationships with organizationUid equals to 44bc5658-e923-4c0b-9400-c638eabef494\n", + "type": "string" + }, + { + "name": "applicationUid", + "in": "query", + "description": "Filter organization-application relationships list by applicationUid Example: applicationUid=44bc5658-e923-4c0b-9400-c638eabef494 This will get all organization-application relationships with applicationUid equals to 44bc5658-e923-4c0b-9400-c638eabef494\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "An array of Organization-Application relationships", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GetOrganizationApplicationRelationshipsResponse" + } + }, + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible relationships to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/organizations-applications/{uid}": { + "get": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "readOrgApp", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Finds an organization application relationship by UID", + "description": "Returns a single organization application relationship by its UID\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the organization application relationship to return", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/OrganizationApplicationRelationship" + } + }, + "204": { + "description": "No organization application relationship found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "deleteOrgApp", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an organization application relationship", + "description": "Deletes an organization application relationship from the database\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization application relationship UID to be delete", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Organization application relationship deleted", + "schema": { + "$ref": "#/definitions/DeleteOrganizationApplicationResponse" + } + }, + "204": { + "description": "OrganizationApplication not found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations-applications/{uid}/attributes": { + "get": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "getOrgAppAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets an organization application relationship attributes", + "description": "Returns the attributes from an organization application relationship by its UID\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization application relationship UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + }, + "204": { + "description": "No organization application relationship with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "updateOrgAppAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an OrganizationApplication attribute in batch", + "description": "Creates or updates the OrganizationApplication attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplication UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be created or updated", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No OrganizationApplication with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "deleteOrgAppAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an OrganizationApplication attributes in batch", + "description": "Delete multiple OrganizationApplication attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplication UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be deleted", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteAttributeRequest" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No OrganizationApplication with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations-applications/{uid}/attributes/keys": { + "get": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "readOrgAppAttributesKeys", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organizations-application attributes keys", + "description": "Returns the keys from organizations-application attributes", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplication UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes keys retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No organizations-application with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations-applications/{uid}/attributes/keys/{key}": { + "get": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "readOrgAppAttributesByKey", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets organizations-application attributes by key", + "description": "Returns the attributes from an organizations-application by its key", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplication UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No organizations-application with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "updateOrgAppAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an organization application relationship attribute", + "description": "Creates or updates an attribute from the organization application relationship's attributes array by the relationship's UID in the path and the attribute key and value in the body If the key is not present in the array, the attribute is created, if the key is present the attribute is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization application relationship UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreateOrganizationApplicationAttributeResponse" + } + }, + "204": { + "description": "No organization application relationship with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "OrganizationApplication" + ], + "operationId": "deleteOrgAppAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an organization application relationship attribute", + "description": "Deletes an attribute from the organization application relationship's attributes array by the relationship's UID in the path and the attribute key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Organization application relationship UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/DeleteOrganizationApplicationAttributeResponse" + } + }, + "204": { + "description": "No organization application relationship with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations-applications/{uid}/modules": { + "get": { + "tags": [ + "OrganizationApplicationModule" + ], + "operationId": "readOrgAppModuleList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets list of organization-application-module relationships", + "description": "Gets a list of organization-application-module relationshps Query parameters can be provided to filter the returned organization-application-module relationshps\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "query", + "description": "Filter organization-application-module relationships list by moduleUid Example: moduleUid=44bc5658-e923-4c0b-9400-c638eabef494 This will get all organization-application-module relationships with moduleUid equals to 44bc5658-e923-4c0b-9400-c638eabef494\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "An array of organization-Application-Module relationships", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GetOrganizationApplicationModuleRelationshipsResponse" + } + }, + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible relationships to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/organizations-applications/{uid}/modules/{moduleUid}": { + "post": { + "tags": [ + "OrganizationApplicationModule" + ], + "operationId": "createOrgAppModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new OrganizationApplicationModuleRelationship", + "description": "Creates a new relationship between a module and an organizationApplication\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the relationship to be created\n", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrganizationApplicationModuleRequest" + } + } + ], + "responses": { + "201": { + "description": "Relationship created successfuly", + "schema": { + "$ref": "#/definitions/CreateOrganizationApplicationModuleResponse" + } + }, + "400": { + "description": "Missing field at request body or wrong fields" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "OrganizationApplicationModule" + ], + "operationId": "readOrgAppModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets an OrganizationApplicationModuleRelationship", + "description": "Returns an OrganizationApplicationModuleRelationship by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplicationModuleRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OrganizationApplicationRelationship retrieved", + "schema": { + "$ref": "#/definitions/OrganizationApplicationModuleRelationship" + } + }, + "204": { + "description": "No OrganizationApplicationModuleRelationship with provided UID\n" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "OrganizationApplicationModule" + ], + "operationId": "updateOrgAppModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Updates an OrganizationApplicationModuleRelationship", + "description": "Updates OrganizationApplicationModuleRelationship identified by UID Parameters to be updated are provided in the requested body and correspond to the fields described in user model Valid user fields not shown in the model will be ignored in update (createAt, lastUpdated, ) All parameters are optional, but at least one parameter must be provided in the request body for the request to succeed The UID can be provided but must match the one provided in path\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains the relationship fields to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrganizationApplicationModuleRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and current OrganizationApplicationModule\n", + "schema": { + "$ref": "#/definitions/CreateOrganizationApplicationModuleResponse" + } + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "OrganizationApplicationModule" + ], + "operationId": "deleteOrgAppModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an OrganizationApplicationModuleRelationship", + "description": "Deletes an OrganizationApplicationModuleRelationship\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result", + "schema": { + "$ref": "#/definitions/DeleteOrganizationApplicationModuleResponse" + } + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations-applications/{uid}/modules/{moduleUid}/attributes": { + "get": { + "tags": [ + "OrganizationApplicationModule" + ], + "operationId": "getOrgAppModuleAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets an OrganizationApplicationModuleRelationship attributes", + "description": "Returns the attributes from an OrganizationApplicationModuleRelationship by its UID\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + }, + "204": { + "description": "No OrganizationApplicationModuleRelationship with provided UID\n" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "OrganizationApplicationModule" + ], + "operationId": "updateOrgAppModuleAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an UserApplicationModule attribute in batch", + "description": "Creates or updates the UserApplicationModule attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be created or updated", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No UserApplicationModule with provided UIDs" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "OrganizationApplicationModule" + ], + "operationId": "deleteOrgAppModuleAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an UserApplicationModule attributes in batch", + "description": "Delete multiple UserApplicationModule attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be deleted", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteAttributeRequest" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No UserApplicationModule with provided UIDs" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/organizations-applications/{uid}/modules/{moduleUid}/attributes/keys/{key}": { + "put": { + "tags": [ + "OrganizationApplicationModule" + ], + "operationId": "updateOrgAppModuleAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an OrganizationApplicationModuleRelationship attribute\n", + "description": "Creates or updates an attribute from the OrganizationApplicationModuleRelationship's attributes array by the relationship's UID in the path and the attribute key and value in the body If the key is not present in the array, the attribute is created, if the key is present the attribute is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreateOrganizationApplicationModuleAttributeResponse" + } + }, + "204": { + "description": "No OrganizationApplicationModuleRelationship with provided UID\n" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "OrganizationApplicationModule" + ], + "operationId": "deleteOrgAppModuleAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an OrganizationApplicationModuleRelationship attribute", + "description": "Deletes an attribute from the OrganizationApplicationModuleRelationship's attributes array by the relationship's UID in the path and the attribute key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "OrganizationApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/DeleteOrganizationApplicationModuleAttributeResponse" + } + }, + "204": { + "description": "No OrganizationApplicationModuleRelationship with provided UID\n" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users-applications": { + "post": { + "tags": [ + "UserApplication" + ], + "operationId": "createUserApp", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new UserApplication Relationship", + "description": "Creates a new relationship between an user and an organization\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the relationship to be created\n", + "required": true, + "schema": { + "$ref": "#/definitions/CreateUserApplicationRequest" + } + } + ], + "responses": { + "201": { + "description": "Relationship created successfuly", + "schema": { + "$ref": "#/definitions/CreateUserApplicationResponse" + } + }, + "400": { + "description": "Missing field at request body or wrong fields" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "UserApplication" + ], + "operationId": "readUserAppList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets list of user-application relationships", + "description": "Gets a list of user-application relationshps Query parameters can be provided to filter the returned user-application relationshps\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "query", + "description": "Filter user-application relationships list by userUid Example: userUid=44bc5658-e923-4c0b-9400-c638eabef494 This will get all user-application relationships with userUid equals to 44bc5658-e923-4c0b-9400-c638eabef494\n", + "type": "string" + }, + { + "name": "applicationUid", + "in": "query", + "description": "Filter user-application relationships list by applicationUid Example: applicationUid=44bc5658-e923-4c0b-9400-c638eabef494 This will get all user-application relationships with applicationUid equals to 44bc5658-e923-4c0b-9400-c638eabef494\n", + "type": "string" + }, + { + "name": "status", + "in": "query", + "description": "Filter User by status. Example status=Active|Pending", + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ] + }, + { + "name": "type", + "in": "query", + "description": "Filter User by status. Example type=User|LdapUser", + "type": "string", + "enum": [ + "User", + "LdapUser" + ] + }, + { + "name": "firstName", + "in": "query", + "type": "string", + "description": "Filter by user firstName" + }, + { + "name": "lastName", + "in": "query", + "type": "string", + "description": "Filter by user lastName" + }, + { + "name": "userName", + "in": "query", + "type": "string", + "description": "Filter by userName" + }, + { + "name": "email", + "in": "query", + "type": "string", + "description": "Filter by email" + }, + { + "name": "createdAt", + "in": "query", + "type": "string", + "description": "Filter by createdAt. Example 2020-03-26T17:16:46.872Z" + }, + { + "name": "verifiedDate", + "in": "query", + "type": "string", + "description": "Filter by verifiedDate. Example 2020-03-26T17:19:04.723Z" + }, + { + "name": "externalSource", + "in": "query", + "type": "string", + "description": "Filter by external ID source" + }, + { + "name": "externalId", + "in": "query", + "type": "string", + "description": "Filter by external ID value" + }, + { + "name": "searchStr", + "in": "query", + "type": "string", + "description": "Filter users list by searchStr Example: searchStr=Abbott This will get all users with Abbott at some important field (firstName, lastName, userName, etc …)\n" + }, + { + "name": "ignore", + "in": "query", + "type": "string", + "description": "List of user fields to ignore on search when passing searchStr parameter Example: ignore=firstName|lastName This will limit the search to userName or email" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "An array of User-Application relationships", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GetUserApplicationRelationshipsResponse" + } + }, + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible relationships to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users-applications/{uid}": { + "get": { + "tags": [ + "UserApplication" + ], + "operationId": "readUserApp", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Finds an UserApplicationRelationship by UID", + "description": "Returns a single UserApplicationRelationship by its UID\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UID of the UserApplicationRelationship to return", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/UserApplicationRelationship" + } + }, + "204": { + "description": "No UserApplicationRelationship found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "UserApplication" + ], + "operationId": "deleteUserApp", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an UserApplicationRelationship", + "description": "Deletes an UserApplicationRelationship from the database\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID to be delete", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "UserApplicationRelationship deleted", + "schema": { + "$ref": "#/definitions/DeleteUserApplicationResponse" + } + }, + "204": { + "description": "UserApplicationRelationship not found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users-applications/{uid}/attributes": { + "get": { + "tags": [ + "UserApplication" + ], + "operationId": "getUserAppAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets an UserApplicationRelationship attributes", + "description": "Returns the attributes from an UserApplicationRelationship by its UID\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + }, + "204": { + "description": "No UserApplicationRelationship with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "UserApplication" + ], + "operationId": "updateUserAppAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an UserApplication attribute in batch", + "description": "Creates or updates the UserApplication attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplication UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be created or updated", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No UserApplication with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "UserApplication" + ], + "operationId": "deleteUserAppAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an UserApplication attributes in batch", + "description": "Delete multiple UserApplication attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplication UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be deleted", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteAttributeRequest" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No UserApplication with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users-applications/{uid}/attributes/keys": { + "get": { + "tags": [ + "UserApplication" + ], + "operationId": "readUserAppAttributesKeys", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets users-application attributes keys", + "description": "Returns the keys from users-application attributes", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplication UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes keys retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No users-application with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users-applications/{uid}/attributes/keys/{key}": { + "get": { + "tags": [ + "UserApplication" + ], + "operationId": "readUserAppAttributesByKey", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets users-application attributes by key", + "description": "Returns the attributes from an users-application by its key", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplication UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "object" + } + }, + "204": { + "description": "No users-application with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "UserApplication" + ], + "operationId": "updateUserAppAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an UserApplicationRelationship attribute", + "description": "Creates or updates an attribute from the UserApplicationRelationship's attributes array by the relationship's UID in the path and the attribute key and value in the body If the key is not present in the array, the attribute is created, if the key is present the attribute is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreateUserApplicationAttributeResponse" + } + }, + "204": { + "description": "No UserApplicationRelationship with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "UserApplication" + ], + "operationId": "deleteUserAppAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an UserApplicationRelationship attribute", + "description": "Deletes an attribute from the UserApplicationRelationship's attributes array by the relationship's UID in the path and the attribute key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/DeleteUserApplicationAttributeResponse" + } + }, + "204": { + "description": "No UserApplicationRelationship with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users-applications/{uid}/modules": { + "get": { + "tags": [ + "UserApplicationModule" + ], + "operationId": "readUserAppModuleList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets list of user-application-module relationships", + "description": "Gets a list of user-application-module relationshps Query parameters can be provided to filter the returned user-application-module relationshps\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "query", + "description": "Filter user-application-module relationships list by moduleUid Example: moduleUid=44bc5658-e923-4c0b-9400-c638eabef494 This will get all user-application-module relationships with moduleUid equals to 44bc5658-e923-4c0b-9400-c638eabef494\n", + "type": "string" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + } + ], + "responses": { + "200": { + "description": "An array of User-Application-Module relationships", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GetUserApplicationModuleRelationshipsResponse" + } + }, + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible relationships to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users-applications/{uid}/modules/{moduleUid}": { + "post": { + "tags": [ + "UserApplicationModule" + ], + "operationId": "createUserAppModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new UserApplicationModuleRelationship", + "description": "Creates a new relationship between a module and an UserApplication\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the relationship to be created\n", + "required": true, + "schema": { + "$ref": "#/definitions/CreateUserApplicationModuleRequest" + } + } + ], + "responses": { + "201": { + "description": "Relationship created successfuly", + "schema": { + "$ref": "#/definitions/CreateUserApplicationModuleResponse" + } + }, + "400": { + "description": "Missing field at request body or wrong fields" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "UserApplicationModule" + ], + "operationId": "readUserAppModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets an UserApplicationModuleRelationship", + "description": "Returns an UserApplicationModuleRelationship by its UID", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "UserApplicationModuleRelationship retrieved", + "schema": { + "$ref": "#/definitions/UserApplicationModuleRelationship" + } + }, + "204": { + "description": "No UserApplicationModuleRelationship with provided UID\n" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "UserApplicationModule" + ], + "operationId": "updateUserAppModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Updates an UserApplicationModuleRelationship", + "description": "Updates UserApplicationModuleRelationship identified by UID Parameters to be updated are provided in the requested body and correspond to the fields described in user model Valid user fields not shown in the model will be ignored in update (createAt, lastUpdated, ) All parameters are optional, but at least one parameter must be provided in the request body for the request to succeed The UID can be provided but must match the one provided in path\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains the relationship fields to be updated", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateUserApplicationModuleRequest" + } + } + ], + "responses": { + "200": { + "description": "The operation result and current ApplicationApplicationModule\n", + "schema": { + "$ref": "#/definitions/UpdateUserApplicationModuleResponse" + } + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "UserApplicationModule" + ], + "operationId": "deleteUserAppModule", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an UserApplicationModuleRelationship", + "description": "Deletes an UserApplicationModuleRelationship\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result", + "schema": { + "$ref": "#/definitions/DeleteUserApplicationModuleResponse" + } + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users-applications/{uid}/modules/{moduleUid}/attributes": { + "get": { + "tags": [ + "UserApplicationModule" + ], + "operationId": "getUserAppModuleAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets an UserApplicationModuleRelationship attributes", + "description": "Returns the attributes from an UserApplicationModuleRelationship by its UID\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + }, + "204": { + "description": "No UserApplicationModuleRelationship with provided UID\n" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "UserApplicationModule" + ], + "operationId": "updateUserAppModuleAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an UserApplicationModule attribute in batch", + "description": "Creates or updates the UserApplicationModule attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be created or updated", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No UserApplicationModule with provided UIDs" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "UserApplicationModule" + ], + "operationId": "deleteUserAppModuleAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an UserApplicationModule attributes in batch", + "description": "Delete multiple UserApplicationModule attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be deleted", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteAttributeRequest" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No UserApplicationModule with provided UIDs" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users-applications/{uid}/modules/{moduleUid}/attributes/keys/{key}": { + "put": { + "tags": [ + "UserApplicationModule" + ], + "operationId": "updateUserAppModuleAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an UserApplicationModuleRelationship attribute\n", + "description": "Creates or updates an attribute from the UserApplicationModuleRelationship's attributes array by the relationship's UID in the path and the attribute key and value in the body If the key is not present in the array, the attribute is created, if the key is present the attribute is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreateUserApplicationModuleAttributeResponse" + } + }, + "204": { + "description": "No UserApplicationModuleRelationship with provided UID\n" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "UserApplicationModule" + ], + "operationId": "deleteUserAppModuleAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an UserApplicationModuleRelationship attribute", + "description": "Deletes an attribute from the UserApplicationModuleRelationship's attributes array by the relationship's UID in the path and the attribute key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "UserApplicationRelationship UID", + "required": true, + "type": "string" + }, + { + "name": "moduleUid", + "in": "path", + "description": "Module UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/DeleteUserApplicationModuleAttributeResponse" + } + }, + "204": { + "description": "No UserApplicationModuleRelationship with provided UID\n" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users-organizations": { + "post": { + "tags": [ + "UserOrganization" + ], + "operationId": "createUserOrg", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates new UserOrganization Relationship", + "description": "Creates a new relationship between an user and an organization\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Body is itself a JSON describing the relationship to be created\n", + "required": true, + "schema": { + "$ref": "#/definitions/CreateUserOrganizationRequest" + } + } + ], + "responses": { + "201": { + "description": "Relationship created successfuly", + "schema": { + "$ref": "#/definitions/CreateUserOrganizationResponse" + } + }, + "400": { + "description": "Missing field at request body or wrong fields" + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + }, + "get": { + "tags": [ + "UserOrganization" + ], + "operationId": "readUserOrgList", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets list of user-organization relationships", + "description": "Gets a list of user-organization relationshps Query parameters can be provided to filter the returned user-organization relationshps\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "query", + "description": "Filter user-organization relationships list by userUid Example: userUid=44bc5658-e923-4c0b-9400-c638eabef494 This will get all user-organizationUid relationships with userUid equals to 44bc5658-e923-4c0b-9400-c638eabef494\n", + "type": "string" + }, + { + "name": "organizationUid", + "in": "query", + "description": "Filter user-organization relationships list by organizationUid Example: organizationUid=44bc5658-e923-4c0b-9400-c638eabef494 This will get all user-organization relationships with organizationUid equals to 44bc5658-e923-4c0b-9400-c638eabef494\n", + "type": "string" + }, + { + "name": "status", + "in": "query", + "description": "Filter User by status. Example status=Active|Pending", + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ] + }, + { + "name": "type", + "in": "query", + "description": "Filter User by status. Example type=User|LdapUser", + "type": "string", + "enum": [ + "User", + "LdapUser" + ] + }, + { + "name": "firstName", + "in": "query", + "type": "string", + "description": "Filter by user firstName" + }, + { + "name": "lastName", + "in": "query", + "type": "string", + "description": "Filter by user lastName" + }, + { + "name": "userName", + "in": "query", + "type": "string", + "description": "Filter by userName" + }, + { + "name": "email", + "in": "query", + "type": "string", + "description": "Filter by email" + }, + { + "name": "createdAt", + "in": "query", + "type": "string", + "description": "Filter by createdAt. Example 2020-03-26T17:16:46.872Z" + }, + { + "name": "verifiedDate", + "in": "query", + "type": "string", + "description": "Filter by verifiedDate. Example 2020-03-26T17:19:04.723Z" + }, + { + "name": "searchStr", + "in": "query", + "type": "string", + "description": "Filter users list by searchStr Example: searchStr=Abbott This will get all users with Abbott at some important field (firstName, lastName, userName, etc …)\n" + }, + { + "name": "orgType", + "in": "query", + "type": "string", + "description": "Filter by orgType. Example: High School\n" + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "description": "Size limit for returned array. If no params are passed it will default to 25\n" + }, + { + "name": "offset", + "in": "query", + "type": "integer", + "description": "Offset for the data to be returned" + }, + { + "name": "relationshipType", + "in": "query", + "type": "string", + "description": "Filter by userOrganization type. Example Secondary" + }, + { + "name": "externalSource", + "in": "query", + "type": "string", + "description": "Filter by external ID source" + }, + { + "name": "externalId", + "in": "query", + "type": "string", + "description": "Filter by external ID value" + } + ], + "responses": { + "200": { + "description": "An array of User-Organization relationships", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GetUserOrganizationRelationshipsResponse" + } + }, + "headers": { + "total-count": { + "type": "integer", + "description": "Total of possible relationships to be returned (excluding limit and offset)" + }, + "prev-offset": { + "type": "integer", + "description": "Offset value to go back one page" + }, + "next-offset": { + "type": "integer", + "description": "Offset value to go foward one page" + }, + "total-pages": { + "type": "integer", + "description": "Total of available pages" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/users-organizations/{userUid}/{orgUid}": { + "get": { + "tags": [ + "UserOrganization" + ], + "operationId": "readUserOrg", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Finds an UserOrganizationRelationship by UID", + "description": "Returns a single UserOrganizationRelationship by its UID\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "orgUid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/UserOrganizationRelationship" + } + }, + "204": { + "description": "No UserOrganizationRelationship found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "UserOrganization" + ], + "operationId": "updateUserOrg", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Updates an UserOrganizationRelationship", + "description": "Updates a single UserOrganizationRelationship\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "orgUid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Type to be updated", + "required": true, + "schema": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Primary", + "Secondary" + ] + } + } + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/UpdateUserOrganizationRelationshipResponse" + } + }, + "204": { + "description": "No UserOrganizationRelationship found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "UserOrganization" + ], + "operationId": "deleteUserOrg", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an UserOrganizationRelationship", + "description": "Deletes an UserOrganizationRelationship from the database\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "orgUid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "UserOrganizationRelationship deleted", + "schema": { + "$ref": "#/definitions/DeleteUserOrganizationResponse" + } + }, + "204": { + "description": "UserOrganizationRelationship not found" + }, + "400": { + "description": "Invalid UID supplied" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users-organizations/{userUid}/{orgUid}/attributes": { + "get": { + "tags": [ + "UserOrganization" + ], + "operationId": "getUserOrgAttributes", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Gets an UserOrganizationRelationship attributes", + "description": "Returns the attributes from an UserOrganizationRelationship by its UID\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "orgUid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Attributes retrieved", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + }, + "204": { + "description": "No UserOrganizationRelationship with provided UID" + }, + "400": { + "description": "Invalid UID" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "tags": [ + "UserOrganization" + ], + "operationId": "updateUserOrgAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an UserOrganization attribute in batch", + "description": "Creates or updates the UserOrganization attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "orgUid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be created or updated", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No UserOrganization with provided UIDs" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "UserOrganization" + ], + "operationId": "deleteUserOrgAttributeBatch", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an UserOrganization attributes in batch", + "description": "Delete multiple UserOrganization attributes with a batch operation\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "orgUid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Body contains an array of attributes to be deleted", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeleteAttributeRequest" + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreatedAttribute" + } + }, + "204": { + "description": "No UserOrganization with provided UIDs" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/users-organizations/{userUid}/{orgUid}/attributes/keys/{key}": { + "put": { + "tags": [ + "UserOrganization" + ], + "operationId": "updateUserOrgAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Creates or updates an UserOrganizationRelationship attribute", + "description": "Creates or updates an attribute from the UserOrganizationRelationship's attributes array by the relationship's UID in the path and the attribute key and value in the body If the key is not present in the array, the attribute is created, if the key is present the attribute is updated\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "orgUid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Fields and values to be updated", + "required": true, + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/CreateUserOrganizationAttributeResponse" + } + }, + "204": { + "description": "No UserOrganizationRelationship with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "UserOrganization" + ], + "operationId": "deleteUserOrgAttribute", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an UserOrganizationRelationship attribute", + "description": "Deletes an attribute from the UserOrganizationRelationship's attributes array by the relationship's UID in the path and the attribute key in the body\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userUid", + "in": "path", + "description": "User UID", + "required": true, + "type": "string" + }, + { + "name": "orgUid", + "in": "path", + "description": "Organization UID", + "required": true, + "type": "string" + }, + { + "name": "key", + "in": "path", + "description": "Attribute key UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The operation result and current attribute array", + "schema": { + "$ref": "#/definitions/DeleteUserOrganizationAttributeResponse" + } + }, + "204": { + "description": "No UserOrganizationRelationship with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/encrypt": { + "post": { + "tags": [ + "Encrypt" + ], + "operationId": "encrypt", + "security": [ + { + "AWS": [] + } + ], + "summary": "Encode or decode a given message", + "description": "Encode or decode a given message\n", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "message to apply encode/decode function, and the method which should be applied.", + "required": true, + "schema": { + "$ref": "#/definitions/EncryptRequest" + } + } + ], + "responses": { + "200": { + "description": "message successfully encoded or decoded", + "schema": { + "$ref": "#/definitions/EncryptResponse" + } + } + } + } + }, + "/authorize": { + "get": { + "tags": [ + "Authorization" + ], + "operationId": "authorize", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Calculates a full list of permissions on a user-organization-application set", + "description": "Calculates a full list of permissions on a user-organization-application set\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "organization", + "in": "header", + "description": "Organization UID", + "required": false, + "type": "string" + }, + { + "name": "application", + "in": "header", + "description": "Application key", + "required": true, + "type": "string" + }, + { + "name": "simple", + "in": "query", + "type": "boolean", + "description": "If marked as true UMS will return a simple version of each object (without joins or aggregations), defaults to false" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/FullAuthorizationResponse" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/external-ids/{uid}": { + "put": { + "tags": [ + "ExternalId" + ], + "operationId": "updateExternalId", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Updates an external ID record by UID", + "description": "Updates an external ID record by UID\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "External ID UID", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "External ID update body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateExternalIdRequest" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/UpdateExternalIdResponse" + } + }, + "204": { + "description": "No External ID with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "ExternalId" + ], + "operationId": "deleteExternalId", + "security": [ + { + "JWT": [] + }, + { + "AWS": [] + } + ], + "summary": "Deletes an external ID record by UID", + "description": "Deletes an external ID record by UID\n", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "External ID UID", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/DeleteExternalIdResponse" + } + }, + "204": { + "description": "No External ID with provided UID" + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + } + } + } + } + }, + "definitions": { + "ForgotPasswordRequest": { + "required": [ + "credential" + ], + "type": "object", + "properties": { + "credential": { + "type": "string", + "example": "admin@nrccua.org" + }, + "emailConfig": { + "$ref": "#/definitions/EmailConfig" + } + } + }, + "ResetPasswordRequest": { + "type": "object", + "required": [ + "newPassword" + ], + "properties": { + "uid": { + "type": "string", + "example": "eabac226-5706-4e7c-812c-00b19e2ddf4b" + }, + "email": { + "type": "string", + "example": "admin@nrccua.org" + }, + "newPassword": { + "type": "string", + "example": "admin" + }, + "verificationCode": { + "type": "string", + "example": "$2a$10$asynLtrxxuZXFgKSYf4Bae.4D8Mm6aG/m/nqORbiByEVpqndy3coi" + } + } + }, + "AuthenticationRequest": { + "type": "object", + "required": [ + "userName", + "password" + ], + "properties": { + "userName": { + "type": "string", + "example": "admin@nrccua.org" + }, + "password": { + "type": "string", + "example": "admin" + }, + "expiresIn": { + "type": "string", + "example": "10m" + }, + "application": { + "type": "string", + "example": "datalab" + } + } + }, + "Authenticationv2Request": { + "type": "object", + "required": [ + "userName", + "password", + "application" + ], + "properties": { + "userName": { + "type": "string", + "example": "admin@nrccua.org" + }, + "password": { + "type": "string", + "example": "admin" + }, + "application": { + "type": "string", + "example": "datalab" + }, + "expiresIn": { + "type": "string", + "example": "10m" + } + } + }, + "CreateApplicationRequest": { + "type": "object", + "required": [ + "key", + "name", + "url", + "adminUrl" + ], + "properties": { + "key": { + "type": "string", + "example": "nrccuakey" + }, + "name": { + "type": "string", + "example": "nrccua" + }, + "url": { + "type": "string", + "example": "https://nrccua.org" + }, + "adminUrl": { + "type": "string", + "example": "https://nrccua.org" + } + } + }, + "UpdateApplicationRequest": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string", + "example": "newnrccua" + }, + "url": { + "type": "string", + "example": "https://nrccua.org" + }, + "adminUrl": { + "type": "string", + "example": "https://nrccua.org" + } + } + }, + "CreateUserRequest": { + "type": "object", + "required": [ + "firstName", + "lastName", + "email" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "LdapUser", + "Role", + "User" + ], + "default": "User" + }, + "firstName": { + "type": "string", + "example": "UserName" + }, + "lastName": { + "type": "string", + "example": "UserLastName" + }, + "password": { + "type": "string", + "example": "UserPassword" + }, + "userName": { + "type": "string", + "example": "UserUserName" + }, + "email": { + "type": "string", + "example": "UserEmail@nrccua.org" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ], + "default": "Pending" + }, + "emailConfig": { + "$ref": "#/definitions/EmailConfig" + } + } + }, + "UpdateUserRequest": { + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string", + "example": "NewUserLastname" + }, + "userName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending", + "Disabled" + ] + } + } + }, + "ActivateUserRequest": { + "type": "object", + "required": [ + "verificationCode", + "userName", + "password" + ], + "properties": { + "verificationCode": { + "type": "string", + "example": "$2a$10$asynLtrxxuZXFgKSYf4Bae.4D8Mm6aG/m/nqORbiByEVpqndy3coi" + }, + "userName": { + "type": "string", + "example": "admin" + }, + "password": { + "type": "string", + "example": "p455w0rd" + } + } + }, + "CreateOrganizationRequest": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "example": "OrganizationName" + }, + "orgParent": { + "type": "string" + }, + "orgType": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "OrgType", + "Organization" + ], + "default": "Organization" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "default": "Active" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + } + } + }, + "UpdateOrganizationRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "NewOrganizationName" + }, + "orgParent": { + "type": "string", + "example": "c6be3f9b-b0b2-4740-b3e0-d7c317db57fe" + }, + "orgType": { + "type": "string", + "example": "05692c12-2a29-4a8b-8fc2-95cb18d09fee" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + } + } + }, + "DeleteAttributeRequest": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "tempore" + } + } + }, + "ProgramRequest": { + "type": "object", + "example": [ + { + "key": "tempore" + } + ] + }, + "DeleteProgramRequest": { + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "tempore" + } + } + }, + "CreateModuleRequest": { + "type": "object", + "properties": { + "applicationUid": { + "type": "string", + "example": "f7f9155c-9322-431c-b890-8f7388a9d18e" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "example": "Random module description" + }, + "defaultPermission": { + "type": "boolean", + "default": true + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "programs": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "prerequisites": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "requiredAttributes": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + } + } + }, + "UpdateModuleRequest": { + "type": "object", + "properties": { + "applicationUid": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "defaultPermission": { + "type": "boolean" + } + } + }, + "CreateNoteRequest": { + "type": "object", + "required": [ + "entityUid", + "content" + ], + "properties": { + "entityUid": { + "type": "string" + }, + "content": { + "type": "string" + } + } + }, + "UpdateNoteRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + } + } + }, + "RoleBody": { + "type": "object", + "properties": { + "userUid": { + "type": "string" + }, + "roleUid": { + "type": "string" + }, + "roleName": { + "type": "string" + } + } + }, + "CreateOrganizationApplicationRequest": { + "type": "object", + "properties": { + "applicationUid": { + "type": "string" + }, + "organizationUid": { + "type": "string" + } + } + }, + "DeleteOrganizationApplicationAttributeRequest": { + "type": "object", + "properties": { + "key": { + "type": "string" + } + } + }, + "CreateOrganizationApplicationModuleRequest": { + "type": "object", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "permissionOverwrite": { + "type": "boolean" + } + } + }, + "DeleteOrganizationApplicationModuleAttributeRequest": { + "type": "object", + "properties": { + "key": { + "type": "string" + } + } + }, + "CreateUserApplicationRequest": { + "type": "object", + "properties": { + "userUid": { + "type": "string" + }, + "applicationUid": { + "type": "string" + } + } + }, + "DeleteUserApplicationAttributeRequest": { + "type": "object", + "properties": { + "key": { + "type": "string" + } + } + }, + "CreateUserApplicationModuleRequest": { + "type": "object", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "permissionOverwrite": { + "type": "boolean" + } + } + }, + "UpdateUserApplicationModuleRequest": { + "type": "object", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "permissionOverwrite": { + "type": "boolean" + } + } + }, + "DeleteUserApplicationModuleAttributeRequest": { + "type": "object", + "properties": { + "key": { + "type": "string" + } + } + }, + "CreateUserOrganizationRequest": { + "type": "object", + "properties": { + "userUid": { + "type": "string" + }, + "organizationUid": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Admin" + ], + "default": "Primary" + } + } + }, + "DeleteUserOrganizationAttributeRequest": { + "type": "object", + "properties": { + "key": { + "type": "string" + } + } + }, + "EncryptRequest": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "sticksAndStones" + }, + "method": { + "type": "string", + "enum": [ + "encode", + "decode" + ], + "example": "encode" + } + } + }, + "CreateUserExternalIdRequest": { + "type": "object", + "required": [ + "source", + "externalId" + ], + "properties": { + "organizationUid": { + "type": "string", + "example": "68c7b07a-9bc5-4bbc-8fba-dedfe79612d0" + }, + "source": { + "type": "string", + "example": "hs_id" + }, + "externalId": { + "type": "string", + "example": "HS000001" + } + } + }, + "CreateOrganizationExternalIdRequest": { + "type": "object", + "required": [ + "source", + "externalId" + ], + "properties": { + "userUid": { + "type": "string", + "example": "c02cf331-af3b-4919-95c7-973f0377baa0" + }, + "source": { + "type": "string", + "example": "hs_id" + }, + "externalId": { + "type": "string", + "example": "HS000001" + } + } + }, + "UpdateExternalIdRequest": { + "type": "object", + "properties": { + "source": { + "type": "string", + "example": "hs_id" + }, + "externalId": { + "type": "string", + "example": "HS000001" + } + } + }, + "AuthenticationResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "sessionToken": { + "type": "string" + }, + "actSessionToken": { + "type": "string" + } + } + }, + "AuthorizeResponse": { + "type": "object", + "properties": { + "authorize": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + } + } + }, + "Credentials": { + "type": "object", + "properties": { + "credentials": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "sessionUid": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/definitions/OrganizationSmall" + } + }, + "impersonatingUser": { + "type": "object" + } + } + } + } + }, + "ModuleAuthorizationResponse": { + "type": "object", + "properties": { + "allowed": { + "type": "boolean" + }, + "source": { + "type": "string", + "enum": [ + "Default", + "User", + "UserRole", + "Organization", + "OrgType" + ] + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "isDefault": { + "type": "boolean" + } + } + }, + "FullAuthorizationResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "organization": { + "$ref": "#/definitions/Organization" + }, + "modulePermissions": { + "type": "object", + "example": { + "datalab.classplanner.filters.acquired": { + "allowed": true, + "source": "Default", + "isDefault": true, + "attributes": [ + { + "key": "ldapAuth", + "value": "standard" + }, + { + "key": "orgOverwriteRequired", + "value": "yes" + }, + { + "key": "orgOverwriteProgramsAllowed", + "value": "yes" + } + ] + } + } + } + } + }, + "UpdateApplicationResponse": { + "type": "object", + "properties": { + "application": { + "$ref": "#/definitions/Application" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "CreateApplicationResponse": { + "type": "object", + "properties": { + "application": { + "$ref": "#/definitions/Application" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "StandardUserResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "verificationCode": { + "type": "string", + "example": "345d4328cf2433f1ab24e574cf051f79" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "DeleteUserResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + }, + "GetOrganizationsResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationReallySmall" + } + }, + "parent": { + "$ref": "#/definitions/Parent" + }, + "group": { + "$ref": "#/definitions/Group" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "programs": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "externalIds": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalId" + } + } + } + }, + "CreateOrganizationResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "organization": { + "$ref": "#/definitions/Organization" + } + } + }, + "CreateModuleResponse": { + "type": "object", + "properties": { + "module": { + "$ref": "#/definitions/Module" + }, + "message": { + "type": "string" + } + } + }, + "UpdateModuleResponse": { + "type": "object", + "properties": { + "module": { + "$ref": "#/definitions/Module" + }, + "message": { + "type": "string" + } + } + }, + "CreateNoteResponse": { + "type": "object", + "properties": { + "note": { + "$ref": "#/definitions/Note" + }, + "message": { + "type": "string" + } + } + }, + "UpdateNoteResponse": { + "type": "object", + "properties": { + "note": { + "$ref": "#/definitions/Note" + }, + "message": { + "type": "string" + } + } + }, + "DeleteNoteResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + }, + "CreateRoleResponse": { + "type": "object", + "properties": { + "userRole": { + "type": "object", + "properties": { + "userUid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleUid": { + "type": "string", + "example": "2333afd5-5a4d-453c-9e6f-8d63f885bb59" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-26T20:19:50.193Z" + }, + "createdAt": { + "type": "string", + "example": "2017-06-26T20:19:50.193Z" + } + } + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "DeleteRoleResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + }, + "CreateOrganizationApplicationResponse": { + "type": "object", + "properties": { + "organizationApplication": { + "$ref": "#/definitions/OrganizationApplicationRelationship" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "GetOrganizationApplicationRelationshipsResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2a84de84-c706-4573-990f-6ebc5f4d7051" + }, + "organization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + } + } + }, + "application": { + "type": "object", + "properties": { + "org": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "key": { + "type": "string", + "example": "nrccuakey" + }, + "name": { + "type": "string", + "example": "nrccua" + } + } + } + } + }, + "DeleteOrganizationApplicationResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + }, + "CreateOrganizationApplicationAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "DeleteOrganizationApplicationAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "CreateOrganizationApplicationModuleResponse": { + "type": "object", + "properties": { + "organizationApplicationModule": { + "$ref": "#/definitions/OrganizationApplicationModuleRelationship" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "GetOrganizationApplicationModuleRelationshipsResponse": { + "type": "object", + "properties": { + "organizationApplicationUid": { + "type": "string", + "example": "2333afd5-5a4d-453c-9e6f-8d63f885bb59" + }, + "permissionOverwrite": { + "type": "boolean", + "example": true + }, + "module": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "key": { + "type": "string", + "example": "module.key" + }, + "name": { + "type": "string", + "example": "Module Name" + }, + "defaultPermission": { + "type": "boolean", + "example": true + } + } + } + } + }, + "DeleteOrganizationApplicationModuleResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + }, + "CreateOrganizationApplicationModuleAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "DeleteOrganizationApplicationModuleAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "CreateUserApplicationResponse": { + "type": "object", + "properties": { + "userApplication": { + "$ref": "#/definitions/UserApplicationRelationship" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "GetUserApplicationRelationshipsResponse": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "cfb4e709-ff37-4d95-b553-ed3a1cec2062" + }, + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "eabac226-5706-4e7c-812c-00b19e2ddf4b" + }, + "firstName": { + "type": "string", + "example": "UserName" + }, + "lastName": { + "type": "string", + "example": "UserLastName" + }, + "userName": { + "type": "string", + "example": "UserUserName" + }, + "email": { + "type": "string", + "example": "UserEmail@nrccua.org" + }, + "status": { + "type": "string", + "example": "Pending" + }, + "verifiedDate": { + "type": "string" + }, + "createdAt": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "externalIds": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalId" + } + } + } + }, + "application": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "key": { + "type": "string", + "example": "nrccuakey" + }, + "name": { + "type": "string", + "example": "nrccua" + } + } + } + } + }, + "DeleteUserApplicationResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + }, + "CreateUserApplicationAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "DeleteUserApplicationAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "CreateUserApplicationModuleResponse": { + "type": "object", + "properties": { + "userApplicationModule": { + "$ref": "#/definitions/UserApplicationModuleRelationship" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "GetUserApplicationModuleRelationshipsResponse": { + "type": "object", + "properties": { + "userApplicationUid": { + "type": "string", + "example": "2333afd5-5a4d-453c-9e6f-8d63f885bb59" + }, + "permissionOverwrite": { + "type": "boolean", + "example": true + }, + "module": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "key": { + "type": "string", + "example": "module.key" + }, + "name": { + "type": "string", + "example": "Module Name" + }, + "defaultPermission": { + "type": "boolean", + "example": true + } + } + } + } + }, + "UpdateUserApplicationModuleResponse": { + "type": "object", + "properties": { + "userApplicationModule": { + "$ref": "#/definitions/UserApplicationModuleRelationship" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "DeleteUserApplicationModuleResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + }, + "CreateUserApplicationModuleAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "DeleteUserApplicationModuleAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "CreateUserOrganizationResponse": { + "type": "object", + "properties": { + "userOrganization": { + "$ref": "#/definitions/UserOrganizationRelationship" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "GetUserOrganizationRelationshipsResponse": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "firstName": { + "type": "string", + "example": "UserName" + }, + "lastName": { + "type": "string", + "example": "UserLastName" + }, + "userName": { + "type": "string", + "example": "UserUserName" + }, + "email": { + "type": "string", + "example": "UserEmail@nrccua.org" + }, + "status": { + "type": "string", + "example": "Active" + }, + "type": { + "type": "string", + "example": "LdapUser" + }, + "createdAt": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "verifiedDate": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "externalIds": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalId" + } + } + } + }, + "organization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + } + } + }, + "type": { + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Admin" + ] + }, + "updatedAt": { + "type": "string", + "example": "2017-06-26T21:32:28.381Z" + }, + "createdAt": { + "type": "string", + "example": "2017-06-26T21:32:28.381Z" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "UpdateUserOrganizationRelationshipResponse": { + "type": "object", + "properties": { + "userOrganization": { + "$ref": "#/definitions/UserOrganizationRelationship" + }, + "message": { + "type": "string" + } + } + }, + "DeleteUserOrganizationResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + }, + "CreateUserOrganizationAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "DeleteUserOrganizationAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "ImpersonateResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "impersonatingUser": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "eabac226-5706-4e7c-812c-00b19e2ddf4b" + }, + "firstName": { + "type": "string", + "example": "Administrator" + }, + "lastName": { + "type": "string", + "example": "Administrator" + }, + "userName": { + "type": "string", + "example": "admin" + } + } + }, + "sessionToken": { + "type": "string" + } + } + }, + "EncryptResponse": { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "decodedMessage" + } + } + } + } + }, + "CreateUserExternalIdResponse": { + "type": "object", + "properties": { + "externalId": { + "$ref": "#/definitions/ExternalId" + }, + "message": { + "type": "string" + } + } + }, + "CreateOrganizationExternalIdResponse": { + "type": "object", + "properties": { + "externalId": { + "$ref": "#/definitions/ExternalId" + }, + "message": { + "type": "string" + } + } + }, + "UpdateExternalIdResponse": { + "type": "object", + "properties": { + "externalId": { + "$ref": "#/definitions/ExternalId" + }, + "message": { + "type": "string", + "example": "Success" + } + } + }, + "DeleteExternalIdResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + } + } + }, + "Application": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "11b12690-0207-4311-ae35-5809bc705da9" + }, + "key": { + "type": "string", + "example": "nrccuakey" + }, + "name": { + "type": "string", + "example": "nrccua" + }, + "url": { + "type": "string", + "example": "https://nrccua.org" + }, + "adminUrl": { + "type": "string", + "example": "https://nrccua.org" + }, + "creator": { + "$ref": "#/definitions/Creator" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-21T21:39:33.891Z" + }, + "createdAt": { + "type": "string", + "example": "2017-06-21T21:39:33.891Z" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleSmall" + } + } + } + }, + "ApplicationSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleReallySmall" + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "ApplicationReallySmall": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "GetApplicationSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "44bc5658-e923-4c0b-9400-c638eabef494" + }, + "name": { + "type": "string", + "example": "BoehmandSons" + }, + "key": { + "type": "string", + "example": "WindlerandSons" + }, + "url": { + "type": "string", + "example": "https://hollis.name" + }, + "adminUrl": { + "type": "string", + "example": "https://brody.biz" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/definitions/OrganizationReallySmall" + } + } + } + }, + "User": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "eabac226-5706-4e7c-812c-00b19e2ddf4b" + }, + "type": { + "type": "string", + "example": "User" + }, + "firstName": { + "type": "string", + "example": "Administrator" + }, + "lastName": { + "type": "string", + "example": "Administrator" + }, + "userName": { + "type": "string", + "example": "admin" + }, + "email": { + "type": "string", + "example": "admin@nrccua.org" + }, + "status": { + "type": "string", + "example": "Pending" + }, + "verifiedDate": { + "type": "string" + }, + "createdAt": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "creator": { + "$ref": "#/definitions/Creator" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/definitions/OrganizationSmall" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "applications": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/ModuleReallySmall" + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "PendingApproval" + ] + } + } + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "externalIds": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalId" + } + } + } + }, + "UserSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "firstName": { + "type": "string", + "example": "McGlynn" + }, + "lastName": { + "type": "string", + "example": "Antoinette" + }, + "userName": { + "type": "string", + "example": "Micaela.Swift32" + }, + "email": { + "type": "string", + "example": "Alize_Connelly@yahoo.com" + }, + "status": { + "type": "string", + "example": "Disabled" + }, + "type": { + "type": "string", + "example": "LdapUser" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/definitions/OrganizationSmall" + } + }, + "externalIds": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalId" + } + } + } + }, + "UserReallySmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "userName": { + "type": "string", + "example": "Sample University-0" + }, + "firstName": { + "type": "string", + "example": "McGlynn" + }, + "lastName": { + "type": "string", + "example": "Antoinette" + }, + "email": { + "type": "string", + "example": "antoinette@nrccua.org" + }, + "status": { + "type": "string", + "example": "Active" + }, + "type": { + "type": "string", + "example": "LdapUser" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "LoginHistory": { + "type": "object", + "properties": { + "ipAddress": { + "type": "string", + "example": "::ffff:127.0.0.1" + }, + "createdAt": { + "type": "string", + "example": "2017-06-26T20:18:34.558Z" + } + } + }, + "ImpersonateHistory": { + "type": "object", + "properties": { + "impersonatorUserUid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "ipAddress": { + "type": "string", + "example": "::ffff:127.0.0.1" + }, + "createdAt": { + "type": "string", + "example": "2017-06-26T20:18:34.558Z" + } + } + }, + "UserAuthorizations": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "eabac226-5706-4e7c-812c-00b19e2ddf4b" + }, + "type": { + "type": "string", + "example": "User" + }, + "firstName": { + "type": "string", + "example": "John" + }, + "lastName": { + "type": "string", + "example": "Arm" + }, + "userName": { + "type": "string", + "example": "john-arm" + }, + "email": { + "type": "string", + "example": "john-arm@nrccua.org" + }, + "status": { + "type": "string", + "example": "Active" + }, + "verifiedDate": { + "type": "string", + "example": "2020-11-04T17:53:48.470Z" + }, + "creator": { + "$ref": "#/definitions/Creator" + }, + "createdAt": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-20T16:43:11.378Z" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/definitions/OrganizationSmall" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "application": { + "$ref": "#/definitions/UserApplication" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "UserApplicationModule": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "e8e3d610-4211-450f-b44b-1b0aa4a31283" + }, + "key": { + "type": "string", + "example": "datalab.research.covid-19-student-impact" + }, + "name": { + "type": "string", + "example": "COVID-19 Student Impact" + }, + "permission": { + "type": "boolean", + "example": true + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "UserApplication": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "11b12690-0207-4311-ae35-5809bc705da9" + }, + "key": { + "type": "string", + "example": "nrccuakey" + }, + "name": { + "type": "string", + "example": "nrccua" + }, + "url": { + "type": "string", + "example": "https://nrccua.org" + }, + "adminUrl": { + "type": "string", + "example": "https://nrccua.org" + }, + "creator": { + "$ref": "#/definitions/Creator" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-21T21:39:33.891Z" + }, + "createdAt": { + "type": "string", + "example": "2017-06-21T21:39:33.891Z" + }, + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/UserApplicationModule" + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "Organization": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "group": { + "$ref": "#/definitions/Group" + }, + "parent": { + "$ref": "#/definitions/Parent" + }, + "creator": { + "$ref": "#/definitions/Creator" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/UserReallySmall" + } + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationSmall" + } + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "externalIds": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalId" + } + } + } + }, + "OrganizationSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "e93d3ce1-5cf8-4d2f-98e3-d31e03bf2730" + }, + "name": { + "type": "string", + "example": "Sample University" + }, + "fice": { + "type": "string", + "example": "SAMPLE" + }, + "stateCode": { + "type": "string", + "example": "MO" + } + } + }, + "OrganizationReallySmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "e93d3ce1-5cf8-4d2f-98e3-d31e03bf2730" + }, + "name": { + "type": "string", + "example": "Sample University" + } + } + }, + "OrganizationAuthorizations": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "2e6dba3f-4916-469d-bb6e-01d2c67b2211" + }, + "type": { + "type": "string", + "enum": [ + "Organization", + "OrgType" + ] + }, + "name": { + "type": "string", + "example": "NitzscheandSons" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "Pending" + ], + "example": "Pending" + }, + "sfAccountId": { + "type": "string", + "example": "0016000000ImzzJAAR" + }, + "externalId": { + "type": "string", + "example": "003422" + }, + "actCode": { + "type": "string", + "example": "0011" + }, + "createdAt": { + "type": "string", + "example": "2017-06-21T16:36:08.039Z" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-21T16:36:08.039Z" + }, + "programs": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "group": { + "$ref": "#/definitions/Group" + }, + "parent": { + "$ref": "#/definitions/Parent" + }, + "creator": { + "$ref": "#/definitions/Creator" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/UserReallySmall" + } + }, + "application": { + "$ref": "#/definitions/UserApplication" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "NoteSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "25223517-9516-42b3-ae5f-413677d2a888" + }, + "content": { + "type": "string", + "example": "Numquam facere est perferendis quo." + }, + "createdAt": { + "type": "string", + "example": "2017-06-20T18:48:45.212Z" + }, + "creator": { + "$ref": "#/definitions/Creator" + } + } + }, + "Note": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "25223517-9516-42b3-ae5f-413677d2a888" + }, + "content": { + "type": "string", + "example": "Numquam facere est perferendis quo." + }, + "createdAt": { + "type": "string", + "example": "2017-06-20T18:48:45.212Z" + }, + "createdBy": { + "type": "string" + }, + "entityUid": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "Creator": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf7883eb-7070-42bf-b706-9917f0ff6f47" + }, + "firstName": { + "type": "string", + "example": "John" + }, + "lastName": { + "type": "string", + "example": "Doe" + } + } + }, + "Modification": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "4bb7304b-9374-49ed-b361-12034908172e" + }, + "modification": { + "type": "object" + }, + "createdAt": { + "type": "string", + "example": "2017-06-20T18:48:45.682Z" + }, + "modifier": { + "$ref": "#/definitions/Modifier" + } + } + }, + "Modifier": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "55ee6a37-7395-4a99-a623-7a53815b7103" + }, + "firstName": { + "type": "string", + "example": "Administrator" + }, + "lastName": { + "type": "string", + "example": "Administrator" + } + } + }, + "DeletedAttribute": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "CreatedAttribute": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "AttributeSmall": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + }, + "value": { + "type": "object" + } + } + }, + "ProgramSmall": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "example": "tempore" + } + } + }, + "ProgramResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "programs": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + } + } + }, + "PrerequisitesResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "prerequisites": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + } + } + }, + "RequiredAttributeResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Success" + }, + "requiredAttributes": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + } + } + }, + "Module": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "defaultPermission": { + "type": "boolean" + }, + "creator": { + "$ref": "#/definitions/Creator" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "createdAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "programs": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "prerequisites": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "requiredAttributes": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "application": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + }, + "ModuleForList": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "application": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + }, + "ModuleReallySmall": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "key": { + "type": "string" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "attributesOverwrite": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "ModuleSmall": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "defaultPermission": { + "type": "boolean" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "programs": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "prerequisites": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + }, + "requiredAttributes": { + "type": "array", + "items": { + "$ref": "#/definitions/ProgramSmall" + } + } + } + }, + "Role": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "bf45a23c-b527-4c5d-b7b8-60250339d265" + }, + "roleName": { + "type": "string", + "example": "Administrator" + } + } + }, + "OrganizationApplicationRelationship": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1c249f44-8859-4f73-856b-6ab18b9d61ba" + }, + "applicationUid": { + "type": "string", + "example": "c02cf331-af3b-4919-95c7-973f0377baa0" + }, + "organizationUid": { + "type": "string", + "example": "68c7b07a-9bc5-4bbc-8fba-dedfe79612d0" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-26T21:32:28.381Z" + }, + "createdAt": { + "type": "string", + "example": "2017-06-26T21:32:28.381Z" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "OrganizationApplicationModuleRelationship": { + "type": "object", + "properties": { + "moduleUid": { + "type": "string", + "example": "6070aa52-3454-42a9-9461-efa02fb6d82a" + }, + "organizationApplicationUid": { + "type": "string", + "example": "d313f1eb-b9e7-48a3-8e2f-95006efd02a6" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-27T18:18:25.912Z" + }, + "createdAt": { + "type": "string", + "example": "2017-06-27T18:18:25.912Z" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "UserApplicationRelationship": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1e6c6d8e-af30-43ca-a519-395734701eba" + }, + "userUid": { + "type": "string", + "example": "a03e2576-9a33-4eda-aa47-b1a4893f33b2" + }, + "applicationUid": { + "type": "string", + "example": "c02cf331-af3b-4919-95c7-973f0377baa0" + }, + "status": { + "type": "string", + "enum": [ + "Active", + "Inactive", + "PendingApproval" + ] + }, + "updatedAt": { + "type": "string", + "example": "2017-06-26T21:32:28.381Z" + }, + "createdAt": { + "type": "string", + "example": "2017-06-26T21:32:28.381Z" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "UserApplicationModuleRelationship": { + "type": "object", + "properties": { + "moduleUid": { + "type": "string", + "example": "6070aa52-3454-42a9-9461-efa02fb6d82a" + }, + "userApplicationUid": { + "type": "string", + "example": "d313f1eb-b9e7-48a3-8e2f-95006efd02a6" + }, + "permissionOverwrite": { + "type": "boolean" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-27T18:18:25.912Z" + }, + "createdAt": { + "type": "string", + "example": "2017-06-27T18:18:25.912Z" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + } + } + }, + "UserOrganizationRelationship": { + "type": "object", + "properties": { + "userUid": { + "type": "string", + "example": "c02cf331-af3b-4919-95c7-973f0377baa0" + }, + "organizationUid": { + "type": "string", + "example": "68c7b07a-9bc5-4bbc-8fba-dedfe79612d0" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-26T21:32:28.381Z" + }, + "createdAt": { + "type": "string", + "example": "2017-06-26T21:32:28.381Z" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/AttributeSmall" + } + }, + "type": { + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Admin" + ] + } + } + }, + "Group": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "Parent": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "EmailConfig": { + "type": "object", + "properties": { + "clientUrl": { + "type": "string", + "example": "https://datalab.encoura.org" + }, + "templateId": { + "type": "object", + "properties": { + "invitationEmail": { + "type": "string", + "example": "encoura-dl-new-user" + }, + "welcomeEmail": { + "type": "string", + "example": "" + }, + "forgotPasswordEmail": { + "type": "string", + "example": "encoura-dl-forgot-password" + }, + "passwordChangedEmail": { + "type": "string", + "example": "encourage-apollo-password-changed-notification-test" + } + } + } + } + }, + "ExternalId": { + "type": "object", + "properties": { + "uid": { + "type": "string", + "example": "1769a5f2-3f8d-4aca-adb1-717328dd575a" + }, + "userUid": { + "type": "string", + "example": "c02cf331-af3b-4919-95c7-973f0377baa0" + }, + "organizationUid": { + "type": "string", + "example": "68c7b07a-9bc5-4bbc-8fba-dedfe79612d0" + }, + "source": { + "type": "string", + "example": "hs_id" + }, + "externalId": { + "type": "string", + "example": "HS000001" + }, + "updatedAt": { + "type": "string", + "example": "2017-06-26T21:32:28.381Z" + }, + "createdAt": { + "type": "string", + "example": "2017-06-26T21:32:28.381Z" + } + } + } + } +} diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 0000000..d559fef --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "baseUrl": "./", + "jsx": "react" + }, + "exclude": [], + "include": [ + "./**/*", + "../**/*.test.*" + ] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..d297fc6 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "baseUrl": "./lib", + "composite": true, + "esModuleInterop": true, + "incremental": true, + "outDir": "./dist", + "typeRoots": [ + "./node_modules/@types" + ] + }, + "composite": true, + "exclude": [ + "./build/**/*", + "./**/*.test.*" + ], + "extends": "./node_modules/@encoura/eslint-config/tsconfig.json", + "include": [ + "./**/*", + ], + "target": "es5", +}