blujay 1.0.0 → 1.2.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/CHANGELOG.md +12 -0
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/contacts/client/Client.js +4 -4
- package/dist/cjs/api/resources/contacts/client/Client.js.map +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactCreateParams.d.ts +2 -0
- package/dist/cjs/api/resources/contacts/client/requests/ContactCreateParams.js.map +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactSearchParams.d.ts +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactSearchParams.js.map +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactUpdateParams.d.ts +2 -0
- package/dist/cjs/api/resources/contacts/client/requests/ContactUpdateParams.js.map +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactUpsertParams.d.ts +2 -0
- package/dist/cjs/api/resources/contacts/client/requests/ContactUpsertParams.js.map +1 -1
- package/dist/cjs/api/types/Contact.d.ts +2 -0
- package/dist/cjs/api/types/Contact.js.map +1 -1
- package/dist/cjs/api/types/ContactAssignmentActionResult.d.ts +2 -0
- package/dist/cjs/api/types/ContactAssignmentActionResult.js.map +1 -1
- package/dist/cjs/api/types/ContactStageActionResult.d.ts +2 -0
- package/dist/cjs/api/types/ContactStageActionResult.js.map +1 -1
- package/dist/cjs/api/types/ContactTagActionResult.d.ts +2 -0
- package/dist/cjs/api/types/ContactTagActionResult.js.map +1 -1
- package/dist/cjs/api/types/Message.d.ts +2 -2
- package/dist/cjs/api/types/Message.js +1 -1
- package/dist/cjs/api/types/Message.js.map +1 -1
- package/dist/cjs/api/types/PhoneNumber.d.ts +33 -6
- package/dist/cjs/api/types/PhoneNumber.js +16 -1
- package/dist/cjs/api/types/PhoneNumber.js.map +1 -1
- package/dist/cjs/custom/version.d.ts +1 -1
- package/dist/cjs/custom/version.js +1 -1
- package/dist/cjs/custom/version.js.map +1 -1
- package/dist/esm/api/resources/contacts/client/Client.d.ts +4 -4
- package/dist/esm/api/resources/contacts/client/Client.js +4 -4
- package/dist/esm/api/resources/contacts/client/Client.js.map +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactCreateParams.d.ts +2 -0
- package/dist/esm/api/resources/contacts/client/requests/ContactCreateParams.js.map +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactSearchParams.d.ts +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactSearchParams.js.map +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactUpdateParams.d.ts +2 -0
- package/dist/esm/api/resources/contacts/client/requests/ContactUpdateParams.js.map +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactUpsertParams.d.ts +2 -0
- package/dist/esm/api/resources/contacts/client/requests/ContactUpsertParams.js.map +1 -1
- package/dist/esm/api/types/Contact.d.ts +2 -0
- package/dist/esm/api/types/Contact.js.map +1 -1
- package/dist/esm/api/types/ContactAssignmentActionResult.d.ts +2 -0
- package/dist/esm/api/types/ContactAssignmentActionResult.js.map +1 -1
- package/dist/esm/api/types/ContactStageActionResult.d.ts +2 -0
- package/dist/esm/api/types/ContactStageActionResult.js.map +1 -1
- package/dist/esm/api/types/ContactTagActionResult.d.ts +2 -0
- package/dist/esm/api/types/ContactTagActionResult.js.map +1 -1
- package/dist/esm/api/types/Message.d.ts +2 -2
- package/dist/esm/api/types/Message.js +1 -1
- package/dist/esm/api/types/Message.js.map +1 -1
- package/dist/esm/api/types/PhoneNumber.d.ts +33 -6
- package/dist/esm/api/types/PhoneNumber.js +16 -1
- package/dist/esm/api/types/PhoneNumber.js.map +1 -1
- package/dist/esm/custom/version.d.ts +1 -1
- package/dist/esm/custom/version.js +1 -1
- package/dist/esm/custom/version.js.map +1 -1
- package/package.json +1 -1
- package/reference.md +4 -4
|
@@ -8,6 +8,8 @@ export interface ContactTagActionResult {
|
|
|
8
8
|
name?: string | undefined;
|
|
9
9
|
first_name?: string | undefined;
|
|
10
10
|
last_name?: string | undefined;
|
|
11
|
+
/** The contact's company. Left out when the contact has none. */
|
|
12
|
+
company?: string | undefined;
|
|
11
13
|
tags: string[];
|
|
12
14
|
stage: string;
|
|
13
15
|
assigned_team_member: Blujay.AssignedTeamMember | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactTagActionResult.js","sourceRoot":"","sources":["../../../../src/api/types/ContactTagActionResult.ts"],"names":[],"mappings":"AAAA,gEAAgE","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface ContactTagActionResult {\n /** Add-tag responses only. True when the tag was new to this contact. */\n tag_added: boolean;\n contact_id: Blujay.ContactId;\n phone_number?: string | undefined;\n email?: string | undefined;\n name?: string | undefined;\n first_name?: string | undefined;\n last_name?: string | undefined;\n tags: string[];\n stage: string;\n assigned_team_member: Blujay.AssignedTeamMember | null;\n opted_out: boolean;\n opted_out_at?: string | undefined;\n opted_out_source?: string | undefined;\n messaging_allowed: boolean;\n /** `true` when someone saved this contact: created or edited it in Blujay or through the API, imported it, or Blujay linked it to a record in a connected CRM. `false` for a contact Blujay created on its own when you texted or called a number, or it texted or called you. Creating, importing or updating it through the API saves it; tags, stage, assignee and opt-outs don't. */\n saved: boolean;\n created_at: string;\n updated_at: string;\n /** Import responses only. True when the import created a new contact. */\n created?: boolean | undefined;\n /** Import responses only. True when the import updated an existing contact. */\n updated?: boolean | undefined;\n /** Stage responses only. True when the stage changed. */\n stage_changed?: boolean | undefined;\n /** Assignee responses only. True when the assignee changed. */\n assignment_changed?: boolean | undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ContactTagActionResult.js","sourceRoot":"","sources":["../../../../src/api/types/ContactTagActionResult.ts"],"names":[],"mappings":"AAAA,gEAAgE","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface ContactTagActionResult {\n /** Add-tag responses only. True when the tag was new to this contact. */\n tag_added: boolean;\n contact_id: Blujay.ContactId;\n phone_number?: string | undefined;\n email?: string | undefined;\n name?: string | undefined;\n first_name?: string | undefined;\n last_name?: string | undefined;\n /** The contact's company. Left out when the contact has none. */\n company?: string | undefined;\n tags: string[];\n stage: string;\n assigned_team_member: Blujay.AssignedTeamMember | null;\n opted_out: boolean;\n opted_out_at?: string | undefined;\n opted_out_source?: string | undefined;\n messaging_allowed: boolean;\n /** `true` when someone saved this contact: created or edited it in Blujay or through the API, imported it, or Blujay linked it to a record in a connected CRM. `false` for a contact Blujay created on its own when you texted or called a number, or it texted or called you. Creating, importing or updating it through the API saves it; tags, stage, assignee and opt-outs don't. */\n saved: boolean;\n created_at: string;\n updated_at: string;\n /** Import responses only. True when the import created a new contact. */\n created?: boolean | undefined;\n /** Import responses only. True when the import updated an existing contact. */\n updated?: boolean | undefined;\n /** Stage responses only. True when the stage changed. */\n stage_changed?: boolean | undefined;\n /** Assignee responses only. True when the assignee changed. */\n assignment_changed?: boolean | undefined;\n}\n"]}
|
|
@@ -18,7 +18,7 @@ export interface Message {
|
|
|
18
18
|
/**
|
|
19
19
|
* Present only when the message failed for a reason you can act on:
|
|
20
20
|
* - `ATTACHMENT_FETCH_FAILED`: a media URL couldn't be downloaded.
|
|
21
|
-
* - `ATTACHMENT_TOO_LARGE`: a file is too large to send, including SMS/MMS messages whose files total more than
|
|
21
|
+
* - `ATTACHMENT_TOO_LARGE`: a file is too large to send, including SMS/MMS messages whose files total more than 25 MiB.
|
|
22
22
|
* - `UNSUPPORTED_ATTACHMENT_TYPE`: a file type can't be sent by the service the message went out on (for example a PDF over SMS) or in that group.
|
|
23
23
|
* - `SENDER_RETIRED`: the sending number was retired. Send from an active number.
|
|
24
24
|
* - `REPLY_REQUIRES_IMESSAGE`: a threaded reply could only go out as SMS or RCS, so it wasn't sent. Send it again without `reply_to`.
|
|
@@ -83,7 +83,7 @@ export declare namespace Message {
|
|
|
83
83
|
/**
|
|
84
84
|
* Present only when the message failed for a reason you can act on:
|
|
85
85
|
* - `ATTACHMENT_FETCH_FAILED`: a media URL couldn't be downloaded.
|
|
86
|
-
* - `ATTACHMENT_TOO_LARGE`: a file is too large to send, including SMS/MMS messages whose files total more than
|
|
86
|
+
* - `ATTACHMENT_TOO_LARGE`: a file is too large to send, including SMS/MMS messages whose files total more than 25 MiB.
|
|
87
87
|
* - `UNSUPPORTED_ATTACHMENT_TYPE`: a file type can't be sent by the service the message went out on (for example a PDF over SMS) or in that group.
|
|
88
88
|
* - `SENDER_RETIRED`: the sending number was retired. Send from an active number.
|
|
89
89
|
* - `REPLY_REQUIRES_IMESSAGE`: a threaded reply could only go out as SMS or RCS, so it wasn't sent. Send it again without `reply_to`.
|
|
@@ -21,7 +21,7 @@ export var Message;
|
|
|
21
21
|
/**
|
|
22
22
|
* Present only when the message failed for a reason you can act on:
|
|
23
23
|
* - `ATTACHMENT_FETCH_FAILED`: a media URL couldn't be downloaded.
|
|
24
|
-
* - `ATTACHMENT_TOO_LARGE`: a file is too large to send, including SMS/MMS messages whose files total more than
|
|
24
|
+
* - `ATTACHMENT_TOO_LARGE`: a file is too large to send, including SMS/MMS messages whose files total more than 25 MiB.
|
|
25
25
|
* - `UNSUPPORTED_ATTACHMENT_TYPE`: a file type can't be sent by the service the message went out on (for example a PDF over SMS) or in that group.
|
|
26
26
|
* - `SENDER_RETIRED`: the sending number was retired. Send from an active number.
|
|
27
27
|
* - `REPLY_REQUIRES_IMESSAGE`: a threaded reply could only go out as SMS or RCS, so it wasn't sent. Send it again without `reply_to`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../../src/api/types/Message.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAiEhE,MAAM,KAAW,OAAO,CA2CvB;AA3CD,WAAiB,OAAO;IACpB,0FAA0F;IAC7E,iBAAS,GAAG;QACrB,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,UAAU;KACd,CAAC;IAEX,mEAAmE;IACtD,wBAAgB,GAAG;QAC5B,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;KACJ,CAAC;IAEX,mFAAmF;IACtE,eAAO,GAAG;QACnB,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;KACJ,CAAC;IAEX;;;;;;;OAOG;IACU,mBAAW,GAAG;QACvB,qBAAqB,EAAE,yBAAyB;QAChD,kBAAkB,EAAE,sBAAsB;QAC1C,yBAAyB,EAAE,6BAA6B;QACxD,aAAa,EAAE,gBAAgB;QAC/B,qBAAqB,EAAE,yBAAyB;KAC1C,CAAC;IAEX,gIAAgI;IACnH,mBAAW,GAAG;QACvB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,MAAM;KACN,CAAC;AAEf,CAAC,EA3CgB,OAAO,KAAP,OAAO,QA2CvB","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface Message {\n message_id: Blujay.MessageId;\n chat_id: Blujay.ChatId;\n /** The contact in a direct chat. Omitted for group messages and for direct chats with someone who isn't a contact. */\n contact_id?: Blujay.ContactId | undefined;\n /** Who sent an inbound message. In a group, the person who sent it. In a direct chat, the other person, with the chat's phone number or email address and the same `contact_id` when they're a contact; someone who isn't a contact (an email address, a short code or a number outside the US) has no `contact_id`. Omitted for your own messages. */\n sender?: Blujay.MessageSender | undefined;\n team_member_id: Blujay.MessageTeamMemberId | null;\n phone_number_id: Blujay.PhoneNumberId;\n /** `outbound` for messages your workspace sent, `inbound` for messages from a contact. */\n direction: Message.Direction;\n /** The service you asked for, or null if the message used Auto. */\n preferred_service: Message.PreferredService | null;\n /** The service that actually carried the message, or null until it's confirmed. */\n service: Message.Service | null;\n status: Blujay.MessageStatus;\n /**\n * Present only when the message failed for a reason you can act on:\n * - `ATTACHMENT_FETCH_FAILED`: a media URL couldn't be downloaded.\n * - `ATTACHMENT_TOO_LARGE`: a file is too large to send, including SMS/MMS messages whose files total more than
|
|
1
|
+
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../../src/api/types/Message.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAiEhE,MAAM,KAAW,OAAO,CA2CvB;AA3CD,WAAiB,OAAO;IACpB,0FAA0F;IAC7E,iBAAS,GAAG;QACrB,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,UAAU;KACd,CAAC;IAEX,mEAAmE;IACtD,wBAAgB,GAAG;QAC5B,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;KACJ,CAAC;IAEX,mFAAmF;IACtE,eAAO,GAAG;QACnB,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;KACJ,CAAC;IAEX;;;;;;;OAOG;IACU,mBAAW,GAAG;QACvB,qBAAqB,EAAE,yBAAyB;QAChD,kBAAkB,EAAE,sBAAsB;QAC1C,yBAAyB,EAAE,6BAA6B;QACxD,aAAa,EAAE,gBAAgB;QAC/B,qBAAqB,EAAE,yBAAyB;KAC1C,CAAC;IAEX,gIAAgI;IACnH,mBAAW,GAAG;QACvB,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,MAAM;KACN,CAAC;AAEf,CAAC,EA3CgB,OAAO,KAAP,OAAO,QA2CvB","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\nexport interface Message {\n message_id: Blujay.MessageId;\n chat_id: Blujay.ChatId;\n /** The contact in a direct chat. Omitted for group messages and for direct chats with someone who isn't a contact. */\n contact_id?: Blujay.ContactId | undefined;\n /** Who sent an inbound message. In a group, the person who sent it. In a direct chat, the other person, with the chat's phone number or email address and the same `contact_id` when they're a contact; someone who isn't a contact (an email address, a short code or a number outside the US) has no `contact_id`. Omitted for your own messages. */\n sender?: Blujay.MessageSender | undefined;\n team_member_id: Blujay.MessageTeamMemberId | null;\n phone_number_id: Blujay.PhoneNumberId;\n /** `outbound` for messages your workspace sent, `inbound` for messages from a contact. */\n direction: Message.Direction;\n /** The service you asked for, or null if the message used Auto. */\n preferred_service: Message.PreferredService | null;\n /** The service that actually carried the message, or null until it's confirmed. */\n service: Message.Service | null;\n status: Blujay.MessageStatus;\n /**\n * Present only when the message failed for a reason you can act on:\n * - `ATTACHMENT_FETCH_FAILED`: a media URL couldn't be downloaded.\n * - `ATTACHMENT_TOO_LARGE`: a file is too large to send, including SMS/MMS messages whose files total more than 25 MiB.\n * - `UNSUPPORTED_ATTACHMENT_TYPE`: a file type can't be sent by the service the message went out on (for example a PDF over SMS) or in that group.\n * - `SENDER_RETIRED`: the sending number was retired. Send from an active number.\n * - `REPLY_REQUIRES_IMESSAGE`: a threaded reply could only go out as SMS or RCS, so it wasn't sent. Send it again without `reply_to`.\n */\n failure_code?: Message.FailureCode | undefined;\n parts: Blujay.MessageOutputPart[];\n /** The requested effect. See `degradations` for whether it was delivered. */\n effect?: Blujay.MessageEffect | undefined;\n /** Requested features that weren't delivered because the message went out as SMS or RCS. Empty when nothing was dropped. Message webhooks carry the same entries. */\n degradations: Blujay.MessageDegradation[];\n /** Threaded reply info, or null when the message is not a reply. */\n reply_to: Blujay.MessageReplyToInfo | null;\n /** The reactions currently on the message, oldest first, from your phone number and from contacts. A newer reaction from the same person on the same part replaces the older one, and removed reactions are left out. Empty when there are none. Message reads only; message webhooks don't carry it. */\n reactions: Blujay.MessageReaction[];\n /** When the message left your number. Null until then, and always null for inbound messages. */\n sent_at: string | null;\n /** When the recipient's device confirmed delivery, where the service reports it. */\n delivered_at: string | null;\n /** When the recipient read the message, where the service reports it. */\n read_at: string | null;\n /** When the message failed. Null if it never failed. */\n failed_at: string | null;\n /** Why the message failed. Null unless `status` is `failed`. Message webhooks carry the same object. */\n failure: Blujay.MessageFailure | null;\n /** The `client_reference` you sent with the message, when you sent one. */\n client_reference?: string | undefined;\n /** When the iMessage was last edited, or null if it was never edited. `parts` holds the current text. */\n edited_at: string | null;\n /** How many times the iMessage was edited. */\n edit_count: number;\n /** Earlier versions of the text, oldest first. Returned only with `include=edit_history`. */\n edit_history?: Blujay.MessageEditHistoryEntry[] | undefined;\n /** When the iMessage was unsent, or null. An unsent message has no text in `parts`, and the unsent text is never returned. */\n unsent_at: string | null;\n /** `all` when the whole message was unsent (`parts` is empty); `text` when only a caption was unsent and attachments remain. */\n unsent_scope: Message.UnsentScope | null;\n trace_id?: Blujay.TraceId | undefined;\n created_at: string;\n updated_at: string;\n}\n\nexport namespace Message {\n /** `outbound` for messages your workspace sent, `inbound` for messages from a contact. */\n export const Direction = {\n Inbound: \"inbound\",\n Outbound: \"outbound\",\n } as const;\n export type Direction = (typeof Direction)[keyof typeof Direction];\n /** The service you asked for, or null if the message used Auto. */\n export const PreferredService = {\n IMessage: \"iMessage\",\n Rcs: \"RCS\",\n Sms: \"SMS\",\n } as const;\n export type PreferredService = (typeof PreferredService)[keyof typeof PreferredService];\n /** The service that actually carried the message, or null until it's confirmed. */\n export const Service = {\n IMessage: \"iMessage\",\n Rcs: \"RCS\",\n Sms: \"SMS\",\n } as const;\n export type Service = (typeof Service)[keyof typeof Service];\n /**\n * Present only when the message failed for a reason you can act on:\n * - `ATTACHMENT_FETCH_FAILED`: a media URL couldn't be downloaded.\n * - `ATTACHMENT_TOO_LARGE`: a file is too large to send, including SMS/MMS messages whose files total more than 25 MiB.\n * - `UNSUPPORTED_ATTACHMENT_TYPE`: a file type can't be sent by the service the message went out on (for example a PDF over SMS) or in that group.\n * - `SENDER_RETIRED`: the sending number was retired. Send from an active number.\n * - `REPLY_REQUIRES_IMESSAGE`: a threaded reply could only go out as SMS or RCS, so it wasn't sent. Send it again without `reply_to`.\n */\n export const FailureCode = {\n AttachmentFetchFailed: \"ATTACHMENT_FETCH_FAILED\",\n AttachmentTooLarge: \"ATTACHMENT_TOO_LARGE\",\n UnsupportedAttachmentType: \"UNSUPPORTED_ATTACHMENT_TYPE\",\n SenderRetired: \"SENDER_RETIRED\",\n ReplyRequiresImessage: \"REPLY_REQUIRES_IMESSAGE\",\n } as const;\n export type FailureCode = (typeof FailureCode)[keyof typeof FailureCode];\n /** `all` when the whole message was unsent (`parts` is empty); `text` when only a caption was unsent and attachments remain. */\n export const UnsentScope = {\n All: \"all\",\n Text: \"text\",\n } as const;\n export type UnsentScope = (typeof UnsentScope)[keyof typeof UnsentScope];\n}\n"]}
|
|
@@ -16,7 +16,7 @@ export interface PhoneNumber {
|
|
|
16
16
|
access_type: PhoneNumber.AccessType;
|
|
17
17
|
/** Whether the number can send right now. When `allowed` is false, `reason_code` and `reason` say why. */
|
|
18
18
|
send_status: PhoneNumber.SendStatus;
|
|
19
|
-
/** Dedicated-line health. Omitted on the Shared Free Plan. */
|
|
19
|
+
/** Dedicated-line health, the same status the Phone Numbers page shows. Omitted on the Shared Free Plan and on numbers that are no longer active. */
|
|
20
20
|
health_status?: PhoneNumber.HealthStatus | undefined;
|
|
21
21
|
/** Live sending limits for a dedicated number. The values are specific to each number and change over time, so read them here each time instead of hard-coding them. Omitted on the Shared Free Plan. */
|
|
22
22
|
limits?: PhoneNumber.Limits | undefined;
|
|
@@ -72,22 +72,49 @@ export declare namespace PhoneNumber {
|
|
|
72
72
|
type ReasonCode = (typeof ReasonCode)[keyof typeof ReasonCode];
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
* Dedicated-line health. Omitted on the Shared Free Plan.
|
|
75
|
+
* Dedicated-line health, the same status the Phone Numbers page shows. Omitted on the Shared Free Plan and on numbers that are no longer active.
|
|
76
76
|
*/
|
|
77
77
|
interface HealthStatus {
|
|
78
|
+
/**
|
|
79
|
+
* - `healthy`: no issues found. New numbers start here.
|
|
80
|
+
* - `degraded`: few new contacts are replying. Make first texts more specific.
|
|
81
|
+
* - `critical`: Apple flagged the number. iMessages sent from it may not arrive.
|
|
82
|
+
*/
|
|
78
83
|
status: HealthStatus.Status;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Omitted when `status` is `healthy`.
|
|
86
|
+
* - `low_reply_rate`: fewer than 30% of new contacts replied this week.
|
|
87
|
+
* - `new_contacts_slowed`: fewer than 20% replied, so the number is limited to 10 new contacts a day until replies recover. `limits.new_contacts.limit_per_day` shows the limit.
|
|
88
|
+
* - `apple_flag`: Apple flagged the number.
|
|
89
|
+
*/
|
|
90
|
+
reason_code?: HealthStatus.ReasonCode | undefined;
|
|
91
|
+
/** A short explanation you can show your users. Omitted when `status` is `healthy`. */
|
|
92
|
+
reason?: string | undefined;
|
|
82
93
|
}
|
|
83
94
|
namespace HealthStatus {
|
|
95
|
+
/**
|
|
96
|
+
* - `healthy`: no issues found. New numbers start here.
|
|
97
|
+
* - `degraded`: few new contacts are replying. Make first texts more specific.
|
|
98
|
+
* - `critical`: Apple flagged the number. iMessages sent from it may not arrive.
|
|
99
|
+
*/
|
|
84
100
|
const Status: {
|
|
85
101
|
readonly Healthy: "healthy";
|
|
86
102
|
readonly Degraded: "degraded";
|
|
87
103
|
readonly Critical: "critical";
|
|
88
|
-
readonly Unknown: "unknown";
|
|
89
104
|
};
|
|
90
105
|
type Status = (typeof Status)[keyof typeof Status];
|
|
106
|
+
/**
|
|
107
|
+
* Omitted when `status` is `healthy`.
|
|
108
|
+
* - `low_reply_rate`: fewer than 30% of new contacts replied this week.
|
|
109
|
+
* - `new_contacts_slowed`: fewer than 20% replied, so the number is limited to 10 new contacts a day until replies recover. `limits.new_contacts.limit_per_day` shows the limit.
|
|
110
|
+
* - `apple_flag`: Apple flagged the number.
|
|
111
|
+
*/
|
|
112
|
+
const ReasonCode: {
|
|
113
|
+
readonly LowReplyRate: "low_reply_rate";
|
|
114
|
+
readonly NewContactsSlowed: "new_contacts_slowed";
|
|
115
|
+
readonly AppleFlag: "apple_flag";
|
|
116
|
+
};
|
|
117
|
+
type ReasonCode = (typeof ReasonCode)[keyof typeof ReasonCode];
|
|
91
118
|
}
|
|
92
119
|
/**
|
|
93
120
|
* Live sending limits for a dedicated number. The values are specific to each number and change over time, so read them here each time instead of hard-coding them. Omitted on the Shared Free Plan.
|
|
@@ -30,11 +30,26 @@ export var PhoneNumber;
|
|
|
30
30
|
})(SendStatus = PhoneNumber.SendStatus || (PhoneNumber.SendStatus = {}));
|
|
31
31
|
let HealthStatus;
|
|
32
32
|
(function (HealthStatus) {
|
|
33
|
+
/**
|
|
34
|
+
* - `healthy`: no issues found. New numbers start here.
|
|
35
|
+
* - `degraded`: few new contacts are replying. Make first texts more specific.
|
|
36
|
+
* - `critical`: Apple flagged the number. iMessages sent from it may not arrive.
|
|
37
|
+
*/
|
|
33
38
|
HealthStatus.Status = {
|
|
34
39
|
Healthy: "healthy",
|
|
35
40
|
Degraded: "degraded",
|
|
36
41
|
Critical: "critical",
|
|
37
|
-
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Omitted when `status` is `healthy`.
|
|
45
|
+
* - `low_reply_rate`: fewer than 30% of new contacts replied this week.
|
|
46
|
+
* - `new_contacts_slowed`: fewer than 20% replied, so the number is limited to 10 new contacts a day until replies recover. `limits.new_contacts.limit_per_day` shows the limit.
|
|
47
|
+
* - `apple_flag`: Apple flagged the number.
|
|
48
|
+
*/
|
|
49
|
+
HealthStatus.ReasonCode = {
|
|
50
|
+
LowReplyRate: "low_reply_rate",
|
|
51
|
+
NewContactsSlowed: "new_contacts_slowed",
|
|
52
|
+
AppleFlag: "apple_flag",
|
|
38
53
|
};
|
|
39
54
|
})(HealthStatus = PhoneNumber.HealthStatus || (PhoneNumber.HealthStatus = {}));
|
|
40
55
|
})(PhoneNumber || (PhoneNumber = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneNumber.js","sourceRoot":"","sources":["../../../../src/api/types/PhoneNumber.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAgChE,MAAM,KAAW,WAAW,CA8I3B;AA9ID,WAAiB,WAAW;IACX,kBAAM,GAAG;QAClB,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,aAAa;KACpB,CAAC;IAEE,oBAAQ,GAAG;QACpB,QAAQ,EAAE,UAAU;KACd,CAAC;IAEX,8GAA8G;IACjG,sBAAU,GAAG;QACtB,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,WAAW;KAChB,CAAC;IAkBX,IAAiB,UAAU,CAc1B;IAdD,WAAiB,UAAU;QACvB;;;;;WAKG;QACU,qBAAU,GAAG;YACtB,aAAa,EAAE,gBAAgB;YAC/B,cAAc,EAAE,iBAAiB;YACjC,cAAc,EAAE,iBAAiB;YACjC,qBAAqB,EAAE,yBAAyB;SAC1C,CAAC;IAEf,CAAC,EAdgB,UAAU,GAAV,sBAAU,KAAV,sBAAU,QAc1B;IAYD,IAAiB,YAAY,CAQ5B;IARD,WAAiB,YAAY;QACZ,mBAAM,GAAG;YAClB,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,UAAU;YACpB,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,SAAS;SACZ,CAAC;IAEf,CAAC,EARgB,YAAY,GAAZ,wBAAY,KAAZ,wBAAY,QAQ5B;AA4EL,CAAC,EA9IgB,WAAW,KAAX,WAAW,QA8I3B","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\n/**\n * A Blujay number in your workspace and what it can do right now. Numbers on the Shared Free Plan omit health, limits, queue and calling readiness.\n */\nexport interface PhoneNumber {\n /** Only on a number a reseller partner released. */\n released_at?: string | undefined;\n /** Only on a number a reseller partner released. It receives until then, then retires. */\n quiet_until?: string | undefined;\n phone_number_id: Blujay.PhoneNumberId;\n display_number: string;\n label?: string | undefined;\n status: PhoneNumber.Status;\n line_type: PhoneNumber.LineType;\n /** `dedicated` for a number that belongs to your workspace; `shared` for a number on the Shared Free Plan. */\n access_type: PhoneNumber.AccessType;\n /** Whether the number can send right now. When `allowed` is false, `reason_code` and `reason` say why. */\n send_status: PhoneNumber.SendStatus;\n /** Dedicated-line health. Omitted on the Shared Free Plan. */\n health_status?: PhoneNumber.HealthStatus | undefined;\n /** Live sending limits for a dedicated number. The values are specific to each number and change over time, so read them here each time instead of hard-coding them. Omitted on the Shared Free Plan. */\n limits?: PhoneNumber.Limits | undefined;\n /** Messages waiting to send from this dedicated number. Capacity is specific to each number and can change over time, so read it here each time instead of hard-coding it. When `remaining` reaches 0, sends return `429 QUEUE_FULL`. Omitted on the Shared Free Plan. */\n queue?: PhoneNumber.Queue | undefined;\n capabilities: PhoneNumber.Capabilities;\n /** Sending rules for this number, such as whether it can start conversations and whether links are allowed in a chat's first message. */\n outbound_policy: PhoneNumber.OutboundPolicy;\n}\n\nexport namespace PhoneNumber {\n export const Status = {\n Active: \"active\",\n Unavailable: \"unavailable\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n export const LineType = {\n Outbound: \"outbound\",\n } as const;\n export type LineType = (typeof LineType)[keyof typeof LineType];\n /** `dedicated` for a number that belongs to your workspace; `shared` for a number on the Shared Free Plan. */\n export const AccessType = {\n Shared: \"shared\",\n Dedicated: \"dedicated\",\n } as const;\n export type AccessType = (typeof AccessType)[keyof typeof AccessType];\n\n /**\n * Whether the number can send right now. When `allowed` is false, `reason_code` and `reason` say why.\n */\n export interface SendStatus {\n allowed: boolean;\n reason?: string | undefined;\n /**\n * - `sender_retired`: the phone number was retired. Send from an active number.\n * - `number_released`: a reseller partner released the number. It still receives until it retires, but can't send. Send from an active number.\n * - `number_inactive`: the phone number isn't active.\n * - `number_setup_incomplete`: the phone number isn't set up for messaging yet.\n */\n reason_code?: SendStatus.ReasonCode | undefined;\n }\n\n export namespace SendStatus {\n /**\n * - `sender_retired`: the phone number was retired. Send from an active number.\n * - `number_released`: a reseller partner released the number. It still receives until it retires, but can't send. Send from an active number.\n * - `number_inactive`: the phone number isn't active.\n * - `number_setup_incomplete`: the phone number isn't set up for messaging yet.\n */\n export const ReasonCode = {\n SenderRetired: \"sender_retired\",\n NumberReleased: \"number_released\",\n NumberInactive: \"number_inactive\",\n NumberSetupIncomplete: \"number_setup_incomplete\",\n } as const;\n export type ReasonCode = (typeof ReasonCode)[keyof typeof ReasonCode];\n }\n\n /**\n * Dedicated-line health. Omitted on the Shared Free Plan.\n */\n export interface HealthStatus {\n status: HealthStatus.Status;\n score?: number | undefined;\n as_of?: string | undefined;\n freshness?: string | undefined;\n }\n\n export namespace HealthStatus {\n export const Status = {\n Healthy: \"healthy\",\n Degraded: \"degraded\",\n Critical: \"critical\",\n Unknown: \"unknown\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n }\n\n /**\n * Live sending limits for a dedicated number. The values are specific to each number and change over time, so read them here each time instead of hard-coding them. Omitted on the Shared Free Plan.\n */\n export interface Limits {\n /** New contacts this number has messaged today, against its daily limit. */\n new_contacts: Limits.NewContacts;\n /** Messages sent today, against a recommended daily total. When `enforced` is false, the guideline is advice, not a hard limit. */\n daily: Limits.Daily;\n }\n\n export namespace Limits {\n /**\n * New contacts this number has messaged today, against its daily limit.\n */\n export interface NewContacts {\n used_today: number;\n limit_per_day: number;\n remaining_today: number;\n reset_at: string;\n }\n\n /**\n * Messages sent today, against a recommended daily total. When `enforced` is false, the guideline is advice, not a hard limit.\n */\n export interface Daily {\n used_today: number;\n guideline: number;\n remaining_to_guideline: number;\n enforced: boolean;\n }\n }\n\n /**\n * Messages waiting to send from this dedicated number. Capacity is specific to each number and can change over time, so read it here each time instead of hard-coding it. When `remaining` reaches 0, sends return `429 QUEUE_FULL`. Omitted on the Shared Free Plan.\n */\n export interface Queue {\n pending: number;\n capacity: number;\n remaining: number;\n }\n\n export interface Capabilities {\n messaging: Capabilities.Messaging;\n /** Whether this number is ready for calling. Omitted on the Shared Free Plan. */\n voice?: Capabilities.Voice | undefined;\n }\n\n export namespace Capabilities {\n export interface Messaging {\n outbound: boolean;\n inbound: boolean;\n media_attachments: boolean;\n link_parts: boolean;\n }\n\n /**\n * Whether this number is ready for calling. Omitted on the Shared Free Plan.\n */\n export interface Voice {\n outbound_ready: boolean;\n inbound_forwarding_ready: boolean;\n }\n }\n\n /**\n * Sending rules for this number, such as whether it can start conversations and whether links are allowed in a chat's first message.\n */\n export interface OutboundPolicy {\n /** True when this number can only message people who texted it first (Free Plan and AI Agent numbers). Skip these when you start conversations; a first send from one returns `CONTACT_NOT_VERIFIED` or `CONTACT_MUST_TEXT_FIRST`. */\n inbound_first: boolean;\n first_message_links_allowed: boolean;\n follow_up_links_allowed: boolean;\n daily_total_enforced: boolean;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PhoneNumber.js","sourceRoot":"","sources":["../../../../src/api/types/PhoneNumber.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAgChE,MAAM,KAAW,WAAW,CAyK3B;AAzKD,WAAiB,WAAW;IACX,kBAAM,GAAG;QAClB,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,aAAa;KACpB,CAAC;IAEE,oBAAQ,GAAG;QACpB,QAAQ,EAAE,UAAU;KACd,CAAC;IAEX,8GAA8G;IACjG,sBAAU,GAAG;QACtB,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,WAAW;KAChB,CAAC;IAkBX,IAAiB,UAAU,CAc1B;IAdD,WAAiB,UAAU;QACvB;;;;;WAKG;QACU,qBAAU,GAAG;YACtB,aAAa,EAAE,gBAAgB;YAC/B,cAAc,EAAE,iBAAiB;YACjC,cAAc,EAAE,iBAAiB;YACjC,qBAAqB,EAAE,yBAAyB;SAC1C,CAAC;IAEf,CAAC,EAdgB,UAAU,GAAV,sBAAU,KAAV,sBAAU,QAc1B;IAuBD,IAAiB,YAAY,CAwB5B;IAxBD,WAAiB,YAAY;QACzB;;;;WAIG;QACU,mBAAM,GAAG;YAClB,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,UAAU;YACpB,QAAQ,EAAE,UAAU;SACd,CAAC;QAEX;;;;;WAKG;QACU,uBAAU,GAAG;YACtB,YAAY,EAAE,gBAAgB;YAC9B,iBAAiB,EAAE,qBAAqB;YACxC,SAAS,EAAE,YAAY;SACjB,CAAC;IAEf,CAAC,EAxBgB,YAAY,GAAZ,wBAAY,KAAZ,wBAAY,QAwB5B;AA4EL,CAAC,EAzKgB,WAAW,KAAX,WAAW,QAyK3B","sourcesContent":["// This file was auto-generated by Fern from our API Definition.\n\nimport type * as Blujay from \"../index.js\";\n\n/**\n * A Blujay number in your workspace and what it can do right now. Numbers on the Shared Free Plan omit health, limits, queue and calling readiness.\n */\nexport interface PhoneNumber {\n /** Only on a number a reseller partner released. */\n released_at?: string | undefined;\n /** Only on a number a reseller partner released. It receives until then, then retires. */\n quiet_until?: string | undefined;\n phone_number_id: Blujay.PhoneNumberId;\n display_number: string;\n label?: string | undefined;\n status: PhoneNumber.Status;\n line_type: PhoneNumber.LineType;\n /** `dedicated` for a number that belongs to your workspace; `shared` for a number on the Shared Free Plan. */\n access_type: PhoneNumber.AccessType;\n /** Whether the number can send right now. When `allowed` is false, `reason_code` and `reason` say why. */\n send_status: PhoneNumber.SendStatus;\n /** Dedicated-line health, the same status the Phone Numbers page shows. Omitted on the Shared Free Plan and on numbers that are no longer active. */\n health_status?: PhoneNumber.HealthStatus | undefined;\n /** Live sending limits for a dedicated number. The values are specific to each number and change over time, so read them here each time instead of hard-coding them. Omitted on the Shared Free Plan. */\n limits?: PhoneNumber.Limits | undefined;\n /** Messages waiting to send from this dedicated number. Capacity is specific to each number and can change over time, so read it here each time instead of hard-coding it. When `remaining` reaches 0, sends return `429 QUEUE_FULL`. Omitted on the Shared Free Plan. */\n queue?: PhoneNumber.Queue | undefined;\n capabilities: PhoneNumber.Capabilities;\n /** Sending rules for this number, such as whether it can start conversations and whether links are allowed in a chat's first message. */\n outbound_policy: PhoneNumber.OutboundPolicy;\n}\n\nexport namespace PhoneNumber {\n export const Status = {\n Active: \"active\",\n Unavailable: \"unavailable\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n export const LineType = {\n Outbound: \"outbound\",\n } as const;\n export type LineType = (typeof LineType)[keyof typeof LineType];\n /** `dedicated` for a number that belongs to your workspace; `shared` for a number on the Shared Free Plan. */\n export const AccessType = {\n Shared: \"shared\",\n Dedicated: \"dedicated\",\n } as const;\n export type AccessType = (typeof AccessType)[keyof typeof AccessType];\n\n /**\n * Whether the number can send right now. When `allowed` is false, `reason_code` and `reason` say why.\n */\n export interface SendStatus {\n allowed: boolean;\n reason?: string | undefined;\n /**\n * - `sender_retired`: the phone number was retired. Send from an active number.\n * - `number_released`: a reseller partner released the number. It still receives until it retires, but can't send. Send from an active number.\n * - `number_inactive`: the phone number isn't active.\n * - `number_setup_incomplete`: the phone number isn't set up for messaging yet.\n */\n reason_code?: SendStatus.ReasonCode | undefined;\n }\n\n export namespace SendStatus {\n /**\n * - `sender_retired`: the phone number was retired. Send from an active number.\n * - `number_released`: a reseller partner released the number. It still receives until it retires, but can't send. Send from an active number.\n * - `number_inactive`: the phone number isn't active.\n * - `number_setup_incomplete`: the phone number isn't set up for messaging yet.\n */\n export const ReasonCode = {\n SenderRetired: \"sender_retired\",\n NumberReleased: \"number_released\",\n NumberInactive: \"number_inactive\",\n NumberSetupIncomplete: \"number_setup_incomplete\",\n } as const;\n export type ReasonCode = (typeof ReasonCode)[keyof typeof ReasonCode];\n }\n\n /**\n * Dedicated-line health, the same status the Phone Numbers page shows. Omitted on the Shared Free Plan and on numbers that are no longer active.\n */\n export interface HealthStatus {\n /**\n * - `healthy`: no issues found. New numbers start here.\n * - `degraded`: few new contacts are replying. Make first texts more specific.\n * - `critical`: Apple flagged the number. iMessages sent from it may not arrive.\n */\n status: HealthStatus.Status;\n /**\n * Omitted when `status` is `healthy`.\n * - `low_reply_rate`: fewer than 30% of new contacts replied this week.\n * - `new_contacts_slowed`: fewer than 20% replied, so the number is limited to 10 new contacts a day until replies recover. `limits.new_contacts.limit_per_day` shows the limit.\n * - `apple_flag`: Apple flagged the number.\n */\n reason_code?: HealthStatus.ReasonCode | undefined;\n /** A short explanation you can show your users. Omitted when `status` is `healthy`. */\n reason?: string | undefined;\n }\n\n export namespace HealthStatus {\n /**\n * - `healthy`: no issues found. New numbers start here.\n * - `degraded`: few new contacts are replying. Make first texts more specific.\n * - `critical`: Apple flagged the number. iMessages sent from it may not arrive.\n */\n export const Status = {\n Healthy: \"healthy\",\n Degraded: \"degraded\",\n Critical: \"critical\",\n } as const;\n export type Status = (typeof Status)[keyof typeof Status];\n /**\n * Omitted when `status` is `healthy`.\n * - `low_reply_rate`: fewer than 30% of new contacts replied this week.\n * - `new_contacts_slowed`: fewer than 20% replied, so the number is limited to 10 new contacts a day until replies recover. `limits.new_contacts.limit_per_day` shows the limit.\n * - `apple_flag`: Apple flagged the number.\n */\n export const ReasonCode = {\n LowReplyRate: \"low_reply_rate\",\n NewContactsSlowed: \"new_contacts_slowed\",\n AppleFlag: \"apple_flag\",\n } as const;\n export type ReasonCode = (typeof ReasonCode)[keyof typeof ReasonCode];\n }\n\n /**\n * Live sending limits for a dedicated number. The values are specific to each number and change over time, so read them here each time instead of hard-coding them. Omitted on the Shared Free Plan.\n */\n export interface Limits {\n /** New contacts this number has messaged today, against its daily limit. */\n new_contacts: Limits.NewContacts;\n /** Messages sent today, against a recommended daily total. When `enforced` is false, the guideline is advice, not a hard limit. */\n daily: Limits.Daily;\n }\n\n export namespace Limits {\n /**\n * New contacts this number has messaged today, against its daily limit.\n */\n export interface NewContacts {\n used_today: number;\n limit_per_day: number;\n remaining_today: number;\n reset_at: string;\n }\n\n /**\n * Messages sent today, against a recommended daily total. When `enforced` is false, the guideline is advice, not a hard limit.\n */\n export interface Daily {\n used_today: number;\n guideline: number;\n remaining_to_guideline: number;\n enforced: boolean;\n }\n }\n\n /**\n * Messages waiting to send from this dedicated number. Capacity is specific to each number and can change over time, so read it here each time instead of hard-coding it. When `remaining` reaches 0, sends return `429 QUEUE_FULL`. Omitted on the Shared Free Plan.\n */\n export interface Queue {\n pending: number;\n capacity: number;\n remaining: number;\n }\n\n export interface Capabilities {\n messaging: Capabilities.Messaging;\n /** Whether this number is ready for calling. Omitted on the Shared Free Plan. */\n voice?: Capabilities.Voice | undefined;\n }\n\n export namespace Capabilities {\n export interface Messaging {\n outbound: boolean;\n inbound: boolean;\n media_attachments: boolean;\n link_parts: boolean;\n }\n\n /**\n * Whether this number is ready for calling. Omitted on the Shared Free Plan.\n */\n export interface Voice {\n outbound_ready: boolean;\n inbound_forwarding_ready: boolean;\n }\n }\n\n /**\n * Sending rules for this number, such as whether it can start conversations and whether links are allowed in a chat's first message.\n */\n export interface OutboundPolicy {\n /** True when this number can only message people who texted it first (Free Plan and AI Agent numbers). Skip these when you start conversations; a first send from one returns `CONTACT_NOT_VERIFIED` or `CONTACT_MUST_TEXT_FIRST`. */\n inbound_first: boolean;\n first_message_links_allowed: boolean;\n follow_up_links_allowed: boolean;\n daily_total_enforced: boolean;\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Hand-written (not generated): the library version sent in User-Agent.
|
|
2
2
|
// Keep it equal to package.json's version; `npm test` checks.
|
|
3
3
|
import { getUserAgent } from "../core/runtime/index.js";
|
|
4
|
-
export const SDK_VERSION = "1.
|
|
4
|
+
export const SDK_VERSION = "1.2.0";
|
|
5
5
|
/** For example `blujay-node/1.0.0 (darwin; arm64) Node/22.11.0`: this library, the platform, the runtime. */
|
|
6
6
|
export function userAgent() {
|
|
7
7
|
return getUserAgent("blujay-node", SDK_VERSION);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/custom/version.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,8DAA8D;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC,6GAA6G;AAC7G,MAAM,UAAU,SAAS;IACrB,OAAO,YAAY,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;AACpD,CAAC","sourcesContent":["// Hand-written (not generated): the library version sent in User-Agent.\n// Keep it equal to package.json's version; `npm test` checks.\nimport { getUserAgent } from \"../core/runtime/index.js\";\n\nexport const SDK_VERSION = \"1.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/custom/version.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,8DAA8D;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC,6GAA6G;AAC7G,MAAM,UAAU,SAAS;IACrB,OAAO,YAAY,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;AACpD,CAAC","sourcesContent":["// Hand-written (not generated): the library version sent in User-Agent.\n// Keep it equal to package.json's version; `npm test` checks.\nimport { getUserAgent } from \"../core/runtime/index.js\";\n\nexport const SDK_VERSION = \"1.2.0\";\n\n/** For example `blujay-node/1.0.0 (darwin; arm64) Node/22.11.0`: this library, the platform, the runtime. */\nexport function userAgent(): string {\n return getUserAgent(\"blujay-node\", SDK_VERSION);\n}\n"]}
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -1414,9 +1414,9 @@ const response = page.response;
|
|
|
1414
1414
|
<dl>
|
|
1415
1415
|
<dd>
|
|
1416
1416
|
|
|
1417
|
-
Creates a contact. `phone_number` is required; `email`, `name`, `first_name` and `
|
|
1417
|
+
Creates a contact. `phone_number` is required; `email`, `name`, `first_name`, `last_name` and `company` are optional. Returns `409 CONTACT_ALREADY_EXISTS` if the phone number belongs to a saved contact, or the email to any other contact, in your workspace.
|
|
1418
1418
|
|
|
1419
|
-
If Blujay already created a contact for this phone number (`saved: false`), this saves that contact instead: it keeps its `contact_id` and `created_at`, takes the `email
|
|
1419
|
+
If Blujay already created a contact for this phone number (`saved: false`), this saves that contact instead: it keeps its `contact_id` and `created_at`, takes the `email`, names and `company` you send, and returns `201` with `saved: true`.
|
|
1420
1420
|
|
|
1421
1421
|
Creating a contact through the API doesn't send a webhook or start workflows that run on new contacts. To create or update in one call, use `POST /v1/contacts/import`.
|
|
1422
1422
|
</dd>
|
|
@@ -1484,9 +1484,9 @@ await client.contacts.create({
|
|
|
1484
1484
|
<dl>
|
|
1485
1485
|
<dd>
|
|
1486
1486
|
|
|
1487
|
-
Creates or updates a contact by phone number. `phone_number` is required; `email`, `name`, `first_name` and `
|
|
1487
|
+
Creates or updates a contact by phone number. `phone_number` is required; `email`, `name`, `first_name`, `last_name` and `company` are optional.
|
|
1488
1488
|
|
|
1489
|
-
- If a contact has this phone number, Blujay updates it (`200`), including its email and
|
|
1489
|
+
- If a contact has this phone number, Blujay updates it (`200`), including its email, names and company when you send them. A contact Blujay created (`saved: false`) becomes saved.
|
|
1490
1490
|
- If no contact has this phone number, Blujay creates one (`201`).
|
|
1491
1491
|
- If you send an email that already belongs to a different contact, Blujay returns `409 CONTACT_MATCH_CONFLICT` and changes nothing. This happens even when no contact has the phone number.
|
|
1492
1492
|
|