asma-helpers 0.2.16 → 0.2.18

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/.prettierrc +15 -15
  2. package/.vscode/settings.json +39 -39
  3. package/README.md +0 -0
  4. package/lib/clients/srvAuth.d.ts +1 -1
  5. package/lib/clients/srvAuth.js +6 -6
  6. package/lib/global.d.ts +39 -39
  7. package/lib/global.js +4 -4
  8. package/lib/helpers/CapitalizeFistLetter.d.ts +2 -2
  9. package/lib/helpers/CapitalizeFistLetter.js +6 -6
  10. package/lib/helpers/Config.d.ts +5 -5
  11. package/lib/helpers/Config.js +44 -44
  12. package/lib/helpers/EnvironmentToOperateTypes.d.ts +7 -7
  13. package/lib/helpers/EnvironmentToOperateTypes.js +8 -8
  14. package/lib/helpers/EnvironmentsUrls.d.ts +81 -93
  15. package/lib/helpers/EnvironmentsUrls.d.ts.map +1 -1
  16. package/lib/helpers/EnvironmentsUrls.js +79 -89
  17. package/lib/helpers/EnvironmentsUrls.js.map +1 -1
  18. package/lib/helpers/FormatNumberConstants.d.ts +24 -24
  19. package/lib/helpers/FormatNumberConstants.js +40 -40
  20. package/lib/helpers/InitializeIDBListenersOnMstSnapshots.d.ts +1 -1
  21. package/lib/helpers/InitializeIDBListenersOnMstSnapshots.js +49 -49
  22. package/lib/helpers/InitializeIDBListenersOnMstSnapshotsThenCatch.d.ts +8 -8
  23. package/lib/helpers/InitializeIDBListenersOnMstSnapshotsThenCatch.js +68 -68
  24. package/lib/helpers/IsAdcuris.d.ts +2 -2
  25. package/lib/helpers/IsAdcuris.js +4 -4
  26. package/lib/helpers/IsNotEmpty.d.ts +1 -1
  27. package/lib/helpers/IsNotEmpty.js +3 -3
  28. package/lib/helpers/NorwegianPostalCodes.d.ts +8 -8
  29. package/lib/helpers/NorwegianPostalCodes.js +3 -3
  30. package/lib/helpers/ProcessServerError.d.ts +2 -2
  31. package/lib/helpers/ProcessServerError.js +100 -100
  32. package/lib/helpers/base64ToFile.d.ts +1 -1
  33. package/lib/helpers/base64ToFile.js +8 -8
  34. package/lib/helpers/clearCacheData.d.ts +1 -1
  35. package/lib/helpers/clearCacheData.js +12 -12
  36. package/lib/helpers/generateEnvConfigsBindings.d.ts +28 -30
  37. package/lib/helpers/generateEnvConfigsBindings.d.ts.map +1 -1
  38. package/lib/helpers/generateEnvConfigsBindings.js +48 -48
  39. package/lib/helpers/generateGenqlClient.d.ts +18 -18
  40. package/lib/helpers/generateGenqlClient.js +56 -56
  41. package/lib/helpers/generateSrvAuthBindings.d.ts +33 -33
  42. package/lib/helpers/generateSrvAuthBindings.js +163 -163
  43. package/lib/helpers/getGqlOperationName.d.ts +1 -1
  44. package/lib/helpers/getGqlOperationName.js +15 -15
  45. package/lib/helpers/getSubdomain.d.ts +3 -3
  46. package/lib/helpers/getSubdomain.js +27 -27
  47. package/lib/helpers/parseJwt.d.ts +1 -1
  48. package/lib/helpers/parseJwt.js +7 -7
  49. package/lib/helpers/userTypingSignal.d.ts +4 -4
  50. package/lib/helpers/userTypingSignal.js +32 -32
  51. package/lib/index.d.ts +26 -27
  52. package/lib/index.d.ts.map +1 -1
  53. package/lib/index.js +24 -25
  54. package/lib/index.js.map +1 -1
  55. package/lib/interfaces/api/advoca/ISaveToDataBase.d.ts +16 -16
  56. package/lib/interfaces/api/advoca/ISaveToDataBase.js +1 -1
  57. package/lib/interfaces/api/advoca/IUploadedDocument.d.ts +26 -26
  58. package/lib/interfaces/api/advoca/IUploadedDocument.js +1 -1
  59. package/lib/interfaces/enums.d.ts +50 -50
  60. package/lib/interfaces/enums.js +59 -59
  61. package/lib/utility/fetch.d.ts +1 -1
  62. package/lib/utility/fetch.js +5 -5
  63. package/package.json +30 -30
  64. package/src/clients/srvAuth.ts +6 -6
  65. package/src/global.ts +45 -45
  66. package/src/helpers/CapitalizeFistLetter.ts +7 -7
  67. package/src/helpers/Config.ts +58 -58
  68. package/src/helpers/EnvironmentToOperateTypes.ts +6 -6
  69. package/src/helpers/EnvironmentsUrls.ts +92 -102
  70. package/src/helpers/FormatNumberConstants.ts +41 -41
  71. package/src/helpers/InitializeIDBListenersOnMstSnapshots.ts +62 -62
  72. package/src/helpers/InitializeIDBListenersOnMstSnapshotsThenCatch.ts +82 -82
  73. package/src/helpers/IsAdcuris.ts +4 -4
  74. package/src/helpers/IsNotEmpty.ts +2 -2
  75. package/src/helpers/NorwegianPostalCodes.ts +6 -6
  76. package/src/helpers/ProcessServerError.ts +92 -92
  77. package/src/helpers/base64ToFile.ts +9 -9
  78. package/src/helpers/clearCacheData.ts +15 -15
  79. package/src/helpers/generateEnvConfigsBindings.ts +82 -82
  80. package/src/helpers/generateGenqlClient.ts +85 -85
  81. package/src/helpers/generateSrvAuthBindings.ts +215 -215
  82. package/src/helpers/getGqlOperationName.ts +20 -20
  83. package/src/helpers/getSubdomain.ts +40 -40
  84. package/src/helpers/parseJwt.ts +10 -10
  85. package/src/index.ts +33 -33
  86. package/src/interfaces/api/advoca/ISaveToDataBase.ts +17 -17
  87. package/src/interfaces/api/advoca/IUploadedDocument.ts +23 -23
  88. package/src/interfaces/enums.ts +56 -56
  89. package/src/utility/fetch.ts +9 -9
  90. package/tsconfig.json +84 -84
  91. package/lib/helpers/isValidUrl.d.ts +0 -2
  92. package/lib/helpers/isValidUrl.d.ts.map +0 -1
  93. package/lib/helpers/isValidUrl.js +0 -10
  94. package/lib/helpers/isValidUrl.js.map +0 -1
  95. package/src/helpers/isValidUrl.ts +0 -12
