@tradecafe/offer-service-sdk 0.0.8 → 0.0.10

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.
@@ -1,15 +1,15 @@
1
- .gitignore
2
- .openapi-generator-ignore
3
- api.ts
4
- api/apis.ts
5
- api/futureBidsApi.ts
6
- api/healthApi.ts
7
- api/matchedOffersApi.ts
8
- api/offersApi.ts
9
- git_push.sh
10
- model/healthControllerPing200Response.ts
11
- model/healthControllerPing200ResponseInfoValue.ts
12
- model/healthControllerPing503Response.ts
13
- model/models.ts
14
- package.json
15
- tsconfig.json
1
+ .gitignore
2
+ .openapi-generator-ignore
3
+ api.ts
4
+ api/apis.ts
5
+ api/futureBidsApi.ts
6
+ api/healthApi.ts
7
+ api/matchedOffersApi.ts
8
+ api/offersApi.ts
9
+ git_push.sh
10
+ model/healthControllerPing200Response.ts
11
+ model/healthControllerPing200ResponseInfoValue.ts
12
+ model/healthControllerPing503Response.ts
13
+ model/models.ts
14
+ package.json
15
+ tsconfig.json
@@ -668,6 +668,74 @@ export class MatchedOffersApi {
668
668
  });
669
669
  });
670
670
  }
671
+ /**
672
+ *
673
+ * @summary Logs a user\'s view of a matched offer
674
+ * @param id
675
+ * @param account
676
+ */
677
+ public async matchedOffersControllerLogview (id: string, account: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
678
+ const localVarPath = this.basePath + '/matched-offers/{account}/{id}/view'
679
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)))
680
+ .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
681
+ let localVarQueryParameters: any = {};
682
+ let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
683
+ let localVarFormParams: any = {};
684
+
685
+ // verify required parameter 'id' is not null or undefined
686
+ if (id === null || id === undefined) {
687
+ throw new Error('Required parameter id was null or undefined when calling matchedOffersControllerLogview.');
688
+ }
689
+
690
+ // verify required parameter 'account' is not null or undefined
691
+ if (account === null || account === undefined) {
692
+ throw new Error('Required parameter account was null or undefined when calling matchedOffersControllerLogview.');
693
+ }
694
+
695
+ (<any>Object).assign(localVarHeaderParams, options.headers);
696
+
697
+ let localVarUseFormData = false;
698
+
699
+ let localVarRequestOptions: localVarRequest.Options = {
700
+ method: 'POST',
701
+ qs: localVarQueryParameters,
702
+ headers: localVarHeaderParams,
703
+ uri: localVarPath,
704
+ useQuerystring: this._useQuerystring,
705
+ json: true,
706
+ };
707
+
708
+ let authenticationPromise = Promise.resolve();
709
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
710
+
711
+ let interceptorPromise = authenticationPromise;
712
+ for (const interceptor of this.interceptors) {
713
+ interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
714
+ }
715
+
716
+ return interceptorPromise.then(() => {
717
+ if (Object.keys(localVarFormParams).length) {
718
+ if (localVarUseFormData) {
719
+ (<any>localVarRequestOptions).formData = localVarFormParams;
720
+ } else {
721
+ localVarRequestOptions.form = localVarFormParams;
722
+ }
723
+ }
724
+ return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
725
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
726
+ if (error) {
727
+ reject(error);
728
+ } else {
729
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
730
+ resolve({ response: response, body: body });
731
+ } else {
732
+ reject(new HttpError(response, body, response.statusCode));
733
+ }
734
+ }
735
+ });
736
+ });
737
+ });
738
+ }
671
739
  /**
672
740
  *
673
741
  * @summary Removes the matched offer with the provided ID
@@ -806,7 +874,7 @@ export class MatchedOffersApi {
806
874
  }
807
875
  /**
808
876
  *
809
- * @summary Set confirmation index for the matched offer with the provided ID
877
+ * @summary Sets confirmation index for the matched offer with the provided ID
810
878
  * @param id
811
879
  * @param account
812
880
  * @param body
package/api/offersApi.ts CHANGED
@@ -237,7 +237,7 @@ export class OffersApi {
237
237
  }
238
238
  /**
239
239
  *
240
- * @summary Attach matched offers to the offer
240
+ * @summary Attach matched offer(s) to the offer
241
241
  * @param id
242
242
  * @param account
243
243
  * @param body
@@ -312,7 +312,7 @@ export class OffersApi {
312
312
  }
313
313
  /**
314
314
  *
315
- * @summary Cancel the offer with the provided ID
315
+ * @summary Cancel the offers with the provided IDs
316
316
  * @param account
317
317
  * @param body
318
318
  */
