@coast/core-types 0.0.15 → 0.0.17

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 (159) hide show
  1. package/dist/application/Id.d.ts +2 -0
  2. package/dist/application/Id.js +3 -0
  3. package/dist/application/Id.js.map +1 -0
  4. package/dist/auth/keys/ApiKeyId.d.ts +3 -0
  5. package/dist/auth/keys/ApiKeyId.js +7 -0
  6. package/dist/auth/keys/ApiKeyId.js.map +1 -0
  7. package/dist/automations/AutomationId.d.ts +3 -0
  8. package/dist/automations/AutomationId.js +7 -0
  9. package/dist/automations/AutomationId.js.map +1 -0
  10. package/dist/automations/action/AutomationActionId.d.ts +3 -0
  11. package/dist/automations/action/AutomationActionId.js +7 -0
  12. package/dist/automations/action/AutomationActionId.js.map +1 -0
  13. package/dist/automations/action/audit/AutomationActionAuditId.d.ts +3 -0
  14. package/dist/automations/action/audit/AutomationActionAuditId.js +7 -0
  15. package/dist/automations/action/audit/AutomationActionAuditId.js.map +1 -0
  16. package/dist/business/BusinessId.d.ts +3 -0
  17. package/dist/business/BusinessId.js +7 -0
  18. package/dist/business/BusinessId.js.map +1 -0
  19. package/dist/channel/ChannelSlug.d.ts +3 -0
  20. package/dist/channel/ChannelSlug.js +7 -0
  21. package/dist/channel/ChannelSlug.js.map +1 -0
  22. package/dist/channel/WorkspaceId.d.ts +3 -0
  23. package/dist/channel/WorkspaceId.js +7 -0
  24. package/dist/channel/WorkspaceId.js.map +1 -0
  25. package/dist/common/EntityType.d.ts +13 -0
  26. package/dist/common/EntityType.js +18 -0
  27. package/dist/common/EntityType.js.map +1 -0
  28. package/dist/common/EntityTypeLabels.d.ts +2 -0
  29. package/dist/common/EntityTypeLabels.js +18 -0
  30. package/dist/common/EntityTypeLabels.js.map +1 -0
  31. package/dist/common/HmacSecretKey.d.ts +3 -0
  32. package/dist/common/HmacSecretKey.js +7 -0
  33. package/dist/common/HmacSecretKey.js.map +1 -0
  34. package/dist/common/ISODateString.d.ts +3 -0
  35. package/dist/common/ISODateString.js +7 -0
  36. package/dist/common/ISODateString.js.map +1 -0
  37. package/dist/common/RRuleString.d.ts +3 -0
  38. package/dist/common/RRuleString.js +7 -0
  39. package/dist/common/RRuleString.js.map +1 -0
  40. package/dist/error/GeneralErrorCode.d.ts +1 -0
  41. package/dist/error/GeneralErrorCode.js +1 -0
  42. package/dist/error/GeneralErrorCode.js.map +1 -1
  43. package/dist/exception/AssertionFailedException.d.ts +4 -0
  44. package/dist/exception/AssertionFailedException.js +17 -0
  45. package/dist/exception/AssertionFailedException.js.map +1 -0
  46. package/dist/exception/CoastException.d.ts +20 -0
  47. package/dist/exception/CoastException.js +37 -0
  48. package/dist/exception/CoastException.js.map +1 -0
  49. package/dist/exception/ForbiddenException.d.ts +4 -0
  50. package/dist/exception/ForbiddenException.js +17 -0
  51. package/dist/exception/ForbiddenException.js.map +1 -0
  52. package/dist/exception/InvalidComponentTypeException.d.ts +13 -0
  53. package/dist/exception/InvalidComponentTypeException.js +23 -0
  54. package/dist/exception/InvalidComponentTypeException.js.map +1 -0
  55. package/dist/exception/InvalidEntityReferenceException.d.ts +15 -0
  56. package/dist/exception/InvalidEntityReferenceException.js +23 -0
  57. package/dist/exception/InvalidEntityReferenceException.js.map +1 -0
  58. package/dist/exception/MultiException.d.ts +21 -0
  59. package/dist/exception/MultiException.js +34 -0
  60. package/dist/exception/MultiException.js.map +1 -0
  61. package/dist/exception/NotDefinedException.d.ts +4 -0
  62. package/dist/exception/NotDefinedException.js +17 -0
  63. package/dist/exception/NotDefinedException.js.map +1 -0
  64. package/dist/exception/NotFoundException.d.ts +11 -0
  65. package/dist/exception/NotFoundException.js +22 -0
  66. package/dist/exception/NotFoundException.js.map +1 -0
  67. package/dist/exception/UnauthorizedException.d.ts +4 -0
  68. package/dist/exception/UnauthorizedException.js +17 -0
  69. package/dist/exception/UnauthorizedException.js.map +1 -0
  70. package/dist/exception/test/CoastExceptionTest.d.ts +1 -0
  71. package/dist/exception/test/CoastExceptionTest.js +32 -0
  72. package/dist/exception/test/CoastExceptionTest.js.map +1 -0
  73. package/dist/file-operations/FileOperationId.d.ts +3 -0
  74. package/dist/file-operations/FileOperationId.js +8 -0
  75. package/dist/file-operations/FileOperationId.js.map +1 -0
  76. package/dist/file-storage/FileId.d.ts +3 -0
  77. package/dist/file-storage/FileId.js +7 -0
  78. package/dist/file-storage/FileId.js.map +1 -0
  79. package/dist/shared-link/SharedCardLinkId.d.ts +3 -0
  80. package/dist/shared-link/SharedCardLinkId.js +7 -0
  81. package/dist/shared-link/SharedCardLinkId.js.map +1 -0
  82. package/dist/user/UserId.d.ts +4 -0
  83. package/dist/user/UserId.js +7 -0
  84. package/dist/user/UserId.js.map +1 -0
  85. package/dist/user/group/UserGroupId.d.ts +3 -0
  86. package/dist/user/group/UserGroupId.js +7 -0
  87. package/dist/user/group/UserGroupId.js.map +1 -0
  88. package/dist/view-template/ViewTemplateId.d.ts +3 -0
  89. package/dist/view-template/ViewTemplateId.js +7 -0
  90. package/dist/view-template/ViewTemplateId.js.map +1 -0
  91. package/dist/view-template-layout/ViewTemplateLayoutId.d.ts +3 -0
  92. package/dist/view-template-layout/ViewTemplateLayoutId.js +7 -0
  93. package/dist/view-template-layout/ViewTemplateLayoutId.js.map +1 -0
  94. package/dist/view-template-layout/ViewTemplateLayoutItemId.d.ts +3 -0
  95. package/dist/view-template-layout/ViewTemplateLayoutItemId.js +7 -0
  96. package/dist/view-template-layout/ViewTemplateLayoutItemId.js.map +1 -0
  97. package/dist/workflow-app/bundle/BundleId.d.ts +3 -0
  98. package/dist/workflow-app/bundle/BundleId.js +7 -0
  99. package/dist/workflow-app/bundle/BundleId.js.map +1 -0
  100. package/dist/workflow-entity/WorkflowEntityEventId.d.ts +3 -0
  101. package/dist/workflow-entity/WorkflowEntityEventId.js +7 -0
  102. package/dist/workflow-entity/WorkflowEntityEventId.js.map +1 -0
  103. package/dist/workflow-entity/recurring/RecurringEntitiesScheduleId.d.ts +3 -0
  104. package/dist/workflow-entity/recurring/RecurringEntitiesScheduleId.js +7 -0
  105. package/dist/workflow-entity/recurring/RecurringEntitiesScheduleId.js.map +1 -0
  106. package/dist/workflow-entity/sort/LexoSortKey.d.ts +3 -0
  107. package/dist/workflow-entity/sort/LexoSortKey.js +7 -0
  108. package/dist/workflow-entity/sort/LexoSortKey.js.map +1 -0
  109. package/dist/workflow-template/WorkflowTemplateId.d.ts +3 -0
  110. package/dist/workflow-template/WorkflowTemplateId.js +7 -0
  111. package/dist/workflow-template/WorkflowTemplateId.js.map +1 -0
  112. package/dist/workflow-template/components/ComponentId.d.ts +3 -0
  113. package/dist/workflow-template/components/ComponentId.js +7 -0
  114. package/dist/workflow-template/components/ComponentId.js.map +1 -0
  115. package/dist/workspace-section/WorkspaceSectionId.d.ts +3 -0
  116. package/dist/workspace-section/WorkspaceSectionId.js +7 -0
  117. package/dist/workspace-section/WorkspaceSectionId.js.map +1 -0
  118. package/package.json +5 -1
  119. package/src/application/Id.ts +3 -0
  120. package/src/auth/keys/ApiKeyId.ts +8 -0
  121. package/src/automations/AutomationId.ts +8 -0
  122. package/src/automations/action/AutomationActionId.ts +8 -0
  123. package/src/automations/action/audit/AutomationActionAuditId.ts +8 -0
  124. package/src/business/BusinessId.ts +8 -0
  125. package/src/channel/ChannelSlug.ts +8 -0
  126. package/src/channel/WorkspaceId.ts +8 -0
  127. package/src/common/EntityType.ts +13 -0
  128. package/src/common/EntityTypeLabels.ts +15 -0
  129. package/src/common/HmacSecretKey.ts +8 -0
  130. package/src/common/ISODateString.ts +8 -0
  131. package/src/common/RRuleString.ts +8 -0
  132. package/src/error/GeneralErrorCode.ts +1 -0
  133. package/src/exception/AssertionFailedException.ts +13 -0
  134. package/src/exception/CoastException.ts +72 -0
  135. package/src/exception/ForbiddenException.ts +13 -0
  136. package/src/exception/InvalidComponentTypeException.ts +35 -0
  137. package/src/exception/InvalidEntityReferenceException.ts +31 -0
  138. package/src/exception/MultiException.ts +50 -0
  139. package/src/exception/NotDefinedException.ts +13 -0
  140. package/src/exception/NotFoundException.ts +26 -0
  141. package/src/exception/UnauthorizedException.ts +13 -0
  142. package/src/exception/test/CoastExceptionTest.ts +33 -0
  143. package/src/file-operations/FileOperationId.ts +8 -0
  144. package/src/file-storage/FileId.ts +8 -0
  145. package/src/shared-link/SharedCardLinkId.ts +8 -0
  146. package/src/user/UserId.ts +16 -0
  147. package/src/user/group/UserGroupId.ts +8 -0
  148. package/src/view-template/ViewTemplateId.ts +8 -0
  149. package/src/view-template-layout/ViewTemplateLayoutId.ts +8 -0
  150. package/src/view-template-layout/ViewTemplateLayoutItemId.ts +8 -0
  151. package/src/workflow-app/bundle/BundleId.ts +8 -0
  152. package/src/workflow-entity/WorkflowEntityEventId.ts +8 -0
  153. package/src/workflow-entity/recurring/RecurringEntitiesScheduleId.ts +8 -0
  154. package/src/workflow-entity/sort/LexoSortKey.ts +8 -0
  155. package/src/workflow-template/WorkflowTemplateId.ts +8 -0
  156. package/src/workflow-template/components/ComponentId.ts +8 -0
  157. package/src/workspace-section/WorkspaceSectionId.ts +8 -0
  158. package/tsconfig.json +2 -1
  159. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,2 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type Id = Brand<number | string, unknown> | number | string;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Id.js","sourceRoot":"","sources":["../../src/application/Id.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type ApiKeyId = Brand<string, 'ApiKeyId'>;
