@magda/minion-sdk 2.3.1 → 2.3.2-alpha.1
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/dist/index.d.ts +7 -4
- package/dist/index.js +17 -5
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -513,9 +513,10 @@ declare class RecordsApi {
|
|
|
513
513
|
* @param orderByDir Specify the order by direction. Either `asc` or `desc`
|
|
514
514
|
* @param orderNullFirst Specify whether nulls appear before (`true`) or after (`false`) non-null values in the sort ordering.
|
|
515
515
|
* @param reversePageTokenOrder When pagination via pageToken, by default, records with smaller pageToken (i.e. older records) will be returned first. When this parameter is set to `true`, higher pageToken records (newer records) will be returned.
|
|
516
|
+
* @param q full text search query
|
|
516
517
|
* @param xMagdaSession Magda internal session id
|
|
517
518
|
*/
|
|
518
|
-
getAll(xMagdaTenantId: number, aspect?: Array<string>, optionalAspect?: Array<string>, pageToken?: string, start?: number, limit?: number, dereference?: boolean, aspectQuery?: Array<string>, aspectOrQuery?: Array<string>, orderBy?: string, orderByDir?: string, orderNullFirst?: boolean, reversePageTokenOrder?: boolean, xMagdaSession?: string): Promise<{
|
|
519
|
+
getAll(xMagdaTenantId: number, aspect?: Array<string>, optionalAspect?: Array<string>, pageToken?: string, start?: number, limit?: number, dereference?: boolean, aspectQuery?: Array<string>, aspectOrQuery?: Array<string>, orderBy?: string, orderByDir?: string, orderNullFirst?: boolean, reversePageTokenOrder?: boolean, q?: string, xMagdaSession?: string): Promise<{
|
|
519
520
|
response: http.IncomingMessage;
|
|
520
521
|
body: Array<Record_2>;
|
|
521
522
|
}>;
|
|
@@ -527,9 +528,10 @@ declare class RecordsApi {
|
|
|
527
528
|
* @param start The index of the first record to retrieve. When possible, specify pageToken instead as it will result in better performance. If this parameter and pageToken are both specified, this parameter is interpreted as the index after the pageToken of the first record to retrieve.
|
|
528
529
|
* @param limit The maximum number of records to receive. The response will include a token that can be passed as the pageToken parameter to a future request to continue receiving results where this query leaves off.
|
|
529
530
|
* @param reversePageTokenOrder When pagination via pageToken, by default, records with smaller pageToken (i.e. older records) will be returned first. When this parameter is set to `true`, higher pageToken records (newer records) will be returned.
|
|
531
|
+
* @param q full text search query
|
|
530
532
|
* @param xMagdaSession Magda internal session id
|
|
531
533
|
*/
|
|
532
|
-
getAllSummary(xMagdaTenantId: number, pageToken?: string, start?: number, limit?: number, reversePageTokenOrder?: boolean, xMagdaSession?: string): Promise<{
|
|
534
|
+
getAllSummary(xMagdaTenantId: number, pageToken?: string, start?: number, limit?: number, reversePageTokenOrder?: boolean, q?: string, xMagdaSession?: string): Promise<{
|
|
533
535
|
response: http.IncomingMessage;
|
|
534
536
|
body: Array<RecordSummary>;
|
|
535
537
|
}>;
|
|
@@ -576,9 +578,10 @@ declare class RecordsApi {
|
|
|
576
578
|
* @param aspect The aspects for which to retrieve data, specified as multiple occurrences of this query parameter. Only records that have all of these aspects will be included in the response.
|
|
577
579
|
* @param aspectQuery Filter the records returned by a value within the aspect JSON. Expressed as 'aspectId.path.to.field:value', url encoded. NOTE: This is an early stage API and may change greatly in the future
|
|
578
580
|
* @param aspectOrQuery Filter the records returned by a value within the aspect JSON. Expressed as 'aspectId.path.to.field:value', url encoded. Queries passing via this parameter will be grouped with OR logic.
|
|
581
|
+
* @param q full text search query
|
|
579
582
|
* @param xMagdaSession Magda internal session id
|
|
580
583
|
*/
|
|
581
|
-
getCount(xMagdaTenantId: number, aspect?: Array<string>, aspectQuery?: Array<string>, aspectOrQuery?: Array<string>, xMagdaSession?: string): Promise<{
|
|
584
|
+
getCount(xMagdaTenantId: number, aspect?: Array<string>, aspectQuery?: Array<string>, aspectOrQuery?: Array<string>, q?: string, xMagdaSession?: string): Promise<{
|
|
582
585
|
response: http.IncomingMessage;
|
|
583
586
|
body: CountResponse;
|
|
584
587
|
}>;
|
|
@@ -707,7 +710,7 @@ declare class RegistryClient {
|
|
|
707
710
|
getRecord(id: string, aspect?: Array<string>, optionalAspect?: Array<string>, dereference?: boolean): Promise<Record_2 | ServerError>;
|
|
708
711
|
getRecordAspect(id: string, aspectId: string): Promise<any | ServerError>;
|
|
709
712
|
getRecordInFull(id: string): Promise<Record_2>;
|
|
710
|
-
getRecords<I extends Record_2>(aspect?: Array<string>, optionalAspect?: Array<string>, pageToken?: string, dereference?: boolean, limit?: number, aspectQueries?: string[], aspectOrQuery?: string[], orderBy?: string, orderByDir?: string, orderNullFirst?: boolean, reversePageTokenOrder?: boolean): Promise<RecordsPage<I> | ServerError>;
|
|
713
|
+
getRecords<I extends Record_2>(aspect?: Array<string>, optionalAspect?: Array<string>, pageToken?: string, dereference?: boolean, limit?: number, aspectQueries?: string[], aspectOrQuery?: string[], orderBy?: string, orderByDir?: string, orderNullFirst?: boolean, reversePageTokenOrder?: boolean, q?: string): Promise<RecordsPage<I> | ServerError>;
|
|
711
714
|
getRecordsPageTokens(aspect?: Array<string>, limit?: number): Promise<string[] | ServerError>;
|
|
712
715
|
}
|
|
713
716
|
|
package/dist/index.js
CHANGED
|
@@ -39203,9 +39203,10 @@ class RecordsApi {
|
|
|
39203
39203
|
* @param orderByDir Specify the order by direction. Either `asc` or `desc`
|
|
39204
39204
|
* @param orderNullFirst Specify whether nulls appear before (`true`) or after (`false`) non-null values in the sort ordering.
|
|
39205
39205
|
* @param reversePageTokenOrder When pagination via pageToken, by default, records with smaller pageToken (i.e. older records) will be returned first. When this parameter is set to `true`, higher pageToken records (newer records) will be returned.
|
|
39206
|
+
* @param q full text search query
|
|
39206
39207
|
* @param xMagdaSession Magda internal session id
|
|
39207
39208
|
*/
|
|
39208
|
-
getAll(xMagdaTenantId, aspect, optionalAspect, pageToken, start, limit, dereference, aspectQuery, aspectOrQuery, orderBy, orderByDir, orderNullFirst, reversePageTokenOrder, xMagdaSession) {
|
|
39209
|
+
getAll(xMagdaTenantId, aspect, optionalAspect, pageToken, start, limit, dereference, aspectQuery, aspectOrQuery, orderBy, orderByDir, orderNullFirst, reversePageTokenOrder, q, xMagdaSession) {
|
|
39209
39210
|
const localVarPath = this.basePath + '/records';
|
|
39210
39211
|
let queryParameters = {};
|
|
39211
39212
|
let headerParams = Object.assign({}, this.defaultHeaders);
|
|
@@ -39250,6 +39251,9 @@ class RecordsApi {
|
|
|
39250
39251
|
if (reversePageTokenOrder !== undefined) {
|
|
39251
39252
|
queryParameters['reversePageTokenOrder'] = reversePageTokenOrder;
|
|
39252
39253
|
}
|
|
39254
|
+
if (q !== undefined) {
|
|
39255
|
+
queryParameters['q'] = q;
|
|
39256
|
+
}
|
|
39253
39257
|
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
39254
39258
|
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
39255
39259
|
let useFormData = false;
|
|
@@ -39294,9 +39298,10 @@ class RecordsApi {
|
|
|
39294
39298
|
* @param start The index of the first record to retrieve. When possible, specify pageToken instead as it will result in better performance. If this parameter and pageToken are both specified, this parameter is interpreted as the index after the pageToken of the first record to retrieve.
|
|
39295
39299
|
* @param limit The maximum number of records to receive. The response will include a token that can be passed as the pageToken parameter to a future request to continue receiving results where this query leaves off.
|
|
39296
39300
|
* @param reversePageTokenOrder When pagination via pageToken, by default, records with smaller pageToken (i.e. older records) will be returned first. When this parameter is set to `true`, higher pageToken records (newer records) will be returned.
|
|
39301
|
+
* @param q full text search query
|
|
39297
39302
|
* @param xMagdaSession Magda internal session id
|
|
39298
39303
|
*/
|
|
39299
|
-
getAllSummary(xMagdaTenantId, pageToken, start, limit, reversePageTokenOrder, xMagdaSession) {
|
|
39304
|
+
getAllSummary(xMagdaTenantId, pageToken, start, limit, reversePageTokenOrder, q, xMagdaSession) {
|
|
39300
39305
|
const localVarPath = this.basePath + '/records/summary';
|
|
39301
39306
|
let queryParameters = {};
|
|
39302
39307
|
let headerParams = Object.assign({}, this.defaultHeaders);
|
|
@@ -39317,6 +39322,9 @@ class RecordsApi {
|
|
|
39317
39322
|
if (reversePageTokenOrder !== undefined) {
|
|
39318
39323
|
queryParameters['reversePageTokenOrder'] = reversePageTokenOrder;
|
|
39319
39324
|
}
|
|
39325
|
+
if (q !== undefined) {
|
|
39326
|
+
queryParameters['q'] = q;
|
|
39327
|
+
}
|
|
39320
39328
|
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
39321
39329
|
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
39322
39330
|
let useFormData = false;
|
|
@@ -39543,9 +39551,10 @@ class RecordsApi {
|
|
|
39543
39551
|
* @param aspect The aspects for which to retrieve data, specified as multiple occurrences of this query parameter. Only records that have all of these aspects will be included in the response.
|
|
39544
39552
|
* @param aspectQuery Filter the records returned by a value within the aspect JSON. Expressed as 'aspectId.path.to.field:value', url encoded. NOTE: This is an early stage API and may change greatly in the future
|
|
39545
39553
|
* @param aspectOrQuery Filter the records returned by a value within the aspect JSON. Expressed as 'aspectId.path.to.field:value', url encoded. Queries passing via this parameter will be grouped with OR logic.
|
|
39554
|
+
* @param q full text search query
|
|
39546
39555
|
* @param xMagdaSession Magda internal session id
|
|
39547
39556
|
*/
|
|
39548
|
-
getCount(xMagdaTenantId, aspect, aspectQuery, aspectOrQuery, xMagdaSession) {
|
|
39557
|
+
getCount(xMagdaTenantId, aspect, aspectQuery, aspectOrQuery, q, xMagdaSession) {
|
|
39549
39558
|
const localVarPath = this.basePath + '/records/count';
|
|
39550
39559
|
let queryParameters = {};
|
|
39551
39560
|
let headerParams = Object.assign({}, this.defaultHeaders);
|
|
@@ -39563,6 +39572,9 @@ class RecordsApi {
|
|
|
39563
39572
|
if (aspectOrQuery !== undefined) {
|
|
39564
39573
|
queryParameters['aspectOrQuery'] = aspectOrQuery;
|
|
39565
39574
|
}
|
|
39575
|
+
if (q !== undefined) {
|
|
39576
|
+
queryParameters['q'] = q;
|
|
39577
|
+
}
|
|
39566
39578
|
headerParams['X-Magda-Tenant-Id'] = xMagdaTenantId;
|
|
39567
39579
|
headerParams['X-Magda-Session'] = xMagdaSession;
|
|
39568
39580
|
let useFormData = false;
|
|
@@ -62222,8 +62234,8 @@ class RegistryClient {
|
|
|
62222
62234
|
}
|
|
62223
62235
|
});
|
|
62224
62236
|
}
|
|
62225
|
-
getRecords(aspect, optionalAspect, pageToken, dereference, limit, aspectQueries, aspectOrQuery, orderBy, orderByDir, orderNullFirst, reversePageTokenOrder) {
|
|
62226
|
-
const operation = (pageToken) => () => this.recordsApi.getAll(this.tenantId, aspect, optionalAspect, pageToken, undefined, limit, dereference, aspectQueries, aspectOrQuery, orderBy, orderByDir, orderNullFirst, reversePageTokenOrder, this.jwt);
|
|
62237
|
+
getRecords(aspect, optionalAspect, pageToken, dereference, limit, aspectQueries, aspectOrQuery, orderBy, orderByDir, orderNullFirst, reversePageTokenOrder, q) {
|
|
62238
|
+
const operation = (pageToken) => () => this.recordsApi.getAll(this.tenantId, aspect, optionalAspect, pageToken, undefined, limit, dereference, aspectQueries, aspectOrQuery, orderBy, orderByDir, orderNullFirst, reversePageTokenOrder, q, this.jwt);
|
|
62227
62239
|
return retry_1.default(operation(pageToken), this.secondsBetweenRetries, this.maxRetries, (e, retriesLeft) => console.log(formatServiceError_1.default("Failed to GET records.", e, retriesLeft)))
|
|
62228
62240
|
.then((result) => result.body)
|
|
62229
62241
|
.catch(exports.toServerError("getRecords"));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magda/minion-sdk",
|
|
3
3
|
"description": "MAGDA Minion SDK",
|
|
4
|
-
"version": "2.3.1",
|
|
4
|
+
"version": "2.3.2-alpha.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "rimraf dist tsconfig.tsbuildinfo",
|
|
7
7
|
"build": "webpack && api-extractor run -l",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"types": "dist/index.d.ts",
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@magda/minion-framework": "^2.3.1",
|
|
16
|
-
"@magda/typescript-common": "^2.3.1",
|
|
15
|
+
"@magda/minion-framework": "^2.3.2-alpha.1",
|
|
16
|
+
"@magda/typescript-common": "^2.3.2-alpha.1",
|
|
17
17
|
"@microsoft/api-extractor": "~7.15.2",
|
|
18
18
|
"ts-loader": "^6.2.1",
|
|
19
19
|
"typescript": "~4.2.4",
|