@mcma/client
Advanced tools
Comparing version 0.13.28 to 0.13.29
@@ -5,2 +5,6 @@ import { McmaResource, McmaResourceType, NotificationEndpointProperties } from "@mcma/core"; | ||
import { ResourceEndpointClient } from "./resource-endpoint-client"; | ||
export declare enum QuerySortOrder { | ||
Ascending = "asc", | ||
Descending = "desc" | ||
} | ||
export declare class ResourceManager { | ||
@@ -13,3 +17,3 @@ private config; | ||
init(): Promise<void>; | ||
query<T extends McmaResource>(resourceType: McmaResourceType<T>, filter?: any, sortBy?: string, sortAscending?: boolean): Promise<T[]>; | ||
query<T extends McmaResource>(resourceType: McmaResourceType<T>, filter?: any, sortBy?: string, sortOrder?: QuerySortOrder): Promise<T[]>; | ||
create<T extends McmaResource>(resource: T): Promise<T>; | ||
@@ -16,0 +20,0 @@ get<T extends McmaResource>(resource: string): Promise<T | null>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ResourceManager = void 0; | ||
exports.ResourceManager = exports.QuerySortOrder = void 0; | ||
const core_1 = require("@mcma/core"); | ||
const http_1 = require("../http"); | ||
const service_client_1 = require("./service-client"); | ||
var QuerySortOrder; | ||
(function (QuerySortOrder) { | ||
QuerySortOrder["Ascending"] = "asc"; | ||
QuerySortOrder["Descending"] = "desc"; | ||
})(QuerySortOrder = exports.QuerySortOrder || (exports.QuerySortOrder = {})); | ||
class ResourceManager { | ||
@@ -52,3 +57,3 @@ constructor(config, authProvider) { | ||
; | ||
async query(resourceType, filter, sortBy, sortAscending) { | ||
async query(resourceType, filter, sortBy, sortOrder) { | ||
if (typeof resourceType === "function" && resourceType.name) { | ||
@@ -67,4 +72,4 @@ resourceType = resourceType.name; | ||
} | ||
if (sortAscending !== undefined && sortAscending !== null) { | ||
params.sortAscending = sortAscending; | ||
if (sortOrder !== undefined && sortOrder !== null) { | ||
params.sortOrder = sortOrder; | ||
} | ||
@@ -71,0 +76,0 @@ if (filter) { |
{ | ||
"name": "@mcma/client", | ||
"version": "0.13.28", | ||
"version": "0.13.29", | ||
"description": "Node module with classes and functions used to access services in an MCMA environment", | ||
@@ -32,9 +32,9 @@ "engines": { | ||
"dependencies": { | ||
"axios": "^0.23.0" | ||
"axios": "^0.24.0" | ||
}, | ||
"peerDependencies": { | ||
"@mcma/core": "0.13.28" | ||
"@mcma/core": "0.13.29" | ||
}, | ||
"devDependencies": { | ||
"@mcma/core": "0.13.28", | ||
"@mcma/core": "0.13.29", | ||
"@types/node": "^14.17.22", | ||
@@ -41,0 +41,0 @@ "jasmine": "^3.3.1" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39812
873
+ Added@mcma/core@0.13.29(transitive)
+ Addedaxios@0.24.0(transitive)
- Removed@mcma/core@0.13.28(transitive)
- Removedaxios@0.23.0(transitive)
Updatedaxios@^0.24.0