@handsondigital/idplugger-admin 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +81 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +154 -0
- package/api.ts +3648 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +115 -0
- package/dist/api.d.ts +2664 -0
- package/dist/api.js +2463 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +86 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +253 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +57 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -0
- package/docs/AdminAuthRequestToken200Response.md +24 -0
- package/docs/AdminAuthRequestTokenRequest.md +20 -0
- package/docs/AuthApi.md +264 -0
- package/docs/AuthLogin200Response.md +24 -0
- package/docs/AuthLogin401Response.md +20 -0
- package/docs/AuthLoginByToken200Response.md +26 -0
- package/docs/AuthLoginByTokenRequest.md +22 -0
- package/docs/AuthLoginRequest.md +22 -0
- package/docs/AuthMe200Response.md +28 -0
- package/docs/AuthMe200ResponsePromotionsInner.md +22 -0
- package/docs/AuthRefreshTokenRequest.md +20 -0
- package/docs/Metrics200Response.md +24 -0
- package/docs/Metrics200ResponseUsersInner.md +22 -0
- package/docs/Metrics400Response.md +20 -0
- package/docs/MetricsApi.md +75 -0
- package/docs/PromotionApi.md +115 -0
- package/docs/PromotionPullConfiguration200Response.md +24 -0
- package/docs/PromotionPullConfiguration500Response.md +24 -0
- package/docs/PromotionPullConfigurationRequest.md +20 -0
- package/docs/PromotionPullConfigurationRequestDb.md +28 -0
- package/docs/PromotionStart200Response.md +28 -0
- package/docs/PromotionStart200ResponseUser.md +30 -0
- package/docs/PromotionStartRequest.md +24 -0
- package/docs/PromotionStartRequestUser.md +24 -0
- package/docs/RolesApi.md +376 -0
- package/docs/RolesAttachPermissions200Response.md +28 -0
- package/docs/RolesAttachPermissions422Response.md +20 -0
- package/docs/RolesAttachPermissionsRequest.md +20 -0
- package/docs/RolesDestroy400Response.md +20 -0
- package/docs/RolesIndex200Response.md +26 -0
- package/docs/RolesIndex200ResponseRolesInner.md +26 -0
- package/docs/RolesIndex500Response.md +20 -0
- package/docs/RolesPermissions200Response.md +28 -0
- package/docs/RolesShow200Response.md +28 -0
- package/docs/RolesShow200ResponsePermissionsInner.md +32 -0
- package/docs/RolesShow200ResponseRole.md +26 -0
- package/docs/RolesStore201Response.md +26 -0
- package/docs/RolesStore201ResponseRole.md +26 -0
- package/docs/RolesStore422Response.md +20 -0
- package/docs/RolesStoreRequest.md +24 -0
- package/docs/RolesUpdate200Response.md +26 -0
- package/docs/RolesUpdateRequest.md +24 -0
- package/docs/StepsAllow201Response.md +26 -0
- package/docs/StepsAllow409Response.md +26 -0
- package/docs/StepsAllowRequest.md +24 -0
- package/docs/StepsApi.md +167 -0
- package/docs/StepsIndex200Response.md +22 -0
- package/docs/StepsIndex200ResponseStepsValueValue.md +30 -0
- package/docs/StepsUnallow201Response.md +26 -0
- package/docs/StepsUnallow409Response.md +26 -0
- package/docs/UserApi.md +226 -0
- package/docs/UserGrantPermissions200Response.md +26 -0
- package/docs/UserGrantPermissions200ResponseUserInner.md +24 -0
- package/docs/UserGrantPermissions500Response.md +24 -0
- package/docs/UserGrantPermissionsRequest.md +24 -0
- package/docs/UserRegister200Response.md +26 -0
- package/docs/UserRegister200ResponseUserInner.md +28 -0
- package/docs/UserRegister500Response.md +24 -0
- package/docs/UserRegisterRequest.md +24 -0
- package/docs/UserShow200Response.md +26 -0
- package/docs/UserShow200ResponseUser.md +26 -0
- package/docs/UserShow404Response.md +24 -0
- package/docs/UserShow500Response.md +24 -0
- package/docs/UserUpdate200Response.md +26 -0
- package/docs/UserUpdate200ResponseUser.md +26 -0
- package/docs/UserUpdate404Response.md +24 -0
- package/docs/UserUpdate422Response.md +20 -0
- package/docs/UserUpdate500Response.md +24 -0
- package/docs/UserUpdateRequest.md +20 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/package.json +31 -0
- package/tsconfig.json +21 -0
package/dist/api.js
ADDED
|
@@ -0,0 +1,2463 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Plataforma de Promoção - Documentação da API
|
|
6
|
+
* # Introdução Bem-vindo à documentação oficial da API da Plataforma de Promoção IdPlugger exclusiva para administradores da API! Se você está procurando a documentação destinada ao cliente da Plataforma de Promoção IdPlugger [acesse clicando aqui!](/docs/v3/promotion)</a> # Sobre a API Esta API é baseada em REST, proporcionando uma arquitetura flexível e de fácil integração. # Começando Para começar a explorar e utilizar a API da Plataforma de Promoção IdPlugger, recomendamos que você siga os seguintes passos: 0. **Postman**: [Baixe a collection do postman](https://god.gw.postman.com/run-collection/13619232-20687020-3c58-488d-bd15-9f9d1a8164b1?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D13619232-20687020-3c58-488d-bd15-9f9d1a8164b1%26entityType%3Dcollection%26workspaceId%3Df86d7ea0-5224-4351-bf69-54ada2ca328d), instale o postman na sua máquina e importe a collection. 1. **Autenticação**: Obtenha suas credenciais de autenticação (\'username\' e \'password\') de administrador, para acessar a API. 2. **Explorar Endpoints**: Navegue pela lista de endpoints disponíveis e suas respectivas funcionalidades. 3. **Experimentar**: Utilize os exemplos de solicitação fornecidos para testar os endpoints e compreender melhor seu funcionamento. 4. **Integrar**: Integre a API da Plataforma de Promoção IdPlugger em seus próprios projetos e sistemas para aproveitar ao máximo suas capacidades. # Autenticação Todos os endpoints requerem token de autenticação válido, que pode ser obtido através de requisição à API enviando as credenciais obtidas. Este token é do tipo bearer e deve ser enviado no header da requisição no seguinte formato: | Header | Valor | | - | - | | Authorization | bearer `{token}` | Substitua `{token}` pelo token obtido na autenticação. IMPORTANTE: O bearer token tem um tempo de validade, o ideal é armazenar o bearer token e solicitar um novo token apenas quando o seu token expirar. A validade do token é enviada junto com o token na resposta do endpoint de autenticação. # Configurações de Promoção ## Pull Configurations O primeiro passo para configurar uma promoção na API é puxar a parametrização da promoção criada. Para isto, libere o servidor da API para acesso ao banco de dados da promoção e informe os dados de conexão através da rota [Pull Configuration](#/Promotion/App%5CHttp%5CControllers%5CAdmin%5CAdminController%3A%3ApullConfiguration) ## Steps Após puxar as configurações na etapa anterior, configure as steps da promoção. Steps são as partes de código que serão executadas para cada promoção. Cada promoção pode ter uma configuração diferente de steps. - Para consultar quais steps estão disponíveis, utilize [este endpoint](/docs/v3/setup/index.php#/Steps/App%5CHttp%5CControllers%5CStepsController%3A%3Aindex) - Para ativar steps em uma promoção, utilize [este endpoint](https://api.idplugger.com/docs/v3/setup/index.php#/Steps/App%5CHttp%5CControllers%5CStepsController%3A%3Aallow) - Para desativar steps em uma promoção, utilize [este endpoint](https://api.idplugger.com/docs/v3/setup/index.php#/Steps/App%5CHttp%5CControllers%5CStepsController%3A%3Aunallow) - Para consultar quais steps estão ativas, utilize o endpoint de ativação sem passar nenhuma step Algumas steps são configuradas por padrão ao fazer o pull configuration, para saber quais confira o parâmetro default na resposta do endpoint de consulta de steps. Este endpoint também retorna a descrição do que a step faz e se ela depende que outra esteja ativada ou desativada. ## Criar Usuário da API Para que um cliente possa utilizar a API, é necessário criar um usuário para ele. Para isto, após fazer o pull configuration e a parametrização de steps, utilize [este endpoint](#/User/App%5CHttp%5CControllers%5CAdmin%5CAdminController%3A%3Aregister) para criar um usuário da API. Este endpoint cria o usuário e retorna uma senha para este usuário. ## Permissões do usuário da API Após criar o usuário, é necessário dar as permissões para que ele possa atuar na promoção. Para isso, utilize [este endpoint](#/User/App%5CHttp%5CControllers%5CAdmin%5CAdminController%3A%3AgrantPermissions). Atenção: Selecione bem as permissões, deixando apenas as necessárias. ## Teste Utilize as credenciais do usuário criado para testar se a API está respondendo para a promoção configurada. # Postman Collection [<img src=\"https://run.pstmn.io/button.svg\" alt=\"Run In \" style=\"width: 128px; height: 32px;\">](https://god.gw.postman.com/run-collection/13619232-20687020-3c58-488d-bd15-9f9d1a8164b1?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D13619232-20687020-3c58-488d-bd15-9f9d1a8164b1%26entityType%3Dcollection%26workspaceId%3Df86d7ea0-5224-4351-bf69-54ada2ca328d)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 3.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
52
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
+
if (ar || !(i in from)) {
|
|
80
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
+
ar[i] = from[i];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
+
};
|
|
86
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.StepsApi = exports.StepsApiFactory = exports.StepsApiFp = exports.StepsApiAxiosParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = exports.RolesApiAxiosParamCreator = exports.PromotionApi = exports.PromotionApiFactory = exports.PromotionApiFp = exports.PromotionApiAxiosParamCreator = exports.MetricsApi = exports.MetricsApiFactory = exports.MetricsApiFp = exports.MetricsApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.PromotionStartRequestPermissionsEnum = exports.PromotionStart200ResponseUserPermissionsEnum = void 0;
|
|
88
|
+
var axios_1 = require("axios");
|
|
89
|
+
// Some imports not used depending on template conditions
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
var common_1 = require("./common");
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
var base_1 = require("./base");
|
|
94
|
+
exports.PromotionStart200ResponseUserPermissionsEnum = {
|
|
95
|
+
PromotionUsersIndex: 'promotion.users.index',
|
|
96
|
+
PromotionUsersCreate: 'promotion.users.create',
|
|
97
|
+
PromotionArticlesIndex: 'promotion.articles.index',
|
|
98
|
+
PromotionArticlesCreate: 'promotion.articles.create',
|
|
99
|
+
PromotionArticlesDelete: 'promotion.articles.delete',
|
|
100
|
+
PromotionAwardedsIndex: 'promotion.awardeds.index',
|
|
101
|
+
PromotionAwardsIndex: 'promotion.awards.index',
|
|
102
|
+
PromotionAwardsCreate: 'promotion.awards.create',
|
|
103
|
+
PromotionAwardsDelete: 'promotion.awards.delete',
|
|
104
|
+
PromotionBrandingIndex: 'promotion.branding.index',
|
|
105
|
+
PromotionBrandingCreate: 'promotion.branding.create',
|
|
106
|
+
PromotionDocumentRulesIndex: 'promotion.document_rules.index',
|
|
107
|
+
PromotionDocumentRulesCreate: 'promotion.document_rules.create',
|
|
108
|
+
PromotionFaqIndex: 'promotion.faq.index',
|
|
109
|
+
PromotionFaqCreate: 'promotion.faq.create',
|
|
110
|
+
PromotionFaqDelete: 'promotion.faq.delete',
|
|
111
|
+
PromotionLuckyNumbersIndex: 'promotion.lucky_numbers.index',
|
|
112
|
+
PromotionLuckyNumbersCreate: 'promotion.lucky_numbers.create',
|
|
113
|
+
PromotionLuckyNumbersUpdate: 'promotion.lucky_numbers.update',
|
|
114
|
+
PromotionLuckyNumbersDelete: 'promotion.lucky_numbers.delete',
|
|
115
|
+
PromotionRafflesIndex: 'promotion.raffles.index',
|
|
116
|
+
PromotionRafflesCreate: 'promotion.raffles.create',
|
|
117
|
+
PromotionRafflesDelete: 'promotion.raffles.delete',
|
|
118
|
+
PromotionTicketsIndex: 'promotion.tickets.index',
|
|
119
|
+
PromotionTicketsCreate: 'promotion.tickets.create',
|
|
120
|
+
PromotionTicketsDelete: 'promotion.tickets.delete',
|
|
121
|
+
PromotionBlacklistIndex: 'promotion.blacklist.index',
|
|
122
|
+
PromotionBlacklistCreate: 'promotion.blacklist.create',
|
|
123
|
+
PromotionBlacklistDelete: 'promotion.blacklist.delete',
|
|
124
|
+
PromotionOrdersIndex: 'promotion.orders.index',
|
|
125
|
+
PromotionOrdersCreate: 'promotion.orders.create',
|
|
126
|
+
PromotionCouponsIndex: 'promotion.coupons.index',
|
|
127
|
+
PromotionCouponsCreate: 'promotion.coupons.create',
|
|
128
|
+
PromotionCouponsDelete: 'promotion.coupons.delete',
|
|
129
|
+
PromotionConfigsIndex: 'promotion.configs.index',
|
|
130
|
+
PromotionUsersDelete: 'promotion.users.delete',
|
|
131
|
+
PromotionProductsIndex: 'promotion.products.index',
|
|
132
|
+
PromotionProductsCreate: 'promotion.products.create',
|
|
133
|
+
PromotionProductsDelete: 'promotion.products.delete',
|
|
134
|
+
PromotionStoresIndex: 'promotion.stores.index',
|
|
135
|
+
PromotionStoresCreate: 'promotion.stores.create',
|
|
136
|
+
PromotionStoresDelete: 'promotion.stores.delete',
|
|
137
|
+
PromotionConfigsWebhookConfig: 'promotion.configs.webhook_config'
|
|
138
|
+
};
|
|
139
|
+
exports.PromotionStartRequestPermissionsEnum = {
|
|
140
|
+
PromotionUsersIndex: 'promotion.users.index',
|
|
141
|
+
PromotionUsersCreate: 'promotion.users.create',
|
|
142
|
+
PromotionArticlesIndex: 'promotion.articles.index',
|
|
143
|
+
PromotionArticlesCreate: 'promotion.articles.create',
|
|
144
|
+
PromotionArticlesDelete: 'promotion.articles.delete',
|
|
145
|
+
PromotionAwardedsIndex: 'promotion.awardeds.index',
|
|
146
|
+
PromotionAwardsIndex: 'promotion.awards.index',
|
|
147
|
+
PromotionAwardsCreate: 'promotion.awards.create',
|
|
148
|
+
PromotionAwardsDelete: 'promotion.awards.delete',
|
|
149
|
+
PromotionBrandingIndex: 'promotion.branding.index',
|
|
150
|
+
PromotionBrandingCreate: 'promotion.branding.create',
|
|
151
|
+
PromotionDocumentRulesIndex: 'promotion.document_rules.index',
|
|
152
|
+
PromotionDocumentRulesCreate: 'promotion.document_rules.create',
|
|
153
|
+
PromotionFaqIndex: 'promotion.faq.index',
|
|
154
|
+
PromotionFaqCreate: 'promotion.faq.create',
|
|
155
|
+
PromotionFaqDelete: 'promotion.faq.delete',
|
|
156
|
+
PromotionLuckyNumbersIndex: 'promotion.lucky_numbers.index',
|
|
157
|
+
PromotionLuckyNumbersCreate: 'promotion.lucky_numbers.create',
|
|
158
|
+
PromotionLuckyNumbersUpdate: 'promotion.lucky_numbers.update',
|
|
159
|
+
PromotionLuckyNumbersDelete: 'promotion.lucky_numbers.delete',
|
|
160
|
+
PromotionRafflesIndex: 'promotion.raffles.index',
|
|
161
|
+
PromotionRafflesCreate: 'promotion.raffles.create',
|
|
162
|
+
PromotionRafflesDelete: 'promotion.raffles.delete',
|
|
163
|
+
PromotionTicketsIndex: 'promotion.tickets.index',
|
|
164
|
+
PromotionTicketsCreate: 'promotion.tickets.create',
|
|
165
|
+
PromotionTicketsDelete: 'promotion.tickets.delete',
|
|
166
|
+
PromotionBlacklistIndex: 'promotion.blacklist.index',
|
|
167
|
+
PromotionBlacklistCreate: 'promotion.blacklist.create',
|
|
168
|
+
PromotionBlacklistDelete: 'promotion.blacklist.delete',
|
|
169
|
+
PromotionOrdersIndex: 'promotion.orders.index',
|
|
170
|
+
PromotionOrdersCreate: 'promotion.orders.create',
|
|
171
|
+
PromotionCouponsIndex: 'promotion.coupons.index',
|
|
172
|
+
PromotionCouponsCreate: 'promotion.coupons.create',
|
|
173
|
+
PromotionCouponsDelete: 'promotion.coupons.delete',
|
|
174
|
+
PromotionConfigsIndex: 'promotion.configs.index',
|
|
175
|
+
PromotionUsersDelete: 'promotion.users.delete',
|
|
176
|
+
PromotionProductsIndex: 'promotion.products.index',
|
|
177
|
+
PromotionProductsCreate: 'promotion.products.create',
|
|
178
|
+
PromotionProductsDelete: 'promotion.products.delete',
|
|
179
|
+
PromotionStoresIndex: 'promotion.stores.index',
|
|
180
|
+
PromotionStoresCreate: 'promotion.stores.create',
|
|
181
|
+
PromotionStoresDelete: 'promotion.stores.delete',
|
|
182
|
+
PromotionConfigsWebhookConfig: 'promotion.configs.webhook_config'
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* AuthApi - axios parameter creator
|
|
186
|
+
* @export
|
|
187
|
+
*/
|
|
188
|
+
var AuthApiAxiosParamCreator = function (configuration) {
|
|
189
|
+
var _this = this;
|
|
190
|
+
return {
|
|
191
|
+
/**
|
|
192
|
+
*
|
|
193
|
+
* @summary Solicita envio de token de login por email
|
|
194
|
+
* @param {AdminAuthRequestTokenRequest} [adminAuthRequestTokenRequest]
|
|
195
|
+
* @param {*} [options] Override http request option.
|
|
196
|
+
* @throws {RequiredError}
|
|
197
|
+
*/
|
|
198
|
+
adminAuthRequestToken: function (adminAuthRequestTokenRequest_1) {
|
|
199
|
+
var args_1 = [];
|
|
200
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
201
|
+
args_1[_i - 1] = arguments[_i];
|
|
202
|
+
}
|
|
203
|
+
return __awaiter(_this, __spreadArray([adminAuthRequestTokenRequest_1], args_1, true), void 0, function (adminAuthRequestTokenRequest, options) {
|
|
204
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
205
|
+
if (options === void 0) { options = {}; }
|
|
206
|
+
return __generator(this, function (_a) {
|
|
207
|
+
localVarPath = "/admin/auth/request-token";
|
|
208
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
209
|
+
if (configuration) {
|
|
210
|
+
baseOptions = configuration.baseOptions;
|
|
211
|
+
}
|
|
212
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
213
|
+
localVarHeaderParameter = {};
|
|
214
|
+
localVarQueryParameter = {};
|
|
215
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
216
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
217
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
218
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
219
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adminAuthRequestTokenRequest, localVarRequestOptions, configuration);
|
|
220
|
+
return [2 /*return*/, {
|
|
221
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
222
|
+
options: localVarRequestOptions,
|
|
223
|
+
}];
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
},
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
* @summary Login na API
|
|
230
|
+
* @param {AuthLoginRequest} [authLoginRequest]
|
|
231
|
+
* @param {*} [options] Override http request option.
|
|
232
|
+
* @throws {RequiredError}
|
|
233
|
+
*/
|
|
234
|
+
authLogin: function (authLoginRequest_1) {
|
|
235
|
+
var args_1 = [];
|
|
236
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
237
|
+
args_1[_i - 1] = arguments[_i];
|
|
238
|
+
}
|
|
239
|
+
return __awaiter(_this, __spreadArray([authLoginRequest_1], args_1, true), void 0, function (authLoginRequest, options) {
|
|
240
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
241
|
+
if (options === void 0) { options = {}; }
|
|
242
|
+
return __generator(this, function (_a) {
|
|
243
|
+
localVarPath = "/v3/login";
|
|
244
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
245
|
+
if (configuration) {
|
|
246
|
+
baseOptions = configuration.baseOptions;
|
|
247
|
+
}
|
|
248
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
249
|
+
localVarHeaderParameter = {};
|
|
250
|
+
localVarQueryParameter = {};
|
|
251
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
252
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
253
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
254
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
255
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(authLoginRequest, localVarRequestOptions, configuration);
|
|
256
|
+
return [2 /*return*/, {
|
|
257
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
258
|
+
options: localVarRequestOptions,
|
|
259
|
+
}];
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
},
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
* @summary Login na API via e-mail e token
|
|
266
|
+
* @param {AuthLoginByTokenRequest} [authLoginByTokenRequest]
|
|
267
|
+
* @param {*} [options] Override http request option.
|
|
268
|
+
* @throws {RequiredError}
|
|
269
|
+
*/
|
|
270
|
+
authLoginByToken: function (authLoginByTokenRequest_1) {
|
|
271
|
+
var args_1 = [];
|
|
272
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
273
|
+
args_1[_i - 1] = arguments[_i];
|
|
274
|
+
}
|
|
275
|
+
return __awaiter(_this, __spreadArray([authLoginByTokenRequest_1], args_1, true), void 0, function (authLoginByTokenRequest, options) {
|
|
276
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
277
|
+
if (options === void 0) { options = {}; }
|
|
278
|
+
return __generator(this, function (_a) {
|
|
279
|
+
localVarPath = "/admin/auth/login";
|
|
280
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
281
|
+
if (configuration) {
|
|
282
|
+
baseOptions = configuration.baseOptions;
|
|
283
|
+
}
|
|
284
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
285
|
+
localVarHeaderParameter = {};
|
|
286
|
+
localVarQueryParameter = {};
|
|
287
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
288
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
289
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
290
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
291
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(authLoginByTokenRequest, localVarRequestOptions, configuration);
|
|
292
|
+
return [2 /*return*/, {
|
|
293
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
294
|
+
options: localVarRequestOptions,
|
|
295
|
+
}];
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
},
|
|
299
|
+
/**
|
|
300
|
+
*
|
|
301
|
+
* @summary Dados na API
|
|
302
|
+
* @param {*} [options] Override http request option.
|
|
303
|
+
* @throws {RequiredError}
|
|
304
|
+
*/
|
|
305
|
+
authMe: function () {
|
|
306
|
+
var args_1 = [];
|
|
307
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
308
|
+
args_1[_i] = arguments[_i];
|
|
309
|
+
}
|
|
310
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
311
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
312
|
+
if (options === void 0) { options = {}; }
|
|
313
|
+
return __generator(this, function (_a) {
|
|
314
|
+
switch (_a.label) {
|
|
315
|
+
case 0:
|
|
316
|
+
localVarPath = "/v3/me";
|
|
317
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
318
|
+
if (configuration) {
|
|
319
|
+
baseOptions = configuration.baseOptions;
|
|
320
|
+
}
|
|
321
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
322
|
+
localVarHeaderParameter = {};
|
|
323
|
+
localVarQueryParameter = {};
|
|
324
|
+
// authentication bearerAuth required
|
|
325
|
+
// http bearer authentication required
|
|
326
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
327
|
+
case 1:
|
|
328
|
+
// authentication bearerAuth required
|
|
329
|
+
// http bearer authentication required
|
|
330
|
+
_a.sent();
|
|
331
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
332
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
333
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
334
|
+
return [2 /*return*/, {
|
|
335
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
336
|
+
options: localVarRequestOptions,
|
|
337
|
+
}];
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
},
|
|
342
|
+
/**
|
|
343
|
+
*
|
|
344
|
+
* @summary Renova o do token de autenticação
|
|
345
|
+
* @param {AuthRefreshTokenRequest} [authRefreshTokenRequest]
|
|
346
|
+
* @param {*} [options] Override http request option.
|
|
347
|
+
* @throws {RequiredError}
|
|
348
|
+
*/
|
|
349
|
+
authRefreshToken: function (authRefreshTokenRequest_1) {
|
|
350
|
+
var args_1 = [];
|
|
351
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
352
|
+
args_1[_i - 1] = arguments[_i];
|
|
353
|
+
}
|
|
354
|
+
return __awaiter(_this, __spreadArray([authRefreshTokenRequest_1], args_1, true), void 0, function (authRefreshTokenRequest, options) {
|
|
355
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
356
|
+
if (options === void 0) { options = {}; }
|
|
357
|
+
return __generator(this, function (_a) {
|
|
358
|
+
localVarPath = "/admin/auth/refresh";
|
|
359
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
360
|
+
if (configuration) {
|
|
361
|
+
baseOptions = configuration.baseOptions;
|
|
362
|
+
}
|
|
363
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
364
|
+
localVarHeaderParameter = {};
|
|
365
|
+
localVarQueryParameter = {};
|
|
366
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
367
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
368
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
369
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
370
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(authRefreshTokenRequest, localVarRequestOptions, configuration);
|
|
371
|
+
return [2 /*return*/, {
|
|
372
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
373
|
+
options: localVarRequestOptions,
|
|
374
|
+
}];
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
},
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
|
|
381
|
+
/**
|
|
382
|
+
* AuthApi - functional programming interface
|
|
383
|
+
* @export
|
|
384
|
+
*/
|
|
385
|
+
var AuthApiFp = function (configuration) {
|
|
386
|
+
var localVarAxiosParamCreator = (0, exports.AuthApiAxiosParamCreator)(configuration);
|
|
387
|
+
return {
|
|
388
|
+
/**
|
|
389
|
+
*
|
|
390
|
+
* @summary Solicita envio de token de login por email
|
|
391
|
+
* @param {AdminAuthRequestTokenRequest} [adminAuthRequestTokenRequest]
|
|
392
|
+
* @param {*} [options] Override http request option.
|
|
393
|
+
* @throws {RequiredError}
|
|
394
|
+
*/
|
|
395
|
+
adminAuthRequestToken: function (adminAuthRequestTokenRequest, options) {
|
|
396
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
397
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
398
|
+
var _a, _b, _c;
|
|
399
|
+
return __generator(this, function (_d) {
|
|
400
|
+
switch (_d.label) {
|
|
401
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminAuthRequestToken(adminAuthRequestTokenRequest, options)];
|
|
402
|
+
case 1:
|
|
403
|
+
localVarAxiosArgs = _d.sent();
|
|
404
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
405
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.adminAuthRequestToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
406
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
});
|
|
410
|
+
},
|
|
411
|
+
/**
|
|
412
|
+
*
|
|
413
|
+
* @summary Login na API
|
|
414
|
+
* @param {AuthLoginRequest} [authLoginRequest]
|
|
415
|
+
* @param {*} [options] Override http request option.
|
|
416
|
+
* @throws {RequiredError}
|
|
417
|
+
*/
|
|
418
|
+
authLogin: function (authLoginRequest, options) {
|
|
419
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
420
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
421
|
+
var _a, _b, _c;
|
|
422
|
+
return __generator(this, function (_d) {
|
|
423
|
+
switch (_d.label) {
|
|
424
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.authLogin(authLoginRequest, options)];
|
|
425
|
+
case 1:
|
|
426
|
+
localVarAxiosArgs = _d.sent();
|
|
427
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
428
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.authLogin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
429
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
},
|
|
434
|
+
/**
|
|
435
|
+
*
|
|
436
|
+
* @summary Login na API via e-mail e token
|
|
437
|
+
* @param {AuthLoginByTokenRequest} [authLoginByTokenRequest]
|
|
438
|
+
* @param {*} [options] Override http request option.
|
|
439
|
+
* @throws {RequiredError}
|
|
440
|
+
*/
|
|
441
|
+
authLoginByToken: function (authLoginByTokenRequest, options) {
|
|
442
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
443
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
444
|
+
var _a, _b, _c;
|
|
445
|
+
return __generator(this, function (_d) {
|
|
446
|
+
switch (_d.label) {
|
|
447
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.authLoginByToken(authLoginByTokenRequest, options)];
|
|
448
|
+
case 1:
|
|
449
|
+
localVarAxiosArgs = _d.sent();
|
|
450
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
451
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.authLoginByToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
452
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
},
|
|
457
|
+
/**
|
|
458
|
+
*
|
|
459
|
+
* @summary Dados na API
|
|
460
|
+
* @param {*} [options] Override http request option.
|
|
461
|
+
* @throws {RequiredError}
|
|
462
|
+
*/
|
|
463
|
+
authMe: function (options) {
|
|
464
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
465
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
466
|
+
var _a, _b, _c;
|
|
467
|
+
return __generator(this, function (_d) {
|
|
468
|
+
switch (_d.label) {
|
|
469
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.authMe(options)];
|
|
470
|
+
case 1:
|
|
471
|
+
localVarAxiosArgs = _d.sent();
|
|
472
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
473
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.authMe']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
474
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
},
|
|
479
|
+
/**
|
|
480
|
+
*
|
|
481
|
+
* @summary Renova o do token de autenticação
|
|
482
|
+
* @param {AuthRefreshTokenRequest} [authRefreshTokenRequest]
|
|
483
|
+
* @param {*} [options] Override http request option.
|
|
484
|
+
* @throws {RequiredError}
|
|
485
|
+
*/
|
|
486
|
+
authRefreshToken: function (authRefreshTokenRequest, options) {
|
|
487
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
488
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
489
|
+
var _a, _b, _c;
|
|
490
|
+
return __generator(this, function (_d) {
|
|
491
|
+
switch (_d.label) {
|
|
492
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.authRefreshToken(authRefreshTokenRequest, options)];
|
|
493
|
+
case 1:
|
|
494
|
+
localVarAxiosArgs = _d.sent();
|
|
495
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
496
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.authRefreshToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
497
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
});
|
|
501
|
+
},
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
exports.AuthApiFp = AuthApiFp;
|
|
505
|
+
/**
|
|
506
|
+
* AuthApi - factory interface
|
|
507
|
+
* @export
|
|
508
|
+
*/
|
|
509
|
+
var AuthApiFactory = function (configuration, basePath, axios) {
|
|
510
|
+
var localVarFp = (0, exports.AuthApiFp)(configuration);
|
|
511
|
+
return {
|
|
512
|
+
/**
|
|
513
|
+
*
|
|
514
|
+
* @summary Solicita envio de token de login por email
|
|
515
|
+
* @param {AdminAuthRequestTokenRequest} [adminAuthRequestTokenRequest]
|
|
516
|
+
* @param {*} [options] Override http request option.
|
|
517
|
+
* @throws {RequiredError}
|
|
518
|
+
*/
|
|
519
|
+
adminAuthRequestToken: function (adminAuthRequestTokenRequest, options) {
|
|
520
|
+
return localVarFp.adminAuthRequestToken(adminAuthRequestTokenRequest, options).then(function (request) { return request(axios, basePath); });
|
|
521
|
+
},
|
|
522
|
+
/**
|
|
523
|
+
*
|
|
524
|
+
* @summary Login na API
|
|
525
|
+
* @param {AuthLoginRequest} [authLoginRequest]
|
|
526
|
+
* @param {*} [options] Override http request option.
|
|
527
|
+
* @throws {RequiredError}
|
|
528
|
+
*/
|
|
529
|
+
authLogin: function (authLoginRequest, options) {
|
|
530
|
+
return localVarFp.authLogin(authLoginRequest, options).then(function (request) { return request(axios, basePath); });
|
|
531
|
+
},
|
|
532
|
+
/**
|
|
533
|
+
*
|
|
534
|
+
* @summary Login na API via e-mail e token
|
|
535
|
+
* @param {AuthLoginByTokenRequest} [authLoginByTokenRequest]
|
|
536
|
+
* @param {*} [options] Override http request option.
|
|
537
|
+
* @throws {RequiredError}
|
|
538
|
+
*/
|
|
539
|
+
authLoginByToken: function (authLoginByTokenRequest, options) {
|
|
540
|
+
return localVarFp.authLoginByToken(authLoginByTokenRequest, options).then(function (request) { return request(axios, basePath); });
|
|
541
|
+
},
|
|
542
|
+
/**
|
|
543
|
+
*
|
|
544
|
+
* @summary Dados na API
|
|
545
|
+
* @param {*} [options] Override http request option.
|
|
546
|
+
* @throws {RequiredError}
|
|
547
|
+
*/
|
|
548
|
+
authMe: function (options) {
|
|
549
|
+
return localVarFp.authMe(options).then(function (request) { return request(axios, basePath); });
|
|
550
|
+
},
|
|
551
|
+
/**
|
|
552
|
+
*
|
|
553
|
+
* @summary Renova o do token de autenticação
|
|
554
|
+
* @param {AuthRefreshTokenRequest} [authRefreshTokenRequest]
|
|
555
|
+
* @param {*} [options] Override http request option.
|
|
556
|
+
* @throws {RequiredError}
|
|
557
|
+
*/
|
|
558
|
+
authRefreshToken: function (authRefreshTokenRequest, options) {
|
|
559
|
+
return localVarFp.authRefreshToken(authRefreshTokenRequest, options).then(function (request) { return request(axios, basePath); });
|
|
560
|
+
},
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
exports.AuthApiFactory = AuthApiFactory;
|
|
564
|
+
/**
|
|
565
|
+
* AuthApi - object-oriented interface
|
|
566
|
+
* @export
|
|
567
|
+
* @class AuthApi
|
|
568
|
+
* @extends {BaseAPI}
|
|
569
|
+
*/
|
|
570
|
+
var AuthApi = /** @class */ (function (_super) {
|
|
571
|
+
__extends(AuthApi, _super);
|
|
572
|
+
function AuthApi() {
|
|
573
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
*
|
|
577
|
+
* @summary Solicita envio de token de login por email
|
|
578
|
+
* @param {AdminAuthRequestTokenRequest} [adminAuthRequestTokenRequest]
|
|
579
|
+
* @param {*} [options] Override http request option.
|
|
580
|
+
* @throws {RequiredError}
|
|
581
|
+
* @memberof AuthApi
|
|
582
|
+
*/
|
|
583
|
+
AuthApi.prototype.adminAuthRequestToken = function (adminAuthRequestTokenRequest, options) {
|
|
584
|
+
var _this = this;
|
|
585
|
+
return (0, exports.AuthApiFp)(this.configuration).adminAuthRequestToken(adminAuthRequestTokenRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
586
|
+
};
|
|
587
|
+
/**
|
|
588
|
+
*
|
|
589
|
+
* @summary Login na API
|
|
590
|
+
* @param {AuthLoginRequest} [authLoginRequest]
|
|
591
|
+
* @param {*} [options] Override http request option.
|
|
592
|
+
* @throws {RequiredError}
|
|
593
|
+
* @memberof AuthApi
|
|
594
|
+
*/
|
|
595
|
+
AuthApi.prototype.authLogin = function (authLoginRequest, options) {
|
|
596
|
+
var _this = this;
|
|
597
|
+
return (0, exports.AuthApiFp)(this.configuration).authLogin(authLoginRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
598
|
+
};
|
|
599
|
+
/**
|
|
600
|
+
*
|
|
601
|
+
* @summary Login na API via e-mail e token
|
|
602
|
+
* @param {AuthLoginByTokenRequest} [authLoginByTokenRequest]
|
|
603
|
+
* @param {*} [options] Override http request option.
|
|
604
|
+
* @throws {RequiredError}
|
|
605
|
+
* @memberof AuthApi
|
|
606
|
+
*/
|
|
607
|
+
AuthApi.prototype.authLoginByToken = function (authLoginByTokenRequest, options) {
|
|
608
|
+
var _this = this;
|
|
609
|
+
return (0, exports.AuthApiFp)(this.configuration).authLoginByToken(authLoginByTokenRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
610
|
+
};
|
|
611
|
+
/**
|
|
612
|
+
*
|
|
613
|
+
* @summary Dados na API
|
|
614
|
+
* @param {*} [options] Override http request option.
|
|
615
|
+
* @throws {RequiredError}
|
|
616
|
+
* @memberof AuthApi
|
|
617
|
+
*/
|
|
618
|
+
AuthApi.prototype.authMe = function (options) {
|
|
619
|
+
var _this = this;
|
|
620
|
+
return (0, exports.AuthApiFp)(this.configuration).authMe(options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
621
|
+
};
|
|
622
|
+
/**
|
|
623
|
+
*
|
|
624
|
+
* @summary Renova o do token de autenticação
|
|
625
|
+
* @param {AuthRefreshTokenRequest} [authRefreshTokenRequest]
|
|
626
|
+
* @param {*} [options] Override http request option.
|
|
627
|
+
* @throws {RequiredError}
|
|
628
|
+
* @memberof AuthApi
|
|
629
|
+
*/
|
|
630
|
+
AuthApi.prototype.authRefreshToken = function (authRefreshTokenRequest, options) {
|
|
631
|
+
var _this = this;
|
|
632
|
+
return (0, exports.AuthApiFp)(this.configuration).authRefreshToken(authRefreshTokenRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
633
|
+
};
|
|
634
|
+
return AuthApi;
|
|
635
|
+
}(base_1.BaseAPI));
|
|
636
|
+
exports.AuthApi = AuthApi;
|
|
637
|
+
/**
|
|
638
|
+
* MetricsApi - axios parameter creator
|
|
639
|
+
* @export
|
|
640
|
+
*/
|
|
641
|
+
var MetricsApiAxiosParamCreator = function (configuration) {
|
|
642
|
+
var _this = this;
|
|
643
|
+
return {
|
|
644
|
+
/**
|
|
645
|
+
*
|
|
646
|
+
* @summary Devolve as métricas da promoção
|
|
647
|
+
* @param {string} promotionId ID da promoção
|
|
648
|
+
* @param {Array<string>} keys Chaves das métricas que deseja consultar. Exemplo: `keys[]=users&keys[]=coupons&keys[]=luckyNumbers`
|
|
649
|
+
* @param {string} [startDate] Data inicial para filtrar as métricas
|
|
650
|
+
* @param {string} [endDate] Data final para filtrar as métricas
|
|
651
|
+
* @param {number} [limit] Limite de resultados
|
|
652
|
+
* @param {string} [resolution] Resolução das métricas. Exemplo: `minute`, `hour`, `day`
|
|
653
|
+
* @param {*} [options] Override http request option.
|
|
654
|
+
* @throws {RequiredError}
|
|
655
|
+
*/
|
|
656
|
+
metrics: function (promotionId_1, keys_1, startDate_1, endDate_1, limit_1, resolution_1) {
|
|
657
|
+
var args_1 = [];
|
|
658
|
+
for (var _i = 6; _i < arguments.length; _i++) {
|
|
659
|
+
args_1[_i - 6] = arguments[_i];
|
|
660
|
+
}
|
|
661
|
+
return __awaiter(_this, __spreadArray([promotionId_1, keys_1, startDate_1, endDate_1, limit_1, resolution_1], args_1, true), void 0, function (promotionId, keys, startDate, endDate, limit, resolution, options) {
|
|
662
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
663
|
+
if (options === void 0) { options = {}; }
|
|
664
|
+
return __generator(this, function (_a) {
|
|
665
|
+
switch (_a.label) {
|
|
666
|
+
case 0:
|
|
667
|
+
// verify required parameter 'promotionId' is not null or undefined
|
|
668
|
+
(0, common_1.assertParamExists)('metrics', 'promotionId', promotionId);
|
|
669
|
+
// verify required parameter 'keys' is not null or undefined
|
|
670
|
+
(0, common_1.assertParamExists)('metrics', 'keys', keys);
|
|
671
|
+
localVarPath = "/v3/metrics";
|
|
672
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
673
|
+
if (configuration) {
|
|
674
|
+
baseOptions = configuration.baseOptions;
|
|
675
|
+
}
|
|
676
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
677
|
+
localVarHeaderParameter = {};
|
|
678
|
+
localVarQueryParameter = {};
|
|
679
|
+
// authentication bearerAuth required
|
|
680
|
+
// http bearer authentication required
|
|
681
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
682
|
+
case 1:
|
|
683
|
+
// authentication bearerAuth required
|
|
684
|
+
// http bearer authentication required
|
|
685
|
+
_a.sent();
|
|
686
|
+
if (promotionId !== undefined) {
|
|
687
|
+
localVarQueryParameter['promotion_id'] = promotionId;
|
|
688
|
+
}
|
|
689
|
+
if (keys) {
|
|
690
|
+
localVarQueryParameter['keys'] = keys;
|
|
691
|
+
}
|
|
692
|
+
if (startDate !== undefined) {
|
|
693
|
+
localVarQueryParameter['start_date'] = startDate;
|
|
694
|
+
}
|
|
695
|
+
if (endDate !== undefined) {
|
|
696
|
+
localVarQueryParameter['end_date'] = endDate;
|
|
697
|
+
}
|
|
698
|
+
if (limit !== undefined) {
|
|
699
|
+
localVarQueryParameter['limit'] = limit;
|
|
700
|
+
}
|
|
701
|
+
if (resolution !== undefined) {
|
|
702
|
+
localVarQueryParameter['resolution'] = resolution;
|
|
703
|
+
}
|
|
704
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
705
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
706
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
707
|
+
return [2 /*return*/, {
|
|
708
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
709
|
+
options: localVarRequestOptions,
|
|
710
|
+
}];
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
});
|
|
714
|
+
},
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
exports.MetricsApiAxiosParamCreator = MetricsApiAxiosParamCreator;
|
|
718
|
+
/**
|
|
719
|
+
* MetricsApi - functional programming interface
|
|
720
|
+
* @export
|
|
721
|
+
*/
|
|
722
|
+
var MetricsApiFp = function (configuration) {
|
|
723
|
+
var localVarAxiosParamCreator = (0, exports.MetricsApiAxiosParamCreator)(configuration);
|
|
724
|
+
return {
|
|
725
|
+
/**
|
|
726
|
+
*
|
|
727
|
+
* @summary Devolve as métricas da promoção
|
|
728
|
+
* @param {string} promotionId ID da promoção
|
|
729
|
+
* @param {Array<string>} keys Chaves das métricas que deseja consultar. Exemplo: `keys[]=users&keys[]=coupons&keys[]=luckyNumbers`
|
|
730
|
+
* @param {string} [startDate] Data inicial para filtrar as métricas
|
|
731
|
+
* @param {string} [endDate] Data final para filtrar as métricas
|
|
732
|
+
* @param {number} [limit] Limite de resultados
|
|
733
|
+
* @param {string} [resolution] Resolução das métricas. Exemplo: `minute`, `hour`, `day`
|
|
734
|
+
* @param {*} [options] Override http request option.
|
|
735
|
+
* @throws {RequiredError}
|
|
736
|
+
*/
|
|
737
|
+
metrics: function (promotionId, keys, startDate, endDate, limit, resolution, options) {
|
|
738
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
739
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
740
|
+
var _a, _b, _c;
|
|
741
|
+
return __generator(this, function (_d) {
|
|
742
|
+
switch (_d.label) {
|
|
743
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.metrics(promotionId, keys, startDate, endDate, limit, resolution, options)];
|
|
744
|
+
case 1:
|
|
745
|
+
localVarAxiosArgs = _d.sent();
|
|
746
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
747
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MetricsApi.metrics']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
748
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
});
|
|
752
|
+
},
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
exports.MetricsApiFp = MetricsApiFp;
|
|
756
|
+
/**
|
|
757
|
+
* MetricsApi - factory interface
|
|
758
|
+
* @export
|
|
759
|
+
*/
|
|
760
|
+
var MetricsApiFactory = function (configuration, basePath, axios) {
|
|
761
|
+
var localVarFp = (0, exports.MetricsApiFp)(configuration);
|
|
762
|
+
return {
|
|
763
|
+
/**
|
|
764
|
+
*
|
|
765
|
+
* @summary Devolve as métricas da promoção
|
|
766
|
+
* @param {string} promotionId ID da promoção
|
|
767
|
+
* @param {Array<string>} keys Chaves das métricas que deseja consultar. Exemplo: `keys[]=users&keys[]=coupons&keys[]=luckyNumbers`
|
|
768
|
+
* @param {string} [startDate] Data inicial para filtrar as métricas
|
|
769
|
+
* @param {string} [endDate] Data final para filtrar as métricas
|
|
770
|
+
* @param {number} [limit] Limite de resultados
|
|
771
|
+
* @param {string} [resolution] Resolução das métricas. Exemplo: `minute`, `hour`, `day`
|
|
772
|
+
* @param {*} [options] Override http request option.
|
|
773
|
+
* @throws {RequiredError}
|
|
774
|
+
*/
|
|
775
|
+
metrics: function (promotionId, keys, startDate, endDate, limit, resolution, options) {
|
|
776
|
+
return localVarFp.metrics(promotionId, keys, startDate, endDate, limit, resolution, options).then(function (request) { return request(axios, basePath); });
|
|
777
|
+
},
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
exports.MetricsApiFactory = MetricsApiFactory;
|
|
781
|
+
/**
|
|
782
|
+
* MetricsApi - object-oriented interface
|
|
783
|
+
* @export
|
|
784
|
+
* @class MetricsApi
|
|
785
|
+
* @extends {BaseAPI}
|
|
786
|
+
*/
|
|
787
|
+
var MetricsApi = /** @class */ (function (_super) {
|
|
788
|
+
__extends(MetricsApi, _super);
|
|
789
|
+
function MetricsApi() {
|
|
790
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
*
|
|
794
|
+
* @summary Devolve as métricas da promoção
|
|
795
|
+
* @param {string} promotionId ID da promoção
|
|
796
|
+
* @param {Array<string>} keys Chaves das métricas que deseja consultar. Exemplo: `keys[]=users&keys[]=coupons&keys[]=luckyNumbers`
|
|
797
|
+
* @param {string} [startDate] Data inicial para filtrar as métricas
|
|
798
|
+
* @param {string} [endDate] Data final para filtrar as métricas
|
|
799
|
+
* @param {number} [limit] Limite de resultados
|
|
800
|
+
* @param {string} [resolution] Resolução das métricas. Exemplo: `minute`, `hour`, `day`
|
|
801
|
+
* @param {*} [options] Override http request option.
|
|
802
|
+
* @throws {RequiredError}
|
|
803
|
+
* @memberof MetricsApi
|
|
804
|
+
*/
|
|
805
|
+
MetricsApi.prototype.metrics = function (promotionId, keys, startDate, endDate, limit, resolution, options) {
|
|
806
|
+
var _this = this;
|
|
807
|
+
return (0, exports.MetricsApiFp)(this.configuration).metrics(promotionId, keys, startDate, endDate, limit, resolution, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
808
|
+
};
|
|
809
|
+
return MetricsApi;
|
|
810
|
+
}(base_1.BaseAPI));
|
|
811
|
+
exports.MetricsApi = MetricsApi;
|
|
812
|
+
/**
|
|
813
|
+
* PromotionApi - axios parameter creator
|
|
814
|
+
* @export
|
|
815
|
+
*/
|
|
816
|
+
var PromotionApiAxiosParamCreator = function (configuration) {
|
|
817
|
+
var _this = this;
|
|
818
|
+
return {
|
|
819
|
+
/**
|
|
820
|
+
*
|
|
821
|
+
* @summary Adicionar/Atualizar configurações de uma promoção ao orquestrador
|
|
822
|
+
* @param {PromotionPullConfigurationRequest} [promotionPullConfigurationRequest]
|
|
823
|
+
* @param {*} [options] Override http request option.
|
|
824
|
+
* @throws {RequiredError}
|
|
825
|
+
*/
|
|
826
|
+
promotionPullConfiguration: function (promotionPullConfigurationRequest_1) {
|
|
827
|
+
var args_1 = [];
|
|
828
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
829
|
+
args_1[_i - 1] = arguments[_i];
|
|
830
|
+
}
|
|
831
|
+
return __awaiter(_this, __spreadArray([promotionPullConfigurationRequest_1], args_1, true), void 0, function (promotionPullConfigurationRequest, options) {
|
|
832
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
833
|
+
if (options === void 0) { options = {}; }
|
|
834
|
+
return __generator(this, function (_a) {
|
|
835
|
+
switch (_a.label) {
|
|
836
|
+
case 0:
|
|
837
|
+
localVarPath = "/v3/admin/pullconfiguration";
|
|
838
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
839
|
+
if (configuration) {
|
|
840
|
+
baseOptions = configuration.baseOptions;
|
|
841
|
+
}
|
|
842
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
843
|
+
localVarHeaderParameter = {};
|
|
844
|
+
localVarQueryParameter = {};
|
|
845
|
+
// authentication bearerAuth required
|
|
846
|
+
// http bearer authentication required
|
|
847
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
848
|
+
case 1:
|
|
849
|
+
// authentication bearerAuth required
|
|
850
|
+
// http bearer authentication required
|
|
851
|
+
_a.sent();
|
|
852
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
853
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
854
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
855
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
856
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(promotionPullConfigurationRequest, localVarRequestOptions, configuration);
|
|
857
|
+
return [2 /*return*/, {
|
|
858
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
859
|
+
options: localVarRequestOptions,
|
|
860
|
+
}];
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
});
|
|
864
|
+
},
|
|
865
|
+
/**
|
|
866
|
+
*
|
|
867
|
+
* @summary Iniciar uma promoção na API
|
|
868
|
+
* @param {PromotionStartRequest} [promotionStartRequest]
|
|
869
|
+
* @param {*} [options] Override http request option.
|
|
870
|
+
* @throws {RequiredError}
|
|
871
|
+
*/
|
|
872
|
+
promotionStart: function (promotionStartRequest_1) {
|
|
873
|
+
var args_1 = [];
|
|
874
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
875
|
+
args_1[_i - 1] = arguments[_i];
|
|
876
|
+
}
|
|
877
|
+
return __awaiter(_this, __spreadArray([promotionStartRequest_1], args_1, true), void 0, function (promotionStartRequest, options) {
|
|
878
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
879
|
+
if (options === void 0) { options = {}; }
|
|
880
|
+
return __generator(this, function (_a) {
|
|
881
|
+
switch (_a.label) {
|
|
882
|
+
case 0:
|
|
883
|
+
localVarPath = "/v3/admin/promotion/start";
|
|
884
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
885
|
+
if (configuration) {
|
|
886
|
+
baseOptions = configuration.baseOptions;
|
|
887
|
+
}
|
|
888
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
889
|
+
localVarHeaderParameter = {};
|
|
890
|
+
localVarQueryParameter = {};
|
|
891
|
+
// authentication bearerAuth required
|
|
892
|
+
// http bearer authentication required
|
|
893
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
894
|
+
case 1:
|
|
895
|
+
// authentication bearerAuth required
|
|
896
|
+
// http bearer authentication required
|
|
897
|
+
_a.sent();
|
|
898
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
899
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
900
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
901
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
902
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(promotionStartRequest, localVarRequestOptions, configuration);
|
|
903
|
+
return [2 /*return*/, {
|
|
904
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
905
|
+
options: localVarRequestOptions,
|
|
906
|
+
}];
|
|
907
|
+
}
|
|
908
|
+
});
|
|
909
|
+
});
|
|
910
|
+
},
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
exports.PromotionApiAxiosParamCreator = PromotionApiAxiosParamCreator;
|
|
914
|
+
/**
|
|
915
|
+
* PromotionApi - functional programming interface
|
|
916
|
+
* @export
|
|
917
|
+
*/
|
|
918
|
+
var PromotionApiFp = function (configuration) {
|
|
919
|
+
var localVarAxiosParamCreator = (0, exports.PromotionApiAxiosParamCreator)(configuration);
|
|
920
|
+
return {
|
|
921
|
+
/**
|
|
922
|
+
*
|
|
923
|
+
* @summary Adicionar/Atualizar configurações de uma promoção ao orquestrador
|
|
924
|
+
* @param {PromotionPullConfigurationRequest} [promotionPullConfigurationRequest]
|
|
925
|
+
* @param {*} [options] Override http request option.
|
|
926
|
+
* @throws {RequiredError}
|
|
927
|
+
*/
|
|
928
|
+
promotionPullConfiguration: function (promotionPullConfigurationRequest, options) {
|
|
929
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
930
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
931
|
+
var _a, _b, _c;
|
|
932
|
+
return __generator(this, function (_d) {
|
|
933
|
+
switch (_d.label) {
|
|
934
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.promotionPullConfiguration(promotionPullConfigurationRequest, options)];
|
|
935
|
+
case 1:
|
|
936
|
+
localVarAxiosArgs = _d.sent();
|
|
937
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
938
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PromotionApi.promotionPullConfiguration']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
939
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
});
|
|
943
|
+
},
|
|
944
|
+
/**
|
|
945
|
+
*
|
|
946
|
+
* @summary Iniciar uma promoção na API
|
|
947
|
+
* @param {PromotionStartRequest} [promotionStartRequest]
|
|
948
|
+
* @param {*} [options] Override http request option.
|
|
949
|
+
* @throws {RequiredError}
|
|
950
|
+
*/
|
|
951
|
+
promotionStart: function (promotionStartRequest, options) {
|
|
952
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
953
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
954
|
+
var _a, _b, _c;
|
|
955
|
+
return __generator(this, function (_d) {
|
|
956
|
+
switch (_d.label) {
|
|
957
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.promotionStart(promotionStartRequest, options)];
|
|
958
|
+
case 1:
|
|
959
|
+
localVarAxiosArgs = _d.sent();
|
|
960
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
961
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PromotionApi.promotionStart']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
962
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
});
|
|
966
|
+
},
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
exports.PromotionApiFp = PromotionApiFp;
|
|
970
|
+
/**
|
|
971
|
+
* PromotionApi - factory interface
|
|
972
|
+
* @export
|
|
973
|
+
*/
|
|
974
|
+
var PromotionApiFactory = function (configuration, basePath, axios) {
|
|
975
|
+
var localVarFp = (0, exports.PromotionApiFp)(configuration);
|
|
976
|
+
return {
|
|
977
|
+
/**
|
|
978
|
+
*
|
|
979
|
+
* @summary Adicionar/Atualizar configurações de uma promoção ao orquestrador
|
|
980
|
+
* @param {PromotionPullConfigurationRequest} [promotionPullConfigurationRequest]
|
|
981
|
+
* @param {*} [options] Override http request option.
|
|
982
|
+
* @throws {RequiredError}
|
|
983
|
+
*/
|
|
984
|
+
promotionPullConfiguration: function (promotionPullConfigurationRequest, options) {
|
|
985
|
+
return localVarFp.promotionPullConfiguration(promotionPullConfigurationRequest, options).then(function (request) { return request(axios, basePath); });
|
|
986
|
+
},
|
|
987
|
+
/**
|
|
988
|
+
*
|
|
989
|
+
* @summary Iniciar uma promoção na API
|
|
990
|
+
* @param {PromotionStartRequest} [promotionStartRequest]
|
|
991
|
+
* @param {*} [options] Override http request option.
|
|
992
|
+
* @throws {RequiredError}
|
|
993
|
+
*/
|
|
994
|
+
promotionStart: function (promotionStartRequest, options) {
|
|
995
|
+
return localVarFp.promotionStart(promotionStartRequest, options).then(function (request) { return request(axios, basePath); });
|
|
996
|
+
},
|
|
997
|
+
};
|
|
998
|
+
};
|
|
999
|
+
exports.PromotionApiFactory = PromotionApiFactory;
|
|
1000
|
+
/**
|
|
1001
|
+
* PromotionApi - object-oriented interface
|
|
1002
|
+
* @export
|
|
1003
|
+
* @class PromotionApi
|
|
1004
|
+
* @extends {BaseAPI}
|
|
1005
|
+
*/
|
|
1006
|
+
var PromotionApi = /** @class */ (function (_super) {
|
|
1007
|
+
__extends(PromotionApi, _super);
|
|
1008
|
+
function PromotionApi() {
|
|
1009
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1010
|
+
}
|
|
1011
|
+
/**
|
|
1012
|
+
*
|
|
1013
|
+
* @summary Adicionar/Atualizar configurações de uma promoção ao orquestrador
|
|
1014
|
+
* @param {PromotionPullConfigurationRequest} [promotionPullConfigurationRequest]
|
|
1015
|
+
* @param {*} [options] Override http request option.
|
|
1016
|
+
* @throws {RequiredError}
|
|
1017
|
+
* @memberof PromotionApi
|
|
1018
|
+
*/
|
|
1019
|
+
PromotionApi.prototype.promotionPullConfiguration = function (promotionPullConfigurationRequest, options) {
|
|
1020
|
+
var _this = this;
|
|
1021
|
+
return (0, exports.PromotionApiFp)(this.configuration).promotionPullConfiguration(promotionPullConfigurationRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1022
|
+
};
|
|
1023
|
+
/**
|
|
1024
|
+
*
|
|
1025
|
+
* @summary Iniciar uma promoção na API
|
|
1026
|
+
* @param {PromotionStartRequest} [promotionStartRequest]
|
|
1027
|
+
* @param {*} [options] Override http request option.
|
|
1028
|
+
* @throws {RequiredError}
|
|
1029
|
+
* @memberof PromotionApi
|
|
1030
|
+
*/
|
|
1031
|
+
PromotionApi.prototype.promotionStart = function (promotionStartRequest, options) {
|
|
1032
|
+
var _this = this;
|
|
1033
|
+
return (0, exports.PromotionApiFp)(this.configuration).promotionStart(promotionStartRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1034
|
+
};
|
|
1035
|
+
return PromotionApi;
|
|
1036
|
+
}(base_1.BaseAPI));
|
|
1037
|
+
exports.PromotionApi = PromotionApi;
|
|
1038
|
+
/**
|
|
1039
|
+
* RolesApi - axios parameter creator
|
|
1040
|
+
* @export
|
|
1041
|
+
*/
|
|
1042
|
+
var RolesApiAxiosParamCreator = function (configuration) {
|
|
1043
|
+
var _this = this;
|
|
1044
|
+
return {
|
|
1045
|
+
/**
|
|
1046
|
+
*
|
|
1047
|
+
* @summary Atualizar permissões de uma role
|
|
1048
|
+
* @param {number} id ID da role
|
|
1049
|
+
* @param {RolesAttachPermissionsRequest} [rolesAttachPermissionsRequest]
|
|
1050
|
+
* @param {*} [options] Override http request option.
|
|
1051
|
+
* @throws {RequiredError}
|
|
1052
|
+
*/
|
|
1053
|
+
rolesAttachPermissions: function (id_1, rolesAttachPermissionsRequest_1) {
|
|
1054
|
+
var args_1 = [];
|
|
1055
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1056
|
+
args_1[_i - 2] = arguments[_i];
|
|
1057
|
+
}
|
|
1058
|
+
return __awaiter(_this, __spreadArray([id_1, rolesAttachPermissionsRequest_1], args_1, true), void 0, function (id, rolesAttachPermissionsRequest, options) {
|
|
1059
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1060
|
+
if (options === void 0) { options = {}; }
|
|
1061
|
+
return __generator(this, function (_a) {
|
|
1062
|
+
switch (_a.label) {
|
|
1063
|
+
case 0:
|
|
1064
|
+
// verify required parameter 'id' is not null or undefined
|
|
1065
|
+
(0, common_1.assertParamExists)('rolesAttachPermissions', 'id', id);
|
|
1066
|
+
localVarPath = "/v3/admin/roles/{id}/permissions"
|
|
1067
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
1068
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1069
|
+
if (configuration) {
|
|
1070
|
+
baseOptions = configuration.baseOptions;
|
|
1071
|
+
}
|
|
1072
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
1073
|
+
localVarHeaderParameter = {};
|
|
1074
|
+
localVarQueryParameter = {};
|
|
1075
|
+
// authentication bearerAuth required
|
|
1076
|
+
// http bearer authentication required
|
|
1077
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1078
|
+
case 1:
|
|
1079
|
+
// authentication bearerAuth required
|
|
1080
|
+
// http bearer authentication required
|
|
1081
|
+
_a.sent();
|
|
1082
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1083
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1084
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1085
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1086
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(rolesAttachPermissionsRequest, localVarRequestOptions, configuration);
|
|
1087
|
+
return [2 /*return*/, {
|
|
1088
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1089
|
+
options: localVarRequestOptions,
|
|
1090
|
+
}];
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
});
|
|
1094
|
+
},
|
|
1095
|
+
/**
|
|
1096
|
+
*
|
|
1097
|
+
* @summary Remover role
|
|
1098
|
+
* @param {number} id ID da role
|
|
1099
|
+
* @param {*} [options] Override http request option.
|
|
1100
|
+
* @throws {RequiredError}
|
|
1101
|
+
*/
|
|
1102
|
+
rolesDestroy: function (id_1) {
|
|
1103
|
+
var args_1 = [];
|
|
1104
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1105
|
+
args_1[_i - 1] = arguments[_i];
|
|
1106
|
+
}
|
|
1107
|
+
return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
|
|
1108
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1109
|
+
if (options === void 0) { options = {}; }
|
|
1110
|
+
return __generator(this, function (_a) {
|
|
1111
|
+
switch (_a.label) {
|
|
1112
|
+
case 0:
|
|
1113
|
+
// verify required parameter 'id' is not null or undefined
|
|
1114
|
+
(0, common_1.assertParamExists)('rolesDestroy', 'id', id);
|
|
1115
|
+
localVarPath = "/v3/admin/roles/{id}"
|
|
1116
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
1117
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1118
|
+
if (configuration) {
|
|
1119
|
+
baseOptions = configuration.baseOptions;
|
|
1120
|
+
}
|
|
1121
|
+
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
1122
|
+
localVarHeaderParameter = {};
|
|
1123
|
+
localVarQueryParameter = {};
|
|
1124
|
+
// authentication bearerAuth required
|
|
1125
|
+
// http bearer authentication required
|
|
1126
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1127
|
+
case 1:
|
|
1128
|
+
// authentication bearerAuth required
|
|
1129
|
+
// http bearer authentication required
|
|
1130
|
+
_a.sent();
|
|
1131
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1132
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1133
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1134
|
+
return [2 /*return*/, {
|
|
1135
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1136
|
+
options: localVarRequestOptions,
|
|
1137
|
+
}];
|
|
1138
|
+
}
|
|
1139
|
+
});
|
|
1140
|
+
});
|
|
1141
|
+
},
|
|
1142
|
+
/**
|
|
1143
|
+
*
|
|
1144
|
+
* @summary Listar roles
|
|
1145
|
+
* @param {*} [options] Override http request option.
|
|
1146
|
+
* @throws {RequiredError}
|
|
1147
|
+
*/
|
|
1148
|
+
rolesIndex: function () {
|
|
1149
|
+
var args_1 = [];
|
|
1150
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1151
|
+
args_1[_i] = arguments[_i];
|
|
1152
|
+
}
|
|
1153
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
1154
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1155
|
+
if (options === void 0) { options = {}; }
|
|
1156
|
+
return __generator(this, function (_a) {
|
|
1157
|
+
switch (_a.label) {
|
|
1158
|
+
case 0:
|
|
1159
|
+
localVarPath = "/v3/admin/roles";
|
|
1160
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1161
|
+
if (configuration) {
|
|
1162
|
+
baseOptions = configuration.baseOptions;
|
|
1163
|
+
}
|
|
1164
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1165
|
+
localVarHeaderParameter = {};
|
|
1166
|
+
localVarQueryParameter = {};
|
|
1167
|
+
// authentication bearerAuth required
|
|
1168
|
+
// http bearer authentication required
|
|
1169
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1170
|
+
case 1:
|
|
1171
|
+
// authentication bearerAuth required
|
|
1172
|
+
// http bearer authentication required
|
|
1173
|
+
_a.sent();
|
|
1174
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1175
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1176
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1177
|
+
return [2 /*return*/, {
|
|
1178
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1179
|
+
options: localVarRequestOptions,
|
|
1180
|
+
}];
|
|
1181
|
+
}
|
|
1182
|
+
});
|
|
1183
|
+
});
|
|
1184
|
+
},
|
|
1185
|
+
/**
|
|
1186
|
+
*
|
|
1187
|
+
* @summary Listar permissões de uma role
|
|
1188
|
+
* @param {number} id ID da role
|
|
1189
|
+
* @param {*} [options] Override http request option.
|
|
1190
|
+
* @throws {RequiredError}
|
|
1191
|
+
*/
|
|
1192
|
+
rolesPermissions: function (id_1) {
|
|
1193
|
+
var args_1 = [];
|
|
1194
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1195
|
+
args_1[_i - 1] = arguments[_i];
|
|
1196
|
+
}
|
|
1197
|
+
return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
|
|
1198
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1199
|
+
if (options === void 0) { options = {}; }
|
|
1200
|
+
return __generator(this, function (_a) {
|
|
1201
|
+
switch (_a.label) {
|
|
1202
|
+
case 0:
|
|
1203
|
+
// verify required parameter 'id' is not null or undefined
|
|
1204
|
+
(0, common_1.assertParamExists)('rolesPermissions', 'id', id);
|
|
1205
|
+
localVarPath = "/v3/admin/roles/{id}/permissions"
|
|
1206
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
1207
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1208
|
+
if (configuration) {
|
|
1209
|
+
baseOptions = configuration.baseOptions;
|
|
1210
|
+
}
|
|
1211
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1212
|
+
localVarHeaderParameter = {};
|
|
1213
|
+
localVarQueryParameter = {};
|
|
1214
|
+
// authentication bearerAuth required
|
|
1215
|
+
// http bearer authentication required
|
|
1216
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1217
|
+
case 1:
|
|
1218
|
+
// authentication bearerAuth required
|
|
1219
|
+
// http bearer authentication required
|
|
1220
|
+
_a.sent();
|
|
1221
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1222
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1223
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1224
|
+
return [2 /*return*/, {
|
|
1225
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1226
|
+
options: localVarRequestOptions,
|
|
1227
|
+
}];
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
});
|
|
1231
|
+
},
|
|
1232
|
+
/**
|
|
1233
|
+
*
|
|
1234
|
+
* @summary Exibir detalhes da role
|
|
1235
|
+
* @param {number} id ID da role
|
|
1236
|
+
* @param {*} [options] Override http request option.
|
|
1237
|
+
* @throws {RequiredError}
|
|
1238
|
+
*/
|
|
1239
|
+
rolesShow: function (id_1) {
|
|
1240
|
+
var args_1 = [];
|
|
1241
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1242
|
+
args_1[_i - 1] = arguments[_i];
|
|
1243
|
+
}
|
|
1244
|
+
return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
|
|
1245
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1246
|
+
if (options === void 0) { options = {}; }
|
|
1247
|
+
return __generator(this, function (_a) {
|
|
1248
|
+
switch (_a.label) {
|
|
1249
|
+
case 0:
|
|
1250
|
+
// verify required parameter 'id' is not null or undefined
|
|
1251
|
+
(0, common_1.assertParamExists)('rolesShow', 'id', id);
|
|
1252
|
+
localVarPath = "/v3/admin/roles/{id}"
|
|
1253
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
1254
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1255
|
+
if (configuration) {
|
|
1256
|
+
baseOptions = configuration.baseOptions;
|
|
1257
|
+
}
|
|
1258
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1259
|
+
localVarHeaderParameter = {};
|
|
1260
|
+
localVarQueryParameter = {};
|
|
1261
|
+
// authentication bearerAuth required
|
|
1262
|
+
// http bearer authentication required
|
|
1263
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1264
|
+
case 1:
|
|
1265
|
+
// authentication bearerAuth required
|
|
1266
|
+
// http bearer authentication required
|
|
1267
|
+
_a.sent();
|
|
1268
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1269
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1270
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1271
|
+
return [2 /*return*/, {
|
|
1272
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1273
|
+
options: localVarRequestOptions,
|
|
1274
|
+
}];
|
|
1275
|
+
}
|
|
1276
|
+
});
|
|
1277
|
+
});
|
|
1278
|
+
},
|
|
1279
|
+
/**
|
|
1280
|
+
*
|
|
1281
|
+
* @summary Criar role
|
|
1282
|
+
* @param {RolesStoreRequest} [rolesStoreRequest]
|
|
1283
|
+
* @param {*} [options] Override http request option.
|
|
1284
|
+
* @throws {RequiredError}
|
|
1285
|
+
*/
|
|
1286
|
+
rolesStore: function (rolesStoreRequest_1) {
|
|
1287
|
+
var args_1 = [];
|
|
1288
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1289
|
+
args_1[_i - 1] = arguments[_i];
|
|
1290
|
+
}
|
|
1291
|
+
return __awaiter(_this, __spreadArray([rolesStoreRequest_1], args_1, true), void 0, function (rolesStoreRequest, options) {
|
|
1292
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1293
|
+
if (options === void 0) { options = {}; }
|
|
1294
|
+
return __generator(this, function (_a) {
|
|
1295
|
+
switch (_a.label) {
|
|
1296
|
+
case 0:
|
|
1297
|
+
localVarPath = "/v3/admin/roles";
|
|
1298
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1299
|
+
if (configuration) {
|
|
1300
|
+
baseOptions = configuration.baseOptions;
|
|
1301
|
+
}
|
|
1302
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
1303
|
+
localVarHeaderParameter = {};
|
|
1304
|
+
localVarQueryParameter = {};
|
|
1305
|
+
// authentication bearerAuth required
|
|
1306
|
+
// http bearer authentication required
|
|
1307
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1308
|
+
case 1:
|
|
1309
|
+
// authentication bearerAuth required
|
|
1310
|
+
// http bearer authentication required
|
|
1311
|
+
_a.sent();
|
|
1312
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1313
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1314
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1315
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1316
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(rolesStoreRequest, localVarRequestOptions, configuration);
|
|
1317
|
+
return [2 /*return*/, {
|
|
1318
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1319
|
+
options: localVarRequestOptions,
|
|
1320
|
+
}];
|
|
1321
|
+
}
|
|
1322
|
+
});
|
|
1323
|
+
});
|
|
1324
|
+
},
|
|
1325
|
+
/**
|
|
1326
|
+
*
|
|
1327
|
+
* @summary Atualizar role
|
|
1328
|
+
* @param {number} id ID da role
|
|
1329
|
+
* @param {RolesUpdateRequest} [rolesUpdateRequest]
|
|
1330
|
+
* @param {*} [options] Override http request option.
|
|
1331
|
+
* @throws {RequiredError}
|
|
1332
|
+
*/
|
|
1333
|
+
rolesUpdate: function (id_1, rolesUpdateRequest_1) {
|
|
1334
|
+
var args_1 = [];
|
|
1335
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1336
|
+
args_1[_i - 2] = arguments[_i];
|
|
1337
|
+
}
|
|
1338
|
+
return __awaiter(_this, __spreadArray([id_1, rolesUpdateRequest_1], args_1, true), void 0, function (id, rolesUpdateRequest, options) {
|
|
1339
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1340
|
+
if (options === void 0) { options = {}; }
|
|
1341
|
+
return __generator(this, function (_a) {
|
|
1342
|
+
switch (_a.label) {
|
|
1343
|
+
case 0:
|
|
1344
|
+
// verify required parameter 'id' is not null or undefined
|
|
1345
|
+
(0, common_1.assertParamExists)('rolesUpdate', 'id', id);
|
|
1346
|
+
localVarPath = "/v3/admin/roles/{id}"
|
|
1347
|
+
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
|
|
1348
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1349
|
+
if (configuration) {
|
|
1350
|
+
baseOptions = configuration.baseOptions;
|
|
1351
|
+
}
|
|
1352
|
+
localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
|
|
1353
|
+
localVarHeaderParameter = {};
|
|
1354
|
+
localVarQueryParameter = {};
|
|
1355
|
+
// authentication bearerAuth required
|
|
1356
|
+
// http bearer authentication required
|
|
1357
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1358
|
+
case 1:
|
|
1359
|
+
// authentication bearerAuth required
|
|
1360
|
+
// http bearer authentication required
|
|
1361
|
+
_a.sent();
|
|
1362
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1363
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1364
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1365
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1366
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(rolesUpdateRequest, localVarRequestOptions, configuration);
|
|
1367
|
+
return [2 /*return*/, {
|
|
1368
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1369
|
+
options: localVarRequestOptions,
|
|
1370
|
+
}];
|
|
1371
|
+
}
|
|
1372
|
+
});
|
|
1373
|
+
});
|
|
1374
|
+
},
|
|
1375
|
+
};
|
|
1376
|
+
};
|
|
1377
|
+
exports.RolesApiAxiosParamCreator = RolesApiAxiosParamCreator;
|
|
1378
|
+
/**
|
|
1379
|
+
* RolesApi - functional programming interface
|
|
1380
|
+
* @export
|
|
1381
|
+
*/
|
|
1382
|
+
var RolesApiFp = function (configuration) {
|
|
1383
|
+
var localVarAxiosParamCreator = (0, exports.RolesApiAxiosParamCreator)(configuration);
|
|
1384
|
+
return {
|
|
1385
|
+
/**
|
|
1386
|
+
*
|
|
1387
|
+
* @summary Atualizar permissões de uma role
|
|
1388
|
+
* @param {number} id ID da role
|
|
1389
|
+
* @param {RolesAttachPermissionsRequest} [rolesAttachPermissionsRequest]
|
|
1390
|
+
* @param {*} [options] Override http request option.
|
|
1391
|
+
* @throws {RequiredError}
|
|
1392
|
+
*/
|
|
1393
|
+
rolesAttachPermissions: function (id, rolesAttachPermissionsRequest, options) {
|
|
1394
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1395
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1396
|
+
var _a, _b, _c;
|
|
1397
|
+
return __generator(this, function (_d) {
|
|
1398
|
+
switch (_d.label) {
|
|
1399
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.rolesAttachPermissions(id, rolesAttachPermissionsRequest, options)];
|
|
1400
|
+
case 1:
|
|
1401
|
+
localVarAxiosArgs = _d.sent();
|
|
1402
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1403
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RolesApi.rolesAttachPermissions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1404
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1405
|
+
}
|
|
1406
|
+
});
|
|
1407
|
+
});
|
|
1408
|
+
},
|
|
1409
|
+
/**
|
|
1410
|
+
*
|
|
1411
|
+
* @summary Remover role
|
|
1412
|
+
* @param {number} id ID da role
|
|
1413
|
+
* @param {*} [options] Override http request option.
|
|
1414
|
+
* @throws {RequiredError}
|
|
1415
|
+
*/
|
|
1416
|
+
rolesDestroy: function (id, options) {
|
|
1417
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1418
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1419
|
+
var _a, _b, _c;
|
|
1420
|
+
return __generator(this, function (_d) {
|
|
1421
|
+
switch (_d.label) {
|
|
1422
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.rolesDestroy(id, options)];
|
|
1423
|
+
case 1:
|
|
1424
|
+
localVarAxiosArgs = _d.sent();
|
|
1425
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1426
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RolesApi.rolesDestroy']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1427
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1428
|
+
}
|
|
1429
|
+
});
|
|
1430
|
+
});
|
|
1431
|
+
},
|
|
1432
|
+
/**
|
|
1433
|
+
*
|
|
1434
|
+
* @summary Listar roles
|
|
1435
|
+
* @param {*} [options] Override http request option.
|
|
1436
|
+
* @throws {RequiredError}
|
|
1437
|
+
*/
|
|
1438
|
+
rolesIndex: function (options) {
|
|
1439
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1440
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1441
|
+
var _a, _b, _c;
|
|
1442
|
+
return __generator(this, function (_d) {
|
|
1443
|
+
switch (_d.label) {
|
|
1444
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.rolesIndex(options)];
|
|
1445
|
+
case 1:
|
|
1446
|
+
localVarAxiosArgs = _d.sent();
|
|
1447
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1448
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RolesApi.rolesIndex']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1449
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1450
|
+
}
|
|
1451
|
+
});
|
|
1452
|
+
});
|
|
1453
|
+
},
|
|
1454
|
+
/**
|
|
1455
|
+
*
|
|
1456
|
+
* @summary Listar permissões de uma role
|
|
1457
|
+
* @param {number} id ID da role
|
|
1458
|
+
* @param {*} [options] Override http request option.
|
|
1459
|
+
* @throws {RequiredError}
|
|
1460
|
+
*/
|
|
1461
|
+
rolesPermissions: function (id, options) {
|
|
1462
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1463
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1464
|
+
var _a, _b, _c;
|
|
1465
|
+
return __generator(this, function (_d) {
|
|
1466
|
+
switch (_d.label) {
|
|
1467
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.rolesPermissions(id, options)];
|
|
1468
|
+
case 1:
|
|
1469
|
+
localVarAxiosArgs = _d.sent();
|
|
1470
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1471
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RolesApi.rolesPermissions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1472
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1473
|
+
}
|
|
1474
|
+
});
|
|
1475
|
+
});
|
|
1476
|
+
},
|
|
1477
|
+
/**
|
|
1478
|
+
*
|
|
1479
|
+
* @summary Exibir detalhes da role
|
|
1480
|
+
* @param {number} id ID da role
|
|
1481
|
+
* @param {*} [options] Override http request option.
|
|
1482
|
+
* @throws {RequiredError}
|
|
1483
|
+
*/
|
|
1484
|
+
rolesShow: function (id, options) {
|
|
1485
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1486
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1487
|
+
var _a, _b, _c;
|
|
1488
|
+
return __generator(this, function (_d) {
|
|
1489
|
+
switch (_d.label) {
|
|
1490
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.rolesShow(id, options)];
|
|
1491
|
+
case 1:
|
|
1492
|
+
localVarAxiosArgs = _d.sent();
|
|
1493
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1494
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RolesApi.rolesShow']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1495
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1496
|
+
}
|
|
1497
|
+
});
|
|
1498
|
+
});
|
|
1499
|
+
},
|
|
1500
|
+
/**
|
|
1501
|
+
*
|
|
1502
|
+
* @summary Criar role
|
|
1503
|
+
* @param {RolesStoreRequest} [rolesStoreRequest]
|
|
1504
|
+
* @param {*} [options] Override http request option.
|
|
1505
|
+
* @throws {RequiredError}
|
|
1506
|
+
*/
|
|
1507
|
+
rolesStore: function (rolesStoreRequest, options) {
|
|
1508
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1509
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1510
|
+
var _a, _b, _c;
|
|
1511
|
+
return __generator(this, function (_d) {
|
|
1512
|
+
switch (_d.label) {
|
|
1513
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.rolesStore(rolesStoreRequest, options)];
|
|
1514
|
+
case 1:
|
|
1515
|
+
localVarAxiosArgs = _d.sent();
|
|
1516
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1517
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RolesApi.rolesStore']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1518
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1519
|
+
}
|
|
1520
|
+
});
|
|
1521
|
+
});
|
|
1522
|
+
},
|
|
1523
|
+
/**
|
|
1524
|
+
*
|
|
1525
|
+
* @summary Atualizar role
|
|
1526
|
+
* @param {number} id ID da role
|
|
1527
|
+
* @param {RolesUpdateRequest} [rolesUpdateRequest]
|
|
1528
|
+
* @param {*} [options] Override http request option.
|
|
1529
|
+
* @throws {RequiredError}
|
|
1530
|
+
*/
|
|
1531
|
+
rolesUpdate: function (id, rolesUpdateRequest, options) {
|
|
1532
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1533
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1534
|
+
var _a, _b, _c;
|
|
1535
|
+
return __generator(this, function (_d) {
|
|
1536
|
+
switch (_d.label) {
|
|
1537
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.rolesUpdate(id, rolesUpdateRequest, options)];
|
|
1538
|
+
case 1:
|
|
1539
|
+
localVarAxiosArgs = _d.sent();
|
|
1540
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1541
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RolesApi.rolesUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1542
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1543
|
+
}
|
|
1544
|
+
});
|
|
1545
|
+
});
|
|
1546
|
+
},
|
|
1547
|
+
};
|
|
1548
|
+
};
|
|
1549
|
+
exports.RolesApiFp = RolesApiFp;
|
|
1550
|
+
/**
|
|
1551
|
+
* RolesApi - factory interface
|
|
1552
|
+
* @export
|
|
1553
|
+
*/
|
|
1554
|
+
var RolesApiFactory = function (configuration, basePath, axios) {
|
|
1555
|
+
var localVarFp = (0, exports.RolesApiFp)(configuration);
|
|
1556
|
+
return {
|
|
1557
|
+
/**
|
|
1558
|
+
*
|
|
1559
|
+
* @summary Atualizar permissões de uma role
|
|
1560
|
+
* @param {number} id ID da role
|
|
1561
|
+
* @param {RolesAttachPermissionsRequest} [rolesAttachPermissionsRequest]
|
|
1562
|
+
* @param {*} [options] Override http request option.
|
|
1563
|
+
* @throws {RequiredError}
|
|
1564
|
+
*/
|
|
1565
|
+
rolesAttachPermissions: function (id, rolesAttachPermissionsRequest, options) {
|
|
1566
|
+
return localVarFp.rolesAttachPermissions(id, rolesAttachPermissionsRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1567
|
+
},
|
|
1568
|
+
/**
|
|
1569
|
+
*
|
|
1570
|
+
* @summary Remover role
|
|
1571
|
+
* @param {number} id ID da role
|
|
1572
|
+
* @param {*} [options] Override http request option.
|
|
1573
|
+
* @throws {RequiredError}
|
|
1574
|
+
*/
|
|
1575
|
+
rolesDestroy: function (id, options) {
|
|
1576
|
+
return localVarFp.rolesDestroy(id, options).then(function (request) { return request(axios, basePath); });
|
|
1577
|
+
},
|
|
1578
|
+
/**
|
|
1579
|
+
*
|
|
1580
|
+
* @summary Listar roles
|
|
1581
|
+
* @param {*} [options] Override http request option.
|
|
1582
|
+
* @throws {RequiredError}
|
|
1583
|
+
*/
|
|
1584
|
+
rolesIndex: function (options) {
|
|
1585
|
+
return localVarFp.rolesIndex(options).then(function (request) { return request(axios, basePath); });
|
|
1586
|
+
},
|
|
1587
|
+
/**
|
|
1588
|
+
*
|
|
1589
|
+
* @summary Listar permissões de uma role
|
|
1590
|
+
* @param {number} id ID da role
|
|
1591
|
+
* @param {*} [options] Override http request option.
|
|
1592
|
+
* @throws {RequiredError}
|
|
1593
|
+
*/
|
|
1594
|
+
rolesPermissions: function (id, options) {
|
|
1595
|
+
return localVarFp.rolesPermissions(id, options).then(function (request) { return request(axios, basePath); });
|
|
1596
|
+
},
|
|
1597
|
+
/**
|
|
1598
|
+
*
|
|
1599
|
+
* @summary Exibir detalhes da role
|
|
1600
|
+
* @param {number} id ID da role
|
|
1601
|
+
* @param {*} [options] Override http request option.
|
|
1602
|
+
* @throws {RequiredError}
|
|
1603
|
+
*/
|
|
1604
|
+
rolesShow: function (id, options) {
|
|
1605
|
+
return localVarFp.rolesShow(id, options).then(function (request) { return request(axios, basePath); });
|
|
1606
|
+
},
|
|
1607
|
+
/**
|
|
1608
|
+
*
|
|
1609
|
+
* @summary Criar role
|
|
1610
|
+
* @param {RolesStoreRequest} [rolesStoreRequest]
|
|
1611
|
+
* @param {*} [options] Override http request option.
|
|
1612
|
+
* @throws {RequiredError}
|
|
1613
|
+
*/
|
|
1614
|
+
rolesStore: function (rolesStoreRequest, options) {
|
|
1615
|
+
return localVarFp.rolesStore(rolesStoreRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1616
|
+
},
|
|
1617
|
+
/**
|
|
1618
|
+
*
|
|
1619
|
+
* @summary Atualizar role
|
|
1620
|
+
* @param {number} id ID da role
|
|
1621
|
+
* @param {RolesUpdateRequest} [rolesUpdateRequest]
|
|
1622
|
+
* @param {*} [options] Override http request option.
|
|
1623
|
+
* @throws {RequiredError}
|
|
1624
|
+
*/
|
|
1625
|
+
rolesUpdate: function (id, rolesUpdateRequest, options) {
|
|
1626
|
+
return localVarFp.rolesUpdate(id, rolesUpdateRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1627
|
+
},
|
|
1628
|
+
};
|
|
1629
|
+
};
|
|
1630
|
+
exports.RolesApiFactory = RolesApiFactory;
|
|
1631
|
+
/**
|
|
1632
|
+
* RolesApi - object-oriented interface
|
|
1633
|
+
* @export
|
|
1634
|
+
* @class RolesApi
|
|
1635
|
+
* @extends {BaseAPI}
|
|
1636
|
+
*/
|
|
1637
|
+
var RolesApi = /** @class */ (function (_super) {
|
|
1638
|
+
__extends(RolesApi, _super);
|
|
1639
|
+
function RolesApi() {
|
|
1640
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
*
|
|
1644
|
+
* @summary Atualizar permissões de uma role
|
|
1645
|
+
* @param {number} id ID da role
|
|
1646
|
+
* @param {RolesAttachPermissionsRequest} [rolesAttachPermissionsRequest]
|
|
1647
|
+
* @param {*} [options] Override http request option.
|
|
1648
|
+
* @throws {RequiredError}
|
|
1649
|
+
* @memberof RolesApi
|
|
1650
|
+
*/
|
|
1651
|
+
RolesApi.prototype.rolesAttachPermissions = function (id, rolesAttachPermissionsRequest, options) {
|
|
1652
|
+
var _this = this;
|
|
1653
|
+
return (0, exports.RolesApiFp)(this.configuration).rolesAttachPermissions(id, rolesAttachPermissionsRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1654
|
+
};
|
|
1655
|
+
/**
|
|
1656
|
+
*
|
|
1657
|
+
* @summary Remover role
|
|
1658
|
+
* @param {number} id ID da role
|
|
1659
|
+
* @param {*} [options] Override http request option.
|
|
1660
|
+
* @throws {RequiredError}
|
|
1661
|
+
* @memberof RolesApi
|
|
1662
|
+
*/
|
|
1663
|
+
RolesApi.prototype.rolesDestroy = function (id, options) {
|
|
1664
|
+
var _this = this;
|
|
1665
|
+
return (0, exports.RolesApiFp)(this.configuration).rolesDestroy(id, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1666
|
+
};
|
|
1667
|
+
/**
|
|
1668
|
+
*
|
|
1669
|
+
* @summary Listar roles
|
|
1670
|
+
* @param {*} [options] Override http request option.
|
|
1671
|
+
* @throws {RequiredError}
|
|
1672
|
+
* @memberof RolesApi
|
|
1673
|
+
*/
|
|
1674
|
+
RolesApi.prototype.rolesIndex = function (options) {
|
|
1675
|
+
var _this = this;
|
|
1676
|
+
return (0, exports.RolesApiFp)(this.configuration).rolesIndex(options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1677
|
+
};
|
|
1678
|
+
/**
|
|
1679
|
+
*
|
|
1680
|
+
* @summary Listar permissões de uma role
|
|
1681
|
+
* @param {number} id ID da role
|
|
1682
|
+
* @param {*} [options] Override http request option.
|
|
1683
|
+
* @throws {RequiredError}
|
|
1684
|
+
* @memberof RolesApi
|
|
1685
|
+
*/
|
|
1686
|
+
RolesApi.prototype.rolesPermissions = function (id, options) {
|
|
1687
|
+
var _this = this;
|
|
1688
|
+
return (0, exports.RolesApiFp)(this.configuration).rolesPermissions(id, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1689
|
+
};
|
|
1690
|
+
/**
|
|
1691
|
+
*
|
|
1692
|
+
* @summary Exibir detalhes da role
|
|
1693
|
+
* @param {number} id ID da role
|
|
1694
|
+
* @param {*} [options] Override http request option.
|
|
1695
|
+
* @throws {RequiredError}
|
|
1696
|
+
* @memberof RolesApi
|
|
1697
|
+
*/
|
|
1698
|
+
RolesApi.prototype.rolesShow = function (id, options) {
|
|
1699
|
+
var _this = this;
|
|
1700
|
+
return (0, exports.RolesApiFp)(this.configuration).rolesShow(id, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1701
|
+
};
|
|
1702
|
+
/**
|
|
1703
|
+
*
|
|
1704
|
+
* @summary Criar role
|
|
1705
|
+
* @param {RolesStoreRequest} [rolesStoreRequest]
|
|
1706
|
+
* @param {*} [options] Override http request option.
|
|
1707
|
+
* @throws {RequiredError}
|
|
1708
|
+
* @memberof RolesApi
|
|
1709
|
+
*/
|
|
1710
|
+
RolesApi.prototype.rolesStore = function (rolesStoreRequest, options) {
|
|
1711
|
+
var _this = this;
|
|
1712
|
+
return (0, exports.RolesApiFp)(this.configuration).rolesStore(rolesStoreRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1713
|
+
};
|
|
1714
|
+
/**
|
|
1715
|
+
*
|
|
1716
|
+
* @summary Atualizar role
|
|
1717
|
+
* @param {number} id ID da role
|
|
1718
|
+
* @param {RolesUpdateRequest} [rolesUpdateRequest]
|
|
1719
|
+
* @param {*} [options] Override http request option.
|
|
1720
|
+
* @throws {RequiredError}
|
|
1721
|
+
* @memberof RolesApi
|
|
1722
|
+
*/
|
|
1723
|
+
RolesApi.prototype.rolesUpdate = function (id, rolesUpdateRequest, options) {
|
|
1724
|
+
var _this = this;
|
|
1725
|
+
return (0, exports.RolesApiFp)(this.configuration).rolesUpdate(id, rolesUpdateRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1726
|
+
};
|
|
1727
|
+
return RolesApi;
|
|
1728
|
+
}(base_1.BaseAPI));
|
|
1729
|
+
exports.RolesApi = RolesApi;
|
|
1730
|
+
/**
|
|
1731
|
+
* StepsApi - axios parameter creator
|
|
1732
|
+
* @export
|
|
1733
|
+
*/
|
|
1734
|
+
var StepsApiAxiosParamCreator = function (configuration) {
|
|
1735
|
+
var _this = this;
|
|
1736
|
+
return {
|
|
1737
|
+
/**
|
|
1738
|
+
*
|
|
1739
|
+
* @summary Inclui uma Step em um determinado endpoint
|
|
1740
|
+
* @param {StepsAllowRequest} [stepsAllowRequest]
|
|
1741
|
+
* @param {*} [options] Override http request option.
|
|
1742
|
+
* @throws {RequiredError}
|
|
1743
|
+
*/
|
|
1744
|
+
stepsAllow: function (stepsAllowRequest_1) {
|
|
1745
|
+
var args_1 = [];
|
|
1746
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1747
|
+
args_1[_i - 1] = arguments[_i];
|
|
1748
|
+
}
|
|
1749
|
+
return __awaiter(_this, __spreadArray([stepsAllowRequest_1], args_1, true), void 0, function (stepsAllowRequest, options) {
|
|
1750
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1751
|
+
if (options === void 0) { options = {}; }
|
|
1752
|
+
return __generator(this, function (_a) {
|
|
1753
|
+
switch (_a.label) {
|
|
1754
|
+
case 0:
|
|
1755
|
+
localVarPath = "/v3/steps/allow";
|
|
1756
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1757
|
+
if (configuration) {
|
|
1758
|
+
baseOptions = configuration.baseOptions;
|
|
1759
|
+
}
|
|
1760
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
1761
|
+
localVarHeaderParameter = {};
|
|
1762
|
+
localVarQueryParameter = {};
|
|
1763
|
+
// authentication bearerAuth required
|
|
1764
|
+
// http bearer authentication required
|
|
1765
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1766
|
+
case 1:
|
|
1767
|
+
// authentication bearerAuth required
|
|
1768
|
+
// http bearer authentication required
|
|
1769
|
+
_a.sent();
|
|
1770
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1771
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1772
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1773
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1774
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(stepsAllowRequest, localVarRequestOptions, configuration);
|
|
1775
|
+
return [2 /*return*/, {
|
|
1776
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1777
|
+
options: localVarRequestOptions,
|
|
1778
|
+
}];
|
|
1779
|
+
}
|
|
1780
|
+
});
|
|
1781
|
+
});
|
|
1782
|
+
},
|
|
1783
|
+
/**
|
|
1784
|
+
*
|
|
1785
|
+
* @summary Retorna todas as steps existentes
|
|
1786
|
+
* @param {string} [promotionId] UUID da promoção
|
|
1787
|
+
* @param {*} [options] Override http request option.
|
|
1788
|
+
* @throws {RequiredError}
|
|
1789
|
+
*/
|
|
1790
|
+
stepsIndex: function (promotionId_1) {
|
|
1791
|
+
var args_1 = [];
|
|
1792
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1793
|
+
args_1[_i - 1] = arguments[_i];
|
|
1794
|
+
}
|
|
1795
|
+
return __awaiter(_this, __spreadArray([promotionId_1], args_1, true), void 0, function (promotionId, options) {
|
|
1796
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1797
|
+
if (options === void 0) { options = {}; }
|
|
1798
|
+
return __generator(this, function (_a) {
|
|
1799
|
+
switch (_a.label) {
|
|
1800
|
+
case 0:
|
|
1801
|
+
localVarPath = "/v3/steps";
|
|
1802
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1803
|
+
if (configuration) {
|
|
1804
|
+
baseOptions = configuration.baseOptions;
|
|
1805
|
+
}
|
|
1806
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1807
|
+
localVarHeaderParameter = {};
|
|
1808
|
+
localVarQueryParameter = {};
|
|
1809
|
+
// authentication bearerAuth required
|
|
1810
|
+
// http bearer authentication required
|
|
1811
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1812
|
+
case 1:
|
|
1813
|
+
// authentication bearerAuth required
|
|
1814
|
+
// http bearer authentication required
|
|
1815
|
+
_a.sent();
|
|
1816
|
+
if (promotionId !== undefined) {
|
|
1817
|
+
localVarQueryParameter['promotion_id'] = promotionId;
|
|
1818
|
+
}
|
|
1819
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1820
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1821
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1822
|
+
return [2 /*return*/, {
|
|
1823
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1824
|
+
options: localVarRequestOptions,
|
|
1825
|
+
}];
|
|
1826
|
+
}
|
|
1827
|
+
});
|
|
1828
|
+
});
|
|
1829
|
+
},
|
|
1830
|
+
/**
|
|
1831
|
+
*
|
|
1832
|
+
* @summary Remove uma Step de um determinado endpoint
|
|
1833
|
+
* @param {StepsAllowRequest} [stepsAllowRequest]
|
|
1834
|
+
* @param {*} [options] Override http request option.
|
|
1835
|
+
* @throws {RequiredError}
|
|
1836
|
+
*/
|
|
1837
|
+
stepsUnallow: function (stepsAllowRequest_1) {
|
|
1838
|
+
var args_1 = [];
|
|
1839
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1840
|
+
args_1[_i - 1] = arguments[_i];
|
|
1841
|
+
}
|
|
1842
|
+
return __awaiter(_this, __spreadArray([stepsAllowRequest_1], args_1, true), void 0, function (stepsAllowRequest, options) {
|
|
1843
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1844
|
+
if (options === void 0) { options = {}; }
|
|
1845
|
+
return __generator(this, function (_a) {
|
|
1846
|
+
switch (_a.label) {
|
|
1847
|
+
case 0:
|
|
1848
|
+
localVarPath = "/v3/steps/disallow";
|
|
1849
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1850
|
+
if (configuration) {
|
|
1851
|
+
baseOptions = configuration.baseOptions;
|
|
1852
|
+
}
|
|
1853
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
1854
|
+
localVarHeaderParameter = {};
|
|
1855
|
+
localVarQueryParameter = {};
|
|
1856
|
+
// authentication bearerAuth required
|
|
1857
|
+
// http bearer authentication required
|
|
1858
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1859
|
+
case 1:
|
|
1860
|
+
// authentication bearerAuth required
|
|
1861
|
+
// http bearer authentication required
|
|
1862
|
+
_a.sent();
|
|
1863
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1864
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1865
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1866
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1867
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(stepsAllowRequest, localVarRequestOptions, configuration);
|
|
1868
|
+
return [2 /*return*/, {
|
|
1869
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1870
|
+
options: localVarRequestOptions,
|
|
1871
|
+
}];
|
|
1872
|
+
}
|
|
1873
|
+
});
|
|
1874
|
+
});
|
|
1875
|
+
},
|
|
1876
|
+
};
|
|
1877
|
+
};
|
|
1878
|
+
exports.StepsApiAxiosParamCreator = StepsApiAxiosParamCreator;
|
|
1879
|
+
/**
|
|
1880
|
+
* StepsApi - functional programming interface
|
|
1881
|
+
* @export
|
|
1882
|
+
*/
|
|
1883
|
+
var StepsApiFp = function (configuration) {
|
|
1884
|
+
var localVarAxiosParamCreator = (0, exports.StepsApiAxiosParamCreator)(configuration);
|
|
1885
|
+
return {
|
|
1886
|
+
/**
|
|
1887
|
+
*
|
|
1888
|
+
* @summary Inclui uma Step em um determinado endpoint
|
|
1889
|
+
* @param {StepsAllowRequest} [stepsAllowRequest]
|
|
1890
|
+
* @param {*} [options] Override http request option.
|
|
1891
|
+
* @throws {RequiredError}
|
|
1892
|
+
*/
|
|
1893
|
+
stepsAllow: function (stepsAllowRequest, options) {
|
|
1894
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1895
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1896
|
+
var _a, _b, _c;
|
|
1897
|
+
return __generator(this, function (_d) {
|
|
1898
|
+
switch (_d.label) {
|
|
1899
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.stepsAllow(stepsAllowRequest, options)];
|
|
1900
|
+
case 1:
|
|
1901
|
+
localVarAxiosArgs = _d.sent();
|
|
1902
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1903
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StepsApi.stepsAllow']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1904
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1907
|
+
});
|
|
1908
|
+
},
|
|
1909
|
+
/**
|
|
1910
|
+
*
|
|
1911
|
+
* @summary Retorna todas as steps existentes
|
|
1912
|
+
* @param {string} [promotionId] UUID da promoção
|
|
1913
|
+
* @param {*} [options] Override http request option.
|
|
1914
|
+
* @throws {RequiredError}
|
|
1915
|
+
*/
|
|
1916
|
+
stepsIndex: function (promotionId, options) {
|
|
1917
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1918
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1919
|
+
var _a, _b, _c;
|
|
1920
|
+
return __generator(this, function (_d) {
|
|
1921
|
+
switch (_d.label) {
|
|
1922
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.stepsIndex(promotionId, options)];
|
|
1923
|
+
case 1:
|
|
1924
|
+
localVarAxiosArgs = _d.sent();
|
|
1925
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1926
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StepsApi.stepsIndex']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1927
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1928
|
+
}
|
|
1929
|
+
});
|
|
1930
|
+
});
|
|
1931
|
+
},
|
|
1932
|
+
/**
|
|
1933
|
+
*
|
|
1934
|
+
* @summary Remove uma Step de um determinado endpoint
|
|
1935
|
+
* @param {StepsAllowRequest} [stepsAllowRequest]
|
|
1936
|
+
* @param {*} [options] Override http request option.
|
|
1937
|
+
* @throws {RequiredError}
|
|
1938
|
+
*/
|
|
1939
|
+
stepsUnallow: function (stepsAllowRequest, options) {
|
|
1940
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1941
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1942
|
+
var _a, _b, _c;
|
|
1943
|
+
return __generator(this, function (_d) {
|
|
1944
|
+
switch (_d.label) {
|
|
1945
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.stepsUnallow(stepsAllowRequest, options)];
|
|
1946
|
+
case 1:
|
|
1947
|
+
localVarAxiosArgs = _d.sent();
|
|
1948
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1949
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['StepsApi.stepsUnallow']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1950
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1951
|
+
}
|
|
1952
|
+
});
|
|
1953
|
+
});
|
|
1954
|
+
},
|
|
1955
|
+
};
|
|
1956
|
+
};
|
|
1957
|
+
exports.StepsApiFp = StepsApiFp;
|
|
1958
|
+
/**
|
|
1959
|
+
* StepsApi - factory interface
|
|
1960
|
+
* @export
|
|
1961
|
+
*/
|
|
1962
|
+
var StepsApiFactory = function (configuration, basePath, axios) {
|
|
1963
|
+
var localVarFp = (0, exports.StepsApiFp)(configuration);
|
|
1964
|
+
return {
|
|
1965
|
+
/**
|
|
1966
|
+
*
|
|
1967
|
+
* @summary Inclui uma Step em um determinado endpoint
|
|
1968
|
+
* @param {StepsAllowRequest} [stepsAllowRequest]
|
|
1969
|
+
* @param {*} [options] Override http request option.
|
|
1970
|
+
* @throws {RequiredError}
|
|
1971
|
+
*/
|
|
1972
|
+
stepsAllow: function (stepsAllowRequest, options) {
|
|
1973
|
+
return localVarFp.stepsAllow(stepsAllowRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1974
|
+
},
|
|
1975
|
+
/**
|
|
1976
|
+
*
|
|
1977
|
+
* @summary Retorna todas as steps existentes
|
|
1978
|
+
* @param {string} [promotionId] UUID da promoção
|
|
1979
|
+
* @param {*} [options] Override http request option.
|
|
1980
|
+
* @throws {RequiredError}
|
|
1981
|
+
*/
|
|
1982
|
+
stepsIndex: function (promotionId, options) {
|
|
1983
|
+
return localVarFp.stepsIndex(promotionId, options).then(function (request) { return request(axios, basePath); });
|
|
1984
|
+
},
|
|
1985
|
+
/**
|
|
1986
|
+
*
|
|
1987
|
+
* @summary Remove uma Step de um determinado endpoint
|
|
1988
|
+
* @param {StepsAllowRequest} [stepsAllowRequest]
|
|
1989
|
+
* @param {*} [options] Override http request option.
|
|
1990
|
+
* @throws {RequiredError}
|
|
1991
|
+
*/
|
|
1992
|
+
stepsUnallow: function (stepsAllowRequest, options) {
|
|
1993
|
+
return localVarFp.stepsUnallow(stepsAllowRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1994
|
+
},
|
|
1995
|
+
};
|
|
1996
|
+
};
|
|
1997
|
+
exports.StepsApiFactory = StepsApiFactory;
|
|
1998
|
+
/**
|
|
1999
|
+
* StepsApi - object-oriented interface
|
|
2000
|
+
* @export
|
|
2001
|
+
* @class StepsApi
|
|
2002
|
+
* @extends {BaseAPI}
|
|
2003
|
+
*/
|
|
2004
|
+
var StepsApi = /** @class */ (function (_super) {
|
|
2005
|
+
__extends(StepsApi, _super);
|
|
2006
|
+
function StepsApi() {
|
|
2007
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2008
|
+
}
|
|
2009
|
+
/**
|
|
2010
|
+
*
|
|
2011
|
+
* @summary Inclui uma Step em um determinado endpoint
|
|
2012
|
+
* @param {StepsAllowRequest} [stepsAllowRequest]
|
|
2013
|
+
* @param {*} [options] Override http request option.
|
|
2014
|
+
* @throws {RequiredError}
|
|
2015
|
+
* @memberof StepsApi
|
|
2016
|
+
*/
|
|
2017
|
+
StepsApi.prototype.stepsAllow = function (stepsAllowRequest, options) {
|
|
2018
|
+
var _this = this;
|
|
2019
|
+
return (0, exports.StepsApiFp)(this.configuration).stepsAllow(stepsAllowRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2020
|
+
};
|
|
2021
|
+
/**
|
|
2022
|
+
*
|
|
2023
|
+
* @summary Retorna todas as steps existentes
|
|
2024
|
+
* @param {string} [promotionId] UUID da promoção
|
|
2025
|
+
* @param {*} [options] Override http request option.
|
|
2026
|
+
* @throws {RequiredError}
|
|
2027
|
+
* @memberof StepsApi
|
|
2028
|
+
*/
|
|
2029
|
+
StepsApi.prototype.stepsIndex = function (promotionId, options) {
|
|
2030
|
+
var _this = this;
|
|
2031
|
+
return (0, exports.StepsApiFp)(this.configuration).stepsIndex(promotionId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2032
|
+
};
|
|
2033
|
+
/**
|
|
2034
|
+
*
|
|
2035
|
+
* @summary Remove uma Step de um determinado endpoint
|
|
2036
|
+
* @param {StepsAllowRequest} [stepsAllowRequest]
|
|
2037
|
+
* @param {*} [options] Override http request option.
|
|
2038
|
+
* @throws {RequiredError}
|
|
2039
|
+
* @memberof StepsApi
|
|
2040
|
+
*/
|
|
2041
|
+
StepsApi.prototype.stepsUnallow = function (stepsAllowRequest, options) {
|
|
2042
|
+
var _this = this;
|
|
2043
|
+
return (0, exports.StepsApiFp)(this.configuration).stepsUnallow(stepsAllowRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2044
|
+
};
|
|
2045
|
+
return StepsApi;
|
|
2046
|
+
}(base_1.BaseAPI));
|
|
2047
|
+
exports.StepsApi = StepsApi;
|
|
2048
|
+
/**
|
|
2049
|
+
* UserApi - axios parameter creator
|
|
2050
|
+
* @export
|
|
2051
|
+
*/
|
|
2052
|
+
var UserApiAxiosParamCreator = function (configuration) {
|
|
2053
|
+
var _this = this;
|
|
2054
|
+
return {
|
|
2055
|
+
/**
|
|
2056
|
+
*
|
|
2057
|
+
* @summary Dar permissões a um usuário na API
|
|
2058
|
+
* @param {UserGrantPermissionsRequest} [userGrantPermissionsRequest]
|
|
2059
|
+
* @param {*} [options] Override http request option.
|
|
2060
|
+
* @throws {RequiredError}
|
|
2061
|
+
*/
|
|
2062
|
+
userGrantPermissions: function (userGrantPermissionsRequest_1) {
|
|
2063
|
+
var args_1 = [];
|
|
2064
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2065
|
+
args_1[_i - 1] = arguments[_i];
|
|
2066
|
+
}
|
|
2067
|
+
return __awaiter(_this, __spreadArray([userGrantPermissionsRequest_1], args_1, true), void 0, function (userGrantPermissionsRequest, options) {
|
|
2068
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2069
|
+
if (options === void 0) { options = {}; }
|
|
2070
|
+
return __generator(this, function (_a) {
|
|
2071
|
+
switch (_a.label) {
|
|
2072
|
+
case 0:
|
|
2073
|
+
localVarPath = "/v3/admin/user/grantpermissions";
|
|
2074
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2075
|
+
if (configuration) {
|
|
2076
|
+
baseOptions = configuration.baseOptions;
|
|
2077
|
+
}
|
|
2078
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
2079
|
+
localVarHeaderParameter = {};
|
|
2080
|
+
localVarQueryParameter = {};
|
|
2081
|
+
// authentication bearerAuth required
|
|
2082
|
+
// http bearer authentication required
|
|
2083
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
2084
|
+
case 1:
|
|
2085
|
+
// authentication bearerAuth required
|
|
2086
|
+
// http bearer authentication required
|
|
2087
|
+
_a.sent();
|
|
2088
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2089
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2090
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2091
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2092
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userGrantPermissionsRequest, localVarRequestOptions, configuration);
|
|
2093
|
+
return [2 /*return*/, {
|
|
2094
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2095
|
+
options: localVarRequestOptions,
|
|
2096
|
+
}];
|
|
2097
|
+
}
|
|
2098
|
+
});
|
|
2099
|
+
});
|
|
2100
|
+
},
|
|
2101
|
+
/**
|
|
2102
|
+
*
|
|
2103
|
+
* @summary Registrar usuário na API
|
|
2104
|
+
* @param {UserRegisterRequest} [userRegisterRequest]
|
|
2105
|
+
* @param {*} [options] Override http request option.
|
|
2106
|
+
* @throws {RequiredError}
|
|
2107
|
+
*/
|
|
2108
|
+
userRegister: function (userRegisterRequest_1) {
|
|
2109
|
+
var args_1 = [];
|
|
2110
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2111
|
+
args_1[_i - 1] = arguments[_i];
|
|
2112
|
+
}
|
|
2113
|
+
return __awaiter(_this, __spreadArray([userRegisterRequest_1], args_1, true), void 0, function (userRegisterRequest, options) {
|
|
2114
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2115
|
+
if (options === void 0) { options = {}; }
|
|
2116
|
+
return __generator(this, function (_a) {
|
|
2117
|
+
switch (_a.label) {
|
|
2118
|
+
case 0:
|
|
2119
|
+
localVarPath = "/v3/admin/user/register";
|
|
2120
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2121
|
+
if (configuration) {
|
|
2122
|
+
baseOptions = configuration.baseOptions;
|
|
2123
|
+
}
|
|
2124
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
2125
|
+
localVarHeaderParameter = {};
|
|
2126
|
+
localVarQueryParameter = {};
|
|
2127
|
+
// authentication bearerAuth required
|
|
2128
|
+
// http bearer authentication required
|
|
2129
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
2130
|
+
case 1:
|
|
2131
|
+
// authentication bearerAuth required
|
|
2132
|
+
// http bearer authentication required
|
|
2133
|
+
_a.sent();
|
|
2134
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2135
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2136
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2137
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2138
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userRegisterRequest, localVarRequestOptions, configuration);
|
|
2139
|
+
return [2 /*return*/, {
|
|
2140
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2141
|
+
options: localVarRequestOptions,
|
|
2142
|
+
}];
|
|
2143
|
+
}
|
|
2144
|
+
});
|
|
2145
|
+
});
|
|
2146
|
+
},
|
|
2147
|
+
/**
|
|
2148
|
+
*
|
|
2149
|
+
* @summary Visualizar dados do usuário na API
|
|
2150
|
+
* @param {string} uuid UUID do usuário a ser visualizado
|
|
2151
|
+
* @param {*} [options] Override http request option.
|
|
2152
|
+
* @throws {RequiredError}
|
|
2153
|
+
*/
|
|
2154
|
+
userShow: function (uuid_1) {
|
|
2155
|
+
var args_1 = [];
|
|
2156
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2157
|
+
args_1[_i - 1] = arguments[_i];
|
|
2158
|
+
}
|
|
2159
|
+
return __awaiter(_this, __spreadArray([uuid_1], args_1, true), void 0, function (uuid, options) {
|
|
2160
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2161
|
+
if (options === void 0) { options = {}; }
|
|
2162
|
+
return __generator(this, function (_a) {
|
|
2163
|
+
switch (_a.label) {
|
|
2164
|
+
case 0:
|
|
2165
|
+
// verify required parameter 'uuid' is not null or undefined
|
|
2166
|
+
(0, common_1.assertParamExists)('userShow', 'uuid', uuid);
|
|
2167
|
+
localVarPath = "/v3/admin/user/{uuid}"
|
|
2168
|
+
.replace("{".concat("uuid", "}"), encodeURIComponent(String(uuid)));
|
|
2169
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2170
|
+
if (configuration) {
|
|
2171
|
+
baseOptions = configuration.baseOptions;
|
|
2172
|
+
}
|
|
2173
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
2174
|
+
localVarHeaderParameter = {};
|
|
2175
|
+
localVarQueryParameter = {};
|
|
2176
|
+
// authentication bearerAuth required
|
|
2177
|
+
// http bearer authentication required
|
|
2178
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
2179
|
+
case 1:
|
|
2180
|
+
// authentication bearerAuth required
|
|
2181
|
+
// http bearer authentication required
|
|
2182
|
+
_a.sent();
|
|
2183
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2184
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2185
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2186
|
+
return [2 /*return*/, {
|
|
2187
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2188
|
+
options: localVarRequestOptions,
|
|
2189
|
+
}];
|
|
2190
|
+
}
|
|
2191
|
+
});
|
|
2192
|
+
});
|
|
2193
|
+
},
|
|
2194
|
+
/**
|
|
2195
|
+
*
|
|
2196
|
+
* @summary Atualizar nome do usuário na API
|
|
2197
|
+
* @param {string} uuid UUID do usuário a ser atualizado
|
|
2198
|
+
* @param {UserUpdateRequest} [userUpdateRequest]
|
|
2199
|
+
* @param {*} [options] Override http request option.
|
|
2200
|
+
* @throws {RequiredError}
|
|
2201
|
+
*/
|
|
2202
|
+
userUpdate: function (uuid_1, userUpdateRequest_1) {
|
|
2203
|
+
var args_1 = [];
|
|
2204
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
2205
|
+
args_1[_i - 2] = arguments[_i];
|
|
2206
|
+
}
|
|
2207
|
+
return __awaiter(_this, __spreadArray([uuid_1, userUpdateRequest_1], args_1, true), void 0, function (uuid, userUpdateRequest, options) {
|
|
2208
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2209
|
+
if (options === void 0) { options = {}; }
|
|
2210
|
+
return __generator(this, function (_a) {
|
|
2211
|
+
switch (_a.label) {
|
|
2212
|
+
case 0:
|
|
2213
|
+
// verify required parameter 'uuid' is not null or undefined
|
|
2214
|
+
(0, common_1.assertParamExists)('userUpdate', 'uuid', uuid);
|
|
2215
|
+
localVarPath = "/v3/admin/user/{uuid}"
|
|
2216
|
+
.replace("{".concat("uuid", "}"), encodeURIComponent(String(uuid)));
|
|
2217
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2218
|
+
if (configuration) {
|
|
2219
|
+
baseOptions = configuration.baseOptions;
|
|
2220
|
+
}
|
|
2221
|
+
localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
|
|
2222
|
+
localVarHeaderParameter = {};
|
|
2223
|
+
localVarQueryParameter = {};
|
|
2224
|
+
// authentication bearerAuth required
|
|
2225
|
+
// http bearer authentication required
|
|
2226
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
2227
|
+
case 1:
|
|
2228
|
+
// authentication bearerAuth required
|
|
2229
|
+
// http bearer authentication required
|
|
2230
|
+
_a.sent();
|
|
2231
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2232
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2233
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2234
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2235
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userUpdateRequest, localVarRequestOptions, configuration);
|
|
2236
|
+
return [2 /*return*/, {
|
|
2237
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2238
|
+
options: localVarRequestOptions,
|
|
2239
|
+
}];
|
|
2240
|
+
}
|
|
2241
|
+
});
|
|
2242
|
+
});
|
|
2243
|
+
},
|
|
2244
|
+
};
|
|
2245
|
+
};
|
|
2246
|
+
exports.UserApiAxiosParamCreator = UserApiAxiosParamCreator;
|
|
2247
|
+
/**
|
|
2248
|
+
* UserApi - functional programming interface
|
|
2249
|
+
* @export
|
|
2250
|
+
*/
|
|
2251
|
+
var UserApiFp = function (configuration) {
|
|
2252
|
+
var localVarAxiosParamCreator = (0, exports.UserApiAxiosParamCreator)(configuration);
|
|
2253
|
+
return {
|
|
2254
|
+
/**
|
|
2255
|
+
*
|
|
2256
|
+
* @summary Dar permissões a um usuário na API
|
|
2257
|
+
* @param {UserGrantPermissionsRequest} [userGrantPermissionsRequest]
|
|
2258
|
+
* @param {*} [options] Override http request option.
|
|
2259
|
+
* @throws {RequiredError}
|
|
2260
|
+
*/
|
|
2261
|
+
userGrantPermissions: function (userGrantPermissionsRequest, options) {
|
|
2262
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2263
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2264
|
+
var _a, _b, _c;
|
|
2265
|
+
return __generator(this, function (_d) {
|
|
2266
|
+
switch (_d.label) {
|
|
2267
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.userGrantPermissions(userGrantPermissionsRequest, options)];
|
|
2268
|
+
case 1:
|
|
2269
|
+
localVarAxiosArgs = _d.sent();
|
|
2270
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2271
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UserApi.userGrantPermissions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2272
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2273
|
+
}
|
|
2274
|
+
});
|
|
2275
|
+
});
|
|
2276
|
+
},
|
|
2277
|
+
/**
|
|
2278
|
+
*
|
|
2279
|
+
* @summary Registrar usuário na API
|
|
2280
|
+
* @param {UserRegisterRequest} [userRegisterRequest]
|
|
2281
|
+
* @param {*} [options] Override http request option.
|
|
2282
|
+
* @throws {RequiredError}
|
|
2283
|
+
*/
|
|
2284
|
+
userRegister: function (userRegisterRequest, options) {
|
|
2285
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2286
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2287
|
+
var _a, _b, _c;
|
|
2288
|
+
return __generator(this, function (_d) {
|
|
2289
|
+
switch (_d.label) {
|
|
2290
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.userRegister(userRegisterRequest, options)];
|
|
2291
|
+
case 1:
|
|
2292
|
+
localVarAxiosArgs = _d.sent();
|
|
2293
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2294
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UserApi.userRegister']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2295
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2296
|
+
}
|
|
2297
|
+
});
|
|
2298
|
+
});
|
|
2299
|
+
},
|
|
2300
|
+
/**
|
|
2301
|
+
*
|
|
2302
|
+
* @summary Visualizar dados do usuário na API
|
|
2303
|
+
* @param {string} uuid UUID do usuário a ser visualizado
|
|
2304
|
+
* @param {*} [options] Override http request option.
|
|
2305
|
+
* @throws {RequiredError}
|
|
2306
|
+
*/
|
|
2307
|
+
userShow: function (uuid, options) {
|
|
2308
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2309
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2310
|
+
var _a, _b, _c;
|
|
2311
|
+
return __generator(this, function (_d) {
|
|
2312
|
+
switch (_d.label) {
|
|
2313
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.userShow(uuid, options)];
|
|
2314
|
+
case 1:
|
|
2315
|
+
localVarAxiosArgs = _d.sent();
|
|
2316
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2317
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UserApi.userShow']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2318
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2319
|
+
}
|
|
2320
|
+
});
|
|
2321
|
+
});
|
|
2322
|
+
},
|
|
2323
|
+
/**
|
|
2324
|
+
*
|
|
2325
|
+
* @summary Atualizar nome do usuário na API
|
|
2326
|
+
* @param {string} uuid UUID do usuário a ser atualizado
|
|
2327
|
+
* @param {UserUpdateRequest} [userUpdateRequest]
|
|
2328
|
+
* @param {*} [options] Override http request option.
|
|
2329
|
+
* @throws {RequiredError}
|
|
2330
|
+
*/
|
|
2331
|
+
userUpdate: function (uuid, userUpdateRequest, options) {
|
|
2332
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2333
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2334
|
+
var _a, _b, _c;
|
|
2335
|
+
return __generator(this, function (_d) {
|
|
2336
|
+
switch (_d.label) {
|
|
2337
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.userUpdate(uuid, userUpdateRequest, options)];
|
|
2338
|
+
case 1:
|
|
2339
|
+
localVarAxiosArgs = _d.sent();
|
|
2340
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2341
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UserApi.userUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2342
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2343
|
+
}
|
|
2344
|
+
});
|
|
2345
|
+
});
|
|
2346
|
+
},
|
|
2347
|
+
};
|
|
2348
|
+
};
|
|
2349
|
+
exports.UserApiFp = UserApiFp;
|
|
2350
|
+
/**
|
|
2351
|
+
* UserApi - factory interface
|
|
2352
|
+
* @export
|
|
2353
|
+
*/
|
|
2354
|
+
var UserApiFactory = function (configuration, basePath, axios) {
|
|
2355
|
+
var localVarFp = (0, exports.UserApiFp)(configuration);
|
|
2356
|
+
return {
|
|
2357
|
+
/**
|
|
2358
|
+
*
|
|
2359
|
+
* @summary Dar permissões a um usuário na API
|
|
2360
|
+
* @param {UserGrantPermissionsRequest} [userGrantPermissionsRequest]
|
|
2361
|
+
* @param {*} [options] Override http request option.
|
|
2362
|
+
* @throws {RequiredError}
|
|
2363
|
+
*/
|
|
2364
|
+
userGrantPermissions: function (userGrantPermissionsRequest, options) {
|
|
2365
|
+
return localVarFp.userGrantPermissions(userGrantPermissionsRequest, options).then(function (request) { return request(axios, basePath); });
|
|
2366
|
+
},
|
|
2367
|
+
/**
|
|
2368
|
+
*
|
|
2369
|
+
* @summary Registrar usuário na API
|
|
2370
|
+
* @param {UserRegisterRequest} [userRegisterRequest]
|
|
2371
|
+
* @param {*} [options] Override http request option.
|
|
2372
|
+
* @throws {RequiredError}
|
|
2373
|
+
*/
|
|
2374
|
+
userRegister: function (userRegisterRequest, options) {
|
|
2375
|
+
return localVarFp.userRegister(userRegisterRequest, options).then(function (request) { return request(axios, basePath); });
|
|
2376
|
+
},
|
|
2377
|
+
/**
|
|
2378
|
+
*
|
|
2379
|
+
* @summary Visualizar dados do usuário na API
|
|
2380
|
+
* @param {string} uuid UUID do usuário a ser visualizado
|
|
2381
|
+
* @param {*} [options] Override http request option.
|
|
2382
|
+
* @throws {RequiredError}
|
|
2383
|
+
*/
|
|
2384
|
+
userShow: function (uuid, options) {
|
|
2385
|
+
return localVarFp.userShow(uuid, options).then(function (request) { return request(axios, basePath); });
|
|
2386
|
+
},
|
|
2387
|
+
/**
|
|
2388
|
+
*
|
|
2389
|
+
* @summary Atualizar nome do usuário na API
|
|
2390
|
+
* @param {string} uuid UUID do usuário a ser atualizado
|
|
2391
|
+
* @param {UserUpdateRequest} [userUpdateRequest]
|
|
2392
|
+
* @param {*} [options] Override http request option.
|
|
2393
|
+
* @throws {RequiredError}
|
|
2394
|
+
*/
|
|
2395
|
+
userUpdate: function (uuid, userUpdateRequest, options) {
|
|
2396
|
+
return localVarFp.userUpdate(uuid, userUpdateRequest, options).then(function (request) { return request(axios, basePath); });
|
|
2397
|
+
},
|
|
2398
|
+
};
|
|
2399
|
+
};
|
|
2400
|
+
exports.UserApiFactory = UserApiFactory;
|
|
2401
|
+
/**
|
|
2402
|
+
* UserApi - object-oriented interface
|
|
2403
|
+
* @export
|
|
2404
|
+
* @class UserApi
|
|
2405
|
+
* @extends {BaseAPI}
|
|
2406
|
+
*/
|
|
2407
|
+
var UserApi = /** @class */ (function (_super) {
|
|
2408
|
+
__extends(UserApi, _super);
|
|
2409
|
+
function UserApi() {
|
|
2410
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2411
|
+
}
|
|
2412
|
+
/**
|
|
2413
|
+
*
|
|
2414
|
+
* @summary Dar permissões a um usuário na API
|
|
2415
|
+
* @param {UserGrantPermissionsRequest} [userGrantPermissionsRequest]
|
|
2416
|
+
* @param {*} [options] Override http request option.
|
|
2417
|
+
* @throws {RequiredError}
|
|
2418
|
+
* @memberof UserApi
|
|
2419
|
+
*/
|
|
2420
|
+
UserApi.prototype.userGrantPermissions = function (userGrantPermissionsRequest, options) {
|
|
2421
|
+
var _this = this;
|
|
2422
|
+
return (0, exports.UserApiFp)(this.configuration).userGrantPermissions(userGrantPermissionsRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2423
|
+
};
|
|
2424
|
+
/**
|
|
2425
|
+
*
|
|
2426
|
+
* @summary Registrar usuário na API
|
|
2427
|
+
* @param {UserRegisterRequest} [userRegisterRequest]
|
|
2428
|
+
* @param {*} [options] Override http request option.
|
|
2429
|
+
* @throws {RequiredError}
|
|
2430
|
+
* @memberof UserApi
|
|
2431
|
+
*/
|
|
2432
|
+
UserApi.prototype.userRegister = function (userRegisterRequest, options) {
|
|
2433
|
+
var _this = this;
|
|
2434
|
+
return (0, exports.UserApiFp)(this.configuration).userRegister(userRegisterRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2435
|
+
};
|
|
2436
|
+
/**
|
|
2437
|
+
*
|
|
2438
|
+
* @summary Visualizar dados do usuário na API
|
|
2439
|
+
* @param {string} uuid UUID do usuário a ser visualizado
|
|
2440
|
+
* @param {*} [options] Override http request option.
|
|
2441
|
+
* @throws {RequiredError}
|
|
2442
|
+
* @memberof UserApi
|
|
2443
|
+
*/
|
|
2444
|
+
UserApi.prototype.userShow = function (uuid, options) {
|
|
2445
|
+
var _this = this;
|
|
2446
|
+
return (0, exports.UserApiFp)(this.configuration).userShow(uuid, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2447
|
+
};
|
|
2448
|
+
/**
|
|
2449
|
+
*
|
|
2450
|
+
* @summary Atualizar nome do usuário na API
|
|
2451
|
+
* @param {string} uuid UUID do usuário a ser atualizado
|
|
2452
|
+
* @param {UserUpdateRequest} [userUpdateRequest]
|
|
2453
|
+
* @param {*} [options] Override http request option.
|
|
2454
|
+
* @throws {RequiredError}
|
|
2455
|
+
* @memberof UserApi
|
|
2456
|
+
*/
|
|
2457
|
+
UserApi.prototype.userUpdate = function (uuid, userUpdateRequest, options) {
|
|
2458
|
+
var _this = this;
|
|
2459
|
+
return (0, exports.UserApiFp)(this.configuration).userUpdate(uuid, userUpdateRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2460
|
+
};
|
|
2461
|
+
return UserApi;
|
|
2462
|
+
}(base_1.BaseAPI));
|
|
2463
|
+
exports.UserApi = UserApi;
|