355 Commits

Author SHA1 Message Date
Joseph Petersen
7e94e0bae1
fix: string regex 😭 2019-06-12 22:35:43 +02:00
Joseph Petersen
2b290b5fe0 fix: Use improved pagination regex to remove service url + leaf
fixes: #352
2019-06-12 16:15:11 -04:00
Daniel Rose
b53e997c16 refactor: Fix formatting 2019-06-12 15:06:03 +02:00
Daniel Rose
bd4e14107e fix: Fix error due to Typescript 3.5.1
encodeURIComponent() does not handle undefined.
To be precise, it actually does and returns undefined, but normally
that is an error, so the Typescript definition wants sensible input
values, i.e. string | number | boolean.
2019-06-12 15:06:02 +02:00
Daniel Rose
5474f0658f fix: Fix error due to Typescript 3.5.1
decamelizeKeys is defined to return Object, but Typescript 3.5.1 is a
bit stricter about Object and indexing properties. The correct fix
would need to be done in the type definition of humps.
2019-06-12 15:06:02 +02:00
Daniel Rose
da1a8f6a63 fix: Make package Typescript-conformant
Remove the typings directory.
Declare and use the types/interfaces in the various index.ts files.
This will produce a package that can be used by Typescript without
errors.

Remove the typings directory. Declare and use the types/interfaces in the various index.ts files.