package/lib/index.d.ts CHANGED
@@ -1,28 +1,27 @@
1
- export { getServerErrorMessage, processServerError } from './helpers/ProcessServerError';
2
- export { CURENCY_NOK, NORVEGIAN_PHONE_NUMBER, ORDINARY, PERSONAL_NUMBER, YEARS } from './helpers/FormatNumberConstants';
3
- export { COUNTRIES, POSTAL_CODE } from './helpers/NorwegianPostalCodes';
4
- export { capitalizeFirstLetter, toLowercaseAndCapitalizeFirstLetter } from './helpers/CapitalizeFistLetter';
5
- export * from './helpers/IsAdcuris';
6
- export * from './helpers/IsNotEmpty';
7
- export * from './helpers/Config';
8
- export * from './helpers/InitializeIDBListenersOnMstSnapshots';
9
- export * from './helpers/InitializeIDBListenersOnMstSnapshotsThenCatch';
10
- export * from './helpers/getGqlOperationName';
11
- export * from './helpers/parseJwt';
12
- export * from './helpers/EnvironmentsUrls';
13
- export * from './helpers/EnvironmentToOperateTypes';
14
- export * from './helpers/generateSrvAuthBindings';
15
- export * from './helpers/getSubdomain';
16
- export * from './helpers/clearCacheData';
17
- export * from './helpers/generateGenqlClient';
18
- export * from './helpers/generateEnvConfigsBindings';
19
- export * from './helpers/userTypingSignal';
20
- export * from './helpers/base64ToFile';
21
- export * from './helpers/isValidUrl';
22
- export * from './utility/fetch';
23
- export * from './clients/srvAuth';
24
- export type { IUploadedDocument } from './interfaces/api/advoca/IUploadedDocument';
25
- export type { IFeedBack, ISaveToDataBase } from './interfaces/api/advoca/ISaveToDataBase';
26
- export * from './interfaces/enums';
27
- export * from './global';
1
+ export { getServerErrorMessage, processServerError } from './helpers/ProcessServerError';
2
+ export { CURENCY_NOK, NORVEGIAN_PHONE_NUMBER, ORDINARY, PERSONAL_NUMBER, YEARS } from './helpers/FormatNumberConstants';
3
+ export { COUNTRIES, POSTAL_CODE } from './helpers/NorwegianPostalCodes';
4
+ export { capitalizeFirstLetter, toLowercaseAndCapitalizeFirstLetter } from './helpers/CapitalizeFistLetter';
5
+ export * from './helpers/IsAdcuris';
6
+ export * from './helpers/IsNotEmpty';
7
+ export * from './helpers/Config';
8
+ export * from './helpers/InitializeIDBListenersOnMstSnapshots';
9
+ export * from './helpers/InitializeIDBListenersOnMstSnapshotsThenCatch';
10
+ export * from './helpers/getGqlOperationName';
11
+ export * from './helpers/parseJwt';
12
+ export * from './helpers/EnvironmentsUrls';
13
+ export * from './helpers/EnvironmentToOperateTypes';
14
+ export * from './helpers/generateSrvAuthBindings';
15
+ export * from './helpers/getSubdomain';
16
+ export * from './helpers/clearCacheData';
17
+ export * from './helpers/generateGenqlClient';
18
+ export * from './helpers/generateEnvConfigsBindings';
19
+ export * from './helpers/userTypingSignal';
20
+ export * from './helpers/base64ToFile';
21
+ export * from './utility/fetch';
22
+ export * from './clients/srvAuth';
23
+ export type { IUploadedDocument } from './interfaces/api/advoca/IUploadedDocument';
24
+ export type { IFeedBack, ISaveToDataBase } from './interfaces/api/advoca/ISaveToDataBase';
25
+ export * from './interfaces/enums';
26
+ export * from './global';
28
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACxF,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AACvH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAA;AAC3G,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,yDAAyD,CAAA;AAEvE,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sCAAsC,CAAA;AACpD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AAEpC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,mBAAmB,CAAA;AAEjC,YAAY,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAClF,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAEzF,cAAc,oBAAoB,CAAA;AAElC,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACxF,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AACvH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAA;AAC3G,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,yDAAyD,CAAA;AAEvE,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sCAAsC,CAAA;AACpD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AAGtC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,mBAAmB,CAAA;AAEjC,YAAY,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAClF,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAEzF,cAAc,oBAAoB,CAAA;AAElC,cAAc,UAAU,CAAA"}
package/lib/index.js CHANGED
@@ -1,26 +1,25 @@
1
- export { getServerErrorMessage, processServerError } from './helpers/ProcessServerError';
2
- export { CURENCY_NOK, NORVEGIAN_PHONE_NUMBER, ORDINARY, PERSONAL_NUMBER, YEARS } from './helpers/FormatNumberConstants';
3
- export { COUNTRIES, POSTAL_CODE } from './helpers/NorwegianPostalCodes';
4
- export { capitalizeFirstLetter, toLowercaseAndCapitalizeFirstLetter } from './helpers/CapitalizeFistLetter';
5
- export * from './helpers/IsAdcuris';
6
- export * from './helpers/IsNotEmpty';
7
- export * from './helpers/Config';
8
- export * from './helpers/InitializeIDBListenersOnMstSnapshots';
9
- export * from './helpers/InitializeIDBListenersOnMstSnapshotsThenCatch';
10
- export * from './helpers/getGqlOperationName';
11
- export * from './helpers/parseJwt';
12
- export * from './helpers/EnvironmentsUrls';
13
- export * from './helpers/EnvironmentToOperateTypes';
14
- export * from './helpers/generateSrvAuthBindings';
15
- export * from './helpers/getSubdomain';
16
- export * from './helpers/clearCacheData';
17
- export * from './helpers/generateGenqlClient';
18
- export * from './helpers/generateEnvConfigsBindings';
19
- export * from './helpers/userTypingSignal';
20
- export * from './helpers/base64ToFile';
21
- export * from './helpers/isValidUrl';
22
- export * from './utility/fetch';
23
- export * from './clients/srvAuth';
24
- export * from './interfaces/enums';
25
- export * from './global';
1
+ export { getServerErrorMessage, processServerError } from './helpers/ProcessServerError';
2
+ export { CURENCY_NOK, NORVEGIAN_PHONE_NUMBER, ORDINARY, PERSONAL_NUMBER, YEARS } from './helpers/FormatNumberConstants';
3
+ export { COUNTRIES, POSTAL_CODE } from './helpers/NorwegianPostalCodes';
4
+ export { capitalizeFirstLetter, toLowercaseAndCapitalizeFirstLetter } from './helpers/CapitalizeFistLetter';
5
+ export * from './helpers/IsAdcuris';
6
+ export * from './helpers/IsNotEmpty';
7
+ export * from './helpers/Config';
8
+ export * from './helpers/InitializeIDBListenersOnMstSnapshots';
9
+ export * from './helpers/InitializeIDBListenersOnMstSnapshotsThenCatch';
10
+ export * from './helpers/getGqlOperationName';
11
+ export * from './helpers/parseJwt';
12
+ export * from './helpers/EnvironmentsUrls';
13
+ export * from './helpers/EnvironmentToOperateTypes';
14
+ export * from './helpers/generateSrvAuthBindings';
15
+ export * from './helpers/getSubdomain';
16
+ export * from './helpers/clearCacheData';
17
+ export * from './helpers/generateGenqlClient';
18
+ export * from './helpers/generateEnvConfigsBindings';
19
+ export * from './helpers/userTypingSignal';
20
+ export * from './helpers/base64ToFile';
21
+ export * from './utility/fetch';
22
+ export * from './clients/srvAuth';
23
+ export * from './interfaces/enums';
24
+ export * from './global';
26
25
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACxF,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AACvH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAA;AAC3G,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,yDAAyD,CAAA;AAEvE,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sCAAsC,CAAA;AACpD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AAEpC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,mBAAmB,CAAA;AAKjC,cAAc,oBAAoB,CAAA;AAElC,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACxF,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AACvH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAA;AAC3G,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gDAAgD,CAAA;AAC9D,cAAc,yDAAyD,CAAA;AAEvE,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sCAAsC,CAAA;AACpD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AAGtC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,mBAAmB,CAAA;AAKjC,cAAc,oBAAoB,CAAA;AAElC,cAAc,UAAU,CAAA"}
@@ -1,17 +1,17 @@
1
- export interface ISaveToDataBase {
2
- method: string;
3
- json: string;
4
- uuid: string | undefined;
5
- feedback: IFeedBack;
6
- url: string;
7
- origin?: {
8
- method: string;
9
- };
10
- }
11
- export interface IFeedBack {
12
- error?: string;
13
- type: string;
14
- message: string;
15
- show_time: number;
16
- }
1
+ export interface ISaveToDataBase {
2
+ method: string;
3
+ json: string;
4
+ uuid: string | undefined;
5
+ feedback: IFeedBack;
6
+ url: string;
7
+ origin?: {
8
+ method: string;
9
+ };
10
+ }
11
+ export interface IFeedBack {
12
+ error?: string;
13
+ type: string;
14
+ message: string;
15
+ show_time: number;
16
+ }
17
17
  //# sourceMappingURL=ISaveToDataBase.d.ts.map
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=ISaveToDataBase.js.map
@@ -1,27 +1,27 @@
1
- export interface IUploadedDocument {
2
- created_at: string;
3
- customer: {
4
- comm_consents_descr: string;
5
- contact_email: string;
6
- contact_message: string;
7
- contact_tel: string;
8
- id: number;
9
- logo: string;
10
- name: string;
11
- updated_at: string;
12
- };
13
- customer_id: number;
14
- id: number;
15
- name: string;
16
- path: string;
17
- patientIds: {
18
- id: number;
19
- soknad_id: string;
20
- }[];
21
- region: number;
22
- sds_id: number;
23
- updated_at: string;
24
- upload_patient_id: number;
25
- success: string;
26
- }
1
+ export interface IUploadedDocument {
2
+ created_at: string;
3
+ customer: {
4
+ comm_consents_descr: string;
5
+ contact_email: string;
6
+ contact_message: string;
7
+ contact_tel: string;
8
+ id: number;
9
+ logo: string;
10
+ name: string;
11
+ updated_at: string;
12
+ };
13
+ customer_id: number;
14
+ id: number;
15
+ name: string;
16
+ path: string;
17
+ patientIds: {
18
+ id: number;
19
+ soknad_id: string;
20
+ }[];
21
+ region: number;
22
+ sds_id: number;
23
+ updated_at: string;
24
+ upload_patient_id: number;
25
+ success: string;
26
+ }
27
27
  //# sourceMappingURL=IUploadedDocument.d.ts.map
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=IUploadedDocument.js.map
@@ -1,51 +1,51 @@
1
- export declare enum InitiatorTypes {
2
- Customer = "customer",
3
- Patient = "patient",
4
- SelfCompletable = "self-completable"
5
- }
6
- export declare enum QnrContextTypes {
7
- Advoca = "advoca",
8
- Portal = "portal",
9
- Outlook = "outlook"
10
- }
11
- export declare enum DocSignicatSignStatusTypes {
12
- Complteted = "completed",
13
- Rejected = "rejected",
14
- Waiting = "waiting"
15
- }
16
- export declare enum DocProxyStatusTypes {
17
- Signed = "signed",
18
- WaitingForSigning = "waiting_for_signing",
19
- OnlyForView = "only_for_view"
20
- }
21
- export declare enum QuestionTypes {
22
- BooleanQuestion = "BooleanQuestion",
23
- CheckBoxes = "CheckBoxes",
24
- CompositeQuestion = "CompositeQuestion",
25
- DateField = "DateField",
26
- Dropdown = "Dropdown",
27
- FormatNumber = "FormatNumber",
28
- LinearScale = "LinearScale",
29
- Link = "Link",
30
- RadioButtons = "RadioButtons",
31
- TextLong = "TextLong",
32
- TextShort = "TextShort",
33
- Emoticons = "Emoticons",
34
- DocumentUpload = "DocumentUpload",
35
- Readonly = "Readonly",
36
- ExpressionQuestion = "ExpressionQuestion",
37
- Chart = "Chart"
38
- }
39
- export declare enum ActorTypes {
40
- Mappable = "mappable",
41
- Custom = "custom",
42
- Complex = "complex"
43
- }
44
- export declare enum EnvironmentEnums {
45
- local = "local",
46
- dev = "dev",
47
- test = "test",
48
- stage = "stage",
49
- prod = "prod"
50
- }
1
+ export declare enum InitiatorTypes {
2
+ Customer = "customer",
3
+ Patient = "patient",
4
+ SelfCompletable = "self-completable"
5
+ }
6
+ export declare enum QnrContextTypes {
7
+ Advoca = "advoca",
8
+ Portal = "portal",
9
+ Outlook = "outlook"
10
+ }
11
+ export declare enum DocSignicatSignStatusTypes {
12
+ Complteted = "completed",
13
+ Rejected = "rejected",
14
+ Waiting = "waiting"
15
+ }
16
+ export declare enum DocProxyStatusTypes {
17
+ Signed = "signed",
18
+ WaitingForSigning = "waiting_for_signing",
19
+ OnlyForView = "only_for_view"
20
+ }
21
+ export declare enum QuestionTypes {
22
+ BooleanQuestion = "BooleanQuestion",
23
+ CheckBoxes = "CheckBoxes",
24
+ CompositeQuestion = "CompositeQuestion",
25
+ DateField = "DateField",
26
+ Dropdown = "Dropdown",
27
+ FormatNumber = "FormatNumber",
28
+ LinearScale = "LinearScale",
29
+ Link = "Link",
30
+ RadioButtons = "RadioButtons",
31
+ TextLong = "TextLong",
32
+ TextShort = "TextShort",
33
+ Emoticons = "Emoticons",
34
+ DocumentUpload = "DocumentUpload",
35
+ Readonly = "Readonly",
36
+ ExpressionQuestion = "ExpressionQuestion",
37
+ Chart = "Chart"
38
+ }
39
+ export declare enum ActorTypes {
40
+ Mappable = "mappable",
41
+ Custom = "custom",
42
+ Complex = "complex"
43
+ }
44
+ export declare enum EnvironmentEnums {
45
+ local = "local",
46
+ dev = "dev",
47
+ test = "test",
48
+ stage = "stage",
49
+ prod = "prod"
50
+ }
51
51
  //# sourceMappingURL=enums.d.ts.map
