@degenerate/generic 0.1.9 → 0.1.11

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 (95) hide show
  1. package/dist/application/audit-log/create-application-audit-log.d.ts.map +1 -1
  2. package/dist/application/audit-log/create-application-audit-log.js +1 -1
  3. package/dist/application/database/firestore/generics/add-items-to-database.d.ts.map +1 -1
  4. package/dist/application/database/firestore/generics/add-items-to-database.js +2 -2
  5. package/dist/application/database/firestore/generics/add-or-update-items-to-database.d.ts.map +1 -1
  6. package/dist/application/database/firestore/generics/add-or-update-items-to-database.js +3 -3
  7. package/dist/application/database/firestore/generics/delete-items-on-database.d.ts.map +1 -1
  8. package/dist/application/database/firestore/generics/delete-items-on-database.js +2 -2
  9. package/dist/application/database/firestore/generics/get-item-from-database.d.ts.map +1 -1
  10. package/dist/application/database/firestore/generics/get-item-from-database.js +2 -2
  11. package/dist/application/database/firestore/generics/get-items-different-path-on-database.d.ts.map +1 -1
  12. package/dist/application/database/firestore/generics/get-items-different-path-on-database.js +2 -2
  13. package/dist/application/database/firestore/generics/get-items-from-database.d.ts.map +1 -1
  14. package/dist/application/database/firestore/generics/get-items-from-database.js +2 -2
  15. package/dist/application/database/firestore/generics/update-items-on-database.d.ts.map +1 -1
  16. package/dist/application/database/firestore/generics/update-items-on-database.js +2 -2
  17. package/dist/application/database/firestore/generics/update-items-properties-on-database.d.ts.map +1 -1
  18. package/dist/application/database/firestore/generics/update-items-properties-on-database.js +2 -2
  19. package/dist/authorization/jwt/sign/create-authorization-issuer.d.ts +2 -2
  20. package/dist/authorization/jwt/sign/create-authorization-issuer.d.ts.map +1 -1
  21. package/dist/authorization/jwt/sign/create-authorization-subject.d.ts +2 -2
  22. package/dist/authorization/jwt/sign/create-authorization-subject.d.ts.map +1 -1
  23. package/dist/authorization/jwt/sign/create-jwt-options.d.ts +2 -2
  24. package/dist/authorization/jwt/sign/create-jwt-options.d.ts.map +1 -1
  25. package/dist/authorization/safe/authorization/authorized-authorities.d.ts +5 -5
  26. package/dist/authorization/safe/authorization/authorized-authorities.d.ts.map +1 -1
  27. package/dist/authorization/safe/request/determine-issuer-from-request.d.ts +2 -2
  28. package/dist/authorization/safe/request/determine-issuer-from-request.d.ts.map +1 -1
  29. package/dist/authorization/safe/request/issuer/determine-issuer-from-bearer-token.d.ts +2 -2
  30. package/dist/authorization/safe/request/issuer/determine-issuer-from-bearer-token.d.ts.map +1 -1
  31. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-issuer.d.ts +2 -2
  32. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-issuer.d.ts.map +1 -1
  33. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-subject.d.ts +2 -2
  34. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-subject.d.ts.map +1 -1
  35. package/dist/helpers/request/params-object-helpers.d.ts +7 -1
  36. package/dist/helpers/request/params-object-helpers.d.ts.map +1 -1
  37. package/dist/helpers/request/params-object-helpers.js +10 -1
  38. package/dist/helpers/request/request-object-helpers.d.ts +16 -1
  39. package/dist/helpers/request/request-object-helpers.d.ts.map +1 -1
  40. package/dist/helpers/request/request-object-helpers.js +25 -2
  41. package/dist/models/application/audit-log/application-audit-log-models.d.ts +144 -60
  42. package/dist/models/application/audit-log/application-audit-log-models.d.ts.map +1 -1
  43. package/dist/models/application/audit-log/application-audit-log-models.js +87 -41
  44. package/dist/models/application/database/firestore-models.d.ts +370 -54
  45. package/dist/models/application/database/firestore-models.d.ts.map +1 -1
  46. package/dist/models/application/database/firestore-models.js +119 -1
  47. package/dist/models/authorization/authorization-models.d.ts +76 -33
  48. package/dist/models/authorization/authorization-models.d.ts.map +1 -1
  49. package/dist/models/authorization/authorization-models.js +82 -12
  50. package/dist/models/crypto/crypto-models.d.ts +10 -2
  51. package/dist/models/crypto/crypto-models.d.ts.map +1 -1
  52. package/dist/models/crypto/crypto-models.js +6 -0
  53. package/dist/models/data/data-models.d.ts +18 -5
  54. package/dist/models/data/data-models.d.ts.map +1 -1
  55. package/dist/models/data/data-models.js +24 -1
  56. package/dist/models/dynamic-execution/dynamic-execution-models.d.ts +13 -3
  57. package/dist/models/dynamic-execution/dynamic-execution-models.d.ts.map +1 -1
  58. package/dist/models/dynamic-execution/dynamic-execution-models.js +10 -0
  59. package/dist/models/events/share-event-models.d.ts +145 -24
  60. package/dist/models/events/share-event-models.d.ts.map +1 -1
  61. package/dist/models/events/share-event-models.js +53 -2
  62. package/dist/models/functions/share-data-function-models.d.ts +251 -32
  63. package/dist/models/functions/share-data-function-models.d.ts.map +1 -1
  64. package/dist/models/functions/share-data-function-models.js +100 -3
  65. package/dist/models/generic/request-response-models.d.ts +11 -3
  66. package/dist/models/generic/request-response-models.d.ts.map +1 -1
  67. package/dist/models/generic/request-response-models.js +9 -0
  68. package/dist/models/index.d.ts +2 -1
  69. package/dist/models/index.d.ts.map +1 -1
  70. package/dist/models/index.js +6 -1
  71. package/dist/models/safe/rules/share-rule-models.d.ts +931 -0
  72. package/dist/models/safe/rules/share-rule-models.d.ts.map +1 -0
  73. package/dist/models/safe/rules/share-rule-models.js +341 -0
  74. package/dist/models/safe/safe-transaction-models.d.ts +137 -20
  75. package/dist/models/safe/safe-transaction-models.d.ts.map +1 -1
  76. package/dist/models/safe/safe-transaction-models.js +88 -3
  77. package/dist/models/safe/transactions/authorities-transactions-models.d.ts +391 -0
  78. package/dist/models/safe/transactions/authorities-transactions-models.d.ts.map +1 -0
  79. package/dist/models/safe/transactions/authorities-transactions-models.js +56 -0
  80. package/dist/models/share-data/share-data.d.ts +144 -23
  81. package/dist/models/share-data/share-data.d.ts.map +1 -1
  82. package/dist/models/share-data/share-data.js +66 -1
  83. package/dist/transactions/authority/create-safe-transaction-authority-data.d.ts +14 -0
  84. package/dist/transactions/authority/create-safe-transaction-authority-data.d.ts.map +1 -0
  85. package/dist/transactions/authority/create-safe-transaction-authority-data.js +21 -0
  86. package/dist/transactions/authority/create-safe-transaction-authority.d.ts +15 -0
  87. package/dist/transactions/authority/create-safe-transaction-authority.d.ts.map +1 -0
  88. package/dist/transactions/authority/create-safe-transaction-authority.js +29 -0
  89. package/dist/transactions/index.d.ts +3 -0
  90. package/dist/transactions/index.d.ts.map +1 -0
  91. package/dist/transactions/index.js +20 -0
  92. package/package.json +2 -2
  93. package/dist/models/rules/share-rule-models.d.ts +0 -303
  94. package/dist/models/rules/share-rule-models.d.ts.map +0 -1
  95. package/dist/models/rules/share-rule-models.js +0 -93