3
+ export declare function ApiKeyId(id: string): ApiKeyId;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiKeyId = ApiKeyId;
4
+ function ApiKeyId(id) {
5
+ return id;
6
+ }
7
+ //# sourceMappingURL=ApiKeyId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiKeyId.js","sourceRoot":"","sources":["../../../src/auth/keys/ApiKeyId.ts"],"names":[],"mappings":";;AAKA,4BAEC;AAFD,SAAgB,QAAQ,CAAC,EAAU;IAC/B,OAAO,EAAc,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type AutomationId = Brand<string, 'AutomationId'>;
3
+ export declare function AutomationId(id: string): AutomationId;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AutomationId = AutomationId;
4
+ function AutomationId(id) {
5
+ return id;
6
+ }
7
+ //# sourceMappingURL=AutomationId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutomationId.js","sourceRoot":"","sources":["../../src/automations/AutomationId.ts"],"names":[],"mappings":";;AAKA,oCAEC;AAFD,SAAgB,YAAY,CAAC,EAAU;IACnC,OAAO,EAAkB,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type AutomationActionId = Brand<string, 'AutomationActionId'>;
3
+ export declare function AutomationActionId(id: string): AutomationActionId;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AutomationActionId = AutomationActionId;
4
+ function AutomationActionId(id) {
5
+ return id;
6
+ }
7
+ //# sourceMappingURL=AutomationActionId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutomationActionId.js","sourceRoot":"","sources":["../../../src/automations/action/AutomationActionId.ts"],"names":[],"mappings":";;AAKA,gDAEC;AAFD,SAAgB,kBAAkB,CAAC,EAAU;IACzC,OAAO,EAAwB,CAAC;AACpC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type AutomationActionAuditId = Brand<string, 'AutomationActionAuditId'>;
3
+ export declare function AutomationActionAuditId(id: string): AutomationActionAuditId;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AutomationActionAuditId = AutomationActionAuditId;
4
+ function AutomationActionAuditId(id) {
5
+ return id;
6
+ }
7
+ //# sourceMappingURL=AutomationActionAuditId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutomationActionAuditId.js","sourceRoot":"","sources":["../../../../src/automations/action/audit/AutomationActionAuditId.ts"],"names":[],"mappings":";;AAKA,0DAEC;AAFD,SAAgB,uBAAuB,CAAC,EAAU;IAC9C,OAAO,EAA6B,CAAC;AACzC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type BusinessId = Brand<number, 'BusinessId'>;
3
+ export declare function BusinessId(id: number): BusinessId;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BusinessId = BusinessId;
4
+ function BusinessId(id) {
5
+ return id;
6
+ }
7
+ //# sourceMappingURL=BusinessId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BusinessId.js","sourceRoot":"","sources":["../../src/business/BusinessId.ts"],"names":[],"mappings":";;AAKA,gCAEC;AAFD,SAAgB,UAAU,CAAC,EAAU;IACjC,OAAO,EAAgB,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type ChannelSlug = Brand<string, 'ChannelSlug'>;
3
+ export declare function ChannelSlug(value: string): ChannelSlug;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChannelSlug = ChannelSlug;
4
+ function ChannelSlug(value) {
5
+ return value;
6
+ }
7
+ //# sourceMappingURL=ChannelSlug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChannelSlug.js","sourceRoot":"","sources":["../../src/channel/ChannelSlug.ts"],"names":[],"mappings":";;AAKA,kCAEC;AAFD,SAAgB,WAAW,CAAC,KAAa;IACrC,OAAO,KAAoB,CAAC;AAChC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type WorkspaceId = Brand<number, 'WorkspaceId'>;
3
+ export declare function WorkspaceId(id: number): WorkspaceId;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkspaceId = WorkspaceId;
4
+ function WorkspaceId(id) {
5
+ return id;
6
+ }
7
+ //# sourceMappingURL=WorkspaceId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkspaceId.js","sourceRoot":"","sources":["../../src/channel/WorkspaceId.ts"],"names":[],"mappings":";;AAKA,kCAEC;AAFD,SAAgB,WAAW,CAAC,EAAU;IAClC,OAAO,EAAiB,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare enum EntityType {
2
+ AUTOMATION = "AUTOMATION",
3
+ AUTOMATION_ACTION = "AUTOMATION_ACTION",
4
+ CARD = "CARD",
5
+ CARD_DEFINITION = "CARD_DEFINITION",
6
+ CHANNEL = "CHANNEL",
7
+ COMPONENT = "COMPONENT",
8
+ USER = "USER",
9
+ VIEW_TEMPLATE = "VIEW_TEMPLATE",
10
+ WORKFLOW_ENTITY = "WORKFLOW_ENTITY",
11
+ WORKFLOW_TEMPLATE = "WORKFLOW_TEMPLATE",
12
+ WORKFLOW_TEMPLATE_AUTOMATION_ASSOCIATION = "WORKFLOW_TEMPLATE_AUTOMATION_ASSOCIATION"
13
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityType = void 0;
4
+ var EntityType;
5
+ (function (EntityType) {
6
+ EntityType["AUTOMATION"] = "AUTOMATION";
7
+ EntityType["AUTOMATION_ACTION"] = "AUTOMATION_ACTION";
8
+ EntityType["CARD"] = "CARD";
9
+ EntityType["CARD_DEFINITION"] = "CARD_DEFINITION";
10
+ EntityType["CHANNEL"] = "CHANNEL";
11
+ EntityType["COMPONENT"] = "COMPONENT";
12
+ EntityType["USER"] = "USER";
13
+ EntityType["VIEW_TEMPLATE"] = "VIEW_TEMPLATE";
14
+ EntityType["WORKFLOW_ENTITY"] = "WORKFLOW_ENTITY";
15
+ EntityType["WORKFLOW_TEMPLATE"] = "WORKFLOW_TEMPLATE";
16
+ EntityType["WORKFLOW_TEMPLATE_AUTOMATION_ASSOCIATION"] = "WORKFLOW_TEMPLATE_AUTOMATION_ASSOCIATION";
17
+ })(EntityType || (exports.EntityType = EntityType = {}));
18
+ //# sourceMappingURL=EntityType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityType.js","sourceRoot":"","sources":["../../src/common/EntityType.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAYX;AAZD,WAAY,UAAU;IAClB,uCAAyB,CAAA;IACzB,qDAAuC,CAAA;IACvC,2BAAa,CAAA;IACb,iDAAmC,CAAA;IACnC,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,2BAAa,CAAA;IACb,6CAA+B,CAAA;IAC/B,iDAAmC,CAAA;IACnC,qDAAuC,CAAA;IACvC,mGAAqF,CAAA;AACzF,CAAC,EAZW,UAAU,0BAAV,UAAU,QAYrB"}
@@ -0,0 +1,2 @@
1
+ import { EntityType } from './EntityType';
2
+ export declare const EntityTypeLabels: Record<EntityType, string>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityTypeLabels = void 0;
4
+ const EntityType_1 = require("./EntityType");
5
+ exports.EntityTypeLabels = {
6
+ [EntityType_1.EntityType.AUTOMATION]: 'Automation',
7
+ [EntityType_1.EntityType.AUTOMATION_ACTION]: 'Automation Action',
8
+ [EntityType_1.EntityType.CARD]: 'Card',
9
+ [EntityType_1.EntityType.CARD_DEFINITION]: 'Card Definition',
10
+ [EntityType_1.EntityType.COMPONENT]: 'Component',
11
+ [EntityType_1.EntityType.CHANNEL]: 'Channel',
12
+ [EntityType_1.EntityType.VIEW_TEMPLATE]: 'View Template',
13
+ [EntityType_1.EntityType.WORKFLOW_ENTITY]: 'Workflow Entity',
14
+ [EntityType_1.EntityType.WORKFLOW_TEMPLATE]: 'Workflow Template',
15
+ [EntityType_1.EntityType.WORKFLOW_TEMPLATE_AUTOMATION_ASSOCIATION]: 'Workflow Template Automation Association',
16
+ [EntityType_1.EntityType.USER]: 'User',
17
+ };
18
+ //# sourceMappingURL=EntityTypeLabels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityTypeLabels.js","sourceRoot":"","sources":["../../src/common/EntityTypeLabels.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAE7B,QAAA,gBAAgB,GAA+B;IACxD,CAAC,uBAAU,CAAC,UAAU,CAAC,EAAE,YAAY;IACrC,CAAC,uBAAU,CAAC,iBAAiB,CAAC,EAAE,mBAAmB;IACnD,CAAC,uBAAU,CAAC,IAAI,CAAC,EAAE,MAAM;IACzB,CAAC,uBAAU,CAAC,eAAe,CAAC,EAAE,iBAAiB;IAC/C,CAAC,uBAAU,CAAC,SAAS,CAAC,EAAE,WAAW;IACnC,CAAC,uBAAU,CAAC,OAAO,CAAC,EAAE,SAAS;IAC/B,CAAC,uBAAU,CAAC,aAAa,CAAC,EAAE,eAAe;IAC3C,CAAC,uBAAU,CAAC,eAAe,CAAC,EAAE,iBAAiB;IAC/C,CAAC,uBAAU,CAAC,iBAAiB,CAAC,EAAE,mBAAmB;IACnD,CAAC,uBAAU,CAAC,wCAAwC,CAAC,EAAE,0CAA0C;IACjG,CAAC,uBAAU,CAAC,IAAI,CAAC,EAAE,MAAM;CACnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type HmacSecretKey = Brand<string, 'HmacSecretKey'>;
3
+ export declare function HmacSecretKey(value: string): HmacSecretKey;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HmacSecretKey = HmacSecretKey;
4
+ function HmacSecretKey(value) {
5
+ return value;
6
+ }
7
+ //# sourceMappingURL=HmacSecretKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HmacSecretKey.js","sourceRoot":"","sources":["../../src/common/HmacSecretKey.ts"],"names":[],"mappings":";;AAKA,sCAEC;AAFD,SAAgB,aAAa,CAAC,KAAa;IACvC,OAAO,KAAsB,CAAC;AAClC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type ISODateString = Brand<string, 'ISODateString'>;
3
+ export declare function ISODateString(value: string): ISODateString;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ISODateString = ISODateString;
4
+ function ISODateString(value) {
5
+ return value;
6
+ }
7
+ //# sourceMappingURL=ISODateString.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISODateString.js","sourceRoot":"","sources":["../../src/common/ISODateString.ts"],"names":[],"mappings":";;AAKA,sCAEC;AAFD,SAAgB,aAAa,CAAC,KAAa;IACvC,OAAO,KAAsB,CAAC;AAClC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type RRuleString = Brand<string, 'RRuleString'>;
3
+ export declare function RRuleString(value: string): RRuleString;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RRuleString = RRuleString;
4
+ function RRuleString(value) {
5
+ return value;
6
+ }
7
+ //# sourceMappingURL=RRuleString.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RRuleString.js","sourceRoot":"","sources":["../../src/common/RRuleString.ts"],"names":[],"mappings":";;AAKA,kCAEC;AAFD,SAAgB,WAAW,CAAC,KAAa;IACrC,OAAO,KAAoB,CAAC;AAChC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export declare enum GeneralErrorCode {
2
2
  ARRAY_MAX_SIZE_EXCEEDED = "ARRAY_MAX_SIZE_EXCEEDED",
