-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
46 changed files
with
17,620 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es2021": true, | ||
"node": true, | ||
"jest/globals": true | ||
}, | ||
"extends": [ | ||
"airbnb-base" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"jest" | ||
], | ||
"rules": { | ||
"max-len": "off", | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"js": "never", | ||
"jsx": "never", | ||
"ts": "never", | ||
"tsx": "never" | ||
} | ||
] | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"extensions": [".js", ".jsx", ".ts", ".tsx"] | ||
} | ||
} | ||
}, | ||
"ignorePatterns": ["dist/*", "docs/*", "run.*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the "master" branch | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
- run: npm i | ||
- run: npm run cov | ||
- name: Coveralls GitHub Action | ||
uses: coverallsapp/github-action@1.1.3 | ||
with: | ||
github-token: ${{ secrets.github_token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Publish to NPM 📦 | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "14.x" | ||
registry-url: "https://registry.npmjs.org" | ||
- name: Install dependencies and build 🔧 | ||
run: npm ci && npm run build | ||
- name: Publish package on NPM 📦 | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
.DS_Store | ||
coverage | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
.DS_Store | ||
coverage | ||
docs | ||
tests | ||
.husky | ||
examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
|
||
## [1.0.0] - 2022-11-24 | ||
### Added | ||
- Initial SDK release version. | ||
- setUp method. | ||
- createOrder method. | ||
- getOrder method. | ||
- getFailedNotifications method. | ||
- Technical documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Ualá | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,103 @@ | ||
# ualabis-nodejs | ||
# Ualá API Checkout JavaScript SDK | ||
|
||
Official Javascript SDK for Ualá Bis API Checkout | ||
|
||
SDK Javascript oficial de Ualá Bis API Checkout | ||
|
||
<img align="right" src="https://nodejs.org/static/images/logo.svg" width="250"/> | ||
|
||
|
||
## Content | ||
- [Installation](#installation) | [Instalación](#instalación) | ||
- [Functions](#functions) | [Funciones](#funciones) | ||
- [Usage](#usage) | [Uso](#uso) | ||
- [API Checkout Docs](#api-checkout-docs) | ||
|
||
## Installation | ||
Install the package with: | ||
```sh | ||
npm install PENDING_TO_DEFINITION | ||
``` | ||
|
||
## Functions | ||
List of all functions: | ||
- setUp | ||
- createOrder | ||
- getOrder | ||
- getFailedNotifications | ||
|
||
## Usage | ||
The package needs to be configured with your account's secret key | ||
|
||
```js | ||
/** | ||
* if you use ES Modules instead of CommonJS use import statement | ||
* import UalaApiCheckout from 'PENDING_TO_DEFINITION'; | ||
*/ | ||
|
||
const UalaApiCheckout = require('PENDING_TO_DEFINITION'); | ||
|
||
await UalaApiCheckout.setUp({ | ||
userName: 'example_user', | ||
clientId: 'example_client_id', | ||
clientSecret: 'example_client_secret', | ||
isDev: true, | ||
}); | ||
|
||
const order = await UalaApiCheckout.createOrder({ | ||
amount: 10.2, | ||
description: 'test', | ||
callbackSuccess: 'https://www.google.com/search?q=failed', | ||
callbackFail: 'https://www.google.com/search?q=success', | ||
}); | ||
|
||
const generatedOrder = await UalaApiCheckout.getOrder(order.uuid); | ||
``` | ||
|
||
|
||
# Español | ||
|
||
## Instalación | ||
Instale el paquete con el siguiente comando: | ||
```sh | ||
npm install PENDING_TO_DEFINITION | ||
``` | ||
|
||
## Funciones | ||
Listado de todas las funciones: | ||
- setUp | ||
- createOrder | ||
- getOrder | ||
- getFailedNotifications | ||
|
||
## Uso | ||
Para hacer uso del SDK es necesario que configure sus credenciales como se muestra a continuación: | ||
|
||
```js | ||
/** | ||
* Si su código usa ES Modules y no CommonJS, importa el | ||
* paquete de la siguiente manera: | ||
* import UalaApiCheckout from 'PENDING_TO_DEFINITION'; | ||
*/ | ||
|
||
const UalaApiCheckout = require('PENDING_TO_DEFINITION'); | ||
|
||
await UalaApiCheckout.setUp({ | ||
userName: 'example_user', | ||
clientId: 'example_client_id', | ||
clientSecret: 'example_client_secret', | ||
isDev: true, | ||
}); | ||
|
||
const order = await UalaApiCheckout.createOrder({ | ||
amount: 10.2, | ||
description: 'test', | ||
callbackSuccess: 'https://www.google.com/search?q=failed', | ||
callbackFail: 'https://www.google.com/search?q=success', | ||
}); | ||
|
||
const generatedOrder = await UalaApiCheckout.getOrder(order.uuid); | ||
``` | ||
|
||
## API Checkout Docs | ||
Also you can show Api Checkout Documentation in https://developers.ualabis.com.ar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current', | ||
}, | ||
}, | ||
], | ||
'@babel/preset-typescript', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
:root { | ||
--light-hl-0: #000000; | ||
--dark-hl-0: #D4D4D4; | ||
--light-hl-1: #008000; | ||
--dark-hl-1: #6A9955; | ||
--light-hl-2: #0000FF; | ||
--dark-hl-2: #569CD6; | ||
--light-hl-3: #0070C1; | ||
--dark-hl-3: #4FC1FF; | ||
--light-hl-4: #795E26; | ||
--dark-hl-4: #DCDCAA; | ||
--light-hl-5: #A31515; | ||
--dark-hl-5: #CE9178; | ||
--light-hl-6: #AF00DB; | ||
--dark-hl-6: #C586C0; | ||
--light-hl-7: #001080; | ||
--dark-hl-7: #9CDCFE; | ||
--light-hl-8: #098658; | ||
--dark-hl-8: #B5CEA8; | ||
--light-code-background: #FFFFFF; | ||
--dark-code-background: #1E1E1E; | ||
} | ||
|
||
@media (prefers-color-scheme: light) { :root { | ||
--hl-0: var(--light-hl-0); | ||
--hl-1: var(--light-hl-1); | ||
--hl-2: var(--light-hl-2); | ||
--hl-3: var(--light-hl-3); | ||
--hl-4: var(--light-hl-4); | ||
--hl-5: var(--light-hl-5); | ||
--hl-6: var(--light-hl-6); | ||
--hl-7: var(--light-hl-7); | ||
--hl-8: var(--light-hl-8); | ||
--code-background: var(--light-code-background); | ||
} } | ||
|
||
@media (prefers-color-scheme: dark) { :root { | ||
--hl-0: var(--dark-hl-0); | ||
--hl-1: var(--dark-hl-1); | ||
--hl-2: var(--dark-hl-2); | ||
--hl-3: var(--dark-hl-3); | ||
--hl-4: var(--dark-hl-4); | ||
--hl-5: var(--dark-hl-5); | ||
--hl-6: var(--dark-hl-6); | ||
--hl-7: var(--dark-hl-7); | ||
--hl-8: var(--dark-hl-8); | ||
--code-background: var(--dark-code-background); | ||
} } | ||
|
||
:root[data-theme='light'] { | ||
--hl-0: var(--light-hl-0); | ||
--hl-1: var(--light-hl-1); | ||
--hl-2: var(--light-hl-2); | ||
--hl-3: var(--light-hl-3); | ||
--hl-4: var(--light-hl-4); | ||
--hl-5: var(--light-hl-5); | ||
--hl-6: var(--light-hl-6); | ||
--hl-7: var(--light-hl-7); | ||
--hl-8: var(--light-hl-8); | ||
--code-background: var(--light-code-background); | ||
} | ||
|
||
:root[data-theme='dark'] { | ||
--hl-0: var(--dark-hl-0); | ||
--hl-1: var(--dark-hl-1); | ||
--hl-2: var(--dark-hl-2); | ||
--hl-3: var(--dark-hl-3); | ||
--hl-4: var(--dark-hl-4); | ||
--hl-5: var(--dark-hl-5); | ||
--hl-6: var(--dark-hl-6); | ||
--hl-7: var(--dark-hl-7); | ||
--hl-8: var(--dark-hl-8); | ||
--code-background: var(--dark-code-background); | ||
} | ||
|
||
.hl-0 { color: var(--hl-0); } | ||
.hl-1 { color: var(--hl-1); } | ||
.hl-2 { color: var(--hl-2); } | ||
.hl-3 { color: var(--hl-3); } | ||
.hl-4 { color: var(--hl-4); } | ||
.hl-5 { color: var(--hl-5); } | ||
.hl-6 { color: var(--hl-6); } | ||
.hl-7 { color: var(--hl-7); } | ||
.hl-8 { color: var(--hl-8); } | ||
pre, code { background: var(--code-background); } |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.