@wokuapp/sdk 0.5.0 → 0.6.0

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/dist/index.d.cts CHANGED
@@ -4312,34 +4312,6 @@ interface operations {
4312
4312
  };
4313
4313
  };
4314
4314
  };
4315
- V1QuarantinesController_check: {
4316
- parameters: {
4317
- query?: {
4318
- email?: string;
4319
- phone?: string;
4320
- };
4321
- header?: never;
4322
- path?: never;
4323
- cookie?: never;
4324
- };
4325
- requestBody?: never;
4326
- responses: {
4327
- /** @description Quarantine status for the respondent */
4328
- 200: {
4329
- headers: {
4330
- [name: string]: unknown;
4331
- };
4332
- content?: never;
4333
- };
4334
- /** @description email or phone is required */
4335
- 400: {
4336
- headers: {
4337
- [name: string]: unknown;
4338
- };
4339
- content?: never;
4340
- };
4341
- };
4342
- };
4343
4315
  V1InvitationsController_sendNpsInvitations: {
4344
4316
  parameters: {
4345
4317
  query?: never;
@@ -5593,7 +5565,7 @@ interface operations {
5593
5565
  /** @description Upper bound for createdAt (ISO 8601). */
5594
5566
  createdTo?: string;
5595
5567
  /** @description Lifecycle status of the whole invitation. */
5596
- status?: "invited" | "partially_responded" | "responded" | "failed";
5568
+ status?: "invited" | "partially_responded" | "responded" | "failed" | "skipped";
5597
5569
  page?: number;
5598
5570
  limit?: number;
5599
5571
  };
@@ -6640,6 +6612,10 @@ interface operations {
6640
6612
  query?: {
6641
6613
  /** @description Period in days: 7, 30 or 90, or 0 for the whole history. Defaults to 30. */
6642
6614
  days?: 0 | 7 | 30 | 90;
6615
+ /** @description Custom period start (YYYY-MM-DD, UTC day, inclusive). With `to`, replaces `days`. */
6616
+ from?: string;
6617
+ /** @description Custom period end (YYYY-MM-DD, UTC day, inclusive). */
6618
+ to?: string;
6643
6619
  };
6644
6620
  header?: never;
6645
6621
  path: {
@@ -7446,6 +7422,9 @@ interface DailyPoint {
7446
7422
  interface FolderToolMetrics {
7447
7423
  /** Period in days; `0` is the whole history (then every `previous` window is empty). */
7448
7424
  days: number;
7425
+ /** Custom period (`YYYY-MM-DD`, both inclusive) when one was asked for. */
7426
+ from?: string;
7427
+ to?: string;
7449
7428
  tools: ToolMetrics[];
7450
7429
  /** Daily sums of both windows (2 x `days`). */
7451
7430
  daily: DailyPoint[];
@@ -7949,17 +7928,6 @@ declare class Journeys {
7949
7928
  emitEvent(body: JourneyEventInput, opts?: RequestOptions): Promise<Schemas['V1JourneyEventResponseDto']>;
7950
7929
  }
7951
7930
 
7952
- /** Check respondent quarantine status (`/v1/quarantines`). */
7953
- declare class Quarantines {
7954
- private readonly client;
7955
- constructor(client: WokuClient);
7956
- /** Check whether a contact is quarantined. */
7957
- check(params: {
7958
- email?: string;
7959
- phone?: string | number;
7960
- }, opts?: RequestOptions): Promise<WokuRecord>;
7961
- }
7962
-
7963
7931
  /**
7964
7932
  * Folders that organize wokus and NPS, CSAT and CES tools (`/v1/folders`).
7965
7933
  * To list what a folder contains use `woku.tools.list({ folderId })`.
@@ -8004,11 +7972,14 @@ declare class Folders {
8004
7972
  * subfolders for a period against the one before it, with the daily sums and
8005
7973
  * the histogram of scores. `days` is 7, 30 (default) or 90, or 0 for the whole
8006
7974
  * history (every `previous` window is then empty). The period is the last
8007
- * `days` calendar days in UTC, today included. Scales are never mixed across
8008
- * types.
7975
+ * `days` calendar days in UTC, today included. Or a custom range with `from`
7976
+ * and `to` (`YYYY-MM-DD` UTC days, both inclusive, up to 731 days), which
7977
+ * replaces `days`. Scales are never mixed across types.
8009
7978
  */
8010
7979
  metrics(id: string, params?: {
8011
7980
  days?: 0 | 7 | 30 | 90;
7981
+ from?: string;
7982
+ to?: string;
8012
7983
  }, opts?: RequestOptions): Promise<FolderToolMetrics>;
8013
7984
  /** CSV text with one row per response of every tool of the folder subtree. */
8014
7985
  csv(id: string, opts?: RequestOptions): Promise<FolderCsv>;
@@ -8154,7 +8125,6 @@ declare class Woku {
8154
8125
  readonly company: Company;
8155
8126
  /** Customer journeys: moments, their tools and how each one starts. */
8156
8127
  readonly journeys: Journeys;
8157
- readonly quarantines: Quarantines;
8158
8128
  /** Folders that organize wokus and NPS, CSAT and CES tools. */
8159
8129
  readonly folders: Folders;
8160
8130
  /** Unified search, headline figures and batch moves across every tool type. */
package/dist/index.d.ts CHANGED
@@ -4312,34 +4312,6 @@ interface operations {
4312
4312
  };
4313
4313
  };
4314
4314
  };
4315
- V1QuarantinesController_check: {
4316
- parameters: {
4317
- query?: {
4318
- email?: string;
4319
- phone?: string;
4320
- };
4321
- header?: never;
4322
- path?: never;
4323
- cookie?: never;
4324
- };
4325
- requestBody?: never;
4326
- responses: {
4327
- /** @description Quarantine status for the respondent */
4328
- 200: {
4329
- headers: {
4330
- [name: string]: unknown;
4331
- };
4332
- content?: never;
4333
- };
4334
- /** @description email or phone is required */
4335
- 400: {
4336
- headers: {
4337
- [name: string]: unknown;
4338
- };
4339
- content?: never;
4340
- };
4341
- };
4342
- };
4343
4315
  V1InvitationsController_sendNpsInvitations: {
4344
4316
  parameters: {
4345
4317
  query?: never;
@@ -5593,7 +5565,7 @@ interface operations {
5593
5565
  /** @description Upper bound for createdAt (ISO 8601). */
5594
5566
  createdTo?: string;
5595
5567
  /** @description Lifecycle status of the whole invitation. */
5596
- status?: "invited" | "partially_responded" | "responded" | "failed";
5568
+ status?: "invited" | "partially_responded" | "responded" | "failed" | "skipped";
5597
5569
  page?: number;
5598
5570
  limit?: number;
5599
5571
  };
@@ -6640,6 +6612,10 @@ interface operations {
6640
6612
  query?: {
6641
6613
  /** @description Period in days: 7, 30 or 90, or 0 for the whole history. Defaults to 30. */
6642
6614
  days?: 0 | 7 | 30 | 90;
6615
+ /** @description Custom period start (YYYY-MM-DD, UTC day, inclusive). With `to`, replaces `days`. */
6616
+ from?: string;
6617
+ /** @description Custom period end (YYYY-MM-DD, UTC day, inclusive). */
6618
+ to?: string;
6643
6619
  };
6644
6620
  header?: never;
6645
6621
  path: {
@@ -7446,6 +7422,9 @@ interface DailyPoint {
7446
7422
  interface FolderToolMetrics {
7447
7423
  /** Period in days; `0` is the whole history (then every `previous` window is empty). */
7448
7424
  days: number;
7425
+ /** Custom period (`YYYY-MM-DD`, both inclusive) when one was asked for. */
7426
+ from?: string;
7427
+ to?: string;
7449
7428
  tools: ToolMetrics[];
7450
7429
  /** Daily sums of both windows (2 x `days`). */
7451
7430
  daily: DailyPoint[];
@@ -7949,17 +7928,6 @@ declare class Journeys {
7949
7928
  emitEvent(body: JourneyEventInput, opts?: RequestOptions): Promise<Schemas['V1JourneyEventResponseDto']>;
7950
7929
  }
7951
7930
 
7952
- /** Check respondent quarantine status (`/v1/quarantines`). */
7953
- declare class Quarantines {
7954
- private readonly client;
7955
- constructor(client: WokuClient);
7956
- /** Check whether a contact is quarantined. */
7957
- check(params: {
7958
- email?: string;
7959
- phone?: string | number;
7960
- }, opts?: RequestOptions): Promise<WokuRecord>;
7961
- }
7962
-
7963
7931
  /**
7964
7932
  * Folders that organize wokus and NPS, CSAT and CES tools (`/v1/folders`).
7965
7933
  * To list what a folder contains use `woku.tools.list({ folderId })`.
@@ -8004,11 +7972,14 @@ declare class Folders {
8004
7972
  * subfolders for a period against the one before it, with the daily sums and
8005
7973
  * the histogram of scores. `days` is 7, 30 (default) or 90, or 0 for the whole
8006
7974
  * history (every `previous` window is then empty). The period is the last
8007
- * `days` calendar days in UTC, today included. Scales are never mixed across
8008
- * types.
7975
+ * `days` calendar days in UTC, today included. Or a custom range with `from`
7976
+ * and `to` (`YYYY-MM-DD` UTC days, both inclusive, up to 731 days), which
7977
+ * replaces `days`. Scales are never mixed across types.
8009
7978
  */
8010
7979
  metrics(id: string, params?: {
8011
7980
  days?: 0 | 7 | 30 | 90;
7981
+ from?: string;
7982
+ to?: string;
8012
7983
  }, opts?: RequestOptions): Promise<FolderToolMetrics>;
8013
7984
  /** CSV text with one row per response of every tool of the folder subtree. */
8014
7985
  csv(id: string, opts?: RequestOptions): Promise<FolderCsv>;
@@ -8154,7 +8125,6 @@ declare class Woku {
8154
8125
  readonly company: Company;
8155
8126
  /** Customer journeys: moments, their tools and how each one starts. */
8156
8127
  readonly journeys: Journeys;
8157
- readonly quarantines: Quarantines;
8158
8128
  /** Folders that organize wokus and NPS, CSAT and CES tools. */
8159
8129
  readonly folders: Folders;
8160
8130
  /** Unified search, headline figures and batch moves across every tool type. */
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ var FollowUps = class {
36
36
  };
37
37
 
38
38
  // package.json
39
- var version = "0.5.0";
39
+ var version = "0.6.0";
40
40
 
41
41
  // src/core/errors.ts
42
42
  var WokuError = class extends Error {
@@ -1575,20 +1575,6 @@ var Journeys = class {
1575
1575
  }
1576
1576
  };
1577
1577
 
1578
- // src/resources/quarantines.ts
1579
- var Quarantines = class {
1580
- constructor(client) {
1581
- this.client = client;
1582
- }
1583
- /** Check whether a contact is quarantined. */
1584
- check(params, opts) {
1585
- return this.client.request("get", "/v1/quarantines/check", {
1586
- ...opts,
1587
- query: { ...params, ...opts?.query }
1588
- });
1589
- }
1590
- };
1591
-
1592
1578
  // src/resources/folders.ts
1593
1579
  var Folders = class {
1594
1580
  constructor(client) {
@@ -1664,8 +1650,9 @@ var Folders = class {
1664
1650
  * subfolders for a period against the one before it, with the daily sums and
1665
1651
  * the histogram of scores. `days` is 7, 30 (default) or 90, or 0 for the whole
1666
1652
  * history (every `previous` window is then empty). The period is the last
1667
- * `days` calendar days in UTC, today included. Scales are never mixed across
1668
- * types.
1653
+ * `days` calendar days in UTC, today included. Or a custom range with `from`
1654
+ * and `to` (`YYYY-MM-DD` UTC days, both inclusive, up to 731 days), which
1655
+ * replaces `days`. Scales are never mixed across types.
1669
1656
  */
1670
1657
  metrics(id, params, opts) {
1671
1658
  return this.client.request(
@@ -1851,7 +1838,6 @@ var Woku = class {
1851
1838
  this.folders = new Folders(this.client);
1852
1839
  this.tools = new Tools(this.client);
1853
1840
  this.journeyFolders = new JourneyFolders(this.client);
1854
- this.quarantines = new Quarantines(this.client);
1855
1841
  }
1856
1842
  };
1857
1843