Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/paris

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/paris - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

microsoft-paris-1.1.1.tgz

41

dist/lib/models/api-call-backend-config.interface.d.ts

@@ -6,10 +6,51 @@ import { EntityConfigFunctionOrValue } from "../entity/entity.config";

export interface ApiCallBackendConfigInterface<T = any, TRawData = any> {
/**
* The URL to use for HTTP requests.
*/
endpoint?: EntityConfigFunctionOrValue;
/**
* If `cache` is specified, entities will be cached according to the cache settings.
* Note: cache refers to individual items (such as received from `getItemById` or with an ApiCall), not queries.
*/
cache?: boolean | DataCacheSettings<T>;
/**
* The domain to use for all calls for this Entity/ApiCall. Used as a prefix for all HTTP requests.
* Set to an empty string to avoid this altogether (in case the data arrives from an external URL, for example).
* If not set and not an empty string, Paris will use config.apiRoot instead.
*/
baseUrl?: EntityConfigFunctionOrValue;
/**
* Query params to always send when requesting data.
*/
fixedData?: {
[index: string]: any;
};
/**
* If `true`, a value that's specified in DataQuery.params and is an array will result in multiple params in the HTTP request
* @example <caption>Using separateArrayParams</caption>
* ```typescript
* @Entity({
* singularName: 'My entity',
* pluralName: 'My entities',
* endpoint: 'myentity',
* separateArrayParams: true
* })
* export class MyEntity extends EntityModelBase{}
*
* paris.query(MyEntity, { where: { foo: ['bar', 'lish'] }})
* .subscribe((dataSet:DataSet<MyEntity>) => console.log(dataSet));
* ```
*
* In this example, the API call will be to (config.apiRoot)/myentity?foo=bar&foo=lish.
* If separateArrayParams wasn't specified as `true`, the api call would have been to:
* (config.apiRoot)/myentity?foo=bar,lish
*/
separateArrayParams?: boolean;
/**
* A function that if specifies, parses whatever is received from the API call, before Paris starts handling it.
* @param {TRawData} data
* @param {ParisConfig} config
* @param {DataQuery} query
*/
parseData?: (data: TRawData, config?: ParisConfig, query?: DataQuery) => T;
}

2

dist/lib/services/data-store.service.js

@@ -24,2 +24,4 @@ import { Http } from "./http.service";

DataStoreService.prototype.getEndpointUrl = function (endpoint, baseUrl) {
if (baseUrl === '')
return endpoint;
return (baseUrl || this.config.apiRoot || "") + "/" + endpoint;

@@ -26,0 +28,0 @@ };

2

package.json
{
"name": "@microsoft/paris",
"version": "1.1.1",
"version": "1.1.2",
"description": "Library for the implementation of Domain Driven Design in Angular/TypeScript apps",

@@ -5,0 +5,0 @@ "repository": {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc