@abyss-project/main 1.10.0 → 1.11.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.
Files changed (32) hide show
  1. package/dist/api/project.admin.api.d.ts +2 -1
  2. package/dist/api/project.admin.api.js +5 -1
  3. package/dist/api/project.admin.api.js.map +1 -1
  4. package/dist/constants/billing-catalog.constants.d.ts +9 -0
  5. package/dist/constants/billing-catalog.constants.js +38 -3
  6. package/dist/constants/billing-catalog.constants.js.map +1 -1
  7. package/dist/constants/enforcement-registry.constants.d.ts +4 -1
  8. package/dist/constants/enforcement-registry.constants.js +185 -52
  9. package/dist/constants/enforcement-registry.constants.js.map +1 -1
  10. package/dist/constants/public-plans.constants.js +414 -0
  11. package/dist/constants/public-plans.constants.js.map +1 -1
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +1 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/server/after-commit-emit.util.d.ts +1 -0
  16. package/dist/server/after-commit-emit.util.js +37 -1
  17. package/dist/server/after-commit-emit.util.js.map +1 -1
  18. package/dist/types/enum/organization-billing.enum.d.ts +4 -0
  19. package/dist/types/enum/organization-billing.enum.js +6 -1
  20. package/dist/types/enum/organization-billing.enum.js.map +1 -1
  21. package/dist/types/interface/api/requests/organization-billing.request.d.ts +2 -0
  22. package/dist/types/interface/api/requests/user-billing.request.d.ts +2 -0
  23. package/dist/types/interface/api/responses/organization-billing.response.d.ts +2 -0
  24. package/dist/types/interface/api/responses/user-billing.response.d.ts +2 -0
  25. package/dist/types/interface/index.d.ts +1 -0
  26. package/dist/types/interface/index.js +1 -0
  27. package/dist/types/interface/index.js.map +1 -1
  28. package/dist/types/interface/models/quota-reservation.model.d.ts +1 -0
  29. package/dist/types/interface/quota-reservation-event.d.ts +19 -0
  30. package/dist/types/interface/quota-reservation-event.js +11 -0
  31. package/dist/types/interface/quota-reservation-event.js.map +1 -0
  32. package/package.json +11 -15
@@ -88,6 +88,8 @@ export interface IImportQuotaOrganizationBody {
88
88
  service: BillingService;
89
89
  metric: BillingMetric;
90
90
  resourceIds: string[];
91
+ syncedAt?: string;
92
+ isFinalChunk?: boolean;
91
93
  }
