@wokuapp/sdk 0.5.0 → 0.7.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/README.md +13 -4
- package/dist/index.cjs +4 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -44
- package/dist/index.d.ts +21 -44
- package/dist/index.js +4 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1830,6 +1830,11 @@ interface components {
|
|
|
1830
1830
|
name: string;
|
|
1831
1831
|
/** @description Kinds of comment that alert this number. Defaults to all four. */
|
|
1832
1832
|
sources?: ("woku" | "nps" | "csat" | "ces")[];
|
|
1833
|
+
/**
|
|
1834
|
+
* @description true alerts every review of those kinds (recognitions too); false or absent alerts improvements only.
|
|
1835
|
+
* @default false
|
|
1836
|
+
*/
|
|
1837
|
+
allReviews: boolean;
|
|
1833
1838
|
};
|
|
1834
1839
|
UpdateFolderBodyDTO: {
|
|
1835
1840
|
name?: string;
|
|
@@ -4312,34 +4317,6 @@ interface operations {
|
|
|
4312
4317
|
};
|
|
4313
4318
|
};
|
|
4314
4319
|
};
|
|
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
4320
|
V1InvitationsController_sendNpsInvitations: {
|
|
4344
4321
|
parameters: {
|
|
4345
4322
|
query?: never;
|
|
@@ -5593,7 +5570,7 @@ interface operations {
|
|
|
5593
5570
|
/** @description Upper bound for createdAt (ISO 8601). */
|
|
5594
5571
|
createdTo?: string;
|
|
5595
5572
|
/** @description Lifecycle status of the whole invitation. */
|
|
5596
|
-
status?: "invited" | "partially_responded" | "responded" | "failed";
|
|
5573
|
+
status?: "invited" | "partially_responded" | "responded" | "failed" | "skipped";
|
|
5597
5574
|
page?: number;
|
|
5598
5575
|
limit?: number;
|
|
5599
5576
|
};
|
|
@@ -6640,6 +6617,10 @@ interface operations {
|
|
|
6640
6617
|
query?: {
|
|
6641
6618
|
/** @description Period in days: 7, 30 or 90, or 0 for the whole history. Defaults to 30. */
|
|
6642
6619
|
days?: 0 | 7 | 30 | 90;
|
|
6620
|
+
/** @description Custom period start (YYYY-MM-DD, UTC day, inclusive). With `to`, replaces `days`. */
|
|
6621
|
+
from?: string;
|
|
6622
|
+
/** @description Custom period end (YYYY-MM-DD, UTC day, inclusive). */
|
|
6623
|
+
to?: string;
|
|
6643
6624
|
};
|
|
6644
6625
|
header?: never;
|
|
6645
6626
|
path: {
|
|
@@ -7363,6 +7344,8 @@ interface WhatsappAlertRecipient {
|
|
|
7363
7344
|
name: string;
|
|
7364
7345
|
/** Kinds of comment that alert this number (numbers created before this feature only get `woku`). */
|
|
7365
7346
|
sources: ToolType[];
|
|
7347
|
+
/** `true`: every review of those kinds (recognitions too). `false`: improvements only (default). */
|
|
7348
|
+
allReviews: boolean;
|
|
7366
7349
|
}
|
|
7367
7350
|
/** A folder with its breadcrumb path and subtree stats. */
|
|
7368
7351
|
interface Folder {
|
|
@@ -7376,7 +7359,7 @@ interface Folder {
|
|
|
7376
7359
|
origin: FolderOrigin | null;
|
|
7377
7360
|
/** Provider of an integration folder (`shopify`, `pancake`), otherwise `null`. */
|
|
7378
7361
|
integrationProvider?: string | null;
|
|
7379
|
-
/** WhatsApp numbers alerted when a comment of any tool in the folder is an improvement. */
|
|
7362
|
+
/** WhatsApp numbers alerted when a comment of any tool in the folder is an improvement (or any review, with `allReviews`). */
|
|
7380
7363
|
whatsappAlertRecipients: WhatsappAlertRecipient[];
|
|
7381
7364
|
createdAt: string | null;
|
|
7382
7365
|
stats: FolderStats;
|
|
@@ -7446,6 +7429,9 @@ interface DailyPoint {
|
|
|
7446
7429
|
interface FolderToolMetrics {
|
|
7447
7430
|
/** Period in days; `0` is the whole history (then every `previous` window is empty). */
|
|
7448
7431
|
days: number;
|
|
7432
|
+
/** Custom period (`YYYY-MM-DD`, both inclusive) when one was asked for. */
|
|
7433
|
+
from?: string;
|
|
7434
|
+
to?: string;
|
|
7449
7435
|
tools: ToolMetrics[];
|
|
7450
7436
|
/** Daily sums of both windows (2 x `days`). */
|
|
7451
7437
|
daily: DailyPoint[];
|
|
@@ -7949,17 +7935,6 @@ declare class Journeys {
|
|
|
7949
7935
|
emitEvent(body: JourneyEventInput, opts?: RequestOptions): Promise<Schemas['V1JourneyEventResponseDto']>;
|
|
7950
7936
|
}
|
|
7951
7937
|
|
|
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
7938
|
/**
|
|
7964
7939
|
* Folders that organize wokus and NPS, CSAT and CES tools (`/v1/folders`).
|
|
7965
7940
|
* To list what a folder contains use `woku.tools.list({ folderId })`.
|
|
@@ -8004,11 +7979,14 @@ declare class Folders {
|
|
|
8004
7979
|
* subfolders for a period against the one before it, with the daily sums and
|
|
8005
7980
|
* the histogram of scores. `days` is 7, 30 (default) or 90, or 0 for the whole
|
|
8006
7981
|
* history (every `previous` window is then empty). The period is the last
|
|
8007
|
-
* `days` calendar days in UTC, today included.
|
|
8008
|
-
*
|
|
7982
|
+
* `days` calendar days in UTC, today included. Or a custom range with `from`
|
|
7983
|
+
* and `to` (`YYYY-MM-DD` UTC days, both inclusive, up to 731 days), which
|
|
7984
|
+
* replaces `days`. Scales are never mixed across types.
|
|
8009
7985
|
*/
|
|
8010
7986
|
metrics(id: string, params?: {
|
|
8011
7987
|
days?: 0 | 7 | 30 | 90;
|
|
7988
|
+
from?: string;
|
|
7989
|
+
to?: string;
|
|
8012
7990
|
}, opts?: RequestOptions): Promise<FolderToolMetrics>;
|
|
8013
7991
|
/** CSV text with one row per response of every tool of the folder subtree. */
|
|
8014
7992
|
csv(id: string, opts?: RequestOptions): Promise<FolderCsv>;
|
|
@@ -8154,7 +8132,6 @@ declare class Woku {
|
|
|
8154
8132
|
readonly company: Company;
|
|
8155
8133
|
/** Customer journeys: moments, their tools and how each one starts. */
|
|
8156
8134
|
readonly journeys: Journeys;
|
|
8157
|
-
readonly quarantines: Quarantines;
|
|
8158
8135
|
/** Folders that organize wokus and NPS, CSAT and CES tools. */
|
|
8159
8136
|
readonly folders: Folders;
|
|
8160
8137
|
/** Unified search, headline figures and batch moves across every tool type. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1830,6 +1830,11 @@ interface components {
|
|
|
1830
1830
|
name: string;
|
|
1831
1831
|
/** @description Kinds of comment that alert this number. Defaults to all four. */
|
|
1832
1832
|
sources?: ("woku" | "nps" | "csat" | "ces")[];
|
|
1833
|
+
/**
|
|
1834
|
+
* @description true alerts every review of those kinds (recognitions too); false or absent alerts improvements only.
|
|
1835
|
+
* @default false
|
|
1836
|
+
*/
|
|
1837
|
+
allReviews: boolean;
|
|
1833
1838
|
};
|
|
1834
1839
|
UpdateFolderBodyDTO: {
|
|
1835
1840
|
name?: string;
|
|
@@ -4312,34 +4317,6 @@ interface operations {
|
|
|
4312
4317
|
};
|
|
4313
4318
|
};
|
|
4314
4319
|
};
|
|
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
4320
|
V1InvitationsController_sendNpsInvitations: {
|
|
4344
4321
|
parameters: {
|
|
4345
4322
|
query?: never;
|
|
@@ -5593,7 +5570,7 @@ interface operations {
|
|
|
5593
5570
|
/** @description Upper bound for createdAt (ISO 8601). */
|
|
5594
5571
|
createdTo?: string;
|
|
5595
5572
|
/** @description Lifecycle status of the whole invitation. */
|
|
5596
|
-
status?: "invited" | "partially_responded" | "responded" | "failed";
|
|
5573
|
+
status?: "invited" | "partially_responded" | "responded" | "failed" | "skipped";
|
|
5597
5574
|
page?: number;
|
|
5598
5575
|
limit?: number;
|
|
5599
5576
|
};
|
|
@@ -6640,6 +6617,10 @@ interface operations {
|
|
|
6640
6617
|
query?: {
|
|
6641
6618
|
/** @description Period in days: 7, 30 or 90, or 0 for the whole history. Defaults to 30. */
|
|
6642
6619
|
days?: 0 | 7 | 30 | 90;
|
|
6620
|
+
/** @description Custom period start (YYYY-MM-DD, UTC day, inclusive). With `to`, replaces `days`. */
|
|
6621
|
+
from?: string;
|
|
6622
|
+
/** @description Custom period end (YYYY-MM-DD, UTC day, inclusive). */
|
|
6623
|
+
to?: string;
|
|
6643
6624
|
};
|
|
6644
6625
|
header?: never;
|
|
6645
6626
|
path: {
|
|
@@ -7363,6 +7344,8 @@ interface WhatsappAlertRecipient {
|
|
|
7363
7344
|
name: string;
|
|
7364
7345
|
/** Kinds of comment that alert this number (numbers created before this feature only get `woku`). */
|
|
7365
7346
|
sources: ToolType[];
|
|
7347
|
+
/** `true`: every review of those kinds (recognitions too). `false`: improvements only (default). */
|
|
7348
|
+
allReviews: boolean;
|
|
7366
7349
|
}
|
|
7367
7350
|
/** A folder with its breadcrumb path and subtree stats. */
|
|
7368
7351
|
interface Folder {
|
|
@@ -7376,7 +7359,7 @@ interface Folder {
|
|
|
7376
7359
|
origin: FolderOrigin | null;
|
|
7377
7360
|
/** Provider of an integration folder (`shopify`, `pancake`), otherwise `null`. */
|
|
7378
7361
|
integrationProvider?: string | null;
|
|
7379
|
-
/** WhatsApp numbers alerted when a comment of any tool in the folder is an improvement. */
|
|
7362
|
+
/** WhatsApp numbers alerted when a comment of any tool in the folder is an improvement (or any review, with `allReviews`). */
|
|
7380
7363
|
whatsappAlertRecipients: WhatsappAlertRecipient[];
|
|
7381
7364
|
createdAt: string | null;
|
|
7382
7365
|
stats: FolderStats;
|
|
@@ -7446,6 +7429,9 @@ interface DailyPoint {
|
|
|
7446
7429
|
interface FolderToolMetrics {
|
|
7447
7430
|
/** Period in days; `0` is the whole history (then every `previous` window is empty). */
|
|
7448
7431
|
days: number;
|
|
7432
|
+
/** Custom period (`YYYY-MM-DD`, both inclusive) when one was asked for. */
|
|
7433
|
+
from?: string;
|
|
7434
|
+
to?: string;
|
|
7449
7435
|
tools: ToolMetrics[];
|
|
7450
7436
|
/** Daily sums of both windows (2 x `days`). */
|
|
7451
7437
|
daily: DailyPoint[];
|
|
@@ -7949,17 +7935,6 @@ declare class Journeys {
|
|
|
7949
7935
|
emitEvent(body: JourneyEventInput, opts?: RequestOptions): Promise<Schemas['V1JourneyEventResponseDto']>;
|
|
7950
7936
|
}
|
|
7951
7937
|
|
|
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
7938
|
/**
|
|
7964
7939
|
* Folders that organize wokus and NPS, CSAT and CES tools (`/v1/folders`).
|
|
7965
7940
|
* To list what a folder contains use `woku.tools.list({ folderId })`.
|
|
@@ -8004,11 +7979,14 @@ declare class Folders {
|
|
|
8004
7979
|
* subfolders for a period against the one before it, with the daily sums and
|
|
8005
7980
|
* the histogram of scores. `days` is 7, 30 (default) or 90, or 0 for the whole
|
|
8006
7981
|
* history (every `previous` window is then empty). The period is the last
|
|
8007
|
-
* `days` calendar days in UTC, today included.
|
|
8008
|
-
*
|
|
7982
|
+
* `days` calendar days in UTC, today included. Or a custom range with `from`
|
|
7983
|
+
* and `to` (`YYYY-MM-DD` UTC days, both inclusive, up to 731 days), which
|
|
7984
|
+
* replaces `days`. Scales are never mixed across types.
|
|
8009
7985
|
*/
|
|
8010
7986
|
metrics(id: string, params?: {
|
|
8011
7987
|
days?: 0 | 7 | 30 | 90;
|
|
7988
|
+
from?: string;
|
|
7989
|
+
to?: string;
|
|
8012
7990
|
}, opts?: RequestOptions): Promise<FolderToolMetrics>;
|
|
8013
7991
|
/** CSV text with one row per response of every tool of the folder subtree. */
|
|
8014
7992
|
csv(id: string, opts?: RequestOptions): Promise<FolderCsv>;
|
|
@@ -8154,7 +8132,6 @@ declare class Woku {
|
|
|
8154
8132
|
readonly company: Company;
|
|
8155
8133
|
/** Customer journeys: moments, their tools and how each one starts. */
|
|
8156
8134
|
readonly journeys: Journeys;
|
|
8157
|
-
readonly quarantines: Quarantines;
|
|
8158
8135
|
/** Folders that organize wokus and NPS, CSAT and CES tools. */
|
|
8159
8136
|
readonly folders: Folders;
|
|
8160
8137
|
/** 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.
|
|
39
|
+
var version = "0.7.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.
|
|
1668
|
-
*
|
|
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
|
|