blujay 1.1.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 +4 -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/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/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"]}
|
|
@@ -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
|
|