92
94
  export interface IRecordUsageOrganizationParams {
93
95
  organizationId: string;
@@ -119,4 +119,6 @@ export interface IImportQuotaUserBody {
119
119
  service: BillingService;
120
120
  metric: BillingMetric;
121
121
  resourceIds: string[];
122
+ syncedAt?: string;
123
+ isFinalChunk?: boolean;
122
124
  }
@@ -53,6 +53,7 @@ export interface ICheckQuotaOrganizationData {
53
53
  effectiveLimit?: number;
54
54
  capReached?: boolean;
55
55
  overageAllowed?: boolean;
56
+ limitUpdatedAt?: string | null;
56
57
  }
57
58
  export type ICheckQuotaOrganizationResponse = IResponse<ICheckQuotaOrganizationData>;
58
59
  export interface IRecordUsageOrganizationData {
@@ -80,6 +81,7 @@ export type IReleaseQuotaOrganizationResponse = IResponse<IReleaseQuotaOrganizat
80
81
  export interface IImportQuotaOrganizationData {
81
82
  imported: number;
82
83
  skipped: number;
84
+ swept: number;
83
85
  }
84
86
  export type IImportQuotaOrganizationResponse = IResponse<IImportQuotaOrganizationData>;
85
87
  export interface ISetStorageSubtotalOrganizationData {
@@ -79,6 +79,7 @@ export interface ICheckUserQuotaData {
79
79
  effectiveLimit?: number;
80
80
  capReached?: boolean;
81
81
  overageAllowed?: boolean;
82
+ limitUpdatedAt?: string | null;
82
83
  }
83
84
  export type ICheckUserQuotaResponse = IResponse<ICheckUserQuotaData>;
84
85
  export interface IListUserEurTransactionsData {
@@ -110,6 +111,7 @@ export type IReleaseQuotaUserResponse = IResponse<IReleaseQuotaUserData>;
110
111
  export interface IImportQuotaUserData {
111
112
  imported: number;
112
113
  skipped: number;
114
+ swept: number;
113
115
  }
114
116
  export type IImportQuotaUserResponse = IResponse<IImportQuotaUserData>;
115
117
  export interface ICreateEurTopupUserData {
@@ -63,3 +63,4 @@ export * from './models/user-cookie-consent.model';
63
63
  export * from './models/user-feedback-state.model';
64
64
  export * from './models/user-sidebar-pin.model';
65
65
  export * from './models/admin-audit-log.model';
66
+ export * from './quota-reservation-event';
@@ -79,4 +79,5 @@ __exportStar(require("./models/user-cookie-consent.model"), exports);
79
79
  __exportStar(require("./models/user-feedback-state.model"), exports);
80
80
  __exportStar(require("./models/user-sidebar-pin.model"), exports);
81
81
  __exportStar(require("./models/admin-audit-log.model"), exports);
82
+ __exportStar(require("./quota-reservation-event"), exports);
82
83
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,yDAAuC;AACvC,gEAA8C;AAC9C,4EAA0D;AAC1D,6DAA2C;AAC3C,mEAAiD;AACjD,yEAAuD;AACvD,+DAA6C;AAC7C,+DAA6C;AAC7C,8DAA4C;AAC5C,mEAAiD;AACjD,oEAAkD;AAGlD,2DAAyC;AACzC,sEAAoD;AAGpD,wCAAsB;AAGtB,uDAAqC;AAGrC,wDAAsC;AACtC,gEAA8C;AAC9C,8DAA4C;AAC5C,oEAAkD;AAClD,8EAA4D;AAC5D,kFAAgE;AAGhE,8DAA4C;AAC5C,0EAAwD;AACxD,qEAAmD;AAGnD,+DAA6C;AAC7C,iEAA+C;AAC/C,4EAA0D;AAC1D,4EAA0D;AAC1D,8DAA4C;AAC5C,yDAAuC;AACvC,oEAAkD;AAClD,iEAA+C;AAC/C,0EAAwD;AACxD,6DAA2C;AAC3C,sEAAoD;AACpD,mEAAiD;AACjD,mEAAiD;AACjD,kEAAgD;AAChD,qEAAmD;AACnD,wEAAsD;AACtD,+DAA6C;AAC7C,8DAA4C;AAC5C,qEAAmD;AACnD,sDAAoC;AACpC,6DAA2C;AAC3C,qEAAmD;AACnD,iFAA+D;AAC/D,iEAA+C;AAC/C,oFAAkE;AAGlE,kEAAgD;AAGhD,mEAAiD;AAGjD,+DAA6C;AAO7C,gEAA8C;AAG9C,gEAA8C;A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/C,4DAA0C"}
@@ -7,6 +7,7 @@ export interface IQuotaReservation {
7
7
  metric: BillingMetric;
8
8
  resourceId: string;
9
9
  confirmedAt: Date | null;
10
+ lastSyncedAt?: Date | null;
10
11
  updatedAt?: Date;
11
12
  createdAt?: Date;
12
13
  billingAccount?: IBillingAccount;
@@ -0,0 +1,19 @@
1
+ import { BillingService, BillingMetric } from '../enum/organization-billing.enum';
2
+ export declare const QUOTA_RESERVATION_EXCHANGE = "quota-reservation";
3
+ export declare const QUOTA_RESERVATION_QUEUE = "quota-reservation.abyss-main";
4
+ export declare enum QuotaReservationEventType {
5
+ CONFIRM = "CONFIRM",
6
+ RELEASE = "RELEASE"
7
+ }
8
+ export interface IQuotaReservationEventScope {
9
+ userId: string | null;
10
+ organizationId: string | null;
11
+ }
12
+ export interface IQuotaReservationEvent {
13
+ type: QuotaReservationEventType;
14
+ scope: IQuotaReservationEventScope;
15
+ service: BillingService;
16
+ metric: BillingMetric;
17
+ resourceId: string;
18
+ emittedAt: string;
19
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuotaReservationEventType = exports.QUOTA_RESERVATION_QUEUE = exports.QUOTA_RESERVATION_EXCHANGE = void 0;
4
+ exports.QUOTA_RESERVATION_EXCHANGE = 'quota-reservation';
5
+ exports.QUOTA_RESERVATION_QUEUE = 'quota-reservation.abyss-main';
6
+ var QuotaReservationEventType;
7
+ (function (QuotaReservationEventType) {
8
+ QuotaReservationEventType["CONFIRM"] = "CONFIRM";
9
+ QuotaReservationEventType["RELEASE"] = "RELEASE";
10
+ })(QuotaReservationEventType || (exports.QuotaReservationEventType = QuotaReservationEventType = {}));
11
+ //# sourceMappingURL=quota-reservation-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quota-reservation-event.js","sourceRoot":"","sources":["../../../src/types/interface/quota-reservation-event.ts"],"names":[],"mappings":";;;AAgCa,QAAA,0BAA0B,GAAG,mBAAmB,CAAC;AAGjD,QAAA,uBAAuB,GAAG,8BAA8B,CAAC;AAEtE,IAAY,yBAKX;AALD,WAAY,yBAAyB;IAEnC,gDAAmB,CAAA;IAEnB,gDAAmB,CAAA;AACrB,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/main",
3
- "version": "1.10.0",
3
+ "version": "1.11.1",
4
4
  "description": "Core package to interact with Abyss-Project",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,19 +21,6 @@
21
21
  ]
22
22
  }
23
23
  },
24
- "publishConfig": {
25
- "main": "dist/index.js",
26
- "types": "dist/index.d.ts"
27
- },
28
- "scripts": {
29
- "lint": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --fix",
30
- "lint:check": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --max-warnings 0",
31
- "tsc": "tsc",
32
- "build": "tsc",
33
- "dev": "tsc --watch",
34
- "test": "jest",
35
- "prepublish": "tsc"
36
- },
37
24
  "repository": {
38
25
  "type": "git",
39
26
  "url": "https://gitlab.com/abyss-group"
@@ -82,5 +69,14 @@
82
69
  "sequelize-cli": "^6.2.0",
83
70
  "ts-jest": "^29.1.1",
84
71
  "typescript": "5.4.2"
72
+ },
73
+ "scripts": {
74
+ "lint": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --fix",
75
+ "lint:check": "eslint \"{src,apps,libs,test,core}/**/*.ts\" --max-warnings 0",
76
+ "tsc": "tsc",
77
+ "build": "tsc",
78
+ "dev": "tsc --watch",
79
+ "test": "jest",
80
+ "prepublish": "tsc"
85
81
  }
86
- }
82
+ }