@adobe/acc-js-sdk 1.1.25 → 1.1.27

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.
@@ -2,6 +2,29 @@
2
2
  layout: page
3
3
  title: Change Log
4
4
  ---
5
+
6
+ <section class="changelog"><h1>Version 1.1.27</h1>
7
+ <h2>2023/05/10</h2>
8
+ <li>
9
+ Fixed a unit test which was failing in Node 16 but succeeding on node 14. The reason is that the error message thrown by Node when accessing a property of a null object changed between the 2 versions.
10
+ </li>
11
+ <li>
12
+ The `client.getSchema` and `application.getSchema` functions are now able to return group schemas
13
+ (using the temp:group:{id} format for the schema id). See <a href="https://opensource.adobe.com/acc-js-sdk/xtkSchema.html"></a> for more information.
14
+ </li>
15
+ </section>
16
+
17
+ <section class="changelog"><h1>Version 1.1.26</h1>
18
+ <h2>2023/04/17</h2>
19
+
20
+ <li>
21
+ Added support for IMS Bearer tokens without require any session and security tokens. See <a href="https://opensource.adobe.com/acc-js-sdk/connecting.html"> for more details.</a>
22
+ </li>
23
+ <li>
24
+ Fixed a bug causing incorrect JSON to XML transformation when the JSON object has a property named 'length'
25
+ </li>
26
+ </section>
27
+
5
28
  <section class="changelog"><h1>Version 1.1.25</h1>
6
29
  <h2>2023/03/07</h2>
7
30
 
@@ -15,7 +38,7 @@ title: Change Log
15
38
  </section>
16
39
 
17
40
  <section class="changelog"><h1>Version 1.1.24</h1>
18
- <h2>2023/03/07</h2>
41
+ <h2>2023/04/07</h2>
19
42
 
20
43
  <li>
21
44
  Added support for abortable requests. See <a href="https://opensource.adobe.com/acc-js-sdk/abortRequest.html"> for more details.</a>
@@ -51,19 +51,58 @@ await client.logoff();
51
51
  <li>Informations about the connected user, and it's privileges</li>
52
52
  </ul>
53
53
 
54
- <p>T
55
- he most convenient way to access this information is by using the <a href="{{ site.baseurl }}/application.html">Application object</a>, but you can
54
+ <p>The most convenient way to access this information is by using the <a href="{{ site.baseurl }}/application.html">Application object</a>, but you can
56
55
  also use the <b>client.getSessionInfo().serverInfo</b> and <b>client.getSessionInfo().sessionInfo</b> calls.
57
56
  </p>
58
57
 
58
+ <p class="info">Note: depending on the type of credentials used, user and server info may not be returned.
59
+ </p>
59
60
 
61
+ <table>
62
+ <thead>
63
+ <tr>
64
+ <th>Credentials Type</th>
65
+ <th>Returns info</th>
66
+ </tr>
67
+ </thead>
68
+ <tbody>
69
+ <tr>
70
+ <td>UserPassword</td>
71
+ <td>Yes</td>
72
+ </tr>
73
+ <tr>
74
+ <td>ImsServiceToken</td>
75
+ <td>Yes</td>
76
+ </tr>
77
+ <tr>
78
+ <td>SessionToken</td>
79
+ <td>No</td>
80
+ </tr>
81
+ <tr>
82
+ <td>AnonymousUser</td>
83
+ <td>No</td>
84
+ </tr>
85
+ <tr>
86
+ <td>SecurityToken</td>
87
+ <td>Yes</td>
88
+ </tr>
89
+ <tr>
90
+ <td>BearerToken</td>
91
+ <td>Yes</td>
92
+ </tr>
93
+ <tr>
94
+ <td>ImsBearerToken</td>
95
+ <td>No</td>
96
+ </tr>
97
+ </tbody>
98
+ </table>
60
99
 
61
100
  <h1>Credentials</h1>
62
101
 
63
102
  <p>
64
103
  There are several methods of the <b>sdk.ConnectionParameters</b> depending on the type of authentication you want to use. They are
65
104
  described below.
66
- </p>>
105
+ </p>
67
106
 
68
107
  <h2>Login with user and password</h2>
69
108
  <p>This is the most common method to log in to Campaign. User the <b>ofUserAndPassword</b> function and pass it the user name and password</p>
@@ -75,7 +114,26 @@ const connectionParameters = sdk.ConnectionParameters.ofUserAndPassword(
75
114
 
76
115
 
77
116
  <h2>Login with IMS access token</h2>
78
- <p>The SDK supports IMS access token of an IMS user with the <b>ofBearerToken</b> function. Pass it a bearer token.</p>
117
+
118
+ <p>In Campaign 8.5 and above, native support for IMS bearer tokens is avaiable and can be used in the SDK as the preferred connection method.</p>
119
+ <pre class="code">
120
+ const connectionParameters = sdk.ConnectionParameters.ofImsBearerToken(
121
+ "https://myInstance.campaign.adobe.com",
122
+ "ims_bearer_token");
123
+ </pre>
124
+
125
+
126
+ <p class="info">Note: You still need to call Logon
127
+ </p>
128
+
129
+ <p>With this authentication method, an IMS Bearer token is obtained outside of Campaign, for example using IMS APIs and is passed directly to
130
+ all Campaign APIs. Campaigns itslef will verify the token and grant the corresponding access.
131
+ </p>
132
+
133
+
134
+ <p>For older versions of Campaign, you can still use IMS tokens with the <b>ofBearerToken</b> function. The difference between ofImsBearerToken and ofBearerToken
135
+ is that ofBearerToken will internally call "xtk:session#BearerTokenLogon" to exchange the IMS token for Campaign session and security tokens. Subsequent
136
+ API calls will use Campaign tokens. It's recommended to us <b>ofImsBearerToken</b> logon whenever possible.</p>
79
137
  <pre class="code">
80
138
  const connectionParameters = sdk.ConnectionParameters.ofBearerToken(
81
139
  "https://myInstance.campaign.adobe.com",
package/docs/samples.html CHANGED
@@ -3,7 +3,7 @@ layout: page
3
3
  title: Sample Code
4
4
  ---
5
5
 
6
- <p>The <b>samples</b> folder contains several samples illustrating how to use the various Campaing APIs.</p>
6
+ <p>The <b>samples</b> folder contains several samples illustrating how to use the various Campaign APIs.</p>
7
7
 
8
8
  <p>A sample file looks like this</p>
9
9
 
@@ -36,4 +36,20 @@ var srcSchema = await NLWS.xtkPersist.getEntityIfMoreRecent("xtk:srcSchema|nms:r
36
36
  console.log(JSON.stringify(srcSchema));
37
37
  </pre>
38
38
 
39
-
39
+ <h1>Group schemas</h1>
40
+
41
+ <p>
42
+ Campaign groups represent marketing lists or audiences. Each group can have it's own specific schema,
43
+ stored in the `extension` XML element of the group entity. This schema can be generated in a workflow by
44
+ using the List Update activity.
45
+ </p>
46
+ <p>
47
+ The schema of a group can be retrieved using the `getSchema` method of the client or application objects.
48
+ </p>
49
+ <p>
50
+ The schema id is build as followed: prefix `temp:group:` + id of the group in mms:group (example `temp:group:1234` )
51
+ </p>
52
+
53
+ <p>Note: group schemas are not cached. The rationale is that they are not accessed as frequently as other,
54
+ regular schemas, but more importantly that they can change more often that regular schemas.
55
+ </p>