@vaultgig/vaultgig-api-client 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @vaultgig/vaultgig-api-client@0.0.1
1
+ # @vaultgig/vaultgig-api-client@0.0.2
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -22,7 +22,11 @@ import type { CreateContractorRequest } from '@vaultgig/vaultgig-api-client';
22
22
 
23
23
  async function example() {
24
24
  console.log("🚀 Testing @vaultgig/vaultgig-api-client SDK...");
25
- const api = new ContractorsApi();
25
+ const config = new Configuration({
26
+ // Configure HTTP bearer authorization: ClerkAuth
27
+ accessToken: "YOUR BEARER TOKEN",
28
+ });
29
+ const api = new ContractorsApi(config);
26
30
 
27
31
  const body = {
28
32
  // string
@@ -82,8 +86,13 @@ All URIs are relative to *http://localhost*
82
86
 
83
87
  ### Authorization
84
88
 
85
- Endpoints do not require authorization.
86
89
 
90
+ Authentication schemes defined for the API:
91
+ <a id="ClerkAuth"></a>
92
+ #### ClerkAuth
93
+
94
+
95
+ - **Type**: HTTP Bearer Token authentication
87
96
 
88
97
  ## About
89
98
 
@@ -92,7 +101,7 @@ and is automatically generated by the
92
101
  [OpenAPI Generator](https://openapi-generator.tech) project:
93
102
 
94
103
  - API version: `1.0.0`
95
- - Package version: `0.0.1`
104
+ - Package version: `0.0.2`
96
105
  - Generator version: `7.18.0-SNAPSHOT`
97
106
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
98
107
 
@@ -81,7 +81,7 @@ var ContractorsApi = /** @class */ (function (_super) {
81
81
  */
82
82
  ContractorsApi.prototype.createContractorRaw = function (requestParameters, initOverrides) {
83
83
  return __awaiter(this, void 0, void 0, function () {
84
- var queryParameters, headerParameters, urlPath, response;
84
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
85
85
  return __generator(this, function (_a) {
86
86
  switch (_a.label) {
87
87
  case 0:
@@ -94,6 +94,16 @@ var ContractorsApi = /** @class */ (function (_super) {
94
94
  queryParameters = {};
95
95
  headerParameters = {};
96
96
  headerParameters['Content-Type'] = 'application/json';
97
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
98
+ token = this.configuration.accessToken;
99
+ return [4 /*yield*/, token("ClerkAuth", [])];
100
+ case 1:
101
+ tokenString = _a.sent();
102
+ if (tokenString) {
103
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
104
+ }
105
+ _a.label = 2;
106
+ case 2:
97
107
  urlPath = "/organization/{organization_id}/contractors";
98
108
  urlPath = urlPath.replace("{".concat("organization_id", "}"), encodeURIComponent(String(requestParameters['organizationId'])));
99
109
  return [4 /*yield*/, this.request({
@@ -103,7 +113,7 @@ var ContractorsApi = /** @class */ (function (_super) {
103
113
  query: queryParameters,
104
114
  body: (0, index_1.ContractorCreatePayloadToJSON)(requestParameters['contractorCreatePayload']),
105
115
  }, initOverrides)];
106
- case 1:
116
+ case 3:
107
117
  response = _a.sent();
108
118
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ResponseContractorCreateDataFromJSON)(jsonValue); })];
109
119
  }
@@ -134,7 +144,7 @@ var ContractorsApi = /** @class */ (function (_super) {
134
144
  */
135
145
  ContractorsApi.prototype.getContractorRaw = function (requestParameters, initOverrides) {
136
146
  return __awaiter(this, void 0, void 0, function () {
137
- var queryParameters, headerParameters, urlPath, response;
147
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
138
148
  return __generator(this, function (_a) {
139
149
  switch (_a.label) {
140
150
  case 0:
@@ -146,6 +156,16 @@ var ContractorsApi = /** @class */ (function (_super) {
146
156
  }
147
157
  queryParameters = {};
148
158
  headerParameters = {};
159
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
160
+ token = this.configuration.accessToken;
161
+ return [4 /*yield*/, token("ClerkAuth", [])];
162
+ case 1:
163
+ tokenString = _a.sent();
164
+ if (tokenString) {
165
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
166
+ }
167
+ _a.label = 2;
168
+ case 2:
149
169
  urlPath = "/organization/{organization_id}/contractors/{contractor_id}";
150
170
  urlPath = urlPath.replace("{".concat("contractor_id", "}"), encodeURIComponent(String(requestParameters['contractorId'])));
151
171
  urlPath = urlPath.replace("{".concat("organization_id", "}"), encodeURIComponent(String(requestParameters['organizationId'])));
@@ -155,7 +175,7 @@ var ContractorsApi = /** @class */ (function (_super) {
155
175
  headers: headerParameters,
156
176
  query: queryParameters,
157
177
  }, initOverrides)];
158
- case 1:
178
+ case 3:
159
179
  response = _a.sent();
160
180
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ResponseContractorDataFromJSON)(jsonValue); })];
161
181
  }
@@ -186,7 +206,7 @@ var ContractorsApi = /** @class */ (function (_super) {
186
206
  */
187
207
  ContractorsApi.prototype.getContractorsRaw = function (requestParameters, initOverrides) {
188
208
  return __awaiter(this, void 0, void 0, function () {
189
- var queryParameters, headerParameters, urlPath, response;
209
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
190
210
  return __generator(this, function (_a) {
191
211
  switch (_a.label) {
192
212
  case 0:
@@ -207,6 +227,16 @@ var ContractorsApi = /** @class */ (function (_super) {
207
227
  queryParameters['search'] = requestParameters['search'];
208
228
  }
209
229
  headerParameters = {};
230
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
231
+ token = this.configuration.accessToken;
232
+ return [4 /*yield*/, token("ClerkAuth", [])];
233
+ case 1:
234
+ tokenString = _a.sent();
235
+ if (tokenString) {
236
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
237
+ }
238
+ _a.label = 2;
239
+ case 2:
210
240
  urlPath = "/organization/{organization_id}/contractors";
211
241
  urlPath = urlPath.replace("{".concat("organization_id", "}"), encodeURIComponent(String(requestParameters['organizationId'])));
212
242
  return [4 /*yield*/, this.request({
@@ -215,7 +245,7 @@ var ContractorsApi = /** @class */ (function (_super) {
215
245
  headers: headerParameters,
216
246
  query: queryParameters,
217
247
  }, initOverrides)];
218
- case 1:
248
+ case 3:
219
249
  response = _a.sent();
220
250
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ResponsePaginatedResponseContractorResponseFromJSON)(jsonValue); })];
221
251
  }
@@ -246,7 +276,7 @@ var ContractorsApi = /** @class */ (function (_super) {
246
276
  */
247
277
  ContractorsApi.prototype.updateContractorRaw = function (requestParameters, initOverrides) {
248
278
  return __awaiter(this, void 0, void 0, function () {
249
- var queryParameters, headerParameters, urlPath, response;
279
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
250
280
  return __generator(this, function (_a) {
251
281
  switch (_a.label) {
252
282
  case 0:
@@ -262,6 +292,16 @@ var ContractorsApi = /** @class */ (function (_super) {
262
292
  queryParameters = {};
263
293
  headerParameters = {};
264
294
  headerParameters['Content-Type'] = 'application/json';
295
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
296
+ token = this.configuration.accessToken;
297
+ return [4 /*yield*/, token("ClerkAuth", [])];
298
+ case 1:
299
+ tokenString = _a.sent();
300
+ if (tokenString) {
301
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
302
+ }
303
+ _a.label = 2;
304
+ case 2:
265
305
  urlPath = "/organization/{organization_id}/contractors/{contractor_id}";
266
306
  urlPath = urlPath.replace("{".concat("contractor_id", "}"), encodeURIComponent(String(requestParameters['contractorId'])));
267
307
  urlPath = urlPath.replace("{".concat("organization_id", "}"), encodeURIComponent(String(requestParameters['organizationId'])));
@@ -272,7 +312,7 @@ var ContractorsApi = /** @class */ (function (_super) {
272
312
  query: queryParameters,
273
313
  body: (0, index_1.ContractorUpdatePayloadToJSON)(requestParameters['contractorUpdatePayload']),
274
314
  }, initOverrides)];
275
- case 1:
315
+ case 3:
276
316
  response = _a.sent();
277
317
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SuccessResponseFromJSON)(jsonValue); })];
278
318
  }
@@ -30,7 +30,11 @@ import type { CreateContractorRequest } from '@vaultgig/vaultgig-api-client';
30
30
 
31
31
  async function example() {
32
32
  console.log("🚀 Testing @vaultgig/vaultgig-api-client SDK...");
33
- const api = new ContractorsApi();
33
+ const config = new Configuration({
34
+ // Configure HTTP bearer authorization: ClerkAuth
35
+ accessToken: "YOUR BEARER TOKEN",
36
+ });
37
+ const api = new ContractorsApi(config);
34
38
 
35
39
  const body = {
36
40
  // string
@@ -65,7 +69,7 @@ example().catch(console.error);
65
69
 
66
70
  ### Authorization
67
71
 
68
- No authorization required
72
+ [ClerkAuth](../README.md#ClerkAuth)
69
73
 
70
74
  ### HTTP request headers
71
75
 
@@ -101,7 +105,11 @@ import type { GetContractorRequest } from '@vaultgig/vaultgig-api-client';
101
105
 
102
106
  async function example() {
103
107
  console.log("🚀 Testing @vaultgig/vaultgig-api-client SDK...");
104
- const api = new ContractorsApi();
108
+ const config = new Configuration({
109
+ // Configure HTTP bearer authorization: ClerkAuth
110
+ accessToken: "YOUR BEARER TOKEN",
111
+ });
112
+ const api = new ContractorsApi(config);
105
113
 
106
114
  const body = {
107
115
  // string
@@ -136,7 +144,7 @@ example().catch(console.error);
136
144
 
137
145
  ### Authorization
138
146
 
139
- No authorization required
147
+ [ClerkAuth](../README.md#ClerkAuth)
140
148
 
141
149
  ### HTTP request headers
142
150
 
@@ -172,7 +180,11 @@ import type { GetContractorsRequest } from '@vaultgig/vaultgig-api-client';
172
180
 
173
181
  async function example() {
174
182
  console.log("🚀 Testing @vaultgig/vaultgig-api-client SDK...");
175
- const api = new ContractorsApi();
183
+ const config = new Configuration({
184
+ // Configure HTTP bearer authorization: ClerkAuth
185
+ accessToken: "YOUR BEARER TOKEN",
186
+ });
187
+ const api = new ContractorsApi(config);
176
188
 
177
189
  const body = {
178
190
  // string
@@ -216,7 +228,7 @@ example().catch(console.error);
216
228
 
217
229
  ### Authorization
218
230
 
219
- No authorization required
231
+ [ClerkAuth](../README.md#ClerkAuth)
220
232
 
221
233
  ### HTTP request headers
222
234
 
@@ -252,7 +264,11 @@ import type { UpdateContractorRequest } from '@vaultgig/vaultgig-api-client';
252
264
 
253
265
  async function example() {
254
266
  console.log("🚀 Testing @vaultgig/vaultgig-api-client SDK...");
255
- const api = new ContractorsApi();
267
+ const config = new Configuration({
268
+ // Configure HTTP bearer authorization: ClerkAuth
269
+ accessToken: "YOUR BEARER TOKEN",
270
+ });
271
+ const api = new ContractorsApi(config);
256
272
 
257
273
  const body = {
258
274
  // string
@@ -290,7 +306,7 @@ example().catch(console.error);
290
306
 
291
307
  ### Authorization
292
308
 
293
- No authorization required
309
+ [ClerkAuth](../README.md#ClerkAuth)
294
310
 
295
311
  ### HTTP request headers
296
312
 
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@vaultgig/vaultgig-api-client",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "OpenAPI client for @vaultgig/vaultgig-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
9
9
  },
10
+ "license": "MIT",
10
11
  "main": "./dist/index.js",
11
12
  "types": "./dist/index.d.ts",
12
13
  "scripts": {
@@ -94,6 +94,14 @@ export class ContractorsApi extends runtime.BaseAPI {
94
94
 
95
95
  headerParameters['Content-Type'] = 'application/json';
96
96
 
97
+ if (this.configuration && this.configuration.accessToken) {
98
+ const token = this.configuration.accessToken;
99
+ const tokenString = await token("ClerkAuth", []);
100
+
101
+ if (tokenString) {
102
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
103
+ }
104
+ }
97
105
 
98
106
  let urlPath = `/organization/{organization_id}/contractors`;
99
107
  urlPath = urlPath.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
@@ -141,6 +149,14 @@ export class ContractorsApi extends runtime.BaseAPI {
141
149
 
142
150
  const headerParameters: runtime.HTTPHeaders = {};
143
151
 
152
+ if (this.configuration && this.configuration.accessToken) {
153
+ const token = this.configuration.accessToken;
154
+ const tokenString = await token("ClerkAuth", []);
155
+
156
+ if (tokenString) {
157
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
158
+ }
159
+ }
144
160
 
145
161
  let urlPath = `/organization/{organization_id}/contractors/{contractor_id}`;
146
162
  urlPath = urlPath.replace(`{${"contractor_id"}}`, encodeURIComponent(String(requestParameters['contractorId'])));
@@ -197,6 +213,14 @@ export class ContractorsApi extends runtime.BaseAPI {
197
213
 
198
214
  const headerParameters: runtime.HTTPHeaders = {};
199
215
 
216
+ if (this.configuration && this.configuration.accessToken) {
217
+ const token = this.configuration.accessToken;
218
+ const tokenString = await token("ClerkAuth", []);
219
+
220
+ if (tokenString) {
221
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
222
+ }
223
+ }
200
224
 
201
225
  let urlPath = `/organization/{organization_id}/contractors`;
202
226
  urlPath = urlPath.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
@@ -252,6 +276,14 @@ export class ContractorsApi extends runtime.BaseAPI {
252
276
 
253
277
  headerParameters['Content-Type'] = 'application/json';
254
278
 
279
+ if (this.configuration && this.configuration.accessToken) {
280
+ const token = this.configuration.accessToken;
281
+ const tokenString = await token("ClerkAuth", []);
282
+
283
+ if (tokenString) {
284
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
285
+ }
286
+ }
255
287
 
256
288
  let urlPath = `/organization/{organization_id}/contractors/{contractor_id}`;
257
289
  urlPath = urlPath.replace(`{${"contractor_id"}}`, encodeURIComponent(String(requestParameters['contractorId'])));