@auxilium/datalynk-client 0.9.3 → 0.9.6

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/api.d.ts CHANGED
@@ -24,6 +24,8 @@ export type JwtPayload = {
24
24
  export type ApiOptions = {
25
25
  /** Bundle requests together that happen in quick succession */
26
26
  bundleTime?: number;
27
+ /** Use legacy dates by default */
28
+ legacyDates?: boolean;
27
29
  /** Name of client for logging */
28
30
  origin?: string;
29
31
  /** Save session token to localStorage to persist logins */
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAuB,MAAM,MAAM,CAAC;AAC3D,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,MAAM,MAAM,UAAU,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACZ,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACxB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,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,OAAkB;IAC/B,mBAAmB;IACnB,QAAQ,CAAC,KAAK,QAAmB;IACjC,kBAAkB;IAClB,QAAQ,CAAC,GAAG,MAAiB;IAC7B,oBAAoB;IACpB,QAAQ,CAAC,MAAM,EAAG,MAAM,CAAC;IACzB,wBAAwB;IACxB,QAAQ,CAAC,SAAS,YAAuB;IACzC,mBAAmB;IACnB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,wBAAwB;IACxB,MAAM,iCAA4C;IAClD,IAAI,KAAK,IACQ,MAAM,GAAG,IAAI,CADgB;IAC9C,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAA8B;IAE5D,wCAAwC;IACxC,IAAI,UAAU,IAAI,UAAU,GAAG,IAAI,CAGlC;IAED;;;;;;;;;;OAUG;gBACS,GAAG,EAAE,MAAM,EAAkB,OAAO,GAAE,UAAe;IA4BjE,OAAO,CAAC,QAAQ;IAoBhB;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAsB9B;;;;;;;;;;;OAWG;IACI,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC;IAqC/E;;;;;;;;;;;;OAYG;IACI,KAAK,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAIxD;;;;;;OAMG;IACI,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC;CAS5E"}
package/dist/index.cjs CHANGED
@@ -2129,7 +2129,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2129
2129
  }
2130
2130
  /**
2131
2131
  * Whitelist and alias fields. Alias for the fields functions
2132
- *
2132
+ * @example
2133
+ * ```ts
2134
+ * const id: {id: number, field2: any}[] = await new Slice<T>(12345)
2135
+ * .select().alias({id: 'id', field1: 'field2'}).exec().keys();
2136
+ * ```
2133
2137
  * @param {object} aliasKeyVals List of properties to whitelist and what to rename them to
2134
2138
  */
2135
2139
  alias(aliasKeyVals) {
@@ -2137,6 +2141,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2137
2141
  }
2138
2142
  /**
2139
2143
  * Add an 'AND' condition inside the where argument
2144
+ * @example
2145
+ * ```ts
2146
+ * const rows: T[] = await new Slice<T>(12345).select()
2147
+ * .where('field1', '>', 1)
2148
+ * .and()
2149
+ * .where({field2: 2, field3: 3})
2150
+ * .exec().rows();
2151
+ * ```
2140
2152
  */
2141
2153
  and() {
2142
2154
  var _a;
@@ -2147,10 +2159,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2147
2159
  }
2148
2160
  /**
2149
2161
  * Count the returned rows
2162
+ * @example
2163
+ * ```ts
2164
+ * const count = await new Slice(12345).count()
2165
+ * .where({field1: 1})
2166
+ * .exec().count();
2167
+ * ```
2168
+ * @param {object | string} arg Count argument
2150
2169
  */
2151
- count(field = "id") {
2170
+ count(arg = "id") {
2152
2171
  this.operation = "$/slice/report";
2153
- this.request.fields = { count: ["$count", typeof field == "object" ? field : ["$field", field]] };
2172
+ this.request.fields = { count: ["$count", typeof arg == "object" ? arg : ["$field", arg]] };
2154
2173
  return this;
2155
2174
  }
2156
2175
  /**
@@ -2162,7 +2181,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2162
2181
  }
2163
2182
  /**
2164
2183
  * Set the request type to delete
2165
- *
2184
+ * @example
2185
+ * ```ts
2186
+ * await new Slice(12345).delete(id).exec();
2187
+ * ```
2166
2188
  * @param {number | number[]} id ID(s) to delete
2167
2189
  */
2168
2190
  delete(id) {
@@ -2175,16 +2197,23 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2175
2197
  }
2176
2198
  /**
2177
2199
  * Filter rows from slice based on an excel expression
2178
- *
2179
- * @param expresion Excel style expression to query against
2200
+ * @example
2201
+ * ```ts
2202
+ * const rows: T[] = await new Slice<T>(12345).select()
2203
+ * .excel('')
2204
+ * .exec().rows();
2205
+ * ```
2206
+ * @param formula Excel formula to use as where clause
2180
2207
  */
2181
- excel(expresion) {
2182
- this.request.where = { "$excel": expresion };
2208
+ excel(formula) {
2209
+ if (this.request.where) {
2210
+ this.and();
2211
+ this.request.push({ "$excel": formula });
2212
+ } else this.request.where = { "$excel": formula };
2183
2213
  return this;
2184
2214
  }
2185
2215
  /**
2186
2216
  * Compile the request and send it
2187
- *
2188
2217
  * @param {ApiRequestOptions} options API Request options
2189
2218
  * @return {SlicePromise<T>}
2190
2219
  */
@@ -2199,7 +2228,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2199
2228
  }
2200
2229
  /**
2201
2230
  * Set the request type to insert
2202
- *
2231
+ * @example
2232
+ * ```ts
2233
+ * const id: number = await new Slice<T>(12345).insert([
2234
+ * {field1: 1},
2235
+ * {field1: 2}
2236
+ * ]).exec().keys();
2237
+ * ```
2203
2238
  * @param {T | T[]} rows Rows to be inserted into the slice
2204
2239
  */
2205
2240
  insert(rows) {
@@ -2211,7 +2246,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2211
2246
  }
2212
2247
  /**
2213
2248
  * Limit number of rows returned
2214
- *
2249
+ * @example
2250
+ * ```ts
2251
+ * const rows: T[] = await new Slice<T>(12345).select().limit(10)
2252
+ * .exec().rows();
2253
+ * ```
2215
2254
  * @param {number} num Number of rows to return
2216
2255
  */
2217
2256
  limit(num) {
@@ -2219,17 +2258,34 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2219
2258
  }
2220
2259
  /**
2221
2260
  * Add an 'OR' condition inside the where argument
2261
+ * @example
2262
+ * ```ts
2263
+ * const rows: T[] = await new Slice<T>(12345).select()
2264
+ * .where('field1', '>', 1)
2265
+ * .or()
2266
+ * .where({field2: 2, field3: 3})
2267
+ * .or()
2268
+ * .where(['$gt', ['$field', field4], 4)
2269
+ * .exec().rows();
2270
+ * ```
2222
2271
  */
2223
2272
  or() {
2224
2273
  var _a;
2225
- if (((_a = this.request.where) == null ? void 0 : _a[0]) == "$or") return this;
2226
- if (this.request.where) this.request.where = ["$or", this.request.where];
2227
- else this.request.where = ["$or"];
2274
+ if (((_a = this.request.where) == null ? void 0 : _a[0]) == "$or") {
2275
+ this.request.where.push(null);
2276
+ return this;
2277
+ }
2278
+ if (this.request.where) this.request.where = ["$or", this.request.where, null];
2279
+ else this.request.where = ["$or", null];
2228
2280
  return this;
2229
2281
  }
2230
2282
  /**
2231
2283
  * Order rows by a field
2232
- *
2284
+ * @example
2285
+ * ```ts
2286
+ * const rows: T[] = new Slice<T>(12345).select().order('field1', true) // true = ascending
2287
+ * .exec().rows();
2288
+ * ```
2233
2289
  * @param {string} field property name
2234
2290
  * @param {boolean} ascending Sort in ascending or descending order
2235
2291
  */
@@ -2240,7 +2296,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2240
2296
  }
2241
2297
  /**
2242
2298
  * Set the request type to select
2243
- *
2299
+ * @example
2300
+ * ```ts
2301
+ * const rows: T[] = new Slice<T>(12345).select().exec().rows();
2302
+ * const row: T = new Slice<T>(12345).select(id).exec().row();
2303
+ * ```
2244
2304
  * @param {number | number[]} id ID(s) to select, leaving blank will return all rows
2245
2305
  */
2246
2306
  select(id) {
@@ -2253,7 +2313,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2253
2313
  }
2254
2314
  /**
2255
2315
  * Synchronize cache with server
2256
- *
2316
+ * @example
2317
+ * ```ts
2318
+ * const slice: Slice = new Slice<T>(Slices.Contact);
2319
+ * slice.sync().subscribe((rows: T[]) => {});
2320
+ * ```
2257
2321
  * @param {boolean} on Enable/disable events
2258
2322
  * @return {BehaviorSubject<T[]>} Cache which can be subscribed to
2259
2323
  */
@@ -2273,7 +2337,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2273
2337
  }
2274
2338
  /**
2275
2339
  * Set the request type to update
2276
- *
2340
+ * @example
2341
+ * ```ts
2342
+ * const ids: number[] = await new Slice<Type>(12345).update([
2343
+ * {id: 1, field1: 1},
2344
+ * {id: 2, field1: 1}
2345
+ * ]).exec().keys();
2346
+ * ```
2277
2347
  * @param {T | T[]} rows Rows to be updated, each row must have an ID
2278
2348
  */
2279
2349
  update(rows) {
@@ -2284,17 +2354,24 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2284
2354
  return this;
2285
2355
  }
2286
2356
  /**
2287
- * Add where condition to request. Chaining wheres creates an AND between them. To perform an OR look at
2288
- * the filter function
2289
- *
2357
+ * Add where condition to request
2358
+ * @example
2359
+ * ```ts
2360
+ * const rows: T[] = await new Slice<T>(12345).select()
2361
+ * .where('field1', '>', 1)
2362
+ * .where({field2: 2, field3: 3}) // Automatic AND
2363
+ * .or()
2364
+ * .where(['$gt', ['$field', field4], 4)
2365
+ * .exec().rows();
2366
+ * ```
2290
2367
  * @param {string | object} field property to compare or a map of equality comparisons
2291
2368
  * @param {string} operator Operation to compare with. Accepts JS operators (>=, ==, !=, ...) as well as datalynk styax ($gte, $eq, $is, $not, ...)
2292
2369
  * @param {any} value value to compare against
2293
2370
  */