@@ -1,60 +1,60 @@
1
- export var InitiatorTypes;
2
- (function (InitiatorTypes) {
3
- InitiatorTypes["Customer"] = "customer";
4
- InitiatorTypes["Patient"] = "patient";
5
- InitiatorTypes["SelfCompletable"] = "self-completable";
6
- })(InitiatorTypes || (InitiatorTypes = {}));
7
- export var QnrContextTypes;
8
- (function (QnrContextTypes) {
9
- QnrContextTypes["Advoca"] = "advoca";
10
- QnrContextTypes["Portal"] = "portal";
11
- QnrContextTypes["Outlook"] = "outlook";
12
- })(QnrContextTypes || (QnrContextTypes = {}));
13
- export var DocSignicatSignStatusTypes;
14
- (function (DocSignicatSignStatusTypes) {
15
- DocSignicatSignStatusTypes["Complteted"] = "completed";
16
- DocSignicatSignStatusTypes["Rejected"] = "rejected";
17
- DocSignicatSignStatusTypes["Waiting"] = "waiting";
18
- })(DocSignicatSignStatusTypes || (DocSignicatSignStatusTypes = {}));
19
- export var DocProxyStatusTypes;
20
- (function (DocProxyStatusTypes) {
21
- DocProxyStatusTypes["Signed"] = "signed";
22
- DocProxyStatusTypes["WaitingForSigning"] = "waiting_for_signing";
23
- DocProxyStatusTypes["OnlyForView"] = "only_for_view";
24
- /* download = 'download',
25
- uploaded = 'uploaded' */
26
- })(DocProxyStatusTypes || (DocProxyStatusTypes = {}));
27
- export var QuestionTypes;
28
- (function (QuestionTypes) {
29
- QuestionTypes["BooleanQuestion"] = "BooleanQuestion";
30
- QuestionTypes["CheckBoxes"] = "CheckBoxes";
31
- QuestionTypes["CompositeQuestion"] = "CompositeQuestion";
32
- QuestionTypes["DateField"] = "DateField";
33
- QuestionTypes["Dropdown"] = "Dropdown";
34
- QuestionTypes["FormatNumber"] = "FormatNumber";
35
- QuestionTypes["LinearScale"] = "LinearScale";
36
- QuestionTypes["Link"] = "Link";
37
- QuestionTypes["RadioButtons"] = "RadioButtons";
38
- QuestionTypes["TextLong"] = "TextLong";
39
- QuestionTypes["TextShort"] = "TextShort";
40
- QuestionTypes["Emoticons"] = "Emoticons";
41
- QuestionTypes["DocumentUpload"] = "DocumentUpload";
42
- QuestionTypes["Readonly"] = "Readonly";
43
- QuestionTypes["ExpressionQuestion"] = "ExpressionQuestion";
44
- QuestionTypes["Chart"] = "Chart";
45
- })(QuestionTypes || (QuestionTypes = {}));
46
- export var ActorTypes;
47
- (function (ActorTypes) {
48
- ActorTypes["Mappable"] = "mappable";
49
- ActorTypes["Custom"] = "custom";
50
- ActorTypes["Complex"] = "complex";
51
- })(ActorTypes || (ActorTypes = {}));
52
- export var EnvironmentEnums;
53
- (function (EnvironmentEnums) {
54
- EnvironmentEnums["local"] = "local";
55
- EnvironmentEnums["dev"] = "dev";
56
- EnvironmentEnums["test"] = "test";
57
- EnvironmentEnums["stage"] = "stage";
58
- EnvironmentEnums["prod"] = "prod";
59
- })(EnvironmentEnums || (EnvironmentEnums = {}));
1
+ export var InitiatorTypes;
2
+ (function (InitiatorTypes) {
3
+ InitiatorTypes["Customer"] = "customer";
4
+ InitiatorTypes["Patient"] = "patient";
5
+ InitiatorTypes["SelfCompletable"] = "self-completable";
6
+ })(InitiatorTypes || (InitiatorTypes = {}));
7
+ export var QnrContextTypes;
8
+ (function (QnrContextTypes) {
9
+ QnrContextTypes["Advoca"] = "advoca";
10
+ QnrContextTypes["Portal"] = "portal";
11
+ QnrContextTypes["Outlook"] = "outlook";
12
+ })(QnrContextTypes || (QnrContextTypes = {}));
13
+ export var DocSignicatSignStatusTypes;
14
+ (function (DocSignicatSignStatusTypes) {
15
+ DocSignicatSignStatusTypes["Complteted"] = "completed";
16
+ DocSignicatSignStatusTypes["Rejected"] = "rejected";
17
+ DocSignicatSignStatusTypes["Waiting"] = "waiting";
18
+ })(DocSignicatSignStatusTypes || (DocSignicatSignStatusTypes = {}));
19
+ export var DocProxyStatusTypes;
20
+ (function (DocProxyStatusTypes) {
21
+ DocProxyStatusTypes["Signed"] = "signed";
22
+ DocProxyStatusTypes["WaitingForSigning"] = "waiting_for_signing";
23
+ DocProxyStatusTypes["OnlyForView"] = "only_for_view";
24
+ /* download = 'download',
25
+ uploaded = 'uploaded' */
26
+ })(DocProxyStatusTypes || (DocProxyStatusTypes = {}));
27
+ export var QuestionTypes;
28
+ (function (QuestionTypes) {
29
+ QuestionTypes["BooleanQuestion"] = "BooleanQuestion";
30
+ QuestionTypes["CheckBoxes"] = "CheckBoxes";
31
+ QuestionTypes["CompositeQuestion"] = "CompositeQuestion";
32
+ QuestionTypes["DateField"] = "DateField";
33
+ QuestionTypes["Dropdown"] = "Dropdown";
34
+ QuestionTypes["FormatNumber"] = "FormatNumber";
35
+ QuestionTypes["LinearScale"] = "LinearScale";
36
+ QuestionTypes["Link"] = "Link";
37
+ QuestionTypes["RadioButtons"] = "RadioButtons";
38
+ QuestionTypes["TextLong"] = "TextLong";
39
+ QuestionTypes["TextShort"] = "TextShort";
40
+ QuestionTypes["Emoticons"] = "Emoticons";
41
+ QuestionTypes["DocumentUpload"] = "DocumentUpload";
42
+ QuestionTypes["Readonly"] = "Readonly";
43
+ QuestionTypes["ExpressionQuestion"] = "ExpressionQuestion";
44
+ QuestionTypes["Chart"] = "Chart";
45
+ })(QuestionTypes || (QuestionTypes = {}));
46
+ export var ActorTypes;
47
+ (function (ActorTypes) {
48
+ ActorTypes["Mappable"] = "mappable";
49
+ ActorTypes["Custom"] = "custom";
50
+ ActorTypes["Complex"] = "complex";
51
+ })(ActorTypes || (ActorTypes = {}));
52
+ export var EnvironmentEnums;
53
+ (function (EnvironmentEnums) {
54
+ EnvironmentEnums["local"] = "local";
55
+ EnvironmentEnums["dev"] = "dev";
56
+ EnvironmentEnums["test"] = "test";
57
+ EnvironmentEnums["stage"] = "stage";
58
+ EnvironmentEnums["prod"] = "prod";
59
+ })(EnvironmentEnums || (EnvironmentEnums = {}));
60
60
  //# sourceMappingURL=enums.js.map
