@api-client/core 0.6.30 → 0.6.31

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.
@@ -1,9 +1,8 @@
1
- import { Types, IDataMockInit, IHttpRequestInit } from '@pawel-up/data-mock';
1
+ import { IDataMockInit, IHttpRequestInit } from '@pawel-up/data-mock';
2
2
  import { IArcHttpRequest } from '../../models/arc/ArcHttpRequest.js';
3
3
  import { Request } from './Request.js';
4
4
  export declare class Arc {
5
5
  protected request: Request;
6
- protected types: Types;
7
6
  constructor(init?: IDataMockInit);
8
7
  arcRequest(init?: IHttpRequestInit): IArcHttpRequest;
9
8
  arcRequests(size?: number, init?: IHttpRequestInit): IArcHttpRequest[];
@@ -1,21 +1,14 @@
1
- import { Types } from '@pawel-up/data-mock';
2
1
  import { Kind as ArcHttpRequestKind } from '../../models/arc/ArcHttpRequest.js';
3
2
  import { Request } from './Request.js';
4
3
  export class Arc {
5
4
  request;
6
- types;
7
5
  constructor(init = {}) {
8
6
  this.request = new Request(init);
9
- this.types = new Types(init.seed);
10
- // this.lorem = new Lorem(init);
11
- // this.time = new Time(init);
12
- // this.http = new Http(init);
13
- // this.response = new Response(init);
14
7
  }
15
8
  arcRequest(init) {
16
9
  const request = this.request.request(init);
17
10
  return {
18
- key: this.types.uuid(),
11
+ key: new Date(request.created || Date.now()).toJSON(),
19
12
  ...request,
20
13
  kind: ArcHttpRequestKind,
21
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Arc.js","sourceRoot":"","sources":["../../../../src/mocking/lib/Arc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAmC,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAmB,IAAI,IAAI,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,OAAO,GAAG;IACJ,OAAO,CAAU;IACjB,KAAK,CAAQ;IAEvB,YAAY,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AE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;YACrD,GAAG,OAAO;YACV,IAAI,EAAE,kBAAkB;SACzB,CAAC;IACJ,CAAC;IAED,WAAW,CAAC,IAAI,GAAG,EAAE,EAAE,IAAuB;QAC5C,MAAM,MAAM,GAAsB,EAAE,CAAC;QACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC7B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;SACpC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@api-client/core",
3
3
  "description": "The API Client's core client library. Works in NodeJS and in a ES enabled browser.",
4
- "version": "0.6.30",
4
+ "version": "0.6.31",
5
5
  "license": "Apache-2.0",
6
6
  "main": "build/index.js",
7
7
  "module": "build/index.js",
@@ -1,24 +1,18 @@
1
- import { Types, IDataMockInit, IHttpRequestInit } from '@pawel-up/data-mock';
1
+ import { IDataMockInit, IHttpRequestInit } from '@pawel-up/data-mock';
2
2
  import { IArcHttpRequest, Kind as ArcHttpRequestKind } from '../../models/arc/ArcHttpRequest.js';
3
3
  import { Request } from './Request.js';
4
4
 
5
5
  export class Arc {
6
6
  protected request: Request;
7
- protected types: Types;
8
7
 
9
8
  constructor(init: IDataMockInit={}) {
10
9
  this.request = new Request(init);
11
- this.types = new Types(init.seed);
12
- // this.lorem = new Lorem(init);
13
- // this.time = new Time(init);
14
- // this.http = new Http(init);
15
- // this.response = new Response(init);
16
10
  }
17
11
 
18
12
  arcRequest(init?: IHttpRequestInit): IArcHttpRequest {
19
13
  const request = this.request.request(init);
20
14
  return {
21
- key: this.types.uuid(),
15
+ key: new Date(request.created || Date.now()).toJSON(),
22
16
  ...request,
23
17
  kind: ArcHttpRequestKind,
24
18
  };