Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@crowdin/crowdin-api-client

Package Overview
Dependencies
Maintainers
5
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crowdin/crowdin-api-client - npm Package Compare versions

Comparing version 1.10.6 to 1.11.0

6

CHANGELOG.md

@@ -8,2 +8,8 @@ # Change Log

## [1.11.0]
### Updated
- Reports API
## [1.10.0]

@@ -10,0 +16,0 @@

129

out/reports/index.d.ts
import { CrowdinApi, DownloadLink, ResponseObject, Status } from '../core';
export declare class Reports extends CrowdinApi {
/**
* @param groupId group identifier
* @param request request body
*/
generateGroupReport(groupId: number, request: ReportsModel.GenerateGroupReportRequest): Promise<ResponseObject<Status<ReportsModel.GroupReportStatusAttributes>>>;
/**
* @param groupId group identifier
* @param reportId report identifier
*/
checkGroupReportStatus(groupId: number, reportId: string): Promise<ResponseObject<Status<ReportsModel.GroupReportStatusAttributes>>>;
/**
* @param groupId group identifier
* @param reportId report identifier
*/
downloadGroupReport(groupId: number, reportId: string): Promise<ResponseObject<DownloadLink>>;
/**
* @param request request body
*/
generateOrganizationReport(request: ReportsModel.GenerateGroupReportRequest): Promise<ResponseObject<Status<ReportsModel.GroupReportStatusAttributes>>>;
/**
* @param reportId report identifier
*/
checkOrganizationReportStatus(reportId: string): Promise<ResponseObject<Status<ReportsModel.GroupReportStatusAttributes>>>;
/**
* @param reportId report identifier
*/
downloadOrganizationReport(reportId: string): Promise<ResponseObject<DownloadLink>>;
/**
* @param projectId project identifier

@@ -20,6 +47,13 @@ * @param request request body

export declare namespace ReportsModel {
interface GenerateGroupReportRequest {
name: string;
schema: GroupTranslationCostSchema | GroupTopMembersSchema;
}
interface GenerateReportRequest {
name: string;
schema: CostEstimateSchema | TranslationCostSchema | TopMembersSchema;
schema: CostEstimateSchema | CostEstimateFuzzyModeSchema | TranslationCostSchema | TopMembersSchema | ContributionRawDataSchema;
}
interface GroupReportStatusAttributes extends ReportStatusAttributes {
projectIds: number[];
}
interface ReportStatusAttributes {

@@ -30,21 +64,64 @@ format: Format;

}
interface GroupTranslationCostSchema {
projectIds?: number[];
unit?: Unit;
currency?: Currency;
format?: Format;
groupBy?: GroupBy;
dateFrom?: string;
dateTo?: string;
}
interface GroupTopMembersSchema {
projectIds?: number[];
unit?: Unit;
languageId?: string;
format?: Format;
groupBy?: GroupBy;
dateFrom?: string;
dateTo?: string;
}
interface CostEstimateSchema {
unit: Unit;
currency: Currency;
languageId: string;
format: Format;
stepTypes: Array<TranslateStep | ProofreadStep>;
unit?: Unit;
currency?: Currency;
mode?: string;
languageId?: string;
fileIds?: number[];
format?: Format;
regularRates?: RegularRate[];
individualRates?: IndividualRate[];
dateFrom?: string;
dateTo?: string;
stepTypes?: Array<TranslateStep | ProofreadStep>;
}
interface CostEstimateFuzzyModeSchema extends CostEstimateSchema {
calculateInternalFuzzyMatches?: boolean;
}
interface TranslationCostSchema {
unit: Unit;
currency: Currency;
format: Format;
groupBy: GroupBy;
stepTypes: Array<TranslateStep | ProofreadStep>;
unit?: Unit;
currency?: Currency;
mode?: string;
format?: Format;
groupBy?: GroupBy;
regularRates?: RegularRate[];
individualRates?: IndividualRate[];
dateFrom?: string;
dateTo?: string;
stepTypes?: Array<TranslateStep | ProofreadStep>;
}
type TranslationCostFuzzyModeSchema = TranslationCostSchema;
interface TopMembersSchema {
unit: Unit;
languageId: string;
format: Format;
unit?: Unit;
languageId?: string;
format?: Format;
dateFrom?: string;
dateTo?: string;
}
interface ContributionRawDataSchema {
mode: ContributionMode;
unit?: Unit;
languageId?: string;
userId?: string;
dateFrom?: string;
dateTo?: string;
}
enum Unit {

@@ -82,3 +159,4 @@ STRINGS = "strings",

XLSX = "xlsx",
CSV = "csv"
CSV = "csv",
JSON = "json"
}

@@ -88,4 +166,4 @@ interface TranslateStep {

mode: string;
calculateInternalFuzzyMatches: boolean;
regularRates: RegularRates[];
regularRates: RegularRate[];
individualRates: IndividualRate[];
}

@@ -95,12 +173,23 @@ interface ProofreadStep {

mode: string;
regularRates: RegularRates[];
regularRates: RegularRate[];
individualRates: IndividualRate[];
}
interface RegularRates {
interface RegularRate {
mode: Mode;
value: number;
}
interface IndividualRate {
languageIds: string[];
rates: RegularRate[];
}
enum Mode {
NO_MATCH = "no_match",
TM_MATCH = "tm_match"
TM_MATCH = "tm_match",
APPROVAL = "approval"
}
enum ContributionMode {
TRANSLATIONS = "translations",
APPROVALS = "approvals",
VOTES = "votes"
}
enum GroupBy {

@@ -107,0 +196,0 @@ USER = "user",

@@ -7,2 +7,47 @@ "use strict";

/**
* @param groupId group identifier
* @param request request body
*/
generateGroupReport(groupId, request) {
const url = `${this.url}/groups/${groupId}/reports`;
return this.post(url, request, this.defaultConfig());
}
/**
* @param groupId group identifier
* @param reportId report identifier
*/
checkGroupReportStatus(groupId, reportId) {
const url = `${this.url}/groups/${groupId}/reports/${reportId}`;
return this.get(url, this.defaultConfig());
}
/**
* @param groupId group identifier
* @param reportId report identifier
*/
downloadGroupReport(groupId, reportId) {
const url = `${this.url}/groups/${groupId}/reports/${reportId}/download`;
return this.get(url, this.defaultConfig());
}
/**
* @param request request body
*/
generateOrganizationReport(request) {
const url = `${this.url}/reports`;
return this.post(url, request, this.defaultConfig());
}
/**
* @param reportId report identifier
*/
checkOrganizationReportStatus(reportId) {
const url = `${this.url}/reports/${reportId}`;
return this.get(url, this.defaultConfig());
}
/**
* @param reportId report identifier
*/
downloadOrganizationReport(reportId) {
const url = `${this.url}/reports/${reportId}/download`;
return this.get(url, this.defaultConfig());
}
/**
* @param projectId project identifier

@@ -71,2 +116,3 @@ * @param request request body

Format["CSV"] = "csv";
Format["JSON"] = "json";
})(Format = ReportsModel.Format || (ReportsModel.Format = {}));

@@ -77,3 +123,10 @@ let Mode;

Mode["TM_MATCH"] = "tm_match";
Mode["APPROVAL"] = "approval";
})(Mode = ReportsModel.Mode || (ReportsModel.Mode = {}));
let ContributionMode;
(function (ContributionMode) {
ContributionMode["TRANSLATIONS"] = "translations";
ContributionMode["APPROVALS"] = "approvals";
ContributionMode["VOTES"] = "votes";
})(ContributionMode = ReportsModel.ContributionMode || (ReportsModel.ContributionMode = {}));
let GroupBy;

@@ -80,0 +133,0 @@ (function (GroupBy) {

2

package.json
{
"name": "@crowdin/crowdin-api-client",
"version": "1.10.6",
"version": "1.11.0",
"description": "JavaScript library for Crowdin API v2.",

@@ -5,0 +5,0 @@ "main": "out/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc