Skip to content

Commit 60b9daa

Browse files
committed
Fixed #291
1 parent 707a7da commit 60b9daa

File tree

181 files changed

+721
-201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+721
-201
lines changed

src/infrastructure/RestrictionHttp.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class RestrictionHttp extends Http implements RestrictionRepository {
108108
});
109109
return new MosaicAddressRestriction(
110110
payload.compositeHash,
111-
payload.entryType,
111+
payload.entryType.valueOf(),
112112
new MosaicId(payload.mosaicId),
113113
Address.createFromEncoded(payload.targetAddress),
114114
restirctionItems,
@@ -140,7 +140,7 @@ export class RestrictionHttp extends Http implements RestrictionRepository {
140140
});
141141
return new MosaicAddressRestriction(
142142
payload.mosaicRestrictionEntry.compositeHash,
143-
payload.mosaicRestrictionEntry.entryType,
143+
payload.mosaicRestrictionEntry.entryType.valueOf(),
144144
new MosaicId(payload.mosaicRestrictionEntry.mosaicId),
145145
Address.createFromEncoded(payload.mosaicRestrictionEntry.targetAddress),
146146
restirctionItems,
@@ -168,7 +168,7 @@ export class RestrictionHttp extends Http implements RestrictionRepository {
168168
new MosaicGlobalRestrictionItem(
169169
new MosaicId(restriction.restriction.referenceMosaicId),
170170
restriction.restriction.restrictionValue,
171-
restriction.restriction.restrictionType,
171+
restriction.restriction.restrictionType.valueOf(),
172172
)));
173173
return new MosaicGlobalRestriction(
174174
payload.compositeHash,
@@ -202,7 +202,7 @@ export class RestrictionHttp extends Http implements RestrictionRepository {
202202
new MosaicGlobalRestrictionItem(
203203
new MosaicId(restriction.restriction.referenceMosaicId),
204204
restriction.restriction.restrictionValue,
205-
restriction.restriction.restrictionType,
205+
restriction.restriction.restrictionType.valueOf(),
206206
)));
207207
return new MosaicGlobalRestriction(
208208
payload.mosaicRestrictionEntry.compositeHash,

src/infrastructure/api/accountRoutesApi.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Catapult REST Endpoints
1818
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1919
*
20-
* The version of the OpenAPI document: 0.7.18
20+
* The version of the OpenAPI document: 0.7.19
2121
*
2222
*
2323
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -262,8 +262,6 @@ export class AccountRoutesApi {
262262
statusMessage: response.statusMessage,
263263
}, body: response.body });
264264
}
265-
266-
reject();
267265
}
268266
});
269267
});

src/infrastructure/api/apis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Catapult REST Endpoints
1818
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1919
*
20-
* The version of the OpenAPI document: 0.7.18
20+
* The version of the OpenAPI document: 0.7.19
2121
*
2222
*
2323
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/infrastructure/api/blockRoutesApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Catapult REST Endpoints
1818
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1919
*
20-
* The version of the OpenAPI document: 0.7.18
20+
* The version of the OpenAPI document: 0.7.19
2121
*
2222
*
2323
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/infrastructure/api/chainRoutesApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Catapult REST Endpoints
1818
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1919
*
20-
* The version of the OpenAPI document: 0.7.18
20+
* The version of the OpenAPI document: 0.7.19
2121
*
2222
*
2323
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/infrastructure/api/diagnosticRoutesApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Catapult REST Endpoints
1818
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1919
*
20-
* The version of the OpenAPI document: 0.7.18
20+
* The version of the OpenAPI document: 0.7.19
2121
*
2222
*
2323
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/infrastructure/api/metadataRoutesApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Catapult REST Endpoints
1818
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1919
*
20-
* The version of the OpenAPI document: 0.7.18
20+
* The version of the OpenAPI document: 0.7.19
2121
*
2222
*
2323
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/infrastructure/api/mosaicRoutesApi.ts

Lines changed: 125 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Catapult REST Endpoints
1818
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1919
*
20-
* The version of the OpenAPI document: 0.7.18
20+
* The version of the OpenAPI document: 0.7.19
2121
*
2222
*
2323
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -29,6 +29,7 @@ import localVarRequest = require('request');
2929
import http = require('http');
3030