@@ -1,2 +1,2 @@
1
- export declare function http<R>(request: RequestInfo, init?: RequestInit): Promise<R>;
1
+ export declare function http<R>(request: RequestInfo, init?: RequestInit): Promise<R>;
2
2
  //# sourceMappingURL=fetch.d.ts.map
@@ -1,6 +1,6 @@
1
- export async function http(request, init) {
2
- const response = await fetch(request, init);
3
- const body = await response.json();
4
- return body;
5
- }
1
+ export async function http(request, init) {
2
+ const response = await fetch(request, init);
3
+ const body = await response.json();
4
+ return body;
5
+ }
6
6
  //# sourceMappingURL=fetch.js.map
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
- {
2
- "name": "asma-helpers",
3
- "version": "0.2.16",
4
- "description": "helpers methods for asma",
5
- "main": "lib/index.js",
6
- "types": "lib",
7
- "type": "module",
8
- "scripts": {
9
- "build": "npx tsc && npx tsc -p ."
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "https://avanssoma@dev.azure.com/avanssoma/Arbeidoginkludering/_git/asma-helpers"
14
- },
15
- "keywords": [],
16
- "author": "",
17
- "license": "MIT",
18
- "devDependencies": {
19
- "typescript": "^4.9.3"
20
- },
21
- "dependencies": {
22
- "@genql/runtime": "^2.10.0",
23
- "asma-genql-directory": "^1.0.78",
24
- "axios": "^0.27.2",
25
- "history": "~5.0.0",
26
- "idb-keyval": "^6.2.0",
27
- "mobx": "^6.6.1",
28
- "mobx-state-tree": "^5.1.5"
29
- }
30
- }
1
+ {
2
+ "name": "asma-helpers",
3
+ "version": "0.2.18",
4
+ "description": "helpers methods for asma",
5
+ "main": "lib/index.js",
6
+ "types": "lib",
7
+ "type": "module",
8
+ "scripts": {
9
+ "build": "npx tsc && npx tsc -p ."
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://avanssoma@dev.azure.com/avanssoma/Arbeidoginkludering/_git/asma-helpers"
14
+ },
15
+ "keywords": [],
16
+ "author": "",
17
+ "license": "MIT",
18
+ "devDependencies": {
19
+ "typescript": "^4.9.3"
20
+ },
21
+ "dependencies": {
22
+ "@genql/runtime": "^2.10.0",
23
+ "asma-genql-directory": "^1.0.72",
24
+ "axios": "^0.27.2",
25
+ "history": "^5.3.0",
26
+ "idb-keyval": "^6.2.0",
27
+ "mobx": "^6.6.1",
28
+ "mobx-state-tree": "^5.1.5"
29
+ }
30
+ }
@@ -1,7 +1,7 @@
1
- import { http } from "../utility/fetch";
2
-
3
- export async function srvAuthGet<R>(url: string, headers?: Headers) {
4
- return http<R>(url,{
5
- headers
6
- })
1
+ import { http } from "../utility/fetch";
2
+
3
+ export async function srvAuthGet<R>(url: string, headers?: Headers) {
4
+ return http<R>(url,{
5
+ headers
6
+ })
7
7
  }
package/src/global.ts CHANGED
@@ -1,45 +1,45 @@
1
- import { type History, createBrowserHistory } from 'history'
2
- //import type { IGenerateSRVAuthBindings } from './helpers/generateSrvAuthBindings'
3
- //import type { IGenerateSRVAuthBindings } from './helpers/generateSrvAuthBindings'
4
- export {}
5
-
6
- declare global {
7
- interface Window {
8
- __ENV?: Record<string, string>
9
- __ENV_MICRO: {
10
- [key: string]: Record<string, string>
11
- }
12
- __MICROAPP_REGISTRY?: {
13
- name: string
14
- entry: string
15
- container: string
16
- loader: (loading: boolean) => void
17
- activeRule: string
18
- }[]
19
- __ASMA__SHELL__?: {
20
- history?: History
21
- auth_bindings?: unknown //IGenerateSRVAuthBindings
22
- isLogged?: () => boolean
23
- logoutUser?: () => void
24
- }
25
-
26
- _env_cloud?: Record<'adopus' | 'adcuris', Record<string, string>>
27
- _srvUrls?: Record<string, string>
28
- /**
29
- * @deprecated
30
- * DONT'T USE THIS FIELD ANYMORE
31
- * WILL BE REMOVED AT NEXT MAJOR RELEASE
32
- */
33
- isLogged: boolean
34
- /**
35
- * @warning
36
- * In MicroApps use window.__ASMA__SHELL__.logoutUser
37
- */
38
- logoutUser: () => void
39
- wsConnection: any
40
- }
41
- }
42
-
43
- export const history = window.__ASMA__SHELL__?.history || createBrowserHistory()
44
-
45
- export { History, createBrowserHistory }
1
+ import { type History, createBrowserHistory } from 'history'
2
+ //import type { IGenerateSRVAuthBindings } from './helpers/generateSrvAuthBindings'
3
+ //import type { IGenerateSRVAuthBindings } from './helpers/generateSrvAuthBindings'
4
+ export {}
5
+
6
+ declare global {
7
+ interface Window {
8
+ __ENV?: Record<string, string>
9
+ __ENV_MICRO: {
10
+ [key: string]: Record<string, string>
11
+ }
12
+ __MICROAPP_REGISTRY?: {
13
+ name: string
14
+ entry: string
15
+ container: string
16
+ loader: (loading: boolean) => void
17
+ activeRule: string
18
+ }[]
19
+ __ASMA__SHELL__?: {
20
+ history?: History
21
+ auth_bindings?: unknown //IGenerateSRVAuthBindings
22
+ isLogged?: () => boolean
23
+ logoutUser?: () => void
24
+ }
25
+
26
+ _env_cloud?: Record<'adopus' | 'adcuris', Record<string, string>>
27
+ _srvUrls?: Record<string, string>
28
+ /**
29
+ * @deprecated
30
+ * DONT'T USE THIS FIELD ANYMORE
31
+ * WILL BE REMOVED AT NEXT MAJOR RELEASE
32
+ */
33
+ isLogged: boolean
34
+ /**
35
+ * @warning
36
+ * In MicroApps use window.__ASMA__SHELL__.logoutUser
37
+ */
38
+ logoutUser: () => void
39
+ wsConnection: any
40
+ }
41
+ }
42
+
43
+ export const history = window.__ASMA__SHELL__?.history || createBrowserHistory()
44
+
45
+ export { History, createBrowserHistory }