@journeyapps/db
Advanced tools
Comparing version 5.3.1 to 5.4.0
import 'isomorphic-fetch'; | ||
import type { RequestInit } from 'node-fetch'; | ||
import { BaseAdapter } from './BaseAdapter'; | ||
@@ -7,2 +8,4 @@ import { Schema, ObjectType } from '@journeyapps/parser-schema'; | ||
import { ObjectData } from './ObjectData'; | ||
import { ApiCredentials } from './credentials'; | ||
export type { Response, RequestInit } from 'node-fetch'; | ||
export interface ApiObjectData extends ObjectData { | ||
@@ -12,2 +15,5 @@ _updated_at?: string; | ||
} | ||
export interface ApiAdapterOptions { | ||
fetch?: RequestInit; | ||
} | ||
export declare class JourneyAPIAdapter extends BaseAdapter { | ||
@@ -18,5 +24,5 @@ static apiToInternalFormat(type: ObjectType, apiObj: any): ApiObjectData; | ||
schema: Schema; | ||
options: any; | ||
credentials: any; | ||
constructor(credentials: any, schema: Schema, options?: any); | ||
options: ApiAdapterOptions; | ||
credentials: ApiCredentials; | ||
constructor(credentials: ApiCredentials, schema: Schema, options?: ApiAdapterOptions); | ||
description(): string; | ||
@@ -23,0 +29,0 @@ executeQuery(query: Query): Promise<ObjectData[]>; |
@@ -11,7 +11,2 @@ "use strict"; | ||
var BATCH_LIMIT = 1000; | ||
// Credentials: { | ||
// server: 'https://run.journeyapps.com', | ||
// accountId: '...', | ||
// enrollmentId: '...' | ||
// } | ||
class JourneyAPIAdapter extends BaseAdapter_1.BaseAdapter { | ||
@@ -18,0 +13,0 @@ constructor(credentials, schema, options = {}) { |
@@ -0,7 +1,8 @@ | ||
import { ApiAdapterOptions } from './JourneyAPIAdapter'; | ||
import { ApiCredentialOptions } from './credentials/ApiCredentials'; | ||
import { Database } from './Database'; | ||
export interface OnlineDBCredentials extends ApiCredentialOptions { | ||
adapter?: any; | ||
adapter?: ApiAdapterOptions; | ||
dataModelPath?: string; | ||
} | ||
export declare function OnlineDB(options: OnlineDBCredentials): Database; |
@@ -47,3 +47,2 @@ "use strict"; | ||
evaluate(object) { | ||
let rawAttributeValue; | ||
let attributeValue; | ||
@@ -58,4 +57,7 @@ if (this.attribute.relationship) { | ||
} | ||
else if (this.attribute.name == 'id') { | ||
attributeValue = object.id; | ||
} | ||
else { | ||
rawAttributeValue = object.attributes[this.attribute.name]; | ||
const rawAttributeValue = object.attributes[this.attribute.name]; | ||
if (rawAttributeValue == null) { | ||
@@ -62,0 +64,0 @@ attributeValue = null; |
import 'isomorphic-fetch'; | ||
export declare const retryableFetch: (url: string, options: any, retriesLeft?: number) => any; | ||
import type { Response, RequestInit } from 'node-fetch'; | ||
export declare const retryableFetch: (url: string, options: RequestInit, retriesLeft?: number) => Promise<Response>; |
{ | ||
"name": "@journeyapps/db", | ||
"version": "5.3.1", | ||
"version": "5.4.0", | ||
"description": "Journey JS library", | ||
@@ -20,3 +20,4 @@ "main": "./dist/index.js", | ||
"@journeyapps/evaluator": "5.3.0", | ||
"@journeyapps/parser-schema": "5.3.0", | ||
"@journeyapps/parser-schema": "5.4.0", | ||
"@types/node-fetch": "^2.5.7", | ||
"isomorphic-fetch": "^2.2.1", | ||
@@ -33,3 +34,3 @@ "moment": "^2.24.0", | ||
], | ||
"gitHead": "9446150eccbcd254c0ab7d255799e836790e1cc9" | ||
"gitHead": "57c088fe57814589089715f5d39a71e69a84030f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
289791
4537
3
9
+ Added@types/node-fetch@^2.5.7
+ Added@journeyapps/parser-schema@5.4.0(transitive)
+ Added@types/node@22.13.9(transitive)
+ Added@types/node-fetch@2.6.12(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedcall-bind-apply-helpers@1.0.2(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.1.1(transitive)
+ Addedes-set-tostringtag@2.1.0(transitive)
+ Addedform-data@4.0.2(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.3.0(transitive)
+ Addedget-proto@1.0.1(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedundici-types@6.20.0(transitive)
- Removed@journeyapps/parser-schema@5.3.0(transitive)