@ixblix/sdk-js 0.4.2 → 0.4.3

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +20 -13
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -19,17 +19,8 @@ export interface Contact {
19
19
  externalId: string;
20
20
  name?: string;
21
21
  metadata?: Record<string, unknown>;
22
- /**
23
- * LGPD consent status. Consent is memorized per company: once `GRANTED`, it
24
- * is reused by every conversation with the same company and the customer is
25
- * not asked again.
26
- */
27
22
  consentStatus: ConsentStatus;
28
- /**
29
- * Timestamp of the first time the customer granted consent for this company.
30
- * Absent/null when consent was never granted.
31
- */
32
- consentedAt?: string | null;
23
+ consentedAt?: string;
33
24
  }
34
25
  /** Payload used to create a conversation for a contact. */
35
26
  export interface ContactInput {
@@ -206,6 +197,8 @@ export interface Message {
206
197
  clientMessageId?: string | null;
207
198
  /** Identifier of the operator that sent this message (COMPANY-sent only). */
208
199
  operatorUuid?: string;
200
+ /** Identity of the operator that sent this message (COMPANY-sent only). */
201
+ operator?: Operator;
209
202
  /**
210
203
  * Identifier of the message this one replies to, when it is a reply.
211
204
  * Absent/null when the message is not a reply.
@@ -237,14 +230,19 @@ export interface MessageReaction {
237
230
  operatorUuid?: string | null;
238
231
  createdAt: string;
239
232
  }
240
- /** Result of adding, replacing or removing a message reaction. */
233
+ /** Result of adding, replacing or removing an emoji reaction. */
241
234
  export interface MessageReactionResult {
242
- id: string;
235
+ conversationId: string;
243
236
  messageId: string;
237
+ /** The message's reactions after the change. */
238
+ reactions: MessageReaction[];
239
+ /** `added` when a reaction was set or replaced, `removed` when cleared. */
240
+ action: "added" | "removed";
241
+ /** The emoji that was set, or null when removed. */
244
242
  emoji: string | null;
245
243
  senderType: SenderType;
246
244
  operatorUuid?: string | null;
247
- createdAt: string;
245
+ reactedAt: string;
248
246
  }
249
247
  /** Metadata of a media file attached to a message. */
250
248
  export interface Media {
@@ -284,6 +282,10 @@ export interface RegisterCompanyInput {
284
282
  planId?: string;
285
283
  paymentProvider?: string;
286
284
  confirmationWebhookUrl?: string;
285
+ /** Contact e-mail forwarded to the gateway as the checkout customer e-mail. */
286
+ email?: string;
287
+ /** Tax id (CPF/CNPJ) required by some gateways such as Asaas. */
288
+ taxId?: string;
287
289
  }
288
290
  /** Payment instructions returned when registering a company. */
289
291
  export interface PaymentInstructions {
@@ -293,6 +295,11 @@ export interface PaymentInstructions {
293
295
  currency: string;
294
296
  confirmationUrl: string;
295
297
  status: string;
298
+ /**
299
+ * Hosted checkout URL the customer must be redirected to. Absent for free
300
+ * plans and for providers that settle the charge inline.
301
+ */
302
+ checkoutUrl?: string;
296
303
  }
297
304
  /** Result of registering a company. */
298
305
  export interface RegisterCompanyResult {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixblix/sdk-js",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Official ixblix SDK for desk/CRM integrations. Create overflow conversations, exchange end-to-end encrypted messages and media, and manage company onboarding.",
5
5
  "license": "MIT",
6
6
  "type": "module",