@b-jones-rfd/qualtrics-api-tasks 0.3.0 → 0.3.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @b-jones-rfd/qualtrics-api-tasks
2
2
 
3
+ ## 0.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ec58f5e: Added distribute surveys method to documentation
8
+
9
+ ## 0.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - bb766b5: Cleaned up README
14
+
3
15
  ## 0.3.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -1,6 +1,9 @@
1
+ ![GitHub Actions CI](https://github.com/B-Jones-RFD/qualtrics-api-tasks/actions/workflows/main.yml/badge.svg)
2
+ [![npm version](https://img.shields.io/npm/v/@b-jones-rfd/qualtrics-api-tasks.svg?style=flat-square)](https://www.npmjs.com/package/@b-jones-rfd/qualtrics-api-tasks)
3
+ [![npm bundle size](https://img.shields.io/bundlephobia/min/%40b-jones-rfd%2Fqualtrics-api-tasks)](https://bundlephobia.com/package/@b-jones-rfd/qualtrics-api-tasks)
1
4
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
2
5
 
3
- # qualtrics-api-tasks
6
+ # Qualtrics API Tasks
4
7
 
5
8
  Helpers to perform common tasks using the [Qualtrics API](https://api.qualtrics.com/). This is an exercise to avoid code reuse in my own projects. Use at your own risk.
6
9
 
@@ -17,7 +20,7 @@ $ npm -v && node -v
17
20
  v20.11.1
18
21
  ```
19
22
 
20
- [PNPM] (https://pnpm.io/) is a awesome alternative to NPM and is recommended.
23
+ [PNPM](https://pnpm.io/) is a awesome alternative to NPM and is recommended.
21
24
 
22
25
  ## Table of contents
23
26
 
@@ -30,6 +33,13 @@ v20.11.1
30
33
  - [API](#api)
31
34
  - [createConnection](#createSiteConnection)
32
35
  - [Actions](#actions)
36
+ - [Authentication](#authentication)
37
+ - [Contacts](#contacts)
38
+ - [Distributions](#distributions)
39
+ - [Responses](#responses)
40
+ - [Mailing Lists](#mailing-lists)
41
+ - [Messages](#messages)
42
+ - [Utilities](#utilities)
33
43
  - [Responses](#responses)
34
44
  - [Contributing](#contributing)
35
45
  - [Versioning](#versioning)
@@ -79,12 +89,12 @@ const connectionOptions = {
79
89
  timeout: 20 * 1000, // optional timeout in milliseconds, default is 30 seconds
80
90
  }
81
91
 
82
- const connection: SiteConnection = createConnection(connectionOptions)
92
+ const connection: Connection = createConnection(connectionOptions)
83
93
 
84
94
  async function getBearerToken(clientId: string, clientSecret: string) {
85
- const contents = await connection.getBearerToken({ clientId, clientSecret })
86
- if (contents.success) return contents.data
87
- else throw new Error(contents.error)
95
+ const result = await connection.getBearerToken({ clientId, clientSecret })
96
+ if (result.success) return result.data
97
+ else throw new Error(result.error)
88
98
  }
89
99
  ```
90
100
 
@@ -95,20 +105,34 @@ Additionally, for single use or reduced import size, action factory methods can
95
105
  ```ts
96
106
  import { testConnection } from '@b-jones-rfd/qualtrics-api-tasks'
97
107
 
98
- async function testMyQualtricsConnection(listName: string) {
99
- const action = testConnection(connectionOpts)
100
- const contents = await action()
101
- if (contents.success) return 'Successful connection!'
102
- else throw new Error(contents.error)
108
+ async function testMyQualtricsConnection() {
109
+ const action = testConnection(connectionOptions)
110
+ const result = await action()
111
+ if (result.success) return result.data
112
+ else throw new Error(result.error)
103
113
  }
104
114
  ```
105
115
 
106
116
  ## API
107
117
 
108
- ### createSiteConnection
118
+ ### createConnection
119
+
120
+ Create a Qualtrics API Connection instance.
121
+
122
+ ```ts
123
+ type ConnectionFactory = (options: ConnectionOptions) => Connection
124
+ ```
109
125
 
110
126
  #### ConnectionOptions
111
127
 
128
+ ```ts
129
+ type ConnectionOptions = {
130
+ datacenterId: string
131
+ apiToken?: string
132
+ timeout?: number
133
+ }
134
+ ```
135
+
112
136
  `datacenterId`
113
137
 
114
138
  | Type | Description | Example | Required |
@@ -139,7 +163,83 @@ export type Action<TConfig, TResponse> = (
139
163
 
140
164
  If using the actions directly call the factory method with a ConnectionOptions object to return an action that can be used to execute a Qualtrics action.
141
165
 
142
- #### createDistribution(options)
166
+ #### Authentication
167
+
168
+ ##### getBearerToken(options)
169
+
170
+ Implements [OAuth Authentication (Client Credentials)](https://api.qualtrics.com/9398592961ced-o-auth-authentication-client-credentials) and returns the access token as the result data.
171
+
172
+ `options`
173
+
174
+ | Property | Type | Description | Required |
175
+ | ------------ | ------ | --------------------------------- | -------- |
176
+ | clientId | string | Quatrics Client ID | Y |
177
+ | clientSecret | string | Qualtrics Client Password | Y |
178
+ | scope | string | Qualtrics Client requested scopes | Y |
179
+
180
+ #### Contacts
181
+
182
+ ##### getContactsImportStatus(options)
183
+
184
+ Implements [Get Contacts Import Status](https://api.qualtrics.com/c5d22705b1d45-get-transaction-contacts-import-status)
185
+
186
+ `options`
187
+
188
+ | Property | Type | Description | Required |
189
+ | ------------- | ------ | --------------------- | -------- |
190
+ | directoryId | string | Quatrics Directory ID | Y |
191
+ | importId | string | Contacts Import ID | Y |
192
+ | mailingListId | string | Mailing List ID | Y |
193
+ | bearerToken | string | Valid Bearer Token | N |
194
+
195
+ ##### getContactsImportSummary(options)
196
+
197
+ Implements [Get Contacts Import Summary](https://api.qualtrics.com/6f0480b307053-get-transaction-contacts-import-summary)
198
+
199
+ `options`
200
+
201
+ | Property | Type | Description | Required |
202
+ | ------------- | ------ | --------------------- | -------- |
203
+ | directoryId | string | Quatrics Directory ID | Y |
204
+ | importId | string | Contacts Import ID | Y |
205
+ | mailingListId | string | Mailing List ID | Y |
206
+ | bearerToken | string | Valid Bearer Token | N |
207
+
208
+ ##### importContacts(options)
209
+
210
+ Implements [Contact Import](https://api.qualtrics.com/1ac99fba8ca5b-contact-imports) multistep process. This runs the following actions:
211
+
212
+ 1. [Start Contacts Import](#startcontactsimportoptions)
213
+ 2. Polls [Get Contacts Import Status](#getcontactsimportstatusoptions)
214
+ 3. [Get Contacts Import Summary](#getcontactsimportsummaryoptions)
215
+
216
+ `options`
217
+
218
+ | Property | Type | Description | Required |
219
+ | --------------- | --------- | --------------------- | -------- |
220
+ | directoryId | string | Quatrics Directory ID | Y |
221
+ | mailingListId | string | Mailing List ID | Y |
222
+ | contacts | Contact[] | Contacts array | Y |
223
+ | transactionMeta | object | Transaction meta data | N |
224
+ | bearerToken | string | Valid Bearer Token | N |
225
+
226
+ ##### startContactsImport(options)
227
+
228
+ Implements [Create Transaction Contacts Import](https://api.qualtrics.com/bab13356ac724-create-transaction-contacts-import)
229
+
230
+ `options`
231
+
232
+ | Property | Type | Description | Required |
233
+ | --------------- | --------- | --------------------- | -------- |
234
+ | directoryId | string | Quatrics Directory ID | Y |
235
+ | mailingListId | string | Mailing List ID | Y |
236
+ | contacts | Contact[] | Contacts array | Y |
237
+ | transactionMeta | object | Transaction meta data | N |
238
+ | bearerToken | string | Valid Bearer Token | N |
239
+
240
+ #### Distributions
241
+
242
+ ##### createDistribution(options)
143
243
 
144
244
  Implements [Create Distribution](https://api.qualtrics.com/573e3f0a94888-create-distribution).
145
245
 
@@ -164,42 +264,102 @@ Implements [Create Distribution](https://api.qualtrics.com/573e3f0a94888-create-
164
264
  | sendDate | Date | Date time to send | Y | |
165
265
  | bearerToken | string | Valid Bearer Token | N | |
166
266
 
167
- #### createMailingList(options)
267
+ ##### createReminder(options)
168
268
 
169
- Implements [Create Mailing List](https://api.qualtrics.com/3f633e4cea6cd-create-mailing-list)
269
+ Implements [Create Reminder Distribution](https://api.qualtrics.com/764630bb0633a-create-reminder-distribution).
170
270
 
171
271
  `options`
172
272
 
173
- | Property | Type | Description | Required | Default |
174
- | ---------------------- | ------- | -------------------------------- | -------- | ------- |
175
- | directoryId | string | Quatrics Directory ID | Y | |
176
- | name | string | Mailing List Name | Y | |
177
- | ownerId | string | Owner ID | Y | |
178
- | prioritizeListMetadata | boolean | Import metadata as list metadata | N | false |
179
- | bearerToken | string | Valid Bearer Token | N | |
273
+ | Property | Type | Description | Required |
274
+ | -------------- | ---------------------- | ------------------------ | -------- |
275
+ | distributionId | string | Previous Distribution ID | Y |
276
+ | libraryId | string | Quatrics Library ID | Y |
277
+ | fromEmail | string | Originating email | Y |
278
+ | messageId | string | Qualtrics Message ID | Y |
279
+ | replyToEmail | string | Email reply-to address | N |
280
+ | fromName | string | Email from name | Y |
281
+ | subject | string | Email subject | Y |
282
+ | embeddedData | Record<string, string> | Up to 10 subkeys | N |
283
+ | sendDate | Date | Date time to send | Y |
284
+ | bearerToken | string | Valid Bearer Token | N |
180
285
 
181
- #### createReminder(options)
286
+ ##### distributeSurveys(options)
182
287
 
183
- Implements [Create Reminder Distribution](https://api.qualtrics.com/764630bb0633a-create-reminder-distribution).
288
+ Multistep process to execute a survey distribution. Runs the following actions:
289
+
290
+ 1. [Create Mailing List](#createmailinglistoptions)
291
+ 2. [Import Contacts](#importcontactsoptions)
292
+ 3. [Create Distribution](#createdistributionoptions)
293
+ 4. [Create Reminder](#createreminderoptions)
184
294
 
185
295
  `options`
186
296
 
187
- | Property | Type | Description | Required | Default |
188
- | -------------- | ---------------------- | ------------------------ | -------- | ------- |
189
- | distributionId | string | Previous Distribution ID | Y | |
190
- | libraryId | string | Quatrics Library ID | Y | |
191
- | messageId | string | Qualtrics Message ID | Y | |
192
- | fromEmail | string | Originating email | Y | |
193
- | replyToEmail | string | Email reply-to address | N | |
194
- | fromName | string | Email from name | Y | |
195
- | subject | string | Email subject | Y | |
196
- | embeddedData | Record<string, string> | Up to 10 subkeys | N | |
197
- | sendDate | Date | Date time to send | Y | |
198
- | bearerToken | string | Valid Bearer Token | N | |
297
+ | Property | Type | Description | Required | Default |
298
+ | ----------------------- | ---------------------- | ---------------------------------- | -------- | ------- |
299
+ | directoryId | string | Quatrics Directory ID | Y | |
300
+ | mailingListName | string | Mailing List Name | Y | |
301
+ | ownerId | string | Owner ID | Y | |
302
+ | prioritizeListMetadata | boolean | Import metadata as list metadata | N | false |
303
+ | contacts | Contact[] | Contacts array | Y | |
304
+ | transactionMeta | object | Transaction meta data | N | |
305
+ | libraryId | string | Quatrics Library ID | Y | |
306
+ | distributionMessageId | string | Distribution Message ID | Y | |
307
+ | distributionMessageText | string | Message text to send | N | |
308
+ | reminderMessageId | string | Reminder Message ID | Y | |
309
+ | reminderMessageText | string | Reminder message text to send | N | |
310
+ | transactionBatchId | string | Transaction Batch ID | N | |
311
+ | fromEmail | string | Originating email | Y | |
312
+ | replyToEmail | string | Email reply-to address | N | |
313
+ | fromName | string | Email from name | Y | |
314
+ | distributionSubject | string | Distribution email subject | Y | |
315
+ | reminderSubject | string | Reminder email subject | Y | |
316
+ | surveyId | string | Qualtrics Survey ID | Y | |
317
+ | expirationDate | Date | Distribution expiration date time | Y | |
318
+ | type | enum | Individual, Multiple, or Anonymous | Y | |
319
+ | embeddedData | Record<string, string> | Up to 10 subkeys | N | |
320
+ | distributionSendDate | Date | Date time to send distribution | Y | |
321
+ | reminderSendDate | Date | Date time to send reminder | Y | |
322
+ | bearerToken | string | Valid Bearer Token | N | |
323
+
324
+ ##### getDistribution(options)
325
+
326
+ Implements [Get Distribution](https://api.qualtrics.com/f5b1d8775d803-get-distribution)
327
+
328
+ `options`
329
+
330
+ | Property | Type | Description | Required |
331
+ | -------------- | ------ | ------------------ | -------- |
332
+ | distributionId | string | Distribution ID | Y |
333
+ | surveyId | string | Survey ID | Y |
334
+ | bearerToken | string | Valid Bearer Token | N |
335
+
336
+ ##### listDistributions(options)
337
+
338
+ Implements [List Distributions](https://api.qualtrics.com/234bb6b16cf6d-list-distributions)
339
+
340
+ `options`
341
+
342
+ | Property | Type | Description | Required | Default |
343
+ | ----------------------- | ------- | ------------------------------- | -------- | ------- |
344
+ | surveyId | string | Quatrics Survey ID | Y | |
345
+ | distributionRequestType | string | Distribution Request Type | Y | |
346
+ | mailingListId | string | Mailing List ID | Y | |
347
+ | sendStartDate | Date | Export start date and time | Y | |
348
+ | sendEndDate | Date | Export end date and time | Y | |
349
+ | skipToken | string | Pagination offset | N | |
350
+ | useNewPaginationScheme | boolean | Use updated pagination | N | false |
351
+ | pageSize | number | Distribution elements to return | N | 100 |
352
+ | bearerToken | string | Valid Bearer Token | N | |
353
+
354
+ #### Responses
355
+
356
+ ##### exportResponses(options)
199
357
 
200
- #### exportResponses(options)
358
+ Implements [Survey Response File Export](https://api.qualtrics.com/u9e5lh4172v0v-survey-response-export-guide) multistep process. Runs the following actions:
201
359
 
202
- Implements [Survey Response File Export](https://api.qualtrics.com/u9e5lh4172v0v-survey-response-export-guide) multistep process.
360
+ 1. [Start Response Export](#startresponseexportsoptions)
361
+ 2. Polls [Get Response Export Progress](#getresponseexportprogressoptions)
362
+ 3. [Get Response Export File](#getresponseexportfileoptions)
203
363
 
204
364
  `options`
205
365
 
@@ -230,57 +390,7 @@ Implements [Survey Response File Export](https://api.qualtrics.com/u9e5lh4172v0v
230
390
  | sortByLastModifiedDate | boolean | Sort responses by modified date | N | false |
231
391
  | bearerToken | string | Valid Bearer Token | N | |
232
392
 
233
- #### getBearerToken(options)
234
-
235
- Implements [OAuth Authentication (Client Credentials)](https://api.qualtrics.com/9398592961ced-o-auth-authentication-client-credentials)
236
-
237
- `options`
238
-
239
- | Property | Type | Description | Required |
240
- | ------------ | ------ | --------------------------------- | -------- |
241
- | clientId | string | Quatrics Client ID | Y |
242
- | clientSecret | string | Qualtrics Client Password | Y |
243
- | scope | string | Qualtrics Client requested scopes | Y |
244
-
245
- #### getContactsImportStatus(options)
246
-
247
- Implements [Get Contacts Import Status](https://api.qualtrics.com/c5d22705b1d45-get-transaction-contacts-import-status)
248
-
249
- `options`
250
-
251
- | Property | Type | Description | Required |
252
- | ------------- | ------ | --------------------- | -------- |
253
- | directoryId | string | Quatrics Directory ID | Y |
254
- | importId | string | Contacts Import ID | Y |
255
- | mailingListId | string | Mailing List ID | Y |
256
- | bearerToken | string | Valid Bearer Token | N |
257
-
258
- #### getContactsImportSummary(options)
259
-
260
- Implements [Get Contacts Import Summary](https://api.qualtrics.com/6f0480b307053-get-transaction-contacts-import-summary)
261
-
262
- `options`
263
-
264
- | Property | Type | Description | Required |
265
- | ------------- | ------ | --------------------- | -------- |
266
- | directoryId | string | Quatrics Directory ID | Y |
267
- | importId | string | Contacts Import ID | Y |
268
- | mailingListId | string | Mailing List ID | Y |
269
- | bearerToken | string | Valid Bearer Token | N |
270
-
271
- #### getDistribution(options)
272
-
273
- Implements [Get Distribution](https://api.qualtrics.com/f5b1d8775d803-get-distribution)
274
-
275
- `options`
276
-
277
- | Property | Type | Description | Required |
278
- | -------------- | ------ | ------------------ | -------- |
279
- | distributionId | string | Distribution ID | Y |
280
- | surveyId | string | Survey ID | Y |
281
- | bearerToken | string | Valid Bearer Token | N |
282
-
283
- #### getResponseExportFile(options)
393
+ ##### getResponseExportFile(options)
284
394
 
285
395
  Implements [Get Response Export File](https://api.qualtrics.com/41296b6f2e828-get-response-export-file)
286
396
 
@@ -292,7 +402,7 @@ Implements [Get Response Export File](https://api.qualtrics.com/41296b6f2e828-ge
292
402
  | fileId | string | File ID | Y |
293
403
  | bearerToken | string | Valid Bearer Token | N |
294
404
 
295
- #### getResponseExportProgress(options)
405
+ ##### getResponseExportProgress(options)
296
406
 
297
407
  Implements [Get Response Export Progress](https://api.qualtrics.com/37e6a66f74ab4-get-response-export-progress)
298
408
 
@@ -304,39 +414,25 @@ Implements [Get Response Export Progress](https://api.qualtrics.com/37e6a66f74ab
304
414
  | exportProgressId | string | Progress ID | Y |
305
415
  | bearerToken | string | Valid Bearer Token | N |
306
416
 
307
- #### importContacts(options)
417
+ #### Mailing Lists
308
418
 
309
- Implements [Contact Import](https://api.qualtrics.com/1ac99fba8ca5b-contact-imports) multistep process
419
+ ##### createMailingList(options)
310
420
 
311
- `options`
312
-
313
- | Property | Type | Description | Required |
314
- | --------------- | --------- | --------------------- | -------- |
315
- | directoryId | string | Quatrics Directory ID | Y |
316
- | mailingListId | string | Mailing List ID | Y |
317
- | contacts | Contact[] | Contacts array | Y |
318
- | transactionMeta | object | Transaction meta data | N |
319
- | bearerToken | string | Valid Bearer Token | N |
320
-
321
- #### listDistributions(options)
322
-
323
- Implements [List Distributions](https://api.qualtrics.com/234bb6b16cf6d-list-distributions)
421
+ Implements [Create Mailing List](https://api.qualtrics.com/3f633e4cea6cd-create-mailing-list)
324
422
 
325
423
  `options`
326
424
 
327
- | Property | Type | Description | Required | Default |
328
- | ----------------------- | ------- | ------------------------------- | -------- | ------- |
329
- | surveyId | string | Quatrics Survey ID | Y | |
330
- | distributionRequestType | string | Distribution Request Type | Y | |
331
- | mailingListId | string | Mailing List ID | Y | |
332
- | sendStartDate | Date | Export start date and time | Y | |
333
- | sendEndDate | Date | Export end date and time | Y | |
334
- | skipToken | string | Pagination offset | N | |
335
- | useNewPaginationScheme | boolean | Use updated pagination | N | false |
336
- | pageSize | number | Distribution elements to return | N | 100 |
337
- | bearerToken | string | Valid Bearer Token | N | |
425
+ | Property | Type | Description | Required | Default |
426
+ | ---------------------- | ------- | -------------------------------- | -------- | ------- |
427
+ | directoryId | string | Quatrics Directory ID | Y | |
428
+ | name | string | Mailing List Name | Y | |
429
+ | ownerId | string | Owner ID | Y | |
430
+ | prioritizeListMetadata | boolean | Import metadata as list metadata | N | false |
431
+ | bearerToken | string | Valid Bearer Token | N | |
338
432
 
339
- #### listLibraryMessages(options)
433
+ #### Messages
434
+
435
+ ##### listLibraryMessages(options)
340
436
 
341
437
  Implements [List Library Messages](https://api.qualtrics.com/1d60a66b340fa-list-library-messages)
342
438
 
@@ -349,21 +445,7 @@ Implements [List Library Messages](https://api.qualtrics.com/1d60a66b340fa-list-
349
445
  | offset | number | Pagination offset | N |
350
446
  | bearerToken | string | Valid Bearer Token | N |
351
447
 
352
- #### startContactsImport(options)
353
-
354
- Implements [Create Transaction Contacts Import](https://api.qualtrics.com/bab13356ac724-create-transaction-contacts-import)
355
-
356
- `options`
357
-
358
- | Property | Type | Description | Required |
359
- | --------------- | --------- | --------------------- | -------- |
360
- | directoryId | string | Quatrics Directory ID | Y |
361
- | mailingListId | string | Mailing List ID | Y |
362
- | contacts | Contact[] | Contacts array | Y |
363
- | transactionMeta | object | Transaction meta data | N |
364
- | bearerToken | string | Valid Bearer Token | N |
365
-
366
- #### startResponseExports(options)
448
+ ##### startResponseExports(options)
367
449
 
368
450
  Implements [Start Response Exports](https://api.qualtrics.com/6b00592b9c013-start-response-export)
369
451
 
@@ -396,7 +478,9 @@ Implements [Start Response Exports](https://api.qualtrics.com/6b00592b9c013-star
396
478
  | sortByLastModifiedDate | boolean | Sort responses by modified date | N | false |
397
479
  | bearerToken | string | Valid Bearer Token | N | |
398
480
 
399
- #### testConnection(bearerToken)
481
+ #### Utilities
482
+
483
+ ##### testConnection(bearerToken)
400
484
 
401
485
  | Parameter | Type | Description | Required |
402
486
  | ----------- | ------ | ------------------ | -------- |
package/dist/index.d.mts CHANGED
@@ -278,16 +278,19 @@ type DistributionOptions = {
278
278
  distributionMessageId: string;
279
279
  distributionMessageText?: string;
280
280
  reminderMessageId: string;
281
+ reminderMessageText?: string;
281
282
  transactionBatchId?: string;
282
283
  fromEmail: string;
283
284
  replyToEmail?: string;
284
285
  fromName: string;
285
- subject: string;
286
+ distributionSubject: string;
287
+ reminderSubject: string;
286
288
  surveyId: string;
287
289
  expirationDate: Date;
288
290
  type: 'Individual' | 'Multiple' | 'Anonymous';
289
291
  embeddedData?: Record<string, string>;
290
- sendDate: Date;
292
+ distributionSendDate: Date;
293
+ reminderSendDate: Date;
291
294
  bearerToken?: string;
292
295
  };
293
296
 
package/dist/index.d.ts CHANGED
@@ -278,16 +278,19 @@ type DistributionOptions = {
278
278
  distributionMessageId: string;
279
279
  distributionMessageText?: string;
280
280
  reminderMessageId: string;
281
+ reminderMessageText?: string;
281
282
  transactionBatchId?: string;
282
283
  fromEmail: string;
283
284
  replyToEmail?: string;
284
285
  fromName: string;
285
- subject: string;
286
+ distributionSubject: string;
287
+ reminderSubject: string;
286
288
  surveyId: string;
287
289
  expirationDate: Date;
288
290
  type: 'Individual' | 'Multiple' | 'Anonymous';
289
291
  embeddedData?: Record<string, string>;
290
- sendDate: Date;
292
+ distributionSendDate: Date;
293
+ reminderSendDate: Date;
291
294
  bearerToken?: string;
292
295
  };
293
296
 
package/dist/index.js CHANGED
@@ -456,12 +456,12 @@ var distributeSurveys = (connectionOptions) => async (options) => {
456
456
  fromEmail: options.fromEmail,
457
457
  fromName: options.fromName,
458
458
  replyToEmail: options.replyToEmail,
459
- subject: options.subject,
459
+ subject: options.distributionSubject,
460
460
  surveyId: options.surveyId,
461
461
  expirationDate: options.expirationDate,
462
462
  type: options.type,
463
463
  embeddedData: options.embeddedData,
464
- sendDate: options.sendDate,
464
+ sendDate: options.distributionSendDate,
465
465
  bearerToken: options.bearerToken
466
466
  });
467
467
  if (!distributionResponse.success)
@@ -474,9 +474,9 @@ var distributeSurveys = (connectionOptions) => async (options) => {
474
474
  fromEmail: options.fromEmail,
475
475
  fromName: options.fromName,
476
476
  replyToEmail: options.replyToEmail,
477
- subject: options.subject,
477
+ subject: options.reminderSubject,
478
478
  embeddedData: options.embeddedData,
479
- sendDate: options.sendDate,
479
+ sendDate: options.reminderSendDate,
480
480
  bearerToken: options.bearerToken
481
481
  });
482
482
  if (!reminderResponse.success)
package/dist/index.mjs CHANGED
@@ -413,12 +413,12 @@ var distributeSurveys = (connectionOptions) => async (options) => {
413
413
  fromEmail: options.fromEmail,
414
414
  fromName: options.fromName,
415
415
  replyToEmail: options.replyToEmail,
416
- subject: options.subject,
416
+ subject: options.distributionSubject,
417
417
  surveyId: options.surveyId,
418
418
  expirationDate: options.expirationDate,
419
419
  type: options.type,
420
420
  embeddedData: options.embeddedData,
421
- sendDate: options.sendDate,
421
+ sendDate: options.distributionSendDate,
422
422
  bearerToken: options.bearerToken
423
423
  });
424
424
  if (!distributionResponse.success)
@@ -431,9 +431,9 @@ var distributeSurveys = (connectionOptions) => async (options) => {
431
431
  fromEmail: options.fromEmail,
432
432
  fromName: options.fromName,
433
433
  replyToEmail: options.replyToEmail,
434
- subject: options.subject,
434
+ subject: options.reminderSubject,
435
435
  embeddedData: options.embeddedData,
436
- sendDate: options.sendDate,
436
+ sendDate: options.reminderSendDate,
437
437
  bearerToken: options.bearerToken
438
438
  });
439
439
  if (!reminderResponse.success)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b-jones-rfd/qualtrics-api-tasks",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Perform common tasks using the Qualtrics API",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",