Skip to content

feat: add Style Guides API support#634

Merged
andrii-bodnar merged 2 commits intomasterfrom
copilot/add-style-guides-api-support
Mar 16, 2026
Merged

feat: add Style Guides API support#634
andrii-bodnar merged 2 commits intomasterfrom
copilot/add-style-guides-api-support

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

Exposes the Crowdin Style Guides API endpoints so consumers can manage style guides via the SDK.

New module: src/styleGuides/index.ts

  • StyleGuides class with full CRUD: listStyleGuides, createStyleGuide, getStyleGuide, editStyleGuide, deleteStyleGuide
  • StyleGuidesModel namespace: StyleGuide response model, CreateStyleGuideRequest, and ListStyleGuidesOptions (supports orderBy, userId, limit, offset)

Client registration: src/index.ts

  • StyleGuides imported, re-exported, and registered as styleGuidesApi on the default Client

Usage

import Client from '@crowdin/crowdin-api-client';

const client = new Client({ token: '...' });

// List
const guides = await client.styleGuidesApi.listStyleGuides({ userId: 42 });

// Create
const guide = await client.styleGuidesApi.createStyleGuide({
    name: "iOS Style Guide",
    storageId: 1,
    languageIds: ['uk', 'fr'],
    isShared: false,
});

// Edit (JSON Patch)
await client.styleGuidesApi.editStyleGuide(guide.data.id, [
    { op: 'replace', path: '/name', value: 'Updated Guide' },
]);

// Delete
await client.styleGuidesApi.deleteStyleGuide(guide.data.id);
Original prompt

This section details on the original issue you should resolve

<issue_title>Add support for Style Guides API</issue_title>
<issue_description>The Crowdin API introduces a new Style Guides section. API client libraries should be updated to expose the Style Guides endpoints so that consumers can manage style guides (list, create, get, edit, delete) via the SDK.

References:

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: andrii-bodnar <29282228+andrii-bodnar@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for Style Guides API feat: add Style Guides API support Mar 16, 2026
Copilot AI requested a review from andrii-bodnar March 16, 2026 14:47
@andrii-bodnar andrii-bodnar marked this pull request as ready for review March 16, 2026 14:48
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.83%. Comparing base (95d203d) to head (793255c).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/styleGuides/index.ts 84.22% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #634      +/-   ##
==========================================
- Coverage   89.87%   89.83%   -0.03%     
==========================================
  Files          40       41       +1     
  Lines        2101     2123      +22     
  Branches      251      254       +3     
==========================================
+ Hits         1888     1907      +19     
  Misses         82       82              
- Partials      131      134       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andrii-bodnar andrii-bodnar merged commit f6326c0 into master Mar 16, 2026
12 checks passed
@andrii-bodnar andrii-bodnar deleted the copilot/add-style-guides-api-support branch March 16, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Style Guides API

2 participants