@@ -338,7 +338,7 @@ export class OffersApi {
338
338
  let localVarUseFormData = false;
339
339
 
340
340
  let localVarRequestOptions: localVarRequest.Options = {
341
- method: 'GET',
341
+ method: 'PUT',
342
342
  qs: localVarQueryParameters,
343
343
  headers: localVarHeaderParams,
344
344
  uri: localVarPath,
@@ -1303,7 +1303,7 @@ export class OffersApi {
1303
1303
  }
1304
1304
  /**
1305
1305
  *
1306
- * @summary Updates the offer status with the provided ID
1306
+ * @summary Updates the offer status of offers with the provided IDs
1307
1307
  * @param account
1308
1308
  * @param body
1309
1309
  */
@@ -1371,7 +1371,7 @@ export class OffersApi {
1371
1371
  }
1372
1372
  /**
1373
1373
  *
1374
- * @summary Validate the status with the provided ID
1374
+ * @summary Validate the status update for offers with the provided IDs
1375
1375
  * @param account
1376
1376
  * @param body
1377
1377
  */
@@ -1,18 +1,18 @@
1
- /// <reference types="node" />
2
- export * from './futureBidsApi';
3
- import { FutureBidsApi } from './futureBidsApi';
4
- export * from './healthApi';
5
- import { HealthApi } from './healthApi';
6
- export * from './matchedOffersApi';
7
- import { MatchedOffersApi } from './matchedOffersApi';
8
- export * from './offersApi';
9
- import { OffersApi } from './offersApi';
10
- import * as http from 'http';
11
- export declare class HttpError extends Error {
12
- response: http.IncomingMessage;
13
- body: any;
14
- statusCode?: number | undefined;
15
- constructor(response: http.IncomingMessage, body: any, statusCode?: number | undefined);
16
- }
17
- export { RequestFile } from '../model/models';
18
- export declare const APIS: (typeof FutureBidsApi | typeof HealthApi | typeof MatchedOffersApi | typeof OffersApi)[];
1
+ /// <reference types="node" />
2
+ export * from './futureBidsApi';
3
+ import { FutureBidsApi } from './futureBidsApi';
4
+ export * from './healthApi';
5
+ import { HealthApi } from './healthApi';
6
+ export * from './matchedOffersApi';
7
+ import { MatchedOffersApi } from './matchedOffersApi';
8
+ export * from './offersApi';
9
+ import { OffersApi } from './offersApi';
10
+ import * as http from 'http';
11
+ export declare class HttpError extends Error {
12
+ response: http.IncomingMessage;
13
+ body: any;
14
+ statusCode?: number | undefined;
15
+ constructor(response: http.IncomingMessage, body: any, statusCode?: number | undefined);
16
+ }
17
+ export { RequestFile } from '../model/models';
18
+ export declare const APIS: (typeof FutureBidsApi | typeof HealthApi | typeof MatchedOffersApi | typeof OffersApi)[];
package/dist/api/apis.js CHANGED
@@ -1,55 +1,55 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- var desc = Object.getOwnPropertyDescriptor(m, k);
20
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
- desc = { enumerable: true, get: function() { return m[k]; } };
22
- }
23
- Object.defineProperty(o, k2, desc);
24
- }) : (function(o, m, k, k2) {
25
- if (k2 === undefined) k2 = k;
26
- o[k2] = m[k];
27
- }));
28
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.APIS = exports.HttpError = void 0;
33
- __exportStar(require("./futureBidsApi"), exports);
34
- var futureBidsApi_1 = require("./futureBidsApi");
35
- __exportStar(require("./healthApi"), exports);
36
- var healthApi_1 = require("./healthApi");
37
- __exportStar(require("./matchedOffersApi"), exports);
38
- var matchedOffersApi_1 = require("./matchedOffersApi");
39
- __exportStar(require("./offersApi"), exports);
40
- var offersApi_1 = require("./offersApi");
41
- var HttpError = (function (_super) {
42
- __extends(HttpError, _super);
43
- function HttpError(response, body, statusCode) {
44
- var _this = _super.call(this, 'HTTP request failed') || this;
45
- _this.response = response;
46
- _this.body = body;
47
- _this.statusCode = statusCode;
48
- _this.name = 'HttpError';
49
- return _this;
50
- }
51
- return HttpError;
52
- }(Error));
53
- exports.HttpError = HttpError;
54
- exports.APIS = [futureBidsApi_1.FutureBidsApi, healthApi_1.HealthApi, matchedOffersApi_1.MatchedOffersApi, offersApi_1.OffersApi];
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.APIS = exports.HttpError = void 0;
33
+ __exportStar(require("./futureBidsApi"), exports);
34
+ var futureBidsApi_1 = require("./futureBidsApi");
35
+ __exportStar(require("./healthApi"), exports);
36
+ var healthApi_1 = require("./healthApi");
37
+ __exportStar(require("./matchedOffersApi"), exports);
38
+ var matchedOffersApi_1 = require("./matchedOffersApi");
39
+ __exportStar(require("./offersApi"), exports);
40
+ var offersApi_1 = require("./offersApi");
41
+ var HttpError = (function (_super) {
42
+ __extends(HttpError, _super);
43
+ function HttpError(response, body, statusCode) {
44
+ var _this = _super.call(this, 'HTTP request failed') || this;
45
+ _this.response = response;
46
+ _this.body = body;
47
+ _this.statusCode = statusCode;
48
+ _this.name = 'HttpError';
49
+ return _this;
50
+ }
51
+ return HttpError;
52
+ }(Error));
53
+ exports.HttpError = HttpError;
54
+ exports.APIS = [futureBidsApi_1.FutureBidsApi, healthApi_1.HealthApi, matchedOffersApi_1.MatchedOffersApi, offersApi_1.OffersApi];
55
55
  //# sourceMappingURL=apis.js.map
@@ -1,55 +1,55 @@
1
- /// <reference types="node" />
2
- import http from 'http';
3
- import { Authentication, Interceptor } from '../model/models';
4
- export declare enum FutureBidsApiApiKeys {
5
- }
6
- export declare class FutureBidsApi {
7
- protected _basePath: string;
8
- protected _defaultHeaders: any;
9
- protected _useQuerystring: boolean;
10
- protected authentications: {
11
- default: Authentication;
12
- };
13
- protected interceptors: Interceptor[];
14
- constructor(basePath?: string);
15
- set useQuerystring(value: boolean);
16
- set basePath(basePath: string);
17
- set defaultHeaders(defaultHeaders: any);
18
- get defaultHeaders(): any;
19
- get basePath(): string;
20
- setDefaultAuthentication(auth: Authentication): void;
21
- setApiKey(key: FutureBidsApiApiKeys, value: string): void;
22
- addInterceptor(interceptor: Interceptor): void;
23
- futureBidsControllerAddfuturebid(matchedOfferId: string, userId: string, account: string, body: object, options?: {
24
- headers: {
25
- [name: string]: string;
26
- };
27
- }): Promise<{
28
- response: http.IncomingMessage;
29
- body?: any;
30
- }>;
31
- futureBidsControllerFindall(account: string, body: object, skip?: number, limit?: number, sort?: string, options?: {
32
- headers: {
33
- [name: string]: string;
34
- };
35
- }): Promise<{
36
- response: http.IncomingMessage;
37
- body?: any;
38
- }>;
39
- futureBidsControllerRemovefuturebid(id: string, account: string, options?: {
40
- headers: {
41
- [name: string]: string;
42
- };
43
- }): Promise<{
44
- response: http.IncomingMessage;
45
- body?: any;
46
- }>;
47
- futureBidsControllerUpdate(id: string, account: string, body: object, options?: {
48
- headers: {
49
- [name: string]: string;
50
- };
51
- }): Promise<{
52
- response: http.IncomingMessage;
53
- body?: any;
54
- }>;
55
- }
1
+ /// <reference types="node" />
2
+ import http from 'http';
3
+ import { Authentication, Interceptor } from '../model/models';
4
+ export declare enum FutureBidsApiApiKeys {
5
+ }
6
+ export declare class FutureBidsApi {
7
+ protected _basePath: string;
8
+ protected _defaultHeaders: any;
9
+ protected _useQuerystring: boolean;
10
+ protected authentications: {
11
+ default: Authentication;
12
+ };
13
+ protected interceptors: Interceptor[];
14
+ constructor(basePath?: string);
15
+ set useQuerystring(value: boolean);
16
+ set basePath(basePath: string);
17
+ set defaultHeaders(defaultHeaders: any);
18
+ get defaultHeaders(): any;
19
+ get basePath(): string;
20
+ setDefaultAuthentication(auth: Authentication): void;
21
+ setApiKey(key: FutureBidsApiApiKeys, value: string): void;
22
+ addInterceptor(interceptor: Interceptor): void;
23
+ futureBidsControllerAddfuturebid(matchedOfferId: string, userId: string, account: string, body: object, options?: {
24
+ headers: {
25
+ [name: string]: string;
26
+ };
27
+ }): Promise<{
28
+ response: http.IncomingMessage;
29
+ body?: any;
30
+ }>;
31
+ futureBidsControllerFindall(account: string, body: object, skip?: number, limit?: number, sort?: string, options?: {
32
+ headers: {
33
+ [name: string]: string;
34
+ };
35
+ }): Promise<{
36
+ response: http.IncomingMessage;
37
+ body?: any;
38
+ }>;
39
+ futureBidsControllerRemovefuturebid(id: string, account: string, options?: {
40
+ headers: {
41
+ [name: string]: string;
42
+ };
43
+ }): Promise<{
44
+ response: http.IncomingMessage;
45
+ body?: any;
46
+ }>;
47
+ futureBidsControllerUpdate(id: string, account: string, body: object, options?: {
48
+ headers: {
49
+ [name: string]: string;
50
+ };
51
+ }): Promise<{
52
+ response: http.IncomingMessage;
53
+ body?: any;
54
+ }>;
55
+ }