@ampsec/platform-client 67.0.1 → 67.0.2

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,11 @@
1
1
  import { FlowSpecCreateDto, FlowSpecDto, FlowSpecUpsertDto, Page } from '../dto';
2
2
  import { RestClient } from './rest';
3
3
  import { AmpEntityServiceImpl, EntityCallOptions } from './entity.service';
4
+ import { FilterCriteria } from '../FilterCriteria';
4
5
  export declare class FlowSpecsService extends AmpEntityServiceImpl<FlowSpecUpsertDto, FlowSpecDto> {
5
6
  constructor(rest: RestClient);
6
7
  /** @deprecated Use `createFromName` instead */
7
8
  create: (_model: FlowSpecUpsertDto | FlowSpecUpsertDto[], _options?: EntityCallOptions) => Promise<Page<FlowSpecDto>>;
8
9
  createFromName: (model: FlowSpecCreateDto) => Promise<FlowSpecDto>;
10
+ _summary: (filter: FilterCriteria) => Promise<Page<FlowSpecDto>>;
9
11
  }
@@ -26,6 +26,14 @@ class FlowSpecsService extends entity_service_1.AmpEntityServiceImpl {
26
26
  });
27
27
  return res.data[0];
28
28
  };
29
+ this._summary = async (filter) => {
30
+ const res = await this.rest.call({
31
+ url: `/${this.targetApi}/v1/${this.kind}/_summary`,
32
+ method: 'GET',
33
+ params: filter,
34
+ });
35
+ return res.data;
36
+ };
29
37
  }
30
38
  }
31
39
  exports.FlowSpecsService = FlowSpecsService;
@@ -1 +1 @@
1
- {"version":3,"file":"flowSpecs.service.js","sourceRoot":"","sources":["../../../src/services/flowSpecs.service.ts"],"names":[],"mappings":";;;AAGA,2CAAiC;AACjC,qDAAyE;AAEzE,MAAa,gBAAiB,SAAQ,qCAAoD;IACxF,YAAY,IAAgB;QAC1B,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,UAAU,CAAC,CAAC;QAG/B,+CAA+C;QAC/C,WAAM,GAAG,CAAC,MAA+C,EAAE,QAA4B,EAA8B,EAAE;YACrH,MAAM,IAAI,KAAK,CAAC,yBAAyB,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CAAC,IAAI,EAAE;gBACzC,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,KAAK;aACZ,EACD,CAAC,KAAc,EAAE,EAAE;gBACjB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;gBACzE,OAAO;oBACL,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;oBAC7B,KAAK,EAAE,OAAO;oBACd,KAAK,EAAE,EAAE;iBACV,CAAC;YACJ,CAAC,CACF,CAAC;YACF,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC,CAAC;QACF,aAAQ,GAAG,KAAK,EAAE,MAAsB,EAA8B,EAAE;YACtE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,WAAW;gBAClD,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE,MAAM;aACf,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,IAAyB,CAAC;QACvC,CAAC,CAAC;IAjCF,CAAC;CAkCF;AArCD,4CAqCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "67.0.1",
3
+ "version": "67.0.2",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -3,6 +3,7 @@ import {FlowSpecCreateDto, FlowSpecDto, FlowSpecUpsertDto, Page} from '../dto';
3
3
  import {RestClient} from './rest';
4
4
  import {KIND} from './constants';
5
5
  import {AmpEntityServiceImpl, EntityCallOptions} from './entity.service';
6
+ import {FilterCriteria} from '../FilterCriteria';
6
7
 
7
8
  export class FlowSpecsService extends AmpEntityServiceImpl<FlowSpecUpsertDto, FlowSpecDto> {
8
9
  constructor(rest: RestClient) {
@@ -33,4 +34,12 @@ export class FlowSpecsService extends AmpEntityServiceImpl<FlowSpecUpsertDto, Fl
33
34
  );
34
35
  return res.data[0];
35
36
  };
37
+ _summary = async (filter: FilterCriteria): Promise<Page<FlowSpecDto>> => {
38
+ const res = await this.rest.call({
39
+ url: `/${this.targetApi}/v1/${this.kind}/_summary`,
40
+ method: 'GET',
41
+ params: filter,
42
+ });
43
+ return res.data as Page<FlowSpecDto>;
44
+ };
36
45
  }