@carbonbox/domain 0.29.0 → 0.29.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.
Files changed (57) hide show
  1. package/build/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.js +24 -7
  2. package/build/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.js +24 -7
  3. package/build/carbonbox/shared/domain/exceptions/AccountLockedError.js +58 -0
  4. package/build/carbonbox/shared/domain/exceptions/CodedRootError.js +6 -6
  5. package/build/carbonbox/shared/domain/exceptions/ConfigurationNotFoundError.js +62 -0
  6. package/build/carbonbox/shared/domain/exceptions/ContractNotFoundError.js +58 -0
  7. package/build/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.js +61 -0
  8. package/build/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.js +56 -0
  9. package/build/carbonbox/shared/domain/exceptions/InvalidCredentialsError.js +35 -0
  10. package/build/carbonbox/shared/domain/exceptions/InvalidCurrencyError.js +51 -6
  11. package/build/carbonbox/shared/domain/exceptions/InvalidDateFormatError.js +1 -1
  12. package/build/carbonbox/shared/domain/exceptions/MissingCredentialsError.js +53 -0
  13. package/build/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.js +98 -0
  14. package/build/carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError.js +64 -0
  15. package/build/carbonbox/shared/domain/exceptions/StakeholderNotFoundError.js +49 -0
  16. package/build/carbonbox/shared/domain/exceptions/TokenExpiredError.js +48 -0
  17. package/build/carbonbox/stakeholders/carbon-clients/domain/entity/CarbonClient.js +10 -8
  18. package/build/carbonbox/stakeholders/carbon-coordinators/domain/entity/CarbonCoordinator.js +10 -8
  19. package/build/carbonbox/stakeholders/carbon-host/domain/entity/CarbonHost.js +5 -4
  20. package/build/carbonbox/stakeholders/carbon-managers/domain/entity/CarbonManager.js +10 -8
  21. package/build/main/index.js +31 -5
  22. package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.d.ts +9 -3
  23. package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.d.ts.map +1 -1
  24. package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.d.ts +9 -3
  25. package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.d.ts.map +1 -1
  26. package/build/types/carbonbox/shared/domain/exceptions/AccountLockedError.d.ts +25 -0
  27. package/build/types/carbonbox/shared/domain/exceptions/AccountLockedError.d.ts.map +1 -0
  28. package/build/types/carbonbox/shared/domain/exceptions/CodedRootError.d.ts.map +1 -1
  29. package/build/types/carbonbox/shared/domain/exceptions/ConfigurationNotFoundError.d.ts +29 -0
  30. package/build/types/carbonbox/shared/domain/exceptions/ConfigurationNotFoundError.d.ts.map +1 -0
  31. package/build/types/carbonbox/shared/domain/exceptions/ContractNotFoundError.d.ts +25 -0
  32. package/build/types/carbonbox/shared/domain/exceptions/ContractNotFoundError.d.ts.map +1 -0
  33. package/build/types/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.d.ts +27 -0
  34. package/build/types/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.d.ts.map +1 -0
  35. package/build/types/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.d.ts +25 -0
  36. package/build/types/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.d.ts.map +1 -0
  37. package/build/types/carbonbox/shared/domain/exceptions/InvalidCredentialsError.d.ts +13 -0
  38. package/build/types/carbonbox/shared/domain/exceptions/InvalidCredentialsError.d.ts.map +1 -0
  39. package/build/types/carbonbox/shared/domain/exceptions/InvalidCurrencyError.d.ts +23 -3
  40. package/build/types/carbonbox/shared/domain/exceptions/InvalidCurrencyError.d.ts.map +1 -1
  41. package/build/types/carbonbox/shared/domain/exceptions/MissingCredentialsError.d.ts +25 -0
  42. package/build/types/carbonbox/shared/domain/exceptions/MissingCredentialsError.d.ts.map +1 -0
  43. package/build/types/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.d.ts +42 -0
  44. package/build/types/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.d.ts.map +1 -0
  45. package/build/types/carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError.d.ts +29 -0
  46. package/build/types/carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError.d.ts.map +1 -0
  47. package/build/types/carbonbox/shared/domain/exceptions/StakeholderNotFoundError.d.ts +21 -0
  48. package/build/types/carbonbox/shared/domain/exceptions/StakeholderNotFoundError.d.ts.map +1 -0
  49. package/build/types/carbonbox/shared/domain/exceptions/TokenExpiredError.d.ts +21 -0
  50. package/build/types/carbonbox/shared/domain/exceptions/TokenExpiredError.d.ts.map +1 -0
  51. package/build/types/carbonbox/stakeholders/carbon-clients/domain/entity/CarbonClient.d.ts.map +1 -1
  52. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/entity/CarbonCoordinator.d.ts.map +1 -1
  53. package/build/types/carbonbox/stakeholders/carbon-host/domain/entity/CarbonHost.d.ts.map +1 -1
  54. package/build/types/carbonbox/stakeholders/carbon-managers/domain/entity/CarbonManager.d.ts.map +1 -1
  55. package/build/types/main/index.d.ts +11 -0
  56. package/build/types/main/index.d.ts.map +1 -1
  57. package/package.json +1 -1
