Skip to content

Commit

Permalink
v3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bodrovis committed Oct 15, 2024
1 parent 8dacb64 commit b7c2853
Show file tree
Hide file tree
Showing 155 changed files with 384 additions and 207 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
fail-fast: false
matrix:
include:
- elixir: 1.16.x
otp: 26
- elixir: 1.17.x
otp: 27
env:
MIX_ENV: test
LOKALISE_API_TOKEN: 123abc
Expand All @@ -35,7 +35,7 @@ jobs:
mix local.rebar --force
mix deps.get --only test
- name: Cache build artifacts
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.hex
Expand Down
6 changes: 3 additions & 3 deletions docs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ source 'https://rubygems.org'
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem 'jekyll', '~> 3.9.0'
gem 'jekyll', '~> 3.10.0'

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem 'minima', '~> 2.0'

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem 'github-pages', '~> 231', group: :jekyll_plugins
gem 'github-pages', '~> 232', group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
Expand All @@ -32,7 +32,7 @@ install_if -> { RUBY_PLATFORM =~ /mingw|mswin|java/ } do
end

# Performance-booster for watching directories on Windows
gem 'wdm', '~> 0.1.0', install_if: Gem.win_platform?
gem 'wdm', '~> 0.2.0', install_if: Gem.win_platform?

# kramdown v2 ships without the gfm parser by default. If you're using
# kramdown v1, comment out this line.
Expand Down
86 changes: 46 additions & 40 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.2)
activesupport (7.2.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
base64 (0.2.0)
bigdecimal (3.1.8)
coffee-script (2.4.1)
Expand All @@ -21,9 +22,10 @@ GEM
coffee-script-source (1.12.2)
colorator (1.1.0)
commonmarker (0.23.10)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
dnsruby (1.72.1)
csv (3.3.0)
dnsruby (1.72.2)
simpleidn (~> 0.2.1)
drb (2.2.1)
em-websocket (0.5.3)
Expand All @@ -33,19 +35,21 @@ GEM
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.9.1)
faraday (2.9.0)
faraday-net_http (>= 2.0, < 3.2)
faraday-net_http (3.1.0)
faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.4)
json
logger
faraday-net_http (3.3.0)
net-http
ffi (1.16.3)
ffi (1.17.0-x64-mingw-ucrt)
forwardable-extended (2.6.0)
gemoji (4.1.0)
github-pages (231)
github-pages (232)
github-pages-health-check (= 1.18.2)
jekyll (= 3.9.5)
jekyll (= 3.10.0)
jekyll-avatar (= 0.8.0)
jekyll-coffeescript (= 1.2.2)
jekyll-commonmark-ghpages (= 0.4.0)
jekyll-commonmark-ghpages (= 0.5.1)
jekyll-default-layout (= 0.1.5)
jekyll-feed (= 0.17.0)
jekyll-gist (= 1.5.0)
Expand Down Expand Up @@ -82,9 +86,10 @@ GEM
liquid (= 4.0.4)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.13.6, < 2.0)
nokogiri (>= 1.16.2, < 2.0)
rouge (= 3.30.0)
terminal-table (~> 1.4)
webrick (~> 1.8)
github-pages-health-check (1.18.2)
addressable (~> 2.3)
dnsruby (~> 1.60)
Expand All @@ -95,11 +100,12 @@ GEM
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jekyll (3.9.5)
jekyll (3.10.0)
addressable (~> 2.4)
colorator (~> 1.0)
csv (~> 3.0)
em-websocket (~> 0.5)
i18n (>= 0.7, < 2)
jekyll-sass-converter (~> 1.0)
Expand All @@ -110,16 +116,17 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
webrick (>= 1.0)
jekyll-avatar (0.8.0)
jekyll (>= 3.0, < 5.0)
jekyll-coffeescript (1.2.2)
coffee-script (~> 2.2)
coffee-script-source (~> 1.12)
jekyll-commonmark (1.4.0)
commonmarker (~> 0.22)
jekyll-commonmark-ghpages (0.4.0)
commonmarker (~> 0.23.7)
jekyll (~> 3.9.0)
jekyll-commonmark-ghpages (0.5.1)
commonmarker (>= 0.23.7, < 1.1.0)
jekyll (>= 3.9, < 4.0)
jekyll-commonmark (~> 1.4.0)
rouge (>= 2.0, < 5.0)
jekyll-default-layout (0.1.5)
Expand Down Expand Up @@ -205,6 +212,7 @@ GEM
gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
json (2.7.2)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
Expand All @@ -213,28 +221,28 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.1)
mercenary (0.3.6)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.22.3)
mutex_m (0.2.0)
minitest (5.25.1)
net-http (0.4.1)
uri
nokogiri (1.16.5-x64-mingw-ucrt)
nokogiri (1.16.7-x64-mingw-ucrt)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.5)
racc (1.7.3)
public_suffix (5.1.1)
racc (1.8.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.2.6)
rexml (3.3.8)
rouge (3.30.0)
rubyzip (2.3.2)
safe_yaml (1.0.5)
Expand All @@ -246,35 +254,33 @@ GEM
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
simpleidn (0.2.2)
unf (~> 0.1.4)
securerandom (0.3.1)
simpleidn (0.2.3)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2024.1)
tzinfo-data (1.2024.2)
tzinfo (>= 1.0.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.9.1)
unicode-display_width (1.8.0)
uri (0.13.0)
wdm (0.1.1)
uri (0.13.1)
wdm (0.2.0)
webrick (1.8.2)