3
+ ASSERTION_FAILED = "ASSERTION_FAILED",
3
4
  BATCH_LIMIT_EXCEEDED = "BATCH_LIMIT_EXCEEDED",
4
5
  FORBIDDEN = "FORBIDDEN",
5
6
  INTERNAL_ERROR = "INTERNAL_ERROR",
@@ -4,6 +4,7 @@ exports.GeneralErrorCode = void 0;
4
4
  var GeneralErrorCode;
5
5
  (function (GeneralErrorCode) {
6
6
  GeneralErrorCode["ARRAY_MAX_SIZE_EXCEEDED"] = "ARRAY_MAX_SIZE_EXCEEDED";
7
+ GeneralErrorCode["ASSERTION_FAILED"] = "ASSERTION_FAILED";
7
8
  GeneralErrorCode["BATCH_LIMIT_EXCEEDED"] = "BATCH_LIMIT_EXCEEDED";
8
9
  GeneralErrorCode["FORBIDDEN"] = "FORBIDDEN";
9
10
  GeneralErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
@@ -1 +1 @@
1
- {"version":3,"file":"GeneralErrorCode.js","sourceRoot":"","sources":["../../src/error/GeneralErrorCode.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAaX;AAbD,WAAY,gBAAgB;IACxB,uEAAmD,CAAA;IACnD,iEAA6C,CAAA;IAC7C,2CAAuB,CAAA;IACvB,qDAAiC,CAAA;IACjC,yEAAqD,CAAA;IACrD,6CAAyB,CAAA;IACzB,+CAA2B,CAAA;IAC3B,+CAA2B,CAAA;IAC3B,2CAAuB,CAAA;IACvB,2DAAuC,CAAA;IACvC,iDAA6B,CAAA;IAC7B,6CAAyB,CAAA;AAC7B,CAAC,EAbW,gBAAgB,gCAAhB,gBAAgB,QAa3B"}
1
+ {"version":3,"file":"GeneralErrorCode.js","sourceRoot":"","sources":["../../src/error/GeneralErrorCode.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAcX;AAdD,WAAY,gBAAgB;IACxB,uEAAmD,CAAA;IACnD,yDAAqC,CAAA;IACrC,iEAA6C,CAAA;IAC7C,2CAAuB,CAAA;IACvB,qDAAiC,CAAA;IACjC,yEAAqD,CAAA;IACrD,6CAAyB,CAAA;IACzB,+CAA2B,CAAA;IAC3B,+CAA2B,CAAA;IAC3B,2CAAuB,CAAA;IACvB,2DAAuC,CAAA;IACvC,iDAA6B,CAAA;IAC7B,6CAAyB,CAAA;AAC7B,CAAC,EAdW,gBAAgB,gCAAhB,gBAAgB,QAc3B"}
@@ -0,0 +1,4 @@
1
+ import { CoastException } from './CoastException';
2
+ export declare class AssertionFailedException extends CoastException {
3
+ constructor(message?: string);
4
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AssertionFailedException = void 0;
4
+ const GeneralErrorCode_1 = require("../error/GeneralErrorCode");
5
+ const HttpStatus_1 = require("../utils/HttpStatus");
6
+ const CoastException_1 = require("./CoastException");
7
+ class AssertionFailedException extends CoastException_1.CoastException {
8
+ constructor(message = 'Assertion failed') {
9
+ super({
10
+ message,
11
+ code: GeneralErrorCode_1.GeneralErrorCode.ASSERTION_FAILED,
12
+ status: HttpStatus_1.HttpStatus.INTERNAL_SERVER_ERROR,
13
+ });
14
+ }
15
+ }
16
+ exports.AssertionFailedException = AssertionFailedException;
17
+ //# sourceMappingURL=AssertionFailedException.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssertionFailedException.js","sourceRoot":"","sources":["../../src/exception/AssertionFailedException.ts"],"names":[],"mappings":";;;AAAA,gEAA6D;AAC7D,oDAAiD;AACjD,qDAAkD;AAElD,MAAa,wBAAyB,SAAQ,+BAAc;IACxD,YAAY,OAAO,GAAG,kBAAkB;QACpC,KAAK,CAAC;YACF,OAAO;YACP,IAAI,EAAE,mCAAgB,CAAC,gBAAgB;YACvC,MAAM,EAAE,uBAAU,CAAC,qBAAqB;SAC3C,CAAC,CAAC;IACP,CAAC;CACJ;AARD,4DAQC"}
@@ -0,0 +1,20 @@
1
+ import { LogLevel } from '@coast/service-common/logger/LogLevel';
2
+ import { LogMessage } from '@coast/service-common/logger/LogMessage';
3
+ import { Trace } from '@coast/service-common/trace/Trace';
4
+ import { MakeRequired } from '@coast/service-common/types/MakeRequired';
5
+ import { JsonObject } from '@paradoxical-io/types';
6
+ import { ApiError } from '../error/ApiError';
7
+ import { ErrorCode } from '../error/ErrorCode';
8
+ import { HttpStatus } from '../utils/HttpStatus';
9
+ export type CoastExceptionOptions = MakeRequired<Partial<ApiError>, 'code' | 'message'> & {
10
+ logLevel?: LogLevel;
11
+ };
12
+ export declare class CoastException extends Error implements ApiError {
13
+ readonly code: ErrorCode;
14
+ readonly status: HttpStatus;
15
+ readonly logLevel: LogLevel;
16
+ additionalData?: JsonObject;
17
+ constructor(input: CoastExceptionOptions | string);
18
+ toLogMessage(): Exclude<LogMessage, string>;
19
+ toApiError(trace?: Trace): ApiError;
20
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CoastException = void 0;
4
+ const LogLevel_1 = require("@coast/service-common/logger/LogLevel");
5
+ const GeneralErrorCode_1 = require("../error/GeneralErrorCode");
6
+ const HttpStatus_1 = require("../utils/HttpStatus");
7
+ class CoastException extends Error {
8
+ constructor(input) {
9
+ const options = typeof input === 'string' ? { message: input, code: GeneralErrorCode_1.GeneralErrorCode.INTERNAL_ERROR } : input;
10
+ const { message, code = GeneralErrorCode_1.GeneralErrorCode.INTERNAL_ERROR, status = HttpStatus_1.HttpStatus.INTERNAL_SERVER_ERROR, logLevel = LogLevel_1.LogLevel.ERROR, additionalData, } = options;
11
+ super(message);
12
+ this.code = code;
13
+ this.status = status;
14
+ this.logLevel = logLevel;
15
+ this.additionalData = additionalData;
16
+ }
17
+ toLogMessage() {
18
+ return {
19
+ code: this.code,
20
+ status: this.status,
21
+ msg: this.message,
22
+ name: this.name,
23
+ stack: this.stack,
24
+ };
25
+ }
26
+ toApiError(trace) {
27
+ return {
28
+ code: this.code,
29
+ status: this.status,
30
+ message: this.message,
31
+ additionalData: this.additionalData,
32
+ trace,
33
+ };
34
+ }
35
+ }
36
+ exports.CoastException = CoastException;
37
+ //# sourceMappingURL=CoastException.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoastException.js","sourceRoot":"","sources":["../../src/exception/CoastException.ts"],"names":[],"mappings":";;;AACA,oEAAiE;AAQjE,gEAA6D;AAC7D,oDAAiD;AAUjD,MAAa,cAAe,SAAQ,KAAK;IAMrC,YAAY,KAAqC;QAC7C,MAAM,OAAO,GACT,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,mCAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QAElG,MAAM,EACF,OAAO,EACP,IAAI,GAAG,mCAAgB,CAAC,cAAc,EACtC,MAAM,GAAG,uBAAU,CAAC,qBAAqB,EACzC,QAAQ,GAAG,mBAAQ,CAAC,KAAK,EACzB,cAAc,GACjB,GAAG,OAAO,CAAC;QAEZ,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACzC,CAAC;IAKD,YAAY;QACR,OAAO;YACH,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,EAAE,IAAI,CAAC,OAAO;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SACpB,CAAC;IACN,CAAC;IAMD,UAAU,CAAC,KAAa;QACpB,OAAO;YACH,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,KAAK;SACR,CAAC;IACN,CAAC;CACJ;AAnDD,wCAmDC"}
@@ -0,0 +1,4 @@
1
+ import { CoastException } from './CoastException';
2
+ export declare class ForbiddenException extends CoastException {
3
+ constructor(message: string);
4
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ForbiddenException = void 0;
4
+ const GeneralErrorCode_1 = require("../error/GeneralErrorCode");
5
+ const HttpStatus_1 = require("../utils/HttpStatus");
6
+ const CoastException_1 = require("./CoastException");
7
+ class ForbiddenException extends CoastException_1.CoastException {
8
+ constructor(message) {
9
+ super({
10
+ message,
11
+ code: GeneralErrorCode_1.GeneralErrorCode.FORBIDDEN,
12
+ status: HttpStatus_1.HttpStatus.FORBIDDEN,
13
+ });
14
+ }
15
+ }
16
+ exports.ForbiddenException = ForbiddenException;
17
+ //# sourceMappingURL=ForbiddenException.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForbiddenException.js","sourceRoot":"","sources":["../../src/exception/ForbiddenException.ts"],"names":[],"mappings":";;;AAAA,gEAA6D;AAC7D,oDAAiD;AACjD,qDAAkD;AAElD,MAAa,kBAAmB,SAAQ,+BAAc;IAClD,YAAY,OAAe;QACvB,KAAK,CAAC;YACF,OAAO;YACP,IAAI,EAAE,mCAAgB,CAAC,SAAS;YAChC,MAAM,EAAE,uBAAU,CAAC,SAAS;SAC/B,CAAC,CAAC;IACP,CAAC;CACJ;AARD,gDAQC"}
@@ -0,0 +1,13 @@
1
+ import { JsonObject } from '@paradoxical-io/types';
2
+ import { ComponentType } from '../workflow-template/components/ComponentType';
3
+ import { CoastException } from './CoastException';
4
+ type Options = {
5
+ message?: string;
6
+ expectedType: ComponentType;
7
+ actualType: ComponentType;
8
+ additionalData?: JsonObject;
9
+ };
10
+ export declare class InvalidComponentTypeException extends CoastException {
11
+ constructor(options: Options);
12
+ }
13
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvalidComponentTypeException = void 0;
4
+ const HttpStatus_1 = require("../utils/HttpStatus");
5
+ const ComponentErrorCode_1 = require("../workflow-template/components/error/ComponentErrorCode");
6
+ const CoastException_1 = require("./CoastException");
7
+ class InvalidComponentTypeException extends CoastException_1.CoastException {
8
+ constructor(options) {
9
+ const { message = `Invalid component type: expected ${options.expectedType} but received ${options.actualType}.`, expectedType, actualType, additionalData, } = options;
10
+ super({
11
+ code: ComponentErrorCode_1.ComponentErrorCode.INVALID_COMPONENT_TYPE,
12
+ status: HttpStatus_1.HttpStatus.BAD_REQUEST,
13
+ message,
14
+ additionalData: {
15
+ expectedType,
16
+ actualType,
17
+ ...additionalData,
18
+ },
19
+ });
20
+ }
21
+ }
22
+ exports.InvalidComponentTypeException = InvalidComponentTypeException;
23
+ //# sourceMappingURL=InvalidComponentTypeException.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidComponentTypeException.js","sourceRoot":"","sources":["../../src/exception/InvalidComponentTypeException.ts"],"names":[],"mappings":";;;AAEA,oDAAiD;AAEjD,iGAA8F;AAC9F,qDAAkD;AASlD,MAAa,6BAA8B,SAAQ,+BAAc;IAC7D,YAAY,OAAgB;QACxB,MAAM,EACF,OAAO,GAAG,oCAAoC,OAAO,CAAC,YAAY,iBAAiB,OAAO,CAAC,UAAU,GAAG,EACxG,YAAY,EACZ,UAAU,EACV,cAAc,GACjB,GAAG,OAAO,CAAC;QAEZ,KAAK,CAAC;YACF,IAAI,EAAE,uCAAkB,CAAC,sBAAsB;YAC/C,MAAM,EAAE,uBAAU,CAAC,WAAW;YAC9B,OAAO;YACP,cAAc,EAAE;gBACZ,YAAY;gBACZ,UAAU;gBACV,GAAG,cAAc;aACpB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AApBD,sEAoBC"}
@@ -0,0 +1,15 @@
1
+ import { JsonObject } from '@paradoxical-io/types';
2
+ import { EntityType } from '../common/EntityType';
3
+ import { HttpStatus } from '../utils/HttpStatus';
4
+ import { CoastException } from './CoastException';
5
+ type Options = {
6
+ message?: string;
7
+ entityType: EntityType;
8
+ id?: string;
9
+ additionalData?: JsonObject;
10
+ status?: HttpStatus;
11
+ };
12
+ export declare class InvalidEntityReferenceException extends CoastException {
13
+ constructor({ entityType, id, message, additionalData, status }: Options);
14
+ }
15
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvalidEntityReferenceException = void 0;
4
+ const LogLevel_1 = require("@coast/service-common/logger/LogLevel");
5
+ const EntityTypeLabels_1 = require("../common/EntityTypeLabels");
6
+ const GeneralErrorCode_1 = require("../error/GeneralErrorCode");
7
+ const HttpStatus_1 = require("../utils/HttpStatus");
8
+ const CoastException_1 = require("./CoastException");
9
+ class InvalidEntityReferenceException extends CoastException_1.CoastException {
10
+ constructor({ entityType, id, message, additionalData, status = HttpStatus_1.HttpStatus.BAD_REQUEST }) {
11
+ const label = EntityTypeLabels_1.EntityTypeLabels[entityType];
12
+ const errorMessage = message ?? `Invalid entity reference: ${label} not found`;
13
+ super({
14
+ code: GeneralErrorCode_1.GeneralErrorCode.INVALID_ENTITY_REFERENCE,
15
+ status,
16
+ logLevel: LogLevel_1.LogLevel.WARN,
17
+ message: errorMessage,
18
+ additionalData: { ...additionalData, entityType, id },
19
+ });
20
+ }
21
+ }
22
+ exports.InvalidEntityReferenceException = InvalidEntityReferenceException;
23
+ //# sourceMappingURL=InvalidEntityReferenceException.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidEntityReferenceException.js","sourceRoot":"","sources":["../../src/exception/InvalidEntityReferenceException.ts"],"names":[],"mappings":";;;AAAA,oEAAiE;AAIjE,iEAA8D;AAC9D,gEAA6D;AAC7D,oDAAiD;AACjD,qDAAkD;AAUlD,MAAa,+BAAgC,SAAQ,+BAAc;IAC/D,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,uBAAU,CAAC,WAAW,EAAW;QAC7F,MAAM,KAAK,GAAG,mCAAgB,CAAC,UAAU,CAAC,CAAC;QAC3C,MAAM,YAAY,GAAG,OAAO,IAAI,6BAA6B,KAAK,YAAY,CAAC;QAE/E,KAAK,CAAC;YACF,IAAI,EAAE,mCAAgB,CAAC,wBAAwB;YAC/C,MAAM;YACN,QAAQ,EAAE,mBAAQ,CAAC,IAAI;YACvB,OAAO,EAAE,YAAY;YACrB,cAAc,EAAE,EAAE,GAAG,cAAc,EAAE,UAAU,EAAE,EAAE,EAAE;SACxD,CAAC,CAAC;IACP,CAAC;CACJ;AAbD,0EAaC"}
@@ -0,0 +1,21 @@
1
+ import { LogLevel } from '@coast/service-common/logger/LogLevel';
2
+ import { LogMessage } from '@coast/service-common/logger/LogMessage';
3
+ import { JsonObject } from '@paradoxical-io/types';
4
+ import { ApiError } from '../error/ApiError';
5
+ import { ErrorCode } from '../error/ErrorCode';
6
+ import { HttpStatus } from '../utils/HttpStatus';
7
+ import { CoastException } from './CoastException';
8
+ export type MultiExceptionOptions<T extends CoastException = CoastException> = {
9
+ status?: HttpStatus;
10
+ exceptions: T[];
11
+ code?: ErrorCode;
12
+ message?: string;
13
+ additionalData?: JsonObject;
14
+ logLevel?: LogLevel;
15
+ };
16
+ export declare class MultiException<T extends CoastException = CoastException> extends CoastException {
17
+ readonly exceptions: T[];
18
+ constructor(options: MultiExceptionOptions<T>);
19
+ toApiError(): ApiError;
20
+ toLogMessage(): Exclude<LogMessage, string>;
21
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MultiException = void 0;
4
+ const DeepLogObject_1 = require("@coast/service-common/logger/DeepLogObject");
5
+ const LogLevel_1 = require("@coast/service-common/logger/LogLevel");
6
+ const GeneralErrorCode_1 = require("../error/GeneralErrorCode");
7
+ const HttpStatus_1 = require("../utils/HttpStatus");
8
+ const CoastException_1 = require("./CoastException");
9
+ class MultiException extends CoastException_1.CoastException {
10
+ constructor(options) {
11
+ super({
12
+ code: GeneralErrorCode_1.GeneralErrorCode.MULTI_ERROR,
13
+ message: 'MultiException',
14
+ status: HttpStatus_1.HttpStatus.BAD_REQUEST,
15
+ logLevel: LogLevel_1.LogLevel.INFO,
16
+ ...options,
17
+ });
18
+ this.exceptions = options.exceptions;
19
+ }
20
+ toApiError() {
21
+ return {
22
+ ...super.toApiError(),
23
+ errors: this.exceptions.map((e) => e.toApiError()),
24
+ };
25
+ }
26
+ toLogMessage() {
27
+ return {
28
+ ...super.toLogMessage(),
29
+ exceptions: (0, DeepLogObject_1.DeepLogObject)(this.exceptions.map((e) => e.toLogMessage())),
30
+ };
31
+ }
32
+ }
33
+ exports.MultiException = MultiException;
34
+ //# sourceMappingURL=MultiException.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiException.js","sourceRoot":"","sources":["../../src/exception/MultiException.ts"],"names":[],"mappings":";;;AACA,8EAA2E;AAC3E,oEAAiE;AAMjE,gEAA6D;AAC7D,oDAAiD;AACjD,qDAAkD;AAWlD,MAAa,cAA0D,SAAQ,+BAAc;IAGzF,YAAY,OAAiC;QACzC,KAAK,CAAC;YACF,IAAI,EAAE,mCAAgB,CAAC,WAAW;YAClC,OAAO,EAAE,gBAAgB;YACzB,MAAM,EAAE,uBAAU,CAAC,WAAW;YAC9B,QAAQ,EAAE,mBAAQ,CAAC,IAAI;YACvB,GAAG,OAAO;SACb,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACzC,CAAC;IAED,UAAU;QACN,OAAO;YACH,GAAG,KAAK,CAAC,UAAU,EAAE;YACrB,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;SACrD,CAAC;IACN,CAAC;IAED,YAAY;QACR,OAAO;YACH,GAAG,KAAK,CAAC,YAAY,EAAE;YACvB,UAAU,EAAE,IAAA,6BAAa,EAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;SAC1E,CAAC;IACN,CAAC;CACJ;AA5BD,wCA4BC"}
@@ -0,0 +1,4 @@
1
+ import { CoastException } from './CoastException';
2
+ export declare class NotDefinedException extends CoastException {
3
+ constructor(message?: string);
4
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotDefinedException = void 0;
4
+ const GeneralErrorCode_1 = require("../error/GeneralErrorCode");
5
+ const HttpStatus_1 = require("../utils/HttpStatus");
6
+ const CoastException_1 = require("./CoastException");
7
+ class NotDefinedException extends CoastException_1.CoastException {
8
+ constructor(message = 'Value is not defined') {
9
+ super({
10
+ message,
11
+ code: GeneralErrorCode_1.GeneralErrorCode.NOT_DEFINED,
12
+ status: HttpStatus_1.HttpStatus.BAD_REQUEST,
13
+ });
14
+ }
15
+ }
16
+ exports.NotDefinedException = NotDefinedException;
17
+ //# sourceMappingURL=NotDefinedException.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotDefinedException.js","sourceRoot":"","sources":["../../src/exception/NotDefinedException.ts"],"names":[],"mappings":";;;AAAA,gEAA6D;AAC7D,oDAAiD;AACjD,qDAAkD;AAElD,MAAa,mBAAoB,SAAQ,+BAAc;IACnD,YAAY,OAAO,GAAG,sBAAsB;QACxC,KAAK,CAAC;YACF,OAAO;YACP,IAAI,EAAE,mCAAgB,CAAC,WAAW;YAClC,MAAM,EAAE,uBAAU,CAAC,WAAW;SACjC,CAAC,CAAC;IACP,CAAC;CACJ;AARD,kDAQC"}
@@ -0,0 +1,11 @@
1
+ import { LogLevel } from '@coast/service-common/logger/LogLevel';
2
+ import { CoastException, CoastExceptionOptions } from '../exception/CoastException';
3
+ type EntityNotFoundExceptionOptions = {
4
+ message?: string;
5
+ additionalData?: CoastExceptionOptions['additionalData'];
6
+ logLevel?: LogLevel;
7
+ };
8
+ export declare class NotFoundException extends CoastException {
9
+ constructor(input: EntityNotFoundExceptionOptions | string);
10
+ }
11
+ export {};