@@ -0,0 +1,27 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Error thrown when a user tries to perform an action that requires
4
+ * a verified email address, but their email has not been verified yet.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ export declare class EmailNotVerifiedError extends CodedRootError {
9
+ private constructor();
10
+ /**
11
+ * Factory method to create a new EmailNotVerifiedError instance
12
+ *
13
+ * @param email - The unverified email address
14
+ * @param actionAttempted - Optional description of the action the user attempted
15
+ * @returns A new EmailNotVerifiedError instance
16
+ */
17
+ static create(email: string, actionAttempted?: string): EmailNotVerifiedError;
18
+ /**
19
+ * Returns whether the error is related to accessing restricted features
20
+ */
21
+ isAccessRestriction(): boolean;
22
+ /**
23
+ * Returns a user-friendly message based on the locale
24
+ */
25
+ getUserMessage(locale?: string): string;
26
+ }
27
+ //# sourceMappingURL=EmailNotVerifiedError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmailNotVerifiedError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,cAAc;IACvD,OAAO;IA+BP;;;;;;OAMG;WACoB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,qBAAqB;IAI7F;;OAEG;IACI,mBAAmB,IAAI,OAAO;IAIrC;;OAEG;IACI,cAAc,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM;CASrD"}
@@ -0,0 +1,25 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when a business status transition is invalid
4
+ * This error occurs when attempting to change a stakeholder or entity status to an invalid state
5
+ *
6
+ * Error code: CBX-STK-005
7
+ * @since 1.0.0
8
+ */
9
+ export declare class InvalidBusinessStatusError extends CodedRootError {
10
+ private constructor();
11
+ static create(currentStatus: string, attemptedStatus: string, entityType: string, entityId?: string): InvalidBusinessStatusError;
12
+ /**
13
+ * Creates an error for invalid activation attempts
14
+ */
15
+ static cannotActivate(currentStatus: string, entityType: string, entityId?: string): InvalidBusinessStatusError;
16
+ /**
17
+ * Creates an error for invalid deactivation attempts
18
+ */
19
+ static cannotDeactivate(currentStatus: string, entityType: string, entityId?: string): InvalidBusinessStatusError;
20
+ /**
21
+ * Creates an error for invalid deletion attempts
22
+ */
23
+ static cannotDelete(currentStatus: string, entityType: string, entityId?: string): InvalidBusinessStatusError;
24
+ }
25
+ //# sourceMappingURL=InvalidBusinessStatusError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidBusinessStatusError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,0BAA2B,SAAQ,cAAc;IAC5D,OAAO;WA6BgB,MAAM,CAC3B,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,GAChB,0BAA0B;IAI7B;;OAEG;WACW,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,0BAA0B;IAItH;;OAEG;WACW,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,0BAA0B;IAIxH;;OAEG;WACW,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,0BAA0B;CAGrH"}
@@ -0,0 +1,13 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when authentication credentials are invalid
4
+ * This error is used when the email/password combination is incorrect
5
+ *
6
+ * Error code: CBX-AUTH-001
7
+ * @since 1.0.0
8
+ */
9
+ export declare class InvalidCredentialsError extends CodedRootError {
10
+ private constructor();
11
+ static create(email: string, attemptNumber?: number): InvalidCredentialsError;
12
+ }
13
+ //# sourceMappingURL=InvalidCredentialsError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidCredentialsError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidCredentialsError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IACzD,OAAO;WAqBgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,uBAAuB;CAG9F"}
@@ -1,7 +1,27 @@
1
- import { RootError } from './RootError';
2
- export declare class InvalidCurrencyError extends RootError {
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Error thrown when an invalid currency code is provided
4
+ * that does not match the accepted currency standards.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ export declare class InvalidCurrencyError extends CodedRootError {
3
9
  private constructor();
10
+ /**
11
+ * Factory method to create a new InvalidCurrencyError instance
12
+ *
13
+ * @param currency - The invalid currency code provided
14
+ * @param validCurrencies - List of valid currency codes
15
+ * @returns A new InvalidCurrencyError instance
16
+ */
4
17
  static create(currency: string, validCurrencies: string[]): InvalidCurrencyError;
5
- logError(): string;
18
+ /**
19
+ * Checks if the provided currency might be a common typo
20
+ */
21
+ isPossibleTypo(): boolean;
22
+ /**
23
+ * Returns a user-friendly message based on the locale
24
+ */
25
+ getUserMessage(locale?: string): string;
6
26
  }
7
27
  //# sourceMappingURL=InvalidCurrencyError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvalidCurrencyError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidCurrencyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,oBAAqB,SAAQ,SAAS;IACjD,OAAO;WAOgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,oBAAoB;IAIhF,QAAQ,IAAI,MAAM;CAGnC"}
1
+ {"version":3,"file":"InvalidCurrencyError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidCurrencyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;IACtD,OAAO;IA4BP;;;;;;OAMG;WACoB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,oBAAoB;IAIhG;;OAEG;IACI,cAAc,IAAI,OAAO;IAUhC;;OAEG;IACI,cAAc,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM;CASrD"}
@@ -0,0 +1,25 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when required authentication credentials are missing
4
+ * This error occurs when email, password, or both are not provided
5
+ *
6
+ * Error code: CBX-AUTH-004
7
+ * @since 1.0.0
8
+ */
9
+ export declare class MissingCredentialsError extends CodedRootError {
10
+ private constructor();
11
+ static create(missingFields: string[]): MissingCredentialsError;
12
+ /**
13
+ * Creates a MissingCredentialsError for missing email
14
+ */
15
+ static missingEmail(): MissingCredentialsError;
16
+ /**
17
+ * Creates a MissingCredentialsError for missing password
18
+ */
19
+ static missingPassword(): MissingCredentialsError;
20
+ /**
21
+ * Creates a MissingCredentialsError for both missing email and password
22
+ */
23
+ static missingBoth(): MissingCredentialsError;
24
+ }
25
+ //# sourceMappingURL=MissingCredentialsError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MissingCredentialsError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/MissingCredentialsError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IACzD,OAAO;WAqBgB,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,uBAAuB;IAI/E;;OAEG;WACW,YAAY,IAAI,uBAAuB;IAIrD;;OAEG;WACW,eAAe,IAAI,uBAAuB;IAIxD;;OAEG;WACW,WAAW,IAAI,uBAAuB;CAGrD"}
@@ -0,0 +1,42 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Error thrown when a purchase order exceeds the allocated budget limit.
4
+ * This error helps prevent overspending and maintains financial controls.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ export declare class OrderExceedsBudgetError extends CodedRootError {
9
+ private constructor();
10
+ /**
11
+ * Factory method to create a new OrderExceedsBudgetError instance
12
+ *
13
+ * @param orderAmount - The total amount of the order
14
+ * @param budgetLimit - The maximum budget allowed
15
+ * @param currency - The currency code (e.g., USD, EUR)
16
+ * @param orderId - Optional order identifier
17
+ * @param projectName - Optional project or department name
18
+ * @returns A new OrderExceedsBudgetError instance
19
+ */
20
+ static create(orderAmount: number, budgetLimit: number, currency?: string, orderId?: string, projectName?: string): OrderExceedsBudgetError;
21
+ /**
22
+ * Returns the amount by which the order exceeds the budget
23
+ */
24
+ getExceedAmount(): number;
25
+ /**
26
+ * Returns the percentage by which the order exceeds the budget
27
+ */
28
+ getExceedPercentage(): number;
29
+ /**
30
+ * Checks if the order is slightly over budget (less than 10%)
31
+ */
32
+ isSlightlyOverBudget(): boolean;
33
+ /**
34
+ * Returns a user-friendly message based on the locale
35
+ */
36
+ getUserMessage(locale?: string): string;
37
+ /**
38
+ * Returns a detailed user message with amounts
39
+ */
40
+ getDetailedUserMessage(locale?: string): string;
41
+ }
42
+ //# sourceMappingURL=OrderExceedsBudgetError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderExceedsBudgetError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;GAKG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IACzD,OAAO;IA+CP;;;;;;;;;OASG;WACoB,MAAM,CAC3B,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,GAAE,MAAc,EACxB,OAAO,CAAC,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,uBAAuB;IAU1B;;OAEG;IACI,eAAe,IAAI,MAAM;IAIhC;;OAEG;IACI,mBAAmB,IAAI,MAAM;IAIpC;;OAEG;IACI,oBAAoB,IAAI,OAAO;IAItC;;OAEG;IACI,cAAc,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM;IAUpD;;OAEG;IACI,sBAAsB,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM;CAa7D"}
@@ -0,0 +1,29 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when a service catalog item is not found in the system
4
+ * This error occurs when searching for services by ID, code, or category
5
+ *
6
+ * Error code: CBX-PMS-007
7
+ * @since 1.0.0
8
+ */
9
+ export declare class ServiceCatalogNotFoundError extends CodedRootError {
10
+ private constructor();
11
+ static create(searchCriteria: string, searchValue: string, category?: string, status?: string): ServiceCatalogNotFoundError;
12
+ /**
13
+ * Creates a ServiceCatalogNotFoundError specifically for ID searches
14
+ */
15
+ static byId(id: string): ServiceCatalogNotFoundError;
16
+ /**
17
+ * Creates a ServiceCatalogNotFoundError specifically for service code searches
18
+ */
19
+ static byCode(code: string): ServiceCatalogNotFoundError;
20
+ /**
21
+ * Creates a ServiceCatalogNotFoundError for category searches
22
+ */
23
+ static byCategory(category: string): ServiceCatalogNotFoundError;
24
+ /**
25
+ * Creates a ServiceCatalogNotFoundError for active services
26
+ */
27
+ static noActiveService(serviceCode: string): ServiceCatalogNotFoundError;
28
+ }
29
+ //# sourceMappingURL=ServiceCatalogNotFoundError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceCatalogNotFoundError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,2BAA4B,SAAQ,cAAc;IAC7D,OAAO;WA+BgB,MAAM,CAC3B,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,2BAA2B;IAI9B;;OAEG;WACW,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,2BAA2B;IAI3D;;OAEG;WACW,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,2BAA2B;IAI/D;;OAEG;WACW,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,2BAA2B;IAIvE;;OAEG;WACW,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,2BAA2B;CAGhF"}
@@ -0,0 +1,21 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when a stakeholder is not found in the system
4
+ * This error occurs when searching for a stakeholder by ID, email, or other criteria
5
+ *
6
+ * Error code: CBX-STK-003
7
+ * @since 1.0.0
8
+ */
9
+ export declare class StakeholderNotFoundError extends CodedRootError {
10
+ private constructor();
11
+ static create(searchCriteria: string, searchValue: string, stakeholderType?: string): StakeholderNotFoundError;
12
+ /**
13
+ * Creates a StakeholderNotFoundError specifically for ID searches
14
+ */
15
+ static byId(id: string, stakeholderType?: string): StakeholderNotFoundError;
16
+ /**
17
+ * Creates a StakeholderNotFoundError specifically for email searches
18
+ */
19
+ static byEmail(email: string, stakeholderType?: string): StakeholderNotFoundError;
20
+ }
21
+ //# sourceMappingURL=StakeholderNotFoundError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StakeholderNotFoundError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/StakeholderNotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,OAAO;WAuBgB,MAAM,CAC3B,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,GACvB,wBAAwB;IAI3B;;OAEG;WACW,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,wBAAwB;IAIlF;;OAEG;WACW,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,wBAAwB;CAGzF"}
@@ -0,0 +1,21 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when a JWT token has expired
4
+ * This error indicates the user needs to authenticate again
5
+ *
6
+ * Error code: CBX-AUTH-002
7
+ * @since 1.0.0
8
+ */
9
+ export declare class TokenExpiredError extends CodedRootError {
10
+ private constructor();
11
+ static create(tokenType?: string, expiredAt?: string, userId?: string): TokenExpiredError;
12
+ /**
13
+ * Creates a TokenExpiredError specifically for access tokens
14
+ */
15
+ static accessToken(expiredAt?: string, userId?: string): TokenExpiredError;
16
+ /**
17
+ * Creates a TokenExpiredError specifically for refresh tokens
18
+ */
19
+ static refreshToken(expiredAt?: string, userId?: string): TokenExpiredError;
20
+ }
21
+ //# sourceMappingURL=TokenExpiredError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenExpiredError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/TokenExpiredError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,cAAc;IACnD,OAAO;WAsBgB,MAAM,CAAC,SAAS,GAAE,MAAiB,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,iBAAiB;IAInH;;OAEG;WACW,WAAW,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,iBAAiB;IAIjF;;OAEG;WACW,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,iBAAiB;CAGnF"}
@@ -1 +1 @@
1
- {"version":3,"file":"CarbonClient.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/stakeholders/carbon-clients/domain/entity/CarbonClient.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAExE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,mCAAmC,EAAE,MAAM,8CAA8C,CAAC;AACnG,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAMnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAG7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AAEnG,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAI3G,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,YACX,SAAQ,WAAW,CAAC,sBAAsB,CAC1C,YAAW,aAAa;;IAqBxB,OAAO;WAqFgB,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY;WAI9C,cAAc,CAAC,UAAU,EAAE,sBAAsB,GAAG,YAAY;WA6BzE,wBAAwB,CAAC,KAAK,EAAE,mCAAmC,GAAG,YAAY;IA2DhG,IAAoB,YAAY,IAAI,sBAAsB,CA0BzD;IAED,IAAW,iBAAiB,IAAI,6BAA6B,CAE5D;IAED,IAAW,YAAY,IAAI,wBAAwB,CAElD;IAED,IAAW,gBAAgB,IAAI,4BAA4B,CAE1D;IAED,IAAW,eAAe,IAAI,2BAA2B,CAExD;IAED,IAAW,mBAAmB,IAAI,+BAA+B,CAEhE;IAED,IAAW,mBAAmB,IAAI,+BAA+B,CAEhE;IAED,IAAW,UAAU,IAAI,sBAAsB,CAE9C;IAED,IAAW,IAAI,IAAI,gBAAgB,CAElC;IAED,IAAW,WAAW,IAAI,uBAAuB,CAEhD;IAED,IAAW,uBAAuB,IAAI,mCAAmC,CAExE;CACF"}
1
+ {"version":3,"file":"CarbonClient.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/stakeholders/carbon-clients/domain/entity/CarbonClient.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAExE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,mCAAmC,EAAE,MAAM,8CAA8C,CAAC;AACnG,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAMnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAG7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AAEnG,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAI3G,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,YACX,SAAQ,WAAW,CAAC,sBAAsB,CAC1C,YAAW,aAAa;;IAqBxB,OAAO;WAuFgB,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY;WAI9C,cAAc,CAAC,UAAU,EAAE,sBAAsB,GAAG,YAAY;WA6BzE,wBAAwB,CAAC,KAAK,EAAE,mCAAmC,GAAG,YAAY;IA2DhG,IAAoB,YAAY,IAAI,sBAAsB,CA0BzD;IAED,IAAW,iBAAiB,IAAI,6BAA6B,CAE5D;IAED,IAAW,YAAY,IAAI,wBAAwB,CAElD;IAED,IAAW,gBAAgB,IAAI,4BAA4B,CAE1D;IAED,IAAW,eAAe,IAAI,2BAA2B,CAExD;IAED,IAAW,mBAAmB,IAAI,+BAA+B,CAEhE;IAED,IAAW,mBAAmB,IAAI,+BAA+B,CAEhE;IAED,IAAW,UAAU,IAAI,sBAAsB,CAE9C;IAED,IAAW,IAAI,IAAI,gBAAgB,CAElC;IAED,IAAW,WAAW,IAAI,uBAAuB,CAEhD;IAED,IAAW,uBAAuB,IAAI,mCAAmC,CAExE;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"CarbonCoordinator.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/stakeholders/carbon-coordinators/domain/entity/CarbonCoordinator.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAExE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,wCAAwC,EAAE,MAAM,mDAAmD,CAAC;AAC7G,OAAO,EAAE,sCAAsC,EAAE,MAAM,yDAAyD,CAAC;AACjH,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAK3G,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAGnF,OAAO,EAAE,qCAAqC,EAAE,MAAM,wDAAwD,CAAC;AAG/G,OAAO,EAAE,qCAAqC,EAAE,MAAM,wDAAwD,CAAC;AAK/G,OAAO,EAAE,sCAAsC,EAAE,MAAM,yDAAyD,CAAC;AACjH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,iBACX,SAAQ,WAAW,CAAC,2BAA2B,CAC/C,YAAW,kBAAkB;;IAa7B,OAAO;WA6EgB,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,iBAAiB;WAIxD,cAAc,CAAC,UAAU,EAAE,2BAA2B,GAAG,iBAAiB;WAyBnF,wBAAwB,CAAC,KAAK,EAAE,wCAAwC,GAAG,iBAAiB;IAmD1G,IAAoB,YAAY,IAAI,2BAA2B,CAsB9D;IAED,IAAW,kBAAkB,IAAI,mCAAmC,CAEnE;IAED,IAAW,qBAAqB,IAAI,sCAAsC,CAEzE;IAED,IAAW,MAAM,IAAI,uBAAuB,CAE3C;IAED,IAAW,qBAAqB,IAAI,sCAAsC,CAEzE;IAED,IAAW,oBAAoB,IAAI,qCAAqC,CAEvE;IAED,IAAW,oBAAoB,IAAI,qCAAqC,CAEvE;CACF"}
1
+ {"version":3,"file":"CarbonCoordinator.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/stakeholders/carbon-coordinators/domain/entity/CarbonCoordinator.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAExE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,wCAAwC,EAAE,MAAM,mDAAmD,CAAC;AAC7G,OAAO,EAAE,sCAAsC,EAAE,MAAM,yDAAyD,CAAC;AACjH,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAK3G,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAGnF,OAAO,EAAE,qCAAqC,EAAE,MAAM,wDAAwD,CAAC;AAG/G,OAAO,EAAE,qCAAqC,EAAE,MAAM,wDAAwD,CAAC;AAK/G,OAAO,EAAE,sCAAsC,EAAE,MAAM,yDAAyD,CAAC;AACjH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,iBACX,SAAQ,WAAW,CAAC,2BAA2B,CAC/C,YAAW,kBAAkB;;IAa7B,OAAO;WA+EgB,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,iBAAiB;WAIxD,cAAc,CAAC,UAAU,EAAE,2BAA2B,GAAG,iBAAiB;WAyBnF,wBAAwB,CAAC,KAAK,EAAE,wCAAwC,GAAG,iBAAiB;IAmD1G,IAAoB,YAAY,IAAI,2BAA2B,CAsB9D;IAED,IAAW,kBAAkB,IAAI,mCAAmC,CAEnE;IAED,IAAW,qBAAqB,IAAI,sCAAsC,CAEzE;IAED,IAAW,MAAM,IAAI,uBAAuB,CAE3C;IAED,IAAW,qBAAqB,IAAI,sCAAsC,CAEzE;IAED,IAAW,oBAAoB,IAAI,qCAAqC,CAEvE;IAED,IAAW,oBAAoB,IAAI,qCAAqC,CAEvE;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"CarbonHost.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/stakeholders/carbon-host/domain/entity/CarbonHost.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAW/F,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,qBAAa,UACX,SAAQ,WAAW,CAAC,oBAAoB,CACxC,YAAW,WAAW;IACtB,OAAO;WAwDgB,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,UAAU;WAI1C,cAAc,CAAC,UAAU,EAAE,oBAAoB,GAAG,UAAU;WAmBrE,wBAAwB,CAAC,KAAK,EAAE,iCAAiC,GAAG,UAAU;IAoC5F,IAAoB,YAAY,IAAI,oBAAoB,CAgBvD;CACF"}
1
+ {"version":3,"file":"CarbonHost.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/stakeholders/carbon-host/domain/entity/CarbonHost.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAW/F,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,qBAAa,UACX,SAAQ,WAAW,CAAC,oBAAoB,CACxC,YAAW,WAAW;IACtB,OAAO;WAyDgB,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,UAAU;WAI1C,cAAc,CAAC,UAAU,EAAE,oBAAoB,GAAG,UAAU;WAmBrE,wBAAwB,CAAC,KAAK,EAAE,iCAAiC,GAAG,UAAU;IAoC5F,IAAoB,YAAY,IAAI,oBAAoB,CAgBvD;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"CarbonManager.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/stakeholders/carbon-managers/domain/entity/CarbonManager.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AAOrG,OAAO,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AAOrG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,aACX,SAAQ,WAAW,CAAC,uBAAuB,CAC3C,YAAW,cAAc;;IAGzB,OAAO;WAmEgB,MAAM,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa;WAIhD,cAAc,CAAC,UAAU,EAAE,uBAAuB,GAAG,aAAa;WAoB3E,wBAAwB,CAAC,KAAK,EAAE,oCAAoC,GAAG,aAAa;IAyClG,IAAoB,YAAY,IAAI,uBAAuB,CAiB1D;IAED,IAAW,mBAAmB,IAAI,gCAAgC,CAEjE;CACF"}
1
+ {"version":3,"file":"CarbonManager.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/stakeholders/carbon-managers/domain/entity/CarbonManager.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AAOrG,OAAO,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AAOrG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,aACX,SAAQ,WAAW,CAAC,uBAAuB,CAC3C,YAAW,cAAc;;IAGzB,OAAO;WAqEgB,MAAM,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa;WAIhD,cAAc,CAAC,UAAU,EAAE,uBAAuB,GAAG,aAAa;WAoB3E,wBAAwB,CAAC,KAAK,EAAE,oCAAoC,GAAG,aAAa;IAyClG,IAAoB,YAAY,IAAI,uBAAuB,CAiB1D;IAED,IAAW,mBAAmB,IAAI,gCAAgC,CAEjE;CACF"}
@@ -911,6 +911,17 @@ export { InvalidTaxIdentificationTypeError } from '../carbonbox/shared/domain/ex
911
911
  export { InvalidColombianNITFormatError } from '../carbonbox/shared/domain/exceptions/InvalidColombianNITFormatError';
912
912
  export { InvalidColombianNITCheckDigitError } from '../carbonbox/shared/domain/exceptions/InvalidColombianNITCheckDigitError';
913
913
  export { InvalidColombianNITNumberError } from '../carbonbox/shared/domain/exceptions/InvalidColombianNITNumberError';
914
+ export { InvalidCredentialsError } from '../carbonbox/shared/domain/exceptions/InvalidCredentialsError';
915
+ export { TokenExpiredError } from '../carbonbox/shared/domain/exceptions/TokenExpiredError';
916
+ export { MissingCredentialsError } from '../carbonbox/shared/domain/exceptions/MissingCredentialsError';
917
+ export { AccountLockedError } from '../carbonbox/shared/domain/exceptions/AccountLockedError';
918
+ export { EmailNotVerifiedError } from '../carbonbox/shared/domain/exceptions/EmailNotVerifiedError';
919
+ export { StakeholderNotFoundError } from '../carbonbox/shared/domain/exceptions/StakeholderNotFoundError';
920
+ export { InvalidBusinessStatusError } from '../carbonbox/shared/domain/exceptions/InvalidBusinessStatusError';
921
+ export { ConfigurationNotFoundError } from '../carbonbox/shared/domain/exceptions/ConfigurationNotFoundError';
922
+ export { ContractNotFoundError } from '../carbonbox/shared/domain/exceptions/ContractNotFoundError';
923
+ export { ServiceCatalogNotFoundError } from '../carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError';
924
+ export { OrderExceedsBudgetError } from '../carbonbox/shared/domain/exceptions/OrderExceedsBudgetError';
914
925
  export { InvalidDateFormatError } from '../carbonbox/shared/domain/exceptions/InvalidDateFormatError';
915
926
  export { InvalidDateRangeError } from '../carbonbox/shared/domain/exceptions/InvalidDateRangeError';
916
927
  export { InvalidTimeFormatError } from '../carbonbox/shared/domain/exceptions/InvalidTimeFormatError';