Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 13 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ jobs:
uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v4

- name: Install dependencies
run: yarn install
uses: actions/setup-node@v3

- name: Compile
run: yarn build
run: yarn && yarn build

test:
runs-on: ubuntu-latest
Expand All @@ -27,42 +24,34 @@ jobs:
uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v4
uses: actions/setup-node@v3

- name: Install dependencies
run: yarn install

- name: Test
run: yarn test
- name: Compile
run: yarn && yarn test

publish:
needs: [ compile, test ]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v4

uses: actions/setup-node@v3
- name: Install dependencies
run: yarn install

- name: Build
run: yarn build

- name: Publish to npm
run: |
publish() { # use latest npm to ensure OIDC support
npx -y npm@latest publish "$@"
}
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
if [[ ${GITHUB_REF} == *alpha* ]]; then
publish --access public --tag alpha
npm publish --access public --tag alpha
elif [[ ${GITHUB_REF} == *beta* ]]; then
publish --access public --tag beta
npm publish --access public --tag beta
else
publish --access public
fi
npm publish --access public
fi
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40 changes: 20 additions & 20 deletions .mock/definition/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -657,15 +657,15 @@ types:
docs: Pagination object
properties:
limit:
type: optional<double>
type: optional<integer>
docs: The limit used for pagination
access: read-only
offset:
type: optional<double>
type: optional<integer>
docs: The offset used for pagination
access: read-only
total:
type: optional<double>
type: optional<integer>
docs: The total number of records
access: read-only
source:
Expand Down Expand Up @@ -1243,15 +1243,15 @@ types:
CollectionItemListPagination:
properties:
limit:
type: optional<double>
type: optional<integer>
docs: The limit specified in the request
default: 100
offset:
type: optional<double>
type: optional<integer>
docs: The offset specified for pagination
default: 0
total:
type: optional<double>
type: optional<integer>
docs: Total number of items in the collection
source:
openapi: ../../../openapi/referenced-specs/v2.yml
Expand Down Expand Up @@ -1563,15 +1563,15 @@ types:
CommentThreadListPagination:
properties:
limit:
type: double
type: integer
docs: The limit specified in the request (default 100)
default: 100
offset:
type: double
type: integer
docs: The offset specified for pagination
default: 0
total:
type: double
type: integer
docs: Total number of comment threads
source:
openapi: ../../../openapi/referenced-specs/v2.yml
Expand Down Expand Up @@ -1664,15 +1664,15 @@ types:
CommentReplyListPagination:
properties:
limit:
type: double
type: integer
docs: The limit specified in the request (default 100)
default: 100
offset:
type: double
type: integer
docs: The offset specified for pagination
default: 0
total:
type: double
type: integer
docs: Total number of comment replies
source:
openapi: ../../../openapi/referenced-specs/v2.yml
Expand Down Expand Up @@ -2881,18 +2881,18 @@ types:
docs: The list users results
properties:
count:
type: optional<double>
type: optional<integer>
docs: Number of users returned
limit:
type: optional<double>
type: optional<integer>
docs: The limit specified in the request
default: 10
offset:
type: optional<double>
type: optional<integer>
docs: The offset specified for pagination
default: 0
total:
type: optional<double>
type: optional<integer>
docs: Total number of users in the collection
users:
type: optional<list<User>>
Expand Down Expand Up @@ -2929,18 +2929,18 @@ types:
docs: The list access groups results
properties:
count:
type: optional<double>
type: optional<integer>
docs: Number of access groups returned
limit:
type: optional<double>
type: optional<integer>
docs: The limit specified in the request
default: 10
offset:
type: optional<double>
type: optional<integer>
docs: The offset specified for pagination
default: 0
total:
type: optional<double>
type: optional<integer>
docs: Total number of access groups in the collection
accessGroups:
type: optional<list<AccessGroup>>
Expand Down
8 changes: 4 additions & 4 deletions .mock/definition/accessGroups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ service:
name: AccessGroupsListRequest
query-parameters:
offset:
type: optional<double>
type: optional<integer>
docs: >-
Offset used for pagination if the results have more than limit
records
limit:
type: optional<double>
type: optional<integer>
docs: 'Maximum number of records to be returned (max limit: 100)'
sort:
type: optional<AccessGroupsListRequestSort>
Expand All @@ -63,8 +63,8 @@ service:
- path-parameters:
site_id: 580e63e98c9a982ac9b8b741
query-parameters:
offset: 1.1
limit: 1.1
offset: 1
limit: 1
sort: CreatedOn
response:
body:
Expand Down
8 changes: 4 additions & 4 deletions .mock/definition/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ service:
name: AssetsListRequest
query-parameters:
offset:
type: optional<double>
type: optional<integer>
docs: >-
Offset used for pagination if the results have more than limit
records
limit:
type: optional<double>
type: optional<integer>
docs: 'Maximum number of records to be returned (max limit: 100)'
response:
docs: Request was successful
Expand All @@ -46,8 +46,8 @@ service:
- path-parameters:
site_id: 580e63e98c9a982ac9b8b741
query-parameters:
offset: 1.1
limit: 1.1
offset: 1
limit: 1
response:
body:
assets:
Expand Down
16 changes: 8 additions & 8 deletions .mock/definition/collections/items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ service:
response. To query multiple locales, input a comma separated
string.
offset:
type: optional<double>
type: optional<integer>
docs: >-
Offset used for pagination if the results have more than limit
records
limit:
type: optional<double>
type: optional<integer>
docs: 'Maximum number of records to be returned (max limit: 100)'
name:
type: optional<string>
Expand Down Expand Up @@ -237,8 +237,8 @@ service:
collection_id: 580e63fc8c9a982ac9b8b745
query-parameters:
cmsLocaleId: cmsLocaleId
offset: 1.1
limit: 1.1
offset: 1
limit: 1
name: name
slug: slug
sortBy: lastPublished
Expand Down Expand Up @@ -696,12 +696,12 @@ service:
response. To query multiple locales, input a comma separated
string.
offset:
type: optional<double>
type: optional<integer>
docs: >-
Offset used for pagination if the results have more than limit
records
limit:
type: optional<double>
type: optional<integer>
docs: 'Maximum number of records to be returned (max limit: 100)'
name:
type: optional<string>
Expand Down Expand Up @@ -734,8 +734,8 @@ service:
collection_id: 580e63fc8c9a982ac9b8b745
query-parameters:
cmsLocaleId: cmsLocaleId
offset: 1.1
limit: 1.1
offset: 1
limit: 1
name: name
slug: slug
sortBy: lastPublished
Expand Down
24 changes: 12 additions & 12 deletions .mock/definition/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ service:
type: optional<string>
docs: Scope the operation to work on a specific branch.
limit:
type: optional<double>
type: optional<integer>
docs: 'Maximum number of records to be returned (max limit: 100)'
offset:
type: optional<double>
type: optional<integer>
docs: >-
Offset used for pagination if the results have more than limit
records
Expand All @@ -50,8 +50,8 @@ service:
site_id: 580e63e98c9a982ac9b8b741
query-parameters:
branchId: 68026fa68ef6dc744c75b833
limit: 1.1
offset: 1.1
limit: 1
offset: 1
response:
body:
components:
Expand Down Expand Up @@ -129,10 +129,10 @@ service:
type: optional<string>
docs: Scope the operation to work on a specific branch.
limit:
type: optional<double>
type: optional<integer>
docs: 'Maximum number of records to be returned (max limit: 100)'
offset:
type: optional<double>
type: optional<integer>
docs: >-
Offset used for pagination if the results have more than limit
records
Expand All @@ -153,8 +153,8 @@ service:
query-parameters:
localeId: 65427cf400e02b306eaa04a0
branchId: 68026fa68ef6dc744c75b833
limit: 1.1
offset: 1.1
limit: 1
offset: 1
response:
body:
componentId: 69118560-d0bc-15fc-bbf8-b8fe5f6535b5
Expand Down Expand Up @@ -357,10 +357,10 @@ service:
type: optional<string>
docs: Scope the operation to work on a specific branch.
limit:
type: optional<double>
type: optional<integer>
docs: 'Maximum number of records to be returned (max limit: 100)'
offset:
type: optional<double>
type: optional<integer>
docs: >-
Offset used for pagination if the results have more than limit
records
Expand All @@ -381,8 +381,8 @@ service:
query-parameters:
localeId: 65427cf400e02b306eaa04a0
branchId: 68026fa68ef6dc744c75b833
limit: 1.1
offset: 1.1
limit: 1
offset: 1
response:
body:
componentId: 658205daa3e8206a523b5ad4
Expand Down
Loading
Loading