3131
/* tslint:disable:no-unused-locals */
32+
import { AccountIds } from '../model/accountIds';
3233
import { ModelError } from '../model/modelError';
3334
import { MosaicIds } from '../model/mosaicIds';
3435
import { MosaicInfoDTO } from '../model/mosaicInfoDTO';
@@ -205,6 +206,129 @@ export class MosaicRoutesApi {
205206
});
206207
});
207208
}
209+
/**
210+
* Gets an array of mosaics created for a given account address.
211+
* @summary Get mosaics created by an account
212+
* @param accountId Account public key or address.
213+
* @param pageSize Number of transactions to return for each request.
214+
* @param id Mosaic identifier up to which transactions are returned.
215+
*/
216+
public async getMosaicsFromAccount (accountId: string, pageSize?: number, id?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array<MosaicInfoDTO>; }> {
217+
const localVarPath = this.basePath + '/account/{accountId}/mosaics'
218+
.replace('{' + 'accountId' + '}', encodeURIComponent(String(accountId)));
219+
let localVarQueryParameters: any = {};
220+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
221+
let localVarFormParams: any = {};
222+
223+
// verify required parameter 'accountId' is not null or undefined
224+
if (accountId === null || accountId === undefined) {
225+
throw new Error('Required parameter accountId was null or undefined when calling getMosaicsFromAccount.');
226+
}
227+
228+
if (pageSize !== undefined) {
229+
localVarQueryParameters['pageSize'] = ObjectSerializer.serialize(pageSize, "number");
230+
}
231+
232+
if (id !== undefined) {
233+
localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string");
234+
}
235+
236+
(<any>Object).assign(localVarHeaderParams, options.headers);
237+
238+
let localVarUseFormData = false;
239+
240+
let localVarRequestOptions: localVarRequest.Options = {
241+
method: 'GET',
242+
qs: localVarQueryParameters,
243+
headers: localVarHeaderParams,
244+
uri: localVarPath,
245+
useQuerystring: this._useQuerystring,
246+
json: true,
247+
};
248+
249+
let authenticationPromise = Promise.resolve();
250+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
251+
return authenticationPromise.then(() => {
252+
if (Object.keys(localVarFormParams).length) {
253+
if (localVarUseFormData) {
254+
(<any>localVarRequestOptions).formData = localVarFormParams;
255+
} else {
256+
localVarRequestOptions.form = localVarFormParams;
257+
}
258+
}
259+
return new Promise<{ response: http.ClientResponse; body: Array<MosaicInfoDTO>; }>((resolve, reject) => {
260+
localVarRequest(localVarRequestOptions, (error, response, body) => {
261+
if (error) {
262+
reject(error);
263+
} else {
264+
body = ObjectSerializer.deserialize(body, "Array<MosaicInfoDTO>");
265+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
266+
resolve({ response: response, body: body });
267+
} else {
268+
reject({ response: {
269+
statusCode: response.statusCode,
270+
statusMessage: response.statusMessage,
271+
}, body: response.body });
272+
}
273+
}
274+
});
275+
});
276+
});
277+
}
278+
/**
279+
* Gets mosaics created for a given array of addresses.
280+
* @summary Get mosaics created for given array of addresses
281+
* @param accountIds
282+
*/
283+
public async getMosaicsFromAccounts (accountIds?: AccountIds, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array<MosaicInfoDTO>; }> {
284+
const localVarPath = this.basePath + '/account/mosaics';
285+
let localVarQueryParameters: any = {};
286+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
287+
let localVarFormParams: any = {};
288+
289+
(<any>Object).assign(localVarHeaderParams, options.headers);
290+
291+
let localVarUseFormData = false;
292+
293+
let localVarRequestOptions: localVarRequest.Options = {
294+
method: 'POST',
295+
qs: localVarQueryParameters,
296+
headers: localVarHeaderParams,
297+
uri: localVarPath,
298+
useQuerystring: this._useQuerystring,
299+
json: true,
300+
body: ObjectSerializer.serialize(accountIds, "AccountIds")
301+
};
302+
303+
let authenticationPromise = Promise.resolve();
304+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
305+
return authenticationPromise.then(() => {
306+
if (Object.keys(localVarFormParams).length) {
307+
if (localVarUseFormData) {
308+
(<any>localVarRequestOptions).formData = localVarFormParams;
309+
} else {
310+
localVarRequestOptions.form = localVarFormParams;
311+
}
312+
}
313+
return new Promise<{ response: http.ClientResponse; body: Array<MosaicInfoDTO>; }>((resolve, reject) => {
314+
localVarRequest(localVarRequestOptions, (error, response, body) => {
315+
if (error) {
316+
reject(error);
317+
} else {
318+
body = ObjectSerializer.deserialize(body, "Array<MosaicInfoDTO>");
319+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
320+
resolve({ response: response, body: body });
321+
} else {
322+
reject({ response: {
323+
statusCode: response.statusCode,
324+
statusMessage: response.statusMessage,
325+
}, body: response.body });
326+
}
327+
}
328+
});
329+
});
330+
});
331+
}
208332
/**
209333
* Returns friendly names for mosaics.
210334
* @summary Get readable names for a set of mosaics

src/infrastructure/api/namespaceRoutesApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Catapult REST Endpoints
1818
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1919
*
20-
* The version of the OpenAPI document: 0.7.18
20+
* The version of the OpenAPI document: 0.7.19
2121
*
2222
*
2323
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/infrastructure/api/networkRoutesApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Catapult REST Endpoints
1818
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1919
*
20-
* The version of the OpenAPI document: 0.7.18
20+
* The version of the OpenAPI document: 0.7.19
2121
*
2222
*
2323
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

0 commit comments

Comments
 (0)