This will produce a package that can be used by Typescript without errors.
2019-06-12 15:06:00 +02:00
Justin
45f963c82d Fixing some styling problems 2019-06-11 13:45:44 -04:00
Justin
38d50dc6e8 Add trailing slash to replace function 2019-06-11 13:05:08 -04:00
Justin
a2a612648a fix: Wrong endpoint being passed during pagination
fixes: #344
2019-06-11 12:55:09 -04:00
Justin Dalrymple
21c91c3408
Merge pull request #347 from jdalrymple/343-error-handling 2019-06-10 16:01:13 -04:00
Justin
dabcb3d0ac fix: Handle edge cases where content-type headers are missing or the content text is null
fixes: #343
2019-06-10 15:38:31 -04:00
Justin Dalrymple
3b031d722f
Merge pull request #346 from jdalrymple/343-error-handling 2019-06-10 14:10:19 -04:00
Justin
a54a6aec37 fix: Moving the error wrapper for the Ky Requester to be only around the Ky function request. Also checking to see if the error contains a response before looking for an error message.
fixes: #343
2019-06-10 13:42:35 -04:00
Justin Dalrymple
c6ff86d9c1
fix: Resource Discussion API was using the incorrect url to add a note (#345)
fixes: #342
2019-06-10 13:19:10 -04:00
mseyma
4d99902a10 feat: Add configurable request timeout (#341)
Adds the ability for the client to configure the timeout (default is still 300 seconds)
2019-06-08 17:14:51 -04:00
Justin
59f92869ca feat: Adding support for Container Registry API #274 2019-06-07 15:11:30 -04:00
Justin Dalrymple
9391f3559c
Merge pull request #337 from jdalrymple/336-showjobs-optional
fix: Make the options argument optional #336
2019-06-06 14:26:00 -04:00
Justin Dalrymple
fb2f0e8830
Merge branch 'master' into 295-releases 2019-06-06 14:07:16 -04:00
Justin
cf3c17e1f6 fix: Make the options argument optional #336 2019-06-06 13:33:22 -04:00
Justin
7191e81cd8 feat: Adding support for Releases API #295 2019-06-06 13:29:57 -04:00
Justin
d6a2248d36 feat: Adding support for ReleaseLinks API 2019-06-06 13:29:38 -04:00
Justin Dalrymple
4b51a11925
Merge pull request #323 from jdalrymple/refactor-repositoryfiles
refactor(RepositoryFiles): Missing a required argument from the function headers
2019-06-02 01:18:08 -04:00
rkrasiuk
28d3211d73 include path to typings dir in src/index 2019-06-01 10:05:11 -05:00
Justin
6d13df781f style: linting 2019-05-31 21:59:09 -04:00
Justin
e13c593c1c refactor(RepositoryFiles): Missing a required argument from the function headers
Commit messages are required for most of the RepositoryFile functions and was missing.

BREAKING CHANGE: create, edit and remove functions now require the commitMessage function argument
2019-05-31 21:58:24 -04:00
Justin
881b87b828 fix: Properly handling the response bodies returned from gitlab
Gitlab occasionally sends non json responses, and this was being lost in the current implementation of the RequestHelper KyRequester.

fixes: #320
2019-05-31 15:28:41 -04:00
Justin
356f056e5f chore(merge): Fixing some merge conflicts 2019-05-25 19:25:07 -04:00
Justin
d85a64edaf Merge branch 'next' 2019-05-25 19:07:39 -04:00
Justin
06593705f8 refactor: Updating typings on all functions to include additional options (ie sudo) 2019-05-25 19:05:28 -04:00
Justin
62e032b5e6 refactor: Triggers API required arguments exposed as optional
The Trigger API's pipeline function requires two new arguments, the ref and token but was previously exposed as optional arguments.

BREAKING CHANGE: Triggers API pipeline function requires the ref and token
2019-05-25 19:05:28 -04:00
Justin
7453779e60 refactor: Requiring content for the Note related APIs
The Note APIs were  checking the options argument for a body parameter misleading the user to believe it was optional.

BREAKING CHANGE: Notes now require a body argument
2019-05-25 19:05:28 -04:00
Justin
1ba912603f refactor: Expose optional parameters for the NotiicationSettings API
The NotificationSettings API was missing optional parameters in its function headers.

BREAKING CHANGE: NotificationSettings API edit function now takes one parameter, `options`
2019-05-25 19:05:28 -04:00
Justin
46a541ba8c refactor: Updating the MergeRequest API's pipeline function header
The function requires the mergerequestId but was exposing this parameter as optional.

BREAKING CHANGE: MergeRequest Pipelines require the mergeRequestId
2019-05-25 19:05:28 -04:00
Justin
e4ba731bea fix: Merge Request Approvals API did not match official API
Updated the function headers to match the official API.

BREAKING CHANGE: Updated Approvals API support to match https://docs.gitlab.com/ee/api/merge_request_approvals.html
2019-05-25 19:05:28 -04:00
Justin
97dd060ae1 refactor: Similar to the RepositoryFiles API changes
Removed the dependency on FS for better browser support.

BREAKING CHANGE: Removed dependency on FS. Now the Projects API takes in two arguments `projectId` and `content` as well as an option fileName argument
2019-05-25 19:05:28 -04:00
Justin
6ea90d32ce refactor: SystemHooks API function header updates
No point in having extra arguments in the function header if they arent required!

BREAKING CHANGE: Removed projectId from System Hooks API since it wasn't required
2019-05-25 19:05:28 -04:00
Justin
037f4ed1ee refactor: Removed Fs dependency for better browser support
Allowing the user to pass in the content directly removes this limitation.

BREAKING CHANGE: Added content as a required parameter for RepositoryFiles
2019-05-25 19:05:28 -04:00
Justin
aa6acb1d18 fix: #227 Fixing array syntax thanks to Lukas Eipert (https://github.com/leipert) 2019-05-25 19:05:28 -04:00
Justin
cea5a2bc5e fix: Fixing Todos support. If todoId was not passed, an undefined value would be introduced into the url 2019-05-25 19:05:28 -04:00
Justin
a7b29c17dc fix: ResourceAwardEmojis API wasn't properly filtering based on awardId 2019-05-25 19:05:28 -04:00
Justin
3f6d4095cd feat: Added LDAP support to the Groups API 2019-05-25 19:05:28 -04:00
Justin
ee6d490799 feat: Added the missing edit function to the Groups API 2019-05-25 19:05:28 -04:00
Justin
a79dabefea fix: Fixing typing structure and configuration 2019-05-25 19:05:28 -04:00
Justin
ee4730fbd0 fix: Removed xhr library in favour of ky, and switched request for got for a smaller package size and retry functionality 2019-05-25 19:05:28 -04:00
Justin
18effa2aca feat: Added the ability to add sudo to specific requests 2019-05-25 19:05:28 -04:00
Justin
5f97193dfd feat: Adding the option to conditionally camelize response body 2019-05-25 19:05:28 -04:00
Justin
03e85ef171 refactor: Removed inconsistent export strategies
Some exports were default ie Gitlab while others were named. This created some confusion and as such have been standardized as named exports.

BREAKING CHANGE: Changing everything to named exports for simplicity
2019-05-25 19:05:28 -04:00
Justin
26e2e52fad refactor: Removed the confusing url parameter from BaseService
It was interfering with an internally defined property which lead to confusion.

BREAKING CHANGE: Switching required initialization argument from 'url' to 'host'
2019-05-25 19:05:28 -04:00
Justin
3ad35f69fe refactor: Updating bundler function to follow the function name standard 2019-05-25 17:19:03 -04:00
Guilhem Bonnefille
4a8fd87176 Add function to erase artifacts only 2019-04-29 18:11:52 +02:00