Module: APISchema

Included in:
LingotekClient::Schema
Defined in:
lib/lingotek-client/api_schema.rb

Instance Method Summary collapse

Instance Method Details

#schemaObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/lingotek-client/api_schema.rb', line 2

def schema
  {
    acceptExternalInvite: { required: [:invite_id], optional: []},
    addCommunityDictionaryEntry: { required: [:type, :entry], optional: []},
    addCompany: { required: [:companyName], optional: []},
    addContact: { required: [:userEmail], optional: [:comment]},
    addContentDocument: { required: [:projectId, :content, :documentName, :sourceLanguage, :tmVaultId, :format], optional: [:documentDesc, :note, :srxFileContents, :itsFileContents, :fprmFileContents, :secondaryFilter, :secondaryFprmFileContents, :placeholderMode, :priority]},
    addDocument: { required: [:projectId, :file, :documentName, :format, :encoding, :sourceLanguage, :tmVaultId], optional: [:tmTarget, :zipFile, :note, :srxFile, :itsFile, :fprmFile, :secondaryFilter, :secondaryFprmFile, :placeholderMode, :priority]},
    addDocumentURL: { required: [:projectId, :url, :sourceLanguage, :tmVaultId], optional: [:format, :target, :tmTarget, :template, :depth, :srxFile, :itsFile, :fprmFile, :secondaryFilter, :secondaryFprmFile, :placeholderMode, :priority]},
    addDocumentWithTargets: { required: [:projectId, :file, :applyWorkflow, :documentName, :format, :encoding, :phaseTemplateId, :sourceLanguage, :tmVaultId], optional: [:targetLanguage, :targetAsJSON, :tmTarget, :zipFile]},
    addGlossary: { required: [:glossaryName, :asTerminology], optional: []},
    addLabel: { required: [:name], optional: [:status]},
    addPhase: { required: [:translationTargetId, :phaseName], optional: [:phaseDescription, :isCommunityAccess, :isSelfAssigned]},
    addPhaseTemplate: { required: [:phaseTemplateName], optional: [], is_deprecated: true},
    addPhaseToTemplate: { required: [:phaseTemplateId, :phaseName], optional: [:phaseDescription, :isCommunityAccess, :isSelfAssigned], is_deprecated: true},
    addPreference: { required: [:key], optional: [:value]},
    addProject: { required: [:projectName], optional: [:projectDueDate, :companyId, :workflowId, :searchPublic]},
    addProjectDictionary: { required: [:project_id, :dictionary_id], optional: []},
    addProjectMT: { required: [:project_id, :mt_engine_name], optional: []},
    addProjectTMVault: { required: [:tmVaultName, :project_id, :index_id], optional: [:isPublic]},
    addSegmentLabelTemplate: { required: [:segmentLabelTemplateName], optional: [:segmentLabels]},
    addSegmentLabelToTemplate: { required: [:segmentLabelTemplateName, :segmentLabels], optional: []},
    addTeam: { required: [:name], optional: [:description, :image]},
    addTeamLead: { required: [:teamId, :clientId], optional: []},
    addTeamMember: { required: [:teamId, :clientId], optional: []},
    addTMVault: { required: [:tmVaultName], optional: [:isPublic]},
    addTranslationTarget: { required: [:documentId, :applyWorkflow, :targetLanguage], optional: []},
    analyzeDocument: { required: [:documentId], optional: []},
    analyzeProject: { required: [:projectId],  optional: [:documentId]},
    applyPhaseTemplate: { required: [:translationTargetId, :phaseTemplateId], optional: [], is_deprecated: true},
    applySegmentLabelTemplate: { required: [:documentId, :segmentLabelTemplateName], optional: []},
    assignPhaseTranslator: { required: [:phaseId, :translatorUserId], optional: []},
    assignProjectManager: { required: [:projectId], optional: [:managerLoginName, :managerUserId]},
    assignSelf: { required: [:phaseId], optional: []},
    backgroundJobProgress: { required: [:queueId], optional: [], is_deprecated: true},
    declineExternalInvite: { required: [:invite_id, :phase], optional: []},
    dismissPhaseTranslator: { required: [:phaseId, :translatorUserId], optional: []},
    dismissProjectManager: { required: [:projectId, :managerUserId], optional: []},
    documentSegments: { required: [:documentId], optional: []},
    downloadDocument: { required: [:documentId, :targetLanguage], optional: [:useSource, :useAttributions]},
    downloadDocumentAsCSV: { required: [:documentId, :targetLanguage], optional: []},
    downloadDocumentAsSkeleton: { required: [:documentId], optional: []},
    downloadDocumentAsTMX: { required: [:documentId], optional: [:targetLanguage]},
    downloadDocumentAsXliff: { required: [:documentId], optional: [:targetLanguage]},
    downloadDocumentContent: { required: [:documentId, :targetLanguage], optional: []},
    downloadExport: { required: [:resourceType, :exportId], optional: []},
    downloadGlossaryAsCSV: { required: [:glossaryId, :sourceLanguage], optional: [:targetLanguage], is_deprecated: true},
    downloadGlossaryAsTBX: { required: [:glossaryId, :sourceLanguage], optional: [:targetLanguage], is_deprecated: true},
    downloadTMVaultAsTMX: { required: [:tmVaultId, :sourceLanguage], optional: [:targetLanguage], is_deprecated: true},
    downloadTMVaultAsXliff: { required: [:tmVaultId, :sourceLanguage], optional: [:targetLanguage], is_deprecated: true},
    editClientCommunityPreference: { required: [:key, :value], optional: []},
    editCompany: { required: [:companyId], optional: [:companyName]},
    editContact: { required: [:contactId], optional: [:comment]},
    editDocument: { required: [:documentId], optional: [:documentName, :tmVaultId]},
    editDocumentSetting: { required: [:documentId, :type, :key, :value], optional: []},
    editGlossary: { required: [:glossaryId], optional: [:glossaryName]},
    editLabel: { required: [:id], optional: [:name, :status, :order, :offset, :move_to_label, :show_percent_complete]},
    editPhase: { required: [:phaseId], optional: [:phaseName, :phaseDescription, :isCommunityAccess, :isSelfAssigned]},
    editPhaseTemplate: { required: [:phaseTemplateId], optional: [:phaseTemplateName], is_deprecated: true},
    editPreference: { required: [:key, :value], optional: []},
    editProject: { required: [:projectId], optional: [:projectName, :projectDueDate, :companyId, :searchPublic]},
    editProjectSetting: { required: [:projectId, :type, :key, :value], optional: []},
    editSegmentLabelTemplate: { required: [:segmentLabelTemplateName], optional: []},
    editTMVault: { required: [:tmVaultId], optional: [:tmVaultName, :isPublic]},
    editTranslationTarget: { required: [:translationTargetId], optional: []},
    exportResource: { required: [:resourceType, :resourceId, :format, :targetLanguages, :sourceLanguage], optional: []},
    findLabel: { required: [:name, :limit], optional: []},
    findTM: { required: [:tmVaultId, :sourceLang, :targetLang], optional: [:searchText, :startDate, :endDate]},
    flushDocumentProgress: { required: [:documentId], optional: []},
    getAnalysis: { required: [:group], optional: []},
    getClientCommunityPreference: { required: [:key], optional: []},
    getCMSKey: { required: [], optional: []},
    getCommunityDictionary: { required: [:type], optional: []},
    getCommunityPreference: { required: [:key, :type], optional: []},
    getCompany: { required: [:companyId], optional: []},
    getContact: { required: [:contactId], optional: []},
    getDashboardLink: { required: [], optional: []},
    getDocument: { required: [:documentId], optional: []},
    getDocumentProgress: { required: [:documentId], optional: []},
    getDocumentSetting: { required: [:documentId, :type, :key], optional: []},
    getExternalInvites: { required: [:invite_id], optional: []},
    getGlossary: { required: [:glossaryId], optional: []},
    getLabel: { required: [], optional: [:id, :name]},
    getPhase: { required: [:phaseId], optional: []},
    getPhaseTemplate: { required: [:phaseTemplateId], optional: [], is_deprecated: true},
    getPreference: { required: [:key], optional: []},
    getPriorityJobWorkbenchLink: { required: [], optional: []},
    getProject: { required: [:projectId], optional: []},
    getProjectSetting: { required: [:projectId, :type, :key], optional: []},
    getSegmentLabelTemplate: { required: [:segmentLabelTemplateName], optional: []},
    getTMVault: { required: [:tmVaultId], optional: []},
    getTranslationTarget: { required: [:translationTargetId], optional: []},
    getUsers: { required: [:search, :limit, :community], optional: []},
    getVaultLanguages: { required: [:tmVaultId], optional: []},
    getWorkbenchLink: { required: [:documentId, :phaseId, :invite_id, :embedded], optional: [:redirectURL]},
    ignoreSegment: { required: [:segmentId, :documentId], optional: []},
    importCommunityDictionary: { required: [:type, :file, :delimiter], optional: []},
    joinTeam: { required: [:teamId], optional: []},
    leaveTeam: { required: [:teamId], optional: []},
    listAssignedProjects: { required: [], optional: []},
    listCommunities: { required: [], optional: []},
    listCompanies: { required: [], optional: []},
    listContacts: { required: [], optional: []},
    listDefaultPhaseTemplates: { required: [], optional: [], is_deprecated: true},
    listDocuments: { required: [:documentId], optional: []},
    listDocumentSegmentLabels: { required: [:documentId], optional: []},
    listDocumentSegments: { required: [:documentId], optional: []},
    listDocumentTranslationSegments: { required: [:documentId, :targetLanguage], optional: []},
    listGlossaries: { required: [], optional: []},
    listJobs: { required: [], optional: []},
    listLabels: { required: [], optional: []},
    listLanguages: { required: [], optional: [:language]},
    listLanguageSkills: { required: [], optional: []},
    listLeaderboardRange: { required: [], optional: [:teamName, :startDate, :endDate]},
    listLeaderboardResults: { required: [], optional: [:teamName, :maxResults]},
    listPhases: { required: [:translationTargetId], optional: []},
    listPhaseTemplates: { required: [], optional: [], is_deprecated: true},
    listProjects: { required: [], optional: []},
    listSegmentLabelTemplates: { required: [], optional: []},
    listTeamMembers: { required: [:teamId], optional: []},
    listTeams: { required: [], optional: []},
    listTMDocuments: { required: [:tmVaultId], optional: []},
    listTMVaults: { required: [], optional: []},
    listTranslationTargets: { required: [:documentId], optional: []},
    listUserStats: { required: [], optional: []},
    listWorkflows: { required: [], optional: []},
    machineTranslateDocument: { required: [:documentId, :engineId, :phaseId], optional: []},
    markPhaseComplete: { required: [:phaseId], optional: []},
    MTSegments: { required: [:documentId, :json], optional: []},
    pollClientReport: { required: [:report_name], optional: []},
    pollDocumentAnalysis: { required: [:documentId], optional: []},
    pollDocumentImport: { required: [:documentId], optional: []},
    pollGlossaryImport: { required: [:glossaryUploadId], optional: []},
    pollProjectAnalysis: { required: [:projectId], optional: []},
    pollTMVaultImport: { required: [:tmVaultUploadId], optional: []},
    prefillDocument: { required: [:phaseId, :tmVaultId, :tmVaultThreshold, :lockTMVault, :lockTerminology, :overwrite, :completePhase], optional: []},
    regardSegment: { required: [:segmentId, :documentId], optional: []},
    removeClientCommunityPreference: { required: [:key], optional: []},
    removeCommunityDictionaryEntry: { required: [:type, :entry], optional: []},
    removeCompany: { required: [:companyId], optional: []},
    removeContact: { required: [:contactId], optional: []},
    removeDocument: { required: [:documentId], optional: []},
    removeGlossary: { required: [:glossaryId], optional: []},
    removeLabel: { required: [:id], optional: []},
    removePhase: { required: [:phaseId], optional: []},
    removePhaseFromTemplate: { required: [:phaseTemplateId, :phaseParameterSetId], optional: []},
    removePhaseTemplate: { required: [:phaseTemplateId], optional: [], is_deprecated: true},
    removePreference: { required: [:key], optional: []},
    removeProject: { required: [:projectId], optional: []},
    removeSegmentLabelFromTemplate: { required: [:segmentLabelTemplateName, :segmentLabels], optional: []},
    removeSegmentLabelTemplate: { required: [:segmentLabelTemplateName], optional: []},
    removeTeam: { required: [:teamId], optional: []},
    removeTeamLead: { required: [:teamId, :clientId], optional: []},
    removeTeamMember: { required: [:teamId, :clientId], optional: []},
    removeTM: { required: [:tmVaultId, :tid], optional: []},
    removeTMVault: { required: [:tmVaultId], optional: []},
    removeTranslationTarget: { required: [:translationTargetId], optional: []},
    removeUploadedTMFromVault: { required: [:id], optional: []},
    saveLabelTemplate: { required: [:name], optional: [:labels]},
    saveSegment: { required: [:sourceText, :targetText, :targetLanguage, :documentId, :overwrite], optional: []},
    searchGlossary: { required: [:glossaryId, :text, :sourceLanguage, :targetLanguage], optional: [:count]},
    setCommunityConcurrentUsers: { required: [:community, :users], optional: []},
    setProfileAttributes: { required: [], optional: [:name, :email, :login_id, :phone, :company, :native_language, :location, :notes, :on_leaderboard, :oldpword, :newpword, :source, :old_source, :target, :old_target, :experience, :rate, :rush_rate, :currency, :per, :service_note, :notifications_project_complete, :notifications_assigned_document, :notifications_available_community_document, :notifications_phase_ready]},
    translatorsForLanguage: { required: [:sourceLang, :targetLang], optional: []},
    updateContentDocument: { required: [:documentId, :content], optional: [:srxFileContents, :itsFileContents, :fprmFileContents, :secondaryFprmFileContents]},
    updateDocument: { required: [:documentId, :file], optional: []},
    updateTM: { required: [:tmVaultId, :tid, :translation], optional: []},
    uploadCSVToGlossary: { required: [:glossaryId, :file], optional: [:delimiter]},
    uploadTBXToGlossary: { required: [:glossaryId, :file], optional: []},
    uploadTMXToTMVault: { required: [:tmVaultId, :file, :name], optional: []},
    uploadXliffToTMVault: { required: [:tmVaultId, :file, :name], optional: []},
    uploadXLSToGlossary: { required: [:glossaryId, :file], optional: []},
    userState: { required: [:clientId], optional: []},
    allowLocalLogin: { required: [:password], optional: []},
    validateCredentials: { required: [:password], optional: []},
  }
end