PLATFORMS
x64-mingw-ucrt

DEPENDENCIES
github-pages (~> 231)
jekyll (~> 3.9.0)
github-pages (~> 232)
jekyll (~> 3.10.0)
jekyll-feed (~> 0.17)
kramdown-parser-gfm
minima (~> 2.0)
tzinfo (~> 2.0)
tzinfo-data
wdm (~> 0.1.0)
wdm (~> 0.2.0)

BUNDLED WITH
2.5.10
2.5.21
5 changes: 5 additions & 0 deletions docs/_data/api_items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@
path: fetch-a-single-payment-card
- title: Delete a payment card
path: delete-a-payment-card
- title: Permission templates
path: permission-templates
sub_paths:
- title: Fetch permission templates
path: fetch-permission-templates
- title: Projects
path: projects
sub_paths:
Expand Down
33 changes: 33 additions & 0 deletions docs/additional_info/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## 3.2.0 (15-Oct-2024)

* Added support for a new [`PermissionTemplates` endpoint](https://developers.lokalise.com/reference/list-all-permission-templates):

```elixir
{:ok, %PermissionTemplatesCollection{} = templates} = PermissionTemplates.all(team_id)

template = hd(templates)

template.id # => 1
template.role # => "Manager"
template.permissions # => ['branches_main_modify', ...]
template.description # => 'Manage project settings ...'
template.tag # => 'Full access'
template.tagColor # => 'green'
template.tagInfo # => ''
template.doesEnableAllReadOnlyLanguages # => true
```

* Added `role_id` attribute to the user group object. For example:

```elixir
group = TeamUserGroups.find(team_id, group_id)
group.role_id # => 5
```

* Added `role_id` attribute to the contributor object. For example:

```elixir
contributor = Contributors.find(project_id, contributor_id)
contributor.role_id # => 5
```

## 3.1.0 (14-May-2024)

* Add support for [cursor pagination](https://lokalise.github.io/elixir-lokalise-api/api/getting-started#cursor-pagination) for List keys and List translation endpoints:
Expand Down
22 changes: 22 additions & 0 deletions docs/api/permission-templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Permission templates

[Permission template attributes](https://developers.lokalise.com/reference/permission-template-object)

## Fetch permission templates

[API doc](https://developers.lokalise.com/reference/list-all-permission-templates)

```elixir
{:ok, %PermissionTemplatesCollection{} = templates} = PermissionTemplates.all(team_id)

template = hd(templates)

template.id # => 1
template.role # => "Manager"
template.permissions # => ['branches_main_modify', ...]
template.description # => 'Manage project settings ...'
template.tag # => 'Full access'
template.tagColor # => 'green'
template.tagInfo # => ''
template.doesEnableAllReadOnlyLanguages # => true
```
4 changes: 4 additions & 0 deletions lib/elixir_lokalise_api/collections/permission_templates.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
defmodule ElixirLokaliseApi.Collection.PermissionTemplates do
@moduledoc false
defstruct items: []
end
2 changes: 1 addition & 1 deletion lib/elixir_lokalise_api/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defmodule ElixirLokaliseApi.Config do
@doc """
Returns package version
"""
def version, do: from_env(:version, "3.1.0")
def version, do: from_env(:version, "3.2.0")

@doc """
Returns the base URL of the Lokalise APIv2 or OAuth2
Expand Down
13 changes: 13 additions & 0 deletions lib/elixir_lokalise_api/endpoints/permission_templates.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
defmodule ElixirLokaliseApi.PermissionTemplates do
@moduledoc """
Permission templates endpoint.
"""
@model ElixirLokaliseApi.Model.PermissionTemplate
@collection ElixirLokaliseApi.Collection.PermissionTemplates
@endpoint "teams/{!:team_id}/roles"
@data_key :roles
@singular_data_key nil
@parent_key :team_id

use ElixirLokaliseApi.DynamicResource, import: [:all2]
end
3 changes: 2 additions & 1 deletion lib/elixir_lokalise_api/models/contributor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ defmodule ElixirLokaliseApi.Model.Contributor do
is_admin: nil,
is_reviewer: nil,
languages: %{},
admin_rights: []
admin_rights: [],
role_id: nil
end
11 changes: 11 additions & 0 deletions lib/elixir_lokalise_api/models/permission_template.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
defmodule ElixirLokaliseApi.Model.PermissionTemplate do
@moduledoc false
defstruct id: nil,
role: nil,
permissions: [],
description: nil,
tag: nil,
tagColor: nil,
tagInfo: nil,
doesEnableAllReadOnlyLanguages: nil
end
3 changes: 2 additions & 1 deletion lib/elixir_lokalise_api/models/team_user_group.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ defmodule ElixirLokaliseApi.Model.TeamUserGroup do
created_at_timestamp: nil,
team_id: nil,
projects: [],
members: []
members: [],
role_id: nil
end
Loading

0 comments on commit b7c2853

Please sign in to comment.