2294
2371
  where(field, operator, value) {
2295
- this.and();
2372
+ if (this.request.where && this.request.where[0] != "$or") this.and();
2296
2373
  if (typeof field == "object") {
2297
- Object.entries(field).forEach(([key, value2]) => this.request.where.push(["$eq", ["$field", key], value2]));
2374
+ Object.entries(field).forEach(([key, value2]) => this.where(key, "==", value2));
2298
2375
  } else if (operator == null) {
2299
2376
  throw new Error("Malformed where clause");
2300
2377
  } else {
@@ -2324,7 +2401,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2324
2401
  operator = "$mod";
2325
2402
  break;
2326
2403
  }
2327
- this.request.where.push([operator, ["$field", field], value]);
2404
+ if (!this.request.where) this.request.where = [operator, ["$field", field], value];
2405
+ else {
2406
+ if (this.request.where[0] == "$or") {
2407
+ const i = this.request.where.length - 1;
2408
+ if (this.request.where[i] == null) this.request.where[i] = [operator, ["$field", field], value];
2409
+ else {
2410
+ if (this.request.where[i][0] == "$and") this.request.where[i].push([operator, ["$field", field], value]);
2411
+ else this.request.where[i] = ["$and", this.request.where[i], [operator, ["$field", field], value]];
2412
+ }
2413
+ } else this.request.where.push([operator, ["$field", field], value]);
2414
+ }
2328
2415
  }
