@messagebird/sdk 0.36.0 → 0.37.1
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.mts +38 -27
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -639,9 +639,11 @@ type LanguageTag = string;
|
|
|
639
639
|
type EmailTemplateId = string;
|
|
640
640
|
type EmailTemplateVersionId = string;
|
|
641
641
|
/**
|
|
642
|
-
* Structured key/value label attached to a message
|
|
642
|
+
* Structured key/value label attached to a message or a call. Use tags for low-cardinality filtering dimensions (category, experiment ID, template ID); they surface in the list filter of whatever carries them.
|
|
643
643
|
*
|
|
644
|
-
*
|
|
644
|
+
* On a message they also surface in the event log and in webhook payloads, and a message can carry `metadata` beside them for arbitrary per-send context that does not need to be filterable. A call has none of those three: its tags are set on the wire when the call is placed, and the call record is the one place you read them back.
|
|
645
|
+
*
|
|
646
|
+
* Whatever carries the tags defines how many it may have. Tag names are unique: a send that repeats one is rejected, and on a call the first instance of a name wins.
|
|
645
647
|
*
|
|
646
648
|
*/
|
|
647
649
|
type Tag = {
|
|
@@ -7985,7 +7987,7 @@ type EventWhatsAppSent = {
|
|
|
7985
7987
|
*/
|
|
7986
7988
|
type NumberType$1 = "mobile" | "local" | "national" | "short_code" | "short_code_fteu" | "toll_free" | (string & {});
|
|
7987
7989
|
/**
|
|
7988
|
-
*
|
|
7990
|
+
* A capability supported by a phone number. New capabilities may be added over time, so treat unrecognized values as supported capabilities rather than errors.
|
|
7989
7991
|
*/
|
|
7990
7992
|
type NumberCapability$1 = "sms" | "mms" | "voice" | (string & {});
|
|
7991
7993
|
/**
|
|
@@ -8028,7 +8030,7 @@ type Number = {
|
|
|
8028
8030
|
*/
|
|
8029
8031
|
readonly number_type: NumberType$1;
|
|
8030
8032
|
/**
|
|
8031
|
-
*
|
|
8033
|
+
* Capabilities supported by this number.
|
|
8032
8034
|
*/
|
|
8033
8035
|
readonly capabilities: Array<NumberCapability$1>;
|
|
8034
8036
|
/**
|
|
@@ -8071,7 +8073,7 @@ type AvailableNumber = {
|
|
|
8071
8073
|
*/
|
|
8072
8074
|
number_type: NumberType$1;
|
|
8073
8075
|
/**
|
|
8074
|
-
*
|
|
8076
|
+
* Capabilities supported by this number.
|
|
8075
8077
|
*/
|
|
8076
8078
|
capabilities: Array<NumberCapability$1>;
|
|
8077
8079
|
};
|
|
@@ -8249,6 +8251,10 @@ type VoiceCall = {
|
|
|
8249
8251
|
* Why we refused the call before dialing a carrier. Absent when the call connected or failed at the carrier; see `sip_response_code` for the carrier response.
|
|
8250
8252
|
*/
|
|
8251
8253
|
readonly rejection_reason?: VoiceCallRejectionReason;
|
|
8254
|
+
/**
|
|
8255
|
+
* Your own `{name, value}` labels for this call, taken from the `X-Bird-Call-Tag` headers on the INVITE that placed it. Set them to organise calls by a dimension of your own (campaign, queue, agent, cost centre), then filter this list by them with `tag`. Read-only here: a call is labelled when it is placed, and never afterwards. What is here may be less than what was sent, and the call still goes through either way: a tag whose name or value breaks the rules below is dropped, anything past the first five is ignored, and a name sent more than once keeps its first value. Absent when the call carried none, and on calls recorded before this field existed.
|
|
8256
|
+
*/
|
|
8257
|
+
readonly tags?: Array<Tag>;
|
|
8252
8258
|
/**
|
|
8253
8259
|
* When the call was initiated.
|
|
8254
8260
|
*/
|
|
@@ -8445,7 +8451,7 @@ type ListEmailMessagesData = {
|
|
|
8445
8451
|
*/
|
|
8446
8452
|
starting_after?: string;
|
|
8447
8453
|
/**
|
|
8448
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
8454
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
8449
8455
|
*/
|
|
8450
8456
|
ending_before?: string;
|
|
8451
8457
|
/**
|
|
@@ -8461,7 +8467,7 @@ type ListEmailMessagesData = {
|
|
|
8461
8467
|
*/
|
|
8462
8468
|
status?: EmailMessageStatus;
|
|
8463
8469
|
/**
|
|
8464
|
-
* Filter by tag. Accepts `name` to match any
|
|
8470
|
+
* Filter by tag. Accepts `name` to match any record carrying that tag name, or `name:value` to match a specific tag pair (for example `category:welcome`). Repeat the parameter to add more tags. A record must match every tag listed to be returned.
|
|
8465
8471
|
*
|
|
8466
8472
|
*/
|
|
8467
8473
|
tag?: Array<string>;
|
|
@@ -8515,7 +8521,7 @@ type ListContactsData = {
|
|
|
8515
8521
|
*/
|
|
8516
8522
|
starting_after?: string;
|
|
8517
8523
|
/**
|
|
8518
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
8524
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
8519
8525
|
*/
|
|
8520
8526
|
ending_before?: string;
|
|
8521
8527
|
/**
|
|
@@ -8609,7 +8615,7 @@ type ListContactPropertiesData = {
|
|
|
8609
8615
|
*/
|
|
8610
8616
|
starting_after?: string;
|
|
8611
8617
|
/**
|
|
8612
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
8618
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
8613
8619
|
*/
|
|
8614
8620
|
ending_before?: string;
|
|
8615
8621
|
};
|
|
@@ -8681,7 +8687,7 @@ type ListAudiencesData = {
|
|
|
8681
8687
|
*/
|
|
8682
8688
|
starting_after?: string;
|
|
8683
8689
|
/**
|
|
8684
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
8690
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
8685
8691
|
*/
|
|
8686
8692
|
ending_before?: string;
|
|
8687
8693
|
};
|
|
@@ -8758,7 +8764,7 @@ type ListAudienceContactsData = {
|
|
|
8758
8764
|
*/
|
|
8759
8765
|
starting_after?: string;
|
|
8760
8766
|
/**
|
|
8761
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
8767
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
8762
8768
|
*/
|
|
8763
8769
|
ending_before?: string;
|
|
8764
8770
|
};
|
|
@@ -8831,7 +8837,7 @@ type ListSmsMessagesData = {
|
|
|
8831
8837
|
*/
|
|
8832
8838
|
starting_after?: string;
|
|
8833
8839
|
/**
|
|
8834
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
8840
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
8835
8841
|
*/
|
|
8836
8842
|
ending_before?: string;
|
|
8837
8843
|
/**
|
|
@@ -8869,7 +8875,7 @@ type ListSmsMessagesData = {
|
|
|
8869
8875
|
*/
|
|
8870
8876
|
from?: string;
|
|
8871
8877
|
/**
|
|
8872
|
-
* Filter by tag. Accepts `name` to match any
|
|
8878
|
+
* Filter by tag. Accepts `name` to match any record carrying that tag name, or `name:value` to match a specific tag pair (for example `category:welcome`). Repeat the parameter to add more tags. A record must match every tag listed to be returned.
|
|
8873
8879
|
*
|
|
8874
8880
|
*/
|
|
8875
8881
|
tag?: Array<string>;
|
|
@@ -8944,7 +8950,7 @@ type ListSmsSuppressionsData = {
|
|
|
8944
8950
|
*/
|
|
8945
8951
|
starting_after?: string;
|
|
8946
8952
|
/**
|
|
8947
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
8953
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
8948
8954
|
*/
|
|
8949
8955
|
ending_before?: string;
|
|
8950
8956
|
};
|
|
@@ -9723,7 +9729,7 @@ type ListWhatsAppMessagesData = {
|
|
|
9723
9729
|
*/
|
|
9724
9730
|
starting_after?: string;
|
|
9725
9731
|
/**
|
|
9726
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
9732
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
9727
9733
|
*/
|
|
9728
9734
|
ending_before?: string;
|
|
9729
9735
|
/**
|
|
@@ -9770,7 +9776,7 @@ type ListWhatsAppMessagesData = {
|
|
|
9770
9776
|
*/
|
|
9771
9777
|
category?: WhatsAppTemplateCategory$1;
|
|
9772
9778
|
/**
|
|
9773
|
-
* Filter by tag. Accepts `name` to match any
|
|
9779
|
+
* Filter by tag. Accepts `name` to match any record carrying that tag name, or `name:value` to match a specific tag pair (for example `category:welcome`). Repeat the parameter to add more tags. A record must match every tag listed to be returned.
|
|
9774
9780
|
*
|
|
9775
9781
|
*/
|
|
9776
9782
|
tag?: Array<string>;
|
|
@@ -10476,7 +10482,7 @@ type ListDomainsData = {
|
|
|
10476
10482
|
*/
|
|
10477
10483
|
starting_after?: string;
|
|
10478
10484
|
/**
|
|
10479
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
10485
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
10480
10486
|
*/
|
|
10481
10487
|
ending_before?: string;
|
|
10482
10488
|
/**
|
|
@@ -10568,7 +10574,7 @@ type ListMailboxesData = {
|
|
|
10568
10574
|
*/
|
|
10569
10575
|
starting_after?: string;
|
|
10570
10576
|
/**
|
|
10571
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
10577
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
10572
10578
|
*/
|
|
10573
10579
|
ending_before?: string;
|
|
10574
10580
|
};
|
|
@@ -10682,7 +10688,7 @@ type ListMailboxReceiveRulesData = {
|
|
|
10682
10688
|
*/
|
|
10683
10689
|
starting_after?: string;
|
|
10684
10690
|
/**
|
|
10685
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
10691
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
10686
10692
|
*/
|
|
10687
10693
|
ending_before?: string;
|
|
10688
10694
|
};
|
|
@@ -10762,7 +10768,7 @@ type ListEmailThreadsData = {
|
|
|
10762
10768
|
*/
|
|
10763
10769
|
starting_after?: string;
|
|
10764
10770
|
/**
|
|
10765
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
10771
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
10766
10772
|
*/
|
|
10767
10773
|
ending_before?: string;
|
|
10768
10774
|
};
|
|
@@ -10858,7 +10864,7 @@ type ListEmailThreadMessagesData = {
|
|
|
10858
10864
|
*/
|
|
10859
10865
|
starting_after?: string;
|
|
10860
10866
|
/**
|
|
10861
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
10867
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
10862
10868
|
*/
|
|
10863
10869
|
ending_before?: string;
|
|
10864
10870
|
};
|
|
@@ -10922,7 +10928,7 @@ type ListWorkspaceNumbersData = {
|
|
|
10922
10928
|
*/
|
|
10923
10929
|
prefix?: string;
|
|
10924
10930
|
/**
|
|
10925
|
-
* Filter by
|
|
10931
|
+
* Filter by capability. Repeat the parameter to require several at once: `capabilities=sms&capabilities=voice` returns only numbers that support both.
|
|
10926
10932
|
*/
|
|
10927
10933
|
capabilities?: Array<string>;
|
|
10928
10934
|
/**
|
|
@@ -10934,7 +10940,7 @@ type ListWorkspaceNumbersData = {
|
|
|
10934
10940
|
*/
|
|
10935
10941
|
starting_after?: string;
|
|
10936
10942
|
/**
|
|
10937
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
10943
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
10938
10944
|
*/
|
|
10939
10945
|
ending_before?: string;
|
|
10940
10946
|
};
|
|
@@ -10963,7 +10969,7 @@ type ListAvailableNumbersData = {
|
|
|
10963
10969
|
*/
|
|
10964
10970
|
prefix?: string;
|
|
10965
10971
|
/**
|
|
10966
|
-
* Filter by
|
|
10972
|
+
* Filter by capability. Repeat the parameter to require several at once: `capabilities=sms&capabilities=voice` returns only numbers that support both.
|
|
10967
10973
|
*/
|
|
10968
10974
|
capabilities?: Array<string>;
|
|
10969
10975
|
/**
|
|
@@ -10975,7 +10981,7 @@ type ListAvailableNumbersData = {
|
|
|
10975
10981
|
*/
|
|
10976
10982
|
starting_after?: string;
|
|
10977
10983
|
/**
|
|
10978
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
10984
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
10979
10985
|
*/
|
|
10980
10986
|
ending_before?: string;
|
|
10981
10987
|
};
|
|
@@ -11004,7 +11010,7 @@ type ListNumbersOrdersData = {
|
|
|
11004
11010
|
*/
|
|
11005
11011
|
starting_after?: string;
|
|
11006
11012
|
/**
|
|
11007
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
11013
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
11008
11014
|
*/
|
|
11009
11015
|
ending_before?: string;
|
|
11010
11016
|
};
|
|
@@ -11072,6 +11078,11 @@ type ListVoiceCallsData = {
|
|
|
11072
11078
|
* Return only calls where the calling or called number contains this value. Matches a partial number, so a country or area-code prefix returns every call to or from it. Combines with `from`/`to`, which match one side exactly.
|
|
11073
11079
|
*/
|
|
11074
11080
|
number?: string;
|
|
11081
|
+
/**
|
|
11082
|
+
* Filter by tag. Accepts `name` to match any record carrying that tag name, or `name:value` to match a specific tag pair (for example `category:welcome`). Repeat the parameter to add more tags. A record must match every tag listed to be returned.
|
|
11083
|
+
*
|
|
11084
|
+
*/
|
|
11085
|
+
tag?: Array<string>;
|
|
11075
11086
|
/**
|
|
11076
11087
|
* Return only calls that started at or after this instant, inclusive. RFC 3339 timestamp.
|
|
11077
11088
|
*/
|
|
@@ -11089,7 +11100,7 @@ type ListVoiceCallsData = {
|
|
|
11089
11100
|
*/
|
|
11090
11101
|
starting_after?: string;
|
|
11091
11102
|
/**
|
|
11092
|
-
* Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
|
|
11103
|
+
* Cursor from the `prev_cursor` or `refresh_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order. `prev_cursor` returns the preceding page. `refresh_cursor` anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
|
|
11093
11104
|
*/
|
|
11094
11105
|
ending_before?: string;
|
|
11095
11106
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -7132,9 +7132,9 @@ var BirdClient = class {
|
|
|
7132
7132
|
this.#headers = {
|
|
7133
7133
|
...opts.defaultHeaders,
|
|
7134
7134
|
Authorization: `Bearer ${opts.apiKey}`,
|
|
7135
|
-
"User-Agent": `bird-sdk-js/0.
|
|
7135
|
+
"User-Agent": `bird-sdk-js/0.37.1`,
|
|
7136
7136
|
"Bird-Surface": "sdk-js",
|
|
7137
|
-
"Bird-Version": "0.
|
|
7137
|
+
"Bird-Version": "0.37.1"
|
|
7138
7138
|
};
|
|
7139
7139
|
const caller = detectCaller();
|
|
7140
7140
|
if (caller) this.#headers["Bird-Caller"] = caller;
|
package/package.json
CHANGED