@eka-care/abha-stg 0.1.40 → 0.1.42

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.
package/README.md CHANGED
@@ -1,8 +1,3 @@
1
- ---
2
- title: ABHA SDK
3
- description: "Complete implementation guide for the ABHA[Ayushman Bharat Digital Mission] SDK"
4
- ---
5
-
6
1
  # ABHA SDK Implementation
7
2
 
8
3
  This guide provides everything you need to integrate the ABHA SDK into your application.
@@ -36,7 +31,7 @@ Add the following HTML and script tags to your webpage:
36
31
  <!-- Include ABHA SDK CSS -->
37
32
  <link
38
33
  rel="stylesheet"
39
- href="https://unpkg.com/@eka-care/abha-stg/dist/sdk/abha/css/abha.css"
34
+ href="https://unpkg.com/@eka-care/abha/dist/sdk/abha/css/abha.css"
40
35
  />
41
36
  </head>
42
37
  <body>
@@ -52,7 +47,7 @@ Add the following HTML and script tags to your webpage:
52
47
  <script
53
48
  type="module"
54
49
  async
55
- src="https://unpkg.com/@eka-care/abha-stg/dist/sdk/abha/js/abha.js"
50
+ src="https://unpkg.com/@eka-care/abha/dist/sdk/abha/js/abha.js"
56
51
  ></script>
57
52
 
58
53
  <script>
@@ -64,6 +59,8 @@ Add the following HTML and script tags to your webpage:
64
59
  data: {
65
60
  accessToken: "<your_access_token>", // Pass the access token you have
66
61
  oid: "<your_oid_if_available>", // Pass if you have the OID
62
+ orgIcon: "<link_of_your_org_icon>", // Pass the cdn url to your organisation icon
63
+ linkToOrgIcon: "<link_of_icon_to_link_abha_to_your_org>", // Pass the cdn url of an icon which depicts linking abha to your organisation
67
64
  },
68
65
 
69
66
  // Success callback
@@ -100,7 +97,7 @@ Initializes and renders the ABHA SDK in your specified container.
100
97
  | Name | Type | Required | Description |
101
98
  | ------------- | --------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
102
99
  | `containerId` | `string` | ✅ | The HTML element ID where the SDK will mount. |
103
- | `data` | `{ accessToken: string; oid?: string }` | ⚙️ Optional | Configuration data for secure API integration. <br/>- `accessToken`: Pass the access token you have. <br/>- `oid`: Pass if available. |
100
+ | `data` | `{ accessToken: string; oid?: string; orgIcon?: string; linkToOrgIcon?: string }` | ⚙️ Optional | Configuration data for initializing the ABHA flow. <br/>- accessToken: Pass the access token you have. <br/>- oid: Pass if available. <br/>- orgIcon: CDN URL of your organisation's icon to display inside the SDK. <br/>- linkToOrgIcon: CDN URL of the icon representing “Link ABHA to your organisation”. |
104
101
  | `onSuccess` | `(params: AbhaSuccessParams) => void` | ✅ | Triggered when the user successfully creates or logs in to ABHA. |
105
102
  | `onError` | `(params: AbhaErrorParams) => void` | ✅ | Triggered when an error occurs during the ABHA flow. |
106
103
 
@@ -112,6 +109,8 @@ window.initAbhaApp({
112
109
  data: {
113
110
  accessToken: "your_access_token_here",
114
111
  oid: "optional_oid_here",
112
+ orgIcon: "link_of_your_org_icon",
113
+ linkToOrgIcon: "link_of_icon_to_link_abha_to_your_org",
115
114
  },
116
115
  onSuccess: (params) => {
117
116
  console.log("ABHA created successfully!", params);
@@ -276,7 +275,7 @@ Ensure your container has sufficient space:
276
275
  <title>ABHA SDK Complete Example</title>
277
276
  <link
278
277
  rel="stylesheet"
279
- href="https://unpkg.com/@eka-care/abha-stg/dist/sdk/abha/css/abha.css"
278
+ href="https://unpkg.com/@eka-care/abha/dist/sdk/abha/css/abha.css"
280
279
  />
281
280
  </head>
282
281
  <body>
@@ -292,7 +291,7 @@ Ensure your container has sufficient space:
292
291
  <script
293
292
  type="module"
294
293
  async
295
- src="https://unpkg.com/@eka-care/abha-stg/dist/sdk/abha/js/abha.js"
294
+ src="https://unpkg.com/@eka-care/abha/dist/sdk/abha/js/abha.js"
296
295
  ></script>
297
296
 
298
297
  <script>
@@ -302,6 +301,8 @@ Ensure your container has sufficient space:
302
301
  data: {
303
302
  accessToken: "<your_access_token>",
304
303
  oid: "<your_oid_if_available>",
304
+ orgIcon: "<link_of_your_org_icon>",
305
+ linkToOrgIcon: "<link_of_icon_to_link_abha_to_your_org>",
305
306
  },
306
307
  onSuccess: (params) => {
307
308
  console.log("ABHA flow completed successfully:", params);
@@ -324,6 +325,8 @@ interface InitAbhaAppParams {
324
325
  data?: {
325
326
  accessToken: string;
326
327
  oid?: string;
328
+ orgIcon?: string;
329
+ linkToOrgIcon?: string;
327
330
  };
328
331
  onSuccess: (params: AbhaSuccessParams) => void;
329
332
  onError: (params: AbhaErrorParams) => void;