@@ -1 +1 @@
1
- {"version":3,"file":"create-application-audit-log.d.ts","sourceRoot":"","sources":["../../../src/application/audit-log/create-application-audit-log.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EACvB,iCAAiC,EACjC,oBAAoB,EACvB,MAAM,iEAAiE,CAAC;AAEzE;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,yBAAyB,8BACA,yBAAyB,8BACxB,0BAA0B,aAC3C,MAAM,4BACQ,uBAAuB,SAC1C,iCAAiC,EAAE,gBAC3B,GAAG,iBACF,GAAG,KACnB,oBAaF,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"create-application-audit-log.d.ts","sourceRoot":"","sources":["../../../src/application/audit-log/create-application-audit-log.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EAEvB,iCAAiC,EACjC,oBAAoB,EACvB,MAAM,iEAAiE,CAAC;AAEzE;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,yBAAyB,8BACA,yBAAyB,8BACxB,0BAA0B,aAC3C,MAAM,4BACQ,uBAAuB,SAC1C,iCAAiC,EAAE,gBAC3B,GAAG,iBACF,GAAG,KACnB,oBAaF,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -15,7 +15,7 @@ const application_audit_log_models_1 = require("../../models/application/audit-l
15
15
  * @param championsNetworkId the champions network Id.
16
16
  * @param organizationId the organization Id.
17
17
  */
18
- const createApplicationAuditLog = (applicationAuditLogAction, applicationAuditLogSubType, createdBy, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogType.global, alai = [], currentData, previousData) => {
18
+ const createApplicationAuditLog = (applicationAuditLogAction, applicationAuditLogSubType, createdBy, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogTypeSchema.Enum.global, alai = [], currentData, previousData) => {
19
19
  const auditLog = {
20
20
  additionalAuditLogIds: alai,
21
21
  applicationAuditLogAction,
@@ -1 +1 @@
1
- {"version":3,"file":"add-items-to-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/add-items-to-database.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAEtG,OAAO,EAA6B,uBAAuB,EAAE,MAAM,uEAAuE,CAAC;AAE3I;;;;;;;GAOG;AACH,QAAA,MAAM,kBAAkB,8BACO,0BAA0B,EAAE,UAC/C,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,IAAI,CAed,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"add-items-to-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/add-items-to-database.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAEtG,OAAO,EAAmC,uBAAuB,EAAiC,MAAM,uEAAuE,CAAC;AAEhL;;;;;;;GAOG;AACH,QAAA,MAAM,kBAAkB,8BACO,0BAA0B,EAAE,UAC/C,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,IAAI,CAed,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -37,13 +37,13 @@ const db = admin.firestore();
37
37
  * @param applicationAuditLogType the type of audit log to create
38
38
  * @returns
39
39
  */
40
- const addItemsToDatabase = async (databaseChangeInformation, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogType.global) => {
40
+ const addItemsToDatabase = async (databaseChangeInformation, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogTypeSchema.Enum.global) => {
41
41
  const auditLogColRef = (0, create_audit_log_col_ref_1.createAuditLogColRef)(); // create the audit log collection reference
42
42
  // create the new records in the database
43
43
  await db.runTransaction(async (t) => {
44
44
  for (const changeRecords of databaseChangeInformation) {
45
45
  // create the audit log
46
- const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogAction.create, changeRecords.auditLogSubType, userId, applicationAuditLogType, changeRecords.alai, changeRecords.item, undefined);
46
+ const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogActionSchema.Enum.create, changeRecords.auditLogSubType, userId, applicationAuditLogType, changeRecords.alai, changeRecords.item, undefined);
47
47
  t.create(changeRecords.itemDocRef, JSON.parse(JSON.stringify(changeRecords.item))); // add the item to the database.
48
48
  t.create(auditLogColRef.doc(), auditLog); // add the audit log to the database.
49
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-or-update-items-to-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/add-or-update-items-to-database.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,uBAAuB,EAAwB,MAAM,uEAAuE,CAAC;AAGjK,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAGtG;;;;;;;GAOG;AACH,QAAA,MAAM,0BAA0B,GAAU,CAAC,yBAChB,0BAA0B,EAAE,UAC3C,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,IAAI,CAoCd,CAAC;AAEF,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
1
+ {"version":3,"file":"add-or-update-items-to-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/add-or-update-items-to-database.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,uBAAuB,EAG1B,MAAM,uEAAuE,CAAC;AAG/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAGtG;;;;;;;GAOG;AACH,QAAA,MAAM,0BAA0B,GAAU,CAAC,yBAChB,0BAA0B,EAAE,UAC3C,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,IAAI,CAoCd,CAAC;AAEF,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
@@ -37,7 +37,7 @@ const db = admin.firestore();
37
37
  * @param applicationAuditLogType the type of audit log to create
38
38
  * @returns
39
39
  */
40
- const addOrUpdateItemsToDatabase = async (databaseChangeRecords, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogType.global) => {
40
+ const addOrUpdateItemsToDatabase = async (databaseChangeRecords, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogTypeSchema.Enum.global) => {
41
41
  // loop the transaction and update the database
42
42
  await db.runTransaction(async (t) => {
43
43
  const auditLogUpdates = []; // create an array of audit log updates
@@ -52,13 +52,13 @@ const addOrUpdateItemsToDatabase = async (databaseChangeRecords, userId, applica
52
52
  // create the audit log for the update stringify and parse to ensure the deep properties are copied.
53
53
  const updatedData = { ...JSON.parse(JSON.stringify(existingRecord)), ...newRecord };
54
54
  // create the audit log
55
- const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogAction.update, changeRecord.auditLogSubType, userId, applicationAuditLogType, changeRecord.alai, updatedData, existingRecord);
55
+ const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogActionSchema.Enum.update, changeRecord.auditLogSubType, userId, applicationAuditLogType, changeRecord.alai, updatedData, existingRecord);
56
56
  auditLogUpdates.push(auditLog);
57
57
  updatedRecord.push(updatedData);
58
58
  }
59
59
  else {
60
60
  // create the audit log
61
- const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogAction.create, changeRecord.auditLogSubType, userId, applicationAuditLogType, changeRecord.alai, newRecord, undefined);
61
+ const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogActionSchema.Enum.create, changeRecord.auditLogSubType, userId, applicationAuditLogType, changeRecord.alai, newRecord, undefined);
62
62
  auditLogUpdates.push(auditLog);
63
63
  updatedRecord.push(newRecord);
64
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"delete-items-on-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/delete-items-on-database.ts"],"names":[],"mappings":"AAEA,OAAO,EAA6B,uBAAuB,EAAE,MAAM,uEAAuE,CAAC;AAC3I,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAM/F;;;;;;;GAOG;AACH,QAAA,MAAM,qBAAqB,wBACF,mBAAmB,EAAE,UAClC,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,IAAI,CA2Bd,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"delete-items-on-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/delete-items-on-database.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,uBAAuB,EAE1B,MAAM,uEAAuE,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAM/F;;;;;;;GAOG;AACH,QAAA,MAAM,qBAAqB,wBACF,mBAAmB,EAAE,UAClC,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,IAAI,CA2Bd,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -38,7 +38,7 @@ const db = admin.firestore();
38
38
  * @param applicationAuditLogType the type of audit log to create
39
39
  * @returns
40
40
  */
41
- const deleteItemsOnDatabase = async (databaseDeleteItems, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogType.global) => {
41
+ const deleteItemsOnDatabase = async (databaseDeleteItems, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogTypeSchema.Enum.global) => {
42
42
  const auditLogColRef = (0, create_audit_log_col_ref_1.createAuditLogColRef)(); // create the audit log collection reference
43
43
  // create the new records in the database
44
44
  await db.runTransaction(async (t) => {
@@ -56,7 +56,7 @@ const deleteItemsOnDatabase = async (databaseDeleteItems, userId, applicationAud
56
56
  const existingRecord = existingRecords[i]; // the existing record
57
57
  const deleteRecord = databaseDeleteItems[i]; // the delete record
58
58
  // create the audit log
59
- const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogAction.delete, deleteRecord.auditLogSubType, userId, applicationAuditLogType, deleteRecord.alai, undefined, existingRecord);
59
+ const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogActionSchema.Enum.delete, deleteRecord.auditLogSubType, userId, applicationAuditLogType, deleteRecord.alai, undefined, existingRecord);
60
60
  t.delete(deleteRecord.itemDocRef); // delete the item from the database.
61
61
  t.create(auditLogColRef.doc(), auditLog); // add the audit log to the database.
62
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-item-from-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/get-item-from-database.ts"],"names":[],"mappings":"AAGA,OAAO,EAA6B,uBAAuB,EAAE,MAAM,uEAAuE,CAAC;AAC3I,OAAO,EAAE,gBAAgB,EAAE,MAAM,0DAA0D,CAAC;AAG5F;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,GAAU,CAAC,WACvB,gBAAgB,UACjB,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,CAAC,GAAG,SAAS,CAgBvB,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"get-item-from-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/get-item-from-database.ts"],"names":[],"mappings":"AAGA,OAAO,EAEH,uBAAuB,EAE1B,MAAM,uEAAuE,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0DAA0D,CAAC;AAG5F;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,GAAU,CAAC,WACvB,gBAAgB,UACjB,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,CAAC,GAAG,SAAS,CAgBvB,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -38,10 +38,10 @@ const db = admin.firestore();
38
38
  * @param applicationAuditLogType the type of audit log to create
39
39
  * @returns
40
40
  */
41
- const getItemFromDatabase = async (getItem, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogType.global) => {
41
+ const getItemFromDatabase = async (getItem, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogTypeSchema.Enum.global) => {
42
42
  const auditLogRef = (0, create_audit_log_col_ref_1.createAuditLogColRef)(); // create the audit log reference
43
43
  // create the audit log information
44
- const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogAction.read, getItem.auditLogSubType, userId, applicationAuditLogType, getItem.alai, undefined, undefined);
44
+ const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogActionSchema.Enum.read, getItem.auditLogSubType, userId, applicationAuditLogType, getItem.alai, undefined, undefined);
45
45
  const itemData = await db.runTransaction(async (t) => {
46
46
  const connectedSnap = await t.get(getItem.itemDocRef); // get the connected snap
47
47
  t.create(auditLogRef.doc(), auditLog); // add the audit log to the database.
@@ -1 +1 @@
1
- {"version":3,"file":"get-items-different-path-on-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/get-items-different-path-on-database.ts"],"names":[],"mappings":"AAEA,OAAO,EAA6B,uBAAuB,EAA+B,MAAM,uEAAuE,CAAC;AAIxK;;;;;;;GAOG;AACH,QAAA,MAAM,gCAAgC,GAAU,CAAC,iBAC9B,MAAM,EAAE,UACf,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,CAAC,EAAE,CAwBb,CAAC;AAEF,OAAO,EAAE,gCAAgC,EAAE,CAAC"}
1
+ {"version":3,"file":"get-items-different-path-on-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/get-items-different-path-on-database.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,uBAAuB,EAG1B,MAAM,uEAAuE,CAAC;AAI/E;;;;;;;GAOG;AACH,QAAA,MAAM,gCAAgC,GAAU,CAAC,iBAC9B,MAAM,EAAE,UACf,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,CAAC,EAAE,CA2Bb,CAAC;AAEF,OAAO,EAAE,gCAAgC,EAAE,CAAC"}
@@ -38,7 +38,7 @@ const db = admin.firestore();
38
38
  * @param applicationAuditLogType the type of audit log to create
39
39
  * @returns
40
40
  */
41
- const getItemsDifferentPathsOnDatabase = async (documentPaths, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogType.global) => {
41
+ const getItemsDifferentPathsOnDatabase = async (documentPaths, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogTypeSchema.Enum.global) => {
42
42
  const auditLogColRef = (0, create_audit_log_col_ref_1.createAuditLogColRef)(); // create the audit log collection reference
43
43
  // create the promisees for the documents.
44
44
  const documentPromises = [];
@@ -48,7 +48,7 @@ const getItemsDifferentPathsOnDatabase = async (documentPaths, userId, applicati
48
48
  // create the audit log additional ids information
49
49
  const alai = (0, create_multiple_path_alai_1.createMultiplePathALAI)(documentPaths);
50
50
  // create the audit log information
51
- const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogAction.list, application_audit_log_models_1.MultiplePathAuditLogSubType.multiplePathALAI, userId, applicationAuditLogType, alai, undefined, undefined);
51
+ const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogActionSchema.Enum.list, application_audit_log_models_1.MultiplePathAuditLogSubTypeSchema.Enum.multiplePathALAI, userId, applicationAuditLogType, alai, undefined, undefined);
52
52
  // add in the audit log
53
53
  await auditLogColRef.add(auditLog);
54
54
  const allDocuments = await Promise.all(documentPromises);
@@ -1 +1 @@
1
- {"version":3,"file":"get-items-from-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/get-items-from-database.ts"],"names":[],"mappings":"AAEA,OAAO,EAA6B,uBAAuB,EAAE,MAAM,uEAAuE,CAAC;AAC3I,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AAKnG;;;;;;;;GAQG;AACH,QAAA,MAAM,oBAAoB,GAAU,CAAC,UACzB,MAAM,kBACE,uBAAuB,4BACd,uBAAuB,KACjD,OAAO,CAAC,CAAC,EAAE,CAuCb,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"get-items-from-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/get-items-from-database.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmC,uBAAuB,EAAiC,MAAM,uEAAuE,CAAC;AAChL,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AAKnG;;;;;;;;GAQG;AACH,QAAA,MAAM,oBAAoB,GAAU,CAAC,UACzB,MAAM,kBACE,uBAAuB,4BACd,uBAAuB,KACjD,OAAO,CAAC,CAAC,EAAE,CAuCb,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -39,7 +39,7 @@ const db = firebase.firestore();
39
39
  * @param <T> the type of the items to return
40
40
  * @returns
41
41
  */
42
- const getItemsFromDatabase = async (userId, getInformation, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogType.global) => {
42
+ const getItemsFromDatabase = async (userId, getInformation, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogTypeSchema.enum.global) => {
43
43
  const maxResults = application_settings_1.ApplicationSettings.SystemValues.MaxSnapshotSize; // the maximum number of results to return.
44
44
  const auditLogColRef = (0, create_audit_log_col_ref_1.createAuditLogColRef)(); // create the audit log collection reference
45
45
  // get the items from the database.
@@ -68,7 +68,7 @@ const getItemsFromDatabase = async (userId, getInformation, applicationAuditLogT
68
68
  databaseItems.push(item);
69
69
  }
70
70
  // create the audit log information
71
- const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogAction.list, getInformation.auditLogSubType, userId, applicationAuditLogType, getInformation.alai, undefined, undefined);
71
+ const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogActionSchema.Enum.list, getInformation.auditLogSubType, userId, applicationAuditLogType, getInformation.alai, undefined, undefined);
72
72
  t.create(auditLogColRef.doc(), auditLog); // add the audit log to the database.
73
73
  return databaseItems;
74
74
  });
@@ -1 +1 @@
1
- {"version":3,"file":"update-items-on-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/update-items-on-database.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,uBAAuB,EAAE,MAAM,uEAAuE,CAAC;AAC3I,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAMtG;;;;;;;GAOG;AACH,QAAA,MAAM,qBAAqB,GAAU,CAAC,6BACP,0BAA0B,EAAE,UAC/C,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,IAAI,CA0Bd,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"update-items-on-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/update-items-on-database.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,uBAAuB,EAE1B,MAAM,uEAAuE,CAAC;AAC/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAMtG;;;;;;;GAOG;AACH,QAAA,MAAM,qBAAqB,GAAU,CAAC,6BACP,0BAA0B,EAAE,UAC/C,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,IAAI,CA0Bd,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -38,7 +38,7 @@ const db = admin.firestore();
38
38
  * @param applicationAuditLogType the type of audit log to create
39
39
  * @returns
40
40
  */
41
- const updateItemsOnDatabase = async (databaseChangeInformation, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogType.global) => {
41
+ const updateItemsOnDatabase = async (databaseChangeInformation, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogTypeSchema.Enum.global) => {
42
42
  // loop the transaction and update the database
43
43
  await db.runTransaction(async (t) => {
44
44
  // get the existing records from the database
@@ -56,7 +56,7 @@ const updateItemsOnDatabase = async (databaseChangeInformation, userId, applicat
56
56
  const changeRecord = databaseChangeInformation[i];
57
57
  const existingRecord = existingRecords[i];
58
58
  // create the audit log
59
- const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogAction.update, changeRecord.auditLogSubType, userId, applicationAuditLogType, changeRecord.alai, changeRecord.item, existingRecord);
59
+ const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogActionSchema.Enum.update, changeRecord.auditLogSubType, userId, applicationAuditLogType, changeRecord.alai, changeRecord.item, existingRecord);
60
60
  const updatedRecord = { ...existingRecord, ...changeRecord.item };
61
61
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
62
62
  t.update(changeRecord.itemDocRef, updatedRecord);
@@ -1 +1 @@
1
- {"version":3,"file":"update-items-properties-on-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/update-items-properties-on-database.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,uBAAuB,EAC1B,MAAM,uEAAuE,CAAC;AAC/E,OAAO,EAAE,kCAAkC,EAAE,MAAM,0DAA0D,CAAC;AAI9G;;;;;;;;GAQG;AACH,QAAA,MAAM,+BAA+B,GAAU,CAAC,yBACrB,kCAAkC,EAAE,UACnD,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,IAAI,CA6Bd,CAAC;AAEF,OAAO,EAAE,+BAA+B,EAAE,CAAC"}
1
+ {"version":3,"file":"update-items-properties-on-database.d.ts","sourceRoot":"","sources":["../../../../../src/application/database/firestore/generics/update-items-properties-on-database.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,uBAAuB,EAE1B,MAAM,uEAAuE,CAAC;AAC/E,OAAO,EAAE,kCAAkC,EAAE,MAAM,0DAA0D,CAAC;AAI9G;;;;;;;;GAQG;AACH,QAAA,MAAM,+BAA+B,GAAU,CAAC,yBACrB,kCAAkC,EAAE,UACnD,MAAM,4BACW,uBAAuB,KACjD,OAAO,CAAC,IAAI,CA6Bd,CAAC;AAEF,OAAO,EAAE,+BAA+B,EAAE,CAAC"}
@@ -39,7 +39,7 @@ const db = admin.firestore();
39
39
  * @param applicationAuditLogType the type of audit log to create
40
40
  * @returns
41
41
  */
42
- const updateItemsPropertiesOnDatabase = async (databaseChangeRecords, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogType.global) => {
42
+ const updateItemsPropertiesOnDatabase = async (databaseChangeRecords, userId, applicationAuditLogType = application_audit_log_models_1.ApplicationAuditLogTypeSchema.Enum.global) => {
43
43
  // loop the transaction and update the database
44
44
  await db.runTransaction(async (t) => {
45
45
  const auditLogUpdates = []; // create an array of audit log updates
@@ -55,7 +55,7 @@ const updateItemsPropertiesOnDatabase = async (databaseChangeRecords, userId, ap
55
55
  const recordExisting = JSON.parse(JSON.stringify(existingRecord));
56
56
  const updatedData = { recordExisting, ...changeRecord.partialObjectUpdate };
57
57
  // create the audit log
58
- const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogAction.update, changeRecord.auditLogSubType, userId, applicationAuditLogType, changeRecord.alai, updatedData, existingRecord);
58
+ const auditLog = (0, create_application_audit_log_1.createApplicationAuditLog)(application_audit_log_models_1.ApplicationAuditLogActionSchema.Enum.update, changeRecord.auditLogSubType, userId, applicationAuditLogType, changeRecord.alai, updatedData, existingRecord);
59
59
  auditLogUpdates.push(auditLog);
60
60
  updatedRecord.push(updatedData);
61
61
  }
@@ -1,10 +1,10 @@
1
- import { IAuthorizationIssuer } from '../../../models/authorization/authorization-models';
1
+ import { AuthorizationIssuer } from '../../../models/authorization/authorization-models';
2
2
  /**
3
3
  * This function creates an authorization issuer.
4
4
  * @param issuerName the name of the issuer (this should be letters and numbers only)
5
5
  * @param publicKey the public key of the issuer (this should be a hex string)
6
6
  * @returns
7
7
  */
8
- declare const createAuthorizationIssuer: (issuerName: string, publicKey: string) => IAuthorizationIssuer;
8
+ declare const createAuthorizationIssuer: (issuerName: string, publicKey: string) => AuthorizationIssuer;
9
9
  export { createAuthorizationIssuer };
10
10
  //# sourceMappingURL=create-authorization-issuer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-authorization-issuer.d.ts","sourceRoot":"","sources":["../../../../src/authorization/jwt/sign/create-authorization-issuer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAE1F;;;;;GAKG;AACH,QAAA,MAAM,yBAAyB,eAAgB,MAAM,aAAa,MAAM,KAAG,oBAe1E,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"create-authorization-issuer.d.ts","sourceRoot":"","sources":["../../../../src/authorization/jwt/sign/create-authorization-issuer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAEzF;;;;;GAKG;AACH,QAAA,MAAM,yBAAyB,eAAgB,MAAM,aAAa,MAAM,KAAG,mBAe1E,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AuthorizationSubjectStart, IAuthorizationSubject } from '../../../models/authorization/authorization-models';
1
+ import { AuthorizationSubjectStart, AuthorizationSubject } from '../../../models/authorization/authorization-models';
2
2
  /**
3
3
  * This creates an authorization subject.
4
4
  *
@@ -7,6 +7,6 @@ import { AuthorizationSubjectStart, IAuthorizationSubject } from '../../../model
7
7
  *
8
8
  * @returns
9
9
  */
10
- declare const createAuthorizationSubject: (subjectType: AuthorizationSubjectStart, subjectId: string) => IAuthorizationSubject;
10
+ declare const createAuthorizationSubject: (subjectType: AuthorizationSubjectStart, subjectId: string) => AuthorizationSubject;
11
11
  export { createAuthorizationSubject };
12
12
  //# sourceMappingURL=create-authorization-subject.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-authorization-subject.d.ts","sourceRoot":"","sources":["../../../../src/authorization/jwt/sign/create-authorization-subject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAEtH;;;;;;;GAOG;AACH,QAAA,MAAM,0BAA0B,gBACf,yBAAyB,aAC3B,MAAM,KAClB,qBAKF,CAAC;AAEF,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
1
+ {"version":3,"file":"create-authorization-subject.d.ts","sourceRoot":"","sources":["../../../../src/authorization/jwt/sign/create-authorization-subject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAErH;;;;;;;GAOG;AACH,QAAA,MAAM,0BAA0B,gBACf,yBAAyB,aAC3B,MAAM,KAClB,oBAKF,CAAC;AAEF,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import jwt from 'jsonwebtoken';
2
- import { AuthorizationAudience, IAuthorizationSubject } from '../../../models/authorization/authorization-models';
2
+ import { AuthorizationAudience, AuthorizationSubject } from '../../../models/authorization/authorization-models';
3
3
  /**
4
4
  * This function creates the options for the jwt token issuance
5
5
  *
@@ -12,6 +12,6 @@ import { AuthorizationAudience, IAuthorizationSubject } from '../../../models/au
12
12
  * @param header An object containing additional header properties to include in the token. (optional)
13
13
  * @returns
14
14
  */
15
- declare const createJwtOptions: (subject: IAuthorizationSubject, audience?: AuthorizationAudience | AuthorizationAudience[], algorithm?: jwt.Algorithm, expiresIn?: string | number, notBefore?: string | number, keyid?: string, header?: jwt.JwtHeader) => jwt.SignOptions;
15
+ declare const createJwtOptions: (subject: AuthorizationSubject, audience?: AuthorizationAudience | AuthorizationAudience[], algorithm?: jwt.Algorithm, expiresIn?: string | number, notBefore?: string | number, keyid?: string, header?: jwt.JwtHeader) => jwt.SignOptions;
16
16
  export { createJwtOptions };
17
17
  //# sourceMappingURL=create-jwt-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-jwt-options.d.ts","sourceRoot":"","sources":["../../../../src/authorization/jwt/sign/create-jwt-options.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,cAAc,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAGlH;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,gBAAgB,YACT,qBAAqB,aACpB,qBAAqB,GAAG,qBAAqB,EAAE,cAC9C,GAAG,CAAC,SAAS,cACb,MAAM,GAAG,MAAM,cACf,MAAM,GAAG,MAAM,UAClB,MAAM,WACL,GAAG,CAAC,SAAS,KACvB,GAAG,CAAC,WAkBN,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"create-jwt-options.d.ts","sourceRoot":"","sources":["../../../../src/authorization/jwt/sign/create-jwt-options.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,cAAc,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAGjH;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,gBAAgB,YACT,oBAAoB,aACnB,qBAAqB,GAAG,qBAAqB,EAAE,cAC9C,GAAG,CAAC,SAAS,cACb,MAAM,GAAG,MAAM,cACf,MAAM,GAAG,MAAM,UAClB,MAAM,WACL,GAAG,CAAC,SAAS,KACvB,GAAG,CAAC,WAkBN,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AuthorizationAudience, IAuthorizationIssuer } from '../../../models/authorization/authorization-models';
1
+ import { AuthorizationAudience, AuthorizationIssuer } from '../../../models/authorization/authorization-models';
2
2
  /**
3
3
  * This class is used to keep and maintain the authorized authorities in the SAFE system.
4
4
  */
@@ -13,26 +13,26 @@ export declare class AuthorizedAuthorities {
13
13
  * @param authorizationIssuer the authority to add
14
14
  * @param publicKey the public key
15
15
  */
16
- addAuthorizedJWTAuthority(audience: AuthorizationAudience, authorizationIssuer: IAuthorizationIssuer, publicKey: string): void;
16
+ addAuthorizedJWTAuthority(audience: AuthorizationAudience, authorizationIssuer: AuthorizationIssuer, publicKey: string): void;
17
17
  /**
18
18
  * This removes a JWT authority from the authorized authorities for the given audience.
19
19
  *
20
20
  * @param authority the authority to remove
21
21
  */
22
- removeAuthorizedJWTAuthority(audience: AuthorizationAudience, authority: IAuthorizationIssuer): void;
22
+ removeAuthorizedJWTAuthority(audience: AuthorizationAudience, authority: AuthorizationIssuer): void;
23
23
  /**
24
24
  * This gets the public key for the given authority for the given audience.
25
25
  *
26
26
  * @param authority the authority to get the public key for
27
27
  * @returns
28
28
  */
29
- getAuthorizedJWTAuthorityPublicKey(audience: AuthorizationAudience, authority: IAuthorizationIssuer): string | undefined;
29
+ getAuthorizedJWTAuthorityPublicKey(audience: AuthorizationAudience, authority: AuthorizationIssuer): string | undefined;
30
30
  /**
31
31
  * this gets the authorized JWT authorities for the given audience.
32
32
  * @param audience the audience to get the authorized authorities for
33
33
  * @returns
34
34
  */
35
- getAuthorizedJWTAuthorities(audience: AuthorizationAudience): Map<IAuthorizationIssuer, string>;
35
+ getAuthorizedJWTAuthorities(audience: AuthorizationAudience): Map<AuthorizationIssuer, string>;
36
36
  /**
37
37
  * This gets the number of authorized JWT providers for the given audience.
38
38
  * @returns
@@ -1 +1 @@
1
- {"version":3,"file":"authorized-authorities.d.ts","sourceRoot":"","sources":["../../../../src/authorization/safe/authorization/authorized-authorities.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAiB,MAAM,oDAAoD,CAAC;AAEhI;;GAEG;AACH,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,yBAAyB,CAAgE;IAEjG,OAAO,CAAC,0BAA0B,CAAqC;;IAYtE;;;;;;MAME;IACI,yBAAyB,CAC5B,QAAQ,EAAE,qBAAqB,EAC/B,mBAAmB,EAAE,oBAAoB,EACzC,SAAS,EAAE,MAAM,GAClB,IAAI;IAKP;;;;OAIG;IACI,4BAA4B,CAAC,QAAQ,EAAE,qBAAqB,EAAE,SAAS,EAAE,oBAAoB,GAAG,IAAI;IAO3G;;;;;OAKG;IACI,kCAAkC,CAAC,QAAQ,EAAE,qBAAqB,EAAE,SAAS,EAAE,oBAAoB,GAAG,MAAM,GAAG,SAAS;IAI/H;;;;OAIG;IACI,2BAA2B,CAAC,QAAQ,EAAE,qBAAqB,GAAG,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC;IAItG;;;OAGG;IACI,gCAAgC,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM;CAGnF"}
1
+ {"version":3,"file":"authorized-authorities.d.ts","sourceRoot":"","sources":["../../../../src/authorization/safe/authorization/authorized-authorities.ts"],"names":[],"mappings":"AACA,OAAO,EACH,qBAAqB,EACrB,mBAAmB,EACtB,MAAM,oDAAoD,CAAC;AAE5D;;GAEG;AACH,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,yBAAyB,CAA+D;IAEhG,OAAO,CAAC,0BAA0B,CAAqC;;IAYtE;;;;;;MAME;IACI,yBAAyB,CAC5B,QAAQ,EAAE,qBAAqB,EAC/B,mBAAmB,EAAE,mBAAmB,EACxC,SAAS,EAAE,MAAM,GAClB,IAAI;IAKP;;;;OAIG;IACI,4BAA4B,CAAC,QAAQ,EAAE,qBAAqB,EAAE,SAAS,EAAE,mBAAmB,GAAG,IAAI;IAO1G;;;;;OAKG;IACI,kCAAkC,CAAC,QAAQ,EAAE,qBAAqB,EAAE,SAAS,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS;IAI9H;;;;OAIG;IACI,2BAA2B,CAAC,QAAQ,EAAE,qBAAqB,GAAG,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC;IAIrG;;;OAGG;IACI,gCAAgC,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM;CAGnF"}
@@ -1,10 +1,10 @@
1
- import { IAuthorizationIssuer } from '../../../models/authorization/authorization-models';
1
+ import { AuthorizationIssuer } from '../../../models/authorization/authorization-models';
2
2
  /**
3
3
  * This function determines the issuer from the request.
4
4
  *
5
5
  * @param req the request to determine the issuer from
6
6
  * @returns
7
7
  */
8
- declare const determineIssuerFromRequest: (req: any) => IAuthorizationIssuer;
8
+ declare const determineIssuerFromRequest: (req: any) => AuthorizationIssuer;
9
9
  export { determineIssuerFromRequest };
10
10
  //# sourceMappingURL=determine-issuer-from-request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"determine-issuer-from-request.d.ts","sourceRoot":"","sources":["../../../../src/authorization/safe/request/determine-issuer-from-request.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAG1F;;;;;GAKG;AACH,QAAA,MAAM,0BAA0B,QAAS,GAAG,KAAG,oBAa9C,CAAA;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
1
+ {"version":3,"file":"determine-issuer-from-request.d.ts","sourceRoot":"","sources":["../../../../src/authorization/safe/request/determine-issuer-from-request.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAGzF;;;;;GAKG;AACH,QAAA,MAAM,0BAA0B,QAAS,GAAG,KAAG,mBAa9C,CAAA;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { IAuthorizationIssuer } from '../../../../models/authorization/authorization-models';
1
+ import { AuthorizationIssuer } from '../../../../models/authorization/authorization-models';
2
2
  /**
3
3
  * This function determines the issuer from the bearer token (if it exists).
4
4
  * doesn't validate the signature of the token, just that the shape is correct and
@@ -7,6 +7,6 @@ import { IAuthorizationIssuer } from '../../../../models/authorization/authoriza
7
7
  * @param bearerToken the bearer token to determine the issuer from
8
8
  * @returns
9
9
  */
10
- declare const determineIssuerFromBearerToken: (bearerToken: string) => IAuthorizationIssuer;
10
+ declare const determineIssuerFromBearerToken: (bearerToken: string) => AuthorizationIssuer;
11
11
  export { determineIssuerFromBearerToken };
12
12
  //# sourceMappingURL=determine-issuer-from-bearer-token.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"determine-issuer-from-bearer-token.d.ts","sourceRoot":"","sources":["../../../../../src/authorization/safe/request/issuer/determine-issuer-from-bearer-token.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAC;AAI7F;;;;;;;GAOG;AACH,QAAA,MAAM,8BAA8B,gBAAiB,MAAM,KAAG,oBAiB7D,CAAC;AAEF,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
1
+ {"version":3,"file":"determine-issuer-from-bearer-token.d.ts","sourceRoot":"","sources":["../../../../../src/authorization/safe/request/issuer/determine-issuer-from-bearer-token.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAI5F;;;;;;;GAOG;AACH,QAAA,MAAM,8BAA8B,gBAAiB,MAAM,KAAG,mBAiB7D,CAAC;AAEF,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
@@ -1,10 +1,10 @@
1
- import { IAuthorizationIssuer } from '../../../../../models/authorization/authorization-models';
1
+ import { AuthorizationIssuer } from '../../../../../models/authorization/authorization-models';
2
2
  /**
3
3
  * This function verifies that the incoming object is a valid authorization issuer.
4
4
  *
5
5
  * @param iss the object to verify
6
6
  * @returns
7
7
  */
8
- declare const verifyAuthorizationIssuer: (iss: unknown) => iss is IAuthorizationIssuer;
8
+ declare const verifyAuthorizationIssuer: (iss: unknown) => iss is AuthorizationIssuer;
9
9
  export { verifyAuthorizationIssuer };
10
10
  //# sourceMappingURL=verify-authorization-issuer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify-authorization-issuer.d.ts","sourceRoot":"","sources":["../../../../../../src/authorization/safe/validation/jwt/payload/verify-authorization-issuer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAC;AAEhG;;;;;GAKG;AACH,QAAA,MAAM,yBAAyB,QAAS,OAAO,KAAG,GAAG,IAAI,oBAexD,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"verify-authorization-issuer.d.ts","sourceRoot":"","sources":["../../../../../../src/authorization/safe/validation/jwt/payload/verify-authorization-issuer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAG/F;;;;;GAKG;AACH,QAAA,MAAM,yBAAyB,QAAS,OAAO,KAAG,GAAG,IAAI,mBAexD,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -1,10 +1,10 @@
1
- import { IAuthorizationSubject } from '../../../../../models/authorization/authorization-models';
1
+ import { AuthorizationSubject } from '../../../../../models/authorization/authorization-models';
2
2
  /**
3
3
  * This function validates that the input string is a valid authorization subject.
4
4
  *
5
5
  * @param sub The input string to validate.
6
6
  * @returns True if the input is a valid authorization subject, false otherwise.
7
7
  */
8
- declare const verifyAuthorizationSubject: (sub: unknown) => sub is IAuthorizationSubject;
8
+ declare const verifyAuthorizationSubject: (sub: unknown) => sub is AuthorizationSubject;
9
9
  export { verifyAuthorizationSubject };
10
10
  //# sourceMappingURL=verify-authorization-subject.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify-authorization-subject.d.ts","sourceRoot":"","sources":["../../../../../../src/authorization/safe/validation/jwt/payload/verify-authorization-subject.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,qBAAqB,EAExB,MAAM,0DAA0D,CAAC;AAElE;;;;;GAKG;AACH,QAAA,MAAM,0BAA0B,QAAS,OAAO,KAAG,GAAG,IAAI,qBASzD,CAAC;AAEF,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
1
+ {"version":3,"file":"verify-authorization-subject.d.ts","sourceRoot":"","sources":["../../../../../../src/authorization/safe/validation/jwt/payload/verify-authorization-subject.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,oBAAoB,EAEvB,MAAM,0DAA0D,CAAC;AAElE;;;;;GAKG;AACH,QAAA,MAAM,0BAA0B,QAAS,OAAO,KAAG,GAAG,IAAI,oBASzD,CAAC;AAEF,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
@@ -27,6 +27,12 @@ declare const getParamFunctionId: (req: any) => string;
27
27
  * @returns
28
28
  */
29
29
  declare const getParamRulesId: (req: any) => string;
30
+ /**
31
+ * The function gets the rulesets id from the restful parameter object
32
+ * @param req the incoming request
33
+ * @returns
34
+ */
35
+ declare const getParamRuleSetsId: (req: any) => string;
30
36
  /**
31
37
  * The function gets the event id from the restful parameter object
32
38
  *
@@ -41,5 +47,5 @@ declare const getParamEventId: (req: any) => string;
41
47
  * @returns
42
48
  */
43
49
  declare const getAuthorityId: (req: any) => string;
44
- export { getParamShareDataId, getParamFunctionId, getParamRulesId, getParamEventId, getAuthorityId, };
50
+ export { getParamShareDataId, getParamFunctionId, getParamRulesId, getParamRuleSetsId, getParamEventId, getAuthorityId, };
45
51
  //# sourceMappingURL=params-object-helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"params-object-helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/request/params-object-helpers.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAIH;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,QAAS,GAAG,KAAG,MAEvC,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,kBAAkB,QAAS,GAAG,KAAG,MAEtC,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,eAAe,QAAS,GAAG,KAAG,MAEnC,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,eAAe,QAAS,GAAG,KAAG,MAEnC,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,cAAc,QAAS,GAAG,KAAG,MAElC,CAAA;AAID,OAAO,EACH,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,GACjB,CAAA"}
1
+ {"version":3,"file":"params-object-helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/request/params-object-helpers.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAIH;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,QAAS,GAAG,KAAG,MAEvC,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,kBAAkB,QAAS,GAAG,KAAG,MAEtC,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,eAAe,QAAS,GAAG,KAAG,MAEnC,CAAA;AAED;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,QAAS,GAAG,KAAG,MAEtC,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,eAAe,QAAS,GAAG,KAAG,MAEnC,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,cAAc,QAAS,GAAG,KAAG,MAElC,CAAA;AAID,OAAO,EACH,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,cAAc,GACjB,CAAA"}
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
3
  // This file contains the functions to get the incoming params in the request object.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getAuthorityId = exports.getParamEventId = exports.getParamRulesId = exports.getParamFunctionId = exports.getParamShareDataId = void 0;
5
+ exports.getAuthorityId = exports.getParamEventId = exports.getParamRuleSetsId = exports.getParamRulesId = exports.getParamFunctionId = exports.getParamShareDataId = void 0;
6
6
  /**
7
7
  * The pattern for this is:
8
8
  * Parameters are always in the request object and lowercase.
@@ -42,6 +42,15 @@ const getParamRulesId = (req) => {
42
42
  return req.params.rulesid;
43
43
  };
44
44
  exports.getParamRulesId = getParamRulesId;
45
+ /**
46
+ * The function gets the rulesets id from the restful parameter object
47
+ * @param req the incoming request
48
+ * @returns
49
+ */
50
+ const getParamRuleSetsId = (req) => {
51
+ return req.params.rulesetsid;
52
+ };
53
+ exports.getParamRuleSetsId = getParamRuleSetsId;
45
54
  /**
46
55
  * The function gets the event id from the restful parameter object
47
56
  *
@@ -17,6 +17,21 @@ declare const setAuthorizationAudience: (req: any, authorizationAudience: Author
17
17
  * @returns
18
18
  */
19
19
  declare const getAuthorizationAudience: (req: any) => AuthorizationAudience;
20
+ /**
21
+ * This function sets the unique tracking id on the request object.
22
+ *
23
+ * @param req the incoming request object
24
+ * @param uniqueTrackingId the unique tracking id to set
25
+ * @returns
26
+ */
27
+ declare const setUniqueTrackingId: (req: any, uniqueTrackingId: string) => void;
28
+ /**
29
+ * This function gets the unique tracking id from the request object.
30
+ *
31
+ * @param req the incoming request object
32
+ * @returns
33
+ */
34
+ declare const getUniqueTrackingId: (req: any) => string;
20
35
  /**
21
36
  * This function sets the IUserWithClaims object into the req.user object.
22
37
  * @param req the incoming request object
@@ -30,5 +45,5 @@ declare const setUserRequest: (req: any, userObject: any) => void;
30
45
  * @returns
31
46
  */
32
47
  declare const getUserRequest: (req: any) => any;
33
- export { setAuthorizationAudience, getAuthorizationAudience, setUserRequest, getUserRequest, };
48
+ export { setAuthorizationAudience, getAuthorizationAudience, setUniqueTrackingId, setUserRequest, getUserRequest, getUniqueTrackingId, };
34
49
  //# sourceMappingURL=request-object-helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request-object-helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/request/request-object-helpers.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAOxF;;;;;;GAMG;AACH,QAAA,MAAM,wBAAwB,QAAS,GAAG,yBAAyB,qBAAqB,KAAG,IAG1F,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,wBAAwB,QAAS,GAAG,KAAG,qBAE5C,CAAA;AAID;;;;;GAKG;AACH,QAAA,MAAM,cAAc,QAAS,GAAG,cAAc,GAAG,KAAG,IAEnD,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,cAAc,QAAS,GAAG,KAAG,GAElC,CAAC;AAGF,OAAO,EACH,wBAAwB,EACxB,wBAAwB,EACxB,cAAc,EACd,cAAc,GACjB,CAAC"}
1
+ {"version":3,"file":"request-object-helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/request/request-object-helpers.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAQxF;;;;;;GAMG;AACH,QAAA,MAAM,wBAAwB,QAAS,GAAG,yBAAyB,qBAAqB,KAAG,IAG1F,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,wBAAwB,QAAS,GAAG,KAAG,qBAE5C,CAAA;AAED;;;;;;GAMG;AACH,QAAA,MAAM,mBAAmB,QAAS,GAAG,oBAAoB,MAAM,KAAG,IAGjE,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,QAAS,GAAG,KAAG,MAEvC,CAAA;AAGD;;;;;GAKG;AACH,QAAA,MAAM,cAAc,QAAS,GAAG,cAAc,GAAG,KAAG,IAEnD,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,cAAc,QAAS,GAAG,KAAG,GAElC,CAAC;AAGF,OAAO,EACH,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,mBAAmB,GACtB,CAAC"}
@@ -5,9 +5,10 @@
5
5
  * It is used to set and get the user object from the request object.
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.getUserRequest = exports.setUserRequest = exports.getAuthorizationAudience = exports.setAuthorizationAudience = void 0;
8
+ exports.getUniqueTrackingId = exports.getUserRequest = exports.setUserRequest = exports.setUniqueTrackingId = exports.getAuthorizationAudience = exports.setAuthorizationAudience = void 0;
9
9
  const USER_REQUEST_KEY = 'user';
10
- const AUTHORIZATION_AUDIENCE_KEY = 'authorizationaudience';
10
+ const AUTHORIZATION_AUDIENCE_KEY = 'authorizationAudience';
11
+ const UNIQUE_TRACKING_ID_KEY = 'uniqueTrackingId';
11
12
  //#region Authorization
12
13
  /**
13
14
  * This function sets the Authorization Audience on the request object.
@@ -30,6 +31,28 @@ const getAuthorizationAudience = (req) => {
30
31
  return req[AUTHORIZATION_AUDIENCE_KEY];
31
32
  };
32
33
  exports.getAuthorizationAudience = getAuthorizationAudience;
34
+ /**
35
+ * This function sets the unique tracking id on the request object.
36
+ *
37
+ * @param req the incoming request object
38
+ * @param uniqueTrackingId the unique tracking id to set
39
+ * @returns
40
+ */
41
+ const setUniqueTrackingId = (req, uniqueTrackingId) => {
42
+ req[UNIQUE_TRACKING_ID_KEY] = uniqueTrackingId;
43
+ return;
44
+ };
45
+ exports.setUniqueTrackingId = setUniqueTrackingId;
46
+ /**
47
+ * This function gets the unique tracking id from the request object.
48
+ *
49
+ * @param req the incoming request object
50
+ * @returns
51
+ */
52
+ const getUniqueTrackingId = (req) => {
53
+ return req[UNIQUE_TRACKING_ID_KEY];
54
+ };
55
+ exports.getUniqueTrackingId = getUniqueTrackingId;
33
56
  //#endregion Authorization
34
57
  /**
35
58
  * This function sets the IUserWithClaims object into the req.user object.