2329
2416
  return this;
2330
2417
  }
@@ -2536,7 +2623,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2536
2623
  method: "POST",
2537
2624
  headers: clean({
2538
2625
  Authorization: this.token ? `Bearer ${this.token}` : void 0,
2539
- "Content-Type": "application/json"
2626
+ "Content-Type": "application/json",
2627
+ "X-Date-Return-Format": this.options.legacyDates ? void 0 : "ISO8601"
2540
2628
  }),
2541
2629
  body: JSON.stringify(Api.translateTokens(req))
2542
2630
  }).then(async (resp) => {
package/dist/index.mjs CHANGED
@@ -2125,7 +2125,11 @@ class Slice {
2125
2125
  }
2126
2126
  /**
2127
2127
  * Whitelist and alias fields. Alias for the fields functions
2128
- *
2128
+ * @example
2129
+ * ```ts
2130
+ * const id: {id: number, field2: any}[] = await new Slice<T>(12345)
2131
+ * .select().alias({id: 'id', field1: 'field2'}).exec().keys();
2132
+ * ```
2129
2133
  * @param {object} aliasKeyVals List of properties to whitelist and what to rename them to
2130
2134
  */
2131
2135
  alias(aliasKeyVals) {
@@ -2133,6 +2137,14 @@ class Slice {
2133
2137
  }
2134
2138
  /**
2135
2139
  * Add an 'AND' condition inside the where argument
2140
+ * @example
2141
+ * ```ts
2142
+ * const rows: T[] = await new Slice<T>(12345).select()
2143
+ * .where('field1', '>', 1)
2144
+ * .and()
2145
+ * .where({field2: 2, field3: 3})
2146
+ * .exec().rows();
2147
+ * ```
2136
2148
  */
2137
2149
  and() {
2138
2150
  var _a;
@@ -2143,10 +2155,17 @@ class Slice {
2143
2155
  }
2144
2156
  /**
2145
2157
  * Count the returned rows
2158
+ * @example
2159
+ * ```ts
2160
+ * const count = await new Slice(12345).count()
2161
+ * .where({field1: 1})
2162
+ * .exec().count();
2163
+ * ```
2164
+ * @param {object | string} arg Count argument
2146
2165
  */
2147
- count(field = "id") {
2166
+ count(arg = "id") {
2148
2167
  this.operation = "$/slice/report";
2149
- this.request.fields = { count: ["$count", typeof field == "object" ? field : ["$field", field]] };
2168
+ this.request.fields = { count: ["$count", typeof arg == "object" ? arg : ["$field", arg]] };
2150
2169
  return this;
2151
2170
  }
2152
2171
  /**
@@ -2158,7 +2177,10 @@ class Slice {
2158
2177
  }
2159
2178
  /**
2160
2179
  * Set the request type to delete
2161
- *
2180
+ * @example
2181
+ * ```ts
2182
+ * await new Slice(12345).delete(id).exec();
2183
+ * ```
2162
2184
  * @param {number | number[]} id ID(s) to delete
2163
2185
  */
2164
2186
  delete(id) {
@@ -2171,16 +2193,23 @@ class Slice {
2171
2193
  }
2172
2194
  /**
2173
2195
  * Filter rows from slice based on an excel expression
2174
- *
2175
- * @param expresion Excel style expression to query against
2196
+ * @example
2197
+ * ```ts
2198
+ * const rows: T[] = await new Slice<T>(12345).select()
2199
+ * .excel('')
2200
+ * .exec().rows();
2201
+ * ```
2202
+ * @param formula Excel formula to use as where clause
2176
2203
  */
2177
- excel(expresion) {
2178
- this.request.where = { "$excel": expresion };
2204
+ excel(formula) {
2205
+ if (this.request.where) {
2206
+ this.and();
2207
+ this.request.push({ "$excel": formula });
2208
+ } else this.request.where = { "$excel": formula };
2179
2209
  return this;
2180
2210
  }
2181
2211
  /**
2182
2212
  * Compile the request and send it
2183
- *
2184
2213
  * @param {ApiRequestOptions} options API Request options
2185
2214
  * @return {SlicePromise<T>}
2186
2215
  */
@@ -2195,7 +2224,13 @@ class Slice {
2195
2224
  }
2196
2225
  /**
2197
2226
  * Set the request type to insert
2198
- *
2227
+ * @example
2228
+ * ```ts
2229
+ * const id: number = await new Slice<T>(12345).insert([
2230
+ * {field1: 1},
2231
+ * {field1: 2}
2232
+ * ]).exec().keys();
2233
+ * ```
2199
2234
  * @param {T | T[]} rows Rows to be inserted into the slice
2200
2235
  */
2201
2236
  insert(rows) {
@@ -2207,7 +2242,11 @@ class Slice {
2207
2242
  }
2208
2243
  /**
2209
2244
  * Limit number of rows returned
2210
- *
2245
+ * @example
2246
+ * ```ts
2247
+ * const rows: T[] = await new Slice<T>(12345).select().limit(10)
2248
+ * .exec().rows();
2249
+ * ```
2211
2250
  * @param {number} num Number of rows to return
2212
2251
  */
2213
2252
  limit(num) {
@@ -2215,17 +2254,34 @@ class Slice {
2215
2254
  }
2216
2255
  /**
2217
2256
  * Add an 'OR' condition inside the where argument
2257
+ * @example
2258
+ * ```ts
2259
+ * const rows: T[] = await new Slice<T>(12345).select()
2260
+ * .where('field1', '>', 1)
2261
+ * .or()
2262
+ * .where({field2: 2, field3: 3})
2263
+ * .or()
2264
+ * .where(['$gt', ['$field', field4], 4)
2265
+ * .exec().rows();
2266
+ * ```
2218
2267
  */
2219
2268
  or() {
2220
2269
  var _a;
2221
- if (((_a = this.request.where) == null ? void 0 : _a[0]) == "$or") return this;
2222
- if (this.request.where) this.request.where = ["$or", this.request.where];
2223
- else this.request.where = ["$or"];
2270
+ if (((_a = this.request.where) == null ? void 0 : _a[0]) == "$or") {
2271
+ this.request.where.push(null);
2272
+ return this;
2273
+ }
2274
+ if (this.request.where) this.request.where = ["$or", this.request.where, null];
2275
+ else this.request.where = ["$or", null];
2224
2276
  return this;
2225
2277
  }
2226
2278
  /**
2227
2279
  * Order rows by a field
2228
- *
2280
+ * @example
2281
+ * ```ts
2282
+ * const rows: T[] = new Slice<T>(12345).select().order('field1', true) // true = ascending
2283
+ * .exec().rows();
2284
+ * ```
2229
2285
  * @param {string} field property name
2230
2286
  * @param {boolean} ascending Sort in ascending or descending order
2231
2287
  */
@@ -2236,7 +2292,11 @@ class Slice {
2236
2292
  }
2237
2293
  /**
2238
2294
  * Set the request type to select
2239
- *
2295
+ * @example
2296
+ * ```ts
2297
+ * const rows: T[] = new Slice<T>(12345).select().exec().rows();
2298
+ * const row: T = new Slice<T>(12345).select(id).exec().row();
2299
+ * ```
2240
2300
  * @param {number | number[]} id ID(s) to select, leaving blank will return all rows
2241
2301
  */
2242
2302
  select(id) {
@@ -2249,7 +2309,11 @@ class Slice {
2249
2309
  }
2250
2310
  /**
2251
2311
  * Synchronize cache with server
2252
- *
2312
+ * @example
2313
+ * ```ts
2314
+ * const slice: Slice = new Slice<T>(Slices.Contact);
2315
+ * slice.sync().subscribe((rows: T[]) => {});
2316
+ * ```
2253
2317
  * @param {boolean} on Enable/disable events
2254
2318
  * @return {BehaviorSubject<T[]>} Cache which can be subscribed to
2255
2319
  */
@@ -2269,7 +2333,13 @@ class Slice {
2269
2333
  }
2270
2334
  /**
2271
2335
  * Set the request type to update
2272
- *
2336
+ * @example
2337
+ * ```ts
2338
+ * const ids: number[] = await new Slice<Type>(12345).update([
2339
+ * {id: 1, field1: 1},
2340
+ * {id: 2, field1: 1}
2341
+ * ]).exec().keys();
2342
+ * ```
2273
2343
  * @param {T | T[]} rows Rows to be updated, each row must have an ID
2274
2344
  */
2275
2345
  update(rows) {
@@ -2280,17 +2350,24 @@ class Slice {
2280
2350
  return this;
2281
2351
  }
2282
2352
  /**
2283
- * Add where condition to request. Chaining wheres creates an AND between them. To perform an OR look at
2284
- * the filter function
2285
- *
2353
+ * Add where condition to request
2354
+ * @example
2355
+ * ```ts
2356
+ * const rows: T[] = await new Slice<T>(12345).select()
2357
+ * .where('field1', '>', 1)
2358
+ * .where({field2: 2, field3: 3}) // Automatic AND
2359
+ * .or()
2360
+ * .where(['$gt', ['$field', field4], 4)
2361
+ * .exec().rows();
2362
+ * ```
2286
2363
  * @param {string | object} field property to compare or a map of equality comparisons
2287
2364
  * @param {string} operator Operation to compare with. Accepts JS operators (>=, ==, !=, ...) as well as datalynk styax ($gte, $eq, $is, $not, ...)
2288
2365
  * @param {any} value value to compare against
2289
2366
  */
2290
2367
  where(field, operator, value) {
2291
- this.and();
2368
+ if (this.request.where && this.request.where[0] != "$or") this.and();
2292
2369
  if (typeof field == "object") {
2293
- Object.entries(field).forEach(([key, value2]) => this.request.where.push(["$eq", ["$field", key], value2]));
2370
+ Object.entries(field).forEach(([key, value2]) => this.where(key, "==", value2));
2294
2371
  } else if (operator == null) {
2295
2372
  throw new Error("Malformed where clause");
2296
2373
  } else {
@@ -2320,7 +2397,17 @@ class Slice {
2320
2397
  operator = "$mod";
2321
2398
  break;
2322
2399
  }
2323
- this.request.where.push([operator, ["$field", field], value]);
2400
+ if (!this.request.where) this.request.where = [operator, ["$field", field], value];
2401
+ else {
2402
+ if (this.request.where[0] == "$or") {
2403
+ const i = this.request.where.length - 1;
2404
+ if (this.request.where[i] == null) this.request.where[i] = [operator, ["$field", field], value];
2405
+ else {
2406
+ if (this.request.where[i][0] == "$and") this.request.where[i].push([operator, ["$field", field], value]);
2407
+ else this.request.where[i] = ["$and", this.request.where[i], [operator, ["$field", field], value]];
2408
+ }
2409
+ } else this.request.where.push([operator, ["$field", field], value]);
2410
+ }
2324
2411
  }
2325
2412
  return this;
2326
2413
  }
@@ -2532,7 +2619,8 @@ class Api {
2532
2619
  method: "POST",
2533
2620
  headers: clean({
2534
2621
  Authorization: this.token ? `Bearer ${this.token}` : void 0,
2535
- "Content-Type": "application/json"
2622
+ "Content-Type": "application/json",
2623
+ "X-Date-Return-Format": this.options.legacyDates ? void 0 : "ISO8601"
2536
2624
  }),
2537
2625
  body: JSON.stringify(Api.translateTokens(req))
2538
2626
  }).then(async (resp) => {
package/dist/slice.d.ts CHANGED
@@ -115,7 +115,11 @@ export declare class Slice<T extends SliceMeta> {
115
115
  constructor(slice: number | string, api: Api);
116
116
  /**
117
117
  * Whitelist and alias fields. Alias for the fields functions
118
- *
118
+ * @example
119
+ * ```ts
120
+ * const id: {id: number, field2: any}[] = await new Slice<T>(12345)
121
+ * .select().alias({id: 'id', field1: 'field2'}).exec().keys();
122
+ * ```
119
123
  * @param {object} aliasKeyVals List of properties to whitelist and what to rename them to
120
124
  */
121
125
  alias(aliasKeyVals: {
@@ -123,38 +127,64 @@ export declare class Slice<T extends SliceMeta> {
123
127
  }): Slice<T>;
124
128
  /**
125
129
  * Add an 'AND' condition inside the where argument
130
+ * @example
131
+ * ```ts
132
+ * const rows: T[] = await new Slice<T>(12345).select()
133
+ * .where('field1', '>', 1)
134
+ * .and()
135
+ * .where({field2: 2, field3: 3})
136
+ * .exec().rows();
137
+ * ```
126
138
  */
127
139
  and(): this;
128
140
  /**
129
141
  * Count the returned rows
142
+ * @example
143
+ * ```ts
144
+ * const count = await new Slice(12345).count()
145
+ * .where({field1: 1})
146
+ * .exec().count();
147
+ * ```
148
+ * @param {object | string} arg Count argument
130
149
  */
131
- count(field?: object | string): this;
150
+ count(arg?: object | string): this;
132
151
  /**
133
152
  * Output the formed request to the console for inspection
134
153
  */
135
154
  debug(): this;
136
155
  /**
137
156
  * Set the request type to delete
138
- *
157
+ * @example
158
+ * ```ts
159
+ * await new Slice(12345).delete(id).exec();
160
+ * ```
139
161
  * @param {number | number[]} id ID(s) to delete
140
162
  */
141
163
  delete(id?: number | number[]): Slice<T>;
142
164
  /**
143
165
  * Filter rows from slice based on an excel expression
144
- *
145
- * @param expresion Excel style expression to query against
166
+ * @example
167
+ * ```ts
168
+ * const rows: T[] = await new Slice<T>(12345).select()
169
+ * .excel('')
170
+ * .exec().rows();
171
+ * ```
172
+ * @param formula Excel formula to use as where clause
146
173
  */
147
- excel(expresion: string): Slice<T>;
174
+ excel(formula: string): Slice<T>;
148
175
  /**
149
176
  * Compile the request and send it
150
- *
151
177
  * @param {ApiRequestOptions} options API Request options
152
178
  * @return {SlicePromise<T>}
153
179
  */
154
180
  exec(options?: ApiRequestOptions): SlicePromise<T>;
155
181
  /**
156
182
  * Whitelist fields by passing an array of keys or alias fields by using a map
157
- *
183
+ * @example
184
+ * ```ts
185
+ * const id: {id: number, field1: any}[] = await new Slice<T>(12345)
186
+ * .select().fields(['id', 'field1']).exec().keys();
187
+ * ```
158
188
  * @param {object} whitelist Either a list of keys to whitelist or a map of keys to rename
159
189
  */
160
190
  fields(whitelist: string[]): Slice<T>;
@@ -163,50 +193,95 @@ export declare class Slice<T extends SliceMeta> {
163
193
  }): Slice<T>;
164
194
  /**
165
195
  * Set the request type to insert
166
- *
196
+ * @example
197
+ * ```ts
198
+ * const id: number = await new Slice<T>(12345).insert([
199
+ * {field1: 1},
200
+ * {field1: 2}
201
+ * ]).exec().keys();
202
+ * ```
167
203
  * @param {T | T[]} rows Rows to be inserted into the slice
168
204
  */
169
205
  insert(rows: T | T[]): Slice<T>;
170
206
  /**
171
207
  * Limit number of rows returned
172
- *
208
+ * @example
209
+ * ```ts
210
+ * const rows: T[] = await new Slice<T>(12345).select().limit(10)
211
+ * .exec().rows();
212
+ * ```
173
213
  * @param {number} num Number of rows to return
174
214
  */
175
215
  limit(num: number): void;
176
216
  /**
177
217
  * Add an 'OR' condition inside the where argument
218
+ * @example
219
+ * ```ts
220
+ * const rows: T[] = await new Slice<T>(12345).select()
221
+ * .where('field1', '>', 1)
222
+ * .or()
223
+ * .where({field2: 2, field3: 3})
224
+ * .or()
225
+ * .where(['$gt', ['$field', field4], 4)
226
+ * .exec().rows();
227
+ * ```
178
228
  */
179
229
  or(): this;
180
230
  /**
181
231
  * Order rows by a field
182
- *
232
+ * @example
233
+ * ```ts
234
+ * const rows: T[] = new Slice<T>(12345).select().order('field1', true) // true = ascending
235
+ * .exec().rows();
236
+ * ```
183
237
  * @param {string} field property name
184
238
  * @param {boolean} ascending Sort in ascending or descending order
185
239
  */
186
240
  order(field: string, ascending?: boolean): Slice<T>;
187
241
  /**
188
242
  * Set the request type to select
189
- *
243
+ * @example
244
+ * ```ts
245
+ * const rows: T[] = new Slice<T>(12345).select().exec().rows();
246
+ * const row: T = new Slice<T>(12345).select(id).exec().row();
247
+ * ```
190
248
  * @param {number | number[]} id ID(s) to select, leaving blank will return all rows
191
249
  */
192
250
  select(id?: number | number[]): Slice<T>;
193
251
  /**
194
252
  * Synchronize cache with server
195
- *
253
+ * @example
254
+ * ```ts
255
+ * const slice: Slice = new Slice<T>(Slices.Contact);
256
+ * slice.sync().subscribe((rows: T[]) => {});
257
+ * ```
196
258
  * @param {boolean} on Enable/disable events
197
259
  * @return {BehaviorSubject<T[]>} Cache which can be subscribed to
198
260
  */
199
261
  sync(on?: boolean): BehaviorSubject<T[]> | undefined;
200
262
  /**
201
263
  * Set the request type to update
202
- *
264
+ * @example
265
+ * ```ts
266
+ * const ids: number[] = await new Slice<Type>(12345).update([
267
+ * {id: 1, field1: 1},
268
+ * {id: 2, field1: 1}
269
+ * ]).exec().keys();
270
+ * ```
203
271
  * @param {T | T[]} rows Rows to be updated, each row must have an ID
204
272
  */
205
273
  update(rows: T | T[]): this;
206
274
  /**
207
- * Add where condition to request. Chaining wheres creates an AND between them. To perform an OR look at
208
- * the filter function
209
- *
275
+ * Add where condition to request
276
+ * @example
277
+ * ```ts
278
+ * const rows: T[] = await new Slice<T>(12345).select()
279
+ * .where('field1', '>', 1)
280
+ * .where({field2: 2, field3: 3}) // Automatic AND
281
+ * .or()
282
+ * .where(['$gt', ['$field', field4], 4)
283
+ * .exec().rows();
284
+ * ```
210
285
  * @param {string | object} field property to compare or a map of equality comparisons
211
286
  * @param {string} operator Operation to compare with. Accepts JS operators (>=, ==, !=, ...) as well as datalynk styax ($gte, $eq, $is, $not, ...)
212
287
  * @param {any} value value to compare against
@@ -1 +1 @@
1
- {"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../src/slice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,MAAM,CAAC;AACrC,OAAO,EAAC,GAAG,EAAE,QAAQ,EAAE,iBAAiB,EAAC,MAAM,OAAO,CAAC;AACvD,OAAO,EAAmB,WAAW,EAAC,MAAM,UAAU,CAAC;AAEvD,MAAM,WAAW,SAAS;IACzB,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CAAC,CAAC;CA+CvE"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@auxilium/datalynk-client",
3
3
  "description": "Datalynk client library",
4
4
  "repository": "https://gitlab.auxiliumgroup.com/auxilium/datalynk/datalynk-client",
5
- "version": "0.9.3",
5
+ "version": "0.9.6",
6
6
  "author": "Zak Timson <zaktimson@gmail.com>",
7
7
  "private": false,
8
8
  "main": "./dist/index.cjs",