@or-sdk/billing 11.41.0 → 11.41.1

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 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/auditApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sCAAqC;AAIrC;IAAsC,4BAAO;IAA7C;;QACmB,iBAAW,GAAG,OAAO,CAAC;;IA0CzC,CAAC;IArCc,4BAAS,GAAtB;4DACE,MAAuB,EACvB,OAA+B;;YAA/B,wBAAA,EAAA,YAA+B;;;;wBAGzB,KAAwB,MAAM,IAAI,EAAS,EAAzC,IAAI,UAAA,EAAE,EAAE,QAAA,EAAK,IAAI,cAAnB,cAAqB,CAAF,CAAyB;wBAC5C,UAAU,gBAAiC,IAAI,CAAE,CAAC;wBACxD,IAAI,IAAI,YAAY,IAAI;4BAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;6BAAM,IAAI,IAAI;4BAAE,UAAU,CAAC,IAAI,GAAG,IAAc,CAAC;wBAChH,IAAI,EAAE,YAAY,IAAI;4BAAE,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC;6BAAM,IAAI,EAAE;4BAAE,UAAU,CAAC,EAAE,GAAG,EAAY,CAAC;wBAE7F,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE,EAC5B,MAAM,EAAE,UAAU,IACf,OAAO,EACV,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IAKY,+BAAY,GAAzB,UAA0B,EAAU;;;;4BAC3B,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAA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G,IAAI,EAAE,YAAY,IAAI;gBAAE,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC;iBAAK,IAAI,EAAE;gBAAE,UAAU,CAAC,EAAE,GAAG,EAAY,CAAC;YAEnG,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,EAC5B,MAAM,EAAE,UAAU,IACf,OAAO,EACV,CAAC;QACL,CAAC;KAAA;IAKY,YAAY,CAAC,EAAU;;YAClC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE,EAAE;aACnC,CAAC,CAAC;QACL,CAAC;KAAA;IAKY,WAAW;;YACtB,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,WAAW;aACtC,CAAC,CAAC;QACL,CAAC;KAAA;CACF"}
@@ -1,10 +1,12 @@
1
+ import { AuditPaginatedResponseDto, AuditQueryParamsDto, AuditDto } from '@onereach/billing-dto';
1
2
  import { OptionalApiParams } from '../../types';
2
3
  import { BaseApi } from '../baseApi';
3
- import { AuditEntitiesResponse, AuditRecordDto, GetAuditsParams, GetAuditsResponse } from './types';
4
4
  export default class AuditApi extends BaseApi {
5
5
  private readonly apiBasePath;
6
- getAudits(params: GetAuditsParams, options?: OptionalApiParams): Promise<GetAuditsResponse>;
7
- getAuditById(id: string): Promise<AuditRecordDto>;
8
- getEntities(): Promise<AuditEntitiesResponse>;
6
+ getAudits(params: AuditQueryParamsDto, options?: OptionalApiParams): Promise<AuditPaginatedResponseDto>;
7
+ getAuditById(id: string): Promise<AuditDto>;
8
+ getEntities(): Promise<{
9
+ items: string[];
10
+ }>;
9
11
  }
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/auditApi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEpG,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO;IAC3C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAW;IAK1B,SAAS,CACpB,MAAM,EAAE,eAAe,EACvB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,iBAAiB,CAAC;IAkBhB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAUjD,WAAW,IAAI,OAAO,CAAC,qBAAqB,CAAC;CAM3D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/auditApi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO;IAC3C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAW;IAK1B,SAAS,CACpB,MAAM,EAAE,mBAAmB,EAC3B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,yBAAyB,CAAC;IAmBxB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAU3C,WAAW,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAMzD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@or-sdk/billing",
3
- "version": "11.41.0",
3
+ "version": "11.41.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -15,8 +15,8 @@
15
15
  "dev": "pnpm build:watch:esm"
16
16
  },
17
17
  "dependencies": {
18
- "@onereach/billing-dto": "^11.41.0",
19
- "@onereach/billing-shared": "^11.41.0",
18
+ "@onereach/billing-dto": "^11.41.1",
19
+ "@onereach/billing-shared": "^11.41.1",
20
20
  "@or-sdk/base": "^0.42.4",
21
21
  "@or-sdk/discovery": "1.10.6",
22
22
  "@types/qs": "6.14.0",
@@ -1,8 +1,8 @@
1
+ import { AuditPaginatedResponseDto, AuditQueryParamsDto, AuditDto } from '@onereach/billing-dto';
2
+
1
3
  import { OptionalApiParams } from '../../types';
2
4
  import { BaseApi } from '../baseApi';
3
5
 
4
- import { AuditEntitiesResponse, AuditRecordDto, GetAuditsParams, GetAuditsResponse } from './types';
5
-
6
6
  export default class AuditApi extends BaseApi {
7
7
  private readonly apiBasePath = 'audit';
8
8
 
@@ -10,14 +10,15 @@ export default class AuditApi extends BaseApi {
10
10
  * @description Get audits with pagination and filters
11
11
  */
12
12
  public async getAudits(
13
- params: GetAuditsParams,
13
+ params: AuditQueryParamsDto,
14
14
  options: OptionalApiParams = {},
15
- ): Promise<GetAuditsResponse> {
15
+ ): Promise<AuditPaginatedResponseDto> {
16
16
  // Normalize date params to ISO if Date objects are passed
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
18
  const { from, to, ...rest } = params || {} as any;
18
19
  const normalized: Record<string, unknown> = { ...rest };
19
- if (from instanceof Date) normalized.from = from.toISOString(); else if (from) normalized.from = from as string;
20
- if (to instanceof Date) normalized.to = to.toISOString(); else if (to) normalized.to = to as string;
20
+ if (from instanceof Date) normalized.from = from.toISOString();else if (from) normalized.from = from as string;
21
+ if (to instanceof Date) normalized.to = to.toISOString();else if (to) normalized.to = to as string;
21
22
 
22
23
  return await this.apiCall({
23
24
  method: 'GET',
@@ -30,7 +31,7 @@ export default class AuditApi extends BaseApi {
30
31
  /**
31
32
  * @description Get audit record by id
32
33
  */
33
- public async getAuditById(id: string): Promise<AuditRecordDto> {
34
+ public async getAuditById(id: string): Promise<AuditDto> {
34
35
  return await this.apiCall({
35
36
  method: 'GET',
36
37
  route: `${this.apiBasePath}/${id}`,
@@ -40,7 +41,7 @@ export default class AuditApi extends BaseApi {
40
41
  /**
41
42
  * @description Get list of audited entity names
42
43
  */
43
- public async getEntities(): Promise<AuditEntitiesResponse> {
44
+ public async getEntities(): Promise<{ items: string[] }> {
44
45
  return await this.apiCall({
45
46
  method: 'GET',
46
47
  route: `${this.apiBasePath}/entities`,
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/auditApi/types.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/api/auditApi/types.ts"],"names":[],"mappings":""}
@@ -1,31 +0,0 @@
1
- import { AuditOperation, ResponseDto, RequestDto } from '@onereach/billing-shared';
2
- export interface AuditRecordDto {
3
- id: string;
4
- entityName: string;
5
- entityId: string;
6
- operation: AuditOperation;
7
- changedAt: string;
8
- changedBy?: string | null;
9
- before?: Record<string, unknown> | null;
10
- after?: Record<string, unknown> | null;
11
- diff?: Record<string, {
12
- before: unknown;
13
- after: unknown;
14
- } | undefined> | null;
15
- }
16
- export type GetAuditsParams = Partial<{
17
- entityName: string;
18
- entityId: string;
19
- operation: AuditOperation;
20
- from: Date | string;
21
- to: Date | string;
22
- search: string;
23
- }> & RequestDto;
24
- export type GetAuditsResponse = ResponseDto<AuditRecordDto> & {
25
- skip: number;
26
- take: number;
27
- };
28
- export interface AuditEntitiesResponse {
29
- items: string[];
30
- }
31
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/auditApi/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEnF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC;CAC/E;AAED,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,cAAc,CAAC;IAC1B,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,EAAE,EAAE,IAAI,GAAG,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,GAAG,UAAU,CAAC;AAEhB,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,cAAc,CAAC,GAAG;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB"}
@@ -1,31 +0,0 @@
1
- import { AuditOperation, ResponseDto, RequestDto } from '@onereach/billing-shared';
2
-
3
- export interface AuditRecordDto {
4
- id: string;
5
- entityName: string;
6
- entityId: string;
7
- operation: AuditOperation;
8
- changedAt: string; // ISO string
9
- changedBy?: string | null;
10
- before?: Record<string, unknown> | null;
11
- after?: Record<string, unknown> | null;
12
- diff?: Record<string, { before: unknown; after: unknown } | undefined> | null;
13
- }
14
-
15
- export type GetAuditsParams = Partial<{
16
- entityName: string;
17
- entityId: string;
18
- operation: AuditOperation;
19
- from: Date | string;
20
- to: Date | string;
21
- search: string;
22
- }> & RequestDto;
23
-
24
- export type GetAuditsResponse = ResponseDto<AuditRecordDto> & {
25
- skip: number;
26
- take: number;
27
- };
28
-
29
- export interface AuditEntitiesResponse {
30
- items: string[];
31
- }